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
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 all summary
show ip route vrf WORD (database|)
show ip route vrf WORD (database|) (bgp|connected|isis|kernel|ospf|rip|static|summary)
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 (directly attached) routes.
database
Routing table database.
fast-reroute
Fast reroute repair paths.
interface
Routes learned or tied to a specific interface.
isis
IS-IS routing-protocol routes.
kernel
Kernel (local OS) routes.
mbgp
Multiprotocol BGP (e.g., VPN or EVPN) routes.
mstatic
Multicast static routes.
next-hop
Routes based on a specific next-hop address.
ospf
Open Shortest Path First routing-protocol routes.
rip
Routing Information Protocol routing-protocol routes.
static
Static routes
summary
Summarize all routes
vrf WORD
Routes for a specific Virtual Routing and Forwarding (VRF) instance named WORD.
vrf all
Routes for all VRF instances.
Default
None
Command Mode
Execution mode and Privileged execution mode
Applicability
Introduced before OcNOS version 1.3.
Example
Displays all routes in the IP routing table database.
#show ip route database
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
> - selected route, * - FIB route, p - stale info
IP Route Table for VRF "default"
C *> 1.1.1.0/24 is directly connected, eth1, 00:13:39
C *> 2.2.2.0/24 is directly connected, eth3, 00:13:04
B *> 88.88.1.2/32 [12/0] via 2.2.2.2, eth3, 00:06:37
C *> 127.0.0.0/8 is directly connected, lo, 00:22:15
B *> 150.1.0.0/16 [120/0] is a summary, Null, 00:11:19
B *> 150.1.1.0/24 [200/0] via 1.1.1.1, eth1, 00:11:19
C *> 192.168.52.0/24 is directly connected, eth0, 00:22:13
Gateway of last resort is not set
OcNOS#show ip route vrf all summary
-----------------------------------------------
IP routing table name is Default-IP-Routing-Table(0)
-----------------------------------------------
IP routing table maximum-paths : 8
Total number of IPv4 routes : 1
Total number of IPv4 paths : 1
Pending routes (due to route max reached): 0
Route Source Networks
connected 1
Total 1
FIB 1
ECMP statistics (active in ASIC):
Total number of IPv4 ECMP routes : 0
Total number of IPv4 ECMP paths : 0
-----------------------------------------------
IP routing table name is management(1)
-----------------------------------------------
IP routing table maximum-paths : 8
Total number of IPv4 routes : 2
Total number of IPv4 paths : 2
Pending routes (due to route max reached): 0
Route Source Networks
connected 2
Total 2
FIB 2
ECMP statistics (active in ASIC):
Total number of IPv4 ECMP routes : 0
Total number of IPv4 ECMP paths : 0
-----------------------------------------------
IP routing table name is red(2)
-----------------------------------------------
IP routing table maximum-paths : 8
Total number of IPv4 routes : 2
Total number of IPv4 paths : 2
Pending routes (due to route max reached): 0
Route Source Networks
connected 2
Total 2
FIB 2
ECMP statistics (active in ASIC):
Total number of IPv4 ECMP routes : 0
Total number of IPv4 ECMP paths : 0
VRF FIB Route Limits:
Configured Route Limit : 1000
Utilization Percentage : 0 %
Action upon reaching limit: stop-install
Warning Threshold : 80 %
Exceeds Threshold : No
Total number of IPv4 routes (All VRFs) : 5