network interface static
Configure a static IP address on the specified network interface.
User Access
admin
Syntax
network interface static -device <netdevice> -ip <IP_address> -netmask <IP_address> [-gateway <IP_address>] [-force]
Argument(s) | Shortcut | Description |
---|---|---|
-device <netdevice> | -d |
Specifies the interface you want to configure. Valid Values: >eth0 >eth1 >bond0 |
-ip <IP_address> | -i | Specifies the IP address to assign to the specified device. |
-netmask <IP_address> | -n | Specifies the network mask, in dotted-decimal format (for example, 255.255.255.0), to assign to the specified device. |
-gateway <IP_address> | -g | Specifies the gateway to assign to the specified device. |
-force | -f | Force the action without prompting. |
Example
psesh:>network interface static -device eth0 -ip 172.20.11.40 -netmask 255.255.255.0 NOTICE: The network service must be restarted for new network settings to take effect. If you are sure that you wish to restart the network, then type 'proceed', otherwise type 'quit' > proceed Proceeding... e1000e: eth0 NIC Link is Down Restarting network service... Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth0: ADDRCONF(NETDEV_UP): eth0: link is not ready Determining if ip address 172.20.11.40 is already in use for device eth0... [ OK ] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready Command Result : 0 (Success)