3

I am using an ARM target running Open Embedded Linux from Yocto, it has eth0 network interface from a private LAN network.

I am able to ping an IP like 173.203.44.122 but using the name(rackspace.com) I am unable to ping

root@ABC:~# ping 173.203.44.122
PING 173.203.44.122 (173.203.44.122): 56 data bytes 
64 bytes from 173.203.44.122: seq=0 ttl=236 time=10.502 ms
64 bytes from 173.203.44.122: seq=1 ttl=236 time=10.569 ms
64 bytes from 173.203.44.122: seq=2 ttl=236 time=10.431 ms

--- 173.203.44.122 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 10.431/10.500/10.569 ms
root@ABC:~# ping rackspace.com
ping: bad address 'rackspace.com'

/etc/resolv.conf has the following configuration:

nameserver 173.203.4.8
nameserver 173.203.4.9

Please let me know what else needs to be checked.

10
  • 1
    use google ns: nameserver 8.8.8.8 and nameserver 8.8.4.4 Dec 21, 2017 at 18:48
  • I am unable to ping 8.8.8.8, it just hangs and i do see that /etc/resolv.conf gets overwritten with some other values without reboot, may be from dhclient
    – enthu
    Dec 21, 2017 at 19:09
  • what do nslookup rackspace.com and dig rackspace.com say? Dec 21, 2017 at 19:19
  • 1
    Is your private network hosted by Rackspace? If not, why are you trying to use Rackspace DNS? Dec 21, 2017 at 23:34
  • 1
    Do not use 8.8.8.8 just by lazyness. Use your correct ISP/hosting company nameservers or install a resolving nameserver directly on your server. Dec 23, 2017 at 3:31

1 Answer 1

-1

On your network interface add the following line in your network interface

iface eth0 inet static
         address 192.168.142.44
         netmask 255.255.0.0
         gateway 192.168.0.1
         # Space-separated DNS servers
         dns-nameservers 8.8.8.8 8.8.4.4

Edit be /etc/resolv.conf with the DNS of your choice, and then run the following command on the file.

chattr +i /etc/resolv.conf

The above command blocks writing to the file, to unlock execute

chattr -i /etc/resolv.conf
1
  • There should never be a need to chattr the /etc/resolv.conf file Oct 3, 2023 at 14:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .