I have shared my laptop wifi internet access with raspberry pi using ethernet cable in previous post.
However, when I tried to ping www.google.com, it gave me an error of unknown host.
Trying to 'ping 8.8.8.8' also returned error, while to ping actual IP address worked. (i.e. 'ping xxx.xxx.xxx.xxx')
smithg400 from the source website mentioned specifying gateway in /etc/network/interfaces as well as DNS resolution and to have a look at /etc/resolv.conf
/etc/network/interfaces already had a gateway set up to the IP address of my laptop.
sudo cat /etc/resolv.conf returned empty. So I added nameserver xx.xx.xx.xx on the resolv.conf, which made DNS resolution work and I could ping www.google.com
This however, disappeared once I rebooted. Quick 'man resolvconf' returned that configuration file for resolv.conf is at /etc/resolvconf.conf. So, fix this file as well for persistent result.
Source: https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=57024
No comments:
Post a Comment