show ip route

Use this command to display the IP routing table for a protocol or from a particular table.

When multiple entries are available for the same prefix, NSM uses an internal route selection mechanism based on protocol administrative distance and metric values to choose the best route. All best routes are entered into the FIB and can be viewed using this command. To display all routes (selected and not selected), use the show ip route database command.

Use this command to see all subnets of a specified network if they are present in the routing table. Use this command with mask information.

Command Syntax

Copy
show ip route A.B.C.D
show ip route (database|)
show ip route (database|) (bgp|connected|database|isis|fast-reroute|interface|isis|kernel|mbgp|mstatic|next-hop|ospf|rip|static)
show ip route summary
show ip route vrf WORD (database|)
show ip route vrf WORD (database|) (bgp|connected|isis|kernel|ospf|rip|static)

Parameters

A.B.C.D

Network in the IP routing table.

A.B.C.D/M

IP prefix <network>/<length>, for example, 35.0.0.0/8.

bgp

Border Gateway Protocol.

connected

Connected.

database

Routing table database.

fast-reroute

Fast reroute repair paths.

interface

Interface.

isis

IS-IS.

kernel

Kernel.

mbgp

Multiprotocol BGP routes.

mstatic

Multicast static routes.

next-hop

Next hop address.

ospf

Open Shortest Path First.

rip

Routing Information Protocol.

static

Static routes.

summary

Summarize all routes.

WORD

Routes for a Virtual Routing or Forwarding instance.

Default

None

Command Mode

Execution mode and Privileged execution mode

Applicability

This command was introduced before OcNOS version 1.3.

Example

Display FIB Routes

The following shows output for the best routes.

Copy
#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
       O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area       E - EVPN,
v - vrf leaked
       * - candidate default