IP Addressing Commands
ip address
The ip address interface configuration command sets an IP address. To remove an IP address, use
the no form of this command.
Syntax
ip address ip-address {mask | prefix-length}
no ip address [ip-address]
•
ip-address—IP address
mask—The IP address network mask
•
•
prefix-length—The number of bits that comprise the IP address prefix. The prefix length
must be preceded by a forward slash (/). (Range: 0 -32)
Default Configuration
No IP address is defined for interfaces.
Command Mode
Interface configuration (Ethernet, VLAN, port-channel, out-of-band Ethernet)
User Guidelines
Each part of an IP address must start with a number other than zero. For example, IP address
131.108.1.27 is valid, whereas IP addresses 001.100.192.6 and 192.001.10.3 are invalid.
An IP address cannot be configured for a range of interfaces (range context).
Up to 5 IP addresses may be defined on the out-of-band port.
Example
The following example configures VLAN 1 with the IP address 131.108.1.27 and subnet mask
255.255.255.0.
Console (config)# interface vlan 1
Console (config-if)# ip address 131.108.1.27 255.255.255.0
IP Addressing Commands
159