You are not logged in.

#1 2012-04-26 22:54:14

Smarthound
Member
Registered: 2012-03-29
Posts: 23

[SOLVED] DHCP offered but not accepted

I have a PC and a laptop. The PC has IP 192.168.1.1 on eth1, with dnsmasq listening on it ready to serve DHCP.  The laptop has eth0. I connect from the laptop to the PC with

# netcfg wired-dhcp

I am tailing daemon.log on each computer, and can see the laptop broadcasting for a lease on eth0. I can also see on the PC that the broadcast was detected and an IP offered. However, ten seconds later, dhcpcd on the laptop times out. I've increased the timeout value to 30 seconds, and it still times out (they're connected right next to each other by a cable that's barely two metres long, it shouldn't take that length of time!).

On the laptop, /etc/network.d/wired-dhcp is a copy of netcfg's default example:

CONNECTION='ethernet'
DESCRIPTION='Wired DHCP'
INTERFACE='eth0'
IP='dhcp'

This is dnsmasq on the PC:

Apr 26 23:39:36 localhost dnsmasq-dhcp[1610]: 3410007854 available DHCP range: 192.168.1.2 -- 192.168.1.254
Apr 26 23:39:36 localhost dnsmasq-dhcp[1610]: 3410007854 client provides name: dropship
Apr 26 23:39:36 localhost dnsmasq-dhcp[1610]: 3410007854 vendor class: dhcpcd-5.5.6:Linux-3.3.2-1-ARCH:i686:GenuineIntel
Apr 26 23:39:36 localhost dnsmasq-dhcp[1610]: 3410007854 DHCPDISCOVER(eth1) 00:14:77:6b:67:75 
Apr 26 23:39:36 localhost dnsmasq-dhcp[1610]: 3410007854 tags: known, eth1
Apr 26 23:39:36 localhost dnsmasq-dhcp[1610]: 3410007854 DHCPOFFER(eth1) 192.168.1.50 00:14:77:6b:67:75 
Apr 26 23:39:36 localhost dnsmasq-dhcp[1610]: 3410007854 requested options: 1:netmask, 121:classless-static-route, 33:static-route, 
Apr 26 23:39:36 localhost dnsmasq-dhcp[1610]: 3410007854 requested options: 3:router, 6:dns-server, 12:hostname, 15:domain-name, 
Apr 26 23:39:36 localhost dnsmasq-dhcp[1610]: 3410007854 requested options: 26:mtu, 28:broadcast, 42:ntp-server, 51:lease-time, 
Apr 26 23:39:36 localhost dnsmasq-dhcp[1610]: 3410007854 requested options: 54:server-identifier, 58:T1, 59:T2, 119:domain-search
Apr 26 23:39:36 localhost dnsmasq-dhcp[1610]: 3410007854 next server: 192.168.1.1
Apr 26 23:39:36 localhost dnsmasq-dhcp[1610]: 3410007854 sent size:  1 option: 53 message-type  02
Apr 26 23:39:36 localhost dnsmasq-dhcp[1610]: 3410007854 sent size:  4 option: 54 server-identifier  192.168.1.1
Apr 26 23:39:36 localhost dnsmasq-dhcp[1610]: 3410007854 sent size:  4 option: 51 lease-time  ff:ff:ff:ff
Apr 26 23:39:36 localhost dnsmasq-dhcp[1610]: 3410007854 sent size:  4 option:  1 netmask  255.255.255.0
Apr 26 23:39:36 localhost dnsmasq-dhcp[1610]: 3410007854 sent size:  4 option: 28 broadcast  192.168.1.255
Apr 26 23:39:36 localhost dnsmasq-dhcp[1610]: 3410007854 sent size:  4 option:  3 router  192.168.1.1
Apr 26 23:39:36 localhost dnsmasq-dhcp[1610]: 3410007854 sent size:  4 option:  6 dns-server  192.168.1.1
Apr 26 23:39:36 localhost dnsmasq-dhcp[1610]: 3410007854 sent size:  8 option: 12 hostname  dropship
Apr 26 23:39:40 localhost dnsmasq-dhcp[1610]: 3410007854 available DHCP range: 192.168.1.2 -- 192.168.1.254
Apr 26 23:39:40 localhost dnsmasq-dhcp[1610]: 3410007854 client provides name: dropship
Apr 26 23:39:40 localhost dnsmasq-dhcp[1610]: 3410007854 vendor class: dhcpcd-5.5.6:Linux-3.3.2-1-ARCH:i686:GenuineIntel
Apr 26 23:39:40 localhost dnsmasq-dhcp[1610]: 3410007854 DHCPDISCOVER(eth1) 00:14:77:6b:67:75 
Apr 26 23:39:40 localhost dnsmasq-dhcp[1610]: 3410007854 tags: known, eth1
Apr 26 23:39:40 localhost dnsmasq-dhcp[1610]: 3410007854 DHCPOFFER(eth1) 192.168.1.50 00:14:77:6b:67:75 
Apr 26 23:39:40 localhost dnsmasq-dhcp[1610]: 3410007854 requested options: 1:netmask, 121:classless-static-route, 33:static-route, 
Apr 26 23:39:40 localhost dnsmasq-dhcp[1610]: 3410007854 requested options: 3:router, 6:dns-server, 12:hostname, 15:domain-name, 
Apr 26 23:39:40 localhost dnsmasq-dhcp[1610]: 3410007854 requested options: 26:mtu, 28:broadcast, 42:ntp-server, 51:lease-time, 
Apr 26 23:39:40 localhost dnsmasq-dhcp[1610]: 3410007854 requested options: 54:server-identifier, 58:T1, 59:T2, 119:domain-search
Apr 26 23:39:40 localhost dnsmasq-dhcp[1610]: 3410007854 next server: 192.168.1.1
Apr 26 23:39:40 localhost dnsmasq-dhcp[1610]: 3410007854 sent size:  1 option: 53 message-type  02
Apr 26 23:39:40 localhost dnsmasq-dhcp[1610]: 3410007854 sent size:  4 option: 54 server-identifier  192.168.1.1
Apr 26 23:39:40 localhost dnsmasq-dhcp[1610]: 3410007854 sent size:  4 option: 51 lease-time  ff:ff:ff:ff
Apr 26 23:39:40 localhost dnsmasq-dhcp[1610]: 3410007854 sent size:  4 option:  1 netmask  255.255.255.0
Apr 26 23:39:40 localhost dnsmasq-dhcp[1610]: 3410007854 sent size:  4 option: 28 broadcast  192.168.1.255
Apr 26 23:39:40 localhost dnsmasq-dhcp[1610]: 3410007854 sent size:  4 option:  3 router  192.168.1.1
Apr 26 23:39:40 localhost dnsmasq-dhcp[1610]: 3410007854 sent size:  4 option:  6 dns-server  192.168.1.1
Apr 26 23:39:40 localhost dnsmasq-dhcp[1610]: 3410007854 sent size:  8 option: 12 hostname  dropship

