ip address

This command configures an IP address on an interface or range of interfaces. You can also use this command to configure one or more secondary IP addresses on the interface. The command supports RFC 3021 and accepts using 31-bit prefixes on IPv4 point-to-point links. This command adds the label IP address in the command show ip interface.

Note

Note

The 31-bit subnet mask is only supported on routing interfaces. The feature is not supported on network port and service port interfaces because 200 Series acts as a host, not a router, on these management interfaces.
Format ip address ipaddr {subnetmask | /masklen} [secondary]
Mode Interface Config
Parameter Description
ipaddr The IP address of the interface.
subnetmask A 4-digit dotted-decimal number which represents the subnet mask of the interface.
masklen Implements RFC 3021. Using the / notation of the subnet mask, this is an integer that indicates the length of the subnet mask. Range is 5 to 32 bits.

The following example of the command shows the configuration of the subnet mask with an IP address in the dotted decimal format on interface 0/4/1.

(router1) #config
(router1) (Config)#interface 0/4/1
(router1) (Interface 0/4/1)#ip address 192.168.10.1 255.255.255.254

The next example of the command shows the configuration of the subnet mask with an IP address in the / notation on interface 0/4/1.

(router1) #config
(router1) (Config)#interface 0/4/1
(router1) (Interface 0/4/1)#ip address 192.168.10.1 /31