Network setup for multiple ethernet ports
Currently, I'm considering below multi-machine topology using ros1.
img-alt-link:https://photos.app.goo.gl/RyRpa77DDow...
I assigned static ip to each eth port as below.
- eth-sm1-1: 192.168.0.1
- eth-sm2-1: 192.168.0.2
- eth-mm-1: 192.168.0.3
- eth-mm-2: 192.168.0.4
In the above topology/settings, how do I set ROS_MASTER_URIs of slave machines?
p.s.
The reason why I connect multi-machine directly, rather than using switch is that
- Master machine publishes large size of data
- But the data needed for slave machine 1 is not for slave machine 2, vice versa
- I want full bandwidth through assigning the dedicated eth-line for each slave
Edit: Thank you for your reply.
Could you possibly clarify below settings based on your answer?
I'm still a bit confused.
Assume that all IP assignments follow the above diagram(in the main text)
On slave machne #1
export ROS_MASTER_URI=http://192.168.0.3:11311
export ROS_HOSTNAME=192.168.0.1
On slave machine #2
export ROS_MASTER_URI=http://192.168.0.4:11311
export ROS_HOSTNAME=192.168.0.2
On master machine
export ROS_IP=192.168.0.3
export ROS_MASTER_URI=http://localhost:11311
export ROS_HOSTNAME=$ROS_IP
The point I'm confused about is ROS_IP of master machine.
I've exported one of IP addresses as ROS_IP at the master(192.168.0.3, rather than 192.168.0.4).
In this case, it seem like that slave machine #2 is unreachable from the master since slave machine #2 regards 192.168.0.4 as a master.
Best regards,
An observation:
If you get a good switch, the backplane should have sufficient bandwidth to accommodate packet exchange at full speed over all (most) ports. Layer 2 routing will make sure packets only get sent to where they should go. A hub would broadcast all traffic. A switch does not.