Junos OS: Monitoring Output from the Show Route Command - dummies

Junos OS: Monitoring Output from the Show Route Command

By Walter J. Goralski, Cathy Gadecki, Michael Bushong

The show route command output lists the active entries in the routing table, along with some basic information for each route. For each route, you see route, route prefix, and the following:

  • Route origin: The origin identifies how the route was learned. Listing 8-2 contains direct routes (indicating the route is directly accessible through one of the router’s interfaces), static routes, OSPF routes, and BGP routes.

  • Route preference: Listed alongside the route origin is the route preference. Remember that each protocol has a default route preference associated with it, or you can manually override the default. The higher preference values (lower numbers are higher preference) are selected as active routes.

  • Next-hop to the destination: The address listed after the to keyword is the IP address of the next-hop address in the routing table. To get to route, the router uses the next hop

  • Outbound interface: The outbound interface tells you the interface that the router is going to use to send traffic to the next-hop address. For the route to, the router will send traffic out its fxp0 interface.

The most basic task when monitoring the routing information on your router is to look at the routes that are in the routing table with the show route command:

user@router1> show route
inet.0: 10 destinations, 10 routes (9 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both     *[Static/5] 1w5d 20:30:29
           Discard  *[Direct/0] 2w4d 13:11:14
          > via lo0.0   *[Static/5] 2w4d 13:11:14
          > to via fxp0.0   *[Static/5] 1w5d 20:30:29
          > to via fxp0.0  *[Static/5] 2w4d 13:11:14
          > to via fxp0.0  *[Static/5] 2w4d 13:11:14
          > to via fxp0.0  *[OSPF/10] 2w4d 13:11:14
          > via fxp0.0 *[OSPF/10] 2w4d 13:11:14
           Local via fxp0.0 *[BGP/170] 2w4d 13:11:14
          > to via fxp0.0

In the show output, the router sends traffic destined for next hop out interface fxp0.0. Remember that the number that appears after the dot indicates the logical interface, which is defined as the unit number:

 [edit interfaces]
fxp0 {
  unit 0 {
   family inet {

When you look at the routing table, you need to check that all expected routes are in the table. If you don’t see a route you expect to see, you know something is wrong with the protocols on the router. In this case, you then must examine more closely how your device is configured and how your routing protocols are operating.

It’s good to remember that the routing table contains all of the information gathered by the routing protocols. This information is used to derive the forwarding table, which is the table actually used to determine the correct next hop for a packet.

Just because a route appears in the routing table doesn’t guarantee that the forwarding table uses the route to forward packets. However, lots of network people use the term “routing table” loosely, but in networking, the requirement for breaking a rule is to know what the rule is.