I’m seeing a similar issue with a BBAI.
However, on my host Ubuntu 18 system, I am seeing the network ports from the BB in the routing table.
$ sudo netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 wlan0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 wlan0 172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0 192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0 192.168.6.0 0.0.0.0 255.255.255.0 U 0 0 0 usb0 192.168.7.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
On the BB: # netstat -rn
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 192.168.7.1 0.0.0.0 UG 0 0 0 usb0 192.168.6.0 0.0.0.0 255.255.255.0 U 0 0 0 usb1 192.168.7.0 0.0.0.0 255.255.255.0 U 0 0 0 usb0 192.168.8.0 0.0.0.0 255.255.255.0 U 0 0 0 SoftAp0
Running tcpdump on my Ubuntu system, I can see where the incoming traffic from the BB is reaching the correct IP on the host but does not seem to be getting routed out.
On BB:
# ping -I usb0 8.8.8.8
On Host:
$ sudo tcpdump -nvvi wlan0 ‘icmp[icmptype] == icmp-echo or icmp[icmptype] == icmp-echoreply’ tcpdump: listening on wlan0, link-type EN10MB (Ethernet), capture size 262144 bytes 08:55:34.027628 IP (tos 0x0, ttl 115, id 44071, offset 0, flags [DF], proto ICMP (1), length 84) 192.168.2.216 > 8.8.8.8: ICMP echo request, id 1402, seq 1, length 64 08:55:34.049037 IP (tos 0x20, ttl 52, id 0, offset 0, flags [none], proto ICMP (1), length 84) 8.8.8.8 > 192.168.2.216: ICMP echo reply, id 1402, seq 1, length 64 08:55:35.049654 IP (tos 0x0, ttl 115, id 44297, offset 0, flags [DF], proto ICMP (1), length 84) 192.168.2.216 > 8.8.8.8: ICMP echo request, id 1402, seq 2, length 64 08:55:35.067301 IP (tos 0x20, ttl 52, id 0, offset 0, flags [none], proto ICMP (1), length 84)
It seems that something either on the Ubuntu side or in the network is blocking the traffic.
Okay, I solved my issue by adding an iptable entry for the return from wlan0 to eth1 (BB).
sudo iptables -A FORWARD -i wlan0 -o eth1 -j ACCEPT
Now pinging ‘8.8.8.8’ from the BB works as expected.
root@beaglebone:~# ping -I usb0 8.8.8.8 PING 8.8.8.8 (8.8.8.8) from 192.168.7.2 usb0: 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=103 time=17.9 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=103 time=15.8 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=103 time=15.3 ms 64 bytes from 8.8.8.8: icmp_seq=4 ttl=103 time=15.7 m
But ,the above instructions apparently doesn’t save the configuration , and the default gateway disappears after the BBB is rebooted.
So I have to execute this command sudo /opt/scripts/network/usb_linux_usb0_ics.sh every reboot.
Do I still need to save the config in /etc/network/interfaces something like :
iface usb0 inet static
address 192.168.7.2
netmask 255.255.0.0
network 192.168.7.0
gateway 192.168.7.1
OR
does it have to be through a bash script which runs has to be set to autorun mode after boot ?
A lot has changed with the 4-6 release. Don’t fool around with /etc/network/interfaces or /etc/resolv.conf.
As debian user in the home directory. cd ~/
mkdir cronjobs
copy the attached file into cronjobs
cd cronjobs
Read the top of the file postboot.sh
The following must be done as sudo because the user level will not have permission.
.
sudo crontab -e
Make entry as explained in postboot.sh
This entry will execute at boot time and sleep 20 seconds to allow the system to be up.
This may seem complicated. The reason for this setup is you can later if needed make other cronjobs
as you or as sudo. Remember full pathnames and any executed commands requiring sudo access
will need to be added as sudo crontab -e. If you want a user level cronjob just do crontab -e
When this script runs at boot time it will create a file called log. You can cat log to see the results of
the current boot. postboot.sh also updates the system date/time. Please nano or vi postboot.sh and
verify your Country / Time Zone.
So, backup original cp /etc/network/interfaces ~/. Then clean up using sudo nano /etc/network/interfaces
The only two active entries should be:
Ken
Thank you so much ! It looks it helped.I was able to successfully ping dns server names with no issues !
So I copied the postboot.sh as you suggested.
did “sudo crontab -e”
Added the following in the file" @reboot sh /home/debian/cronjobs/postboot.sh 1>/home/debian/cronjobs/log 2>/home/debian/cronjobs/log "
Did a reboot.
The following is the log file :
=== Boot ===
Set Nameserver and Gateway
Nameserver 8.8.8.8, GW 192.168.7.1
Set route with gw 192.168.7.1
Display route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.7.1 0.0.0.0 UG 0 0 0 usb0
192.168.6.0 0.0.0.0 255.255.255.0 U 0 0 0 usb1
192.168.7.0 0.0.0.0 255.255.255.0 U 0 0 0 usb0
Set timezone
Local time: Mon 2020-05-18 18:44:27 PDT
Universal time: Tue 2020-05-19 01:44:27 UTC
RTC time: Tue 2020-05-19 01:44:27
Time zone: America/Los_Angeles (PDT, -0700)
System clock synchronized: no
NTP service: active
RTC in local TZ: no
Finished at Mon 18 May 2020 06:44:27 PM PDT
When I open the 192.168.7.2 page in my browser(chrome and Firefox ) It takes me to a cloud9 IDE ,inside which a introduction.md file is shown which tells me to update my OS on my BBB(although it has the latest Debian) .
And if I do go on to the “getting started” page via the cloud9 IDE NONE of the steps are highlighted in green.
Again I am able to successfully ping my PC host and BBB successfully. As a matter of fact I was able to run the program to blink LED which worked . But just the fact that I don’t see the same stuff that people do makes me think of there’s something wrong
Rajesh,I am sorry I can not duplicate this problem. I do know changes were made to default port numbers I.E. 80,8080,3000,etc.and one package was retired. Um, You mention Firefox which is what I use . Do you have ‘No Script’ loaded? If so make sure Beaglebone (192.168.7.2) is set to trusted.
Beyond this I would suggest opening a new report and stop adding to USB problem.
I have the exact same setup: Windows 10 PC as host connecting to a headless BBB via USB. And experiencing the same issue for the past 1 week with no resolution yet.
After changing the crontab and rebooting my log file is as follows:
debian@beaglebone:~/cronjobs$ uname -r
4.19.94-ti-r42
debian@beaglebone:~/cronjobs$ cat log
=== Boot ===
Set Nameserver and Gateway
Nameserver 8.8.8.8, GW 192.168.7.1
Set route with gw 192.168.7.1
Display route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.7.1 0.0.0.0 UG 0 0 0 usb0
192.168.6.0 0.0.0.0 255.255.255.0 U 0 0 0 usb1
192.168.7.0 0.0.0.0 255.255.255.0 U 0 0 0 usb0
Set timezone
Local time: Mon 2020-04-06 16:43:42 EDT
Universal time: Mon 2020-04-06 20:43:42 UTC
RTC time: Sat 2000-01-01 05:00:57
Time zone: America/New_York (EDT, -0400)
System clock synchronized: no
NTP service: active
RTC in local TZ: no
Finished at Mon 06 Apr 2020 04:43:42 PM EDT
debian@beaglebone:~/cronjobs$
Still I could not ping dns server. “ping 8.8.8.8” is timing out.