SlideShare a Scribd company logo
14
Most read
18
Most read
20
Most read
www.glcnetworks.com
ISP load balancing with
GLC webinar, 16 november 2017
Achmad Mardiansyah
achmad@glcnetworks.com
GLC Networks, Indonesia
1
ECMP
www.glcnetworks.com
Agenda
● Introduction
● Prerequisite
● Load balancing
● ECMP method
● Demo
● Q & A
2
www.glcnetworks.com
What is GLC?
● Garda Lintas Cakrawala (www.glcnetworks.com)
● An Indonesian company
● Located in Bandung
● Areas: Training, IT Consulting
● Mikrotik Certified Training Partner/Consultant/Distributor
● Ubiquiti Certified Trainer/Consultant
● RedHat Certified Trainer
3
www.glcnetworks.com
About GLC webinar?
● First webinar: january 1, 2010 (title:
tahun baru bersama solaris - new
year with solaris OS)
● As a sharing event with various
topics: linux, networking, wireless,
database, programming, etc
● Regular schedule: every 2 weeks
● Irregular schedule: as needed
● Checking schedule:
http://www.glcnetworks.com/main/sc
hedule
● You are invited to be a presenter
○ No need to be an expert
○ This is a forum for sharing: knowledge,
experiences, information
4
www.glcnetworks.com
Trainer Introduction
● Name: Achmad Mardiansyah
● Base: bandung, Indonesia
● Linux user (since 1999), Mikrotik user (since 2007),
ubnt user (since 2011)
● Certified Trainer (Mikrotik, Ubiquiti, Redhat)
● Certified Consultant
● Work: Telco engineer, Sysadmin, PHP programmer,
and Lecturer
● Personal website: http://achmadjournal.com
● More info:
http://au.linkedin.com/in/achmadmardiansyah
5
www.glcnetworks.com
Please introduce yourself
● Your name
● Your company/university?
● Your networking experience?
● Your mikrotik experience?
● Your expectation from this course?
6
www.glcnetworks.com
Prerequisite
7
www.glcnetworks.com
wait, load balancing is easy...
● Lots of tutorials in internet!!!
● Tons of pages, tutorials, videos
Questions to reader:
● Do you really understand what its
written?
● Did the writer understand what
they wrote?
● Is it really works as expected in
your environment?
8
www.glcnetworks.com
Well if it's easy, why these do not work?
● Information overloaded… which
one suits you?
● Perhaps they have different
network environment compared
to you
● You need to understand how it
works...
9
www.glcnetworks.com
You should understand
● Firewall mangle. See GLC webinar: Mikrotik
firewall mangle
● The differences between:
○ Packet vs Connection
○ Mark: packet / connection / routing
● How routing works: see GLC webinar:
Routing with mikrotik
● How NAT works: see GLC webinar: Mikrotik
firewall NAT
10
www.glcnetworks.com
Load balancing
11
www.glcnetworks.com
What is (traffic) load balancing?
● Is a process to forward traffic on several
links
● Applied on router
● Load balancing != failover
● Can be done on per-packet or
per-connection basis
● This doesnt increase your data rate.
4mbps ISP1 + 4mbps ISP2 -> your
download rate = 8mbps (WRONG!)
Benefits:
● Increase utilisation of upstream links
12
ISP1 ISP2
LAN
ether1 ether2
webserver
ISP3
ether4
R1
www.glcnetworks.com
Load balancing techniques
13
Method Per-connection per-packet
Firewall marking YES YES
ECMP (our focus) YES NO
PCC YES NO
Nth YES YES
Bonding NO YES
OSPF YES NO
BGP YES NO
www.glcnetworks.com
Website contents: single connection
Website with single connection:
http://test.glcnetworks.com
14
14
ISP1 ISP2
LAN
ether1 ether2
ISP3
ether4
R1
www.glcnetworks.com
Website contents: multi connection
15
15
ISP1 ISP2
LAN
ether1 ether2
ISP3
● Client will open multiple connections to get
website components
Connect
ion 1
Connect
ion 2
Connect
ion 3
ether4
R1
www.glcnetworks.com
ECMP technique
16
www.glcnetworks.com
How ECMP works?
ECMP = Equal Cost Multi-Path ECMP. steps:
● ECMP will identify connections from clients
(per-src-dst-address combination)
● ECMP will forward the connection based on
weight/cost of the gateway
● ECMP does persistent per-connection load
balancing
● Its recommended to use “check-gateway” option
● As soon as one of the gateway is not responding,
check-gateway will remove it from gateway list,
and you will have a "failover" effect.
17
ISP1
LAN
ether1
ISP3
conn 1
conn 2
conn 3
ISP2
ether2
ether4
www.glcnetworks.com
ECMP Example
● Using 2 gateways with same cost (e.g. both have same datarate)
/ip route add dst-address=0.0.0.0/0 gateway=10.10.11.1,10.10.12.1
check-gateway=ping
● Using 2 gateways with different cost (e.g. ISP2 is 2 times more than ISP2)
/ip route add dst-address=0.0.0.0/0
gateway=10.10.11.1,10.10.12.1,10.10.12.1 check-gateway=ping
● Using 3 gateways with different cost (e.g. ISP1=1mbps, ISP2=2mbps,
ISP3=3mbps)
/ip route add dst-address=0.0.0.0/0
gateway=10.10.11.1,10.10.12.1,10.10.12.1,10.10.13.1,10.10.13.1,10.10.13.1
check-gateway=ping
18
www.glcnetworks.com
ECMP via GUI
19
www.glcnetworks.com
Some issues
● Beware of NAT connection
○ webserver will see inbound connection from 2 ip public addresses
○ webpage will not displayed correctly (as it is considered illegal session)
○ banking / https / game websites will not allow you to access their website, because they will
see you are coming from 2 more IP addresses. often you need to do authentication again
● Beware of DNS rules
○ Some DNS server will give different result based on source IP address -> could make website
inaccessible
● Routing table flushing
○ Routing table is flushed every 10 minutes, to avoid possible DOS attack
○ Your persistent route will be created again -> this could lead to a new IP address (if you use
NAT)
20
www.glcnetworks.com
Recommendations
● Avoid NAT if possible -> dont use private address -> use public IP address
end-to-end -> use BGP -> better performance
● Use IPv6 -> IPv6 is designed to have a large address space
21
www.glcnetworks.com
Interested? Just come to our training...
Just go to http://www.glcnetworks.com/schedule
22
www.glcnetworks.com
End of slides
● Thank you for your attention
● Please submit your feedback: http://bit.ly/glcfeedback
● Like our facebook page: “GLC networks”
● Slide: http://www.slideshare.net/r41nbuw
● Recording: https://www.youtube.com/channel/UCI611_IIkQC0rsLWIFIx_yg
● Stay tune with our schedule
23

