LinuxQuestions.org
Help answer threads with 0 replies.
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 12-22-2000, 03:02 AM   #1
harishankkars
LQ Newbie
 
Registered: Dec 2000
Location: India
Posts: 7

Rep: Reputation: 0

During pinging a host by name ,we are facing a probem in our Linux installation. If I ping any host around the globe by its IP address, it iis pinging correctly. The moment I try to ping by name (e.g. say http://www.yahoo.com), it says unknown host.

I am getting connected to Internet( my IP address) via a DHCP server.


Also, I tried to give the DNS server address,our gateway addres in the etc/resove.conf, still the problem persists.

What are the necessary files and settings so thaat I can ping any host on Internet by name ? What should be written in resolve.conf

Please help on the same.

Regards,


...Harishankaran
 
Old 12-22-2000, 08:04 AM   #2
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,600

Rep: Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083
If you can ping by IP but not by name then you have a DNS problem. In your /etc/resolv.conf you should have a line like:

nameserver xxx.xxx.xxx.xxx

where the x's are replaced by the ip of your nameserver.
 
Old 12-22-2000, 09:19 AM   #3
harishankkars
LQ Newbie
 
Registered: Dec 2000
Location: India
Posts: 7

Original Poster
Rep: Reputation: 0
Re:PingI

Hi,
I tried in the /etc/resolv.conf the settings.Actually I am part of a network which has a DHCP server.So during boot up the /etc/resolv.conf file gets written and it appears like this
search
nameserver 192.168.0.1
192.168.0.1 is our local gateway's address.
Now even if I change the /etc/resolv.conf now to the DNS name of our ISP the problem still persists.One thing I would like to clarify.I am running a stripped version of Linux.That is the total Size comes to around say only 9MB.I maintain that Iam able to ping any machine in the globe via the IP address but not via the name.So DNS problem agreed.But the same redhat Linux when Iam running under the full version and with the DHCP enabled ,I am able to ping any machine via the name.Am I missing any other configuration files?
Thanx,
hari
 
Old 12-22-2000, 09:26 AM   #4
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,600

Rep: Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083
You need to put the IP of a DNS server in the /etc/resolv.conf file. A gateway will not work and the name of a name server will not work. Try putting nameserver xxx.xxx.xxx.xxx in the file and restarting networking. If that does not work let us know.
 
Old 12-22-2000, 10:15 AM   #5
harishankkars
LQ Newbie
 
Registered: Dec 2000
Location: India
Posts: 7

Original Poster
Rep: Reputation: 0
Hi,
Could u please explain me abt what u mean by saying restarting networking.I tried to run the /etc/rc.d/init.d/S10network start.But again after doing this the /etc/resolv.conf file is overwritten,and it appears like this.
search
nameserver 192.168.0.1
192.168.0.1 is the gateway and it is our local server.
Tell me where he changes the file resolv.conf during boot up?.I am usring Redhat 6.2.
Please help.
Thanx,
hari
 
Old 12-22-2000, 12:34 PM   #6
harishankkars
LQ Newbie
 
Registered: Dec 2000
Location: India
Posts: 7

Original Poster
Rep: Reputation: 0
ping

Hi
1. After changing the mode of file /etc/resolv.conf to read only, we noticed unpredictable behaviour. The file some times is being modified with our default gateway. This behaviour is noticed when the network is restart with etc/rc.d/init.d/S10network start. If we could get an note on where this file is getting changed, we could check it out precisely what is happening.

2. Even with /etc/resolv.conf having nameserver as our default IP we are able to ping the remote network thru our ISP by giving the network name.
In stripped version it is not happening so. Could u tell us which of the file we would have missed. Is there any place where we need to define the DNS iterative or recursive query type.

3. Also when configured linux as DHCP client to windows NT server, we notice that for every boot we get new IP address being assigned by NT server. Could u guide us how to configure linux retain the lease period.


regards
hari
 
Old 12-22-2000, 01:40 PM   #7
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,600

Rep: Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083
1) On a Red Hat system the files get changed by scripts in /etc/sysconfig/network-scripts. It is different on other dostro's.

2) You should also have a line in /etc/nsswitch.conf like
Quote:
hosts: files nisplus nis dns
3) You should be able to set this up on the server side.
 
Old 12-23-2000, 02:53 AM   #8
harishankkars
LQ Newbie
 
Registered: Dec 2000
Location: India
Posts: 7

Original Poster
Rep: Reputation: 0
Question Ping

Hi Jeremy,
Thanx for te help so far.But I am unable to solve this problem.Let me tell u about the set up we have.We have got a hardisk running Redhat 6.2 ,full installation.In an ISA card we have a Diskonchip connected where we are putting the stripped version of Linux.We mount the hardisk from the DOC(Diskon chip) and copy the files and libraries.The whole thing comes to aroud only 9MB.The probelms we face
1)When we run the redhat Linux from the harddisk ,after booting if we look up at the /etc/resolv.conf file it says
search
nameserver 192.168.0.1
Where 192.168.0.1 is our local gateway.From here if I say
ping http://www.yahoo.com
it perfectly works.The server is a DHCP one (Win2000).But when we boot the same kernel from the DOC and almost all the required files are there in the /etc/rc.d/rc3.d as in the harddisk.The DHCP works,and everything almost the same .The /etc/resolv.conf file in the DOC is the same as in the harddisk.Now our problem is that we are unable to ping any machine by the Domain Name,as we could do in the harddisk.
2.I have configured the /etc/nsswitch.conf in that I have specified
hosts:files dns.
I dont have any nis So I have given this way.
3.Another peculiar feature each time I reboot the Linux machine I get a new IP address.Actually the server (Windows 2000) has been configured for a leased period of 8 days.The Windows machine connected to teh same server shows teh same IP address whenever we reboot again and again.Whereas the Linux machine does not.What could be the problem?
Please help
Thanx,
hari
 
  


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
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 15 03-30-2015 02:39 PM
Any idea why this time I can not ping my LAN pc but can PING for ex. www.yahoo.com vakia Debian 5 09-28-2005 06:42 PM
PPP establish can ping the gateway router but unable to ping the host deepalalla Linux - Networking 0 11-18-2004 09:10 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
I can ping google.com successfully,but ping client(in my intranet) failed.Why? whepin Linux - Newbie 4 12-30-2001 04:54 AM

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

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