View previous topic :: View next topic |
Author |
Message |
saki n00b
Joined: 24 Aug 2002 Posts: 6
|
Posted: Sun Aug 25, 2002 4:23 pm Post subject: DHCP does not send hostname |
|
|
I am really sorry to ask two questions in two days - but I have searched the docs and archives and can't find an answer to this.
I have a home network using a DSL modem/router for DHCP and DNS. My main box is currently SuSE and when I tell it to use DHCP it gets an IP address from the router and communicates the hostname to the router. I can therefore ping that box from itself and from other boxes on the network. SuSE uses dhclient, which does not appear to be available under Gentoo - I don't know if this is relevant though.
My test installation of Gentoo is on a spare machine. I have /etc/hostname "foo" and /etc/conf.d/net has iface_eth0="dhcp" and gateway="10.0.0.138" (ie my router). DHCP works to the extent that an IP address is allocated, but the hostname is never communicated to the router. I can't ping "foo" and nor can other boxes on the network see it, - I just get "unknown host".
As it happens, the box in question in dual-boot Win 98. If I fire up Win 98 it sends the "foo" name to the modem/router and this persists if I then re-boot Gentoo.
So ... it seems that SuSE and Win98 communicate the hostname to the modem/router, but Gentoo does not. Am I missing something?
Sorry for the lengthy post .. maybe it should be in a different forum, but I am such a newbie at Gentoo that I thought I should start here.
Thanks,
Saki |
|
Back to top |
|
|
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Sun Aug 25, 2002 5:07 pm Post subject: Re: DHCP does not send hostname |
|
|
edit your /etc/conf.d/net file and look for the line similar to:
uncomment that line and change it to read:
Code: | dhcpcd_eth0="-h <yourhostname>" |
and that will pass the correct hostname to your router. man dhcpcd for more info.
--kurt _________________ The problem with political jokes is that they get elected |
|
Back to top |
|
|
saki n00b
Joined: 24 Aug 2002 Posts: 6
|
Posted: Sun Aug 25, 2002 6:28 pm Post subject: |
|
|
Thank-you Kurt.
I had, in fact, already read man dhcpcd and tried the -h <hostname> option, but it had not worked. However, when I tried it before I also used dhcpd -k to stop the daemon then restarted. After reading your post I decided to try again, and to reboot after editing /etc/conf.d/net. It seems that the reboot was necessary because it is working now. I suppose that there is some lower-level network restart command which I could have given to avoid the reboot - but I can work that out later.
Thanks again,
Saki |
|
Back to top |
|
|
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Sun Aug 25, 2002 6:34 pm Post subject: |
|
|
saki wrote: | I suppose that there is some lower-level network restart command which I could have given to avoid the reboot - but I can work that out later. |
You can use:
Code: | /etc/init.d/net.eth0 restart |
--kurt _________________ The problem with political jokes is that they get elected |
|
Back to top |
|
|
saki n00b
Joined: 24 Aug 2002 Posts: 6
|
Posted: Sun Aug 25, 2002 6:55 pm Post subject: |
|
|
Thanks ... two days into Gentoo and my education is proceeding nicely. Next task is to see if I can (1) install my old VMware 2.0.4 stuff and (2) set up a faxgetty and run Hylafax / SuSEfax. Watch this space .......
Regards,
Saki |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20589
|
Posted: Sun Aug 25, 2002 7:19 pm Post subject: |
|
|
saki wrote: | Next task is to see if I can (1) install my old VMware 2.0.4 stuff and (2) set up a faxgetty and run Hylafax / SuSEfax. Watch this space ....... | Actually, if you have problems not related to this thread topic, please give each problem a seperate thread in an appropriate forum. After you search for the answer first _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
saki n00b
Joined: 24 Aug 2002 Posts: 6
|
Posted: Sun Aug 25, 2002 7:31 pm Post subject: |
|
|
Understood .. I will, of course, observe the protocol. With a little luck I won't need to ask in any case.
Regards,
Saki |
|
Back to top |
|
|
|