Cisco CCNA (200-301)IP ServicesMedium
A network technician is troubleshooting a network connectivity issue. They suspect a device is not receiving an IP address from the DHCP server. Which command would the technician use on a Cisco switch to verify if the switch is configured as a DHCP server or DHCP relay agent?
- Ashow running-config | section dhcp
- Bshow ip interface brief
- Cshow ip dhcp binding
- Dshow ip dhcp pool
Show answer & explanationAnswer & explanation
Correct answer: A. show running-config | section dhcp
The 'show running-config | section dhcp' command displays all DHCP-related configurations in the running configuration, which will clearly show if the switch is configured as a DHCP server (e.g., 'ip dhcp pool...') or a DHCP relay agent (e.g., 'ip helper-address...').
Why the other options are wrong
- B. 'show ip interface brief' displays interface status and IP addresses, but not DHCP server/relay configuration.
- C. 'show ip dhcp binding' shows lease information for clients that have received addresses from a DHCP server on the device, implying it *is* a server, but doesn't show the configuration itself.
- D. 'show ip dhcp pool' specifically shows the details of configured DHCP pools, which confirms it's a DHCP server, but 'section dhcp' is more comprehensive for both server and relay roles.
Verifying DHCP Configuration
Commands used on Cisco devices to inspect the current DHCP server or relay agent settings.
- show running-config | section dhcp: comprehensive view of DHCP settings.
- show ip dhcp pool: displays details of configured DHCP address pools.
- show ip dhcp binding: shows active DHCP leases.
Memory trick: To know the DHCP role, look at the whole config script.