Command Reference Guide
IP Routing Commands
CLI Command Reference
September 2014 Page 509
HP Moonshot Switch Module CLI Command Reference
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” on page 516.
Example: 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
Example: 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
no ip address
This command deletes an IP address from an interface. The value for ipaddr is the IP address of the interface
in a.b.c.d format where the range for a, b, c, and d is 1-255. The value for
subnetmask is a 4-digit dotted-decimal
number which represents the Subnet Mask of the interface. To remove all of the IP addresses (primary and
secondary) configured on the interface, enter the command
no ip address.
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 HP Moonshot Switch Module 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.
Format
no ip address [{ipaddr subnetmask [secondary]}]
Mode Interface Config