6

New to networking and studying hard but limited access to a kit to try things at the moment...

My question is - if I had, for example, two Layer-2 switches cable connected, could I have devices on the same subnet e.g. 192.168.10.0/24, on either switch? No VLAN, these are unmanaged switches. Do the switches create a trunk from one to the other?

Thanks in advance!

2 Answers 2

7

Yes. You don’t even need a trunk. If all ports on both switches are access ports on Vlan 3, then the port connecting the two switches are on Vlan 3 and both switches form one broadcast domain on that Vlan.

If switches are unmanaged then all ports would be on the one Vlan and the number is irrelevant.

A couple helpful details:

Access ports to end hosts or routers should have portfast enabled, but access ports interconnecting switches should not.

Two switches on one Vlan is common for redundancy, but in that case you want two connections between them. Ideally the two connections would be etherchanneled to optimize bandwidth and failover (as opposed to relying on spanning tree to avoid loops).

Under some circumstances (same VTP domain) Cisco switches automatically form 802.1q trunks when you connect them together.

7

Without VLANs, connected switches form a single broadcast domain - that is exactly what you need for a single IP subnet. Just connect away.

VLANs require managed switches and allow you to split (partition) a shared switch infrastructure into distinct broadcast domains - ideally suited for multiple IP subnets. In order to connect multiple VLANs across a single link you'd need a VLAN trunk, tagging each frame by VLAN association. That way, each side of the link knows precisely the VLAN a frame belongs to.

Not the answer you're looking for? Browse other questions tagged or ask your own question.