I have a Raspberry Pi 3 Model B (with Raspbian Stretch Lite installed) connected to my laptop by Ethernet using a static IP address (network: 192.168.128.0). I can access it through ssh without any problems.
Both Raspi and Laptop are connected to my home WiFi network (192.168.1.0).
I was able to do apt-get update && apt-get upgrade
and get a response when pinging sites offering an IPv6 address (google.com, www.fefe.de), but not so for IPv4 addresses (such as github.com, which is resolved as 192.30.253.112).
Why can't I communicate with IPv4 sites?
Here's what ifconfig
says:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.128.66 netmask 255.255.255.0 broadcast 192.168.128.255
inet6 fe80::ba27:ebff:fe5e:11a4 prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:5e:11:a4 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 284 bytes 23167 (22.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 163 bytes 16590 (16.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 163 bytes 16590 (16.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.109 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::ba27:ebff:fe0b:44f1 prefixlen 64 scopeid 0x20<link>
inet6 2a02:1205:506b:20d0:ba27:ebff:fe0b:44f1 prefixlen 64 scopeid 0x0<global>
ether b8:27:eb:0b:44:f1 txqueuelen 1000 (Ethernet)
RX packets 2862 bytes 287666 (280.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1783 bytes 322848 (315.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
And here what iwconfig
says:
eth0 no wireless extensions.
lo no wireless extensions.
wlan0 IEEE 802.11 ESSID:"bucher"
Mode:Managed Frequency:2.437 GHz Access Point: D0:05:2A:1B:ED:78
Bit Rate=65 Mb/s Tx-Power=31 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on
Link Quality=43/70 Signal level=-67 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
And finally my /etc/network/interfaces
file:
source-directory /etc/network/interfaces.d
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 192.168.128.66
netmask 255.255.255.0
gateway 192.168.128.1
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Edit /etc/resolv.conf
:
domain home
nameserver 192.168.1.1
/etc/resolv.conf
above now, thanks for pointing out. Why can't I have two networks when each device has two network devices? – Patrick Bucher Oct 29 '17 at 11:16