LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   dhcp fixed address not working (http://www.linuxquestions.org/questions/slackware-14/dhcp-fixed-address-not-working-812620/)

[GOD]Anck 06-07-2010 04:36 AM

dhcp fixed address not working
 
I have a slackware server running ISC dhcpd and bind, and I want to give a dual boot XP / Ubuntu client a fixed address based on its MAC. I added a host stanza to my server's dhcpd.conf:

Code:

host fixed {
hardware ethernet 00:1f:c6:88:8b:75;
fixed address 192.168.1.200;
}

I restarted bind and dhcpd, restarted the client's networking, and it still requests (and receives) its previously leased address, which is not the fixed address I want it to get. I tried dhclient -r to make the client release the old address, didn't help. On networking restart it still gets offered the old (wrong) address. Could it be that dhcpd somehow hangs on to the old lease even after the client sent a DHCPRELEASE?

How do I tell dhcpd to forget about an old lease, and how do I make dhcpd hand out the fixed address (and only that address) I specified for a given MAC, regardless of what the client requests?

bzyk 06-07-2010 04:52 AM

Did you restarted dhcpd?

Thom1b 06-07-2010 04:52 AM

Try :
Code:

host myslack { hardware ethernet 00:11:22:33:44:55; fixed-address 192.168.0.100; }

[GOD]Anck 06-07-2010 04:56 AM

Quote:

Originally Posted by bzyk (Post 3995159)
Did you restarted dhcpd?

I did, several times. I even tried deleting /var/state/dhcp/dhcp.leases and restarting with an empty leases file, but it still hands out the old address.

(Oh, I see I wrote bind where I meant dhcpd, thus the confusion. Yes, I did restart /usr/sbin/dhcpd as well as bind and all networking configuration)

Quote:

Originally Posted by Thom1b (Post 3995160)
Try :
Code:

host myslack { hardware ethernet 00:11:22:33:44:55; fixed-address 192.168.0.100; }

How is this different from what I have? Is it supposed to be all on one line?

bzyk 06-07-2010 05:15 AM

Hmm.. it's weird. show us all your dhcpd.conf (or your beginning dhcpd.conf with general rules).

Thom1b 06-07-2010 05:20 AM

Quote:

Originally Posted by [GOD]Anck (Post 3995165)
How is this different from what I have? Is it supposed to be all on one line?

It's not "fixed address 192.168.1.200" but "fixed-address 192.168.1.200"

[GOD]Anck 06-07-2010 05:25 AM

Quote:

Originally Posted by Thom1b (Post 3995179)
It's not "fixed address 192.168.1.200" but "fixed-address 192.168.1.200"

Ah, indeed it is.. and now it works. Silly little mistake. :doh:

Thanks!


All times are GMT -5. The time now is 01:35 AM.