How to configure a router Ethernet interface or Switch Virtual Interface (SVI) to be a DHCP client

Document

Mar 8, 2011 3:55 AM
Jun 22nd, 2009

Core issue

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.

Resolution

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.

This is an example:

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 0.0.0.0 0.0.0.0 dhcp

For additional information, refer to the Configuring the DHCP Client on Ethernet Interfaces section of Cisco IOS Dynamic Host Configuration Protocol Client.


Overall Rating: 4 (2 ratings)

Actions

Login or Register to take actions

This Document

Posted June 22, 2009 at 6:14 PM
Updated March 8, 2011 at 3:55 AM
Stats:
Comments:0 Overall Rating:4
Views:4312 Contributors:0
Shares:0

Related Content

 

Documents Leaderboard

Rank Username Points
1
TCC_2
244
2
Andrew Gossett
120
3
ashirkar
96
4
Adam Casella
79
5
SunilKhanna
75
Rank Username Points
TCC_2
1