Cannot ping google in BBB even after sharing internet

5,153 views
Skip to first unread message

Raj_RB

unread,
Jan 17, 2015, 6:47:24 AM1/17/15
to beagl...@googlegroups.com
Hi,

1) I downloaded 'bone-debian-7.5-2014-05-14-2gb' (BBB eMMC flasher) from 'http://beagleboard.org/latest-images' and the website given MD5 checksum matched with my downloaded zip file. Then used Win32 Disk Imager (since windows 7), for image writing 4GB microSD.

2) Inserted microSD into BBB and pressed the boot button and then applied power using the power adapter. (Please note that I have not connected Ethernet and USB cable for power during the whole flashing process). But only power supply LED got lit and not the user LEDs for around 5 seconds. Then I removed the power supply and while pressing the boot button, I provided the power supply and then all LEDs got lit for an instance and then the LEDs started to glow erratically. Within 20 mins all the User LED were off and did not ON again as against the standard procedure in which all LEDs must glow after successful flashing of eMMC.

3) So, I thought to see if this works and I removed the microSD and power. Then I connected BBB with my PC (by USB) using putty (SSH). I was able to login successfully into debian but I was not able to ping google after adding new gateway (192.168.7.1) and changing nameserver to 8.8.8.8 in '/etc/resolv.conf' file.

Please note that before SSH-ing, I shared my wifi internet with BBB in Network settings(Windows 7) and also I changed the IP address of my BBB to 192.168.7.1. All this worked earlier for me by following this youtube link: (https://www.youtube.com/watch?v=D-NEPiZDSx8). 

Also, BBB (Linux USB ethernet/ RNDIS gadget) in Network settings shows 'No Internet access' eventhough I have shared internet and changed my ip address to 192.168.7.1 with subnet mask 255.255.255.0 leaving the DNS server addresses blank as in the youtube video.

But now it doesn't work eventhough I have already done the same procedure (flashing) many times now with the same result and feeling really frustrated now. Please let me know if I am missing anything here. Is it due to the flashing issue? 
Waiting for all your inputs! Thank you!!


Output:

BeagleBoard.org BeagleBone Debian Image 2014-05-14
Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian
deb...@192.168.7.2's password:
Last login: Thu May 15 02:19:40 2014 from 192.168.7.1
debian@beaglebone:~$ sudo su
root@beaglebone:/home/debian# route add default gw 192.168.7.1
root@beaglebone:/home/debian# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.7.1 0.0.0.0 UG 0 0 0 usb0
192.168.7.0 0.0.0.0 255.255.255.252 U 0 0 0 usb0
root@beaglebone:/home/debian# cat /etc/resolv.conf
domain localdomain
search localdomain
nameserver 192.168.1.1
root@beaglebone:/home/debian# vim /etc/resolv.conf
root@beaglebone:/home/debian# cat /etc/resolv.conf
domain localdomain
search localdomain
nameserver 8.8.8.8
root@beaglebone:/home/debian# ping http://www.google.com
ping: unknown host http://www.google.com
root@beaglebone:/home/debian#

Curt Carpenter

unread,
Jan 18, 2015, 11:29:05 PM1/18/15
to beagl...@googlegroups.com
Hello.

I had similar trouble with WinXP, and the problem I had included issues with the way I had my Windows network configured.  Win 7 is much different though, so can't offer any help there.  Otherwise, you may already be doing this but just in case, I have the following lines in a script that I run after I've booted my BBB:

#!/bin/sh
echo "Setting up the default gateway"
/sbin/route add default gw 192.168.7.1
# May need to run this if /etc/resolv.conf gets corrupted
#echo "Updating the nameserver entry"
echo "nameserver 8.8.8.8" >> /etc/resolv.conf




Raj Bharath RB

unread,
Jan 19, 2015, 4:50:44 AM1/19/15
to beagl...@googlegroups.com
Hi Curt,

The thing is it actually worked earlier by following the already mentioned youtube video even though the video is for Windows 8.

Actually, I am a newbie. Even I ran the same script but I am not sure whether it was done in the correct file.

root@beaglebone:/home/debian# route add default gw 192.168.7.1  
Will this above script make changes in the file #!/bin/sh as your script?

root@beaglebone:/home/debian# cat /etc/resolv.conf
domain localdomain
search localdomain
nameserver 8.8.8.8

Even I made changes like above in /etc/resolv.conf file.
Do I need to change localdomain in the above script also?

Thanks Curt.


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/9PWK96YLkzA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gary McKinney

unread,
Jan 19, 2015, 6:27:01 AM1/19/15
to beagl...@googlegroups.com
Hi,

It appears you have done everything right but any little item missed will stop the link from working properly.

There are several questions you need to ask yourself...

Except where stated otherwise all the tests below are performed from the BeagleBone system.

1. Does ifconfig command show the correct information for the usb0 interface?

2. Can you ping the ip address assigned to the usb0 interface (192.168.7.2)?
    If not then there is something not configured properly on your usb0 interface.  Check the /etc/network/interfaces file to make sure the entry for usb0 is correct.

3. Can you ping the ip address of the PC's link interface (192.168.7.1)?
    If you can not ping the PC link interface address then there is something incorrectly configured on that interface - double check the interface settings to make sure the assigned IP address & netmask address is set correctly.

4. From the PC can you ping the link interface (192.168.7.1)?
    If not there is something wrong with the link interface configuration.

5. From the PC can you ping the BeagleBone usb0 interface (192.168.7.2)?
    If not double-check the usb0 interface configuration in /etc/network/interfaces and look at the "ifconfig usb0" command results for any discrepancies.

6. Can you ping the PC's network bridged IP address (the interface you have bridged over to the usb link interface on the PC)?
    If not make sure you have the bridging setup properly on the PC interfaces.

7. Can you ping the PC's default gateway IP address?

If everything is reachable (pingable) up to this point then it has to be something in the resolver settings (DNS).

Double check to make sure the /etc/resolv.conf file has the proper DNS server entry so you can resolve FQDN names (those listed in DNS that is).

It has been my experience when network issues crop up they tend to be something simple but over looked if things had previously worked before something was changed.

Hopefully the above helps.  Let us know what you find :)

