SlideShare a Scribd company logo
Using MikroTik routers for BGP transit and IX points
Juan Miguel Gallardo, MikroTik Trainer and Consultant.
Lisbon, on September 20, 2019.
ENGINEERING AND PROJECTS
The engine for your ideas
• QUALITY.
• CUSTOMER
DEFENSE.
• SINGULAR
PROJECTS.
• WHITE BRAND
FOR
COLABORATORS
GLOBAL SUPPORT FOR COMMUNICATION NETWORKS
•PROACTIVE SUPPORT.
•MULTI BRAND SUPPORT.
•CERTIFIED SUPPORT TECHNICIAMS.
•TRANSPARENCY FOR INCIDENTS AND
CONFIGURATIONS.
The best technical support for ISP and Industries.
MIKROTIK TRAINING COURSES
•MIKROTIK CERTIFIED EXAMS.
•REAL LABS.
•OWN HANDBOOKS.
•SCHEDULED AND ON DEMAND.
•BASED ON EXPERIENCE.
A singular training.
DEDICATED IP TRANSIT FOR ISP
•Direct circuits.
•Virtual tunnels.
•Backup sceneries.
And others
Carrier
1
Carrier
2
Carrier
n
OwnCustomer
Network
Full Transit
IX Prefixes
Default route
TRANSIT AND IX NETWORK
How do we do it?
OWN NETWORKS
ASN 65501
•ASN <=> OWN DOMAIN ==> 65501 (example).
•eBGP <=> Border Gateway Protocol with other ASNs.
•Own networks <=> 10.100.0.0/22, 10.200.0.0/22.
•BGP peers:
•Transit peer 1: 65510
•Transit peer 2: 65520
•DE-CIX route server 1: 48793
•Customer 1: 65530 <==> 10.200.172.0/22
We will use private ASN/IPv4 prefixes for this presentation.
The shown filters are a very simply configuration for didactic purposes. In real
environment, we will need a complex filter configuration to avoid network
problems:
Own prefixes filtering, bogons filtering, and so on.
IMPORT ROUTES ==> OUTGOING TRAFFIC
ASN 65501
•Transit peers: default outgoing traffic when no other preferred.
•Peering: Preferred outgoing traffic.
•Lower latency.
•Lower cost.
How to modulate the preference for incoming routes?
•LOCAL_PREF
•SHORTEST AS_PATH
•MED
•OLDEST PATH vs YOUNGER PATH
FILTERS
IMPORT ROUTES ==> OUTGOING TRAFFIC
ASN 65501
•LOCAL_PREF: internal attribute assigned into our network domain.
•Higher values, preferred routes.
•Will propagate along our network domain (iBGP), but will not propagate
for external peers (eBGP).
•MED: Multi Exit Discriminator, can be learned from BGP neighboors.
•Lower values are for preferred networks.
•Can be propagated for eBGP peers if they don’t set their own values.
IMPORT ROUTES ==> OUTGOING TRAFFIC
ASN 65501
•Local Pref: higher for neutral IX
•BGP MED: lower for neutral IX
•Our outgoing traffic will prefer
the IX door.
Why are we using communities?
Transit Carrier DE-CIX neutral IX
IMPORT ROUTES ==> OUTGOING TRAFFIC
ASN 65501
•We will assign communities over imported routes to ‘mark’ the routes for
each provider.
•It will be useful to provide transit, IX or both routes to our customers, for
example.
•In this case:
•Transit routes will be set with: 65501:100 - 65501:109
•IX routes will be set with: 65501:110 - 65501:119
•In other cases, we can use communities for:
•Geo id, router that originates the prefix…
•To do more complex filters and avoid transit over our network from
transit 1 to transit n.
•Propagate attacked IP address to blackhole servers…
Why are we using communities?
IMPORT ROUTES ==> OUTGOING TRAFFIC
ASN 65501
EXPORT ROUTES ==> INCOMING TRAFFIC
ASN 65501
•Introduce de networks into the BGP
world.
•Network size will be used to define if
we want to split the aggregate
network or not.
•Advantage: traffic control
•Disadvantage: more routes in the
world.
•The final control will be made by
routing filters.
•Optionally, we can create blackhole
routes in our routing table.
EXPORT ROUTES ==> INCOMING TRAFFIC
ASN 65501
•Attributes aggregation.
•Avoid looping.
EXPORT ROUTES ==> INCOMING TRAFFIC
ASN 65501
EXPORT ROUTES ==> INCOMING TRAFFIC
TRANSIT 1 POINT OF VIEW
EXPORT ROUTES ==> INCOMING TRAFFIC
TRANSIT 2 POINT OF VIEW
EXPORT ROUTES ==> INCOMING TRAFFIC
DECIX POINT OF VIEW
IMPORT // EXPORT CUSTOMER ROUTES
ASN 65530
PREFIX: 10.200.172.0/22
Carrier
1
Carrier
2
Carrier
n
OwnCustomer
1 Network
IMPORT // EXPORT CUSTOMER ROUTES
ASN 65530
PREFIX: 10.200.172.0/22
COMMUNITIES:
65501:201—> Announce for transit.
65501:202—> Announce for IX.
IMPORT // EXPORT CUSTOMER ROUTES
ASN 65530
PREFIX: 10.200.172.0/22
IMPORT // EXPORT CUSTOMER ROUTES
ASN 65530
PREFIX: 10.200.172.0/22
IMPORT // EXPORT CUSTOMER ROUTES
ASN 65530
PREFIX: 10.200.172.0/22
??
TRANSIT, IX AND CUSTOMERS CONNECTED
IS ANYMORE FOR US?
OTHER USEFUL USES FOR COMMUNITIES
•Propagate black holing prefixes detected by DDoS detection tools.
We are Fast Netmon Partners, and we can introduce this tool in your network.
IP: 185.X.Y.Z

