Packet Rewrite

When a multilayer switch finds valid entries in the FIB and adjacency tables, a packet is almost ready to be forwarded. One step remains: The packet header information must be rewritten. Keep in mind that multilayer switching occurs as quick table lookups to find the next-hop address and the outbound switch port. The packet is untouched and still has the original destination MAC address of the switch itself. The IP header also must be adjusted, as if a traditional router had done the forwarding.

The switch has an additional functional block that performs a packet rewrite in real time. The packet rewrite engine (shown in Figure 12-3) makes the following changes to the packet just before forwarding:

■ Layer 2 destination address—Changed to the next-hop device's MAC address

■ Layer 2 source address—Changed to the outbound Layer 3 switch interface's MAC address

■ Layer 3 IP Time To Live (TTL)—Decremented by one because one router hop has just occurred

■ Layer 3 IP checksum—Recalculated to include changes to the IP header

■ Layer 2 frame checksum—Recalculated to include changes to the Layer 2 and Layer 3 headers

A traditional router normally would make the same changes to each packet. The multilayer switch must act as if a traditional router were being used, making identical changes. However, the multilayer switch can do this very efficiently with dedicated packet-rewrite hardware and address information obtained from table lookups.

Was this article helpful?

+1 0

Post a comment