Unable to ping internet from beaglebone (Using windows XP)

Probably you are missing to setup the gateway and DNS on your beaglebone. If your XP machine can connect to Internet and is on the same network as your beaglebone, then try to find the settings from the XP machine.

Is this a domestic router? It’s not common to have a public IP as the default route on a domestic router. You also shouldn’t have to set any routes manually on such a router as they’re added via DHCP.

What is the model of your router? Is it perhaps just a modem, how many network connectors does it have?

This part:

A few questions:

  1. Did you set your IP address manually or using DHCP?
  2. Can you show the output of “netstat -rn”?
  3. Can you show the output of “nm-tools”?

On your windows XP machine, what is the IP address, gateway and DNS server setting? It should be there in the LAN properties.

  1. I did not set my IP address manually. I am using a computer connected to an organization’s network.

  2. root@beaglebone:~# netstat -rn
    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    0.0.0.0 148.179.243.254 0.0.0.0 UG 0 0 0 eth0
    148.179.202.16 148.179.243.254 255.255.255.255 UGH 0 0 0 eth0
    148.179.243.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    148.179.243.254 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
    151.110.50.27 148.179.243.254 255.255.255.255 UGH 0 0 0 eth0
    151.110.50.28 148.179.243.254 255.255.255.255 UGH 0 0 0 eth0

  3. root@beaglebone:~# nm-tools
    -sh: nm-tools: command not found

Thanks,
Siddharth

The machine is configured to obtain the IP address and DNS server address automatically.

Some thoughts:

On your Windows computer:1) Do “ipconfig /all” so we can see the values assigned to “DNS Servers”

On your BeagleBone

  1. Do “ifconfig -a” so we can see what your IP address info is for the Bone
  2. Do “cat /etc/resolv.conf” so we can see what DNS info you have there
  3. You mentioned that you can ping other intranet devices. Can you ping the default gateway address?
  4. Can you ping back and forth between the Windows computer and the BeagleBone?
  5. You mentioned that you are “in an organization”. Do they have any firewalls that prevent unknown devices from getting external access? Sometimes companies will have whitelists for known hosts and block all others.
  1. Results of ipconfig /all on windows

2) Results of 'ifconfig -aon beaglebone

  1. Doing cat /etc/resolv.conf gives following result

root@beaglebone:~# cat /etc/resolv.conf

Generated by Connection Manager

nameserver 127.0.0.1

  1. Yes, I can ping the default gateway
    root@beaglebone:~# ping 148.179.243.254
    PING 148.179.243.254 (148.179.243.254) 56(84) bytes of data.
    64 bytes from 148.179.243.254: icmp_req=1 ttl=255 time=0.671 ms
    64 bytes from 148.179.243.254: icmp_req=2 ttl=255 time=0.427 ms
    64 bytes from 148.179.243.254: icmp_req=3 ttl=255 time=0.610 ms
    64 bytes from 148.179.243.254: icmp_req=4 ttl=255 time=0.489 ms
    ^C
    — 148.179.243.254 ping statistics —
    4 packets transmitted, 4 received, 0% packet loss, time 2999ms
    rtt min/avg/max/mdev = 0.427/0.549/0.671/0.097 ms

  2. Yes, the firewall is setup.

Unless I missed a change somewhere in your email, your nameserver is the
loopback device and you will never resolve a hostname that way. You can
ping IP addresses, no problem. Set the nameserver to 8.8.8.8 and become
part of the google evil empire

Thanks Eric.

Pardon my naivety, but how do I set or rather change the nameserver to 8.8.8.8?

Thanks once again,
Siddharth

I searched on google, and I could find this:

To change the nameservers to Googles nameservers: 8.8.8.8, first find the name of the cable connection by doing this:

/usr/lib/connman/test/get-services

and suppose this name is : ethernet_0018318ddea3_cable, do this:

root@beaglebone:~# /usr/lib/connman/test/set-nameservers ethernet_0018318ddea3_cable 8.8.8.8

Is this how even I am supposed to proceed?

Thanks,
Siddharth

dnsmasq should be running and listening on localhost.