gm...

Raj Bharath RB

unread,
Jan 19, 2015, 8:57:29 AM1/19/15
to beagl...@googlegroups.com
Hi Gary,

Thanks for the detailed explanation.


It appears you have done everything right but any little item missed will stop the link from working properly.

There are several questions you need to ask yourself...

Except where stated otherwise all the tests below are performed from the BeagleBone system.

1. Does ifconfig command show the correct information for the usb0 interface?

    ifconfig command shows as below and I think its fine.

usb0   Link encap:Ethernet  HWaddr 32:c8:da:35:6b:a9
          inet addr:192.168.7.2  Bcast:192.168.7.3  Mask:255.255.255.252
          inet6 addr: fe80::30c8:daff:fe35:6ba9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:564 errors:0 dropped:0 overruns:0 frame:0
          TX packets:76 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:161443 (157.6 KiB)  TX bytes:17438 (17.0 KiB)

2. Can you ping the ip address assigned to the usb0 interface (192.168.7.2)?
    If not then there is something not configured properly on your usb0 interface.  Check the /etc/network/interfaces file to make sure the entry for usb0 is correct.

       Yes, it pings with 192.168.7.2 ( pings in SSH of putty)
 

3. Can you ping the ip address of the PC's link interface (192.168.7.1)?
    If you can not ping the PC link interface address then there is something incorrectly configured on that interface - double check the interface settings to make sure the assigned IP address & netmask address is set correctly.

     Yes, I am able to ping 192.168.7.1 also after I added the gateway    ( pings in SSH of putty) 
  

4. From the PC can you ping the link interface (192.168.7.1)?
    If not there is something wrong with the link interface configuration.
      
      Yes, I can. ( in Cmd line of windows 7) 

5. From the PC can you ping the BeagleBone usb0 interface (192.168.7.2)?
    If not double-check the usb0 interface config

   Yes, I can. ( in Cmd line of windows 7) 

6. Can you ping the PC's network bridged IP address (the interface you have bridged over to the usb link interface on the PC)?
    If not make sure you have the bridging setup properly on the PC interfaces.

I am actually using wifi in my lap (no ethernet cable) and I have shared this internet with the BBB's USB ethernet. When I typed ipconfig in cmd line of Windows 7,  I got IPv4 Address as 192.168.1.36 in Wireless LAN adapter. And I was able to ping 192.168.1.36 in my cmd line of Windows 7. I hope this is what you meant. Please correct me if I am wrong. 

7. Can you ping the PC's default gateway IP address?
 
    I was able to ping the Default Gateway (192.168.1.254) for this Wireless LAN adapter in cmd line of        Windows 7. But I am not able to ping 192.168.1.36 and 192.168.1.254 from BBB's SSH 
    
If everything is reachable (pingable) up to this point then it has to be something in the resolver settings (DNS).

Double check to make sure the /etc/resolv.conf file has the proper DNS server entry so you can resolve FQDN names (those listed in DNS that is).

It has been my experience when network issues crop up they tend to be something simple but over looked if things had previously worked before something was changed.


My current settings in /etc/resolv.conf is as below. Is this fine?

