1-4
ip address
Syntax
ip address ip-address { mask | mask-length } [ sub ]
undo ip address [ ip-address { mask | mask-length } [ sub ] ]
View
VLAN interface view, loopback interface view
Parameters
ip-address: IP address, in dotted decimal notation.
mask: Subnet mask, in dotted decimal notation.
mask-length: Subnet mask length, the number of consecutive ones in the mask. It is in the range of 0 to
32.
sub: Specifies a secondary IP address of a VLAN or loopback interface.
Description
Use the ip address command to specify an IP address and mask for a VLAN or loopback interface.
Use the undo ip address command to remove an IP address and mask of a VLAN or loopback
interface.
By default, no IP address is configured for VLAN or loopback interface.
Note that:
z If you execute the undo ip address command without any parameter, the switch deletes both
primary and secondary IP addresses of the interface.
z The undo ip address ip-address { mask | mask-length } command is used to delete the primary IP
address.
z The undo ip address ip-address { mask | mask-length } sub command is used to delete specified
secondary IP addresses.
z You can assign at most five IP address to an interface, among which one is the primary IP address
and the others are secondary IP addresses. A newly specified primary IP address overwrites the
previous one if there is any.
z The primary and secondary IP addresses of an interface cannot reside on the same network
segment; the IP address of a VLAN interface must not be in the same network segment as that of a
loopback interface on a device.
z A VLAN interface cannot be configured with a secondary IP address if the interface has been
configured to obtain an IP address through BOOTP or DHCP.
Related commands: display ip interface.