Project

General

Profile

Can't ping by name

Added by Dmitry Gorulko over 12 years ago

Hello!
Problem is I can't ping any host by name (got "bad address" error), but no problem with ping by IP. I guess it is related to DNS. How can I solve it? (sorry for stupid question, I am nub). Ping to DNS server which I have assigned in /etc/networks/interfaces is fine. Ping to localhost/mityomapl138.local is fine too.
Thank you!


Replies (4)

RE: Can't ping by name - Added by Michael Williamson over 12 years ago

We've noticed that the DNS doesn't get updated automatically as well.

If you know your DNS server, as a workaround, add the following entry to /etc/resolv.conf (you may need to create this file if it's not there).

nameserver your.dns.server.ip

I'll try to circle back about getting it autoconfigured from the udhcp. Probably google will give you an answer quicker.

-Mike

RE: Can't ping by name - Added by Dmitry Gorulko over 12 years ago

Solved! Thank you!
The only disadvatage is the /etc/resolv.conf file is rewritten (by udhcpc?) on reboot.
I wonder the dns-nameserver parameter in the /etc/network/interfaces has no meaning, even for static ip configuration?

RE: Can't ping by name - Added by Mattias Ekstrom over 12 years ago

I think the dns-* options in /etc/network/interfaces require that you have the resolvconf package installed. Do you have it?

RE: Can't ping by name - Added by Dmitry Gorulko over 12 years ago

Hello, Mattias!
I have installed resolvconf package after reading your post. Anyway /etc/resolv.conf still beeing empty.
My /etc/network/interfaces:
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 17.6.210.251
netmask 255.255.255.0
gateway 17.6.210.2
dns-nameservers 17.17.17.102
I also changed parameter dns-nameserver to dns-nameservers which was wrong.

    (1-4/4)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)