Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Configuring a router Eth int or SVI to be a DHCP client

Core issue

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:

#config t
#int vlan x
#ip address dhcp

Configure this on the Ethernet interface:

#config t
#interface Ethernet x
#ip address dhcp

Here, 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 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
 lease 1 6 

On the DHCP client, the configuration is as follows on interface E2:

interface Ethernet2
 ip address dhcp

This configuration allows the DHCP client to acquire an IP address from the DHCP server through an Ethernet interface.


Configuring the Cisco IOS DHCP Client

Version history
Revision #:
1 of 1
Last update:
‎06-22-2009 06:14 PM
Updated by:
Labels (1)