Command Reference IP Address Commands
IP Address Commands
ip-address
Use this command to configure the IP address of an interface. Use the no form of this command to
delete the IP address of the interface.
ip address ip-address network-mask [ secondary ] | [ gateway ip-address ]
no ip address [ip-address network-mask [ secondary ] | [ gateway ] ]
Parameter
Description
Parameter Description
ip-address
32-bit IP address, which comprises multiple groups of 8 bits in
decimal format. Groups are separated by dots.
network-mask
32-bit network mask, which comprises multiple groups of 8 bits in
decimal format. 1 stands for the mask bit, and 0 stands for the
host bit. Groups are separated by dots.
secondary
Indicates the secondary IP address that has been configured.
gateway ip-address
Configures the gateway address for the Layer-2 switch. The
gateway address is only supported on Layer-2 switches. No
address follows the gateway parameter when using the no form of
this command.
Defaults
No IP address is configured for the interface.
Command
Mode
Interface configuration mode
Usage Guide
The device cannot receive and send IP packets before it is configured with an IP address. After an IP
address is configured for the interface, the interface is allowed to run the Internet Protocol (IP).
The network mask is also a 32-bit value that identifies which bits of the IP address is the network
address portion. Among the network mask, the IP address bits set to 1s are the network address
portion. The IP address bits that set to 0s are the host address. For example, the network mask of a
Class A IP address is 255.0.0.0. You can divide a network into different subnets using the network
mask. Subnet division means to use the bits in the host address as the network address portion, so
as to reduce the capacity of a host and increase the number of networks. In this case, the network
mask is called a subnet mask.
The RGOS software supports multiple IP addresses for an interface. One is the primary IP address
and the others are secondary IP addresses. Theoretically, there is no limit on the number of
secondary IP addresses. The primary IP address, however, must be configured before the secondary
IP addresses are configured. The secondary IP addresses and the primary IP address must belong