LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 12-09-2004, 11:00 AM   #1
rudivk
LQ Newbie
 
Registered: Dec 2004
Posts: 4

Rep: Reputation: 0
Unable to resolve local hostname


Hi all,

I am having a very basic networking problem that I can't figure out.

The machine's hostname is 'bluespacedb' (as you can see from the shell output below) and I am using DHCP to get an ip address. As my DHCP server (an SMC barricade) is not doing DNS, I added the ip address and the hostname in /etc/hosts.

I could then ping the local machine, but the problem is that host does not work.

I verified that /etc/host.conf is set up to use the hosts file first. As far as i know that's all it takes to do dns lookups.

Any help is appreciated.

[root@bluespacedb etc]# hostname
bluespacedb

[root@bluespacedb etc]# more host.conf
order hosts,bind

[root@bluespacedb etc]# more hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.2.112 bluespacedb.localdomain bluespacedb
192.168.2.105 thunder
192.168.2.124 sonya

[root@bluespacedb etc]# ping -c 2 bluespacedb
PING bluespacedb (192.168.2.112) from 192.168.2.112 : 56(84) bytes of data.
64 bytes from bluespacedb (192.168.2.112): icmp_seq=0 ttl=255 time=241 usec
64 bytes from bluespacedb (192.168.2.112): icmp_seq=1 ttl=255 time=8 usec

--- bluespacedb ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/mdev = 0.008/0.124/0.241/0.117 ms

[root@bluespacedb etc]# host bluespacedb
Host bluespacedb. not found: 3(NXDOMAIN)

[root@bluespacedb etc]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0F:1F:F9:AE:BA
inet addr:192.168.2.112 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MTU:1500 Metric:1
RX packets:24194 errors:0 dropped:0 overruns:0 frame:0
TX packets:1429 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:1786725 (1.7 Mb) TX bytes:244139 (238.4 Kb)
Interrupt:53 Base address:0xdcc0 Memory:dfbe0000-dfc00000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:24 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1904 (1.8 Kb) TX bytes:1904 (1.8 Kb)
 
Old 12-09-2004, 04:44 PM   #2
hob
Senior Member
 
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
I think that "host" is specifically designed to use a DNS server (by default, the one listed in /etc/resolv.conf). If the ping command is resolving the name of the system correctly I wouldn't worry about it.
 
Old 12-09-2004, 05:41 PM   #3
k2merlinsix
Member
 
Registered: Dec 2004
Location: West Virginia
Distribution: Fedora
Posts: 35

Rep: Reputation: 15
have you placed your host name in /etc/sysconfig/network

HOSTNAME='bluespacedb'

also if you are running dhcp you need

/etc/sysconfig/network-scripts/ifcfg-eth0

DHCP_HOSTNAME='bluespacedb'

finally in /etc/dhclient-eth0.conf

send host-name "bluespacedb";

Hope this helps.
 
Old 12-10-2004, 02:35 AM   #4
rudivk
LQ Newbie
 
Registered: Dec 2004
Posts: 4

Original Poster
Rep: Reputation: 0
Not so sure if I need not worry about it. I ran into the problem while I was running oracle's database configuration assistant and it said: "Thrown when the IP address of host cannot be determined". I am assuming it is using the host command as that's the one that is not working.
 
Old 12-10-2004, 02:38 AM   #5
rudivk
LQ Newbie
 
Registered: Dec 2004
Posts: 4

Original Poster
Rep: Reputation: 0
Regarding /etc/sysconfig/netword and /etc/sysconfig/network-scripts/ifcfg-eth0:
I did found posts like that on several sites but I have no such directories. I am installing on RedHat Linux Advanced Server 2.1.
 
Old 12-10-2004, 05:03 AM   #6
hob
Senior Member
 
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
If you are running a test server, then why not use a static address and set up a DNS service on that system ?

Oracle is almost an operating system in it's own right...I wouldn't be suprised if they don't use the standard functions for lookups.
 
Old 12-10-2004, 07:37 AM   #7
rudivk
LQ Newbie
 
Registered: Dec 2004
Posts: 4

Original Poster
Rep: Reputation: 0
Ok, I managed to use static ip address and setup a dns server on the machine - thanks to my collegue Andrew ;-)

ping and host are now both working. Oracle has installed without the ackward "Thrown when the IP address of host cannot be determined" error.

Thank you all.

Rudi.
 
  


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
Unable to resolve hostname adirock2 Linux - Networking 14 07-06-2005 02:08 AM
Want Numeric IP of Web Server to resolve to hostname cyrusc Linux - Newbie 2 03-19-2005 02:54 PM
windows does not resolve linux hostname abrb220 Linux - Networking 6 05-18-2004 04:11 AM
Cannot resolve local addresses on local network danielgrenyer Linux - Networking 6 01-14-2004 11:03 AM
Cannot resolve hostname problem for IglooFTP smc_one Linux - Networking 0 08-18-2003 10:33 AM


All times are GMT -5. The time now is 10:33 PM.

Main Menu
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