ip static

Syntax

ip static/no ip static/

Description

Assigns an IPv4 or IPv6 address to the management interface.

Thenoform 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), wherexis a decimal number from 0 to 255, or IPv6 format (xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx), wherexis a hexadecimal number from 0 to F.

指定一个IP的比特数v4 or IPv6 address mask in CIDR format (x), wherexis 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