DHCP Reserved Address from NetScreen Firewall

A Juniper Networks NetScreen firewall/router can be configured to function as a DHCP server; for the method to do so from a command line interface (CLI), which you can obtain by a Secure Shell (SSH) connection to the device, see Using a Juniper Networks NetScreen Firewall as a DHCP Server. The system can assign addresses dynamically from a pool of addresses you select or you can have it assign a reserved, i.e., fixed, address based on the media access control (MAC) address of the system requesting a DHCP-assigned IP address.

You can determine what addresses have already been assigned to systems via DHCP using a command in the form get interface <interface> dhcp server ip allocate where interface is a particular interface, e.g., trust, untrust, etc.

ns5xp-> get interface trust dhcp server ip allocate
       IP         	State	     MAC     	Lease Time
 192.168.0.34   	COMMIT	*000d560e185e	3236 minutes
 192.168.0.35   	COMMIT	*4c72b99cb82a	3925 minutes
ns5xp->

If I wished to assign the IP address 192.168.0.7 to the system above with MAC address 4c72b99cb82a, I could use the command below:

set interface trust dhcp server ip 192.168.0.7 mac 4c72b99cb82a

You can see the range of the address pool from which dynamically assigned addresses will be given and any reserved addresses that will be assigned based on the MAC address of the requesting system using the command get interface <interface> dhcp server option.

ns5xp-> get interface trust dhcp server option
DHCP Server Options:
	Lease:		3 days 0 hours 0 minutes
	IP Range:	192.168.0.33 - 192.168.0.126
			192.168.0.7 (mac 4c72.b99c.b82a)
	Netmask:	255.255.255.0  
	Gateway:	192.168.0.1    
	Domain Name:	
	DNS:		192.168.0.17    192.168.176.27  0.0.0.0        
	WINS:		0.0.0.0         0.0.0.0        
	SMTP:		0.0.0.0        
	POP3:		0.0.0.0        
	NEWS:		0.0.0.0        
	NetInfo:	0.0.0.0         0.0.0.0         
ns5xp->

On a Microsoft Windows system, you can force the system to request a new IP address with ipconfig /renew. On a Linux system, you can force a request for a new IP address by running the commands below from a root account.

#dhclient -r
# dhclient

Issuing the dhclient with the -r option forces a release of the current IP address. Issuing the dhclient with no options forces a DHCP query for a new IP address. If you are using a Ubuntu Linux system, you will need to prefix both commands with the sudo command. E.g.:

$ sudo dhclient -r
$ sudo dhclient

Related Articles:

Using dhclient to locate DHCP Servers on a LAN

 

TechRabbit ad 300x250 newegg.com

Justdeals Daily Electronics Deals1x1 px