More Related Content

PDF
ISP load balancing with mikrotik nth
PDF
Mikrotik Load Balancing with PCC
PDF
Mikrotik IP Settings For Performance and Security
PDF
Mikrotik fastpath
PDF
BGP on mikrotik
PDF
BGP vs OSPF on Mikrotik
PDF
Mikrotik Hotspot
PDF
Mikrotik firewall filter
ISP load balancing with mikrotik nth
Mikrotik Load Balancing with PCC
Mikrotik IP Settings For Performance and Security
Mikrotik fastpath
BGP on mikrotik
BGP vs OSPF on Mikrotik
Mikrotik Hotspot
Mikrotik firewall filter

What's hot (20)

PDF
Mikrotik Fastpath vs Fasttrack
PDF
Network Monitoring with The Dude and Whatsapp
PDF
Routing fundamentals with mikrotik
PDF
Mikrotik firewall raw table
PDF
Mikrotik fasttrack
PDF
Deploying CloudStack and Ceph with flexible VXLAN and BGP networking
PDF
MikroTik & RouterOS
PDF
OSPF On Router OS7
PDF
Using Mikrotik Switch Features to Improve Your Network
PDF
BGP filter with mikrotik
PDF
MikroTik Security
PDF
Mikrotik firewall mangle
PDF
Tunnel vs VPN on Mikrotik
PDF
Layer 7 Firewall on Mikrotik
PDF
MUM Melbourne : Build Enterprise Wireless with CAPsMAN
PDF
BGP on RouterOS7 -Part 1
PDF
OpeVPN on Mikrotik
PDF
MikroTik Hotspot 2.0 (IEEE 802.11u) - MUM Jakarta 2016
PDF
Network LACP/Bonding/Teaming with Mikrotik
PDF
MPLS on Router OS V7 - Part 2
Mikrotik Fastpath vs Fasttrack
Network Monitoring with The Dude and Whatsapp
Routing fundamentals with mikrotik
Mikrotik firewall raw table
Mikrotik fasttrack
Deploying CloudStack and Ceph with flexible VXLAN and BGP networking
MikroTik & RouterOS
OSPF On Router OS7
Using Mikrotik Switch Features to Improve Your Network
BGP filter with mikrotik
MikroTik Security
Mikrotik firewall mangle
Tunnel vs VPN on Mikrotik
Layer 7 Firewall on Mikrotik
MUM Melbourne : Build Enterprise Wireless with CAPsMAN
BGP on RouterOS7 -Part 1
OpeVPN on Mikrotik
MikroTik Hotspot 2.0 (IEEE 802.11u) - MUM Jakarta 2016
Network LACP/Bonding/Teaming with Mikrotik
MPLS on Router OS V7 - Part 2
Ad

