Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dhcpd isn't working while it should
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
cz0
Apprentice
Apprentice


Joined: 13 Jun 2005
Posts: 280
Location: /earth/russia/moscow

PostPosted: Sat Nov 23, 2013 6:18 pm    Post subject: dhcpd isn't working while it should Reply with quote

Hi, folks.
I have some strange behavior with dhcpd-4.2.5. Here is my /etc/dhcp/dhcpd.conf
Code:

option domain-name "deep";
authoritative;

log-facility local7;

ddns-update-style none;

subnet 10.0.0.0 netmask 255.255.255.0 {
        range 10.0.0.8 10.0.0.16;
        default-lease-time 14400;
        max-lease-time 86400;
        option domain-name-servers 10.0.0.1;
        option routers 10.0.0.1;
        option ntp-servers 10.0.0.1;
        option broadcast-address 10.0.0.255;
}

subnet 10.0.1.0 netmask 255.255.255.0 {
        range 10.0.1.8 10.0.1.16;
        default-lease-time 3600;
        max-lease-time 7200;
        option domain-name-servers 10.0.1.1;
        option routers 10.0.1.1;
        option broadcast-address 10.0.1.255;
}


I have my 10.0.0.1/24 subnet up and running:
Code:

eth4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.0.1  netmask 255.255.255.0  broadcast 10.0.0.255
        ether 00:0e:04:b7:1b:9d  txqueuelen 1000  (Ethernet)
        RX packets 2410685  bytes 2188420214 (2.0 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3298697  bytes 3496109402 (3.2 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

And dhcpd listening on *:67
Code:

netstat -aupn
.
udp        0      0 0.0.0.0:67              0.0.0.0:*                           2988/dhcp
.


But, if I start dhcp client on the other puter, that connected to the same network, I get no address and timeouts:
Code:

dhcpcd --nobackground --noipv4ll --nohook resolv.conf --clientid="" eth0 test
dhcpcd[24671]: version 5.6.4 starting
dhcpcd[24671]: all: configured as a router, not a host
dhcpcd[24671]: test: interface not found or invalid
dhcpcd[24671]: eth0: broadcasting for a lease
dhcpcd[24671]: timed out

If I start tcpdump on dhcp server, I can see messages like this:
Code:

tcpdump -i eth4 -p udp 'port 67 or port 68'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth4, link-type EN10MB (Ethernet), capture size 65535 bytes
22:13:49.431244 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 90:e6:ba:f0:51:15 (oui Unknown), length 337
22:13:53.244226 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 90:e6:ba:f0:51:15 (oui Unknown), length 337
22:14:02.137926 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 90:e6:ba:f0:51:15 (oui Unknown), length 337

But no DHCPDESCOVER.
I have iptables running on that server, but AFAIR DHCP work under that, so no special rules needed. Any ideas?
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2365
Location: Kentucky

PostPosted: Sun Nov 24, 2013 4:24 am    Post subject: Reply with quote

If you are not facing anything threatening with the dhcp server, my first step would be to disable iptables and try again. If it works, then you need to make some rule changes; if it still doesn't work, then turn iptables back on.
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 441

PostPosted: Sun Nov 24, 2013 10:48 am    Post subject: Reply with quote

Have you tried making a pool for the dhcpd server to give ip addresses out of?
Or maybe try and add a fixed entry?
It could be ignoring unknown clients "allow unknown-clients;" is a option if you want to redirect these unasigned peers to a pool.
Back to top
View user's profile Send private message
cz0
Apprentice
Apprentice


Joined: 13 Jun 2005
Posts: 280
Location: /earth/russia/moscow

PostPosted: Sun Nov 24, 2013 9:19 pm    Post subject: Reply with quote

OK, I will try to disable iptables for beginning, but this is a little bit tricky just because it's a real router and that will disable all routing for other users behind it.

2 Maitreya: I have a fixed address for my workstation (by MAC), but that isn't working ether.
Back to top
View user's profile Send private message
cz0
Apprentice
Apprentice


Joined: 13 Jun 2005
Posts: 280
Location: /earth/russia/moscow

PostPosted: Sun Nov 24, 2013 9:24 pm    Post subject: Reply with quote

And another intersting thing I forgot about: that DHCP work fine for 10.0.1.0/24 (my local wifi net). I can connect with my droid cell phone, receiving 10.0.1.13.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum