Static bidirectional static NAT for duplicate IP devices using iptables

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

 



Hello,

I am sure this was addressed before, I tried to find relevant
information but could not. I appreciate any assistance.

Constraints

* Two devices with the same IP, this cannot be changed.
* Devices do not have a default router, they must communicate with
applications on the same IP network.
* Host applications should access the two devices using UDP and TCP
based protocols.

Network Solution

* To avoid address conflict, each device resides on a different VLAN.

APPLICATION -->
Kernel -->
* v10@eth0 - interface on VLAN=10
* v11@eth0 - interface on VLAN=11

Switch -->
* Port1 VLAN=10
  * DEVICE1 [10.0.0.10]
* Port2 VLAN=11
  * DEVICE2 [10.0.0.10]

Diagram [In fixed width font]:
---
,-----------+--------.       ,----------+-+--------.
|           |v10@eth0|.......|          |1|VLAN=10 |---DEVICE1 [10.0.0.10]
|APPLICATION|    eth0|-------|   Switch +-+--------+
|           |v11@eth0|.......|          |2|VLAN=11 |---DEVICE2 [10.0.0.10]
`-----------+--------'       `----------+-+--------'
---

I would like to have a bidirectional static NAT so that per
application point of view:
* DEVICE1 will be 192.168.110.10
* DEVICE2 will be 192.168.111.10
And per device point of view:
* APPLICATION will be 10.0.0.11

I thought of having v10@eth0 address 192.168.110.1 and v11@eth0
address 192.168.111.0, however, I am unsure how to set up the
bidirectional translation to the device virtual address using SNAT
without creating duplicate addresses.

Any assistance will be appreciated.

Regards,
Alon Bar-Lev




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux