A "tinkered" PC can ping by IP, not by hostname. How to fix?

Posted by aitchnyu on Ask Ubuntu See other posts from Ask Ubuntu or by aitchnyu
Published on 2012-06-07T09:17:05Z Indexed on 2012/06/07 10:48 UTC
Read the original article Hit count: 281

Like this:

root@tis-server:~# ping www.google.com
ping: unknown host www.google.com

root@tis-server:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=55 time=50.3 ms
64 bytes from 8.8.8.8: icmp_req=2 ttl=55 time=65.4 ms

It was tinkered by somebody else and I (and him!) cant trace his actions. The graphical connection manager also refuses to work thanks to the tinkering.

It also makes route add default gw 192.168.0.1 necessary for each reboot to atleast ping by IP.

How do I fix this?

It is Ubuntu 11.10


As requested:

Output of ifconfig:

eth0      Link encap:Ethernet  HWaddr 48:5b:39:ae:21:98  
          inet addr:192.168.0.100  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::4a5b:39ff:feae:2198/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13194 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5156 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1420596 (1.4 MB)  TX bytes:827295 (827.2 KB)
          Interrupt:42 Base address:0x2000 

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:4817 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4817 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:377732 (377.7 KB)  TX bytes:377732 (377.7 KB)

Output of resolv.conf:

Output of /etc/network/interfaces:

  GNU nano 2.2.6         File: /etc/network/interfaces                          

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0

© Ask Ubuntu or respective owner

Related posts about networking

Related posts about internet-connection