To verify a DHCP server configuration, perform the following tasks:
Verify the configuration of a DHCP server.
From the J-Web interface, select Configuration>View and Edit>View Configuration Text. Alternatively, from configuration mode in the CLI, enter the show system services dhcp-server command from the top level.
You can also view the IP address pool from the CLI in operational mode by entering the show system services dhcp pool command.
- [edit]
- user@host# show system services dhcp-server
- pool 192.168.2.0/24 {
- address-range low 192.168.2.2 high 192.168.2.254;
-
- exclude-address {
- 192.168.2.33;
- }
- maximum-lease-time 2419200;
- default-lease-time 1209600;
-
- name-server {
- 192.168.10.2;
- }
-
- domain-search {
- mycompany.net;
- mylab.net;
- }
- option 16 ip-address 192.168.2.33;
- }
- static-binding 01.03.05.07.09.0b {
-
- fixed-address {
- 192.168.2.50;
- }
- }
Verify that the output shows the intended configuration of the DHCP server. For more information about the format of a configuration file, see the J-series Services Router Configuration Guide.
Verifying the DHCP Binding DatabaseVerify that the DHCP binding database reflects your DHCP server configuration.
From operational mode in the CLI, to display all active bindings in the database, enter the show system services dhcp binding command. To display all bindings in the database, including their current binding state, enter the show system services dhcp binding detail command. To display more information about a client, including its DHCP options, enter the show system services dhcp binding ip-address detail command, replacing ip-address with the IP address of the client.
The DHCP binding database resulting from the configuration defined in Configuring the DHCP Server with a Configuration Editor is displayed in the following sample output.
To clear the DHCP binding database, enter the clear system services dhcp binding command. To remove a specific entry from the DHCP binding database, enter the clear system services dhcp binding ip-address command, replacing ip-address with the IP address of the client.
user@host> show system services dhcp binding
IP Address Hardware Address Binding Type Lease Expires 192.168.2.2 02:04:06:08:0A:0C dynamic 2005-02-07 8:48:59 PDT 192.168.2.50 01:03:05:07:09:0B static never
user@host> show system services dhcp binding
192.168.2.2 detail
DHCP binding information:
IP address 192.168.2.2
Hardware address 02:04:06:08:0A:0C
Pool 192.168.2.0/24
Interface fe-0/0/0
Lease information:
Type dynamic
Obtained at 2005-01-24 8:48:59 PDT
Expires at 2005-02-07 8:48:59 PDT
DHCP options:
name-server 192.168.10.2
domain-name mycompany.net mylab.net
option 16 Ip address 192.168.2.33
user@host> show system services dhcp conflicts
Verify the following information:
Verify that the DHCP server is operating as configured.
Take the following actions:
user@host> ping 192.168.2.2
PING 192.168.2.2 (192.168.2.2): 56 data bytes 64 bytes from 192.168.2.2: icmp_seq=0 ttl=255 time=8.856 ms 64 bytes from 192.168.2.2: icmp_seq=1 ttl=255 time=11.543 ms 64 bytes from 192.168.2.2: icmp_seq=2 ttl=255 time=10.315 ms ...
C:\Documents and Settings\user> ipconfig /all
Windows 2000 IP Configuration
Host Name . . . . . . . . . . . . : my-pc
Primary DNS Suffix . . . . . . . : mycompany.net
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : mycompany.net
mylab.net
Ethernet adapter Local Area Connection 2:
Connection-specific DNS Suffix . : mycompany.net mylab.net
Description . . . . . . . . . . . : 10/100 LAN Fast Ethernet Card
Physical Address. . . . . . . . . : 02-04-06-08-0A-0C
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 192.168.2.2
Subnet Mask . . . . . . . . . . . : 255.255.254.0
Default Gateway . . . . . . . . . : 192.168.10.3
DHCP Server . . . . . . . . . . . : 192.168.2.1
DNS Servers . . . . . . . . . . . : 192.168.10.2
Primary WINS Server . . . . . . . : 192.168.10.4
Secondary WINS Server . . . . . . : 192.168.10.5
Lease Obtained. . . . . . . . . . : Monday, January 24, 2005 8:48:59 AM
Lease Expires . . . . . . . . . . : Monday, February 7, 2005 8:48:59 AM
Verify the following:
For information about using the J-Web interface to ping a host, see Using the J-Web Ping Host Tool. For more information about the ping command, see Using the ping Command or the JUNOS Protocols, Class of Service, and System Basics Command Reference.
The ipconfig command also displays other DHCP client settings that can be configured on the Services Router, including the client's hostname, default gateways, and WINS servers.
Display DHCP statistics, including lease times, packets dropped, and DHCP and BOOTP messages received and sent, to verify normal operation.
Enter the show system services dhcp statistics command to display the DHCP statistics.
user@host> show system services dhcp statistics
Default settings:
Default lease time 14 days
Minimum lease time 1 minute
Maximum lease time 28 days
BOOTP lease length 0 seconds
BOOTP lease cutoff unknown
Packets dropped:
Total 0
Bad hardware address 0
Bad opcode 0
Invalid server address 0
No available addresses 0
No interface match 0
No routing instance match 0
No valid local address 0
Packet too short 0
Read error 0
Send error 0
Messages received:
BOOTREQUEST 0
DHCPDECLINE 0
DHCPDISCOVER 0
DHCPINFORM 0
DHCPRELEASE 0
DHCPREQUEST 78
Messages sent:
BOOTREPLY 0
DHCPOFFER 0
DHCPACK 78
DHCPNAK 0
Verify the following: