10-15-2004 08:33 AM - edited 03-02-2019 07:18 PM
hi!
I've created 3 subinterfaces in router1 and 3 vlan on switch attached to router1:
10.71.9.x
10.71.10.x
10.71.11.x
In my another router which is router2 which also connected to a switch. Will i be able to add a host with either 3 of the subnets above? or i need to create new subinterfaces and vlan on router2 and the switch connected to router2? Thks!
10-15-2004 09:09 AM
My answers depend on the interconnections, or lack thereof, between the routers and switches in your example.
If router2 connects to the same switch as router1, then yes, you'll be able to add a host to any of the three subnets.
If router2 connects to a different switch than router1 does, but the two switches are connected, then yes again. (If there's a VLAN trunk between them, or three access ports on one switch cross-connected to three on the other, and each connection carries one VLAN's traffic from one switch to the other.)
If router2 connects to a different switch and the two switches are not connected, then it depends on whether router2 and router1 are connected:
If router2 and router1 are not connected, then yes. (You can re-use VLAN numbers and IP subnets over and over, as long as they're not going to connect to one another.)
If router2 and router1 are connected, then if they bridge VLAN traffic between the switches, then yes.
If router2 and router1 are connected, but they route traffic rather than bridging it, then no. (You would have discontiguous subnets.)
I would recommend separately numbered VLAN subinterfaces and IP subnets. Routers work best with these.
10-15-2004 09:32 AM
hi! What are you referring to when you said yes in the 2 statements below? yes to add new host or yes to create new subnet/vlan?
If router2 and router1 are connected, then if they bridge VLAN traffic between the switches, then yes.
If router2 and router1 are connected, but they route traffic rather than bridging it, then no. (You would have discontiguous subnets.)
What's the different between bridging and route traffice? if router1 and router2 is not directly connected but there're another router between them, then what will the result?
Thks!
10-15-2004 01:43 PM
RE: If router2 and router1 are connected, then if they bridge VLAN traffic between the switches, then yes, you could add new hosts in the same subnet/VLAN on different sides of the link between the two routers.
The WAN link between the two routers would have to be configured to act similar to a VLAN trunk, bridging broadcast traffic from each VLAN in the local switch to the corresponding ports in the same VLAN on the remote switch. While it is possible to configure routers to do this, I do not recommend it as it wastes WAN bandwidth, putting broadcast traffic on the WAN link that doesn't really need to be there.
RE: If router2 and router1 are connected, but they route traffic rather than bridging it, then no, you can't add new hosts in the same subnet/VLAN on different sides of the link. You would have discontiguous subnets.
To understand the problem, imagine this: you have a machine on subnet "A" on a local VLAN, and you want to send traffic to a system on subnet "B" on a remote VLAN. The local router which is your default gateway will take your traffic and send it to the direct connection it has locally with subnet "B". It will always prefer the local connection over something it learns about with the same subnet numbers across a remote WAN link. So your traffic will never get to the system on the remote VLAN.
Now, if that remote subnet is unique, your local router won't have a direct connection to it so it will send the traffic to the correct destination.
The difference between bridging and routing traffic is how far the router looks into each frame or packet before making a decision where to forward it. If a bridge or switch does not know where the destination system is, it broadcasts it out all interfaces. A router only sends traffic to a destination system if it knows how to reach that system. Routers are more efficient in how they utilize WAN bandwidth: they keep broadcasts from propagating onto other LAN or WAN links. (There are exceptions to this, of course.) Bridges and switches generally do not restrict where broadcasts go. (But there are exceptions to this, too.)
If there is another router or routers in between router1 and router2, then unless they are also configured to bridge traffic through so that the VLANs at either end are connected, bridging will not work. If those intermediate routers are routing, then you need distinct subnets at each end.
Remember, VLANs and subnets don't necessarily refer to the same thing. It is possible to set up a network so that there is a 1:1 correspondence. But it is also possible to set up a network where every switch port is in the same VLAN (think default VLAN 1, right out of the box) and yet all the users on a switch can be in a unique IP subnet, separated from users in other subnets by routers or Layer 3 switches acting as routers.
Giving systems on opposite sides of a WAN link IP addresses in the same subnet forces you to bridge those remote LANs together over the WAN link if you want them to be able to communicate with one another. The way IP works, if a host system on one subnet thinks it's communicating with another system on the same subnet, it will not send its traffic to the router/default gateway. It has no reason to: it thinks the destination IP is on the same network. So if the destination host happens to be on the wrong side of the routed WAN link, in your same-subnet on-opposite-sides of-the-WAN-link scenario, it will receive nothing from the sender.
All systems in the same Layer 3 IP subnet are supposed to be in the same Layer 2 broadcast domain. If they are not, then you have discontiguous subnets.
10-15-2004 06:01 PM
Thks! for the explanation.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide