I have got a new Raspberry Pi, and I am eager to work on it, but I am not able to connect to the network from it.
I connect to the Raspberry Pi using SSH. When I try doing the
apt-get update apt-get install tightvnc
I get the error
Temporary failure resolving 'mirrordirector.raspbian.org'
It looks like many of them have had this issue. I tried several ways suggested by those who got it working that way.
I checked this link and this link and edited the
resolv.conf file. The
resolv.conf file was having the line
nameserver 10.42.0.1 before I edited it.
I added the lines,
nameserver 220.127.116.11 nameserver 18.104.22.168
I connected to the Raspberry Pi using the IP address 10.42.0.69. I don't think so that should be added to
resolv.conf file as well.
I have tried editing the
/etc/network/interfaces file as well to set a static IP address, but I reverted it back after I found out that I can also assign a static IP address using this command
sudo ifconfig eth0 192.168.x.x netmask 255.255.255.0. I like this one because I didn't have to make the interfaces file dirty.
/etc/network/interfaces looks like this:
auto lo iface lo inet loopback iface eth0 inet dhcp allow-hotplug wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhcp
So, yes, this is a DHCP from a home router.
I cannot ping 22.214.171.124 or any other external IP address. However, I can ping the IP address to my laptop to which I have connected the Raspberry Pi.
I have tried re-flashing the SD card, but I reached nowhere.
ifconfig -aafter a reboot)