BeagleBone Black cannot ping 8.8.8.8

15 views
Skip to first unread message

pmi.en...@gmail.com

unread,
Dec 4, 2017, 3:35:36 PM12/4/17
to BeagleBoard
Hi All...

For some time now, I've used the ethernet over USB feature to get updates on my BeagleBone black. This has never  been reliable, but now it just never works.  I have followed through (I think!) the instructions in Derek Molloy's Exploring BeagleBone with no luck.  From the BBB, I can:

ping 192.168.7.1 (~0.4ms)
but cannot:
ping 8.8.8.8 (waits for response but never gets one)

From the Linux (Ubuntu 16.04) I can 
ping 192.168.7.2 (~0.4ms)
ping 8.8.8.8 (~30ms)
ping 192.168.1.1 (between 4 and 40ms)  (this is the household Cisco router)

I have run the following commands:
sudo iptables --append FORWARD --in-interface enxc8fd19c63830 -j ACCEPT
sudo iptables --table nat --append POSTROUTING --out-interface wl01 -j MASQUERADE

and
echo 1 > /proc/sys/net/ipv4/ip_forward  (all that I can see as a result is that the file ip_forward contains "1")


if I try to check what is in the iptables, I see...

pmi-bu-ubuntu@PMI-BU-Ubuntu:/proc/sys/net/ipv4$ sudo iptables -S
[sudo] password for pmi-bu-ubuntu: 
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-N DOCKER
-N DOCKER-ISOLATION
-A FORWARD -j DOCKER-ISOLATION
-A FORWARD -o docker0 -j DOCKER
-A FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i docker0 ! -o docker0 -j ACCEPT
-A FORWARD -i docker0 -o docker0 -j ACCEPT
-A DOCKER-ISOLATION -j RETURN

If I run the following in the PC:

sudo tcpdump ip proto \\icmp

I can see a successful ping to 8.8.8.8 from the PC as:

11:52:41.538173 IP 192.XXX.X.XXX > google-public-dns-a.google.com: ICMP echo request, id 6724, seq 1, length 64

11:52:41.562409 IP google-public-dns-a.google.com > 192.XXX.X.XXX: ICMP echo reply, id 6724, seq 1, length 64

and ifconfig  on the PC produces:


enp0s25   Link encap:Ethernet  HWaddr 2c:44:fd:63:02:cc  

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

          Interrupt:17 Memory:d9500000-d9520000 


enxc8fd19c63830 Link encap:Ethernet  HWaddr c8:fd:19:c6:38:30  

          inet addr:192.168.7.1  Bcast:192.168.7.3  Mask:255.255.255.252

          inet6 addr: fe80::4fd3:88c1:b27b:1219/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:738 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1257 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:146854 (146.8 KB)  TX bytes:220240 (220.2 KB)


lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:65536  Metric:1

          RX packets:2377 errors:0 dropped:0 overruns:0 frame:0

          TX packets:2377 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1 

          RX bytes:331652 (331.6 KB)  TX bytes:331652 (331.6 KB)

wlo1      Link encap:Ethernet  HWaddr 3c:a9:f4:3b:f2:08  

          inet addr:192.XXX.X.XXX  Bcast:192.XXX.X.XXX  Mask:255.255.255.0

          inet6 addr: fe80::3ea9:f4ff:fe3b:f208/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:46544 errors:0 dropped:0 overruns:0 frame:0

          TX packets:32912 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:39848064 (39.8 MB)  TX bytes:5772957 (5.7 MB)

and ifconfig from the BeagleBone produces:
eth0      Link encap:Ethernet  HWaddr c8:fd:19:c6:38:2e  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:40 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0      Link encap:Ethernet  HWaddr 72:61:2e:0f:e2:57  
          inet addr:192.168.7.2  Bcast:192.168.7.3  Mask:255.255.255.252
          inet6 addr: fe80::7061:2eff:fe0f:e257/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1422 errors:0 dropped:0 overruns:0 frame:0
          TX packets:865 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:166261 (162.3 KiB)  TX bytes:214119 (209.1 KiB)

Finally, this is:
BeagleBoard.org BeagleBone Debian Image 2014-05-14

So my questions would be:
1. Does it look like my problem is in the PC or the BeagleBone?  If it's unclear, is there a method to find out?
2. Does it look like my requested changes to the IPtable are going into effect?  If it's unclear, is there a better method to tell?
3. It looks like the PC is simply forwarding on the ping request with no change to the IP address.  I would have thought that the PC would have changed the IP address to find one that isn't being used (I thought that is what masquerade was for).  Is there something I am doing wrong that is preventing this?

Any other advice would also be appreciated.

Thanks very much in advance,
Alan


Reply all
Reply to author
Forward
0 new messages