Similar to ISP Load Balancing with Mikrotik ECMP (20)

PDF
Troubleshooting load balancing
PDF
Policy Based Routing (PBR) on Mikrotik
PDF
GLC webinar: limiting bandwidth using mikrotik
PDF
Connection load balancing with mikrotik [workshop]
PDF
Mikrotik the dude
PDF
Mikrotik Bridge Deep Dive
PDF
Jumpstart your router with mikrotik quickset
PDF
mikrotik_quickset settings documents ref
PDF
Stable OSPF: choosing network type.pdf
PDF
Queue Type on Mikrotik
PDF
Building Local-loop Services for Customers
PDF
Routing Information Protocol (RIP) on Mikrotik
PDF
Mikrotik firewall NAT
PDF
Mikrotik VRRP
PDF
Building Web Server with Linux
PDF
EOIP Deep Dive
PDF
Troubleshooting Layer 2 Ethernet Problem: Loop, Broadcast, Security
PDF
CCNA : Intro to Cisco IOS - Part 1
PDF
Firewall mangle PBR: steering outbound path similar to inbound
PDF
Using Control-Webpanel for Hosting Service - Part 1
Troubleshooting load balancing
Policy Based Routing (PBR) on Mikrotik
GLC webinar: limiting bandwidth using mikrotik
Connection load balancing with mikrotik [workshop]
Mikrotik the dude
Mikrotik Bridge Deep Dive
Jumpstart your router with mikrotik quickset
mikrotik_quickset settings documents ref
Stable OSPF: choosing network type.pdf
Queue Type on Mikrotik
Building Local-loop Services for Customers
Routing Information Protocol (RIP) on Mikrotik
Mikrotik firewall NAT
Mikrotik VRRP
Building Web Server with Linux
EOIP Deep Dive
Troubleshooting Layer 2 Ethernet Problem: Loop, Broadcast, Security
CCNA : Intro to Cisco IOS - Part 1
Firewall mangle PBR: steering outbound path similar to inbound
Using Control-Webpanel for Hosting Service - Part 1
Ad

More from GLC Networks (20)

