Troubleshooting OSPF Neighbor Mismatch Effectively On Junos
Troubleshooting OSPF Neighbor Mismatch Effectively On Junos
Effectively on Junos
As a JNCIE-SP candidate, you’re expected to troubleshoot OSPF neighbor mismatch
quickly. So, in this article, we’ll recap all the OSPF attributes and criteria that must match
before OSPF routers actually become functional neighbors. Next, I’ll show you which show
commands and traceoptions flags are more appropriate to troubleshoot effectively such
OSPF neighbor mismatches that you’re likely to encounter. Plus, it’s worth mentioning
that being able to effectively troubleshoot these type of mismatches is really such a valuable
skill to have, especially if you work in a multi vendor environment.
Authentication
The authentication secret itself
password
OSPF attribute Further information
Compatible The network type must be consistent on the network segment. You’d have a broken
network type graph if one OSPF node is expecting to have a DR and other OSPF nodes aren’t.
Network Mask Since the network mask is coupled with the underlying graph, it has to match.
Topology
Base configuration
vMX1
1root@vMX1# show interfaces
2ge-0/0/0 {
3 unit 0 {
4 family inet {
5 address 10.1.2.1/24;
6 }
7 }
8}
9lo0 {
10 unit 0 {
11 family inet {
12 address 1.1.1.1/32;
13 }
14 }
15}
16root@vMX1# show protocols ospf
17traceoptions {
18 file ospf.log;
19 flag error;
20 flag database-description;
21}
22area 0.0.0.0 {
23 interface lo0.0 {
24 passive;
25 }
26 interface ge-0/0/0.0 {
27 authentication {
28 md5 1 key "$9$XMbNVYJGifT3goT369OBxNd"; ## SECRET-DATA
29 }
30 }
31}
32
vMX2
1root@vMX2# show interfaces
2ge-0/0/0 {
3 unit 0 {
4 family inet {
5 address 10.1.2.2/24;
6 }
7 }
8}
9lo0 {
10 unit 0 {
11 family inet {
12 address 2.2.2.2/32;
13 }
14 }
15}
16[edit]
17root@vMX2# show protocols ospf
18traceoptions {
19 file ospf.log;
20 flag error;
21 flag database-description;
22}
23area 0.0.0.0 {
24 interface lo0.0 {
25 passive;
26 }
27 interface ge-0/0/0.0 {
28 authentication {
29 md5 1 key "$9$/4VdAu1Srv7-wRh-wYgUD9Ap"; ## SECRET-DATA
30 }
31 }
32}
33
Table 2 - Junos show commands and traceoptions flag for troubleshooting OSPF neighbor
mismatch
As you can see, basically, if you want to troubleshoot whatever mismatch that you can
possibly encounter, all you have to do is to enable both error and database-
description traceoptions flag and use show ospf statistics | find error and show ospf
neighbor. There you go! With these two commands you can effectively narrow down
whatever OSPF neighbor mismatch. Neat! Now, I’ll show you some output of these
commands in action for every mismatch situation we’ve discussed so far.
Unique router-id
1root@vMX2# run show ospf statistics | find error
2Receive errors:
3 7 Hellos received with our router ID
4[edit]
5root@vMX2# run show log ospf.log | match ignored
6Jul 1 16:55:52.977808 OSPF packet ignored: our router ID received from 10.1.2.1 on
7intf ge-0/0/0.0 area 0.0.0.0
Area
1root@vMX2# run show ospf statistics | find errors
2Receive errors:
3 53 area mismatches
4root@vMX2# run show log ospf.log | last | match ignored
5Jul 1 16:10:34.822195 OSPF packet ignored: area mismatch (0.0.0.1) from 10.1.2.1 on
6intf ge-0/0/0.0 area 0.0.0.0
Area Flags
1root@vMX2# run show ospf statistics | find error
2Receive errors:
3 5 stub area mismatches
4root@vMX2# run show log ospf.log | last | match ignored
5Jul 1 16:22:18.104341 OSPF packet ignored: area stubness mismatch from 10.1.2.1 on
6intf ge-0/0/0.0 area 0.0.0.1
Authentication Type
The show ospf neighbor entry will be empty and you’ll see this in the output of traceoption:
Authentication Password
Again, the show ospf neighbor entry will be empty and you’ll see this in the output of
traceoption:
Hello/Dead Interval
The traceoption, in addition to show the mismatch, also shows the actual value received,
which is really helpful if you’re not allowed to change the remote router and a local change
has to be made instead.
1
root@vMX2# run show ospf statistics | find error
2
Receive errors:
3
2 hello interval mismatches
4
[edit]
5
root@vMX2# run show log ospf.log | last | match ignored
6
7Jul 1 16:39:24.047315 OSPF packet ignored: hello interval mismatch 11 from
810.1.2.1 on intf ge-0/0/0.0 area 0.0.0.0
9root@vMX2# run show ospf statistics | find error
10Receive errors:
11 1 dead interval mismatches
12[edit]
13root@vMX2# run show log ospf.log | last | match ignored
14Jul 1 16:40:51.283654 OSPF packet ignored: dead interval 41 mismatch from 10.1.2.1
15on intf ge-0/0/0.0 area 0.0.0.0
L3 MTU
This one is a classic, and a great indicator you’ve got a L3 MTU mismach is the fact that the
OSPF router will be stuck in the ExStart state. Note the MTU values exchanged are shown in
the output bellow.
This is a tricky one, because actually the network type isn’t explicitly negotiated to form the
adjacency. Because of this, the OSPF process won’t explicitly tear down the adjacency.
However, as I briefly mentioned, the network type needs to be compatible otherwise the
underlying graph will be completely broken and unusable. As far as my lab experience on
Junos, if you’ve got this mismatch you’ll see that one OSPF router will be stuck in
the Init state. In this case, vMX2 was running a network type p2p, whereas vMX1 was
running broadcast.
Network Mask
1root@vMX2# run show ospf statistics | find error
2Receive errors:
3 3 netmask mismatches
4[edit]
5root@vMX2# run show log ospf.log | match ignored
6Jul 1 16:59:05.632968 OSPF packet ignored: netmask 255.255.255.128 mismatch from
710.1.2.1 on intf ge-0/0/0.0 area 0.0.0.0
Summary
To sum up, OSPF has some attributes that needs to match before the neighbors actually
become functional neighbors. If you need to troubleshoot whatever OSPF mismatch and if
you’re running Junos, with just two show commands at most and some traceoptions flags
are enough to show you precisely which parameter is the issue. I hope you enjoyed this
article and hopefully it was useful to speed up your troubleshooting skills.