Reference Guide
IP Addressing 189
The following are sample procedures to configure a static IPv4 address on an
interface using CLI and then to remove it:
show ip interface [interface-
id]
Displays the usability status of
interfaces configured for IP.
ip address dhcp
no ip address dhcp
Acquires an IP address from a DHCP
server).
Use the no form of this command to
release an acquired IP address.
Table 8-4. Sample CLI Script to Configure IPv4 Statically on a VLAN
CLI Command Description
console#config Enter Global Configuration
mode.
console(config)# interface vlan 1 Enter Interface mode for
VLAN 1.
console(config-if)# ip address
10.5.225.40 /27
Set the routing interface with
prefix length of 27.
console(config-if)# ip default-
gateway 10.5.225.33
Set the address of the default
gateway
console(config-if)# no ip address Remove the address (if
required).
Table 8-5. Sample CLI Script to Configure IPv4 Statically on a Port
CLI Command Description
console#config Enter Global Configuration
mode.
console(config)# interface gi0/1 Enter Interface mode for port
1.
console(config-if)# no switchport Enable the port to work as an
IP interface (Layer 3 mode).
Table 8-3. IPv4 Interface Parameters CLI Commands
(continued)
CLI Command Description










