How to establish peer with OSPF because of MTU mismatch with VLAN tagging.
Cannot establish OSPF neighborship because of OSPF MTU mismatch; they are stuck in Exstart / Exchange state.
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)
Standard = 14 bytes Vlan tagging = 14+4 = 18 Bytes Flexible-Vlan tagging = 18 + 4 = 22 Bytes
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
traceoptions
root@SRX# set protocols ospf traceoptions file debug-ospf files 5 size 1m root@SRX# set protocols ospf traceoptions flag all
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
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
root@SRX# set interfaces ge-0/0/0 mtu 1514 <<< <this will give you Protocol MTU of 1500</strong> root@SRX# commit
root@SRX# set interfaces ge-0/0/0 mtu 1514
root@SRX# commit
2020-05-31: Removed J series products. They no longer apply. 2019-06-18: Content reviewed for accuracy.