Attack uuid: 4cce6e17-b7df-4b69-88c7-718562377d07

Attack severity: middle

Attack type: udp_flood

Initial attack power: 100029 packets per second
Peak attack power: 100029 packets per second
Attack direction: incoming

Attack protocol: udp

Detection source: automatic

Host network: 185.X.Y.Z/22

Protocol version: IPv4

Total incoming traffic: 919 mbps
Total outgoing traffic: 0 mbps

Total incoming pps: 100029 packets per second
Total outgoing pps: 92 packets per second

Incoming udp pps: 99988 packets per second
Outgoing udp pps: 0 packets per second
TRAFFIC FLOW Analysis
+
Permanent BGP Session
DDoS mitigation
Fast Netmon will publish a /32 prefix
+ Community: 65501:666
If Attack…
Recomended Values for incoming filters
Localpref
Internal 999
Customer overweight 200
Customer Default 190
Customer Underweight 180
Peering overweight 140
Peering Default 130
Peering underweight 120
Transit Default 100
Transit underweight 90
MED (metric)
Internal 0
Customer prefixes 0 for default
Peering prefixes
10 for best

20 for worst
Transit prefixes
40 for default

Up to 50 for worst
Outgoing Traffic
What about incoming traffic?
• Set the metric of the sent prefixes to zero. It could be OK if the other party has not set it.
• Try to set some AS prepends on the link you do not want to be used. If the other party decides
on the basis of localpref, it doesn’t matter how much you enlarge the AS path.
• Be in touch with the other side to try the route definition together.
Acknowledgments
Thanks to DE-CIX. They allowed us to use their name, logo and peering
guides information for this presentation.
https://www.de-cix.net
Ms. Theresa Bobis: theresa.bobis@de-cix.net
Mr. Da Costa: darwin.costa@de-cix.net
924 11 11 28
info@codisats.es
www.codisats.es
Badajoz - Spain
NETWORK
ENGINEERING
TECHNICAL
SUPPORT
TRAINING INTERNET
ACCESS

More Related Content

PDF
BGP on mikrotik
PPTX
OSPF Basics
PPT
PDF
BGP Services IP Transit vs IP Peering
PDF
MikroTik & RouterOS
PDF
BGP Multihoming Techniques
PPTX
BGP on mikrotik
OSPF Basics
BGP Services IP Transit vs IP Peering
MikroTik & RouterOS
BGP Multihoming Techniques

What's hot (20)

