[Junos] OSPF will not come up because of MTU mismatch

  [KB19382] Show Article Properties


Summary:
How to establish peer with OSPF because of MTU mismatch with VLAN tagging.
Symptoms:
Cannot establish OSPF neighborship because of OSPF MTU mismatch; they are stuck in Exstart / Exchange state.
 
Solution:
OSPF uses IP MTU to peer neighborship and it cannot be set per interface.

The formula for calculating the IP MTU is as follows:
IP MTU = Media MTU - Ethernet Header Length (14 bytes)
For example, if the max-frame-size = 1514, then the IP MTU = 1500. 

However, the mismatch could occur if you are using VLANs:

Ethernet header sizes:
Standard = 14 bytes
Vlan tagging = 14+4 = 18 Bytes
Flexible-Vlan tagging = 18 + 4 = 22 Bytes
Considering the above, you need to increase the Media MTU value so as to get the Protocol MTU the same on all the peers.
 

Troubleshooting:

You can check the Media MTU & the Protocol MTU using the following command:
root@SRX > show interfaces ge-0/0/0 extensive detail | match mtu  Link-level type: Ethernet,  
MTU: 1514, Link-mode: Full-duplex, Speed: 1000mbps, Aged packets: 0, FIFO errors: 0, HS link CRC errors: 0,  
MTU errors: 0, Protocol inet, MTU: 1500, Generation: 147, Route table: 0 
You can also configure traceoptions to see if you are getting any MTU mismatch.
root@SRX# set protocols ospf traceoptions file debug-ospf files 5 size 1m    
root@SRX# set protocols ospf traceoptions flag all 
To see the traceoptions output, run the following command:
root@SRX> show log debug-ospf | match mtu
Jan 26 06:09:19.629171 options 0x42, i 1, m 1, ms 1, seq 0xa04c360, mtu 1500
Jan 26 06:09:19.640730 options 0x42, i 0, m 0, ms 0, seq 0xa04c360, mtu 2986
Jan 26 06:09:19.642884 OSPF packet ignored: MTU mismatch from 192.169.1.2 on intf ge-0/0/0.0 area 0.0.0.0
Jan 26 06:09:24.515292 options 0x42, i 1, m 1, ms 1, seq 0xa04c360, mtu 1500
Jan 26 06:09:24.534292 options 0x42, i 0, m 0, ms 0, seq 0xa04c360, mtu 2986
Jan 26 06:09:24.536906 OSPF packet ignored: MTU mismatch from 192.169.1.2 on intf ge-0/0/0.0 area 0.0.0.0
Jan 26 06:09:28.672607 options 0x42, i 1, m 1, ms 1, seq 0xa04c360, mtu 1500
Jan 26 06:09:28.686127 options 0x42, i 0, m 0, ms 0, seq 0xa04c360, mtu 2986
Jan 26 06:09:28.688892 OSPF packet ignored: MTU mismatch from 192.169.1.2 on intf ge-0/0/0.0 area 0.0.0.0

 

How to change the media MTU:

root@SRX# set interfaces ge-0/0/0 mtu 1514                             <<<<this  will give you Protocol MTU of 1500
root@SRX# commit
Modification History:
2019-06-18: Content reviewed for accuracy.
Related Links: