OSPF
There are two major link-state protocols in use today - OSPF and IS-IS. IS-IS is primarily used by service providers, and while you'll find IS-IS on other Cisco example, you won't see it on the CCNA R$S exam. So, this will focus on OSPF.
R1#show ip ospf datbase
R1#show ip route ospf
The beauty of the Dijkstra algorithm is that recalculation of routes due to a network change is so fast that routing loops literally have no time to form.
Before the LSA exchane begins, Ospf-speaking outers must become neighbors by forming an adjacency. Routers must agree on the following to become neighbors in OSPF:
- The area number
- The hello and dead timer settings
- Whether the area is a stub area
- Network mask
When you configure RIP, it doesn't require number. However, for EIGRP you need <1-65535> Autonomous system number that has been agreed upon adjacencies. For OSPF, you need <1-65535> Process ID that doesn't have to be agreed upon.
We will verify OSPF adjacencies with show ip ospf neighbor and show ip ospf interface.
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 0 FULL/DROTHER 00:01:48 172.12.123.2 Serial10/3
172.12.123.3 0 FULL/DROTHER 00:01:38 172.12.123.3 Serial10/3
R1#show ip ospf int serial 0/3/0
Internet Address 172.12.123.1./24, Area 0, ..........Cost:396, Process ID1, Router ID 1.1.1.1
Neighbor Count is 2, Adjacent neighbor count is 2
Adjacent with neighbor 2.2.2.2
Adjacent with neighbor 172.12.123.3
OSPF Hellos have a destination IP address of 224.0.0.5, an address form the Class D range (224.0.0.0-239-255.255.255). OSPF Hellos use IP protocol type 89.
R1#conf t
R1(config)#router ospf 1
R1(config-route)#network 10.1.1.0 0.0.0.255 0
R1(config-route)#^z
Repeat that for R2 and R3.
R1#show ip ospf neigh
R1#debug ip ospf hello
OSPF-1 HELLO Gi0/0: Mismatched hello parameters from 10.1.1.3
OSPF-1 HELLO Gi0/0: Dead R 40 C 40, Hello R 10 C 10 Mask R 255.255.255.240 C 255.255.255.0
Let's fix it.
R3(config)#int gig 0/0
R3(config-if)#ip address 10.1.1.3 255.255.255.0
R3(config-if)#ip ^z
R3#wr
Fixed it!
R1#debug ip adj
R!#clear ip ospf process
Sequence number:
R1#show ip ospf database
Link ID ADV Router Age Seq# Checksum Link count
10.1.1.1 10.1.11 1848 0x800000000A 0X00D122 1
LSAs are assigned sequence numbers. When an OSPF-enabled router receives an LSA, that router checks its OSPF database for any pre-existing entries for every link in the incoming LSA.
If sequence number is the same, LSA is ignored. If sequence number is lower, the router ignores the update and transmits an LSU containing an LSA back to the original sender. If the sequence number is higher, the router adds the LSA to its database and sends an LSA acknowledgement back to the original sender. The router floods the LSA and updates its own routing table by running the SPF algorithm against the now-updated database.
R1#debug ip ospf lsa
Area 0 is the backbone area of any OSPF deployment, and every single non-backbone area in your network must contain an interface on a router that also has a physical or logical connection to Area 0.
R1(config)#router ospf 1
R1(config-route)#network 10.1.1.0 0.0.0.255 area 0
R1(config-route)#^z
R1#wr
R1#show ip os
R1#sgiw ip ospf neighb
R1#sgiw ip ospf int gig 0/0
Configuring an NBMA:
On an OSPF NBMA network, the hub router must become the DR, and there should be no BDR. Why? It's vital for both the DR and BDR to get multicasts to all other routers on the segment.
R2#
R2#conf t
R2(config)#int gig 0/0
R2(config-if)#ip ospf priority 0
Repeat for R3
Router Types:
An OSPF internal router has all its OSPF-enabled interfaces in a single area.
Backbone routers have at least one interface router
An Area Border Router (ABR) is a router with at least on interface in Area 0 and another in a non-backbone area. --R1
An Autonomous System Boundary Router is a router that's injecting routes into the OSPF domain via route redistribution.
To turn off debug, put "no" in the debug command.
R1#no debug ip ospf hello
R1#(config-router)#auto-cost reference-bandwidth 1000
Please ensure reference bandwidth is consistent across all routers.
R1(config0if)#ip ospf cost 30
Comments
Post a Comment