PDF
Segment Routing Lab
PDF
Cisco Live! :: Introduction to Segment Routing :: BRKRST-2124 | Las Vegas 2017
PDF
PDF
VLAN on mikrotik
PPT
Mpls L3_vpn
PDF
PPTX
Trace route
PPTX
Layer3protocols
PPTX
PDF
BGP filter with mikrotik
PDF
Connection load balancing with mikrotik [workshop]
PDF
MPLS - Multiprotocol Label Switching
PDF
Ccnp enterprise workbook v1.0 bgp zero to hero
PDF
VPN - Virtual Private Network
PDF
Inter-AS MPLS VPN Deployment
PPTX
CCNA 1 Routing and Switching v5.0 Chapter 9
PPT
BGP protocol presentation
PDF
Juniper MPLS Tutorial by Soricelli
PDF
Mikrotik Load Balancing with PCC
PDF
Virtual Extensible LAN (VXLAN)
Segment Routing Lab
Cisco Live! :: Introduction to Segment Routing :: BRKRST-2124 | Las Vegas 2017
VLAN on mikrotik
Mpls L3_vpn
Trace route
Layer3protocols
BGP filter with mikrotik
Connection load balancing with mikrotik [workshop]
MPLS - Multiprotocol Label Switching
Ccnp enterprise workbook v1.0 bgp zero to hero
VPN - Virtual Private Network
Inter-AS MPLS VPN Deployment
CCNA 1 Routing and Switching v5.0 Chapter 9
BGP protocol presentation
Juniper MPLS Tutorial by Soricelli
Mikrotik Load Balancing with PCC
Virtual Extensible LAN (VXLAN)
Ad

Similar to Using MikroTik routers for BGP transit and IX points (20)

PDF
Practical Implementation of Large BGP Community with Geotags and Traffic Engi...
PDF
Practical Implementation of Large BGP communities with Geotags and Traffic En...
PPTX
Implementing Internet and MPLS BGP
PDF
Apnic_bgp_training_cisco_ciscosaicoc.pdf
PDF
BGP Prime
PDF
Route Leak Prevension with BGP Community
PDF
Remote peering
PPT
bgp1 cryptogrphy and network security.ppt
PPTX
Introduction to Wide Area Network Routing
PPTX
Border Gatway Protocol
PDF
The benefit of BGP for every service provider
PPT
PPT
Bigbgp (1)
PPT
PPT
BGP Overview
PDF
BGP security tuning: pull-up route
PPTX
40 - IDNOG03 - Bob Lau (Akamai) - BGP and Traffic Engineering
PDF
MikroTik BGP Security - MUM 2014 (rofiq fauzi)
PDF
Mikrotik User Meeting Manila: bgp vs ospf
PDF
Bgp tutorial for ISP
Practical Implementation of Large BGP Community with Geotags and Traffic Engi...
Practical Implementation of Large BGP communities with Geotags and Traffic En...
Implementing Internet and MPLS BGP
Apnic_bgp_training_cisco_ciscosaicoc.pdf
BGP Prime
Route Leak Prevension with BGP Community
Remote peering
bgp1 cryptogrphy and network security.ppt
Introduction to Wide Area Network Routing
Border Gatway Protocol
The benefit of BGP for every service provider
Bigbgp (1)
BGP Overview
BGP security tuning: pull-up route
40 - IDNOG03 - Bob Lau (Akamai) - BGP and Traffic Engineering
MikroTik BGP Security - MUM 2014 (rofiq fauzi)
Mikrotik User Meeting Manila: bgp vs ospf
Bgp tutorial for ISP
Ad

More from Pavel Odintsov (20)

PDF
BGP Flow Spec HKNOG 13
PDF
DDoS Challenges in IPv6 environment
PDF
Network telemetry for DDoS detection presentation
PPTX
BGP FlowSpec experience and future developments
PDF
VietTel AntiDDoS Volume Based
PDF
DDoS Defense Mechanisms for IXP Infrastructures
PPTX
FastNetMon Advanced DDoS detection tool
PPTX
Flowspec contre les attaques DDoS : l'expérience danoise
PDF
Detectando DDoS e intrusiones con RouterOS
PPTX
DeiC DDoS Prevention System - DDPS
PDF
Lekker weer nlnog_nlnog_ddos_fl
PDF
Lekker weer nlnog_how_to_avoid_buying_expensive_routers
PDF
Implementing BGP Flowspec at IP transit network
PDF
Janog 39: speech about FastNetMon by Yutaka Ishizaki
PDF
Protect your edge BGP security made simple
PDF
Keeping your rack cool
PDF
Jon Nield FastNetMon
PDF
Detecting and mitigating DDoS ZenDesk by Vicente De Luca
PDF
Blackholing from a_providers_perspektive_theo_voss
PDF
SIG-NOC Tools Survey
BGP Flow Spec HKNOG 13
DDoS Challenges in IPv6 environment
Network telemetry for DDoS detection presentation
BGP FlowSpec experience and future developments
VietTel AntiDDoS Volume Based
DDoS Defense Mechanisms for IXP Infrastructures
FastNetMon Advanced DDoS detection tool
Flowspec contre les attaques DDoS : l'expérience danoise
Detectando DDoS e intrusiones con RouterOS
DeiC DDoS Prevention System - DDPS
Lekker weer nlnog_nlnog_ddos_fl
Lekker weer nlnog_how_to_avoid_buying_expensive_routers
Implementing BGP Flowspec at IP transit network
Janog 39: speech about FastNetMon by Yutaka Ishizaki
Protect your edge BGP security made simple
Keeping your rack cool
Jon Nield FastNetMon
Detecting and mitigating DDoS ZenDesk by Vicente De Luca
Blackholing from a_providers_perspektive_theo_voss
SIG-NOC Tools Survey

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PDF
Encapsulation theory and applications.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Approach and Philosophy of On baking technology
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Electronic commerce courselecture one. Pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
cuic standard and advanced reporting.pdf
Encapsulation theory and applications.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Machine learning based COVID-19 study performance prediction
The Rise and Fall of 3GPP – Time for a Sabbatical?
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
NewMind AI Weekly Chronicles - August'25 Week I
Approach and Philosophy of On baking technology
The AUB Centre for AI in Media Proposal.docx
Electronic commerce courselecture one. Pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Understanding_Digital_Forensics_Presentation.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Network Security Unit 5.pdf for BCA BBA.

