LinuxQuestions.org
Help answer threads with 0 replies.
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 08-29-2004, 01:33 PM   #1
pacde
LQ Newbie
 
Registered: Aug 2004
Location: Alberta Canada
Distribution: Suse 9.1
Posts: 14

Rep: Reputation: 0
Question Applications cant resolve IPAddr - Suggestions?


Im new to Suse but familiar with Unix and some RedHat.
I just installed SuSE9.1 Personal, I have ADSL modem and everything seemed to go fine. I have internet access and ifconfig returns:
eth0 Link encap:Ethernet HWaddr 00:11:2F:18:F0:33
inet addr:205.206.117.43 Bcast:205.206.119.255 Mask:255.255.248.0
inet6 addr: fe80::211:2fff:fe18:f033/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3145 errors:0 dropped:0 overruns:0 frame:0
TX packets:3509 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2263474 (2.1 Mb) TX bytes:548293 (535.4 Kb)
Interrupt:11 Base address:0xe800

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:324 errors:0 dropped:0 overruns:0 frame:0
TX packets:324 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22080 (21.5 Kb) TX bytes:22080 (21.5 Kb)

All this seems to be correct from what I can tell.

the problem:
if I run 'hostname -i' I get a hostname not found error. This is a real problem because any of my application programs that try to resolve the IPAddress fail.
Example: the line System.out.println( InetAddress.getLocalHost().getHostAddress()); throws an UnknownHostException.

What I know:
My provider returns d205.206.117.43 as the hostname and the Exception described above lists that as the unknown host. I think its trying to resolve my hostname into an IP address.
My /var/lib/dhcpcd/dhcpcd-eth0.info file reads as follows:
IPADDR=205.206.117.43
NETMASK=255.255.248.0
NETWORK=205.206.112.0
BROADCAST=205.206.119.255
GATEWAY=205.206.112.1
HOSTNAME='d205-206-117-43'
DOMAIN='ab.hsia.telus.net'
DNS=209.115.131.51,209.115.152.150,216.123.198.243,209.115.152.130
DHCPSID=209.115.152.149
DHCPGIADDR=66.222.224.1
DHCPSIADDR=209.115.152.149
DHCPCHADDR=00:11:2F:18:F0:33
DHCPSHADDR=00:90:1A:40F:24
DHCPSNAME=''
LEASETIME=345600
RENEWALTIME=172800
REBINDTIME=302400
INTERFACE='eth0'
CLASSID='Linux 2.6.4-52-default i686'
CLIENTID=00:11:2F:18:F0:33

What I need:
Help! I need suggestions and any experience you might be able to provide.
 
Old 08-29-2004, 01:41 PM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
just a small thought...possibly not working. but check out /etc/hosts it should contain ip/name pairs for the computers in the ethernet...
 
Old 08-29-2004, 06:08 PM   #3
pacde
LQ Newbie
 
Registered: Aug 2004
Location: Alberta Canada
Distribution: Suse 9.1
Posts: 14

Original Poster
Rep: Reputation: 0
Here is my /etc/hosts file. From what I understand its pretty normal.

127.0.0.1 localhost

# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
127.0.0.2 linux.site linux
 
Old 08-30-2004, 03:38 AM   #4
Joe Nayares
Member
 
Registered: Nov 2003
Location: california
Distribution: PCLinux OS
Posts: 48

Rep: Reputation: 15
Try running hostname <whatever you name your machine here>

for more info type " man hostname" and you'll find other options.
Joe
 
Old 08-30-2004, 04:15 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,318

Rep: Reputation: 1701Reputation: 1701Reputation: 1701Reputation: 1701Reputation: 1701Reputation: 1701Reputation: 1701Reputation: 1701Reputation: 1701Reputation: 1701Reputation: 1701
You must add the next line in /etc/hosts:
Code:
205.206.117.43 d205-206-117-43.ab.hsia.telus.net d205-206-117-43
 
Old 08-31-2004, 12:38 AM   #6
pacde
LQ Newbie
 
Registered: Aug 2004
Location: Alberta Canada
Distribution: Suse 9.1
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by bathory
You must add the next line in /etc/hosts:
Code:
205.206.117.43 d205-206-117-43.ab.hsia.telus.net d205-206-117-43
Wont this only give me a temporary fix? When my lease expires, what will happen? Now that I tried using dig and nslookup, I realize that its probably working correctly except its probing the name server with the short hostname and not the long one? I realize your solution would probably fix it today but what happens tomorrow when my DHCP server gives me a new lease?
 
Old 08-31-2004, 04:08 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,318

Rep: Reputation: 1701Reputation: 1701Reputation: 1701Reputation: 1701Reputation: 1701Reputation: 1701Reputation: 1701Reputation: 1701Reputation: 1701Reputation: 1701Reputation: 1701
I don't use dhcp so I can't help you any more, but I found this post which maybe help you.
 
Old 08-31-2004, 11:53 AM   #8
pacde
LQ Newbie
 
Registered: Aug 2004
Location: Alberta Canada
Distribution: Suse 9.1
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks, the link they list on there is a pretty good source and Ill give it a try.
 
  


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
Adding new applications to "Applications" menu scng Fedora 1 07-03-2005 01:02 AM
How to count amount of data btwn iface and IPAddr krizzz Linux - Networking 1 10-20-2004 08:11 PM
snmp staus shows it running but on trying MRTG, it shows public@ipaddr not giving res swati220781 Linux - Networking 3 07-08-2004 06:32 PM
Who is Knowing about daemon applications and how to develop these applications? ms_890 Linux - Software 0 04-14-2004 03:04 AM
Problem assigning class D IPADDR because of SIOCIFADDR: Invalid argument clu Slackware 3 02-01-2004 08:06 AM

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

All times are GMT -5. The time now is 10:54 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration