Octet

PC1 and PC2 are in VLAN 10 on two switches joined by a trunk. Walk me through what happens when PC1 pings PC2.

Show the answer

Say this first

PC1 sees PC2 is in its own subnet, so it ARPs for PC2's MAC. The broadcast is learned and flooded by SW1, crosses the trunk tagged with VLAN 10, is learned and flooded by SW2, and PC2 answers with a unicast ARP reply. Now both switches know both MACs, and the ICMP echo and reply are forwarded port to port with no flooding. No MAC is rewritten and no TTL is decremented: nothing is routed.

Go deeper

Setup: PC1 10.10.0.11 (0050.56a1.0011) on SW1 Gi1/0/1, PC2 10.10.0.12 (0050.56a1.0012) on SW2 Gi1/0/2, trunk on Gi1/0/48 at both ends.

  1. PC1 ANDs 10.10.0.12 with its /24 mask: same subnet, so deliver directly. Its ARP cache has no entry for PC2.
  2. PC1 sends an ARP request: destination ffff.ffff.ffff, source 0050.56a1.0011.
  3. SW1 learns 0050.56a1.0011 on Gi1/0/1 in VLAN 10 and floods the broadcast to its other VLAN 10 ports and out Gi1/0/48 with an 802.1Q tag, VLAN ID 10.
  4. SW2 learns PC1's MAC on Gi1/0/48 in VLAN 10, strips the tag and floods to its VLAN 10 access ports.
  5. PC2 recognizes its IP and replies with a unicast ARP reply to 0050.56a1.0011.
  6. SW2 learns PC2 on Gi1/0/2, already knows PC1 is behind Gi1/0/48, and sends the reply tagged. SW1 learns PC2 on Gi1/0/48 and forwards to Gi1/0/1.
  7. PC1 caches the ARP entry and sends the ICMP echo request as unicast. Both switches forward it without flooding, and the reply comes back the same way.

Each switch recomputes the FCS when it adds or removes the tag, because the frame contents change.

Traps

  • Saying the switch answers the ARP. A plain layer 2 switch only floods it; PC2 answers.
How did you do?Book 3.2 Switched EthernetBook 3.3 Internet (IP)