LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 05-06-2009, 08:41 PM   #1
subdriver
LQ Newbie
 
Registered: Mar 2009
Location: Hertfordshire, UK
Distribution: Slitaz, Gentoo-Sparc64
Posts: 14

Rep: Reputation: 0
dhcpcd fails to use offered lease - SOLVED


I've had dhcpcd working correctly but then moved the HDD to another machine with the same hardware, initially eth0 didn't work as udev had renamed it because the MAC address was different; I've now edited the udev rules to reflect the new MAC address and removed the entry for the renamed NIC. Now eth0 starts up and dhcpcd shows that my DHCP sever offered a valid IP address but dhcpcd waits for a while then reverts to using a 169.xxx.xxx.xxx address as if it failed to contact the DHCP server; /var/log/messages shows:
dhcpcd [pid]: eth0: offered 192.168.0.199 from 192.168.0.1
dhcpcd [pid]: eth0: timed out
dhcpcd [pid]: eth0: probing for an IPV4LL address
dhcpcd [pid]: eth0: checking 169.254.242.112 is available on attached network
dhcpcd [pid]: eth0: using IPV4LL address 169.254.242.112

Any ideas?
The hardware is a Sun Ultra 10 and it's running Gentoo, kernel 2.6.29.gentoo-r1 in case it's relevant.

Last edited by subdriver; 05-10-2009 at 10:01 PM.
 
Old 05-07-2009, 12:48 PM   #2
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
Use tcpdump or wireshark to view the DHCP exchange, to see why it isn't completing..
 
Old 05-09-2009, 09:17 PM   #3
subdriver
LQ Newbie
 
Registered: Mar 2009
Location: Hertfordshire, UK
Distribution: Slitaz, Gentoo-Sparc64
Posts: 14

