C. Router CLI Commands, Codes, and Designations
C-8 September 2002 9128-A2-GB20-80
IP Routing Commands
Internet Protocol (IP) routing commands are used to enable and disable IP routing,
and to create or delete static routes in the routing table.
To show IP routing and performance statistics, see Table C-13, Show Commands.
Table C-5. IP Routing Commands
ip route
dest-ip

dest-mask

{

next-hop-ip

|
intf-type
intf-num
[

.sub-intf-num

] }
no ip route
dest-ip

dest-mask

[

next-hop-ip

|
intf-type

intf-num

[.
sub-intf-num
] ]
Minimum Access Level: Administrator
Command Mode: config
Allows manual creation or deletion of static route entries. There are no route ent ries by
default. A default gateway destinatio n rout e may be specified by entering a destination IP
address and mask of 0.0.0.0 0.0.0.0 with a default gateway IP address or interface.
Example: ip route 132.53.4.2 255.255.255.255 serial 0.
x
NOTE: Generally, routes are specified using a next hop address. Howeve r, routes over
unnumbered point-to-point sub-interfac es should specify the sub-interface to reach the
destination.
dest-ip
IP address of the destination host or network or 0.0.0.0 i f a default destination
gateway is specified.
dest-mask
The subnet mask to be used when the destination IP address is compared
during route table lookups. The dest-mask cannot be 0.0.0.0 unless a dest-ip
address of
0.0.0.0 has been specified, and only contiguous, left-justified masks are allowed.
next-hop-ip
IP address of the next-hop router used to reach the destination.
intf-type
Two interface types are supported:
Ethernet IEEE 802.3 interface
Serial Frame relay serial interface
intf-num
Valid interface index number f or bot h the Ethernet and Serial interfaces is0.
sub-intf-num
Sub-interfaces are only supported on the network interface (Serial0).
If a serial interface is specified, a sub-interface must also be specified. Valid range for a
sub-interface is 04,294,967,295.
[no] ip routing
Minimum Access Level: Administrator
Command Mode: config
Enables or disables IP routing in the device. The IP routing default is Enable.
NOTE: When IP routing is disabled, all static route entries are deleted. However,
adding new route entries while IP routing is disabled is not prevent ed.
[no] ip multicast-routing
Minimum Access Level: Administrator
Command Mode: config
Enables or disables the forwarding of IP multicast packets. The default is Disable.