Access and Trunk uplink Test

Answered Question
Jan 12th, 2009

I came across one question where


1)Switch A uplink gi0/1 is configure as access port with vlan 10. There is one pc A connected to vlan 10.


On the other end, Switch B uplink gi0/1 is configure as access port with vlan 20. There is one pc B connected to vlan 20


The result is both pc can ping each other. What is the reason behind?


2) Now say both switches uplink change to trunk port. Will both pc A and B still able to ping each other with the same vlan 10 and 20 ?

Correct Answer by Roberto Salazar about 8 years 1 month ago

1)Switch A uplink gi0/1 is configure as access port with vlan 10. There is one pc A connected to vlan 10.


On the other end, Switch B uplink gi0/1 is configure as access port with vlan 20. There is one pc B connected to vlan 20


The result is both pc can ping each other. What is the reason behind?


>>>Access ports does not encap exiting packets with vlan tag, so as far as either switches go, once they rx'd a packet on their port they will assume that those packet are for the vlan their port belongs to. This is why pcB in in vlan 20 of switch B is able to ping the pcA in vlan 10 of switch A. Of course, they would have to be in the same subnet, same bcast domain.



2) Now say both switches uplink change to trunk port. Will both pc A and B still able to ping each other with the same vlan 10 and 20 ?

>>> Depending on what native vlan each switch is on, if their native vlan on Switch A remains vlan 10 and on switch B it remains vlan 20, the ping will still work. Native vlan does not tag exiting packets on a port, so there will be no vlan id, so it will work for the same reason as above. If the Native vlan are matching on both sides, any vlan as long as they are matching, then the ping will fail, exiting packet will now have vlan id.



  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Giuseppe Larosa Mon, 01/12/2009 - 06:42

Hello Kian,

1) you are joining two broadcast domains into only one by using access ports

on access ports the IEEE 802.1D version of BPDU is used so no conflict arises


2) if both switches move to trunk ports :

the join of broadcast domains doesn't happen anymore:

even if you configure native vlan 10 on SwitchA side and vlan 20 on SwitchB side the two switches using Cisco PVST version of BPDU detect the different vlan-id and the port should go in error-disable


I did these tests some years ago with the above results I needed to join two management vlans and I used a link between access ports.


Hope to help

Giuseppe


Correct Answer
Roberto Salazar Mon, 01/12/2009 - 15:05

1)Switch A uplink gi0/1 is configure as access port with vlan 10. There is one pc A connected to vlan 10.


On the other end, Switch B uplink gi0/1 is configure as access port with vlan 20. There is one pc B connected to vlan 20


The result is both pc can ping each other. What is the reason behind?


>>>Access ports does not encap exiting packets with vlan tag, so as far as either switches go, once they rx'd a packet on their port they will assume that those packet are for the vlan their port belongs to. This is why pcB in in vlan 20 of switch B is able to ping the pcA in vlan 10 of switch A. Of course, they would have to be in the same subnet, same bcast domain.



2) Now say both switches uplink change to trunk port. Will both pc A and B still able to ping each other with the same vlan 10 and 20 ?

>>> Depending on what native vlan each switch is on, if their native vlan on Switch A remains vlan 10 and on switch B it remains vlan 20, the ping will still work. Native vlan does not tag exiting packets on a port, so there will be no vlan id, so it will work for the same reason as above. If the Native vlan are matching on both sides, any vlan as long as they are matching, then the ping will fail, exiting packet will now have vlan id.



Actions

This Discussion