ip static
Syntax
ip static <IP-ADDR>/<MASK>
no ip static <IP-ADDR>/<MASK>
Description
Assigns an IPv4 or IPv6 address to the management interface.
The
no
form of this command removes the IP address from the management interface and sets the interface to operate as a DHCP client.
Command context
config-if-mgmt
Parameters
<IP-ADDR>
Specifies an IP address in IPv4 format (
x.x.x.x
), wherex
is a decimal number from 0 to 255, or IPv6 format (xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx
), wherex
is a hexadecimal number from 0 to F.<MASK>
Specifies the number of bits in an IPv4 or IPv6 address mask in CIDR format (
x
), wherex
is a decimal number from 0 to 32 for IPv4, and 0 to 128 for IPv6.
Authority
Administrators or local user group members with execution rights for this command.
Examples
Setting an IPv4 address of 198.51.100.1 with a mask of 24 bits:
switch(config)# interface mgmt switch(config-if-mgmt)# ip static 198.51.100.1/24
Setting an IPv6 address of 2001:DB8::1 with a mask of 32 bits:
switch(config)# interface mgmt switch(config-if-mgmt)# ip static 2001:DB8::1/32