I'm running a gentoo box with one ethernet device that uses dhcp. Sometimes it'll work fine, but lately I've found that during boot it may refuse to start, giving me the error, "dhcpConfig: ioctl SIOCADDRT: File exists". This started happening after an unclean and ungraceful shutdown (although I believe I did manage to maintain filesystem integrity by using the SysRQ keys). For all I remember though, this could have begun after a packages update. A little research told me that this call is related to the routing table, but reemerging dhcpcd or the package that includes the route command didn't seem to help.

Normally, if the device doesn't get started on boot, I'm able to simply log in as root and manually run "/etc/init.d/net.eth0 start" and it'll work without a problem. At one point though, it got so bad that no amount of manual attempts would work - they would all generate the same ioctl SIOCADDRT error after a short timeout. I believe some combination of rebooting and deleting the cache files I found in /var/lib/dhcpcd helped; once again I'm able to start the interface manually, just not always automatically.

My router appears to be giving me an IP - here is the relevant section of /var/log/messages:

Code:
Sep 17 15:11:54 goliath eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
Sep 17 15:11:54 goliath dhcpcd[5906]: MAC address = 00:11:09:96:54:b9
Sep 17 15:11:54 goliath dhcpcd[5906]: verified 192.168.1.100 address is not in use
Sep 17 15:11:54 goliath dhcpcd[5906]: your IP address = 192.168.1.100
Sep 17 15:12:04 goliath dhcpcd[5906]: verified 192.168.1.100 address is not in use
Sep 17 15:12:04 goliath dhcpcd[5906]: dhcpConfig: ioctl SIOCADDRT: File exists
Sep 17 15:12:04 goliath dhcpcd[5906]: your IP address = 192.168.1.100
Sep 17 15:12:05 goliath eth0: no IPv6 routers present
Sep 17 15:12:14 goliath dhcpcd[5906]: timed out waiting for a valid DHCP server response
And later on, when I start eth0 as root:
Code:
Sep 17 15:12:30 goliath eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
Sep 17 15:12:30 goliath dhcpcd[7274]: MAC address = 00:11:09:96:54:b9
Sep 17 15:12:30 goliath dhcpcd[7274]: verified 192.168.1.100 address is not in use
Sep 17 15:12:30 goliath dhcpcd[7274]: your IP address = 192.168.1.100
Sep 17 15:12:40 goliath eth0: no IPv6 routers present
Generally, I'll always see in that log the IP address the router is supposed to be giving me (192.168.1.100 is reserved for this MAC), and a verification that it's not in use, but then the ioctl error message will appear, accompanied by a dhcp(cd) timeout.

During that one time when it was impossible for me to get an IP from my router, I was still able to receive one when I bypassed it and connected my machine directly into the wall (I'm on a university dorm network). My other gentoo box does not seem to have any problems connecting to this router, despite the fact that it consists of the exact same hardware and the same lower-level utilities packages.


Does anyone know what could cause this kind of intermittent error, why it would for the most part only appear at boot, and if there's anything else I should try reinstalling? Thanks.