Continuing on from where we left off in the last post; we have our network set up over frame relay with ospf running and have verified its operation. Great!
Now we add the Ethernet segment and cover the differences between running OSPF on a broadcast network (Ethernet) and a non broadcast network (Frame Relay and point to point)
Just as a reminder, here is our topology:
I have router two and three wired up via a 2950, with:
- Router 2 fa0/0: ip address 172.23.23.2
- Router 3 fa0: ip address 172.23.23.3
… and verified operation using ping.
Now we add our networks to the ospf route processes on each router as follows:
r2620(config)#router ospf 1 r2620(config-router)#network 172.23.23.0 0.0.0.255 area 23 r2620(config-router)#^Z
and immediately I get:
r2620# 16:51:52: %OSPF-5-ADJCHG: Process 1, Nbr 188.8.131.52 on FastEthernet0/0 from LOADING to FULL, Loading Done
Running sh ip route gets me the following table:
r2620#sh ip route
184.108.40.206/32 is subnetted, 1 subnets O IA 220.127.116.11 [110/65] via 18.104.22.168, 00:00:06, Serial0/0.123 22.214.171.124/32 is subnetted, 1 subnets C 126.96.36.199 is directly connected, Loopback0 188.8.131.52/32 is subnetted, 1 subnets O IA 184.108.40.206 [110/65] via 220.127.116.11, 00:00:06, Serial0/0.123 18.104.22.168/24 is subnetted, 1 subnets C 22.214.171.124 is directly connected, Serial0/0.123 172.23.0.0/24 is subnetted, 1 subnets C 172.23.23.0 is directly connected, FastEthernet0/0
and you can see from the ospf neighbor command that we now have:
Neighbor ID Pri State Dead Time Address Interface 126.96.36.199 1 FULL/DR 00:01:47 188.8.131.52 Serial0/0.123 184.108.40.206 1 FULL/DR 00:00:33 172.23.23.3 FastEthernet0/0
Also check this out:
r2620#sh ip ospf int fa0/0 FastEthernet0/0 is up, line protocol is up Internet Address 172.23.23.2/24, Area 23 Process ID 1, Router ID 220.127.116.11, Network Type BROADCAST, Cost: 1 Transmit Delay is 1 sec, State BDR, Priority 1 Designated Router (ID) 18.104.22.168, Interface address 172.23.23.3 Backup Designated router (ID) 22.214.171.124, Interface address 172.23.23.2 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:01 Index 1/3, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 5, maximum is 5 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 126.96.36.199 (Designated Router) Suppress hello for 0 neighbor(s) r2620#
You can see the new values for hello and dead times, for a broadcast network – the hello is sent every 10 seconds rather than every 30 as in the NBMA network segments.
r2610xm#sh ip route ospf 188.8.131.52/32 is subnetted, 1 subnets O IA 184.108.40.206 [110/65] via 220.127.116.11, 15:41:05, Serial0/1 18.104.22.168/32 is subnetted, 1 subnets O IA 22.214.171.124 [110/65] via 126.96.36.199, 15:41:05, Serial0/1 172.23.0.0/24 is subnetted, 1 subnets O IA 172.23.23.0 [110/65] via 188.8.131.52, 00:46:07, Serial0/1 [110/65] via 184.108.40.206, 00:45:58, Serial0/1
You can see from router 1 there are now two routes to the 172.23.23. network, and both have equal weight.
Administrative Distance and Cost
From the routing table we can see the administrative distance and cost indicated by the [110/65]. The administrative distance we know about but how does that cost figure work?
OSPF, being a link state protocol takes the link bandwidth into account, and it calculates the cost figure based on the link bandwidth. The calculation is a simple one being :
100,000,000 / bandwidth in bps
… which for common bandwidth values gives the following costs:
- 56kbps = 1785
- T1 line = 64
- Ethernet = 10
- 16Mbps Token Ring = 6
- FDDI / 100Mbps Ethernet = 1
Neighbor ID and RID
The definition for the RID is the highest loopback interface value and we can see that in the examples so far (we only have one loopback on each router so its easy to see). What happens if we have no loopback or if we add more loopbacks, and why are we even using loopbacks, whats wrong with just using the interface IP address? Well, lets take a look:
In a larger network, chances are there are multiple router interfaces being used, and if one interface goes down, we want to keep the others up and routing. The only time a loopback ever goes down is when we take it down manually, or if the entire router goes down. This makes the loopback an excellent, robust solution for router ID.
IF we don’t have a loopback, we can manually set the router id:
r2610xm(config-router)#router-id 220.127.116.11 Reload or use "clear ip ospf process" command, for this to take effect
Then we pop back to user exec and execute:
r2610xm#clear ip ospf process Reset ALL OSPF processes? [no]: yes r2610xm# *Feb 15 09:49:40.348: %OSPF-5-ADJCHG: Process 1, Nbr 18.104.22.168 on Serial0/1 from FULL to DOWN, Neighbor Down: Interface down or detached *Feb 15 09:49:40.348: %OSPF-5-ADJCHG: Process 1, Nbr 22.214.171.124 on Serial0/1 from FULL to DOWN, Neighbor Down: Interface down or detached r2610xm#
… and our adjacencies are gone, and the process starts to rebuild its route table again. If we go back and execute sh ip ospf ne from router 2 and/or 3, we can see the new RID for router 1.
… and one last point:
When dealing with point to point or point to multipoint connections, there is no designated router.
r2610xm#sh ip ospf ne Neighbor ID Pri State Dead Time Address Interface 126.96.36.199 0 FULL/DROTHER 00:01:34 188.8.131.52 Serial0/1 184.108.40.206 0 FULL/DROTHER 00:01:59 220.127.116.11 Serial0/1 18.104.22.168 0 FULL/ - 00:00:34 22.214.171.124 Serial0/0
I added a serial link between router 1 & 3 and added it to the OSPF router. You can see the state is full/ – . This means there is no DR. Why is this?
The answer lies in the nature of the point to point interface – if one of the routers goes down there is no network left. In this case, why even have a DR, it is just not required.
Often, and especially at the edge of our networks we may find stub areas. In these cases, we really don’t need all the processor loading that the route calculations and communications required. All stub routers really need in most cases is a simple default route. This can be achieved using the default-information originate command.
r2610xm(config-router)#default-information originate ? always Always advertise default route metric OSPF default metric metric-type OSPF metric type for default routes route-map Route-map reference r2610xm(config-router)#default-information originate always ? metric OSPF default metric metric-type OSPF metric type for default routes route-map Route-map reference r2610xm(config-router)#default-information originate always
… and this will propagate a default route even if the ospf router does not have a default route set!
One of the features of OSPF is that we can secure adjacencies using authentication. We have two types of authentication at our disposal:
- Clear text (simple)
- MD5 (Message Digest)
In the real world we would of course use MD5 for authenticating adjacencies, but for the purposes of the lab, we will run both. We will run clear text on the frame relay portion of the lab, and MD5 on the ethernet network.
Here is how we do it:
ip ospf authentication ip ospf authentication-key ccna
ip ospf authentication message-digest ip ospf authentication-key ccna
… and it is that simple.