Community discussions

MUM Europe 2020
 
WirelessRudy
Forum Guru
Forum Guru
Topic Author
Posts: 3089
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Discrapancy manual netmapping

Tue May 04, 2010 1:27 am

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.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8319
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Discrapancy manual netmapping

Tue May 04, 2010 12:41 pm

yep, you should use a.b.c.d/N notation for to-addresses in netmap...
Russian-speaking forum: https://forum.mikrotik.by/. Welcome!

For every complex problem, there is a solution that is simple, neat, and wrong.

MikroTik. Your life. Your routing.
 
WirelessRudy
Forum Guru
Forum Guru
Topic Author
Posts: 3089
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: Discrapancy manual netmapping

Sun Feb 24, 2013 3:42 pm

Weird, today only received e-mail notification about the answer to my post. Almost 3 years after the post and answer where made........ :o
Show your appreciation of this post by giving me Karma! Thanks.

Rudy R. Puister

WISP operator based on MT routerboard & ROS.
 
User avatar
macsrwe
Long time Member
Long time Member
Posts: 655
Joined: Mon Apr 02, 2007 5:43 am
Location: Arizona, USA
Contact:

Re: Discrapancy manual netmapping

Sun Feb 24, 2013 9:50 pm

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.)
 
WirelessRudy
Forum Guru
Forum Guru
Topic Author
Posts: 3089
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: Discrapancy manual netmapping

Mon Feb 25, 2013 1:32 am

OK, I understand the 'delayed' notification now.... :)
Show your appreciation of this post by giving me Karma! Thanks.

Rudy R. Puister

WISP operator based on MT routerboard & ROS.

Who is online

Users browsing this forum: MSN [Bot] and 97 guests