Below is the result that I am obtaining after changing the nameserver to 8.8.8.8 as suggested by Eric.

  1. Getting the ethernet name:
    root@beaglebone:~# /usr/lib/connman/test/get-services
    [ /net/connman/service/ethernet_001831938d36_cable ]
    IPv6.Configuration = { Method=auto Privacy=disabled }
    AutoConnect = false
    Name = Wired
    Nameservers = [ 148.179.202.16 151.110.50.27 151.110.50.28 ]
    Provider = { }
    Favorite = true
    Domains.Configuration = [ ]
    State = ready
    Proxy = { Method=direct }
    Nameservers.Configuration = [ 148.179.202.16 151.110.50.27 151.110.50.28 ]
    IPv4 = { Netmask=255.255.255.0 Gateway=148.179.243.254 Method=dhcp Address=1
    48.179.243.101 }
    IPv6 = { }
    Domains = [ xxxxxxxxxx ]
    Ethernet = { Interface=eth0 MTU=1500 Method=auto Address=00:18:31:93:8D:36 }

Security = [ ]
Proxy.Configuration = { }
Type = ethernet
Immutable = false
IPv4.Configuration = { Method=dhcp }

  1. Changing the nameserver to 8.8.8.8
    root@beaglebone:~# /usr/lib/connman/test/set-nameservers ethernet_001831938d36_c
    able 8.8.8.8
    Setting nameserver to [‘8.8.8.8’]

  2. Pinging google
    root@beaglebone:~# ping google.com
    PING google.com (74.125.225.137) 56(84) bytes of data.
    ^C
    google.com ping statistics —
    5 packets transmitted, 0 received, 100% packet loss, time 4007ms

  3. Checking the changed nameserver:
    root@beaglebone:~# cat /etc/resolv.conf

Generated by Connection Manager

nameserver 127.0.0.1
This shows that the nameserver is not changed!

How to go about doing that?

Thanks,
Siddharth

Ah, I didn’t realize you were using connman for your network configuration. Changing the nameserver with connman doesn’t seem to change anything in the /etc/resolv.conf file, so no worries there. If your Nameservers [] field is updated when you execute “get-services”, you should be ok.

I checked the output of my “get-services” against yours and the only difference is that your “State = ready” and my “State = online”. From this link:

http://comments.gmane.org/gmane.linux.network.connman/10238

it appears that the transition to “online” only occurs when it is able to fetch the page indicated in the link. So if you don’t have internet connectivity (which your previous posts indicate you don’t), that would explain why your status hasn’t transitioned. Also, since you’re using DHCP, your server seemed to be serving you a couple perfectly good nameservers (presumably, since they’re the same ones that were handed to your XP box).

In a previous post you mentioned that your organization did have a firewall. You said you can ping your gateway (which is on the same subnet as your BeagleBone), but can you ping your DNS servers? Can you ping anything not on your immediate subnet? Is it possible that your organization’s routers are setup to block unknown hosts or ports? At this point your configuration does not immediately appear to be the issue, so I would investigate those next. At my last company ports were tied to specific MAC addresses, so rogue devices could DHCP an address, but could not actually reach any other machines. Just a thought.

Ah, I didn’t realize you were using connman for your network configuration. Changing the nameserver with connman doesn’t seem to change anything in the /etc/resolv.conf file, so no worries there. If your Nameservers [] field is updated when you execute “get-services”, you should be ok.

I checked the output of my “get-services” against yours and the only difference is that your “State = ready” and my “State = online”. From this link:

http://comments.gmane.org/gmane.linux.network.connman/10238

it appears that the transition to “online” only occurs when it is able to fetch the page indicated in the link. So if you don’t have internet connectivity (which your previous posts indicate you don’t), that would explain why your status hasn’t transitioned. Also, since you’re using DHCP, your server seemed to be serving you a couple perfectly good nameservers (presumably, since they’re the same ones that were handed to your XP box).

In a previous post you mentioned that your organization did have a firewall. You said you can ping your gateway (which is on the same subnet as your BeagleBone), but can you ping your DNS servers?

Thanks for replying Mike.
I tried pinging the nameservers. Is that what you meant by pinging DNS server?

