User Tools

Site Tools



ContentAutomatic ModeOperating Mode

  • R2Rnet

The R2Rnet supports roaming trains traveling from system to system.
This technology can be usefull for XXL layouts or modular setups.

Boundaries of Rocrail systems should be also power district boundaries; A roaming train will be set to zero velocity if it has left a system.

UDP Multicast

R2Rnet uses the UDP Multicast protocol for communicating with all systems.
Note: Some routers/switches do not handle UDP Multicast; Check for supported hardware.

Mobile clients

Mobile clients like andRoc and WIO will write a R2RNet request for available server connections. All enabled R2RNet servers will respond to this with hostname, port and plan title.
See the Enable option.

The Picture


NetRoutes are stored in a separate file, and are provided by only one system in the R2Rnetwork; The other systems will request them.

Every system has its own namespace which is used in setting up the netroutes.
Block "b1" for system "r1" is formatted like this: "r1::b1"
Roaming train "NS2403" on system "r1" will be prefixed on all other systems like this: "r1::NS2403"

Example NetRoutes

    <st id="r1::b2-r2::b1" bka="r1::b2" bkb="r2::b1"/>
    <st id="r2::b2-r1::b1" bka="r2::b2" bkb="r1::b1"/>



Server ID.


UDP Multicast IP address, default


UDP Multicast IP port, default 8051.

Local IP

Only required if the PC has more than one network interfaces installed; In all other cases: Leave empty!
IP address of the PC's network interface which is used for communication with the WIOs to make sure the traffic runs on the right one.


The NetRoutes file name in case this server is route master.


If the NetRoutes file does not exist locally, it will be requested periodically.


Enable R2Rnet.
This option should be set in case clients are trying to look up a Rocrail Server. (Rocview, andRoc, WIOesp, WIOpi)

Every Rocrail system must be setup with an unique client connection, so if one or more systems reside on the same computer they should use different port numbers.

  <tcp port="8051"/>

The rocrail.ini's need to be extended with a r2rnet node:

  <r2rnet id="r1" enable="true" port="8051"/>

Note: Make sure that no other service is running on the same port!


All playing systems must be started and initialized according the real situation on the layout and activating the auto mode.
Only one system should have access to the netroutes file to prevent conflicts.
The rest of the operation equals to running a layout stand alone.

Open Issues

  • Remote switch commands in NetRoutes.
  • Signal commands for the exiting (remote)block.
  • Second next block at system boundaries.


Mobile Client Support

Make sure the DHCP client setup is correct to announce the IP address to mobile clients.

Ubuntu & DHCP

Check the /etc/dhcp/dhclient.conf or /etc/dhcp3/dhclient.conf file if the following line is active and set to the right MAC address:

send host-name "<hostname>";
send dhcp-client-identifier 00:1b:9e:44:5f:cb;

The MAC address, HWaddr, can be obtained with ifconfig:

eth0      Link encap:Ethernet  HWaddr 00:1a:92:fc:0d:5d  
wlan0     Link encap:Ethernet  HWaddr 00:1b:9e:44:5f:cb  
networking-en.txt · Last modified: 2023/04/06 08:01 by rjversluis