Page 316 / 998 Scroll up to view Page 311 - 315
IP
TCP/IP command reference
iMG/RG Software Reference Manual (IPNetwork Functions)
4-14
Options
The following table gives the range of values for each option that can be specified with
this command and a Default Value (if applicable).
Example
--> ip add defaultroute interface ip3
See also
ip add route, ip add route disabled, ip set route enabled
ip add defaultroute gateway, ip add defaultroute gateway
disabled
ip set rip advertisedefault
ip set rip defaultroutecost
4.1.8.2.5 IP ADD INTERFACE
Syntax
IP ADD INTERFACE <name> [<ipaddress> [<netmask>]]
Description
This command adds a named interface and optionally sets its IP address. The IP address is
not mandatory at this stage, but if it is not specified in this command, the interface will be
unconfigured. There are three ways that the IP address can be set later:
Using the IP SET INTERFACE IPADDRESS command
You can set the interface to obtain its configuration via dynamic host configuration
protocol (DHCP) using the IP SET INTERFACE DHCP ENABLED command. By
default, DHCP is disabled.
This interface can obtain its IP configuration via PPP IPCP (
Internet Protocol Control Protocol
) negotiation.
See
PPPoA CLI commands
or
PPPoE CLI commands
.
The IP stack automatically creates a loopback interface for address 127.0.0.1 subnet
mask 255.0.0.0. This interface is not displayed by the IP LIST INTERFACES command.
You can use this command to add unnumbered interfaces.
Options
The following table gives the range of values for each option that can be specified with
this command and a Default Value (if applicable).
Option
Description
Default Value
interface
The name of the existing interface that this route will
use. To display interface names, use the IP LIST INTER-
FACES command.
N/A
Option
Description
Default Value
name
An arbitrary name that identifies the ip interface. It can
be made up of one or more letters or a combination of
letters and digits, but it cannot start with a digit.
N/A
Page 317 / 998
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
Page 318 / 998
IP
TCP/IP command reference
iMG/RG Software Reference Manual (IPNetwork Functions)
4-16
the interface can communicate more efficiently with a particular destination by using a
different router, then it will learn this fact from an
Internet Control Message Protocol
(ICMP) redirect message.
Options
The following table gives the range of values for each option that can be specified with
this command and a Default Value (if applicable).
Example
Example 1 routes through a gateway.
--> ip add route route1 192.168.103.3 255.255.255.0 gateway 192.168.102.3
Example 2 is a default route.
--> ip add route default 0.0.0.0 0.0.0.0 interface ip1
See also
ip list interfaces
ip add defaultroute gateway
ip add defaultroute interface
4.1.8.2.7 IP ADD ROUTE DISABLED
Syntax
IP ADD ROUTE <name> <dest_ip> <netmask> {[GATEWAY
<gateway_ip>]|[INTERFACE <interface>]} DISABLED
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.
Option
Description
Default Value
name
An arbitrary name that identifies the route. It can be
made up of one or more letters or a combination of
letters and digits, but it cannot start with a digit. To
create a default static route to a destination address,
type default as the route name. You can only create
one route called default.
N/A
dest_ip
The IP address of the destination network displayed in
the following format: 192.168.102.3
N/A
netmask
The destination netmask address (format:
255.255.255.0)
N/A
gateway_ip
The IP address of the gateway that this route will use,
displayed in the following format: 192.168.102.3
N/A
interface
The existing interface that this route will use. To dis-
play interface names, use the IP LIST INTERFACES
command.
N/A
Page 319 / 998
TCP/IP command reference
IP
4-17
iMG/RG Software Reference Manual (IPNetwork Functions)
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
the interface can communicate more efficiently with a particular destination by using a dif-
ferent router, then it will learn this fact from an
Internet Control Message Protocol
(ICMP) redirect message.
Note:
This command is avalable on FIBER B,D,E MODULAR and ADSL B,C models only.
Options
The following table gives the range of values for each option that can be specified with
this command and a Default Value (if applicable).
Example
Example 1 routes through a gateway.
--> ip add route route1 192.168.103.3 255.255.255.0 gateway 192.168.102.3
Example 2 is a default route.
--> ip add route default 0.0.0.0 0.0.0.0 interface ip1
Option
Description
Default Value
name
An arbitrary name that identifies the route. It can be
made up of one or more letters or a combination of let-
ters and digits, but it cannot start with a digit. To create a
default static route to a destination address, type default
as the route name. You can only create one route called
default.
N/A
dest_ip
The IP address of the destination network displayed in the
following format: 192.168.102.3
N/A
netmask
The destination netmask address (format: 255.255.255.0)
N/A
gateway_ip
The IP address of the gateway that this route will use, dis-
played in the following format: 192.168.102.3
N/A
interface
The existing interface that this route will use. To display
interface names, use the IP LIST INTERFACES command.
N/A
Page 320 / 998
IP
TCP/IP command reference
iMG/RG Software Reference Manual (IPNetwork Functions)
4-18
See also
ip list interfaces
ip add defaultroute gateway
ip add defaultroute interface
4.1.8.2.8 IP ATTACH
Syntax
IP ATTACH {<name>|<number>} <transport>
Description
This command attaches an existing transport to an existing IP interface (e.g., a bridge or
router) so that data can be transported via the selected transport method.
This command implicitly enables the transport being attached.
Options
The following table gives the range of values for each option that can be specified with
this command and a Default Value (if applicable).
Example
In the example below,
eth1
is the name of an Ethernet transport created using the ETH-
ERNET ADD TRANSPORT command:
--> ip attach ip1 eth1
See also
IP ADD INTERFACE
IP LIST INTERFACES
4.1.8.2.9 IP ATTACHBRIDGE
Syntax
IP ATTACHBRIDGE {<name>|<number>}
Description
This command attaches the bridge to the router via an existing IP interface.
Option
Description
Default Value
name
An existing IP interface. To display interface names, use
the ip list interfaces command.
N/A
number
An existing IP interface. To display interface numbers,
use the ip list interfaces command. The number appears
in the first column under the heading ID.
N/A
transport
An existing transport.
N/A

Rate

4 / 5 based on 3 votes.

Popular Allied-Telesis Models

Bookmark Our Site

Press Ctrl + D to add this site to your favorites!

Share
Top