Original Poster
Rep: Reputation: 0
After wasting hours trying to get the floppy to work I gave up :-(
I manually configured the network (several times as I forgot to kill dhcpcd which was backgrounded) and used ssh to pull the logfile from tcpdump (the machine in question isn't running X and posting here using links is just too hard!)
This is the output generated when running dhcpcd:

00:47:16.179227 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 08:00:20:a2:f6:15 (oui Unknown), length 306
00:47:16.180712 ARP, Request who-has 192.168.0.199 tell 192.168.0.1, length 46
00:47:16.732062 IP 192.168.0.1.bootps > 192.168.0.199.bootpc: BOOTP/DHCP, Reply, length 303
00:47:16.733176 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 08:00:20:a2:f6:15 (oui Unknown), length 318
00:47:17.171606 ARP, Request who-has 192.168.0.199 tell 192.168.0.1, length 46
00:47:18.171708 ARP, Request who-has 192.168.0.199 tell 192.168.0.1, length 46
00:47:20.127414 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 08:00:20:a2:f6:15 (oui Unknown), length 318
00:47:27.795397 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 08:00:20:a2:f6:15 (oui Unknown), length 318
00:47:43.504414 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 08:00:20:a2:f6:15 (oui Unknown), length 318
00:47:46.192759 ARP, Request who-has 169.254.242.112 tell 0.0.0.0, length 28
00:47:48.057797 ARP, Request who-has 169.254.242.112 tell 0.0.0.0, length 28
00:47:49.507486 ARP, Request who-has 169.254.242.112 tell 0.0.0.0, length 28
00:47:53.605076 ARP, Request who-has 169.254.242.112 tell 169.254.242.112, length 28
00:47:55.607361 ARP, Request who-has 169.254.242.112 tell 169.254.242.112, length 28

192.168.0.1 is the router and dhcp server on my network, 08:00:20:a2:f6:15 is the MAC address of the machine I'm trying to get dhcpcd working on.
I'm not familiar enough with the protocol to figure out what's (not) going on but it seems that the machine is just ignoring the lease offer and requesting an address several more times. I'd be grateful for any insite or suggestions as to what to try next.

Last edited by subdriver; 05-09-2009 at 09:22 PM.
 
Old 05-10-2009, 08:03 PM   #4
subdriver
LQ Newbie
 
Registered: Mar 2009
Location: Hertfordshire, UK
Distribution: Slitaz, Gentoo-Sparc64
Posts: 14

Original Poster
Rep: Reputation: 0
Here's another tcpdump trace using -vvv option to get more detail:

00:53:49.914450 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 334)
0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 08:00:20:a2:f6:15 (oui Unknown), length 306, xid 0x5482b8bc, Flags [none] (0x0000)
Client-Ethernet-Address 08:00:20:a2:f6:15 (oui Unknown) [|bootp]
00:53:49.915847 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.198 tell 192.168.0.1, length 46
00:53:50.385405 IP (tos 0x10, ttl 16, id 0, offset 0, flags [none], proto UDP (17), length 331)
192.168.0.1.bootps > 192.168.0.198.bootpc: BOOTP/DHCP, Reply, length 303, xid 0x5482b8bc, Flags [none] (0x0000)
Your-IP 192.168.0.198
Server-IP 192.168.0.1
Client-Ethernet-Address 08:00:20:a2:f6:15 (oui Unknown) [|bootp]
00:53:50.403614 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 346)
0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 08:00:20:a2:f6:15 (oui Unknown), length 318, xid 0x5482b8bc, secs 1, Flags [none] (0x0000)
Client-Ethernet-Address 08:00:20:a2:f6:15 (oui Unknown) [|bootp]
00:53:50.914934 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.198 tell 192.168.0.1, length 46
00:53:51.915009 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.198 tell 192.168.0.1, length 46
00:53:55.086505 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 346)
0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 08:00:20:a2:f6:15 (oui Unknown), length 318, xid 0x5482b8bc, secs 5, Flags [none] (0x0000)
Client-Ethernet-Address 08:00:20:a2:f6:15 (oui Unknown) [|bootp]
00:54:02.677309 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 346)
0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 08:00:20:a2:f6:15 (oui Unknown), length 318, xid 0x5482b8bc, secs 13, Flags [none] (0x0000)
Client-Ethernet-Address 08:00:20:a2:f6:15 (oui Unknown) [|bootp]
00:54:18.802786 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 346)
0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 08:00:20:a2:f6:15 (oui Unknown), length 318, xid 0x5482b8bc, secs 29, Flags [none] (0x0000)
Client-Ethernet-Address 08:00:20:a2:f6:15 (oui Unknown) [|bootp]
00:54:19.924493 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 169.254.242.112 tell 0.0.0.0, length 28
00:54:21.789504 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 169.254.242.112 tell 0.0.0.0, length 28
00:54:23.751609 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 169.254.242.112 tell 0.0.0.0, length 28
00:54:27.847960 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 169.254.242.112 tell 169.254.242.112, length 28

The versions for the client and server are dhcpcd V4.0.12, dhcpd V3.0 rc12. The server version is pretty old so I'm going to try to update this.
 
Old 05-10-2009, 10:11 PM   #5
subdriver
LQ Newbie
 
Registered: Mar 2009
Location: Hertfordshire, UK
Distribution: Slitaz, Gentoo-Sparc64
Posts: 14

Original Poster
Rep: Reputation: 0
After trying to upgrade dhcpd I was getting messages about not being able to open the dhcpd.leases file on /var/db/ , I checked /var and found it empty and df showed it had a capacity of 0; I rebooted the server and found the HDD that /var was mounted on had died! After regressing dhcpd to the original version, modifying fstab to remove the mountpoint for /var then recreating /var , /var/lib/ , /var/lib/dhcp/ and touching /var/lib/dhcp/dhcpd.leases , I was able to start dhcpd and the client machine now correctly obtains an IP address.
 
Old 05-10-2009, 11:00 PM   #6
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
glad to see you found the source of the issue.. not quite what I was expecting though..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware 12.1: rc.inet1, dhcpcd and infinite lease times (bug?) El Nigromante Slackware 1 08-21-2008 11:20 AM
How to stop eth0 interface on boot before dhcpcd lease SentralOrigin Linux - Networking 3 04-18-2007 12:59 AM
What does dhcpcd do when it fails to lease an IP address? bulldozer Linux - Networking 2 11-26-2006 05:57 PM
dhcpcd not accepting offered ip address on 3c509b-tpo card Yukoner Slackware - Installation 4 06-14-2004 06:56 PM
DHCP client fails to renew lease NiPNi Linux - Networking 2 04-06-2002 07:01 PM


All times are GMT -5. The time now is 11:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration