Using a RouterBoard like a serial terminal server

Hi,

I don’t want this to appear as a request for free consultancy - I’ve set myself this challenge and need some pointers to get me going…

I’m an IT analyst who develops MES and MIS systems for manufacturing companies and I have a particular scenario which I think RouterOS should be able to solve but haven’t quite figured out where to start. I have a RouterBoard 450G with v6.34.2 installed to play with. I’ve been in the job 20 years and know a little about networking but this is a deep dive for me :slight_smile:

My challenge…

I have a number of areas in a factory that have 4 Ethernet-enabled devices each. 2 are barcode scanners where we use a TCP/IP protocol to set and read back the contents of a barcode which must match the product passing by the scanner. the other 2 are date-coder inkjet printers which spray the best-before-end stamp on the product’s lid.

The printers in particular are on trolleys and can be moved from area to area depending on breakdowns or production issues.

I’d like to:

  1. Set the RouterBoard to have 4 public WAN addresses, as well as the device itself, on Eth1
  2. Map each of these 4 public addresses to a specific LAN port e.g. Eth2, 3, 4, and 5 using 1:1 NAT so all IP ports map.
  3. Configure the barcode readers and printers to have a fixed IP address, if possible. Changing the devices’ addresses is cumbersome. DHCP likewise.

In this way, the external TCP/IP address, as used by our software, would map directly to the port the device was plugged into, not the address in the device itself. This would mean that, if a device moved from area 2 to area 3, the device would belong to area 3 with no configuration changes.

Is this possible?
If I gave all the devices the fixed IP address of 10.0.0.1 (for example), and configured VLANs on each of the LAN ports, and somehow map the external address to this port, and map the 1:1 NAT on top, would this allow the traffic to be separated?

My analogy was the old RS-232 serial/Ethernet servers so the function of the device was based on the physical socket it was plugged into, but to extend the logic so each physical socket would have its own IP address and all IP ports.

Many thanks in advance, Barry.