Juniper Show the Routes in the Routing Table

  • by

Juniper Show the Routes in the Routing Table

You want to check the routing table to see that it contains the routes you expect to other routers in your domain and to routers in other ASs.

The show route command shows the contents of the routing table:

source@Router> show route
inet.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
+ = Active Route, – = Last Active, * = Both
172.16.16.0/24       *[Direct/0] 5d 17:37:05
                    > via ge-0/0/0.0
172.16.16.1/32       *[Local/0] 1w0d 15:51:30
                      Local via ge-0/0/0.0
192.168.42.1/32    *[Direct/0] 5d 18:02:37

                    > via lo0.0

If IPv6 is running on the router, the routing table contains its routes. These are listed at the end of the show route command, or you can display them separately with the following command:

source@Router> show route table inet6.0
inet6.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
+ = Active Route, – = Last Active, * = Both
9009:1::/64        *[Direct/0] 00:01:08
                    > via se-0/0/3.0
                    [Direct/0] 00:01:08
                    > via fe-0/0/0.0
9009:1::1/128      *[Local/0] 00:01:08
                      Local via fe-0/0/0.0
9009:1::3/128      *[Local/0] 00:01:08

                      Local via se-0/0/3.0

Here is a route of Static Route.

192.168.12.1/32    *[Static/5] 3d 21:43:37

                    > to 10.0.16.1 via fe-1/0/0.0

Here is a route learned from IS-IS:
10.0.24.0/24       *[IS-IS/18] 22:53:36, metric 20

                    > to 10.0.1.1 via fe-0/0/1.0

This is The interface IP address. That is direct.

10.0.16.0/24       *[Direct/0] 5d 17:37:05

 

To display only the IPv4 unicast routes without the internal JUNOS routes, use this command:

source@RouterA> show route table inet.0
inet.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
+ = Active Route, – = Last Active, * = Both
172.16.16.0/24       *[Direct/0] 5d 17:37:05
                    > via fe-0/0/0.0
172.16.16.1/32       *[Local/0] 1w0d 15:51:30
                      Local via fe-0/0/0.0
192.168.42.1/32    *[Direct/0] 5d 18:02:37

                    > via lo0.0

For a quickly skimmable view of the routing-table entries, use the terse version of the show route command:

source@RouterA> show route terse
inet.0: 3 destinations, 3
routes (3 active, 0 holddown, 0 hidden)
+ = Active Route, – = Last Active, * = Both
A Destination        P Prf   Metric 1   Metric 2  Next hop        AS path
* 172.16.16.0/24       D   0                       >fe-0/0/0.0
* 172.16.1/32       L   0                        Local

* 192.168.42.1/32    D   0                       >lo0.0

source@Router3> show route hidden table inet.0
inet.0: 168242 destinations, 168253 routes (168240 active, 0 holddown, 2 hidden)
+ = Active Route, – = Last Active, * = Both
3.0.0.0/8           [BGP/170] 00:05:20, MED 0, localpref 100, from 172.158.5.125
                      AS path: 65500 65510 I
                      Unusable
172.16.10.0/24      [BGP/170] 00:05:20, MED 0, localpref 100, from 172.158.5.125
                      AS path: I

                      Unusable

To find out why the route is unusable, get more details about it:

source@Router3> show route hidden 172.16.0.0/24 extensive

source@Router3> show route inactive-prefix table inet.0

 

Leave a Reply