Hello World,
thanks in advance for your support Mikrotik forum...you're my only hope.
I'm a hardware engineer working for a test engineering company. I designed a test solution for an important defense customer where a MikroTik hEX refresh router was identified as a possible solution for the following problem: connecting two identical devices that have the same fixed IP addresses.
My current setup is:
ether1: PC
ether 2 (or 3, or 5): Terminal 1 - 192.168.1.11...14 and 192.168.2.21...24
ether 4: Terminal 2 - 192.168.1.11...14
For some tests, I need to access a web page (TCP port 80) or ping either device using the same IP address. The IP addresses of the terminals cannot be changed. The idea we came up with was to NAT Terminal 2 to a different IP range, so that a request from the PC to, for example, 192.168.3.11 would be translated to Terminal 2's actual IP 192.168.1.11.
I'm really not into network administration (I have a degree in EE), so my first attempt was to make extensive use of Gemini, ChatGPT, and Claude. They were all in broad agreement and led me to essentially the same configuration, which ultimately resulted in three days of wasted time experimenting with VRF + mangle + NAT.
The closest setup I reached was the following, configured through WinBox:
-
Factory preset (keeping configuration)
-
Changing in Quick-set IP address range from ...1.1 and DHCP range ...100-254 (this way I can use a PC without a static IP). [Now the Terminal 1 register to the bridge]
-
Removing ether4 from the bridge (I use it for Terminal 2), Removing ether1 from DHCP client and adding it to the bridge (I use it for the PC) [now I can use PC with the Terminal 1]
-
IP/VRF adding "vrf-REF" with interface "ether4", then setting IP/Addresses 192.168.1.1/24 to ether4 [now the two overlapping network exists but are isolated]
-
- IP/Firewall/Mangle:
prerouting
in-interface=bridge
dst-address=192.168.3.11
action=mark-routing
new-routing-mark=vrf-REF - IP/Firewall/NAT:
DST-NAT:
dst-address=192.168.3.11
in-interface=bridge
action=dst-nat
to-addresses=192.168.1.11
SRC-NAT:
dst-address=192.168.1.11
out-interface=ether4
action=src-nat
to-addresses=192.168.1.1
[now the things got weird: I can ping Terminal 1 using both 1.11 3.11 but not Terminal 2!] - IP/Firewall/Mangle:
Can someone pinpoint maybe the obvious error and get the things work and get the customer spare my life?
Thanks in advance,
Spaghetto