[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How to address hosts in dual ethernet networks?



Hello all,

I'm planning on setting up a small linux PC in an industrial
environment. The PC will act as a bridge between a string of
Ethernet/Modbus devices and a database server. It will run a very
simple application that queries the Modbus devices and relays its
findings to the database. The PC will have two ethernet ports: One
connected to the Modbus devices, the other to the company's intranet.
One port will be assigned an IP address from the intranet's DHCP
server, and the Modbus devices will be assigned addresses in the
192.168 range using a DHCP server on my PC.

So far, very simple.

What I can't figure out is how to separate the IP address spaces in
this PC itself. There are plenty of 192.168 addresses in use in our
intranet, and it is quite possible that addresses will be used both in
the Intranet and in the Modbus space.

Suppose the application wants to talk to the Modbus device
192.168.0.101 on eth1 (where the Modbus devices are connected). How
can I prevent it from connecting to a host on the intranet that
happens to have the same address?

Actually, I know that the hosts that I need to connect to on the
intranet do not have 192.168.... addresses. So I suppose I can set up
the routing table using a network mask or something of the sort. But
what if, hypothetically, I do need to connect to an intranet host
whose IP address happens to be used by a Modbus device as well?

Thanks,
robert


Reply to: