1

basic scenario:

PC A connected to Switch 1 ------ Switch 2 ----- PC B

switch 1 has an access port vlan 10 , and also has a trunk link between switch 1 and switch 2 with native vlan 10 configured to both switches on each end.

Switch 2 other interfaces that faces PC B is being configured as access port vlan 20.

What happened when a packet traverse from PC A to PC B? since PC A has an untagged/native vlan all the way up to switch 2, what happened when it egresses to PC B ? is the packet goes through or is it going to be dropped?

1

Your question isn't clear, but I think what you're asking is this:

PC A --------- Switch 1 ------- Switch 2 --------- PC B
     ^ access           ^ trunk          ^ access
       VLAN 10                             VLAN 20

Assuming that none of the switches are performing any type of routing, then PC A and PC B will never be able to talk to each other. Since the PC's are not on the same VLAN, the other PC will never be in the switch CAM table for the sender's VLAN. Therefore, it will be flooded to all ports on the same VLAN, and never reach the other PC.

In more detail, here is what happens if this is a layer 2 packet:

  1. PC A sends a packet addressed to the MAC of PC B.
  2. Switch 1 receives packet and marks it for VLAN 10.
  3. Switch 1 looks up destination MAC and sees it's not in the CAM table for VLAN 10. The packet is flooded to all VLAN 10 ports, and all trunks that carry VLAN 10 (except the source port).
  4. Switch 2 receives the packet via the trunk, looks up destination MAC and sees it's not in the CAM table for VLAN 10. The packet is flooded to all VLAN 10 ports, and all trunks that carry VLAN 10 (except the source port).
  • right, the switch does not have any ip addresses. Even so, the packet from PC A would be still be able to traverse and ingress to the switch 2, wouldn't it? then switch 2 will drop outbound connection to PC B since it is on different vlan, right? I just want to know how the access port behave if it received ingress packet from untagged vlan with different vlan . – johnsmith Jan 26 '16 at 21:22
  • The packet isn't dropped; it's not sent to that port to begin with. Switch 2 receives the packet and will only send it to ports on VLAN 10. A subtle difference, but an important one. – longneck Jan 26 '16 at 21:30
  • On Layer two its called a frame :P – Daniel Jan 27 '16 at 5:35
1

So to clarify you are asking what would happen if PC A sent a frame to PC B's MAC address.

The packet would reach switch 1. Exactly what happens here depends on if the switch uses per-vlan MAC tables. If it uses per-vlan MAC tables then the mac lookup would fail and the packet would be flooded out all ports on the VLAN (except the one it came from). If it doesn't use per-vlan MAC tables then it may match a MAC table entry for PC B and get sent to switch 2 or it may get flooded out all ports on the VLAN.

Either way the packet is sent to switch 2. Since VLAN 10 is the native VLAN on the inter switch link it is sent untagged.

The packet reaches switch 2 which interprets it as a VLAN 10 packet (per the native vlan configuration).

If the switch uses per-vlan MAC tables then it will try and flood the packet to all ports on the VLAN (except the one it came from) but there are no ports to flood it to so it stops there.

If it doesn't use per-vlan MAC tables then it would lookup the address in it's Mac table, notice that the port is in the wrong VLAN and drop the packet.

Either way the packet doesn't reach PC B.

Note: this scenario is unlikely to happen because there is no way for PC A to find out that PC B exists in the first place. Any arp broadcasts (or similar) looking for PC B's IP (or similar) address will never reach PC B.

0

The two computers are in different VLAN's. Unless you have routing configured between the VLAN's then traffic will not go from A to B and vice versa.

This really doesn't have anything to do with VLAN tagging, trunk ports, the Native VLAN or the fact that you have two switches. Hosts connected to ports in different VLAN's can't communicate with each other unless you have routing configured to route traffic between the VLAN's. This would be the case even if you had the computers connected to one switch and if the switch were using the factory default VLAN. Computers in different VLAN's can't communicate with each other except through a router.

  • so in the other word , those two switches needs to have SVI with ip address for access port and trunk port as well ? – johnsmith Jan 26 '16 at 21:30
  • You could do it with an SVI, or with a router on a stick or a router with an interface in each VLAN. – joeqwerty Jan 26 '16 at 21:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.