User`s guide
130 SOCKETS TCP/IP Stack
MX1 Reference Guide E-EQ-MX1RG-D
route
route creates an entry in the IP routing table for Sockets to determine where to send data. The
Alternative Routing mechanism allows more than one route to be specified to a particular host or
network. Failure of one route causes an automatic switch to the next route.
Refer also to the ip address command for specifying the net mask, because a route is automatically
added to each interface for the default or specified net mask for that address. When multiple
routes are defined to the same address, Sockets uses the route with the network size (largest
number of bits in the net mask).
Syntax (general)
route [ add | drop destination ifname [gateid |none [ metric
[proxy] [private] [static] ] ] ]
Syntax (specific)
route add [ hostid | netid ] ifname [gateid]
route add [ hostid | netid[/mask] ] ifname [gateid]
route add default ifname
route drop [ hostid | netid ]
route drop [ hostid | netid[/mask] ]
route drop default
Parameters
add or drop
Sub-command to add or drop (remove) a route from the routing table.
default
All transmissions to IP addresses not otherwise defined in routing commands are sent via the
network interface specified by ifname.
hostid
hostid is the IP address of a destination remote host to which data must be sent, or a remote host
which must be removed from the routing table (dropped).
netid
netid is the IP address of a destination network to which data must be sent. Any host with this IP
network address is able to receive the data. Whether a particular host will use the data depends on
the host portion of the specific IP address in the IP header.
mask
mask specifies the number of bits in the network portion of the address if sub-netting is used. If
not used, the network portion of the address is determined according to the class (A, B or C) of
the address.
ifname
ifname defines the name used in the interface command for the immediate network on which the
data for the designated host must be sent. This is the network level interface to be used by the
local host to reach the remote host.