- Configure OSPF
- Verify adjacencies
- Verify routing information exchange
- Modify OSPF link costs
- Change interface priorities
- Utilize debugging commands for troubleshooting OSPF
I can't remember that last time I did an OSPF configuration post, so i'll put the setup here just incase.
I've also put debugging on to view OSPF adjaceny messages. As of yet only NU is configured, you can see its trying elect a DR and a BDR.
After I configured the other routers, NU recieved the following;
This is a bit odd as the router with the highest RID (being OMICRONS Lo) should become the DR and in this case 10.1.1.1 has become the DR. I found that when a router chooses the RID using the highest IP on a loopback interface when OSPF is configured. If an additional higher IP address loopback interface is added after OSPF is turned on, it does not become the router ID unless the
router is reloaded.
So I issued the following on all routers;
I had alot of output then on NU with the process electing its DR and BDR. So i've just selected this part;
Verify adjacenciesThe show ip ospf neighbor command will show established neighbours;
Another useful command is;
Verifying routing information exchange
From the previous show commands and debug commands we can tell that everything is ok. But there are plently more show commands you can use to verify the configuration.
If we look at the routing table we can see that the loopback interfaces has inherited a /32 prefix. We can fix this by issuing the ip ospf network point-to-point command under each loopback, this will tell OSPF that it is not a host.
Once you start configuring the loopbacks, OSPF will recalculate the routes (see debug messages).
If we now take a look at the routing table, it should now be correct.
Modify OSPF link costsFrom the previous show ip route on NU, you can see that the most direct route to XI's Lo is via its fast ethernet interface. Its adminstrative distance being 110 with a metric of 11. The metric depends on the type of link. OSPF picks the route with the lowest metric, which is the sum of the link costs.
You can modify a single link cost by using the ip ospf cost command. You can see after modifying the costs, OSPF recalculates the routes;
If we now look at the routing table we will see the metric on the fast ethernet interfaces change to 51 (even though I set it to 50, i guess it gets calculate to a more appropriate value).
Here is a list of default link costs;
- 56-kbps serial link—Default cost is 1785.
- 64-kbps serial link—Default cost is 1562.
- T1 (1.544-Mbps serial link)—Default cost is 64.
- E1 (2.048-Mbps serial link)—Default cost is 48.
- 4-Mbps Token Ring—Default cost is 25.
- Ethernet—Default cost is 10.
- 16-Mbps Token Ring—Default cost is 6.
- FDDI—Default cost is 1.
- X25—Default cost is 5208.
- Asynchronous—Default cost is 10,000.
- ATM— Default cost is 1.
Modifying interface prioritiesYou can change the OSPF priority on an interface (the higher the better) to change the default value being 1, you can use the command ip ospf priority <value>.
When all the priorities are the same, the DR election is then based on the RIDs. The highest RID router becomes the DR, and the second highest becomes the BDR. All other routers become DROthers.
If your routers do not have this behavior exactly, it may be because of the order the routers came up in. Routers sometimes do not leave the DR position unless their interface goes down and another router takes over. Or like I did earlier issued the clear ip ospf process.
I will make NU the new DR, XI as the BDR, and OMICRON will be a DROther.
If we now take a look at the OSPF neighbour table we can confirm the results, where we can see that the ospf priority overides the RID.