# [SOLVED] dhcpcd ignores dhcp offers

## d0wn_under

I've just moved to cable modem from dialup adsl and linux can't get an IP from the network. Windows works fine, it sends out the dhcp requests, gets the offers back and assigns itself an ip. Linux sends out the requests, gets loads of offers back (watching with wireshark) but just ignores them.

I've tried starting dhcpcd with -d to get some debug but all I see is the MAC address it is using.

ifconfig after a dhcpcd attempt shows RX packets 7405, TX packets 22 so stuff is moving, no errors or dropped packets. I've also tried starting with -r to see if that helps, it didn't.

dhcpcd works fine getting an ip from my internal network.

Anyone any idea of how to fix it or what to look for next?

----------

## UberLord

What version of dhcpcd? If dhcpcd-2.x, try dhcpcd-3.x

----------

## beatryder

 *d0wn_under wrote:*   

> I've just moved to cable modem from dialup adsl and linux can't get an IP from the network. Windows works fine, it sends out the dhcp requests, gets the offers back and assigns itself an ip. Linux sends out the requests, gets loads of offers back (watching with wireshark) but just ignores them.
> 
> I've tried starting dhcpcd with -d to get some debug but all I see is the MAC address it is using.
> 
> ifconfig after a dhcpcd attempt shows RX packets 7405, TX packets 22 so stuff is moving, no errors or dropped packets. I've also tried starting with -r to see if that helps, it didn't.
> ...

 

I am seeing a very similar problem when trying to get on a CISCO network at school

See my logs, log logs log....

