Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,602
Rep:
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.
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
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.