Setup guide
Thus, the network administrator is able to allocate a definite portion of the total data rate and grant
it to a particular network segment or interface. Also the data rate of particular nodes can be limited
by using this mechanism.
Example of Emulating a 128k/64k Line
Assume we want to emulate a 128k download and 64k upload line connecting IP network
192.168.0.0/24. The network is served through the Local interface of customer's router. The basic
network setup is in the following diagram:
The IP addresses and routes of the Wandy router are as follows:
[admin@Wandy] ip address> print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 192.168.0.254/24 192.168.0.0 192.168.0.255 Local
1 10.0.0.254/24 10.0.0.0 10.0.0.255 Public
[admin@Wandy] ip address> /ip route print
Flags: X - disabled, I - invalid, D - dynamic, J - rejected,
C - connect, S - static, r - rip, o - ospf, b - bgp
# DST-ADDRESS G GATEWAY DISTANCE INTERFACE
0 S 0.0.0.0/0 r 10.0.0.1 1 Public
1 DC 192.168.0.0/24 r 0.0.0.0 0 Local
2 DC 10.0.0.0/24 r 0.0.0.0 0 Public
[admin@Wandy] ip address>
Assume you want to limit the data rate to 128kbps on downloads and 64kbps on uploads for all
hosts on the LAN. Data rate limitation is done by applying queues for outgoing interfaces regarding
the traffic flow. It is enough to add a single queue rule at the Wandy router to limit the download
and upload data rate:
[admin@Wandy] queue simple> add name=LimitClients interface=Local \
\... max-limit=131072/65536
[admin@Wandy] queue simple> print
Flags: X - disabled, I - invalid, D - dynamic
0 name="LimitClients" target-address=0.0.0.0/0 dst-address=0.0.0.0/0
interface=Local queue=default priority=8 limit-at=0/0
max-limit=131072/65536
[admin@Wandy] queue simple>
Leave all other parameters as set by default. The limit is approximately 128kbps going to the LAN
and 64kbps leaving the client's LAN. Please note, that the queues have been added for the outgoing
interfaces regarding the traffic flow. As you can see, the two values for the max-limit parameter
sets download data rate to 128kbps and upload to 64kbps.
To monitor the traffic flow through the interface while doing file transfer, use the /interface
monitor-traffic command:
[admin@Wandy] queue simple> /interface monitor-traffic Local
received-packets-per-second: 7
received-bits-per-second: 62.2kbps
sent-packets-per-second: 12
sent-bits-per-second: 125kbps
[admin@Wandy] queue simple>
If you want to exclude the server from being limited, add a queue for it without limitation
(max-limit by default is 0/0) and move it to the top:
[admin@Wandy] queue simple> add name=Server interface=Local \
\... dst-address=192.168.0.17/32
[admin@Wandy] queue simple> print
Flags: X - disabled, I - invalid, D - dynamic
0 name="LimitClients" target-address=0.0.0.0/0 dst-address=0.0.0.0/0
interface=Local queue=default priority=8 limit-at=0/0
max-limit=131072/65536