This article will assist with Dynamic Host Configuration Protocol (DHCP) troubleshooting in a step-by-step approach with Juniper Networks EX Series switches.Note: This resolution guide is specific to devices with no support for Enhanced Layer 2 Software or ELS.
The DHCP features ease the concept of assigning IP addresses to the clients connected in a network.
Client does not receive IP address from the DHCP server.
Perform the following steps to troubleshoot DHCP issue with EX Series Ethernet switches:
Map out the network topology and identify the components.
Below are DHCP Network Topology examples.
Is the DHCP client connected to the DHCP Server with a DHCP Relay Agent?
Verify the DHCP Relay Agent configuration. A DHCP Relay Agent needs to be configured if the DHCP client and the DHCP Servers are connected in different broadcast domains.
Issue the following command to verify the relay agent configuration: root@switch> show configuration forwarding-options helpers { bootp { server 20.20.20.2; interface { vlan.20; } } } Verify the highlighted information from the output above: IP address of the DHCP server.VLAN Interface.
Issue the following command to verify the relay agent configuration:
root@switch> show configuration forwarding-options helpers { bootp { server 20.20.20.2; interface { vlan.20; } } }
Verify the highlighted information from the output above:
Is the DHCP Server an EX Series switch?
Verify the EX DHCP Server configuration and check if it has enough IP addresses to assign it to the client.
Multiple address pools can be configured for a DHCP server. The DHCP server dynamically distributes the IP address and configuration information such as gateway, subnet mask, host name, domain name, name servers, and time servers to the clients. Addresses in a pool are available to clients on the same subnet. DHCP maintains the state information for all pools configured. Clients are assigned addresses from pools with subnets that match the interface on which the DHCPDISCOVER packet is received. When more than one pool exists on the same interface, addresses are assigned on a rotating basis from all available pools. To verify the DHCP pool configuration, issue the following commands: root@switch>show configuration system services dhcp { pool 10.10.10.0/24 { address-range low 10.10.10.5 high 10.10.10.253; } pool 20.20.20.0/24 { address-range low 20.20.20.5 high 20.20.20.253; } } root@switch>show system services dhcp pool Pool name Low address High address Excluded addresses 10.0.0.0/24 10.10.10.5 10.10.10.253 20.0.0.0/24 20.20.20.5 20.20.20.253 To configure and verify DHCP operations on an EX switch, refer to the KB11386 - Configuring EX series switch as DHCP server. [juniper.net]
To verify the DHCP pool configuration, issue the following commands:
root@switch>show configuration system services dhcp { pool 10.10.10.0/24 { address-range low 10.10.10.5 high 10.10.10.253; } pool 20.20.20.0/24 { address-range low 20.20.20.5 high 20.20.20.253; } } root@switch>show system services dhcp pool Pool name Low address High address Excluded addresses 10.0.0.0/24 10.10.10.5 10.10.10.253 20.0.0.0/24 20.20.20.5 20.20.20.253
To configure and verify DHCP operations on an EX switch, refer to the KB11386 - Configuring EX series switch as DHCP server. [juniper.net]
Is the DHCP server configured correctly?
Yes - The DHCP Server configuration is correct and there are available IPs to be assigned to clients. Continue to Step 7.
No - The DHCP Server configuration is not correct. There are no available IPs to be assigned to clients. Correct the configuration. Increase the size of the pool or create a new pool.
Does the DHCP server have a route to the DHCP client network?
Is Port Security with DHCP Snooping and dynamic ARP inspection (DAI) being used?
Port security features such as DHCP snooping and DAI are configured to protect the switch and the Ethernet LAN against address spoofing and Layer 2 denial-of-service (DoS) attacks.Refer to the following link to configure and verify Port Security with DHCP Snooping, DAI, MAC Limiting, and MAC Move Limiting, on an EX-series Switch:
Run 'show dhcp snooping binding'. Do you see the MAC address of the client?
The command show dhcp snooping binding is issued to verify the assignment of the IP addresses by the DHCP server against the MAC addresses specified by the user for security reasons.
show dhcp snooping binding
Do a packet capture on the interfaces to analyze if the DORA process works. DORA PROCESS
show configuration system services dhcp show system services dhcp pool show system services dhcp binding show system services dhcp conflict show system services dhcp global show system services service-deployment
show configuration forwarding-options show helper statistics
request support information all-member | no-more show log messages
2017-08-22: Added note to clarify difference between Legacy DHCP (dhcpd) and Extended DHCP (jdhcpd)2020-04-15: Article reviewed for accuracy. No changes made. Article is correct and complete.2022-07-16: Corrected links and wordings, made sure to reference this is applicable to Legacy only.