(I had already configured dnsmasq to serve 192.168.1.50 to the laptop's MAC address with the hostname 'dropship'.)

Could anyone suggest why the laptop isn't taking the IP from the dnsmasq?

Last edited by Smarthound (2012-04-28 21:57:16)

Offline

#2 2012-04-27 01:09:05

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,148

Re: [SOLVED] DHCP offered but not accepted

Does your network offer ip6? If not, have you tried disabling it on the laptop?

I ask because this sounds very like a problem I had connecting to my university network after ip6 got integrated into the kernel (so it was activated even though I though I'd blocked it). Disabling ip6 solved the problem.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2012-04-27 09:37:49

Smarthound
Member
Registered: 2012-03-29
Posts: 23

Re: [SOLVED] DHCP offered but not accepted

Neither offers IPv6. I disabled it in the kernel after following the General Recommendations page. However, I've just spotted this bit about dhcpcd trying to use it, regardless (though it does mention it's harmless). I'll disable that in dhcpcd.conf and give it another go.

Offline

#4 2012-04-27 20:42:13

Smarthound
Member
Registered: 2012-03-29
Posts: 23

Re: [SOLVED] DHCP offered but not accepted

Smarthound wrote:

I've just spotted this bit about dhcpcd trying to use it, regardless (though it does mention it's harmless). I'll disable that in dhcpcd.conf and give it another go.

That made no difference.

Offline

#5 2012-04-28 21:56:58

Smarthound
Member
Registered: 2012-03-29
Posts: 23

Re: [SOLVED] DHCP offered but not accepted

I found what the problem was. iplist by default was blocking some local network connections. I put

localnet:127.0.0.1-127.0.0.1
localnet:10.0.0.0-10.255.255.255
localnet:192.168.0.0-192.168.255.255

into one of its allow lists, restarted it, and viola, the connection worked.

Offline

Board footer

Powered by FluxBB