ip static
Syntax
ip static / no ip static /
Description
Assigns an IPv4 or IPv6 address to the management interface.
Theno
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
-
-
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. -
-
指定一个IP的比特数v4 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 of198.51.100.1with a mask of24bits:
switch(config)#interface mgmtswitch(config-if-mgmt)#ip static 198.51.100.1/24
Setting an IPv6 address of2001:DB8::1with a mask of32bits:
switch(config)#interface mgmtswitch(config-if-mgmt)#ip static 2001:DB8::1/32