3

I installed a DHCP server (yum install dhcp) and this is my conf:

# create new
# specify domain name
option domain-name "mydomain.name";

# specify DNS's hostname or IP address
option domain-name-servers 10.0.1.1, 10.0.1.2;
option ntp-servers 10.0.1.1, 10.0.1.2;

allow unknown-clients;

# default lease time
default-lease-time 2628000;

# max lease time
max-lease-time 2628000; # about a month

# this DHCP server to be declared valid
authoritative;

# specify network address and subnet mask
subnet 10.0.0.0 netmask 255.0.0.0 {

        # specify the range of lease IP address
        range dynamic-bootp 10.0.2.1 10.0.2.50;

        # specify broadcast address
        option broadcast-address 10.255.255.255;

        # specify default gateway
        option routers 10.0.0.1;

        allow unknown-clients;

}

service dhcpd start reports [ OK ]. Yet, if I disable my other DHCP server (Win2k3) and get a client to try renewing its IP lease, it times out.

So I installed dhcping. No matter what options I try, including directing dhcping at my server, adding a client address in the range, adding my hardware address, it replies 'no answer'. I'm also trying -i since that seems to be more akin to what a WinXP client would try to do, based on /var/log/messages. It logs the attempts (from sudo dhcping -V -i -s 255.255.255.255 -c 10.0.2.15 -h 00:11:25:66:4e:7f here) as:

Oct 24 18:55:13 newdc dhcpd: DHCPINFORM from 10.0.2.15 via eth0
Oct 24 18:55:13 newdc dhcpd: DHCPACK to 10.0.2.15 (00:11:25:66:4e:7f) via eth0

Yet the client (running on the DHCP server) says:

setup
inform
packet 247 bytes
01 01 06 00 77 48 6a 52 00 00 00 00 0a 00 02 08 
00 00 00 00 00 00 00 00 00 00 00 00 00 1f 29 e1 
aa 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 63 82 53 63 
35 01 08 37 01 01 ff 
op: 1
htype: 1
hlen: 6
hops: 0
xid: 77486a52
secs: 0
flags: 0
ciaddr: 10.0.2.8
yiaddr: 0.0.0.0
siaddr: 0.0.0.0
giaddr: 0.0.0.0
chaddr: 00:1f:29:e1:aa:14:00:00:00:00:00:00:00:00:00:00
sname : .
fname : .
option 53 DHCP message type
        DHCP message type: 8 (DHCPINFORM)
option 55 
no answer
close

No answer? It sounds like it got sent out...

This is with /etc/sysconfig/dhcpd limiting to eth0 and iptables stopped.

Update: oddly enough, a WinXP client seems to have leased an IP successfully with this setup. Why does dhcping fail then, with or without -i? Kinda makes it useless as a testing tool...

Kev
  • 984
  • 4
  • 23
  • 46
  • You're doing this in VirtualBox?!? – Michael Hampton Oct 24 '13 at 23:05
  • @MichaelHampton, no, why do you ask? – Kev Oct 25 '13 at 00:30
  • 2
    Are you blocking any ports on the Linux-box (i.e. [UDP Ports 67 and 68](http://www.linklogger.com/UDP67_68.htm))? – Rik Oct 25 '13 at 09:36
  • @Rik, good call, +1! But even with iptables disabled, it still doesn't seem to work, 'no answer'. – Kev Oct 25 '13 at 10:24
  • On my C6 box, the DHCP server service is started with `service dhcpd start` (note the extra `d`). Have you confirmed the server is running (`ps auxww|grep dhcpd`), and if it's not, can you try that? – MadHatter Oct 25 '13 at 10:45
  • @MadHatter thanks, that was a typo in my question but not in what I actually did on the server. I confirmed with your method, but I mean, it wouldn't log DHCP requests in `/var/log/messages` if it wasn't running, right? – Kev Oct 25 '13 at 11:18
  • 2
    Wait, you're trying `dhcping` on the server itself? (It is intended for the workstation) But is `10.0.2.15` the ip-address of the server itself? Try `dhcping -V -i -s 255.255.255.255`. You should get `Got answer from: xxx` (and further `no answer`). But if your XP client gets a IP it works ok. – Rik Oct 25 '13 at 12:35
  • @Rik yes because I don't have a Linux workstation to test it on. You're right, when I try just with Vis 255, it works (although funnily enough, after saying `Got answer...` it still says `no answer` at the end!). I *had* tried that earlier, but that was before fixing iptables, so it hadn't worked at that point. I still don't quite understand why it doesn't answer with `-c` despite logging an attempt, but I'm glad it works 'the normal way'. Thanks! – Kev Oct 25 '13 at 12:56

0 Answers0