Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

static ip's in dhcp

Status
Not open for further replies.

Wizumwalt

Programmer
Jul 12, 2005
10
I'm trying to get a switch on my network to get a specific ip, but even though I put the mac address in my /etc/dhcp/dhcpd.conf file as such ...

subnet 192.168.2.0 netmask 255.255.255.0 {
default-lease-time 86400;
max-lease-time 86400;

option routers 192.168.2.1;
option broadcast-address 192.168.2.255;
option subnet-mask 255.255.255.0;
option domain-name-servers aaa.bbb.ccc.ddd;
option domain-name "mydomain.us";

next-server 192.168.2.10;

group {
filename "pxelinux.0";

host mswitch { # my switch
hardware ethernet 00:60:dd:47:b7:d8;
fixed-address 192.168.2.5;
}
...

My switch still won't get the ip of 2.5. Here's the output of my messages. As you can see, my switch gets 2.2, but not the static ip of 2.5 and I don't understand why since it's not being used, it was offered (DHCPOFFER), and 2.2's lease seems to be unavailble (which I know it's not, no one has it). Or maybe I'm just not understanding the output correctly. I'm using isc's dhcp 3.0.3.

Any help much appreciated.

--- messages
Feb 5 13:10:54 master dhcpd: Wrote 0 deleted host decls to leases file.
Feb 5 13:10:54 master dhcpd: Wrote 0 new dynamic host decls to leases file.Feb 5 13:10:54 master dhcpd: Wrote 0 leases to leases file.

Feb 5 13:11:33 master dhcpd: DHCPDISCOVER from 00:60:dd:47:b7:d8 via eth0
Feb 5 13:11:33 master dhcpd: DHCPOFFER on 192.168.2.5 to 00:60:dd:47:b7:d8 via eth0
Feb 5 13:11:35 master dhcpd: DHCPREQUEST for 192.168.2.2 (192.168.2.1) from 00:60:dd:47:b7:d8 via eth0: lease 192.168.2.2 unavailable.
Feb 5 13:11:35 master dhcpd: DHCPNAK on 192.168.2.2 to 00:60:dd:47:b7:d8 via eth0
 
The server offered the switch 2.5, but the switch requested 2.2 in response. The server denied the request for 2.2.

Check the settings on your switch. It's acting like it cached 2.2 as its current DHCP lease and is just trying to renew it. If it was a workstation, you'd simply do a release/renew. You may have to set it to static at 2.5 and then power cycle it, then set it to dynamic. That might clear out that 2.2 address.

ShackDaddy
Shackelford Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top