Path MTU auto discovery allows BGP to discover the smallest MTU value on a path so that BGP messages are transmitted based on the path MTU. This function improves transmission efficiency and BGP performance.
The link-layer MTUs of different networks that a communication path traverses may vary. The smallest MTU on the path is the most important factor that influences the communication between the two ends of the path. The smallest MTU on the communication path is called the path MTU.
The path MTU varies with the selected path and therefore may change. In addition, the path MTU in one direction may be inconsistent with that in the reverse direction. Enabling path MTU auto discovery allows a device to discover the path MTU from the transmit end to the receive end. TCP encapsulates IP packets based on the path MTU when transmitting BGP messages.
In Figure 1, path MTU auto discovery is not enabled, and a BGP peer relationship is established between Device A and Device C. After Device A sends 9000-byte BGP messages to Device C, Device B fragments the messages upon reception by encapsulating one IP header, one Layer 2 frame header, and one Layer 2 frame trailer in each fragment, which reduces transmission efficiency. If a fragment of a message is lost, the message becomes invalid.
In Figure 2, path MTU auto discovery is enabled, and a BGP peer relationship is established between Device A and Device C. Device A sends BGP messages to Device C based on the path MTU (6000 bytes). In this example, Device A sends a 6000-byte BGP message and a 3000-byte BGP message. In this case, Device B does not fragment the messages upon reception, which improves transmission efficiency.
On the sending end, the local MSS value is updated only when the device sends packets in which the MSS value is greater than the path MTU. The calculation formula of TCP MSS is as follows: .
If the device supports SYNCOOKIE, the calculation formula of TCP MSS is as follows:
.If the device does not support SYNCOOKIE, the calculation formula of TCO MSS is as follows:
.The system view is displayed.
The BGP view is displayed.
Path MTU auto discovery is enabled.
After the command is run, a BGP peer learns the path MTU, preventing BGP messages from being fragmented during transmission.
A BGP message from one end to the other may travel a path different from the path used by the ACK message that is responded by the other end. Therefore, running this command on both ends is recommended so that both peers exchange messages based on the path MTU.
Return to the system view.
The aging time is set for an IPv4 path MTU.
The path MTUs vary with the path. If there are multiple routes between two communication hosts and the routes selected for packet transmission change frequently, configure the path MTU aging time so that the system updates path MTUs based on the path MTU aging time, increasing the transmission efficiency.
The configuration is committed.
After configuring path MTU auto discovery, run the following commands to check the previous configuration.