PDF
Internal BGP tuning: Mesh peering to avoid loop
PDF
BGP tuning: Peer with loopback
PDF
BGP security tuning: pull-up route
PDF
BGP troubleshooting: route origin
PDF
Steering traffic in OSPF: Interface cost
PDF
Tuning OSPF: Bidirectional Forwarding Detection (BFD)
PDF
Tuning OSPF: Prefix Aggregate
PDF
Tuning OSPF: area hierarchy, LSA, and area type
PDF
Controlling Access Between Devices in the same Layer 2 Segment
PDF
GIT as Mikrotik Configuration Management
PDF
RouterOS Migration From v6 to v7
PDF
Building a Web Server with NGINX
PDF
Best Current Practice (BCP) 38 Ingress Filtering for Security
PDF
Policy Based Routing with Indirect BGP - Part 2
PDF
Policy Based Routing with Indirect BGP - Part 1
PDF
Internet Protocol Deep-Dive
PPTX
Automatic Backup via FTP - Part 2
PDF
Automatic Backup via FTP - Part 1
PDF
Voice Services, From Circuit Switch to VoIP
PDF
MPLS on Router OS V7 - Part 1
Internal BGP tuning: Mesh peering to avoid loop
BGP tuning: Peer with loopback
BGP security tuning: pull-up route
BGP troubleshooting: route origin
Steering traffic in OSPF: Interface cost
Tuning OSPF: Bidirectional Forwarding Detection (BFD)
Tuning OSPF: Prefix Aggregate
Tuning OSPF: area hierarchy, LSA, and area type
Controlling Access Between Devices in the same Layer 2 Segment
GIT as Mikrotik Configuration Management
RouterOS Migration From v6 to v7
Building a Web Server with NGINX
Best Current Practice (BCP) 38 Ingress Filtering for Security
Policy Based Routing with Indirect BGP - Part 2
Policy Based Routing with Indirect BGP - Part 1
Internet Protocol Deep-Dive
Automatic Backup via FTP - Part 2
Automatic Backup via FTP - Part 1
Voice Services, From Circuit Switch to VoIP
MPLS on Router OS V7 - Part 1

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Big Data Technologies - Introduction.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Encapsulation theory and applications.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Cloud computing and distributed systems.
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Reach Out and Touch Someone: Haptics and Empathic Computing
Dropbox Q2 2025 Financial Results & Investor Presentation
Spectroscopy.pptx food analysis technology
Big Data Technologies - Introduction.pptx
Review of recent advances in non-invasive hemoglobin estimation
MIND Revenue Release Quarter 2 2025 Press Release
“AI and Expert System Decision Support & Business Intelligence Systems”
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Chapter 3 Spatial Domain Image Processing.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Encapsulation theory and applications.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
sap open course for s4hana steps from ECC to s4
Cloud computing and distributed systems.
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Per capita expenditure prediction using model stacking based on satellite ima...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11

