User Manual

Table Of Contents
mask : <1-31>
Number of mask bits
Set this to 0 if specifying the default gateway
netmask : A.B.C.D
Netmask in address format
Set this to 0.0.0.0 if specifying the default gateway
gateway : A.B.C.D
IPv4 address of gateway
number : <1-255>
Administrative distance (priority order when selecting route) (if omitted: 1)
Lower numbers have higher priority.
[Initial value]
none
[Input mode]
global configuration mode
[Description]
Adds a static route for IPv4.
If this command is executed with the "no" syntax, the specified route is deleted.
[Example]
Set the default gateway to 192.168.1.1.
SWR2310(config)#ip route 0.0.0.0/0 192.168.1.1
For the destination 172.16.0.0/16, set the gateway to 192.168.2.1.
SWR2310(config)#ip route 172.16.0.0 255.255.0.0 192.168.2.1
7.2.2 Show IPv4 Forwarding Information Base
[Syntax]
show ip route [ip_address[/mask]]
[Parameter]
ip_address : A.B.C.D
IPv4 address
mask : <0-32>
Number of mask bits (if omitted: 32)
[Input mode]
unprivileged EXEC mode, privileged EXEC mode
[Description]
Shows the IPv4 Forwarding Information Base (FIB).
If the IPv4 address is omitted, the entire content of the FIB is shown.
If the IPv4 address or network address is specified, detailed information for the routing entry that matches the destination is
shown.
[Example]
Show the entire IPv4 forwarding information base.
SWR2310>show ip route
Codes: C - connected, S - static
* - candidate default
Gateway of last resort is 192.168.100.1 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 192.168.100.1, vlan1
Command Reference | Layer 3 functions | 235