```

Mar 28 19:22:14 Lisa dhcpcd[13189]: eth1: dhcpcd 3.0.16 starting

Mar 28 19:22:14 Lisa dhcpcd[13189]: eth1: hardware address = 00:13:02:c1:f5:d4

Mar 28 19:22:14 Lisa dhcpcd[13189]: eth1: broadcasting for a lease

Mar 28 19:22:14 Lisa dhcpcd[13189]: eth1: sending DHCP_DISCOVER with xid 502563581

Mar 28 19:22:14 Lisa dhcpcd[13189]: eth1: waiting on select for 6000 seconds

Mar 28 19:22:17 Lisa dhcpcd[13189]: eth1: sending DHCP_DISCOVER with xid 502563581

Mar 28 19:22:20 Lisa dhcpcd[13189]: eth1: sending DHCP_DISCOVER with xid 502563581

Mar 28 19:22:23 Lisa dhcpcd[13189]: eth1: sending DHCP_DISCOVER with xid 502563581

Mar 28 19:22:26 Lisa dhcpcd[13189]: eth1: sending DHCP_DISCOVER with xid 502563581

Mar 28 19:22:29 Lisa dhcpcd[13189]: eth1: sending DHCP_DISCOVER with xid 502563581

Mar 28 19:22:32 Lisa dhcpcd[13189]: eth1: sending DHCP_DISCOVER with xid 502563581

Mar 28 19:22:35 Lisa dhcpcd[13189]: eth1: sending DHCP_DISCOVER with xid 502563581

Mar 28 19:22:38 Lisa dhcpcd[13189]: eth1: sending DHCP_DISCOVER with xid 502563581

Mar 28 19:22:41 Lisa dhcpcd[13189]: eth1: sending DHCP_DISCOVER with xid 502563581

Mar 28 19:22:44 Lisa dhcpcd[13189]: eth1: sending DHCP_DISCOVER with xid 502563581

Mar 28 19:22:47 Lisa dhcpcd[13189]: eth1: sending DHCP_DISCOVER with xid 502563581

Mar 28 19:22:50 Lisa dhcpcd[13189]: eth1: sending DHCP_DISCOVER with xid 502563581

Mar 28 19:22:53 Lisa dhcpcd[13189]: eth1: sending DHCP_DISCOVER with xid 502563581

Mar 28 19:22:54 Lisa dhcpcd[13189]: eth1: got a packet with xid 502563581

Mar 28 19:22:54 Lisa dhcpcd[13189]: eth1: offered 10.60.250.238 from 1.1.1.1

Mar 28 19:22:54 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:22:54 Lisa dhcpcd[13189]: eth1: waiting on select for 5960 seconds

Mar 28 19:22:57 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:23:00 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:23:03 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:23:03 Lisa dhcpcd[13189]: eth1: got a packet with xid 502563581

Mar 28 19:23:03 Lisa dhcpcd[13189]: eth1: got subsequent offer of 10.60.250.238, ignoring

Mar 28 19:23:03 Lisa dhcpcd[13189]: eth1: waiting on select for 5951 seconds

Mar 28 19:23:06 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:23:09 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:23:12 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:23:12 Lisa dhcpcd[13189]: eth1: got a packet with xid 502563581

Mar 28 19:23:12 Lisa dhcpcd[13189]: eth1: got subsequent offer of 10.60.250.238, ignoring

Mar 28 19:23:12 Lisa dhcpcd[13189]: eth1: waiting on select for 5942 seconds

Mar 28 19:23:15 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:23:18 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:23:21 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:23:21 Lisa dhcpcd[13189]: eth1: got a packet with xid 502563581

Mar 28 19:23:21 Lisa dhcpcd[13189]: eth1: got subsequent offer of 10.60.250.238, ignoring

Mar 28 19:23:21 Lisa dhcpcd[13189]: eth1: waiting on select for 5933 seconds

Mar 28 19:23:24 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:23:27 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:23:30 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:23:30 Lisa dhcpcd[13189]: eth1: got a packet with xid 502563581

Mar 28 19:23:30 Lisa dhcpcd[13189]: eth1: got subsequent offer of 10.60.250.238, ignoring

Mar 28 19:23:30 Lisa dhcpcd[13189]: eth1: waiting on select for 5923 seconds

Mar 28 19:23:33 Lisa dhcpcd[13189]: eth1: got a packet with xid 502563581

Mar 28 19:23:33 Lisa dhcpcd[13189]: eth1: got subsequent offer of 10.60.250.238, ignoring

Mar 28 19:23:33 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:23:33 Lisa dhcpcd[13189]: eth1: waiting on select for 5920 seconds

Mar 28 19:23:36 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:23:36 Lisa dhcpcd[13189]: eth1: got a packet with xid 502563581

Mar 28 19:23:36 Lisa dhcpcd[13189]: eth1: got subsequent offer of 10.60.250.238, ignoring

Mar 28 19:23:36 Lisa dhcpcd[13189]: eth1: waiting on select for 5917 seconds

Mar 28 19:23:39 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:23:40 Lisa dhcpcd[13189]: eth1: got a packet with xid 502563581

Mar 28 19:23:40 Lisa dhcpcd[13189]: eth1: got subsequent offer of 10.60.250.238, ignoring

Mar 28 19:23:40 Lisa dhcpcd[13189]: eth1: waiting on select for 5914 seconds

Mar 28 19:23:43 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:23:46 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:23:49 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:23:49 Lisa dhcpcd[13189]: eth1: got a packet with xid 502563581

Mar 28 19:23:49 Lisa dhcpcd[13189]: eth1: got subsequent offer of 10.60.250.238, ignoring

Mar 28 19:23:49 Lisa dhcpcd[13189]: eth1: waiting on select for 5905 seconds

Mar 28 19:23:52 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:23:55 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:23:58 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:24:01 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:24:01 Lisa dhcpcd[13189]: eth1: got a packet with xid 502563581

Mar 28 19:24:01 Lisa dhcpcd[13189]: eth1: got subsequent offer of 10.60.250.238, ignoring

Mar 28 19:24:01 Lisa dhcpcd[13189]: eth1: waiting on select for 5893 seconds

Mar 28 19:24:01 Lisa dhcpcd[13189]: eth1: got a packet with xid 502563581

Mar 28 19:24:01 Lisa dhcpcd[13189]: eth1: got subsequent offer of 10.60.250.238, ignoring

Mar 28 19:24:01 Lisa dhcpcd[13189]: eth1: waiting on select for 5893 seconds

Mar 28 19:24:04 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:24:07 Lisa dhcpcd[13189]: eth1: sending DHCP_REQUEST with xid 502563581

Mar 28 19:24:07 Lisa dhcpcd[13189]: eth1: got a packet with xid 502563581

Mar 28 19:24:07 Lisa dhcpcd[13189]: eth1: leased 10.60.250.238 for 21600 seconds

Mar 28 19:24:07 Lisa dhcpcd[13189]: eth1: renew in 10800 seconds

Mar 28 19:24:07 Lisa dhcpcd[13189]: eth1: rebind in 18900 seconds

Mar 28 19:24:07 Lisa dhcpcd[13189]: eth1: adding IP address 10.60.250.238/16

Mar 28 19:24:07 Lisa dhcpcd[13189]: eth1: adding route to 10.60.0.0 (255.255.0.0) via 0.0.0.0 metric 2000

Mar 28 19:24:07 Lisa dhcpcd[13189]: eth1: removing route to 10.60.0.0 (255.255.0.0) via 0.0.0.0 metric 0

Mar 28 19:24:07 Lisa dhcpcd[13189]: eth1: adding default route via 10.60.254.254 metric 2000

Mar 28 19:24:07 Lisa dhcpcd[13189]: eth1: sending DNS information to resolvconf

Mar 28 19:24:07 Lisa dhcpcd[13189]: eth1: ntp already configured, skipping

Mar 28 19:24:07 Lisa dhcpcd[13189]: eth1: writing /var/lib/dhcpcd/dhcpcd-eth1.info

Mar 28 19:24:07 Lisa dhcpcd[13189]: eth1: forking to background

Mar 28 19:24:07 Lisa dhcpcd[13301]: eth1: waiting on select for 10800 seconds

Mar 28 19:24:07 Lisa dhcpcd[13301]: eth1: waiting on select for 10800 seconds

```

```

RC_NEED_eth1=("ipw3945d")

#config_eth1=( "dhcp -d -h `hostname`" )

modules_eth1=( "wpa_supplicant" "dhcpcd" )

wpa_supplicant_eth1="-Dwext"

dhcpcd_eth1="-t 6000 -d "

```

I am running dhcpcd v 3.0.16

----------

## d0wn_under

I haven't had that much logging but I agree that it looks similar. I've just tried the latest knoppix and that has the same results.

I'm about to try freebsd, see if it is something in the linux implementation of the dhcp client.

----------

## UberLord

Those logs show that dhcpcd is working fine, just the DHCP server is a little slow.

FreeBSD (vanilla) uses dhclient, which is not the same same dhcpcd AT ALL. Would be better to use the same dhcp client on both platforms

Luckily, dhcpcd works on FreeBSD a well. Very easily using Gentoo/FreeBSD as our scripts support it. On vanilla FreeBSD you'll have to start/stop dhcpcd by hand.

----------

## d0wn_under

It appears that it is to do with MAC addresses.

I tried booting the windows laptop into linux and it got an IP so I tried the normal desktop (the one I had problems with) with the MAC address from the laptop. It worked!

Looks like the cable company has locked onto the first MAC address saw.

I'm not sure now whether to try to stay off line till the lease expires and then try with a different MAC to see if that one works or whether just to start changing MACs. I'd rather not change them as that would give me to NICs with the same MAC although they would be on different networks so I could get away with it.

----------

