ip address

This command defines the primary IP address on the specified Layer 3 interface. Use the no form of this command to remove a configured IP address.

Syntax

ip address <ip address> <subnet mask> {alias} <alias name>

Command

Description

<ip address>

Defines a valid IPv4 address. IP addresses must be expressed in dotted-decimal notation (for example, 10.1.2.3).

<subnet mask>

Defines the subnet mask that corresponds to a range of IP addresses. Subnet masks must be expressed in dotted-decimal notation (e.g., 255.255.255.0).

alias

Defines an alias name for the IP address.

Default

NA

Command Mode

Privileged User

Note

For more information on alias names, see alias.

Example

■ Configures IP address 10.4.2.3/255.255.0.0 on VLAN 6.
(config-data)# interface vlan 6
(conf-if-VLAN 6)# ip address 10.4.2.3  255.255.0.0
■ Configures IPv4 address 10.4.4.61/255.255.0.0 with alias on interface VLAN 1:
(config-data)# interface vlan 1
(conf-if-VLAN 1)# ip address 10.4.4.61 255.255.0.0 alias ip_vlan1