Using MikroTik routers for BGP transit and IX points

  • 1. Using MikroTik routers for BGP transit and IX points Juan Miguel Gallardo, MikroTik Trainer and Consultant. Lisbon, on September 20, 2019.
  • 2. ENGINEERING AND PROJECTS The engine for your ideas • QUALITY. • CUSTOMER DEFENSE. • SINGULAR PROJECTS. • WHITE BRAND FOR COLABORATORS
  • 3. GLOBAL SUPPORT FOR COMMUNICATION NETWORKS •PROACTIVE SUPPORT. •MULTI BRAND SUPPORT. •CERTIFIED SUPPORT TECHNICIAMS. •TRANSPARENCY FOR INCIDENTS AND CONFIGURATIONS. The best technical support for ISP and Industries.
  • 4. MIKROTIK TRAINING COURSES •MIKROTIK CERTIFIED EXAMS. •REAL LABS. •OWN HANDBOOKS. •SCHEDULED AND ON DEMAND. •BASED ON EXPERIENCE. A singular training.
  • 5. DEDICATED IP TRANSIT FOR ISP •Direct circuits. •Virtual tunnels. •Backup sceneries. And others
  • 7. OWN NETWORKS ASN 65501 •ASN <=> OWN DOMAIN ==> 65501 (example). •eBGP <=> Border Gateway Protocol with other ASNs. •Own networks <=> 10.100.0.0/22, 10.200.0.0/22. •BGP peers: •Transit peer 1: 65510 •Transit peer 2: 65520 •DE-CIX route server 1: 48793 •Customer 1: 65530 <==> 10.200.172.0/22 We will use private ASN/IPv4 prefixes for this presentation. The shown filters are a very simply configuration for didactic purposes. In real environment, we will need a complex filter configuration to avoid network problems: Own prefixes filtering, bogons filtering, and so on.
  • 8. IMPORT ROUTES ==> OUTGOING TRAFFIC ASN 65501 •Transit peers: default outgoing traffic when no other preferred. •Peering: Preferred outgoing traffic. •Lower latency. •Lower cost. How to modulate the preference for incoming routes? •LOCAL_PREF •SHORTEST AS_PATH •MED •OLDEST PATH vs YOUNGER PATH FILTERS
  • 9. IMPORT ROUTES ==> OUTGOING TRAFFIC ASN 65501 •LOCAL_PREF: internal attribute assigned into our network domain. •Higher values, preferred routes. •Will propagate along our network domain (iBGP), but will not propagate for external peers (eBGP). •MED: Multi Exit Discriminator, can be learned from BGP neighboors. •Lower values are for preferred networks. •Can be propagated for eBGP peers if they don’t set their own values.
  • 10. IMPORT ROUTES ==> OUTGOING TRAFFIC ASN 65501 •Local Pref: higher for neutral IX •BGP MED: lower for neutral IX •Our outgoing traffic will prefer the IX door. Why are we using communities? Transit Carrier DE-CIX neutral IX
  • 11. IMPORT ROUTES ==> OUTGOING TRAFFIC ASN 65501 •We will assign communities over imported routes to ‘mark’ the routes for each provider. •It will be useful to provide transit, IX or both routes to our customers, for example. •In this case: •Transit routes will be set with: 65501:100 - 65501:109 •IX routes will be set with: 65501:110 - 65501:119 •In other cases, we can use communities for: •Geo id, router that originates the prefix… •To do more complex filters and avoid transit over our network from transit 1 to transit n. •Propagate attacked IP address to blackhole servers… Why are we using communities?
  • 12. IMPORT ROUTES ==> OUTGOING TRAFFIC ASN 65501
  • 13. EXPORT ROUTES ==> INCOMING TRAFFIC ASN 65501 •Introduce de networks into the BGP world. •Network size will be used to define if we want to split the aggregate network or not. •Advantage: traffic control •Disadvantage: more routes in the world. •The final control will be made by routing filters. •Optionally, we can create blackhole routes in our routing table.
  • 14. EXPORT ROUTES ==> INCOMING TRAFFIC ASN 65501 •Attributes aggregation. •Avoid looping.
  • 15. EXPORT ROUTES ==> INCOMING TRAFFIC ASN 65501
  • 16. EXPORT ROUTES ==> INCOMING TRAFFIC TRANSIT 1 POINT OF VIEW
  • 17. EXPORT ROUTES ==> INCOMING TRAFFIC TRANSIT 2 POINT OF VIEW
  • 18. EXPORT ROUTES ==> INCOMING TRAFFIC DECIX POINT OF VIEW
  • 19. IMPORT // EXPORT CUSTOMER ROUTES ASN 65530 PREFIX: 10.200.172.0/22 Carrier 1 Carrier 2 Carrier n OwnCustomer 1 Network
  • 20. IMPORT // EXPORT CUSTOMER ROUTES ASN 65530 PREFIX: 10.200.172.0/22 COMMUNITIES: 65501:201—> Announce for transit. 65501:202—> Announce for IX.
  • 21. IMPORT // EXPORT CUSTOMER ROUTES ASN 65530 PREFIX: 10.200.172.0/22
  • 22. IMPORT // EXPORT CUSTOMER ROUTES ASN 65530 PREFIX: 10.200.172.0/22
  • 23. IMPORT // EXPORT CUSTOMER ROUTES ASN 65530 PREFIX: 10.200.172.0/22 ??
  • 24. TRANSIT, IX AND CUSTOMERS CONNECTED IS ANYMORE FOR US?
  • 25. OTHER USEFUL USES FOR COMMUNITIES •Propagate black holing prefixes detected by DDoS detection tools. We are Fast Netmon Partners, and we can introduce this tool in your network.
  • 26. IP: 185.X.Y.Z Attack uuid: 4cce6e17-b7df-4b69-88c7-718562377d07 Attack severity: middle Attack type: udp_flood Initial attack power: 100029 packets per second Peak attack power: 100029 packets per second Attack direction: incoming Attack protocol: udp Detection source: automatic Host network: 185.X.Y.Z/22 Protocol version: IPv4 Total incoming traffic: 919 mbps Total outgoing traffic: 0 mbps Total incoming pps: 100029 packets per second Total outgoing pps: 92 packets per second Incoming udp pps: 99988 packets per second Outgoing udp pps: 0 packets per second TRAFFIC FLOW Analysis + Permanent BGP Session DDoS mitigation Fast Netmon will publish a /32 prefix + Community: 65501:666 If Attack…
  • 27. Recomended Values for incoming filters Localpref Internal 999 Customer overweight 200 Customer Default 190 Customer Underweight 180 Peering overweight 140 Peering Default 130 Peering underweight 120 Transit Default 100 Transit underweight 90 MED (metric) Internal 0 Customer prefixes 0 for default Peering prefixes 10 for best 20 for worst Transit prefixes 40 for default Up to 50 for worst Outgoing Traffic
  • 28. What about incoming traffic? • Set the metric of the sent prefixes to zero. It could be OK if the other party has not set it. • Try to set some AS prepends on the link you do not want to be used. If the other party decides on the basis of localpref, it doesn’t matter how much you enlarge the AS path. • Be in touch with the other side to try the route definition together.
  • 29. Acknowledgments Thanks to DE-CIX. They allowed us to use their name, logo and peering guides information for this presentation. https://www.de-cix.net Ms. Theresa Bobis: theresa.bobis@de-cix.net Mr. Da Costa: darwin.costa@de-cix.net
  • 30. 924 11 11 28 info@codisats.es www.codisats.es Badajoz - Spain NETWORK ENGINEERING TECHNICAL SUPPORT TRAINING INTERNET ACCESS