ISP Load Balancing with Mikrotik ECMP

  • 1. www.glcnetworks.com ISP load balancing with GLC webinar, 16 november 2017 Achmad Mardiansyah achmad@glcnetworks.com GLC Networks, Indonesia 1 ECMP
  • 2. www.glcnetworks.com Agenda ● Introduction ● Prerequisite ● Load balancing ● ECMP method ● Demo ● Q & A 2
  • 3. www.glcnetworks.com What is GLC? ● Garda Lintas Cakrawala (www.glcnetworks.com) ● An Indonesian company ● Located in Bandung ● Areas: Training, IT Consulting ● Mikrotik Certified Training Partner/Consultant/Distributor ● Ubiquiti Certified Trainer/Consultant ● RedHat Certified Trainer 3
  • 4. www.glcnetworks.com About GLC webinar? ● First webinar: january 1, 2010 (title: tahun baru bersama solaris - new year with solaris OS) ● As a sharing event with various topics: linux, networking, wireless, database, programming, etc ● Regular schedule: every 2 weeks ● Irregular schedule: as needed ● Checking schedule: http://www.glcnetworks.com/main/sc hedule ● You are invited to be a presenter ○ No need to be an expert ○ This is a forum for sharing: knowledge, experiences, information 4
  • 5. www.glcnetworks.com Trainer Introduction ● Name: Achmad Mardiansyah ● Base: bandung, Indonesia ● Linux user (since 1999), Mikrotik user (since 2007), ubnt user (since 2011) ● Certified Trainer (Mikrotik, Ubiquiti, Redhat) ● Certified Consultant ● Work: Telco engineer, Sysadmin, PHP programmer, and Lecturer ● Personal website: http://achmadjournal.com ● More info: http://au.linkedin.com/in/achmadmardiansyah 5
  • 6. www.glcnetworks.com Please introduce yourself ● Your name ● Your company/university? ● Your networking experience? ● Your mikrotik experience? ● Your expectation from this course? 6
  • 8. www.glcnetworks.com wait, load balancing is easy... ● Lots of tutorials in internet!!! ● Tons of pages, tutorials, videos Questions to reader: ● Do you really understand what its written? ● Did the writer understand what they wrote? ● Is it really works as expected in your environment? 8
  • 9. www.glcnetworks.com Well if it's easy, why these do not work? ● Information overloaded… which one suits you? ● Perhaps they have different network environment compared to you ● You need to understand how it works... 9
  • 10. www.glcnetworks.com You should understand ● Firewall mangle. See GLC webinar: Mikrotik firewall mangle ● The differences between: ○ Packet vs Connection ○ Mark: packet / connection / routing ● How routing works: see GLC webinar: Routing with mikrotik ● How NAT works: see GLC webinar: Mikrotik firewall NAT 10
  • 12. www.glcnetworks.com What is (traffic) load balancing? ● Is a process to forward traffic on several links ● Applied on router ● Load balancing != failover ● Can be done on per-packet or per-connection basis ● This doesnt increase your data rate. 4mbps ISP1 + 4mbps ISP2 -> your download rate = 8mbps (WRONG!) Benefits: ● Increase utilisation of upstream links 12 ISP1 ISP2 LAN ether1 ether2 webserver ISP3 ether4 R1
  • 13. www.glcnetworks.com Load balancing techniques 13 Method Per-connection per-packet Firewall marking YES YES ECMP (our focus) YES NO PCC YES NO Nth YES YES Bonding NO YES OSPF YES NO BGP YES NO
  • 14. www.glcnetworks.com Website contents: single connection Website with single connection: http://test.glcnetworks.com 14 14 ISP1 ISP2 LAN ether1 ether2 ISP3 ether4 R1
  • 15. www.glcnetworks.com Website contents: multi connection 15 15 ISP1 ISP2 LAN ether1 ether2 ISP3 ● Client will open multiple connections to get website components Connect ion 1 Connect ion 2 Connect ion 3 ether4 R1
  • 17. www.glcnetworks.com How ECMP works? ECMP = Equal Cost Multi-Path ECMP. steps: ● ECMP will identify connections from clients (per-src-dst-address combination) ● ECMP will forward the connection based on weight/cost of the gateway ● ECMP does persistent per-connection load balancing ● Its recommended to use “check-gateway” option ● As soon as one of the gateway is not responding, check-gateway will remove it from gateway list, and you will have a "failover" effect. 17 ISP1 LAN ether1 ISP3 conn 1 conn 2 conn 3 ISP2 ether2 ether4
  • 18. www.glcnetworks.com ECMP Example ● Using 2 gateways with same cost (e.g. both have same datarate) /ip route add dst-address=0.0.0.0/0 gateway=10.10.11.1,10.10.12.1 check-gateway=ping ● Using 2 gateways with different cost (e.g. ISP2 is 2 times more than ISP2) /ip route add dst-address=0.0.0.0/0 gateway=10.10.11.1,10.10.12.1,10.10.12.1 check-gateway=ping ● Using 3 gateways with different cost (e.g. ISP1=1mbps, ISP2=2mbps, ISP3=3mbps) /ip route add dst-address=0.0.0.0/0 gateway=10.10.11.1,10.10.12.1,10.10.12.1,10.10.13.1,10.10.13.1,10.10.13.1 check-gateway=ping 18
  • 20. www.glcnetworks.com Some issues ● Beware of NAT connection ○ webserver will see inbound connection from 2 ip public addresses ○ webpage will not displayed correctly (as it is considered illegal session) ○ banking / https / game websites will not allow you to access their website, because they will see you are coming from 2 more IP addresses. often you need to do authentication again ● Beware of DNS rules ○ Some DNS server will give different result based on source IP address -> could make website inaccessible ● Routing table flushing ○ Routing table is flushed every 10 minutes, to avoid possible DOS attack ○ Your persistent route will be created again -> this could lead to a new IP address (if you use NAT) 20
  • 21. www.glcnetworks.com Recommendations ● Avoid NAT if possible -> dont use private address -> use public IP address end-to-end -> use BGP -> better performance ● Use IPv6 -> IPv6 is designed to have a large address space 21
  • 22. www.glcnetworks.com Interested? Just come to our training... Just go to http://www.glcnetworks.com/schedule 22
  • 23. www.glcnetworks.com End of slides ● Thank you for your attention ● Please submit your feedback: http://bit.ly/glcfeedback ● Like our facebook page: “GLC networks” ● Slide: http://www.slideshare.net/r41nbuw ● Recording: https://www.youtube.com/channel/UCI611_IIkQC0rsLWIFIx_yg ● Stay tune with our schedule 23