ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How to Connect 3 Networks With Ethernet and WIFi/VPN?

asked 2020-12-22 11:45:22 -0600

adrianabeyta gravatar image

updated 2020-12-22 13:51:38 -0600

I have two computers on a robot that are directly connected via Ethernet. Called" Magni" and "Jetson". The roscore is running on the Magni. Some nodes are running on the Magni and some are on the Jetson. Magni is connected to a wireless network. On this wireless network, there is a third computer "PC" that is connected to the Magni via Wireguard VPN.

NetWorkSetUp

The goal is to be able to send and receive messages from all components of the system to one another. The Magni - Jetson and Magni - PC pairs can ping, discover, and publish to each other and I think have their ROS_IP/MASTER_URI set correctly. The issue I am having is communication between my PC and the Jetson. I attempted to do some IP forwarding. Where first on the jetson I added a route from the static 192.168.131.1 IP to the Magni's VPN 10.0.0.161. After doing so I am able to ping the Magni's VPN address 10.0.0.161 from the jetson.

sudo route add -net 10.0.0.0  netmask 255.255.255.0 gw 192.168.131.1

Then on my PC, I attempted to add a similar route...

sudo route add -net 192.168.131.0  netmask 255.255.255.0 gw 10.0.0.161

From my PC I then tried to communicate with the jetson (via ping). However, I am not able to successfully communicate with the Jetson. I have also tried other routes to no avail. I was wondering if someone could point me in the right direction as to how to resolve this issue.

PC's Kernel IP routing table

Destination   Gateway     Genmask       Flags Metric Ref    Use Iface

0.0.0.0           10.147.x.x      0.0.0.0         UG   600    0        0  wlp2s0

10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 wg0

10.147.x.x      0.0.0.0         255.255.0.0     U     600    0        0 wlp2s0

169.xxx.x.x     0.0.0.0         255.255.0.0     U     1000   0        0 wlp2s0

192.168.131.0   10.0.0.161      255.255.255.0   UG    0      0        0 wg0

Magni's Kernel IP routing table

 Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

    0.0.0.0         10.147.x.x      0.0.0.0         UG    600    0        0 wlan0

    10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 wg0

    10.19.xxx.xxx   10.147.x.x      255.255.255.255 UGH   600    0        0 wlan0

    10.147.x.x      0.0.0.0         255.255.0.0     U     600    0        0 wlan0

192.168.131.0   0.0.0.0         255.255.255.0   U     0      0        0 enxb827eb452fa3

Jetson's Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

10.0.0.0           192.168.131.1   255.255.255.0   UG    0      0        0 ...
(more)
edit retag flag offensive close merge delete

Comments

to be honest this is a routing / network configuration problem, and not something specific to ROS. I understand why you posted here on ROS Answers, but it may be more efficient to ask your question elsewhere (with a focus on networking), as that would probably garner quite a few more answers.

ROS Answers is really about questions about ROS.

gvdhoorn gravatar image gvdhoorn  ( 2020-12-23 13:49:15 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-05-01 09:39:06 -0600

rafix89 gravatar image

bridge a wifi card with ethernet on the middle pc

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2020-12-22 11:45:22 -0600

Seen: 414 times

Last updated: May 01 '21