Connectivity between two BBAI64 with Ethernet Switch

Hi,

I have been using ROS on two Beaglebone-AI64’s and would like to have them connect with Ethernet by connecting to a network switch that is not connected to a router of any kind.

I can connect my PC running Ubuntu 22.04.3 to the BB-AI64 also running Ubuntu 22.04.3, but when I try to connect the two BB-AI64s’ together with the switch, they do not see eachother and running ‘arp -a’ only shows the USB IP address used to ssh into the device (192.168.7.2).

Since there is no router connecting these devices, is there a defined process to configure these devices to communicate over Ethernet just through the ethernet switch?

Thank you

You should be able to set all the devices with static IP address. Otherwise you will need a DNS, I am assuming the devices are currently DHCP, they are looking for an assigned IP that will never be issued without a domain name server in the mix.

Might be simpler to use an internet gateway that has a built in DNS server, cheap and simple solution. Or you might set up bind as a private dns server on your host.

1 Like

yes there is. What IP’s are you configuring on the two BB-AI64? I assume that you know about DHCP and how it would NOT work in this instance… post the IP addresses, and netmask that YOU are configuring for the STATIC IP’s on the two BBAI devices…

gomer

do the two devices have different host names ??

Yes.

Yes, the hostnames are different.

Hi,

For one device I am using a static ip of 192.168.65.65/24, and on the other I set a static IP address of 192.168.64.64/24.

I checked the ifconfig output and both devices reflect the changes to the eth0 ip addresses I set and have the same subnet mask.

When I run

arp -a

I can only see 192.168.7.1 active on both devices (I believe since I am using SSH over USB for both devices).

I also used networkctl status eth0 on both devices to check if the changes for disabling DHCP worked, and for both devices I can see:

State: routable (configured)
Online state: online

Attempting to ping either device based on the static IP I gave also does not work.

The only real configuring I did was changing the file /etc/systemd/network/eth0.network to contain:

[Match]
Name=eth0
Type=ether

[Link]
RequiredForOnline=yes

[Network]
DHCP=no
Address=192.168.64.64/24

And the other device has the same except the static IP is 192.168.65.65/24.

Is there anything obvious I missed in this process?
Thanks

this is an incorrect configuration. the ‘/24’ part of the IP indicates that 24 bits of the IP identify the network, and the remaining 8 identify the host. you have specified two DIFFERENT networks 192.168.64 and 192.168.65 … the two hosts will not see each other with this configuration.

if this is your only problem, you might get the two hosts to work by putting them both on the same network. I’m assuming that your switch does not support DHCP, that is why you need static IP’s… but they need to be on the same network (with different host identifiers … of course) … one example that might work is :
192.168.64.10/24
192.168.64.11/24

the .10 part and .11 part are just an example, any two different host id’s >= 1 and <= 254 might work if that is the only problem… In fact, if these are the only two hosts on the network, you might not need a switch at all, just connect both NIC’s with an ethernet cable and see if they can ping each other.

BTW just to round out the instruction, ‘/24’ networks are called ‘class C’, and ‘/16’ networks are ‘class B’. if you changed the ‘/24’ to ‘/16’ in your current configuration that also might work. Class C networks support up to 254 hosts, and Class B networks support 65534 hosts ( ( 64 * 1024 ) - 2 )…

with just two hosts you could connect them with a ‘/30’ IP (CIDR) … ‘/30’ networks support 2 hosts, plus one to identify the network and another IP to identify the broadcast address. try with the ‘class c’ IP’s first …

good luck
gomer

1 Like

Hi Gomer,

Thank you for your insight, changing the static Ip addresses to the examples you mentioned did the trick.

I appreciate the help.

2 Likes