Home CCNA Configure Router as DHCPv4 Client: Instantly Get Dynamic IP (Updated 2025)
Cisco router configured as DHCPv4 client receiving IP 192.168.1.3/24 from server pool My-pool via Fa0/0 interface

Configure Router as DHCPv4 Client: Instantly Get Dynamic IP (Updated 2025)

In some cases, we need a router to be configured as DHCPv4 clients just like a client computer. But this method is not recommended for routers in an internal network. The dynamic addressing is extremely useful for routers that connect to the Internet through an ISP. We can simply connect a router using just the plug-in Ethernet cable. To configure an Ethernet interface as a DHCPv4 client, we use the ip address dhcp command in interface configuration mode.

When an interface on the router is configured with ip address dhcp command, it can dynamically learn its IP address and network mask via DHCP. The router can also learn its TFTP server address, NETBIOS name server, DNS servers, vendor-specific information, static routes, domain name, and default router information.

Configuration

The figure below contains the topology, including DHCPSERVER and Client. You may suppose that the DHCPSEVER is an ISP server configured to provide DHCP service to clients with IP addresses from the selection of 192.168.1.2 – 192.168.1.100.

After the Fa0/0 interface of the client, the router is configured with the ip address dhcp command. We can verify the configuration using the show ip interface fa0/0 command, which confirms that the interface is up and that the address was allocated by a DHCPv4 server. Now let’s come to the configuration:

A network diagram showing two Cisco 2811 routers connected by a straight line with green arrowheads pointing towards each other. The left router is labeled "2811 CLIENT" and the right router is labeled "2811 DHCPSERVER". Below the diagram, a green banner reads "Pool 192.168.1.1".

DHCP Server Configuration

DHCPSERVER> enable
DHCPSERVER# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
DHCPSERVER(config)# ip dhcp excluded-address 192.168.1.1
DHCPSERVER(config)# ip dhcp pool MY-POOL
DHCPSERVER(dhcp-config)# network 192.168.1.0 255.255.255.0
DHCPSERVER(dhcp-config)# default-router 192.168.1.1
DHCPSERVER(dhcp-config)# dns-server 8.8.8.8 8.8.4.4
DHCPSERVER(dhcp-config)# domain-name networkustad.com
DHCPSERVER(dhcp-config)# lease 0 12
DHCPSERVER(dhcp-config)# exit
DHCPSERVER(config)# interface FastEthernet0/0
DHCPSERVER(config-if)# ip address 192.168.1.1 255.255.255.0
DHCPSERVER(config-if)# no shutdown
DHCPSERVER(config-if)# exit
DHCPSERVER(config)# exit
DHCPSERVER# write memory
Building configuration...
[OK]
CommandPurpose
excluded-addressPrevents IP conflict with router
dns-serverProvides Google DNS to clients
domain-nameAppended to unqualified hostnames
lease 0 1212-hour lease (good for labs)

DHCP Client Configuration

Client> enable
Client# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Client(config)# interface FastEthernet0/0
Client(config-if)# ip address dhcp
Client(config-if)# no shutdown
Client(config-if)# end
Client# write memory
Building configuration...
[OK]

Note: The router sends a DHCP Discover → receives Offer → sends Request → gets ACK.

Verify DHCP Client Configuration

Now check and verify the address configuration using the show ip interface fa0/0 command. The figure below illustrates the output of this command.

Client# show ip interface FastEthernet0/0
FastEthernet0/0 is up, line protocol is up (connected)
  Internet address is 192.168.1.3/24
  Broadcast address is 255.255.255.255
  Address determined by DHCP
  MTU is 1500 bytes
  Helper address is not set
  Directed broadcast forwarding is disabled
  Outgoing access list is not set
  Inbound access list is not set
  Proxy ARP is enabled
  Security level default
  Split horizon is enabled
  ICMP redirects are always sent
  ICMP unreachables are always sent
  ICMP mask replies are never sent
  IP fast switching is enabled
  IP CEF switching is enabled
  IP Flow switching is disabled
  IP multicast fast switching is enabled
  IP multicast distributed fast switching is disabled
  IP route-cache flags are Fast, CEF
  Router Discovery is disabled
  IP output packet accounting is disabled
  IP access violation accounting is disabled
  TCP/IP header compression is disabled
  RTP/IP header compression is disabled
  Probe proxy name replies are disabled
  Policy routing is disabled
  Network address translation is disabled
  BGP Policy Mapping is disabled

View DHCP Lease Details

Client# show dhcp lease
Temp IP addr: 192.168.1.3  for peer on interface: FastEthernet0/0
Temp  sub net mask: 255.255.255.0
   DHCP Lease server: 192.168.1.1
   DHCP remaining lease time: 11:59:23
   Renewal (T1) time: 6:00:00, Rebind (T2) time: 10:30:00

Confirm Default Gateway

Client# show ip route | include Gateway
Gateway of last resort is 192.168.1.1 to network 0.0.0.0

Troubleshooting DHCPv4 Client Issues

SymptomCommandSolution
No IP assigneddebug ip dhcp clientCheck physical link, server reachability
Interface downshow ip interface briefRun no shutdown
Wrong subnetshow dhcp leaseVerify server pool matches network
Lease expiredshow clockForce renewal
Conflict detectedshow ip dhcp conflictClear with clear ip dhcp conflict *

Force Release & Renew

Client# release dhcp FastEthernet0/0
Client# renew dhcp FastEthernet0/0

DHCPv4 Client vs Static IP on Router

Featureip address dhcpStatic IP
Auto-configYesNo
ISP WANIdealManual setup
Internal LANNot recommendedPreferred
DNS/GatewayAuto-learnedManual config
CCNA FocusExam topicCore skill
ReliabilityDepends on serverAlways up

Use Case Examples:

  • Branch office WAN interface
  • SOHO router connected to cable/DSL modem
  • Lab testing (Packet Tracer, GNS3)
  • Temporary migration scenarios

CCNA Exam Tip: The ip address dhcp command is part of the IP Services domain in CCNA 200-301. You must know how to configure and verify it.

Warning: Not recommended for internal LAN-facing interfaces — use static IPs or configure the router as a DHCP server.

FAQs

What command configures a router interface as a DHCPv4 client?

Use ip address dhcp in interface configuration mode (e.g., interface fa0/0). The router sends DHCP Discover and receives IP, subnet mask, default gateway, and optional parameters like DNS from the server.

How do you verify a router received an IP via DHCP?

Run show ip interface [interface] (e.g., show ip interface fa0/0). Look for “Internet address is X.X.X.X/24” and “Address determined by DHCP” to confirm dynamic assignment and up/up status.

Can a Cisco router learn more than just an IP from DHCP?

Yes. With ip address dhcp, it can receive default gateway, DNS servers, domain name, TFTP server, NETBIOS, vendor-specific options, and even static routes from the DHCP server.

When should you configure a router as a DHCP client?

Best for Internet-facing (WAN) interfaces connecting to ISPs. Not recommended for internal LAN routers where static IPs ensure reliability and control over addressing.

What does the DHCP server need to exclude in the pool?

Exclude the router’s own IP (e.g., ip dhcp excluded-address 192.168.1.1) to prevent conflicts. Then define the pool with network, default-router, and other options.

🏆 Your Progress

Level 1
🔥 0 day streak
📚
0 Articles
0 Points
🔥
0 Current
🏅
0 Best Streak
Level Progress 0 pts to next level
🎖️ Achievements
🥉 Starter
🥈 Reader
🥇 Scholar
💎 Expert

More from CCNA

Articles tailored to your interests in CCNA

Forum