User guide
TCP/IP command reference IP
4-15
iMG/RG Software Reference Manual (IPNetwork Functions)
Example --> ip add interface ip1 192.168.103.3 255.255.255.0
See also ip attach
ip show interface
ip set interface ipaddress
ip set interface dhcp
Note: For information on setting DHCP client configuration options, see DHCP Client command reference.
4.1.8.2.6 IP ADD ROUTE
Syntax
IP ADD ROUTE <name> <dest_ip> <netmask> {[GATEWAY
<gateway_ip>]|[INTERFACE <interface>]}
Description This command creates a static route to a destination network address via a gateway
device or an existing interface. It also allows you to create a default route.
Note: You can only create one default route. A default route will not be created if you have already created a
default route using the
IP ADD DEFAULTROUTE GATEWAY command or the IP ADD DEFAULTROUTE INTERFACE
command.
A route specifies a destination network (or single host), together with a mask to indicate
what range of addresses the network covers, and a next-hop gateway address or inter-
face. If there is a choice of routes for a destination, the route with the most specific mask
is chosen.
Routes are used when sending datagrams as well as forwarding them, so they are not rel-
evant only to routers. However, a system with a single interface is likely to have a single
route as a default route to the router on the network that it most often needs to use. If
ipaddress The interface IP address in the format 192.168.102.3
If the IP address is set to the special value 0.0.0.0, the
interface is marked as unconfigured. This value is used
when the interface address is obtained automatically.
For an unnumbered interface, the IP address parameter
is used to specify the router-id of the interface. The
router-id should be the same as the IP address of one of
the router’s numbered interfaces.
0.0.0.0
netmask The netmask address of the interface displayed in the
following format 255.255.255.0
The special value 255.255.255.255 is used to indicate an
unnumbered interface. An unnumbered interface is con-
figured by setting the IP address to the interface’s
router-id value, and setting netmask to 255.255.255.255.
If no IP address is
supplied, the natu-
ral mask of the IP
address is used.
Option Description Default Value