LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 02-28-2006, 11:25 AM   #1
mrbabis
LQ Newbie
 
Registered: Jul 2005
Posts: 20

Rep: Reputation: 0
Question can ping ip but not hostname


Hi.

ehh...

I can ping IP's but not host names.
I traid to relseas and update IP few times with dhclient, but not got any good results.

IP chages often becouse I changing routers and IP's, not know if it is depends on it.
ClamAV cannot get updates too :'(


===My-OS's===
Linux TSL/Trustix
Installed:
samba, apache, openssh, proftpd,
no firewall/ClamAV
-
WinXP SP2
no firewall/AV
 
Old 02-28-2006, 11:28 AM   #2
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
is your DNS working? can you use a web browser and point to something like 'yahoo.com'? or must you use the ip of yahoo to get to the site?
 
Old 02-28-2006, 11:32 AM   #3
baruah
LQ Newbie
 
Registered: Feb 2006
Distribution: RH9.0, RHEL 4
Posts: 12

Rep: Reputation: 0
check out the entry in /etc/resolv.conf or whatever equivalent in your OS.Can you ping to that IP address ?


Regards
BB
 
Old 02-28-2006, 12:09 PM   #4
sugar2
Member
 
Registered: Feb 2006
Distribution: Debian 40r0
Posts: 103

Rep: Reputation: 15
hi, i experienced the same issue but when i filled the /etc/resolv.conf with my isp dns ips.
now i have the follow question:
why i can ping to ips and host with no problem... and why i cannot ping my lan hosts? i only can ping to theit lan ips.
 
Old 02-28-2006, 12:09 PM   #5
sugar2
Member
 
Registered: Feb 2006
Distribution: Debian 40r0
Posts: 103

Rep: Reputation: 15
how can i fix it?
 
Old 02-28-2006, 12:37 PM   #6
okmyx
Member
 
Registered: May 2004
Location: Cornwall, UK
Distribution: Ubuntu 8.04
Posts: 464

Rep: Reputation: 31
Manualy add your lan host names into your hosts file (/etc/hosts)

I don't think your ISP is going to have a record of all your local hostnames in their DNS tables.

http://en.wikipedia.org/wiki/Hosts_file
 
Old 02-28-2006, 12:41 PM   #7
sugar2
Member
 
Registered: Feb 2006
Distribution: Debian 40r0
Posts: 103

Rep: Reputation: 15
it sounds logical... actually last i have other linux server with all the lan hostnames in that file... but my questuion is: since i have DHCP enbabled sometimes the host's ips change and the /etc/hosts file became ambiguous... is there a way to automaticaly mantain updated that file?
 
Old 02-28-2006, 03:42 PM   #8
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
You can set up DHCP with dynamic DNS that updates a DNS server (can be the same computer as the DHCP server) If you were able to ping the hosts on your LAN by name before you changed your resolv.conf then this is likely already set up. Once you have a DNS server set up to resolve local hostnames, you also need to set it up to either forward unknown requests to another DNS server or set it up with a root zone "." that points to root DNS servers. This makes it so you can ping hosts on The Internet by name.
 
Old 02-28-2006, 04:26 PM   #9
sugar2
Member
 
Registered: Feb 2006
Distribution: Debian 40r0
Posts: 103

Rep: Reputation: 15
why most linux users use a linux box as a dhcp server instead a builtin dhcp of a router or gateway?
 
Old 03-01-2006, 03:24 AM   #10
mrbabis
LQ Newbie
 
Registered: Jul 2005
Posts: 20

Original Poster
Rep: Reputation: 0
thank you /etc/resolv.conf
I got it to work
 
Old 03-01-2006, 11:20 AM   #11
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
Quote:
Originally Posted by sugar2
why most linux users use a linux box as a dhcp server instead a builtin dhcp of a router or gateway?
-I did it partly to learn how to set it up.
-The "built in dhcp of a router or gateway" on your typical SOHO router doesn't have the functionality and configurability that the Linux daemon does.
-The Linux box that is set up as the DHCP server is also set up as the router as well, so it's really just a PC that replaces those little routers.
 
Old 03-01-2006, 11:35 AM   #12
sugar2
Member
 
Registered: Feb 2006
Distribution: Debian 40r0
Posts: 103

Rep: Reputation: 15
i cant imagine what more features can have a linux box than a cisco 800 series router for saying something.
i am linux user since 1999 and i never has used a linux box for replace a network device...
 
Old 03-02-2006, 01:12 AM   #13
Mr_C
Member
 
Registered: Jan 2004
Location: Trinidad & Tobago
Distribution: Slackware
Posts: 317

Rep: Reputation: 30
to refer to a machine by host name you need to configure windBIND or named depending on your distro.
 
Old 03-02-2006, 11:35 AM   #14
sugar2
Member
 
Registered: Feb 2006
Distribution: Debian 40r0
Posts: 103

Rep: Reputation: 15
slackware is my distro...
 
Old 03-02-2006, 12:56 PM   #15
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
Quote:
Originally Posted by Mr_C
to refer to a machine by host name you need to configure windBIND or named depending on your distro.
Quote:
Originally Posted by sugar2
slackware is my distro...
Then it would be named.

To get it to automatically update when host/IP pairings change you set up your DHCP server to give dynamic updates to your DNS server
 
  


Reply



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
Ping or SSh by hostname ElectroLinux Linux - Newbie 2 10-26-2004 03:21 AM
windows 98 m/c ping to ip address of red hat server but fails to ping hostname ravilohot Linux - Networking 2 09-07-2004 04:57 AM
Unable to ping hostname? robertmarkbram Linux - General 2 11-28-2003 12:06 AM
Can ping by IP but not by hostname gillesdutertre Linux - Networking 8 09-01-2003 07:59 AM
can ping by IP but not by hostname al contado Linux - Networking 6 03-16-2003 03:06 AM

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

All times are GMT -5. The time now is 05:43 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