Community discussions

MikroTik App
 
MrTech
just joined
Topic Author
Posts: 1
Joined: Wed Jun 30, 2021 10:12 am

Targeted Routing to same Subnet on differtent layer2 Networks

Wed Jun 30, 2021 12:32 pm

Hello,

I am trying to configure a setup where I am able to reach multiple devices with the same IP Address based on the Hardware Port of my CRS326-24G they are connected to.

All devices are delivered with the IP 192.168.1.1/24 and have no default gateway configured, that's why I need to use NAT.

These Devices are connected to Port 1-20 while the Computer which schould be able to access the devices is conneced to Port 24

The criteria to decide which Hardware Port to use, should be the IP used to connect to the CRS326. That's why I added IP 10.0.0.101-120/24 to Port24

Each Port 1-20 got an IP from the 192.168.1.0/24 assigned. The Ports are pulled from the switch to work as independent interfaces.

What I wanted to do, is to define something like:
/interface list member add interface=ether24 list=WAN
/ip firewall nat add action=masquerade chain=srcnat out-interface-list=WAN
/ip firewall nat add chain=dstnat dst-address=10.0.0.101 action=dst-nat to-addresses=192.168.1.1


last line for every of the 20 Ports

My problem is, that it is not possible to add
out-interface=ether1
to the last rule.

Is there another way to archive this? Maybe bind to to an outgoing IP Address or with multiple routing tables?

Thanks in advance

Who is online

Users browsing this forum: Bing [Bot], miks, patrikg and 82 guests