MTU and Fragmentation

The maximum transmission unit (MTU) is a concept that implies the largest Layer 3 packet that can be forwarded out an interface. The maximum MTU value allowed is based on the data link protocol; essentially, the maximum size of the data portion of the data link frame (where the packet is placed) is the maximum setting for the MTU on an interface. The default MTU value is 1500.

If an interface's MTU is smaller than a packet that must be forwarded, fragmentation is performed by the router. Fragmentation is the process of simply breaking the packet into smaller packets, each of which is less than or equal to the MTU value. For instance, consider Figure 5-29, with a point-to-point serial link whose MTU has been lowered to 1000.

Figure 5-29 IP Fragmentation

Koufax n

MTU 1000

Ethernet IP (1500)

HDLC

Clemens

Ethernet

IP (750)

Ethernet

As Figure 5-29 illustrates, Koufax threw a 1500-byte packet toward Router LA. LA removed the Ethernet header but could not forward the packet because it was 1500 bytes and the HDLC link supported only an MTU of 1000. So, LA fragmented the original packet into two packets. After forwarding the two packets, Boston receives the packets and does not reassemble them— reassembly is done by the endpoint host, which in this case is Clemens.

The IP header contains fields useful for reassembly to the fragments into the original packet. The IP header includes an ID value that is the same in each fragmented packet, as well as an offset value that defines which part of the original packet is held in each fragment. So, fragmented packets arriving out of order can be identified as part of the same original packet and can be reassembled into the correct order using the offset field in each fragment.

Two configuration commands can be used to change the IP MTU size on an interface: the mtu interface subcommand and the ip mtu interface subcommand. The mtu command sets the MTU for all Layer 3 protocols; unless there is a need to vary the setting per Layer 3 protocol, this command is preferred. If a different setting is desired for IP, the ip mtu command sets the value used for IP.

A few nuances relate to the two MTU-setting commands. If both are configured on an interface, then the IP MTU setting takes precedence on the interface. However, if the mtu command is configured after the ip mtu is configured, the ip mtu value is reset to the same value as that of the mtu command. So, care must be taken when changing these values.

0 0

Post a comment