domain localdomain
search localdomain
nameserver 192.168.1.1
nameserver 8.8.8.8

Moreover for my Wireless LAN settings, I have selected 'Obtain DNS server adress automatically' for IPv4 protocol. But for LAN 3 (which is BBB'USB ethernet), I could only select 'Use the following DNS server address' which is actually blank. 

And also, in Network connections, LAN 3 shows that it has 'No internet access' and Wireless LAN shows it has internet access.

Please let me know if I there is any issue with DNS server entries and to change it

Thank you very much for your detailed explanation. 

Raj Bharath RB

unread,
Jan 20, 2015, 3:47:28 PM1/20/15
to beagl...@googlegroups.com
Still not working!!

remi...@gmail.com

unread,
Oct 14, 2015, 8:37:52 PM10/14/15
to BeagleBoard
I am having the exact same problem Raj; did you ever figure it out?

Raj Bharath RB

unread,
Oct 17, 2015, 2:43:48 AM10/17/15
to beagl...@googlegroups.com
It has been some time I worked with it.
As far as I remember, I think I uninstalled all the BBB drivers in my PC,
and removed Putty completely (including its registry I think) and then reinstalled
all of them again. I don't know how this works but atleast it worked for me.

On Wed, Oct 14, 2015 at 11:23 PM, <remi...@gmail.com> wrote:
I am having the exact same problem Raj; did you ever figure it out?

--

cjoh...@gmail.com

unread,
Mar 19, 2019, 7:42:04 AM3/19/19
to BeagleBoard
This is a domain name resolution issue.

You can verify that you can ping IP Addresses, ie 8.8.8.8
But you can't ping domain names, ie google.com

Does this sound like you?

On Beaglebone running Debian, setting the nameserver or dns-nameservers directives in /etc/network/interfaces does NOT solve this problem.
Writing nameserver 8.8.8.8 directive to /etc/resolv.conf does NOT solve this problem.
Can't apt-get update (uses domain names, right), so you can't just reinstall a new DNS resolver.
Reinstalling apt-get install resolvconf, if it successfully installs, still doesn't fix the problem.
Setting the default gateway (/sbin/route add default gw 192.168.7.1) doesn't help...


Here is the problem. dhclient needs to be running. Ensure you have at least one valid name server in your /etc/resolv.conf ie nameserver 8.8.8.8

Then run dhclient

Then try to ping google.com

root@sg1:~# ping google.com

ping: unknown host google.com

root@sg1:~# pico /etc/resolv.conf

root@sg1:~# dhclient

root@sg1:~# ping google.com

PING google.com (172.217.0.46) 56(84) bytes of data.

64 bytes from lga15s43-in-f46.1e100.net (172.217.0.46): icmp_req=1 ttl=55 time=8.62 ms

64 bytes from lga15s43-in-f46.1e100.net (172.217.0.46): icmp_req=2 ttl=55 time=8.24 ms

64 bytes from lga15s43-in-f46.1e100.net (172.217.0.46): icmp_req=3 ttl=55 time=8.21 ms

64 bytes from lga15s43-in-f46.1e100.net (172.217.0.46): icmp_req=4 ttl=55 time=8.35 ms

^C

--- google.com ping statistics ---

4 packets transmitted, 4 received, 0% packet loss, time 5531ms

rtt min/avg/max/mdev = 8.214/8.360/8.625/0.161 ms

root@sg1:~# 




If this doesn't work for you, if you go back and check your /etc/resolv.conf file, you may notice that it's contents have changed. These settings are written to this file automatically from dhclient, often based upon what the DHCP server gives. And these settings come from your /etc/network/interfaces values. Verify that your networks DHCP server is serving the correct name server IP's and repeat your dhclient command.

LuminousShadow

unread,
Mar 19, 2019, 10:36:41 AM3/19/19
to BeagleBoard
I've had a similar issue when trying to share my internet to my BBBW. I had the system going and working. I then wanted to try another OS and installed a new one. When I tried to ping 8.8.8.8 after modifying resolv I wasn't getting any comm outside.
But, I've pinged internal local host (worked) so I figured it had to do with the fact that my host system still had settings listed for the old OS.

What I've found to work for me is remove the shared internet connection and restart both systems. Then set up the connection sharing again and changing the RNDIS adapter's setting to Dynamic.

After that I logged into my BBBW and tried to ping 8.8.8.8 and www.google.com, both worked without issues.

Hope something there helps.

On Saturday, January 17, 2015 at 6:47:24 AM UTC-5, Raj_RB wrote:

Brian Tremaine

unread,
Sep 3, 2019, 11:44:50 AM9/3/19
to BeagleBoard
I realize this is an old post but I'm hoping to get some answers ;)  : Problems pinging www.google.com
 
I have a BeagleBone Black Rev C that is running the latest Debian. I've been going through Derek Malloys book and video to get things started (excellent material BTW), 

I am connected to a Win 10 laptop (64-bit) using the USB interface and am using putty to connect through SSH. My problem is I cannot ping a DNS name, i.e. www.google.com. pinging 8.8.8.8 does work. When I try to edit /etc/ resolv.conf it says file does not exist. On the terminal the file resolv.conf is shown in red; What does this mean?

Can anybody help with hints on how to set up name server on BB Black Rev C with Debian?

Thanks,
Brian

On Saturday, January 17, 2015 at 3:47:24 AM UTC-8, Raj_RB wrote:

Tarmo Kuuse

unread,
Sep 4, 2019, 9:24:41 AM9/4/19
to BeagleBoard
Hi Brian,


On Tuesday, 3 September 2019 18:44:50 UTC+3, Brian Tremaine wrote:
I realize this is an old post but I'm hoping to get some answers ;)  : Problems pinging www.google.com
 
I have a BeagleBone Black Rev C that is running the latest Debian. I've been going through Derek Malloys book and video to get things started (excellent material BTW), 

I am connected to a Win 10 laptop (64-bit) using the USB interface and am using putty to connect through SSH. My problem is I cannot ping a DNS name, i.e. www.google.com. pinging 8.8.8.8 does work. When I try to edit /etc/ resolv.conf it says file does not exist. On the terminal the file resolv.conf is shown in red; What does this mean?

Can anybody help with hints on how to set up name server on BB Black Rev C with Debian?

On my BBB "/etc/resolv.conf" is a symbolic link which points to connman's /run/connman/resolv.conf:

$ ls -lha /etc/resolv.conf
lrwxrwxrwx 1 root root 24 Jun 30 13:12 /etc/resolv.conf -> /run/connman/resolv.conf

In your case - if the terminal shows this file in red, it likely indicates a broken symlink, i.e. it points to file a file which doesn't exist. You can verify this by listing the file being pointed to and verifying its existance. In my case (my link is OK):

$ ls -lha /run/connman/resolv.conf 
-rw-r--r-- 1 root root 85 Sep  4 08:24 /run/connman/resolv.conf

As a temporary solution you can delete the broken symlink and add your own name server manually

$ sudo rm /etc/resolv.conf
$ sudo vim /etc/resolv.conf

nameserver 8.8.8.8

As a permanent solution, try to figure out why connman hasn't managed to do its job :)

--
Kind regards,
Tarmo

cjoh...@gmail.com

unread,
Sep 4, 2019, 7:02:32 PM9/4/19
to BeagleBoard
But..but.. conman sucks....

If you can ping IP's but can't ping domain names then you know it's a DNS issue. Either it's not configured or misconfigured.

I'd also suggest modifying /etc/resolv.conf but that does NOT work for me.
I'd suggest adding the dns-nameserver entry to your /etc/networking/interfaces but that also doesn't work for me.

One post suggests that in order for /etc/resolv.conf to work you actually need 2 name server entries (https://superuser.com/questions/413395/dns-not-set-up-properly-in-debian-linux) :
nameserver 208.67.220.220
nameserver 208.67.222.222
I'd use Googles DNS personally since my ISP actually tries to prevent me from accessing certain domains;

nameserver 8.8.8.8
nameserver 8.8.4.4

Good luck


On Saturday, January 17, 2015 at 3:47:24 AM UTC-8, Raj_RB wrote:

John Minton

unread,
Sep 4, 2019, 7:03:06 PM9/4/19
to beagl...@googlegroups.com
You can ping IP addresses but you can't resolve Domain names: you need to configure your DNS nameservers.

I've read a number of different ways to accomplish this on the beaglebone, but they usually don't seem to work for me. These include adding a nameserver entry in your /etc/network/interfaces, editing resolv.conf as you suggested, or configuring the application that write to resolv.conf depending on your system setup. I think back on Debian Jessie I may have had the later work. But on the newest images, I'd have to get in there and test it out myself.

Bottom line, you need to configure DNS Nameservers on your beaglebone. Google around and see what other things you can find on the topic. here are some suggestions:


TLDR;

pico /etc/network/interfaces

iface eth0 inet static 

        address 192.168.1.102 
        netmask 255.255.255.0 
        gateway 192.168.1.254 
        dns-nameservers 8.8.8.8 
        dns-nameservers 8.8.4.4 

Other stuff to check out:
https://wiki.debian.org/resolv.conf
https://www.howtoforge.com/debian-static-ip-address



~John Minton


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/9PWK96YLkzA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages