LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-20-2005, 12:14 PM   #1
VinnySem
Member
 
Registered: Oct 2004
Distribution: SUSE 10.0 Pro/Debian 3.1
Posts: 38

Rep: Reputation: 15
DHCP Hostname in Debian 3.1


I have a Linksys WRT54G router. This router also functions as a DHCP server for following machines:

1) Windows 2000 server "SERVER"
2) Windows XP/SUSE 9.3 dual boot "TOWER" (same name in both OS's)
3) Debian 3.1 "LAPTOP"
4) Windows XP "KIDS"

The router's DHCP clients table lists all four, except the Debian entry does not show the hostname. I ran "hostname LAPTOP", I also put "hostname LAPTOP" in the eth0 listing in /etc/network/interfaces. To make sure the "TOWER" listing was also coming from SUSE 9.3, I deleted that entry from the DHCP clients table. The entry was restored when I booted into SUSE.

This client table also performs name resolution on the local LAN.

I've searched this and other forums, googled, I've not been able to find a resolution to this issue. Anyone have an idea how to fix this without ditching DHCP and using static IP and hosts files?

Thanks.
 
Old 07-20-2005, 12:40 PM   #2
mpeg4codec
Member
 
Registered: Jul 2005
Distribution: Debian, Gentoo, self-built [not LFS]
Posts: 109

Rep: Reputation: 15
dhclient doesn't support hostname

Debian's default DHCP client [dhclient] does not support the hostname option. Try installing dhcpcd, which will automatically remove dhclient and be used in its place.

Code:
apt-get install dhcpcd
Edit: Yes, dhcpcd does support the hostname option. Sorry, didn't make that very clear.

Last edited by mpeg4codec; 07-20-2005 at 12:41 PM.
 
Old 07-20-2005, 12:56 PM   #3
VinnySem
Member
 
Registered: Oct 2004
Distribution: SUSE 10.0 Pro/Debian 3.1
Posts: 38

Original Poster
Rep: Reputation: 15
Great, thanks very much, I'll try that as soon as I get home.
 
Old 07-20-2005, 07:22 PM   #4
VinnySem
Member
 
Registered: Oct 2004
Distribution: SUSE 10.0 Pro/Debian 3.1
Posts: 38

Original Poster
Rep: Reputation: 15
dhclient is not the DHCP client installed, dhcp-client is. not sure where to go from here
 
Old 07-20-2005, 07:29 PM   #5
VinnySem
Member
 
Registered: Oct 2004
Distribution: SUSE 10.0 Pro/Debian 3.1
Posts: 38

Original Poster
Rep: Reputation: 15
Fixed it

ran "apt-get install dhcpcd" which removed dhcp-client

Getting something working in linux is very gratifying.
 
Old 07-23-2005, 11:14 AM   #6
mpeg4codec
Member
 
Registered: Jul 2005
Distribution: Debian, Gentoo, self-built [not LFS]
Posts: 109

Rep: Reputation: 15
dhcp-client is the Debian package name for dhclient. And believe me, I know the feel of gratification. Congratulations.
 
Old 07-25-2005, 07:45 AM   #7
VinnySem
Member
 
Registered: Oct 2004
Distribution: SUSE 10.0 Pro/Debian 3.1
Posts: 38

Original Poster
Rep: Reputation: 15
Especially gratifying since I'm trying to configure this machine 100% GUI-less. Not even X installed.

OK, now I've got another issue.

The Linux machines cannot resolve the hostnames. From any of the Windows machines I can ping 'hostname' or telnet 'hostname', the names resolve without issue, even if the IP address changes.

Is my thinking correct in that this is related to the Windows setting "Enable NetBIOS over TCP/IP"? Is Samba involved in getting this operational on the Linux side? I've been Googling and RTFM'ing and I can't find a definitive answer.

Thanks again for all the help.
 
Old 07-25-2005, 11:54 PM   #8
mpeg4codec
Member
 
Registered: Jul 2005
Distribution: Debian, Gentoo, self-built [not LFS]
Posts: 109

Rep: Reputation: 15
Damn, I typed up a whole reply, previewed it, and forgot to hit post.. Anyway..

Basically, if I remember correctly, you need to run the winbind daemon and modify your /etc/nsswitch.conf. To install winbind, run apt-get install winbind. Once that is done, change the hosts line in /etc/nsswitch.conf to read:

hosts: files dns wins

Contrary to what it may seem, you don't have to run a WINS server to get name resolution going. However, running one could not possibly hurt at all. In fact, I recommend it for any network with more than just three or four computers.

I'm not surprised you haven't found this one, it's almost completely undocumented. And you're welcome. If you need anything, you can always PM me.
 
  


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
dhcp hostname ahz10 Linux - Networking 1 05-06-2005 03:40 PM
Get hostname from DHCP microft Linux - Networking 2 07-18-2004 03:31 PM
dhcp hostname .... phoeniXflame Linux - Networking 6 12-07-2003 11:12 AM
PB with DHCP and HostName jp515 *BSD 1 11-21-2003 04:57 AM
hostname changes with DHCP nathangg Linux - Networking 1 02-24-2003 07:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:48 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
Open Source Consulting | Domain Registration