Step 3: Examine OSPF Routes
Purpose
You can determine if the LSAs that appear in the link-state database of a router are correct by examining the route to the destination. In this step, three routes are examined. The first example shows the route from
R5to external router A, the second shows the route fromR6to external router A, and the third shows the route fromR4toR6.Action
To examine a route in an OSPF AS, enter one or all of the following CLI commands:
user@host>show routedestination-prefixuser@host>show ospf databaseSample Output 1
The following sample output shows the path from
R5to external router A:user@R5>show route 10.0.0.100inet.0: 23 destinations, 25 routes (23 active, 0 holddown, 0 hidden)+ = Active Route, - = Last Active, * = Both0.0.0.0/0 *[OSPF/10]01:58:42, metric 11> via so-0/0/2.0user@R5>show ospf databaseOSPF link state database,area 0.0.0.2Type ID Adv Rtr Seq Age Opt Cksum LenRouter 10.0.0.4 10.0.0.4 0x8000002b 140 0x0 0x81fe 48Router *10.0.0.5 10.0.0.5 0x8000001f 526 0x0 0x78f3 60Summary 0.0.0.0 10.0.0.4 0x80000005 32 0x0 0x73cf 28Summary 10.0.0.1 10.0.0.4 0x8000002b 2132 0x0 0x4acf 28Summary 10.0.0.2 10.0.0.4 0x8000002b 1940 0x0 0x36e3 28Summary 10.0.0.3 10.0.0.4 0x8000002a 1832 0x0 0x2eeb 28Summary 10.0.0.4 10.0.0.4 0x80000028 1640 0x0 0x1efd 28Summary 10.0.0.6 10.0.0.4 0x80000029 1340 0x0 0x1cfa 28Summary 10.1.12.0 10.0.0.4 0x8000002b 1232 0x0 0xb15f 28Summary 10.1.23.0 10.0.0.4 0x8000002b 1040 0x0 0x38cd 28Summary 10.1.24.0 10.0.0.4 0x80000029 932 0x0 0x27e0 28Summary 10.1.34.0 10.0.0.4 0x80000029 740 0x0 0xb845 28Summary 10.1.36.0 10.0.0.4 0x80000029 632 0x0 0xac4e 28Sample Output 2
The following sample output shows the route from
R6to external router A:user@R6>show route 10.0.0.100inet.0: 29 destinations, 31 routes (29 active, 0 holddown, 0 hidden)+ = Active Route, - = Last Active, * = Both10.0.0.100/32 *[OSPF/150]16:52:11, metric 0, tag 0> via so-0/0/3.0user@R6>show ospf databaseOSPF link state database, area 0.0.0.3Type ID Adv Rtr Seq Age Opt Cksum LenRouter 10.0.0.3 10.0.0.3 0x8000001d 502 0x2 0x6639 48Router *10.0.0.6 10.0.0.6 0x80000019 807 0x2 0x443a 60Summary 10.0.0.1 10.0.0.3 0x8000001c 1570 0x2 0x50d7 28Summary 10.0.0.2 10.0.0.3 0x8000001c 1402 0x2 0x3ceb 28Summary 10.0.0.3 10.0.0.3 0x80000019 2470 0x2 0x2efc 28Summary 10.0.0.4 10.0.0.3 0x80000019 1702 0x2 0x2efa 28Summary 10.0.0.5 10.0.0.3 0x80000019 970 0x2 0x2ef8 28Summary 10.1.12.0 10.0.0.3 0x8000001c 1270 0x2 0xb767 28Summary 10.1.23.0 10.0.0.3 0x8000001c 1102 0x2 0x34e0 28Summary 10.1.24.0 10.0.0.3 0x8000001c 2002 0x2 0x33df 28Summary 10.1.34.0 10.0.0.3 0x8000001c 802 0x2 0xba4f 28Summary 10.1.45.0 10.0.0.3 0x80000019 1870 0x2 0x51af 28ASBRSum 10.0.0.1 10.0.0.3 0x8000001c 370 0x2 0x42e4 28ASBRSum 10.0.0.2 10.0.0.3 0x8000001c 70 0x2 0x2ef8 28OSPF AS SCOPE link state databaseType IDAdv RtrSeq Age Opt Cksum LenExtern 10.0.0.100 10.0.0.2 0x80000042 384 0x2 0x804 36Extern *10.0.0.101 10.0.0.6 0x80000015 807 0x2 0xc37b 36Extern 10.1.13.0 10.0.0.2 0x80000041 234 0x2 0x481e 36Extern 10.1.15.0 10.0.0.2 0x80000041 233 0x2 0x3232 36Extern 100.168.64.0 10.0.0.2 0x80000041 82 0x2 0xe0f7 36Sample Output 3
The following sample output shows the route from
R4toR6:user@R4>show route 10.0.0.6inet.0: 27 destinations, 31 routes (27 active, 0 holddown, 0 hidden)+ = Active Route, - = Last Active, * = Both10.0.0.6/32 *[OSPF/10]17:02:28, metric 2> via so-0/0/0.0user@R4>show ospf databaseOSPF link state database, area 0.0.0.0Type ID Adv Rtr Seq Age Opt Cksum LenRouter 10.0.0.2 10.0.0.2 0x8000002f 632 0x2 0xc10 84Router 10.0.0.3 10.0.0.3 0x8000001e 2271 0x2 0x24f3 84Router *10.0.0.4 10.0.0.4 0x80000022 1582 0x2 0x848a 84Summary 10.0.0.1 10.0.0.2 0x8000002d 789 0x2 0x2aee 28Summary *10.0.0.5 10.0.0.4 0x8000001e 982 0x2 0x140e 28Summary 10.0.0.6 10.0.0.3 0x8000001a 302 0x2 0x180e 28Summary 10.1.12.0 10.0.0.2 0x8000002c 1847 0x2 0x937d 28Summary 10.1.36.0 10.0.0.3 0x8000001c 771 0x2 0xa463 28Summary *10.1.45.0 10.0.0.4 0x8000001f 1789 0x2 0x35c5 28ASBRSum 10.0.0.1 10.0.0.2 0x8000002b 1533 0x2 0x20f9 28ASBRSum 10.0.0.6 10.0.0.3 0x80000018 2402 0x2 0xe19 28OSPF link state database, area 0.0.0.2Type ID Adv Rtr Seq Age Opt Cksum LenRouter *10.0.0.4 10.0.0.4 0x80000020 1282 0x0 0x97f3 48Router 10.0.0.5 10.0.0.5 0x80000018 1685 0x0 0x86ec 60Summary *10.0.0.1 10.0.0.4 0x80000021 1189 0x0 0x5ec5 28Summary *10.0.0.2 10.0.0.4 0x80000021 889 0x0 0x4ad9 28Summary *10.0.0.3 10.0.0.4 0x80000020 682 0x0 0x42e1 28Summary *10.0.0.4 10.0.0.4 0x8000001e 1489 0x0 0x32f3 28Summary *10.0.0.6 10.0.0.4 0x8000001f 589 0x0 0x30f0 28Summary *10.1.12.0 10.0.0.4 0x80000021 382 0x0 0xc555 28Summary *10.1.23.0 10.0.0.4 0x80000021 289 0x0 0x4cc3 28Summary *10.1.24.0 10.0.0.4 0x80000020 82 0x0 0x39d7 28Summary *10.1.34.0 10.0.0.4 0x8000001f 2089 0x0 0xcc3b 28Summary *10.1.36.0 10.0.0.4 0x8000001f 1882 0x0 0xc044 28OSPF AS SCOPE link state databaseType ID Adv Rtr Seq Age Opt Cksum LenExtern 10.0.0.100 10.0.0.2 0x80000042 484 0x2 0x804 36Extern 10.0.0.101 10.0.0.6 0x80000015 910 0x2 0xc37b 36Extern 10.1.13.0 10.0.0.2 0x80000041 333 0x2 0x481e 36Extern 10.1.15.0 10.0.0.2 0x80000041 332 0x2 0x3232 36Extern 100.168.64.0 10.0.0.2 0x80000041 182 0x2 0xe0f7 36What It Means
Sample output 1 shows an OSPF default route (
0.0.0.0/0) with a preference value of 10. In the area0.0.0.2link-state database, a Type 3 summary LSA advertises the default route.Sample output 2 shows an OSPF route with a preference value of 150. In the AS scope link-state database, an external Type 5 LSA indicates that the route from
R6to external router A is throughR2, the advertising router. By default, routes resulting from OSPF external LSAs are installed with a preference value of 150.Sample output 3 shows an OSPF route with a preference value of 10. In the area
0.0.0.0link-state database, a summary Type 3 LSA indicates that the route fromR4toR6is throughR3, the advertising router.The LSAs placed into the link-state database are used by the router to run the Dijkstra algorithm (also called the shortest path first algorithm). This computation uses the link-state database as a source, resulting in a loop-free topology using the best metric from the local router to all nodes in the OSPF network.