Question

Difficulty: MediumEncapsulation and De-encapsulation

A network engineer is analyzing traffic traversing an enterprise Layer 3 switch configured for inter-VLAN routing. A client host on VLAN 10 sends a request to a destination server on VLAN 20. When the switch receives the frame on its VLAN 10 interface and routes it out through the VLAN 20 interface, which of the following best describes the de-encapsulation and re-encapsulation process performed by the switch?

  1. A
    The switch de-encapsulates the frame up to Layer 3, replaces the source IP address in the packet header with its own interface IP address, and prepends a new Layer 2 Ethernet header.
  2. The switch strips the incoming Layer 2 Ethernet header and trailer, inspects the Layer 3 destination IP address to determine the egress interface, and encapsulates the IP packet into a new Layer 2 Ethernet frame with updated source and destination MAC addresses.Answer
  3. C
    The switch decapsulates the transmission up to Layer 4, modifies the TCP destination port field to indicate the egress VLAN ID, and forwards the original Layer 2 frame out the target port without altering MAC addresses.
  4. D
    The switch encapsulates the incoming Layer 2 frame inside an outer UDP header to tunnel the frame across VLAN boundaries without modifying the existing Ethernet header.

Answer

The switch strips the incoming Layer 2 Ethernet header and trailer, inspects the Layer 3 destination IP address to determine the egress interface, and encapsulates the IP packet into a new Layer 2 Ethernet frame with updated source and destination MAC addresses.
When a Layer 3 device (such as a router or Layer 3 switch) routes traffic between subnets/VLANs, it de-encapsulates the incoming Layer 2 Ethernet frame to extract the enclosed Layer 3 IP packet. It inspects the destination IP address to determine the appropriate egress interface. Before transmitting onto the destination VLAN, the device re-encapsulates the IP packet into a brand new Layer 2 Ethernet frame. The new frame uses the router's egress interface MAC as the source MAC address and the destination host's MAC (or next hop MAC) as the destination MAC address. The original IP packet payload and end-to-end IP addresses remain unchanged (except for TTL decrementing and checksum updating).

Step-by-Step Solution

1
Analyze the incoming frame at Layer 2
The Layer 3 switch receives the Ethernet frame on VLAN 10, verifies the frame check sequence (FCS) trailer, and verifies that the destination MAC matches its own gateway MAC address.
Layer 2 processing requires verifying frame integrity and confirming the frame is addressed to the default gateway.
2
De-encapsulate the packet at Layer 3
The switch strips the Layer 2 Ethernet header and trailer to expose the enclosed IP packet.
To route traffic between different subnets/VLANs, the network layer header must be inspected.
3
Perform routing lookup and update IP header fields
The switch reads the destination IP address, checks its routing table, decrements the Time to Live (TTL) value by 1, and recalculates the IP header checksum.
The Layer 3 header provides forwarding instructions across network boundaries.
4
Re-encapsulate the packet into a new Layer 2 frame
The switch appends a new Layer 2 Ethernet header containing its egress interface MAC address as the source MAC, the destination server's MAC address as the destination MAC, and recalculates the FCS trailer for VLAN 20.
Each physical or logical link (VLAN) requires local Layer 2 addressing for delivery to the destination or next-hop device.

Key Concept

Hop-by-hop encapsulation and de-encapsulation during Layer 3 routing
Estimated Time:1m 30s
Rate this question