Verifying a DHCP Configuration

To verify a DHCP configuration, perform the following tasks:

Displaying Global DHCP Information

Purpose

Verify the global DHCP Information

Action

From the CLI, enter the show system services dhcp global command.


user@host> show system services dhcp global
Global settings:
    	BOOTP lease length     	   infinite
  	DHCP lease times:
    	Default lease time         1 day
    	Minimum lease time         1 minute
    	Maximum lease time         infinite

	DHCP options:
    	Name: domain-name, Value: englab.juniper.net
    	Name: name-server, Value: [ 192.168.5.68, 172.17.28.101, 172.17.28.100 ]

Meaning

Verify that the output shows the intended global information of the DHCP server.

Related Topics

For complete descriptions of the show system services dhcp command and output, see the Junos System Basics and Services Command Reference.

Verifying the DHCP Binding Database

Purpose

Verify that the DHCP binding database reflects your DHCP server configuration

Action

From operational mode in the CLI, to display all active bindings in the database, enter the show system services dhcp binding command. To display more information about a client, including its DHCP options, enter the show system services dhcp binding address detail command, replacing address with the IP address of the client. Finally, enter the show system services dhcp conflict command.

The DHCP binding database resulting from the configuration defined in Table 41 is displayed in the following sample output.

Sample Output


user@host> show system services dhcp binding
IP Address   Hardware Address   Type          Lease expires at
30.1.1.20  00:12:1e:a9:7b:81  dynamic       2007-05-11 11:14:43 PDT

user@host> show system services dhcp binding 3.3.3.2 detail
    IP address           3.3.3.2
    Hardware address     00:a0:12:00:13:02
    Pool                 3.3.3.0/24
    Interface  fe-0/0/0, relayed by 3.3.3.200

Lease information:
    Type                 DHCP
    Obtained at          2004-05-02 13:01:42 PDT
    Expires at           2004-05-03 13:01:42 PDT
    State                active

DHCP options:
     Name: name-server, Value: { 6.6.6.6, 6.6.6.7 }
	 Name: domain-name, Value: mydomain.tld
    Code: 32, Type: ip-address, Value: 3.3.3.33

user@host> show system services dhcp conflict
Detection time Detection method Address
    2004-08-03 19:04:00 PDT ARP 3.3.3.5
    2004-08-04 04:23:12 PDT Ping 4.4.4.8
    2004-08-05 21:06:44 PDT Client 3.3.3.10

Meaning

Verify the following information:

Related Topics

For complete descriptions of the show system services dhcp command and output, see the Junos System Basics and Services Command Reference.

Verifying the DHCP Client

Purpose

Verify that the DHCP client information reflects your DHCP client configuration

Action

From operational mode in the CLI, to display DHCP client information, enter the show system services dhcp client command. To display more information about a specified interface, enter the show system services dhcp client interface-name command. Finally, enter the show system services dhcp client statistics command.

The DHCP client configuration resulting from the CLI configuration is displayed in the following sample output.

Sample Output


user@host> show system services dhcp client
Logical Interface Name   ge-0/0/1.0
			Hardware address 		00:0a:12:00:12:12
			Client Status			bound
			Vendor Identifier		ether
			Server Address			10.1.1.1
			Address obtained		10.1.1.89
			update server 			enables
			Lease Obtained at		2006-08-24 18:13:04 PST
			Lease Expires at		2006-08-25 18:13:04 PST

		DHCP Options:
			Name: name-server, Value: [ 10.209.194.131, 2.2.2.2, 3.3.3.3 ]
			Name: server-identifier, Value: 10.1.1.1
			Name: router, Value: [ 10.1.1.80 ]
			Name: domain-name, Value: netscreen-50


user@host> show system services dhcp client ge-0/0/1.0
Logical Interface Name   ge-0/0/1.0
			Hardware address 		00:12:1e:a9:7b:81
			Client Status			bound
			Address obtained		30.1.1.20
			update server 			enables
			Lease Obtained at		2007-05-10 18:16:04 PST
			Lease Expires at		2007-05-11 18:16:04 PST

		DHCP Options:
			Name: name-server, Value: [ 30.1.1.2 ]
			Code: 1, Type: ip-address, Value: 255.255.255.0
			Name: name-server, Value: [ 77.77.77.77, 55.55.55.55 ]
			Name: domain-name, Value: englab.juniper.net

user@host> show system services dhcp client statistics
Packets dropped:	
			Total				0
		Messages Received:	
			DHCPOFFER				0  
			DHCPACK 				8
			DHCPNAK 				0

		Messages Sent:
			DHCPDECLINE 			0
			DHCPDISCOVER 			0
			DHCPREQUEST 			1
			DHCPINFORM 				0
			DHCPRELEASE 			0
			DHCPRENEW 				7
			DHCPREBIND 				0

    

Meaning

Verify whether the DHCP client information reflects your DHCP client configuration.

Related Topics

For complete descriptions of the show system services dhcp client command and output, see the Junos OS CLI Reference.

Verifying DHCP Server Operation

Purpose

Verify that the DHCP server is operating as configured.

Action

Take the following actions:

Sample Output


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

Meaning

Verify the following:

Related Topics

For complete descriptions of the ping command and output, see the Junos System Basics and Services Command Reference.

Displaying DHCP Relay Statistics

Purpose

Display DHCP Relay statistics to verify normal operation.

Action

Enter the show system services dhcp relay-statistics command to display the DHCP relay statistics.

Sample Output


user@host> show system services dhcp relay—statistics
  Received Packets:				4 Forwarded Packets               4 Dropped Packets                 4     Due to missing interface in relay database: 4    	Due to missing matching routing instance: 0     Due to an error during packet read: 0     Due to an error during packet send: 0     Due to invalid server address: 0     Due to missing valid local address: 0     Due to missing route to server/client: 0 

Meaning

Verify the following:

Related Topics

For complete descriptions of the show system services dhcp relay-statistics command and output, see the Junos OS CLI Reference.