View previous topic :: View next topic |
Author |
Message |
OrangeToque n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/77887227444313d9e0dd92.jpg)
Joined: 03 Apr 2006 Posts: 57 Location: Edmonton, Alberta, Canada
|
Posted: Fri Sep 28, 2007 10:38 pm Post subject: dhcpcd not sending hostname with dhcp request <SOLVED> |
|
|
I have several gentoo boxes on my network, and they are all configured to receive a specific IP address based upon the hostname of the machine (sent by default with dhcpcd requests, as stated in /etic/network/net.example). This setup has worked great for over a year, however after a recent upgrade the machines have been receiving the wrong IP address from the DHCP server.
I have traced the problem to a recent upgrade from dhcpcd 3.0.16-r1 to 3.1, and have temporarily fixed the issue by either masking the latest version of dhcpcd and downgrading to the previous version, or configuring the script to use a different dhcp client (udhcpc).
Although this problem has been effectively solved, I was wondering if there is a way to solve this issue with the newest version of dchpcd? _________________ OS: Linux 2.6.24-gentoo-r3 x86_64 Gentoo v1.12.11.1 Sound: HDA Intel
CPU: Intel(R) Core(TM)2 Quad CPU Q6700 @ 2.66GHz GenuineIntel
Disk: 2x 300GB 7200.10 SATA II Video: GeForce 7900 GT RAM: 4GB
Last edited by OrangeToque on Wed Oct 03, 2007 5:22 am; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
thode n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Monkey Island/Monkey_Island_-_Monkey2.gif)
Joined: 19 Nov 2004 Posts: 13
|
Posted: Fri Sep 28, 2007 11:27 pm Post subject: |
|
|
Same experience here, same solution. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
thode n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Monkey Island/Monkey_Island_-_Monkey2.gif)
Joined: 19 Nov 2004 Posts: 13
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
thode n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Monkey Island/Monkey_Island_-_Monkey2.gif)
Joined: 19 Nov 2004 Posts: 13
|
Posted: Sun Sep 30, 2007 10:00 pm Post subject: |
|
|
I used the email address under contacts on your homepage, and attached the output file from wireshark.
I'll send a new one to the same address. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
thode n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Monkey Island/Monkey_Island_-_Monkey2.gif)
Joined: 19 Nov 2004 Posts: 13
|
Posted: Mon Oct 01, 2007 12:49 pm Post subject: |
|
|
done ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Sperlock n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 18 Sep 2004 Posts: 46 Location: Sparks, NV
|
Posted: Tue Oct 02, 2007 1:03 am Post subject: |
|
|
I think I may have also had this issue. I could connect to my router, but could not get to the Internet. The DHCP list on my router showed my laptop but not my desktop (though for whatever reason it now shows my desktop but not my laptop). I was afraid something happened to my NIC, but downgrading from dhcpcd 3.1.5 to 3.0.16-r1 fixed everything. Running x86 with an Intel DP965LT motherboard. _________________ http://informationthreshold.blogspot.com |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Tue Oct 02, 2007 5:55 pm Post subject: Re: dhcpcd not sending hostname with dhcp request |
|
|
OrangeToque wrote: | I have several gentoo boxes on my network, and they are all configured to receive a specific IP address based upon the hostname of the machine (sent by default with dhcpcd requests, as stated in /etic/network/net.example). This setup has worked great for over a year, however after a recent upgrade the machines have been receiving the wrong IP address from the DHCP server.
I have traced the problem to a recent upgrade from dhcpcd 3.0.16-r1 to 3.1, and have temporarily fixed the issue by either masking the latest version of dhcpcd and downgrading to the previous version, or configuring the script to use a different dhcp client (udhcpc).
Although this problem has been effectively solved, I was wondering if there is a way to solve this issue with the newest version of dchpcd? |
First, it's /etc/conf.d/net.example
Secondly, still expecting the trace.
Thirdly, sure it's not a server configuration issue? _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
thode n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Monkey Island/Monkey_Island_-_Monkey2.gif)
Joined: 19 Nov 2004 Posts: 13
|
Posted: Tue Oct 02, 2007 9:00 pm Post subject: |
|
|
I'm by no means an expert, but I'll try to elaborate a bit on what I've experienced:
I'm running my home network with a server set up to use dnsmasq, providing me dhcp and dns server functionality.
Int /etc/dnsmasq.conf it states:
Code: |
# Enable the address given for "judge" in /etc/hosts
# to be given to a machine presenting the name "judge" when
# it asks for a DHCP lease.
#dhcp-host=judge
|
What I've configured here is:
Code: |
dhcp-host=twilight
dhcp-host=aurora
|
That's it. Relevant section from the server's /etc/hosts:
Code: |
192.168.1.2 twilight.thode.lir.dk twilight
192.168.1.3 aurora.thode.lir.dk aurora
|
And naturally, hostname configurations on both machines are properly configured in their /etc/conf.d/hostname.
This is the only client specific configurations I've done on my server running dnsmasq.
It worked before 3.1.5
It doesn't now.
If this is not a problem relating to the newest dhcpcd, then what could be the cause of the problem?
Naturally, I could do the configuration to provide ip based on specific mac address, but both machines have several nic's, and I like how I'm able to connect them this way, regardless of nic, with a single configuration line pr. machine.
I'll post more of my configuration files, should it be needed.
Regards
Christian |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
OrangeToque n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/77887227444313d9e0dd92.jpg)
Joined: 03 Apr 2006 Posts: 57 Location: Edmonton, Alberta, Canada
|
Posted: Tue Oct 02, 2007 10:08 pm Post subject: |
|
|
Pretty much the exact same problem with my config. (dnsmasq + /etc/hosts)
works with udhcpc and dhcpcd < 3.15 but not with dhcpcd=3.15 _________________ OS: Linux 2.6.24-gentoo-r3 x86_64 Gentoo v1.12.11.1 Sound: HDA Intel
CPU: Intel(R) Core(TM)2 Quad CPU Q6700 @ 2.66GHz GenuineIntel
Disk: 2x 300GB 7200.10 SATA II Video: GeForce 7900 GT RAM: 4GB |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Tue Oct 02, 2007 11:01 pm Post subject: |
|
|
thode wrote: | If this is not a problem relating to the newest dhcpcd, then what could be the cause of the problem? |
A rough guess is because dhcpcd-3.1 sends an IAID+DUID for a ClientID whereas <dhcpcd-3.1 just sent a MAC address. Your server had already leased the address for "aurora" to the MAC address client ID and thus either a new one or no one to the IAID+DUID client ID.
As you can control the server, could you stop the server, punt the leases file, start it again and then restest dhcpcd? It should work fine then. _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
thode n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Monkey Island/Monkey_Island_-_Monkey2.gif)
Joined: 19 Nov 2004 Posts: 13
|
Posted: Tue Oct 02, 2007 11:26 pm Post subject: |
|
|
That did indeed resolve the problem
Thanks for the fast replies, and a very good description of the dhcp mechanics, it's always nice to get a deeper insight into what's going on! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Cypr n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 03 Jan 2005 Posts: 57
|
Posted: Thu Oct 04, 2007 6:18 am Post subject: |
|
|
I think I might have the same problem, except that the dhcp server is a Zonet router.
Before upgrading, the router said that the mac address of my computer was 00:0F:..., the same as ifconfig gives.
After upgrading to 3.1.5, the router says that the mac address of my computer is 65:74:.... (And complains about the address, when I try to set a static ip for it, and refuses.)
My computer is connected via a switch, in case that's relevant.
I don't understand what punting the leases file means (or what IAID/DUID means). I've tried unplugging the router (and plugging it in again), but that didn't help. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Thu Oct 04, 2007 6:59 am Post subject: |
|
|
Cypr wrote: | Before upgrading, the router said that the mac address of my computer was 00:0F:..., the same as ifconfig gives.
After upgrading to 3.1.5, the router says that the mac address of my computer is 65:74:.... (And complains about the address, when I try to set a static ip for it, and refuses.) |
See, your DHCP server *requires* the MAC address in the ClientID field.
Not only is this field *optional* as per all relevant RFCs, but you've never been required to put the MAC address in there either.
So what we have here is a buggy DHCP server
Quote: | I think I might have the same problem, except that the dhcp server is a Zonet router.
I don't understand what punting the leases file means (or what IAID/DUID means). I've tried unplugging the router (and plugging it in again), but that didn't help. |
So you can only upgrade the DHCP server by a firmware upgrade, which I won't recommend.
You can, however, revert dhcpcd to the old behaviour by using the -I ''
Code: | dhcpcd_eth0="-I ''" |
Like so.
Or emerge dhcpcd with the vram USE flag. _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Thu Oct 04, 2007 7:02 am Post subject: |
|
|
thode wrote: | That did indeed resolve the problem
Thanks for the fast replies, and a very good description of the dhcp mechanics, it's always nice to get a deeper insight into what's going on! |
Now you've fixed dhcpcd-3.1 and are using this new feature, let me explain one of the benefits.
You can swap the network card out and use a different one, or change the MAC address of the card your using because you already have your DUID. So you get the same ip address ![Smile :)](images/smiles/icon_smile.gif) _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Cypr n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 03 Jan 2005 Posts: 57
|
Posted: Thu Oct 04, 2007 5:56 pm Post subject: |
|
|
UberLord wrote: | Cypr wrote: | Before upgrading, the router said that the mac address of my computer was 00:0F:..., the same as ifconfig gives.
After upgrading to 3.1.5, the router says that the mac address of my computer is 65:74:.... (And complains about the address, when I try to set a static ip for it, and refuses.) |
See, your DHCP server *requires* the MAC address in the ClientID field.
Not only is this field *optional* as per all relevant RFCs, but you've never been required to put the MAC address in there either.
So what we have here is a buggy DHCP server |
Ok.
Quote: | Quote: | I think I might have the same problem, except that the dhcp server is a Zonet router.
I don't understand what punting the leases file means (or what IAID/DUID means). I've tried unplugging the router (and plugging it in again), but that didn't help. |
So you can only upgrade the DHCP server by a firmware upgrade, which I won't recommend.
You can, however, revert dhcpcd to the old behaviour by using the -I ''
Code: | dhcpcd_eth0="-I ''" |
Like so.
Or emerge dhcpcd with the vram USE flag. |
Thanks, adding dhcpcd_eth0="-I ''" to /etc/conf.d/net worked. (After re-reading your post and putting the exact right string in /etc/conf.d/net.) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
agent_jdh Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 08 Aug 2002 Posts: 1783 Location: Scotland
|
Posted: Fri Nov 23, 2007 1:09 am Post subject: |
|
|
I was having this problem as well, dual booting Gentoo/XP and connecting to my Gentoo server running dnsmasq. The modification to /etc/conf.d/net.eth0 appears to have fixed the problem here. Many thanks to all! This has had me scratching my head for a few days until I found this thread. _________________ Jingle Jangle Jewellery |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|