LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-29-2003, 05:09 AM   #1
deadlock
Member
 
Registered: Apr 2003
Distribution: Red Hat
Posts: 65

Rep: Reputation: 15
DHCP / hostname problem


I have just set up my work desktop as dual-boot Windows 2000 Redhat 8.0 and am experiencing a strange problem. Having a quick look around here I see no info about this...

When starting up in windows the machine is called DEV9 and registers on the network and receives an ip address of xxx.xxx.xxx.102 from the DHCP server and registers in the WINS listings with no problem.

The Linux setup is set up as LX9 as the hostname (Set under the DNS panel of redhat-config-network) and also gets its DNS information from the DHCP server. It receives an ip address and routing info OK (so can get onto the Internet and network) but gives an error :

"could not look up internet address for LX9..."

The LX9 name does not appear to register. /etc/hosts contains only:

127.0.0.1 localhost.localdomain localhost

but ifconfig lists eth0 and lo... from another machine I can ping by ip address, but not by hostname...

any solutions?

Cheers

Dan

 
Old 04-29-2003, 05:20 AM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
What do you have in /etc/resolv.conf - this should get rewritten by dhchpd when it sucessfully gets details of your name servers.

Having had a quick scan of the man page for dhcpcd it doesn't look like it contains an option to update a dns server. If your windows machine is dynamically updating the DNS then this would explian why DEV9 gets registered but LX9 doesn't.

What output do you get from hostname -f

cheers

Jamie...
 
Old 04-29-2003, 05:33 AM   #3
deadlock
Member
 
Registered: Apr 2003
Distribution: Red Hat
Posts: 65

Original Poster
Rep: Reputation: 15
Thanks,

Have managed to find a solution elsewhere, however I don't really understand it... By adding LX9 to the end of the definition of localhost in /etc/hosts (after a tab) things seem to have sorted themselves out.

Dunno why, but...

Dan
 
Old 04-29-2003, 06:10 AM   #4
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
When you attempt to lookup a an IP address from a name the system initially looks in /etc/hosts before asking the DNS server (this behaviour is controlled in /etc/nsswitch.conf). Whilst this fix will work locally it won't work remotely as LX9 if known as 127.0.0.1 which is the loopback address of the local machine. If no one needs to access your machine using the name LX9 then just keep going the way it is.

cheers

Jamie...
 
Old 04-29-2003, 06:44 AM   #5
deadlock
Member
 
Registered: Apr 2003
Distribution: Red Hat
Posts: 65

Original Poster
Rep: Reputation: 15
Cheers - think I understand that...

So what do I need to do to get the computer to be seen by the outside world?

Would changing the hostname to DEV9 sort things out?

Dan
 
Old 04-30-2003, 01:29 AM   #6
shahriars
LQ Newbie
 
Registered: Apr 2003
Posts: 22

Rep: Reputation: 15
checking the DHCP server

Dear Deadlock

in you msg you've mentioned that as windows it gets the X.X.X.102 IP -- which means that the DHCP server is providing a fixed IP for your MAC address (and hostname), don't you suppose that it should try the same for Linux as well? After all, changing the OS does not change the MAC information. So, could you please check if the DNS server is configured for LX9

Also, as for the DNS, since the DNS server is also the DHCP server, maybe you need seperate entries for DEV9 and LX9?

I too am a newbie, but this is what sounds logical in terms of DHCP to me.

Thanks.
 
  


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 Celestial Linux - Newbie 1 06-30-2004 06:50 PM
dhcp hostname .... phoeniXflame Linux - Networking 6 12-07-2003 11:12 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 05:59 AM.

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