[Contents] [Prev] [Next] [Index] [Report an Error]


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 R5 to external router A, the second shows the route from R6 to external router A, and the third shows the route from R4 to R6.

Action

To examine a route in an OSPF AS, enter one or all of the following CLI commands:

user@host> show route destination-prefix
user@host> show ospf database

Sample Output 1

The following sample output shows the path from R5 to external router A:

user@R5> show route 10.0.0.100 

inet.0: 23 destinations, 25 routes (23 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

0.0.0.0/0          *[OSPF/10] 01:58:42, metric 11
                    > via so-0/0/2.0

user@R5> show ospf database 

    OSPF link state database, area 0.0.0.2
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router   10.0.0.4         10.0.0.4         0x8000002b   140  0x0  0x81fe  48
Router  *10.0.0.5         10.0.0.5         0x8000001f   526  0x0  0x78f3  60
Summary  0.0.0.0          10.0.0.4         0x80000005    32  0x0  0x73cf  28
Summary  10.0.0.1         10.0.0.4         0x8000002b  2132  0x0  0x4acf  28
Summary  10.0.0.2         10.0.0.4         0x8000002b  1940  0x0  0x36e3  28
Summary  10.0.0.3         10.0.0.4         0x8000002a  1832  0x0  0x2eeb  28
Summary  10.0.0.4         10.0.0.4         0x80000028  1640  0x0  0x1efd  28
Summary  10.0.0.6         10.0.0.4         0x80000029  1340  0x0  0x1cfa  28
Summary  10.1.12.0        10.0.0.4         0x8000002b  1232  0x0  0xb15f  28
Summary  10.1.23.0        10.0.0.4         0x8000002b  1040  0x0  0x38cd  28
Summary  10.1.24.0        10.0.0.4         0x80000029   932  0x0  0x27e0  28
Summary  10.1.34.0        10.0.0.4         0x80000029   740  0x0  0xb845  28
Summary  10.1.36.0        10.0.0.4         0x80000029   632  0x0  0xac4e  28

Sample Output 2

The following sample output shows the route from R6 to external router A:

user@R6> show route 10.0.0.100

inet.0: 29 destinations, 31 routes (29 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.0.0.100/32      *[OSPF/150] 16:52:11, metric 0, tag 0
                    > via so-0/0/3.0

user@R6> show ospf database 

    OSPF link state database, area 0.0.0.3
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router   10.0.0.3         10.0.0.3         0x8000001d   502  0x2  0x6639  48
Router  *10.0.0.6         10.0.0.6         0x80000019   807  0x2  0x443a  60
Summary  10.0.0.1         10.0.0.3         0x8000001c  1570  0x2  0x50d7  28
Summary  10.0.0.2         10.0.0.3         0x8000001c  1402  0x2  0x3ceb  28
Summary  10.0.0.3         10.0.0.3         0x80000019  2470  0x2  0x2efc  28
Summary  10.0.0.4         10.0.0.3         0x80000019  1702  0x2  0x2efa  28
Summary  10.0.0.5         10.0.0.3         0x80000019   970  0x2  0x2ef8  28
Summary  10.1.12.0        10.0.0.3         0x8000001c  1270  0x2  0xb767  28
Summary  10.1.23.0        10.0.0.3         0x8000001c  1102  0x2  0x34e0  28
Summary  10.1.24.0        10.0.0.3         0x8000001c  2002  0x2  0x33df  28
Summary  10.1.34.0        10.0.0.3         0x8000001c   802  0x2  0xba4f  28
Summary  10.1.45.0        10.0.0.3         0x80000019  1870  0x2  0x51af  28
ASBRSum  10.0.0.1         10.0.0.3         0x8000001c   370  0x2  0x42e4  28
ASBRSum  10.0.0.2         10.0.0.3         0x8000001c    70  0x2  0x2ef8  28
    OSPF AS SCOPE link state database
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Extern   10.0.0.100       10.0.0.2         0x80000042   384  0x2  0x804   36
Extern  *10.0.0.101       10.0.0.6         0x80000015   807  0x2  0xc37b  36
Extern   10.1.13.0        10.0.0.2         0x80000041   234  0x2  0x481e  36
Extern   10.1.15.0        10.0.0.2         0x80000041   233  0x2  0x3232  36
Extern   100.168.64.0     10.0.0.2         0x80000041    82  0x2  0xe0f7  36

Sample Output 3

The following sample output shows the route from R4 to R6:

user@R4> show route 10.0.0.6 

inet.0: 27 destinations, 31 routes (27 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.0.0.6/32        *[OSPF/10] 17:02:28, metric 2
                    > via so-0/0/0.0

user@R4> show ospf database 

    OSPF link state database, area 0.0.0.0
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router   10.0.0.2         10.0.0.2         0x8000002f   632  0x2  0xc10   84
Router   10.0.0.3         10.0.0.3         0x8000001e  2271  0x2  0x24f3  84
Router  *10.0.0.4         10.0.0.4         0x80000022  1582  0x2  0x848a  84
Summary  10.0.0.1         10.0.0.2         0x8000002d   789  0x2  0x2aee  28
Summary *10.0.0.5         10.0.0.4         0x8000001e   982  0x2  0x140e  28
Summary  10.0.0.6         10.0.0.3         0x8000001a   302  0x2  0x180e  28
Summary  10.1.12.0        10.0.0.2         0x8000002c  1847  0x2  0x937d  28
Summary  10.1.36.0        10.0.0.3         0x8000001c   771  0x2  0xa463  28
Summary *10.1.45.0        10.0.0.4         0x8000001f  1789  0x2  0x35c5  28
ASBRSum  10.0.0.1         10.0.0.2         0x8000002b  1533  0x2  0x20f9  28
ASBRSum  10.0.0.6         10.0.0.3         0x80000018  2402  0x2  0xe19   28

    OSPF link state database, area 0.0.0.2
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router  *10.0.0.4         10.0.0.4         0x80000020  1282  0x0  0x97f3  48
Router   10.0.0.5         10.0.0.5         0x80000018  1685  0x0  0x86ec  60
Summary *10.0.0.1         10.0.0.4         0x80000021  1189  0x0  0x5ec5  28
Summary *10.0.0.2         10.0.0.4         0x80000021   889  0x0  0x4ad9  28
Summary *10.0.0.3         10.0.0.4         0x80000020   682  0x0  0x42e1  28
Summary *10.0.0.4         10.0.0.4         0x8000001e  1489  0x0  0x32f3  28
Summary *10.0.0.6         10.0.0.4         0x8000001f   589  0x0  0x30f0  28
Summary *10.1.12.0        10.0.0.4         0x80000021   382  0x0  0xc555  28
Summary *10.1.23.0        10.0.0.4         0x80000021   289  0x0  0x4cc3  28
Summary *10.1.24.0        10.0.0.4         0x80000020    82  0x0  0x39d7  28
Summary *10.1.34.0        10.0.0.4         0x8000001f  2089  0x0  0xcc3b  28
Summary *10.1.36.0        10.0.0.4         0x8000001f  1882  0x0  0xc044  28
    OSPF AS SCOPE link state database
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Extern   10.0.0.100       10.0.0.2         0x80000042   484  0x2  0x804   36
Extern   10.0.0.101       10.0.0.6         0x80000015   910  0x2  0xc37b  36
Extern   10.1.13.0        10.0.0.2         0x80000041   333  0x2  0x481e  36
Extern   10.1.15.0        10.0.0.2         0x80000041   332  0x2  0x3232  36
Extern   100.168.64.0     10.0.0.2         0x80000041   182  0x2  0xe0f7  36

What It Means

Sample output 1 shows an OSPF default route (0.0.0.0/0) with a preference value of 10. In the area 0.0.0.2 link-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 R6 to external router A is through R2, 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.0 link-state database, a summary Type 3 LSA indicates that the route from R4 to R6 is through R3, 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.


[Contents] [Prev] [Next] [Index] [Report an Error]