1

The office network uses static IP addresses. I've cleaned up an issue related to creating a wireless access point and I reverted back to the static IP on eth0. I am having a DNS issue, I'm fairly sure. I cannot access any of the apt mirrors.

root@raspberrypi:~# apt-get update
Err http://archive.raspberrypi.org jessie InRelease

Err http://mirrordirector.raspbian.org jessie InRelease

Err http://archive.raspberrypi.org jessie Release.gpg
  Could not resolve 'archive.raspberrypi.org'
Err http://mirrordirector.raspbian.org jessie Release.gpg
  Could not resolve 'mirrordirector.raspbian.org'
Reading package lists... Done
W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/jessie/InRelease

W: Failed to fetch http://archive.raspberrypi.org/debian/dists/jessie/InRelease

W: Failed to fetch http://archive.raspberrypi.org/debian/dists/jessie/Release.gpg  Could not resolve 'archive.raspberrypi.org'

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/jessie/Release.gpg  Could not resolve 'mirrordirector.raspbian.org'

W: Some index files failed to download. They have been ignored, or old ones used instead.

I also cannot ping host names.

root@raspberrypi:~# ping google.com
ping: unknown host google.com

In dhcpcd.conf, (I am running Jessie) I have eth0 configured

# Static for Eth0
interface eth0

static ip_address=209.195.157.233/24
static routers=209.195.157.1
#static domain_name_servers=209.195.157.12
static domain_name_servers=8.8.8.8 8.8.4.4

Please note that I first set up eth0 with the network DNS server, then I tried google's DNS servers.

Additional information:

root@raspberrypi:~# ifconfig -a
eth0      Link encap:Ethernet  HWaddr b8:27:eb:af:b2:16
          inet addr:209.195.157.233  Bcast:209.195.157.255  Mask:255.255.255.0
          inet6 addr: fe80::d7d9:423e:495c:2986/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:79920 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5738 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8426207 (8.0 MiB)  TX bytes:1877284 (1.7 MiB)

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:65536  Metric:1
          RX packets:1594 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1594 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:402177 (392.7 KiB)  TX bytes:402177 (392.7 KiB)

wlan0     Link encap:Ethernet  HWaddr b8:27:eb:fa:e7:43
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@raspberrypi:~# ip route
default via 209.195.157.1 dev eth0  metric 202
209.195.157.0/24 dev eth0  proto kernel  scope link  src 209.195.157.233  metric 202

root@raspberrypi:~# ping -c4 209.195.157.1
PING 209.195.157.1 (209.195.157.1) 56(84) bytes of data.
64 bytes from 209.195.157.1: icmp_seq=1 ttl=255 time=0.506 ms
64 bytes from 209.195.157.1: icmp_seq=2 ttl=255 time=0.352 ms
64 bytes from 209.195.157.1: icmp_seq=3 ttl=255 time=0.349 ms
64 bytes from 209.195.157.1: icmp_seq=4 ttl=255 time=0.391 ms

--- 209.195.157.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2997ms
rtt min/avg/max/mdev = 0.349/0.399/0.506/0.066 ms

root@raspberrypi:~# ping -c4 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_seq=1 ttl=121 time=19.2 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=121 time=7.93 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=121 time=19.2 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=121 time=19.3 ms

--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 7.938/16.442/19.330/4.910 ms

root@raspberrypi:~# ping -c4 8.8.4.4
PING 8.8.4.4 (8.8.4.4) 56(84) bytes of data.
64 bytes from 8.8.4.4: icmp_seq=1 ttl=121 time=7.79 ms
64 bytes from 8.8.4.4: icmp_seq=2 ttl=121 time=7.69 ms
64 bytes from 8.8.4.4: icmp_seq=3 ttl=121 time=7.70 ms
64 bytes from 8.8.4.4: icmp_seq=4 ttl=121 time=7.64 ms

--- 8.8.4.4 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 7.645/7.710/7.790/0.051 ms

I think this is a DNS issue, but I'm not sure how to proceed at this point.

8
  • What happens if you do nslookup google.com?
    – Brick
    Mar 19, 2019 at 18:02
  • Also: It's probably not related to your problem, but you seem to have public IP addresses everywhere. That might be right, but it would be much more common to be addressing the router via a private address on a subnet.
    – Brick
    Mar 19, 2019 at 18:03
  • nslookup is not installed currently. Mar 19, 2019 at 18:05
  • How about host google.com? Or dig google.com?
    – Brick
    Mar 19, 2019 at 18:06
  • The connection times out ;; connection timed out; no servers could be reached Mar 19, 2019 at 18:08

1 Answer 1

0

Your setup looks good so far but DNS name resolution still does not work. Beside all settings the operating system is only looking at /etc/resolv.conf what DNS server to use. To respect dynamic changes of the entries in this file, it can be managed by different services. I haven't uses Raspbian Jessie since years but it seems by default resolvconf is used to manage it.

As you wrote in a comment /etc/resolv.conf is empty so name resolution cannot find the nameserver to ask. resolvconf is managed by dhcpcd with a hook. You may have a look at /lib/dhcpcd/dhcpcd-hooks/20-resolv.conf why dhcpcd fails to use /sbin/resolvconf for updating the nameserver ip addresses. Using /sbin/resolvconf -u on boot up as you do now can only be a weak workaround.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.