Viewing Routes Learned by IS-IS
Problem
You want to check the routes that are being generated by the link-state algorithm to make sure that the router is learning the expected routes.
Solution
Use the show isis route command to see the contents of the IS-IS routing table:
aviva@RouterG> show isis route IS-IS routing table Current version: L1: 85 L2: 85 IPv4/IPv6 Routes ---------------- Prefix L Version Metric Type Interface Via 10.0.24.0/24 2 85 20 int fe-0/0/1.0 RouterH
Discussion
IS-IS uses the information in its link-state database to calculate the best route to a destination and places these routes in its routing table. The show isis route command displays what's in the IS-IS routing table. In this recipe, the output shows that IS-IS has learned one route, to network 10.0.24.0/24, the interface to which RouterH is connected. This is an internal route accessible over interface fe-0/0/1, and the next hop is RouterH (shown in the Via column). The Metric column shows the cost of the route.
You can find out which routes the router has learned from IS-IS by looking in the unicast routing table:
aviva@RouterG> show route inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.0.0.0/24 *[Direct/0] 3d 19:05:01 > via fe-1/0/1.0 10.0.0.1/32 *[Local/0] 3d 19:05:01 Local via fe-1/0/1.0 10.0.1.0/24 *[Direct/0] 3d 19:05:01 > via fe-0/0/1.0 10.0.1.2/32 *[Local/0] 3d 19:05:01 Local via fe-0/0/1.0 10.0.16.0/24 *[Direct/0] 3d 18:41:06 > via fe-1/0/0.0 10.0.16.2/32 *[Local/0] 3d 18:41:06 Local via fe-1/0/0.0 10.0.24.0/24 *[ IS-IS/18] 22:53:36, metric 20 > to 10.0.1.1 via fe-0/0/1.0 172.19.121.0/24 *[Direct/0] 3d 19:05:01 > via fe-0/0/0.0 172.19.121.119/32 *[Local/0] 3d 19:05:01 Local via fe-0/0/0.0 192.168.18.1/32 *[ IS-IS/18] 22:53:36, metric 10 > to 10.0.1.1 via fe-0/0/1.0 192.168.19.1/32 *[Direct/0] 3d 19:05:01 > via lo0.0 __juniper_private1__.inet.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.0.0.1/32 *[Direct/0] 3d 19:05:01 > via lo0.16385 10.0.0.16/32 *[Direct/0] 3d 19:05:01 > via lo0.16385 iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 49.0020.1921.6801.9001/72 *[Direct/0] 1d 20:46:39 > via lo0.0
This output shows the contents of three routing tables. The first is inet.0, which is the unicast routing table. The second, __juniper_private1__inet.0, is a table of private routes within the router itself. The third is the ISO routing table, iso.0.
In the inet.0 table, the route entries starting with [ IS-IS/18] are learned from IS-IS. The router has learned one route from IS-IS, to network 10.0.24.0, which we also saw in the IS-IS routing table. The value of 18 in the brackets is the JUNOS default value for the external IS-IS administrative distance, also called the preference, which is used to select which route is installed in the forwarding table when several protocols calculate routes to the same destination. You can change the preference value by configuring the preference statement for the IS-IS level. The numbers following the brackets indicate how long the routing table has known about the route. The metric value is the cost to this address. The default IS-IS metric is 10. For example, in the route to 10.0.24.0, the metric is 20 because that network is two hops away.
The inet.0 table also contains a route to 192.168.19.1/32, which is this router's loopback address. This route appears in the routing table because you configured IS-IS on the router's loopback interface, lo0.0.
The ISO address family creates a separate routing table, iso.0, which is for the ISO routes to the NET destinations. Here, this table contains one route, to the Level 2 neighbor, which is the only NET destination in the network.
You can also see just the routes learned by IS-IS:
aviva@RouterG> show route protocol isis inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.0.24.0/24 *[IS-IS/18] 22:58:48, metric 20 > to 10.0.1.1 via fe-0/0/1.0 192.168.18.1/32 *[IS-IS/18] 22:58:48, metric 10 > to 10.0.1.1 via fe-0/0/1.0
See Also
Recipe 9.1