Beagle Bone Black connecting to internet issue

Hello,
I am trying to connect Debian Bullseye running on Beagle Bone Black to the internet through connecting to the host machine Ubuntu 22.04 running on VMWare through ethernet port.
Set static address 192.168.2.32 in /etc/network/interfaces and set the static address 192.168.2.1 for Ubuntu 22.04 in GUI. But they couldn’t find each other through pinging and both show the error of “Destination Host Unreachable”.
Both green and orange LEDs are on on both sides of the ethernet port. Ifconfig shows that the IP address on both sides are configured correctly.
What might be missing in the settings? I googled the error message, lots of information, but haven’t found anything relevant to Debian 11.
Thanks!
Crane

Assuming you have set the addresses correctly I would suspect it is a VMWare issue. I have never had any issues when using the ethernet port on a BBB. It just works.

How is the VMWare network setup ?

If your BBB is connected via ethernet, can’t it just use that anyway to access the internet. Why trying to go through an Ubuntu machine running in a VM ?

Sounds overly complicated.

can the 22.04 image ping any other host on 192.168.2.x?
have you tried reseating the cable on both ends?
have you tried different cable?
is there an iptables firewall on your host machine?
are you using ‘bridge’ protocol on VMware, or are you using NAT or host only?
what does ifconfig report on the HOST NIC?

good luck
gomer

It is not convenient to connect to the router directly. So want to use Ubuntu machine which can access to the internet through WiFi on the host Windows.
Tried Bridge, NAT and host-only in VMWare network adapter settings, no one works.

It can ping another Ubuntu 22.04 running on a VirtualBox which is running on another Windows connecting to the same router.
I didn’t reseat the cable or try another cable as it is a new cable and I used it two months ago to connect a Raspberry Pi to the same Ubuntu 22.04 on VMWare and it worked fine. I assume the cable is still good.
I used iptables -L -v and it shows no policies in three rows.
I tried bridge, NAT and host only on VMware and all got the same result.
lshw shows two ethernet interfaces, which match the result from ifconfig.

You need to go into hardware > setup > networking and change it to bridged. You will have to close the VM then change it.
Many other issues can be at fault and its tricky to find the issue. Its best to avoid what you are trying to do and just connect it to the ethernet jack.

Also, we run VMware Workstation 17 is that the version you have?

Added after the original reply:

Keep in mind that you will have to power cycle a Windows host when making network changes.

I follow your instructions completely and then it worked for both to find each other. Thank you! It is so experienced of you!

Then, since it fails to ping google.ca and nameserver is in /etc/resolv.conf, I restarted the Debian on the Beagle Bone Black. Then both even can’t ping each other any more.

Some of the internet modems will resolve by hostname, some better than others. Another issue that creates problems is having DHCP reservations active, don’t turn it off if it is on.

Its best to edit your hosts file so you can resolve by host name on both devices.

First get the IP of target and host

$ ip route

on host

$ sudo -i
password



if you do not have sudo installed on debian you can get root by

$ su -
password

# echo "< ip address of target> <host name of target> <host name of target>.local " >> /etc/hosts
# exit

If you want to verify that

$ cat /etc/hosts

echo “192.168.0.2 bbb bbb.local” >> /etc/hosts

you will see something similar to this

fred@xxxxxxx:~$ cat /etc/hosts
127.0.0.1	localhost
127.0.1.1	xxxxxxxx.local	xxxxxxxxxx

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
fred@xxxxxxxxx:~$ 

repeat that on your target made sure you use the >> not single.

Thanks you foxsquirrel for the detailed instruction.

I tried to reboot after not being able to ping google.ca. Then both Debian on Beagle Bone Black and Ubuntu 22.04 on VMWare can’t ping each other any more.
Tried to disconnect the ethernet cable between these two, the same result is showing:
Destination Host Unreachable.
I tested the cable with Raspberry Pi and it works fine. So the cable should be good.

Forgot to say, the VMWare I am using is VMWare Workstation 16 Pro.

You might have to use native linux. I like using VMware, BUT, it does have limitations. Just have to know when to go native and what works fine with VMware. Have you tried Virtualbox, it runs good on a Windows box. Its really hard to troubleshoot routing problems remotely.

Since you have the Pro version it should have all the features enabled.

If BB has explicit instructions regarding using the USB to internet it would be best to replicate that exactly so you have a base line to work from.

Myself, if it does not work within 15 minutes of trying to get it to work its best to move on to another plan.

Something else, on your host and possibly the target

$ sudo ufw status

Make sure the local firewall is not actively blocking.

Might want to check this post out.

I tried VirtualBox again and it works for Ubuntu 22.04 on VirtualBox and Debian on BBB to ping each other.
But still got “Temporary failure in name resolution” issue. I followed your instructions the other day, seems not working.
I will work on that and try to connect to a Linux directly.

By the way, I wonder how Debian with IP address of 192.168.2.32 is able to connect to internet through Ubuntu with IP address of 192.168.2.5, which run on a host with both ethernet port and WiFi. Will work on that as well.

Is the target pointing to the gateway address of your internet modem or IP of the host?

Added gateway IP on Ubuntu in GUI (using “route add …” says "Network is unreachable) and checked through “ip route” that the gateway address is actually added, but still can’t ping google.ca.

Tried to add gateway IP to target Debian, here is the result:
debian@arm:~$ sudo route add default gw 192.168.1.1 eth0
[sudo] password for debian:
SIOCADDRT: Network is unreachable
debian@arm:~$ sudo ip route add default via 192.168.1.51
Error: Nexthop has invalid gateway.
debian@arm:~$

I tried to bypass the virtualBox and set a static IP address of 192.168.2.10 for Windows ethernet and gateway of 192.168.1.1, but it isn’t allowed (not the same network segment).
Using networking settings to config static IP address of 192.168.2.10 and gateway 192.168.1.1 works (just warn "not the same network segment). Then Windows can ping 192.168.2.32 (Debian) and google.ca (internet).
And Debian can ping the Windows (192.168.2.10) , but can’t ping google.ca (temporary failure in name resolution). It also can’t ping 8.8.8.8 (Network is unreachable).