cascade switches multiple VLAN

1) the router has: VLAN1 and VLAN2, 2) switch1: VLAN1(1-12 port), VLAN2 (13-24 port) 3) switch2: VLAN1(1-8 port), VLAN2(9-16 port) 4) all the ports in VLAN1 are in the same subnet, same as VLAN2. 5) the router- switch1-switch2 are cascaded.

Question is that:

*when setup VLAN1/2 in switch 1/2, do we need to assign IP address/ gateway in each switch's VLAN, or it is good enough to set the iP in router's VLAN only? *do the VLAN name has to be the same in order to be in the same subnet?

Thanks, Yvette.

Reply to
yvette.ye
Loading thread data ...

The answer to your question depends on whether you are using a router or a l3 switch. In your case, where you are using a router, the router must have an interface in each vlan, and a connection to the first switch in each vlan (either two separate connections, or a trunk). The first switch then also must have a connection in each vlan to switch 2 (either trunk, or two separate connections again). The switches should be IP'ed in either vlan 1 or 2 for management, but that interface and subsequent default gateway have NOTHING to do with ports in those vlans and traffic routed to/from them. The router will manage everything by arping for the MAC of the destination IP, which the switches will flood, and then a reply will come, at which time the router will pass the traffic to the switches for delivery by layer 2 mac only.

If however you were running a L3 switch, where a switch or pair of switches has IPs in each vlan, and subsequently acts as the default gateway for those vlans, then the router is just for things going further into the network. A switch (or pair if using HSRP) would have a physical IP in each vlan, one virtual if you were using HSRP, and the nodes on vlans 1 and 2 would be using the switches as the default gateways for each respective network.

Lastly, most L2 switches only allow one interface to be setup with an IP, which is to be used for mgmt of the switch and nothing else. You get to pick which vlan that is in. If its a layer 3 switch, you CAN set an IP in each vlan, but this is not wise as it just causes additional complexity and loss of addresses if you are using a router as the layer 3 owner of the network.

However, and one last thing, if your switches are layer 3 capable, it is a smart design choice to move layer 3 ownership of those networks to the switches to reduce bottlenecks. As it stands right now, a client on vlan 2 on switch 2 that needs to talk to a node on vlan 1 on switch two, must hop to switch one, then to the router, then back to switch 1, then back to switch 2. This effectively sets up bottlenecks at two points as traffic is scaled. I would at least move vlan ownership to switch 1 to reduce traffic to the router (and reserve it only for traffic leaving the switches for another destination), or consider moving vlan 3 and 4 to switch 2, and 1 and 2 to switch 1. This would then make sure traffic between nodes on the same switch is not leaving the switch.

Obviously it all depends on your design, equipment, and budget, but daisy-chaining switches is never a good design. Since this is a lab, who really cares, but just wanted to make that clear.

Hope this answers your question.

Reply to
Trendkill

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.