Discrapancy manual netmapping

Copied Wiki example in router:

/ip firewall nat add chain=dstnat dst-address=11.11.11.1-11.11.11.254
action=netmap to-addresses=2.2.2.1-2.2.2.254

/ip firewall nat add chain=srcnat src-address=2.2.2.1-2.2.2.254
action=netmap to-addresses=11.11.11.1-11.11.11.254


Feedback:
/ip firewall nat add chain=dstnat dst-address=11.11.11.1-11.11.11.254
... action=netmap to-addresses=2.2.2.1-2.2.2.254
failure: netmap action requires to-address be whole network
[adminrudy@RB1000 WAN Gateway] >
[adminrudy@RB1000 WAN Gateway] > /ip firewall nat add chain=srcnat src-address=2.2.2.1-2.2.2.254
... action=netmap to-addresses=11.11.11.1-11.11.11.254
failure: netmap action requires to-address be whole network

Conclusion: Correction needed in Manual! Need to work with /24 setting.

Tried also with real life networks and by adding data in winbox. Results are all the same. Only /24 networks work.

yep, you should use a.b.c.d/N notation for to-addresses in netmap…

Weird, today only received e-mail notification about the answer to my post. Almost 3 years after the post and answer where made… :astonished:

Actually, that was my fault. I was having the same problem. I posted an entry saying so, then realized I hadn’t fully understood Chupaka’s advice when I finally solved it, so I deleted it.

The answer is that you have to netmap an entire range – for example .0 to .255. You can’t netmap .1 to .254, because although this would appear to be a “safer” practice, that’s not what MT OS expects.

In my case, I was trying to netmap 192.168.1.128/28, and I was trying to do it the same way, that is, mapping .129 through .142. I had misinterpreted Chupaka’s advice as saying I should just add /28 at the end of the addresses, e.g., “192.168.1.129/28-192.168.1.142/28” and MT OS rejected any combination of that I tried, so I posted a message. Shortly after, I tried “192.168.1.128-192.168.1.143”, which not only worked, but MT OS shortened it to “192.168.1.128/28” – at which point the lightbulb went on in my head, and I deleted my post.

Anyway, last night I successfully used one-to-one mapping to evade the “802.11 level 2 bridging issue” (a problem I abandoned two years ago) and put together a wireless relay unit to extend a non-MikroTik LAN to a client’s outbuilding. (This is usually easy to do with WDS or “station bridge,” but only if the client’s original router is a MikroTik, which it isn’t.)

OK, I understand the ‘delayed’ notification now… :slight_smile: