The idea was to use the blog as a place to keep notes on topics for quick reference later and im sure ill get around to that eventually but I just finished reading OSPF basics and here’s what I came up with on the rack. After drawing out the topology I decided to make f0/0 on R3 a passive interface so although it is configured as a member of both area 0 and area 1 it is only participating in routing in area 0.

Having 5 routers let me make a somewhat respectable 2 area network so I could do some router summarization between areas and use both MD5 and plain text authentication. Some things to remember about OSPF configuration;
Before an adjacency will form between neighbouring devices, the following must match:
- Authentication type AND password
- Area number
- Connected interfaced must be in the same subnet
- Hello and Dead intervals
Route summarisation can only be done on ABRs (Area Border Routers) and auto-summary is not supported.
Each router ID is decided by the command “router-id” in OSPF config mode, if router-id has not been configured the router ID is decided by the highest value loopback interface IP, if there are no loopback interfaces the router ID is decided by the highest configured interface IP address.
Configuration time!
Area 0
R5 (ABR)
router ospf 1
router-id 5.5.5.5
log-adjacency-changes
area 0 authentication
area 0 range 10.100.0.0 255.255.0.0
area 0 range 10.200.0.0 255.255.0.0
area 1 authentication message-digest
area 1 range 172.16.0.0 255.255.252.0
area 1 range 172.16.4.0 255.255.255.0
network 192.168.50.0 0.0.0.3 area 0
network 192.168.200.0 0.0.0.255 area 1
interface FastEthernet0/1
ip address 192.168.200.5 255.255.255.0
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 password
interface FastEthernet0/0
ip address 192.168.50.1 255.255.255.252
ip ospf authentication-key useless
R4
router ospf 1
router-id 4.4.4.4
log-adjacency-changes
area 0 authentication
network 10.100.0.0 0.0.7.255 area 0
network 192.168.0.4 0.0.0.3 area 0
network 192.168.50.0 0.0.0.3 area 0
interface FastEthernet0/0
ip address 192.168.50.2 255.255.255.252
ip ospf authentication-key useless
interface Serial0/0
ip address 192.168.0.6 255.255.255.252
encapsulation ppp
no fair-queue
R3
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
area 0 authentication
area 0 range 10.200.0.0 255.255.252.0
passive-interface FastEthernet0/0
network 10.200.0.0 0.0.3.255 area 0
network 10.200.4.0 0.0.0.255 area 0
network 10.200.5.0 0.0.0.255 area 0
network 192.168.0.4 0.0.0.3 area 0
network 192.168.200.0 0.0.0.255 area 1
interface FastEthernet0/0
ip address 192.168.200.3 255.255.255.0
ip ospf network broadcast
interface Serial0/0
ip address 192.168.0.5 255.255.255.252
encapsulation ppp
Area 1
R2
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
area 1 authentication message-digest
network 192.168.0.0 0.0.0.3 area 1
network 192.168.200.0 0.0.0.255 area 1
default-information originate
interface FastEthernet0/0
ip address 192.168.200.2 255.255.255.0
ip ospf message-digest-key 1 md5 password
interface Serial0/1/0
ip address 192.168.0.2 255.255.255.252
ip ospf message-digest-key 1 md5 password
R1
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
area 1 authentication message-digest
area 1 range 172.16.0.0 255.255.252.0
network 172.16.0.0 0.0.3.255 area 1
network 172.16.4.0 0.0.0.255 area 1
network 192.168.0.0 0.0.0.3 area 1
interface Serial0/0
ip address 192.168.0.1 255.255.255.252
ip ospf message-digest-key 1 md5 password
At this level all routing protocols are easy to get to a working configuration but even with 2 areas OSPF is still logical and straightforward. Now that we have a working configuration it’s time to explore some show commands to see the lay of the land.
The first command to use to see the running OSPF configuration is “show ip protocols” which will show you several important pieces of information:
R5>sho ip protocol
Routing Protocol is "ospf 1" - Running process ID
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 5.5.5.5 - The configured router ID
It is an area border router - Router type
Number of areas in this router is 2. 2 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
192.168.50.0 0.0.0.3 area 0
192.168.200.0 0.0.0.255 area 1 - Routed networks added with "network" command
Reference bandwidth unit is 100 mbps
Routing Information Sources:
Gateway Distance Last Update
(this router) 110 01:27:18
1.1.1.1 110 01:27:18 - Neighbour devices
4.4.4.4 110 01:27:18
2.2.2.2 110 01:27:18
3.3.3.3 110 01:27:18
10.100.7.1 110 1w0d
Distance: (default is 110)
Another command to use when verifying/troubleshooting an OSPF instance is “show ip ospf interface”
R4>sho ip ospf inter s0/0
Serial0/0 is up, line protocol is up
Internet Address 192.168.0.6/30, Area 0 - Configured IP address and assigned Area
Process ID 1, Router ID 4.4.4.4, Network Type POINT_TO_POINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 - Timer intervals (these are default)
oob-resync timeout 40
Hello due in 00:00:06 - Time until next Hello expected
Index 1/9, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 6
Last flood scan time is 0 msec, maximum is 4 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 3.3.3.3 - Router ID of neighbour device
Suppress hello for 0 neighbor(s)
Simple password authentication enabled - Conigured authentication type, plain text in this case
To verify routes a propagating through the network correctly you can view the raw database of advertised routes by running the command “show ip ospf database”, this will show all routes the router has learned about from it’s neighbours before the routing table has been built by the SPF algorithm.
R5>sho ip ospf data
OSPF Router with ID (5.5.5.5) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
3.3.3.3 3.3.3.3 687 0x80000149 0x001CD0 8
4.4.4.4 4.4.4.4 237 0x80000153 0x007B64 11
5.5.5.5 5.5.5.5 308 0x8000013F 0x001F71 1
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
192.168.50.2 4.4.4.4 501 0x80000007 0x009EC6
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
172.16.0.0 5.5.5.5 308 0x80000009 0x00EE35
172.16.4.0 5.5.5.5 308 0x80000009 0x00D14B
192.168.0.0 5.5.5.5 308 0x8000000A 0x00B3C3
192.168.200.0 3.3.3.3 687 0x80000007 0x00DA1D
192.168.200.0 5.5.5.5 308 0x8000013D 0x002F89
Summary ASB Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
2.2.2.2 5.5.5.5 308 0x8000000A 0x008095
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 1002 0x80000141 0x00B2BB 7
2.2.2.2 2.2.2.2 568 0x80000144 0x00827B 3
5.5.5.5 5.5.5.5 310 0x80000141 0x004419 1
Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
192.168.200.2 2.2.2.2 568 0x80000007 0x0030AB
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
10.100.0.0 5.5.5.5 310 0x8000013D 0x005427
10.200.0.0 5.5.5.5 310 0x80000008 0x008F7D
192.168.0.4 5.5.5.5 310 0x800000AF 0x003698
192.168.50.0 5.5.5.5 313 0x8000013F 0x0091BE
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
0.0.0.0 2.2.2.2 64 0x8000013E 0x0081EA 1
As I sad earlier, a working instance of OSPF is very easy to create and make work for you but there are a lot of unexplored options here that allude to a very tunable and rebust protocol, I think I’m going to enjoy working with OSPF in the future.
EIGRP is up next for the lab which looks just as easy to get up and running so I’ll probably do some redistribution or some other options to make it just a little more interesting without getting too far away from the CCNA content.