Allied Telesis Support Portal

The Importance of MTU in OSPF networks

What issues can arise from mismatched MTU sizes in OSPF, and How can they be resolved?

Introduction

The Maximum Transmission Unit (MTU) is a critical parameter in network configurations. It refers to the largest size of a packet that can be transmitted over a network interface. In OSPF, having the correct MTU size is essential for maintaining routing stability and efficiency. This article explores why MTU is important in OSPF and how to configure it correctly to avoid common issues.
 

Why is MTU Important in OSPF?

The MTU determines the maximum packet size that can be sent without fragmentation. In OSPF, all routers within an area must have the same MTU size to facilitate proper communication and data exchange. Mismatched MTU sizes can result in dropped packets, communication issues, and even OSPF neighbor relationship problems.

When an MTU mismatch occurs, routers may struggle to successfully exchange OSPF Database Description (DD) packets. These packets are crucial for synchronizing routing tables between routers.

 

Key Components of OSPF MTU Consideration

  1. MTU Settings on Interfaces: Every network interface on OSPF-enabled routers should be configured to have the same MTU size to ensure seamless packet transmission.
     
  2. MTU Mismatch Detection: OSPF has a built-in mechanism to detect MTU mismatches. During the establishment of OSPF adjacency, routers exchange MTU information in the OSPF Hello packets. If a router with a higher MTU sends a packet larger than the MTU configured on the neighboring router, the neighboring router will drop the packet.


MTU Configuration Commands

To set the MTU size to 9216 on interface VLAN 40, use the following command:

awplus# configure terminal
awplus(config)# interface vlan40
awplus(config-if)# mtu 9216
 

To verify the MTU configuration, use:

awplus# show interface vlan40
Interface vlan40
  Scope: both
  Link is UP, administrative state is UP
  Hardware is VLAN, address is 001a.eb97.eb81
  IPv4 address 192.168.40.250/24 broadcast 192.168.40.255
  Description: Carrier-VLAN
  index 340 metric 1 mtu 9216
  arp ageing timeout 300
 

If you have multiple devices, use the Output modifier "|" to limit the number of lines displayed with the "include" parameter as follows:
 

awplus# show interface vlan40 | include mtu
index 340 metric 1 mtu 9216
 

Effects of MTU Mismatches in OSPF

- Packet Fragmentation: When packets exceed the MTU size, they need to be fragmented, leading to increased processing overhead and potential performance degradation.
- OSPF Adjacency Issues: Mismatched MTU sizes can prevent OSPF routers from forming adjacencies, disrupting the routing protocol operation.
- Data Transmission Problems: Inconsistent MTU sizes can lead to dropped packets and incomplete data transmission, adversely affecting network reliability and performance.

 

Verify OSPF Neighbor Status

After configuring the MTU sizes, confirm that OSPF adjacencies are correctly established:
 

awplus#show ip ospf neighbor

OSPF process 1:
Neighbor ID      Pri   State           Dead Time   Address         Interface
192.168.40.251    1    Full/Backup     00:00:37    192.168.40.250  vlan40


Ignoring MTU mismatches with the “ip ospf mtu-ignore” Command

Optionally you can ignore the MTU mismatches using the “ip ospf mtu-ignore” command as follows:
 

awplus# configure terminal
awplus(config)# interface vlan40
awplus(config-if)# ip ospf mtu-ignore
 

By default, during the DD exchange process, OSPF verifies the MTU size specified in the DD packets received from a neighbor. However, using this command allows OSPF to ignore the MTU check, enabling the establishment of adjacency regardless of the MTU size indicated in the DD packet.

Conclusion

Although the “ip ospf mtu-ignore” command provides a quick fix for mismatching MTUs, it is usually not recommended as a permanent solution, as it may conceal underlying issues that could develop into larger problems in the future.