Configuration Guide
410
Configuring DHCP
DHCP Client Configuration
2.2 Using the CLI
Follow these steps to configure DHCP client.
Step 1
configure
Enter global configuration mode.
Step 2
Enter interface configuration mode.
interface vlan
vid
Enter VLAN interface configuration mode.
vid:
Specify the VLAN ID.
interface gigabitEthernet
port
no switchport
Enter interface configuration mode and configure the port as a layer-3 routed port.
port:
Specify the port number.
interface port-channel
pid
no switchport
Enter port-channel configuration mode and configure the port-channel as a layer-3 port-
channel.
pid:
Specify the ID of the port-channel.
Step 3
ip address-alloc
{ dhcp | bootp }
Enable DHCP or BOOTP IP address mode.
dhcp
: The specified Layer 3 interface can request the DHCP server to dynamically assign IP
address and other network configuration parameters through DHCP mode.
bootp
: The specified Layer 3 interface can request the DHCP server to dynamically assign
IP address and other network configuration parameters through BOOTP mode.
Step 4
show ip interface brief
Verify the DHCP client configuration.
Step 5
end
Return to Privileged EXEC Mode.
Step 6
copy running-config startup-config
Save the settings in the configuration file.
The following example shows how to configure port 1/0/5 as an Layer 3 interface, and to
configure its IP address mode as DHCP:
Switch#configure