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

Document

Jun 22, 2009 6:14 PM
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.


Average Rating: 4 (2 ratings)

Actions

Login or Register to take actions

This Document

Posted June 22, 2009 at 6:14 PM
Stats:
Comments:0 Avg. Rating:4
Views:3948 Contributors:0
Shares:0

Related Content

Documents Leaderboard

Rank Username Points
1 177
2 64
3 60
4 50
5 23
Rank Username Points
5
0