56
mixture of RIP and static routing is not advised.)
“
<timeout>
” (default 0, meaning that the route does not time out) is the number of seconds that
the route will remain in the routing table.
Note that the routing table does not contain routes to the directly connected networks, without
going through a gateway. TCP/IP routes packets to such destinations by using the information in
the device and subnet tables instead. The “
route
” command (with no parameters) displays the
routing table. It adds a comment to each route with the following information:
•
How the route was obtained; one of
MAN — configured by the “
route
” command
RIP
— obtained from RIP
ICMP — obtained from an ICMP redirect message
SNMP — configured by SNMP network management;
•
The time-out, if the route is not permanent;
•
The original time-out, if the route is not permanent;
•
The name of the interface (if known) that will be used for the route;
•
An asterisk (“
*
”) if the route was added recently and RIP has not yet processed the change
(the asterisk should disappear within 30 seconds, when RIP next considers broadcasting
routing information).
Configuration saving saves this information. (Only the routes configured by the “
route
”
command are saved or displayed by “
config
”.)
Example:
DSL>
ip route add default 0.0.0.0 192.168.2.3 0:0:0:0
DSL>
ip route add testnet1 192.168.101.0 192.168.2.34
DSL>
ip route add testnet2 192.168.102.0 192.168.2.34 ff:ff:ff:0 1 60
DSL>
ip route
route add testnet2 192.168.102.0 192.168.2.34 ff:ff:ff:00 1 # MAN 58s/1m via
ether *
route add testnet1 192.168.101.0 192.168.2.34 ff:ff:ff:00 1 # MAN via ether
route add default 0.0.0.0 192.168.2.3 00:00:00:00 1 # MAN via ether
28. routeflush
Syntax:
routeflush [<i/f>] [all]
Description:
Removes routes from the route table. If “
<i/f>
” is specified, only routes through the named
interface are removed. If “
all
” is not specified, only host routes (those with a mask of ff:ff:ff:ff) are
removed. The “
routeflush
” command is “
hidden
”, not shown by “
ip help
”.
Configuration saving saves this information.
Example:
DSL>
ip routeflush ether all
DSL>
ip routeflush
29. routes
Syntax:
routes
Description:
Lists routes. (The same as “
route
”, with no parameters.)
30. stats
Syntax:
stats arp|icmp|ip|tcp|udp [reset]
stats help [<cmd>|all]
Description:
Displays or clears a subset of IP statistics.
Example:
DSL>
ip stats udp
ip: UDP receptions delivered to users: 0
ip: UDP receptions with no users: 170
ip: Otherwise discarded UDP receptions: 0
ip: Transmitted UDP packets: 35
DSL>
ip stats udp reset