Skip navigation
Cisco Learning Home > CCNP R&S Study Group > Discussions
8448 Views 34 Replies Latest reply: Jan 16, 2011 5:09 PM by jamesh RSS 1 2 3 Previous Next

Currently Being Moderated

inter-vlan communication (vlan tagging)

Dec 17, 2010 7:15 AM

James 7 posts since
May 12, 2009

hello everyone,

 

i have been on this form for a while, learned a lot from the discuses. here is my question:

 

assume the following:

 

PC1 --> swithc1-->switch2 --> PC2

PC 1 is on vlan 10; PC 2 is on vlan 20. both PCs are on the  same subnet.

all ports on switch 1 are configured as access mode and access vlan 10

all ports on switch 2 are configured as access mode and access vlan 20.

 

PC 1 is able to ping PC 2 ?? it did a lab on this it did work. ...

 

the only thing i can think of is the vlan tagging happens when the traffic pass a trunk link on non-native vlan  ??

 

 

can anyone clearify this.

thanks.

 

 

James

  • Conwyn 7,907 posts since
    Sep 10, 2008
    Currently Being Moderated
    1. Dec 17, 2010 7:27 AM (in response to James)
    Re: inter-vlan communication (vlan tagging)

    Hi James

     

    If they are on the same subnet then they must be on the same VLAN so they have set native vlan to 10 and 20 on the respective switches or connected the switches together with an access port.

     

    Regards Conwyn

  • Zaher Hamiyah 167 posts since
    Aug 14, 2008
    Currently Being Moderated
    3. Dec 17, 2010 12:05 PM (in response to James)
    Re: inter-vlan communication (vlan tagging)

    James,

     

    traffic received by a switch that arrives on one VLAN will be forwarded only to ports on the same VLAN unless IP routing is enabled.

    Since you don't have IP Routing as I assume, PC1 will communicate with SW1 using VLAN 10 and PC2 will communicate with SW2 using VLAN 20. And as you configured the link between SW1 and SW2 as access link, even the both sides are on different VLANs, the traffic will still pass to other side and vice versa. Access ports send only untagged frames, which are frames that don't contain VLAN infromation.

     

    Sy,

    Zaher Hamiyah

  • Conwyn 7,907 posts since
    Sep 10, 2008
    Currently Being Moderated
    4. Dec 17, 2010 12:32 PM (in response to James)
    Re: inter-vlan communication (vlan tagging)

    Hi James

     

    Did you not read this part of the post "or connected the switches together with an access port."

     

    Regards Conwyn

  • Brian 2,968 posts since
    Aug 17, 2009
    Currently Being Moderated
    6. Dec 18, 2010 3:44 PM (in response to James)
    Re: inter-vlan communication (vlan tagging)

    Aloha James,

     

    Think about how traffic is sent and received.  When PC1 sends traffic to PC2 there is no VLAN TAG on the traffic.  As the traffic enters the port on SW1, SW1 TAGs the traffic with VLAN10.  The traffic is sent out the access port between SW1 - SW2, because this port belongs to VLAN10.  Now as traffic exits this port there is NO VLAN TAG.  When SW2 receives this traffic entering his port he TAGs with VLAN20.  Since PC2 is connected to a port on the switch belonging to VLAN20 traffic is sent out this port.  Again, as the traffic leaves the port to PC2 there is NO VLAN TAG.

     

    Switches TAG traffic as the enter the access port and remove the TAG as traffic exits the access port.  This is why this setup is able to work.

     

    HTH

  • Conwyn 7,907 posts since
    Sep 10, 2008
    Currently Being Moderated
    7. Dec 18, 2010 1:49 PM (in response to Brian)
    Re: inter-vlan communication (vlan tagging)

    Hi Brian

     

    I think I would like to spin this slightly.

     

    A cable between a switch connecting to another switch can either be an access port or a trunk port.

     

    If it is a access port packets are simply sent down the wire. The logic being the cable simply extends vlan X.

     

    If it is an trunk ports it allows traffic from vlans A,B and C to tranverse the cable so we need to somehow not mix up the traffic from each vlan.

     

    So for traffic from the non-native vlan and assume A,B and C are non native then as the packet hits the cable we insert additional information into the Ethernet frame. This includes the vlan number A,B or C. When it arrives at the other end we remove the vlan information and sent it to vlan A,B or C.

     

    Regards Conwyn

  • Brian 2,968 posts since
    Aug 17, 2009
    Currently Being Moderated
    8. Dec 18, 2010 3:23 PM (in response to Conwyn)
    Re: inter-vlan communication (vlan tagging)

    Conwyn,

     

    You can spin anyway you like.  I fully understand how "Trunks" and "Access" ports work.  But traffic sent out an access port on any switch has NO VLAN information. Period!  Switches TAG traffic as it enters an Access Port and remove the TAG has the traffic exits the Access Port.  Therefore, in the example,

     

    PC1 <---> P1 (vlan10) - SW1 - (Vlan10) P24 <------> P24 (Vlan20) - SW2 - (Vlan20) P1 <--> PC2

     

    The VLAN TAGs are only present within the switches themselves, because all ports are configured as Access ports.  There is no VLAN TAG information present on the link between the two switches.

     

    HTH

  • sreenivas_naidu 78 posts since
    Sep 29, 2009
    Currently Being Moderated
    9. Dec 19, 2010 3:42 AM (in response to Brian)
    Re: inter-vlan communication (vlan tagging)

    I agree with Brian,the frames sent over any access ports are not tagged,the frames are tagged when it exits a port and specifically on a switch to switch link(trunk link ) is configured with an  trunk encapsulation (isl or dot1.q).

    So in the above case  :

    PC1 <---> P1 (vlan10) - SW1 - (Vlan10) P24 <------> P24 (Vlan20) - SW2 - (Vlan20) P1 <--> PC2

    is absolutely correct as pointed by Brian.Frames are sent accross the switchs untagged hence the pc1 is able to communicate with pc2 althought they are in different vlans.

  • Conwyn 7,907 posts since
    Sep 10, 2008
    Currently Being Moderated
    10. Dec 19, 2010 4:47 AM (in response to sreenivas_naidu)
    Re: inter-vlan communication (vlan tagging)

    Hi Sreenivas

     

    I think the important point that the switches are not aware of the cable ends being in different lans when two access ports are connected. In the real world CDP if enabled would report the fact.

     

    Regards Conwyn

  • sreenivas_naidu 78 posts since
    Sep 29, 2009
    Currently Being Moderated
    11. Dec 19, 2010 7:09 AM (in response to Conwyn)
    Re: inter-vlan communication (vlan tagging)

    Hi Conwyn,

    No disrespect meant to your knowledge and understanding on the subject,I believe you would agree with me that switches use the Dynamic trunking protocol(DTP) to identify a trunk link and the default state is dynamic desirable on the switch port, which would efectively mean that plugging a simple crossover cable between 2 switches would automatically bring up a trunk link, alternately we can force it to form a trunk as per our requirement.This would necessarily mean that traffic from all vlans would be forwarded over to the other switch and are tagged to indicate its vlan info(isl or dot.q whichever is operational on the switch).

    In the above case port on each side of the switch has been placed into different vlans and in an access mode(although we wouldn't do that in real world), which has disabled DTP and for obvious reasons no trunk link has formed automatically as it was supposed to, hence therz is no tagging info on each frame as it moves from one switch to the other.So i believe you would agree that in the above case the switches have never differented trafffic from one vlan to another.hence the reason both the pcs can communicate although they are in different vlans.

     

    Regards,

    Sreeni

  • Randy 99 posts since
    Feb 7, 2009
    Currently Being Moderated
    12. Dec 19, 2010 10:29 AM (in response to Brian)
    Re: inter-vlan communication (vlan tagging)

    I've seen this question before, and it really seems to confuse people.  Since all the ports on each switch belong to the same vlan (vlan 10 on switch 1 and vlan 20 on switch 2), you're basically saying that all switchports on each switch can talk to one another.  In a simplistic sense, this would be no different than getting two cheap-o unmanaged switches from Best Buy and hooking them together with a crossover cable.  Hang a big sign labeled VLAN10 on one switch and a big sign labeled VLAN20 on the other.

  • Conwyn 7,907 posts since
    Sep 10, 2008
    Currently Being Moderated
    13. Dec 19, 2010 10:38 AM (in response to Randy)
    Re: inter-vlan communication (vlan tagging)

    Hi Randy

     

    I think it because people assume a trunk port between two switches. The question title uses vlan tagging when in fact there is no tagging at all.

     

    Regards Conwyn

  • Brian 2,968 posts since
    Aug 17, 2009
    Currently Being Moderated
    14. Dec 19, 2010 1:01 PM (in response to Conwyn)
    Re: inter-vlan communication (vlan tagging)

    CDP has nothing to do with it, nor does DTP.  The fact remains in "how" switches "TAG" traffic with VLAN information.  As traffic enters a port configured as an access port (AP), it "TAGs" the frame (802.1q) or encapsulates (ISL) with the VLAN information as configured on the access port with the "switchport access vlan x" command.  When traffic exits a port configured as an access port (AP), it removes the "TAG" (802.1q) or encapsulation (ISL) and send the ethernet frame.  The only time VLAN information leaves a switch is when you have a "Trunk" configured.  Then all VLANs are capabale of passing over this trunk to "extend" the range of the VLAN beyond a single switch.

     

    Therefore, in this example, since all ports are configured as access ports (APs), SW1 will TAG the ethernet frame with VLAN 10 as it enters port 1 and remove the VLAN10 TAG as the traffic leaves port 24.  As this same ethernet traffic now enters SW2 on port 24, SW2 "TAGs" the frame with VLAN20.  The frames are sent to port 1 on SW2 and the "TAG" is again removed and the frames sent on to PC2.

     

    No CDP, no DTP, no VTP, just simple 802.1q encapsulation.

     

    HTH

Actions

More Like This

  • Retrieving data ...

Bookmarked By (1)