The document discusses bandwidth control and load balancing for ISP setup using MikroTik. It describes how to control bandwidth for YouTube cache and BDiX by creating queues based on destination addresses. It also explains a three step process for load balancing traffic across two ISPs by marking connections and routes for each ISP and adding routes. Regular ping checks can also provide link redundancy and failover if a connection is lost.
1 of 44
Downloaded 141 times
More Related Content
Class 5
1. ISP Setup using MikroTik
Class - V
Youtube Cache / BDiX BW Control, Mangle,
Load Balancing, Link Redundancy with Failover
M Abdullah Al Naser
B.Sc in CSE
CCNA, RHCE, RHCSA, MTCNA
2. Youtube Cache Bandwidth Control
2
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
Now a days we can have Youtube Cache bw
from our ISP/IIG. Upstream service providers
deliver us Youtube Cache bw from their Cache
server, for this we must have the IP block of
that Cache server from where our upstream is
providing us the Cache bandwidth. And we
have to mention that specific DST IP block in
QUEUE
7. BDiX Bandwidth Control
7
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
Now a days we can also have BDiX bw from our
ISP. Unlike Youtube Cache BDiX has hundreds of
routes/IP blocks (currently 1500+). And for these
large numbers of routes we can¡¯t create queue
using DST-Address like Youtube Cache. To do this
we have to collect all the routes from our ISP and
create a ADDRESS-LIST to bundle all the routes.
And then we need to Mark all the packets from
and/or to those destinations. And finally create
queue using the marked packets to shape bw.
25. Load Balancing
25
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
If we have two ISP connected to our MikroTik
then we can load balance the traffic.
27. Load Balancing
27
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
To do this:
Step - 1: Mark Connection for Each ISP
Step - 2: Mark Routing individually using
Marked Connection for Each ISP
Step - 3: Add Routes
28. Load Balancing Step - 1
28
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
29. Load Balancing Step - 1
29
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
30. Load Balancing Step - 1
30
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
31. Load Balancing Step - 1
31
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
32. Load Balancing Step - 1
32
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
33. Load Balancing Step - 2
33
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
34. Load Balancing Step - 2
34
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
35. Load Balancing Step - 2
35
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
36. Load Balancing Step - 2
36
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
37. Load Balancing
37
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
In Step -1 and Step -2, we marked the
connections and routes respectively to ensure
that, the outgoing packet will go only through
that link through which link it came.
Thus we can minimize latency/packet loss
issue and enhance overall performance.
39. Load Balancing Step - 3
39
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
40. Load Balancing Step - 3
40
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
41. Load Balancing Step - 3
41
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
42. Load Balancing Step - 3
42
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
Why Double Gateway entries to ISP A and
Triple Gateway entries to ISP B ??
Because in this topology we have 4 Mbps bw
in ISP A and 6 Mbps bw in ISP B.
ISP A : ISP B = 4 : 6
= 2 : 3 (4 and 6 both can be divided by 2)
You need to calculate exact number of gateway entries during
you r real time configuration
43. Load Balancing Step - 3
43
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
If we use Check Gateway: Ping option then
router will send ICMP to the gateway on a
regular interval and will check ping response. If
there is no ping response to a gateway then the
route will be de-active for that corresponding
link and traffic will go through another link. Thus
we can ensure Link Redundancy with Failover.
In this case, if we have any SRC-NAT rules using
MASQUERADE, then any OUT-INTERFACE
shouldn¡¯t be mentioned in that rules.
44. Thank you very much
44
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)