Troubleshooting_OSPF_Lab
Troubleshooting_OSPF_Lab
Topology
R1:
enable
conf t
logging console
host R1
no ip domain-lookup
line con 0
exec-timeout 0 0
logging synchronous
int gig 0/1
ip address 192.168.1.1 255.255.255.0
ipv6 address 2000:1::1/64
no shutdown
int gig 0/2
ip address 192.0.2.1 255.255.255.252
ip address 192.0.2.1 255.255.255.252
ip mtu 1478
ip ospf 1 area 0
ipv6 address 2000:2::1/64
no shutdown
router ospf 1
passive-interface GigabitEthernet0/1
network 192.168.1.0 0.0.0.255 area 0
R2:
enable
conf t
logging console
host R2
no ip domain-lookup
line con 0
exec-timeout 0 0
logging synchronous
int gig 0/1
ip address 192.0.2.2 255.255.255.252
ip ospf hello-interval 20
ipv6 address 2000:2::2/64
no shutdown
int gig 0/2
ip address 203.0.113.1 255.255.255.252
ipv6 address 2000:3::1/64
no shutdown
router ospf 2
network 192.0.2.0 0.0.0.3 area 0
network 203.0.113.0 0.0.0.3 area 1
end
copy run star
R3:
enable
conf t
logging console
host R3
no ip domain-lookup
line con 0
exec-timeout 0 0
logging synchronous
int gig 0/1
ip address 203.0.113.2 255.255.255.252
Troubleshoo+ng Challenge
Solu+on
Step 1: Let’s begin by making sure we’re correctly interpreFng the issue and that we cannot see
any OSPF-learned routes on any of our routers.
R1:
R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
R2:
R2#show ip route
R3:
R3#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
The output from the show ip route command indicates we haven’t learned any routes via
OSPF, or any other rouFng protocol.
Step 2: To begin our troubleshooFng, let’s make sure that OSPF is indeed configured on R1.
R1:
R1#show ip protocols
*** IP Routing is NSF aware ***
R1#
Let’s get a closer look at our OSPF configuraFon by examining our running configuraFon.
Yes. Since we aren’t trying to form an OSPF neighborship off of interface Gig 0/1, we can make it
a passive interface to suppress the sending of OSPF Hello messages, while sFll adverFsing the
network off of Gig 0/1 via OSPF to any neighbors that we do have.
Also, noFce that we have a single network statement, that’s adverFsing the network off of Gig
0/1. There’s not a network statement that’s used to adverFse the network off of Gig 0/1. Is that
a problem?
Not necessarily. We could tell an interface to parFcipate in OSPF. Let’s see if that’s the case
here.
From the output, we see that we’re telling interface Gig 0/2 that we want it to parFcipate in
OSPF process ID 1 as a member of area 0, which means we’re going to adverFse the network off
of this interface (i.e., 192.0.2.0 /30) via OSPF.
Step 3: Now that we’ve confirmed that OSPF is configured ton router R1, let’s check out router
R2.
R2:
R2#show ip protocols
*** IP Routing is NSF aware ***
R2#
This output shows us that router R2’s OSPF configuraFon is using Process ID 2, while router R1’s
OSPF configuraFon is using Process ID 1. Is that a problem?
Actually, no. Unlike EIGRP Autonomous System numbers, with OSPF, Process IDs are locally-
significant and don’t need to match on neighboring routers.
Let’s make sure we’re adverFsing the two networks connected to router R2 via OSPF.
R3:
R3#show ip protocols
*** IP Routing is NSF aware ***
Output from these commands indicates we are running OSPF Process ID 1, but we’re only using
a single network statement. Is that an issue?
No, it’s not. The reason is, the network statement isn’t actually telling OSPF to adverFse the
specified network. Rather that network statement is specifying an IP address space, and if
that router has an interface that is up and has an IP address that falls within the specified
address space, then OSPF should adverFse the network connected to that interface.
In this case, the network statement is specifying an IP address space that encompasses all
IPv4 addresses. Therefore, the IP addresses of both interface Gig 0/1 and interface Gig 0/2 fall
within that address space (of all possible IPv4 addresses). As a result, OSPF is being told to
adverFse the networks connected to each interface.
However, there is an issue with this configuraFon. Even though we do have an opportunity for
router R3 to have a passive interface, that passive interface should be off of Gig 0/2, not Gig
0/1. So, that passive-interface statement would prevent R3 from forming a
neighborship with R2.
Let’s fix that.
R3#conf term
R3(config)#router ospf 1
R3(config-router)#no passive-interface GigabitEthernet0/1
R3(config-router)#passive-interface gig 0/2
R3(config-router)#end
R3#
Now, let’s see if we’ve formed, or are in the process of forming, an OSPF neighborship with R2.
No, we’re not. Next, let’s take a look at the running configuraFon to see if we spot anything
suspicious.
Step 5: Everything looks normal there, so let’s go back to router R2 and take a closer look at its
configuraFon.
R2:
R2#
*Nov 6 19:18:50.595: %OSPF-4-ERRRCV: Received invalid packet:
mismatched area ID from backbone area from 203.0.113.2,
GigabitEthernet0/2
R2#
*Nov 6 19:18:59.787: %OSPF-4-ERRRCV: Received invalid packet:
mismatched area ID from backbone area from 203.0.113.2,
GigabitEthernet0/2
R2#
Step 6: Things seem to be correctly configured on R2. Let’s see if that’s the case for router R3.
R3:
R3#show run | s router
router ospf 1
passive-interface GigabitEthernet0/2
network 0.0.0.0 255.255.255.255 area 0
R3#
And now we’ve spo]ed our second issue. Specifically, the network statement in R3’s OSPF
configuraFon is specifying Area 0 rather than Area 1.
Let’s fix that.
R3#conf term
R3(config)#router ospf 1
R3(config-router)#no network 0.0.0.0 255.255.255.255 area 0
R3(config-router)#network 0.0.0.0 255.255.255.255 area 1
R3(config-router)#end
R3#
*Nov 6 19:26:46.929: %SYS-5-CONFIG_I: Configured from console by
console
R3#
*Nov 6 19:26:48.517: %OSPF-5-ADJCHG: Process 1, Nbr 203.0.113.1 on
GigabitEthernet0/1 from LOADING to FULL, Loading Done
R3#
We seem to now have an OSPF neighborship between R3 and R2. Let’s confirm that.
Great news! R3 has not only formed a neighborship with R2, R3 has learned about the OSPF
Inter Area route of 192.0.2.0 /30.
Step 7: Now that we have an OSPF neighborship between R2 and R3, and we’re able to
exchange OSPF routes, let’s go back to R2 and troubleshoot is connecFon with R1.
To begin, let’s take a closer look at the OSPF configuraFon for the interface connecFng over to
R1.
R2:
R2#show ip ospf interface gig 0/1
GigabitEthernet0/1 is up, line protocol is up
Internet Address 192.0.2.2/30, Area 0, Attached via Network
Statement
Process ID 2, Router ID 203.0.113.1, Network Type BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 203.0.113.1, Interface address 192.0.2.2
No backup designated router on this network
Timer intervals configured, Hello 20, Dead 80, Wait 80, Retransmit 5
oob-resync timeout 80
Hello due in 00:00:06
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 1/1/1, flood queue length 0
Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 0, maximum is 0
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)
R2#
Let’s check to see if we have a non-default Fmer configured, and if we do, let’s fix it.
We’ve fixed the Fmer, and we’re a]empFng to form a neighborship with R1, but we appear to
be stuck in the EXSTART state. That’s o`en an indicaFon of a mismatched Maximum
Transmission Unit (MTU) value.
R2#show ip int gig 0/1
GigabitEthernet0/1 is up, line protocol is up
Internet address is 192.0.2.2/30
Broadcast address is 255.255.255.255
Address determined by setup command
MTU is 1500 bytes
Helper address is not set
...OUTPUT OMITTED...
It looks like we have a default MTU of 1500 Bytes on the R2 side of the connecFon. So, let’s
check out R1.
Step 8: It looks like we have a default MTU of 1500 Bytes on the R2 side of the connecFon. So,
let’s check out R1.
R1:
R1#show ip int gig 0/2
GigabitEthernet0/2 is up, line protocol is up
Internet address is 192.0.2.1/30
Broadcast address is 255.255.255.255
Address determined by setup command
MTU is 1478 bytes
Helper address is not set
...OUTPUT OMITTED...
It appears that router R1’s Gig 0/2 interface has a non-default MTU, and the MTU values must
match between OSPF adjacencies. So, let’s fix that.
R1#conf t
R1(config)#int gig 0/2
R1(config-if)#default ip mtu
R1(config-if)#end
R1#
*Nov 6 19:53:15.937: %OSPF-5-ADJCHG: Process 1, Nbr 203.0.113.1 on GigabitEthernet0/2
from LOADING to FULL, Loading Done
R1#
R1#show ip ospf neighbor
A`er fixing the MTU issue, an OSPF neighborship was formed, and R1 now has full visibility to
all networks in the topology.
Step 9: Let’s confirm that routers R2 and R3 can also see all the networks in the topology.
R2:
R2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Success! We’ve met the goal of the troubleshooFng exercise, to allow all routers to see all
networks in the topology. To review, we encountered the following troubleshooFng issues:
If you enjoyed this training, check out our All-Access Pass where you can access all
our on-demand courses for one yearly subscrip;on payment.
h"ps://kwtrain.com/all-access