Monitoring BGP and Route Leaks using OpenBMP and Apache Kafka



Similar documents
DD2491 p Load balancing BGP. Johan Nicklasson KTHNOC/NADA

BGP FORGOTTEN BUT USEFUL FEATURES. Piotr Wojciechowski (CCIE #25543)

BGP Attributes and Path Selection

NetFlow & BGP multi-path: quo vadis?

NetFlow & BGP multi-path: quo vadis?

Bell Aliant. Business Internet Border Gateway Protocol Policy and Features Guidelines

Detecting BGP hijacks in 2014

BGP Basics. BGP Uses TCP 179 ibgp - BGP Peers in the same AS ebgp - BGP Peers in different AS's Private BGP ASN. BGP Router Processes

APNIC elearning: BGP Attributes

Transitioning to BGP. ISP Workshops. Last updated 24 April 2013

Exterior Gateway Protocols (BGP)

Border Gateway Protocol BGP4 (2)

BGP Router Startup Message Flow

pmacct: introducing BGP natively into a NetFlow/sFlow collector

BGP route monitoring. Mar, 25, 2008 Matsuzaki maz Yoshinobu

Regaining MPLS VPN WAN Visibility with Route Analytics. Seeing through the MPLS VPN Cloud

E : Internet Routing

Advanced BGP Policy. Advanced Topics

MPLS WAN Explorer. Enterprise Network Management Visibility through the MPLS VPN Cloud

Understanding Route Redistribution & Filtering

Scalable Extraction, Aggregation, and Response to Network Intelligence

Collective responsibility for security and resilience of the global routing system

Network-Wide Class of Service (CoS) Management with Route Analytics. Integrated Traffic and Routing Visibility for Effective CoS Delivery

Towards Smart and Intelligent SDN Controller

Best Practices for Eliminating Risk from Routing Changes

Border Gateway Protocol (BGP-4)

HP Networking BGP and MPLS technology training

basic BGP in Huawei CLI

MPLS Layer 2 VPNs Functional and Performance Testing Sample Test Plans

Border Gateway Protocol (BGP)

APNIC elearning: BGP Basics. Contact: erou03_v1.0

Multihomed BGP Configurations

Module 7. Routing and Congestion Control. Version 2 CSE IIT, Kharagpur

How To Understand Bg

Simple Multihoming. ISP/IXP Workshops

BGP overview BGP operations BGP messages BGP decision algorithm BGP states

Internet Firewall CSIS Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS net15 1. Routers can implement packet filtering

How More Specifics increase your transit bill (and ways to avoid it)

BGP and Traffic Engineering with Akamai. Caglar Dabanoglu Akamai Technologies AfPIF 2015, Maputo, August 25th

KT The Value Networking Company

NetFlow/IPFIX Various Thoughts

How To Stop A Ddos Attack On A Network From Tracing To Source From A Network To A Source Address

Introduction to IP v6

Anycast Rou,ng: Local Delivery. Tom Daly, CTO h<p://dyn.com Up,me is the Bo<om Line

Network Level Multihoming and BGP Challenges

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

Advanced Administration for Citrix NetScaler 9.0 Platinum Edition

BGP and Traffic Engineering with Akamai. Christian Kaufmann Akamai Technologies MENOG 14

Embedded BGP Routing Monitoring. Th. Lévy O. Marcé

Understanding and Optimizing BGP Peering Relationships with Advanced Route and Traffic Analytics

How To Load Balance On A Bgg On A Network With A Network (Networking) On A Pc Or Ipa On A Computer Or Ipad On A 2G Network On A Microsoft Ipa (Netnet) On An Ip

RAVEN, Network Security and Health for the Enterprise

Dove siamo? Architecture of Dynamic Routing

NetFlow Performance Analysis

BGP1 Multihoming and Traffic Engineering

Enhancing Cisco Networks with Gigamon // White Paper

Using the Border Gateway Protocol for Interdomain Routing

Introduction to Routing

NetFlow v9 Export Format

Chapter 49 Border Gateway Protocol version 4 (BGP-4)

Multihoming and Multi-path Routing. CS 7260 Nick Feamster January

Week 4 / Paper 1. Open issues in Interdomain Routing: a survey

New Products and New Features May, 2015

Analyzing Capabilities of Commercial and Open-Source Routers to Implement Atomic BGP

Inter-domain Routing Basics. Border Gateway Protocol. Inter-domain Routing Basics. Inter-domain Routing Basics. Exterior routing protocols created to:

NetFlow Aggregation. Feature Overview. Aggregation Cache Schemes

MPLS Implementation MPLS VPN

IXP Manager Workshop. 27 th Euro-IX Forum October 25 th 2015 Berlin, Germany

White Paper. Cisco MPLS based VPNs: Equivalent to the security of Frame Relay and ATM. March 30, 2001

Netflow Overview. PacNOG 6 Nadi, Fiji

BGP Terminology, Concepts, and Operation. Chapter , Cisco Systems, Inc. All rights reserved. Cisco Public

Basic & Advanced Administration for Citrix NetScaler 9.2

Enhancing Network Monitoring with Route Analytics

NetFlow Tracker Overview. Mike McGrath x ccie CTO mike@crannog-software.com

Outline. Outline. Outline

ECSE-6600: Internet Protocols Exam 2

BGP Churn Evolution: A perspective from the core. Ahmed Elmokashfi, Amund Kvalbein, Constantine Dovrolis

Brain-Slug: a BGP-Only SDN for Large-Scale Data-Centers

Internet inter-as routing: BGP

Datagram-based network layer: forwarding; routing. Additional function of VCbased network layer: call setup.

BGP Best Path Selection Algorithm

--BGP 4 White Paper Ver BGP-4 in Vanguard Routers

Traffic & Peering Analysis

BGP Vector Routing. draft-patel-raszuk-bgp-vector-routing-01

Business Cases for Brocade Software-Defined Networking Use Cases

Recent Progress in Routing Standardization An IETF update for UKNOF 23

Load balancing and traffic control in BGP

SAP HANA PLATFORM Top Ten Questions for Choosing In-Memory Databases. Start Here

Studying Black Holes on the Internet with Hubble

NMS300 Network Management System

Interdomain Routing. Project Report

Interdomain Routing. Outline

Introduction. The Inherent Unpredictability of IP Networks # $# #

Simple Multihoming. ISP Workshops. Last updated 30 th March 2015

RID-DoS: Real-time Inter-network Defense Against Denial of Service Attacks. Kathleen M. Moriarty. MIT Lincoln Laboratory.

Effect of anycast on K-root

WHITE PAPER Redefining Monitoring for Today s Modern IT Infrastructures

How To Set Up Bgg On A Network With A Network On A Pb Or Pb On A Pc Or Ipa On A Bg On Pc Or Pv On A Ipa (Netb) On A Router On A 2

Integration with CA Transaction Impact Monitor

Introduction To Computer Networking

Transcription:

Monitoring BGP and Route Leaks using OpenBMP and Apache Kafka Tim Evens (tievens@cisco.com) NANOG-65

Traditional Method: VTY (cli/netconf/xml) Data is polled instead of pushed (not real-time) Large queries can impact router CPU VTY access can be slow and cumbersome Requires access credentials per router Maintainability is complex due to schema/output syntax changes in different software versions Maintaining persistent connections to routers may not be feasible Paths: (3 available, best #3) Advertised to peers (in unique update groups): 173.39.225.61 192.168.1.1 Path #1: Received by speaker 0 Not advertised to any peer 6939 1299 3356 13445 1343 64.71.176.49 from 64.71.176.49 (216.218.252.163) Origin IGP, localpref 95, valid, external, group-best Received Path ID 0, Local Path ID 0, version 0 Origin-AS validity: not-found

Traditional Method: Packet Capture Requires specific deployment architecture Doesn t work well when peering is multi-hop/ibgp considering multiple interfaces could be used for forwarding packets Collector has no or limited visibility into router changes that would effect the feed of captured packets Can be a security concern Monitor BGP peers by packet capturing PEER capture Collector

Traditional Method: BGP Peering Can only see what the router selects (post policy with local-rib selection) no pre-policy ADD-PATH imposes more resources on the router and is still limited to post-policy and local- RIB selection (not pre-policy) Collector has no visibility of peers (assumptions have to be made) Pre-policy would require peering to all peering routers (does not scale) Standard peering can be a security concern and can jeopardize the router Monitor BGP peers by using standard BGP peering PEER PEER Collector

BMP Overview BGP Monitoring Protocol (BMP) encapsulates BGP messages from one or more BGP peers into a single TCP stream to one or more collectors Efficient, [near] real-time, low memory/cpu on router, little to no service impact with peering Simplified configuration (one-time setup) with granular controls per peer All address families supported Controlled RIB dumps https://tools.ietf.org/html/draft-ietf-grow-bmp-15 IP BGP Peers BMP Collector Single stream for all peers BMP Router XE/XR/JunOS ebgp/ibgp TCP BMP BGP

OpenBMP Overview OpenBMP is an open-source collector that universally makes available both parsed and RAW BMP data to any number of applications BMP data is forwarded to Apache Kafka in both parsed and BMP raw formats. Any number of consumers can consume this data without requiring multiple BMP feeds from the router Monitor BGP peers using BMP PEER Peer-A Peer-B Peer-C BMP The MySQL consumer stores parsed data for simplified consumption to enable granular analytics on BGP data without restrictions The file consumer logs parsed messages and binary RAW BMP messages in files on disk Multiple consumers are available www.openbmp.org and github.com/openbmp Peer-A Peer-B Peer-C Peer-A Peer-B Peer-C Consumer MySQL Consumer MongoDB Virtual Representation Kafka Message Bus Collector openbmpd Consumer Other Program RAW or parsed BMP Feed

OpenBMP: Apache Kafka lag/catch-up openbmpd Producer smallest 5 6 7 8 9 10 11 12 13 14 15 16 largest Restarted Consumer Slower Consumer Running Consumer Consumers track their offset and resume where left off when restarted When consumer first starts within group, starting point will either be smallest or largest Kafka retention policy defines how far back the consumer can go. Suggested log.retention.hours is 36 hours or less Slower consumers do not jeopardize other consumers Load balancing consumers Track offsets and performance using https://cwiki.apache.org/confluence/display/kafka/system+tools

Architecture Common distributed collection of BGP data Multiple consumers leveraging existing BGP data feeds, including binary BMP data feeds Integration into live data feed is as simple as consuming data from Kafka Application integration can be at the Kafka layer or at the app integration layer

Message Feeds http://openbmp.org/#!docs/message_bus_api.md bin/kafka-console-consumer.sh --zookeeper bmp-dev.openbmp.org:2181 \ --topic openbmp.parsed.unicast_prefix V: 1 C_HASH_ID: 8d31683940705f39520ccc05bd2d128c L: 729 R: 2 add 3808297 d82097c34e2e6b2c39c45a97131d62d40080e0d7a01dca408c047568804cbed5 173.39.209.78 a5f605c1a55b7138c2fe57cc14b0a1311f5c87f0b265b5609a2a5df0621faa7b x.x.x.x 3356 2015-08-31 20:44:36.427581 105.96.0.0 22 1 igp 3356 12956 36947 3 36947 x.x.x.b 0 3356:3 3356:22 3356:100 3356:123 3356:575 3356:2006 12956:123 12956:10400 12956:19070 65000:0 0 1 add 3808298 498a6202fd627d673ec9b0c55aca6d080080e0d7a01dca408c047568804cbed5 173.39.209.78 a5f605c1a55b7138c2fe57cc14b0a1311f5c87f0b265b5609a2a5df0621faa7b x.x.x.x 3356 2015-08-31 20:44:36.427581 81.52.162.0 24 1 igp 3356 12956 36947 3 36947 x.x.x.b 0 3356:3 3356:22 3356:100 3356:123 3356:575 3356:2006 12956:123 12956:10400 12956:19070 65000:0 0 1

As Path Analysis ASN duplicate AS PATH: 3356 1299 13335 13335 13335 { 10310 33612 } LEFT RIGHT treat normally Order is maintained to allow rebuilding the distinct AS Path Extract each ASN and their respective LEFT and RIGHT ASNs by iterating through the AS PATH Upstream ASN is LEFT ASN, Downstream is RIGHT ASN Transit is ASN with non-zero RIGHT Peering is ASN with zero LEFT Originating ASN is ASN with zero RIGHT Result: { ASN, LEFT, RIGHT} {3356, 0, 1299} {1299, 3356, 13335} {13335, 1299, 10310} {10310, 13335, 33612} {33612, 10310, 0}

BGP Route-Leaks A route leak is when routes are advertised to a BGP peer when they shouldn t have been (wrongfully advertised) Is intentional or unintentional Can impact few prefixes or many (thousands) prefixes Not just Unicast/Internet prefixes, can also be VPNv4/v6 prefixes Not limited to originating ASN of prefix Agreed policies not being enforced can be considered leaking Me PEER Someone else Advertise 198.135.0.0/21 173.39.128.0/17 Opps 108.59.80/20

Shouldn t this be moot? Several techniques are used to prevent routeleaking, but prefixes can still slip through the cracks Not limited to just advertisement or withdrawal of a prefix, it also includes wrongly applied prepending/local-pref/etc. In some cases, policies may conflict, such as preferring wholesale over transit, which may use more relaxed filters Maximum prefixes doesn t help when it s just a few that get advertised inadvertently Mistakes can be made with filters, both programmatically and human applied RIR, IRR, RPKI, etc. primarily focus on assigned address blocks by originating ASN for registered addresses, leaving VPNv4/v6 out of scope PEER Me Someone else Match/Prepend ASN n times Set LP no-export Accept 198.135.0.0/21 173.39.128.0/17 Deny 108.59.80/20

Route Leak: More Specific Observed Check if prefix aggregate ASN matches itself Is New No Next Check if aggregate ASN is upstream of prefix ASN Yes Alert otherwise ~8000 prefixes match with no normalization/baseline Same Origin ASN No Yes Agg ASN Upstream Yes No Alert

Route Leak: Originating ASN Inconsistent Check if prefix is actively advertised by other peers with a different originating ASN Is New No Next If history includes multiple ASNs but only one active, prefix has likely relocated instead of possible hijack ~1000 prefixes match with no normalization/baseline Yes Multiple ASNs Yes No No ASN Upstream Yes Equal or better Yes Alert

Route Leak: Unknown Upstream Observed Check if adjacent ASN has previously been seen for the originating ASN Is New No Next Yes Upstream New No Yes Alert

Route Leak: Selection Attribute Changed Attributes change often, monitoring for such events should take this into account by alerting when multiple prefixes are affected or by snapshotting before/after change Snapshotting Snapshot topology before and after a change. Report showing prefixes changed by local preference, as path length (including this ASN prepends added or removed), well-known community added/removed, MED, Scheduled Report Uses snapshotting technique but run on a schedule instead of before/after a change Watch List Alert on specific communities or community pattern/convention being added/removed Alert on specific prefixes Alert on specific originating or transit ASNs Watch any attribute and alert if change from previous, this includes the lack of or presence of an attribute

Route Leak: Transit and Origination Traffic shifting by peer, transit/originating ASN, or by community results in significant prefixes changing in attributes (e.g. next hop, communities, ). A significant change in prefixes seen by transit and/or originating ASNs could be a route leak

Analytics There are many types of analytics but at a high level, most would fall under one of the below Real-Time q Alert if a specific condition presents itself, such as prefixes change to traverse a sub-optimal AS On-demand q Transit AS increases significantly in number of prefixes that would be preferred, trigger an analysis to correlate impacted prefixes Discovery & Investigation q Report on the number of distinct prefixes that traverse a specific transit AS over time Topologies q Management application queries for topology data to correlate impact events by source and destination IP addresses OpenBMP and Apache Kafka can be utilized to collect and analyze historical and real-time BGP data with custom and third-party applications

Install OpenBMP today using docker hub openbmp/aio For more details see: http://openbmp.org/#!docs/install.md

Questions?

Thank You www.openbmp.org github.com/openbmp