Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
Configuring a router Eth int or SVI to be a DHCP client
How to configure a router Ethernet interface or Switch Virtual Interface (SVI) to be a DHCP client?
This is especially useful on Ethernet interfaces which act as WAN interface that dynamically connects to an Internet Service Provider (ISP).
Once assigned a dynamic address, the interface can be used with the Port Address Translation (PAT) of Cisco IOS Network Address Translation (NAT) to provide Internet access to a privately-addressed network attached to the router.
The VLAN assigned to the router interface should accept the dynamic IP address.
To acquire an IP address on an interface from the Dynamic Host Configuration Protocol (DHCP), issue the ip address dhcp command in interface configuration mode.
This is usually configured on an Ethernet interface or Switch Virtual Interface (SVI) or interface VLAN.
Configure this on the VLAN interface:
#int vlan x
#ip address dhcp
Configure this on the Ethernet interface:
#interface Ethernet x
#ip address dhcpHere, x is the interface number.
Note: a default route will automatically be added by DHCP with metric of 254. If the default gateway is not supplied by the ISP, then add the following default route:
#ip route 0.0.0.0 0.0.0.0 dhcp
Example Configuring the DHCP Client
The figure below shows a simple network diagram of a DHCP client on an Ethernet LAN.
Topology Showing a DHCP Client with a Ethernet Interface
On the DHCP server, the configuration is as follows:
ip dhcp pool 1
network 10.1.1.0 255.255.255.0
lease 1 6
On the DHCP client, the configuration is as follows on interface E2:
ip address dhcp
This configuration allows the DHCP client to acquire an IP address from the DHCP server through an Ethernet interface.