User guide
Chapter 5. Command Line Interface Reference 169
The following command sets the IP address and subnet mask for the default Ethernet interface (0:0).
eth ip addr 192.168.1.254 255.255.255.0
The following command sets the IP address and subnet mask for logical interface 1 on Ethernet port 0.
eth ip addr 10.0.27.1 255.255.255.0 0:1
ETH IP ADDROUTE
Adds a route to the default routing table for the Ethernet interface.
This command is needed only if the system does not support RIP (see IP (RIP) Protocol Controls, on page 80 and
the eth ip options command, on page 178).
Note: This command requires a save and reboot before it takes effect.
ipaddr Ethernet LAN IP address (4 decimals separated by periods).
ipnetmask IP network mask (4 decimals separated by periods).
gateway IP address (4 decimals separated by periods).
hops Number of routers through which the packet must go to get to its destination.
interface Ethernet interface through which the packet is sent out. This parameter may be omitted if the
router has only one Ethernet interface.
If the router has two physical Ethernet interfaces (an Ethernet hub router), the port number (0 or
1) must be specified.
To specify a logical interface other than logical interface 0, specify both the port number and the
logical interface number (<port #>:<logical #>, for example, 0:1).
Examples:
The following command adds a route to the default routing table for the default Ethernet interface (0:0).
eth ip addRoute 10.1.2.0 255.255.255.0 192.168.1.17 1
The following command adds a route to the default routing table for logical interface 1 on Ethernet port 0.
eth ip addRoute 10.1.3.0 255.255.255.0 10.0.27.20 1 0:1
ETH IP BINDROUTE
Adds an Ethernet route to the named IP virtual routing table.
Duplicate routes are not allowed within a routing table. However, identical routes may be added to different
routing tables. For example, the same route may be added to a virtual routing table and to the default routing table.
To list the routes, use the iproutes command, page 139. To remove an Ethernet route from a virtual routing table,
use the eth ip unbindRoute command, page 179.
eth ip addRoute <ipaddr> <ipnetmask> <gateway> <hops> [<interface>]