04-12-2015
05:09 AM
- last edited on
03-25-2019
04:33 PM
by
ciscomoderator
One doubt.. Thanks to add your comments and support please..
|||||||||||||||||||||||
Q- Is it possible to reuse VLANs on different interfaces of router ?
I have a scenario in which I have created sub interfaces on router (i.e. Gi0/0.1 & Gi0/0.2 || Gi0/1.1 & Gi0/1.1) .Two switches are connected on Gi0/0 & Gi0/1 with Trunk link between switches & router sub interfaces.
All Devices are inter-pingable .
Now point is why & How is it possible to have same VLANs with different I.P subnets on different i/f of cisco router ?
My understanding is that all Layer-2 overheads are stripped off moment packet reaches the router i/f and as router looks for S&D I.P (& next hop routers) so it should be Ok to reuse the VLANs over different interfaces of router. Router has nothing to do with VLANs as long as routing is involved.
VLANs: virtual Local area network for LAN switching environment.
But moment I try to config same encapsulation (either both with dot1q "2" or with dot1q "3" on two sub-if of Gi0/0) on two sub-interfaces of a router i/f there comes a pop-up "%Configuration of multiple subinterfaces of the same main interface with the same VID (2) is not permitted.This VID is already configured on GigabitEthernet0/0.1." .The reason should be that sub-i/f are part of trunk link .
Looking for your expert comments to correct me in case I am incorrect and add your valuable feedback.
Best Regards!
Ashish
Solved! Go to Solution.
04-12-2015 10:03 AM
Hi Reza and Ashish,
Reza, your answer is perfectly right for basic switches where, once you create a VLAN, the VLAN is known to the entire switch including all its line cards and ports. On these switches, truly, you cannot use a single VLAN ID to describe two independent VLANs. Having two switchports with the same VLAN ID is simply having them both in the same virtual broadcast domain, traffic being switched between them as usual.
However, and Ashish is thinking very correctly here, routed interfaces are a different story. Routed interfaces effectively terminate a broadcast domain and isolate it from any other existing broadcast domain connected to the same router. Routed interfaces neither share nor carry Layer2 control information or entire frames between each other - instead, they decapsulate the content in received Layer2 frames and process/forward it based on Layer3 information present.
Note that this description in fact applies to any interface that operates as a routed interface, whether it is a physical interface or a subinterface.
Because of this, it is actually perfectly legal and well-supported to use the same VLAN IDs for subinterfaces of different physical interfaces of a single router. A VLAN ID configured for a particular subinterface allows the router to correctly assign the ingress subinterface to each incoming frame over the associated physical interface so that all inbound processing can be properly performed (incoming ACLs, NAT, uRPF if configured, etc.). Obviously, two subinterfaces under a single physical interface can not share a single VLAN ID because from Layer2 operations perspective of the interface, they would be indistinguishable. However, there is absolutely no reason why a single VLAN ID could not be reused for two subinterfaces under two different physical interfaces. Understandably, regardless of whether the VLAN IDs are shared or unique, each subinterface of a router must be in a unique IP subnet.
So, to sum it up: On a switch, two or more switchports configured with the same VLAN ID causes them to be a member of the same single broadcast domain, that is, VLAN. On a router, two or more routed subinterfaces under different physical interfaces configured with the same VLAN ID constitute two independent broadcast domains (and thus IP networks) because these broadcast domains are made separate by the sole virtue of being connected to a routed subinterface that by definition bounds and terminates them.
Best regards,
Peter
04-12-2015 08:39 AM
Hi,
Vlan IDs are locally significant per device and not per interface. So, within the same router, you can't use the same vlan for 2 different interfaces but you can use the same vlan on 2 different routers.
HTH
04-12-2015 10:03 AM
Hi Reza and Ashish,
Reza, your answer is perfectly right for basic switches where, once you create a VLAN, the VLAN is known to the entire switch including all its line cards and ports. On these switches, truly, you cannot use a single VLAN ID to describe two independent VLANs. Having two switchports with the same VLAN ID is simply having them both in the same virtual broadcast domain, traffic being switched between them as usual.
However, and Ashish is thinking very correctly here, routed interfaces are a different story. Routed interfaces effectively terminate a broadcast domain and isolate it from any other existing broadcast domain connected to the same router. Routed interfaces neither share nor carry Layer2 control information or entire frames between each other - instead, they decapsulate the content in received Layer2 frames and process/forward it based on Layer3 information present.
Note that this description in fact applies to any interface that operates as a routed interface, whether it is a physical interface or a subinterface.
Because of this, it is actually perfectly legal and well-supported to use the same VLAN IDs for subinterfaces of different physical interfaces of a single router. A VLAN ID configured for a particular subinterface allows the router to correctly assign the ingress subinterface to each incoming frame over the associated physical interface so that all inbound processing can be properly performed (incoming ACLs, NAT, uRPF if configured, etc.). Obviously, two subinterfaces under a single physical interface can not share a single VLAN ID because from Layer2 operations perspective of the interface, they would be indistinguishable. However, there is absolutely no reason why a single VLAN ID could not be reused for two subinterfaces under two different physical interfaces. Understandably, regardless of whether the VLAN IDs are shared or unique, each subinterface of a router must be in a unique IP subnet.
So, to sum it up: On a switch, two or more switchports configured with the same VLAN ID causes them to be a member of the same single broadcast domain, that is, VLAN. On a router, two or more routed subinterfaces under different physical interfaces configured with the same VLAN ID constitute two independent broadcast domains (and thus IP networks) because these broadcast domains are made separate by the sole virtue of being connected to a routed subinterface that by definition bounds and terminates them.
Best regards,
Peter
04-12-2015 11:11 AM
Many Thanks Peter and Reza .. :)
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