Which of the following commands allows a Cisco router to obtain an IP address from a DHCP server?

Which of the following commands allows a Cisco router to obtain an IP address from a DHCP server?

  • Router(config-if)# ip address dhcp
  • Router(config)# ip address dhcp
  • Router(dhcp-config)# ip address dhcp
  • Router(config)# address dhcp
  • Router(dhcp-config)# address dhcp
Explanation:
The ip address dhcp command when issued from interface configuration mode will allow a router to obtain an IP address for that interface from a DHCP server.

In this scenario, the router is acting as a DHCP client, not a server, so the command would not be issued from dhcp-config mode. In addition, the IP address is being assigned to an interface on the router, not the router as a whole so the command would not be entered at global config mode.

The most common situation in which a router interface might be set as a DHCP client is to enable one DHCP router to obtain configuration options from another router providing this service.

Consider an example where RouterA is connected to RouterB. RouterA contains a complete DHCP configuration including the options (DNS server, domain name). RouterB is connected to RouterA through its FastEthernet0 interface. The following configuration would allow RouterB to issue a different set of addresses than RouterA while importing the options from Router A. The configuration of RouterB is below as shown in the partial output of the show run command:

300-410 Part 05 Q13 065

300-410 Part 05 Q13 065

Note that for this configuration to function properly, the FastEthernet0 interface on RouterB must be set as a DHCP client.

The command router(config)# ip address dhcp is incorrect because it is executed at the global configuration prompt. The command must be executed in interface configuration mode.

The command router(dhcp-config)# ip address dhcp is incorrect because it is executed at the DHCP configuration prompt. The command must be executed in interface configuration mode.

The command router(config)# address dhcp is incorrect because it is missing the ip part of the command.

The command router(dhcp-config)# address dhcp is incorrect because it is missing the ip part of the command and it is executed at the DHCP configuration prompt. It must be executed in interface configuration mode.

Objective:
Layer 3 Technologies
Sub-Objective:
Identify, configure, and verify IPv4 addressing and subnetting

Leave a comment