root@beaglebone:~# /usr/lib/connman/test/get-services
[ /net/connman/service/ethernet_78c5e5b1079c_cable ]
IPv6.Configuration = { Method=auto Privacy=disabled }
AutoConnect = false
Name = Wired
Nameservers = [ 148.179.202.16 151.110.50.27 151.110.50.28 ]
Provider = { }
Favorite = true
Domains.Configuration = [ ]
State = ready
Proxy = { Method=direct }
Nameservers.Configuration = [ ]
IPv4 = { Netmask=255.255.255.0 Gateway=148.179.243.254 Method=dhcp Address=1
48.179.243.143 }
IPv6 = { }
Domains = [ napa.ad.etn.com ]
Ethernet = { Interface=eth0 MTU=1500 Method=auto Address=78:C5:E5:B1:07:9C }

Security = [ ]
Proxy.Configuration = { }
Type = ethernet
Immutable = false
IPv4.Configuration = { Method=dhcp }

root@beaglebone:~# ping 148.179.202.16
PING 148.179.202.16 (148.179.202.16) 56(84) bytes of data.
64 bytes from 148.179.202.16: icmp_req=1 ttl=127 time=0.367 ms
64 bytes from 148.179.202.16: icmp_req=2 ttl=127 time=0.366 ms
64 bytes from 148.179.202.16: icmp_req=3 ttl=127 time=0.427 ms
^C
— 148.179.202.16 ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.366/0.386/0.427/0.036 ms

root@beaglebone:~# ping 151.110.50.27
PING 151.110.50.27 (151.110.50.27) 56(84) bytes of data.
64 bytes from 151.110.50.27: icmp_req=1 ttl=122 time=343 ms
64 bytes from 151.110.50.27: icmp_req=2 ttl=122 time=343 ms
64 bytes from 151.110.50.27: icmp_req=3 ttl=122 time=345 ms
^C
— 151.110.50.27 ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 343.293/343.984/345.031/0.752 ms

root@beaglebone:~# ping 151.110.50.28
PING 151.110.50.28 (151.110.50.28) 56(84) bytes of data.
64 bytes from 151.110.50.28: icmp_req=1 ttl=120 time=349 ms
64 bytes from 151.110.50.28: icmp_req=2 ttl=120 time=355 ms
64 bytes from 151.110.50.28: icmp_req=3 ttl=120 time=349 ms
^C
— 151.110.50.28 ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 349.518/351.512/355.103/2.544 ms

This shows that I can ping my nameservers.

Can you ping anything not on your immediate subnet?

I can ping my company’s url. But I am assuming that is also on my immediate subnet.

Is it possible that your organization’s routers are setup to block unknown hosts or ports?

Yes it might be possible. At this moment, I am not aware.

At this point your configuration does not immediately appear to be the issue, so I would investigate those next. At my last company ports were tied to specific MAC addresses, so rogue devices could DHCP an address, but could not actually reach any other machines. Just a thought.

Thanks & Best Regards,
Siddharth Kabra

So you can ping hosts on your subnet, and you are being routed (through your default gateway) to hosts on other subnets (i.e. your nameservers), and you can even ping your own company’s URL, which would likely indicate that your nameservers are resolving that for you. But you can’t ping external hosts via hostname or direct IP (i.e. the Google IP I gave you to try before). This sounds like it’s not an issue with your BeagleBone config, but more likely a routing issue internal to your company. I would contact your IT folks to see if they can help you figure it out.

So you can ping hosts on your subnet, and you are being routed (through your default gateway) to hosts on other subnets (i.e. your nameservers), and you can even ping your own company’s URL, which would likely indicate that your nameservers are resolving that for you. But you can’t ping external hosts via hostname or direct IP (i.e. the Google IP I gave you to try before). This sounds like it’s not an issue with your BeagleBone config, but more likely a routing issue internal to your company. I would contact your IT folks to see if they can help you figure it out.

Thanks, I will do that and will let you know.

Hello All,

Thanks for all the help that was offered to me.

Finally, I could get the internet on beaglebone working! Now, I am able to ping any site outside the intranet. The problem was my company’s firewall, as rightly suggested by Mike. The firewall was blocking the access to internet.

Now, the next part of the problem is to transfer data from my laptop to the beaglebone.I have a laptop with windows 7 OS installed. I want to transfer data from the laptop to the beaglebone. For starting, I want to transfer any random number. Please help! It seems like another naive issue, but I would appreciate any help in this regard.

Please let me know if any details are required.

Thanks & Best Regards,
Siddharth