Reference Guide
190 IP Addressing
console(config-if)# ip address
10.5.225.40 /27
Configure an IP address 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-6. Sample CLI Script to Configure IPv4 Dynamically on a VLAN
CLI Command Description
console#config Enter Global Configuration
mode.
console(config)# interface vlan 1 Enter VLAN mode for VLAN
1.
console(config-if)# no switchport Enable the port to work as an
IP interface (Layer 3 mode).
console(config-if)# ip address dhcp Use the DHCP protocol to
acquire the IP address.
console(config-if)# no ip address
dhcp
Remove the address (if
required).
Table 8-7. Sample CLI Script to Configure IPv4 Dynamically on a Port
CLI Command Description
console#config Enter Global Configuration
mode.
console(config)# interface vlan 1 Enter VLAN mode for VLAN
1.
console(config-if)# ip address dhcp Use the DHCP protocol to
acquire the IP address.
console(config-if)# no switchport Enable the port to work as an
IP interface (Layer 3 mode).
Table 8-5. Sample CLI Script to Configure IPv4 Statically on a Port
CLI Command Description










