Examples
The following example acquires an IP address for the switch management interface from DHCP .
console(config)#ip address dhcp
The following examples configure the IP address 131.108.1.27 and subnet mask 255.255.255.0
and the same IP address with prefix length of 24 bits.
console(config)#ip address 131.108.1.27 255.255.255.0
console(config)#ip address 131.108.1.27 /24
ip address
Use the ip address command in Interface Configuration (out-of-band) mode to set a static out-
of-band port IP address or to enable DHCP as the serviceport configuration protocol on the
OOB port. Use the ip address none command to disable DHCP on the OOB port.
Syntax
ip address {dhcp|none|<ipaddr> {<
•
dhcp--Sets protocol to dhcp
•
none--No protocol is set
ipaddr — IP address to be set for the OOB port. (Range: Valid IP address)
•
mask — Subnet mask. (Range: Valid mask)
•
prefix-length — The number of bits that comprise the IP address prefix. The prefix length
•
must be preceded by a forward slash (/). (Range: 1-30)
gw — Gateway IP address. (Range: Valid gateway IP address)
•
Command Mode
Interface Configuration (out-of-band)
Default Configuration
The out-of-band interface obtains an IP address via DHCP by default.
User Guidelines
DHCP cannot be enabled on the management interface and the out-of-band interface at the
same time.
Example
console(config)#interface out-of-band
mask
prefix-length>
} [<gw>]}
|
IP Addressing Commands
297