![MikroTik RouterOS v2.9 Reference Manual Download Page 53](http://html1.mh-extra.com/html/mikrotik/routeros-v2-9/routeros-v2-9_reference-manual_1794644053.webp)
To set up routing, it is required that you have some knowledge of configuring TCP/IP networks. We
strongly recommend that you obtain more knowledge, if you have difficulties configuring your
network setups.
Advanced Configuration Tasks
Description
Next will be discussed situation with 'hiding' the private LAN 192.168.0.0/24 'behind' one address
10.0.0.217 given to you by the ISP.
Application Example with Masquerading
If you want to 'hide' the private LAN 192.168.0.0/24 'behind' one address 10.0.0.217 given to you
by the ISP, you should use the source network address translation (masquerading) feature of the
MikroTik router. Masquerading is useful, if you want to access the ISP's network and the Internet
appearing as all requests coming from the host 10.0.0.217 of the ISP's network. The masquerading
will change the source IP address and port of the packets originated from the network
192.168.0.0/24 to the address 10.0.0.217 of the router when the packet is routed through it.
Masquerading conserves the number of global IP addresses required and it lets the whole network
use a single IP address in its communication with the world.
To use masquerading, a source NAT rule with action 'masquerade' should be added to the firewall
configuration:
[admin@MikroTik] ip firewall nat> add chain=srcnat action=masquerade
out-interface=Public
[admin@MikroTik] ip firewall nat> print
Flags: X - disabled, I - invalid, D - dynamic
0
chain=srcnat out-interface=Public action=masquerade
Notes
Please consult
Network Address Translation
for more information on masquerading.
Example with Bandwidth Management
Assume you want to limit the bandwidth to 128kbps on downloads and 64kbps on uploads for all
hosts on the LAN. Bandwidth limitation is done by applying queues for outgoing interfaces
regarding the traffic flow. It is enough to add a single queue at the MikroTik router:
[admin@MikroTik] queue simple> add max-limit=64000/128000 interface=Local
[admin@MikroTik] queue simple> print
Flags: X - disabled, I - invalid, D - dynamic
0
name="queue1" target-address=0.0.0.0/0 dst-address=0.0.0.0/0
interface=Local queue=default/default priority=8 limit-at=0/0
max-limit=64000/128000 total-queue=default
[admin@MikroTik] queue simple>
Leave all other parameters as set by default. The limit is approximately 128kbps going to the LAN
(download) and 64kbps leaving the client's LAN (upload).
Example with NAT
Page 39 of 695
Copyright 1999-2007, MikroTik. All rights reserved. Mikrotik, RouterOS and RouterBOARD are trademarks of Mikrotikls SIA.
Other trademarks and registred trademarks mentioned herein are properties of their respective owners.