The ip address command configures an IP address for an interface.
The undo ip address command deletes the IP address of an interface.
By default, no IP address is configured for interfaces.
Parameter | Description | Value |
---|---|---|
ipv4Addr |
Specifies an IP address. |
The value is in dotted decimal notation. |
ipv4Mask |
Specifies a subnet mask. The IP address with the subnet mask of 255.255.255.255 can be assigned only to a Loopback interface. |
The value is in dotted decimal notation. |
ipv4Masklen |
Specifies the length of the subnet mask. The IP address with the subnet mask length of 32 can be assigned only to a Loopback interface. |
The value is an integer ranging from 0 to 32. |
Usage Scenario
To configure an IP address and its mask for an interface, run the ip address command. This configuration allows the interface to access a network. To connect an interface to several subnets, configure several IP addresses for the interface, one of which is the primary IP address and the others are secondary IP addresses. Each interface can have a maximum of one primary IP address and 255 secondary IP addresses configured.
Configuration Impact
Precautions