Border Gateway Protocol (BGP)



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

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

Border Gateway Protocol BGP4 (2)

BGP overview BGP operations BGP messages BGP decision algorithm BGP states

Using the Border Gateway Protocol for Interdomain Routing

Inter-domain Routing. Outline. Border Gateway Protocol

How To Understand Bg

Internet inter-as routing: BGP

Routing Protocol - BGP

Based on Computer Networking, 4 th Edition by Kurose and Ross

Exterior Gateway Protocols (BGP)

APNIC elearning: BGP Attributes

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

Border Gateway Protocol (BGP-4)

basic BGP in Huawei CLI

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

APNIC elearning: BGP Basics. Contact: erou03_v1.0

BGP Best Path Selection Algorithm

HP Networking BGP and MPLS technology training

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

BGP Attributes and Path Selection

Routing in Small Networks. Internet Routing Overview. Agenda. Routing in Large Networks

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

BGP4 Case Studies/Tutorial

BGP1 Multihoming and Traffic Engineering

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

Internet inter-as routing: BGP

BGP Router Startup Message Flow

netkit lab bgp: prefix-filtering Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group

DD2491 p Inter-domain routing and BGP part I Olof Hagsand KTH/CSC

Chapter 6: Implementing a Border Gateway Protocol Solution for ISP Connectivity

Route Discovery Protocols

E : Internet Routing

Examination. IP routning på Internet och andra sammansatta nät, DD2491 IP routing in the Internet and other complex networks, DD2491

ITRI CCL. IP Routing Primer. Paul C. Huang, Ph.D. ITRI / CCL / N300. CCL/N300; Paul Huang 1999/6/2 1

Border Gateway Protocol, Route Manipulation, and IP Multicast

Understanding Virtual Router and Virtual Systems

- Border Gateway Protocol -

Outline. Internet Routing. Alleviating the Problem. DV Algorithm. Routing Information Protocol (RIP) Link State Routing. Routing algorithms

Textbook Required: Cisco Networking Academy Program CCNP: Building Scalable Internetworks v5.0 Lab Manual.

CS551 External v.s. Internal BGP

Advanced Networking Routing: RIP, OSPF, Hierarchical routing, BGP

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

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

Understanding Route Redistribution & Filtering

JNCIA Juniper Networks Certified Internet Associate

DD2491 p Load balancing BGP. Johan Nicklasson KTHNOC/NADA

IP Routing Tecnologie e Protocolli per Internet II rev 1

Routing Protocols. Interconnected ASes. Hierarchical Routing. Hierarchical Routing

Lecture 18: Border Gateway Protocol"

> Border Gateway Protocol (BGP-4) Technical Configuration Guide. Ethernet Routing Switch. Engineering

Multihomed BGP Configurations

MPLS VPN Route Target Rewrite

Configuring BGP. Cisco s BGP Implementation

The ISP Column. An Introduction to BGP the Protocol

Outline. EE 122: Interdomain Routing Protocol (BGP) BGP Routing. Internet is more complicated... Ion Stoica TAs: Junda Liu, DK Moon, David Zats

Active measurements: networks. Prof. Anja Feldmann, Ph.D. Dr. Nikolaos Chatzis Georgios Smaragdakis, Ph.D.

Advanced BGP Policy. Advanced Topics

Can Forwarding Loops Appear when Activating ibgp Multipath Load Sharing?

Border Gateway Protocol Best Practices

IP Routing Configuring RIP, OSPF, BGP, and PBR

GregSowell.com. Mikrotik Routing

How To Make A Network Plan Based On Bg, Qos, And Autonomous System (As)

Route Optimization. rek Petr Grygarek, VSB-TU Ostrava, Routed and Switched Networks 1

Router and Routing Basics

Understanding Route Aggregation in BGP

BGP. 1. Internet Routing

Load balancing and traffic control in BGP

OSPF Version 2 (RFC 2328) Describes Autonomous Systems (AS) topology. Propagated by flooding: Link State Advertisements (LSAs).

IMPLEMENTING CISCO IP ROUTING V2.0 (ROUTE)

B. Quoitin, S. Uhlig, C. Pelsser, L. Swinnen and O. Bonaventure

Network Level Multihoming and BGP Challenges

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

Gateway of last resort is to network

BSCI Module 6 BGP. Configuring Basic BGP. BSCI Module 6

Interdomain Routing. Outline

Configuring BGP Services

BGP Advanced Routing in SonicOS

BGP Link Bandwidth. Finding Feature Information. Prerequisites for BGP Link Bandwidth

Border Gateway Protocol (BGP) Conformance and Performance Testing

Configuring and Testing Border Gateway Protocol (BGP) on Basis of Cisco Hardware and Linux Gentoo with Quagga Package (Zebra)

BGP Link Bandwidth. Finding Feature Information. Contents

Introduction to Routing

BGP: Frequently Asked Questions

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

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

BGP-4 Case Studies. Nenad Krajnovic.

A Case Study Design of Border Gateway Routing Protocol Using Simulation Technologies

Introduction to Dynamic Routing Protocols

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

Computer Networks Administration Help Manual Sana Saadaoui Jemai Oliver Wellnitz

B. Quoitin, S. Uhlig, C. Pelsser, L. Swinnen and O. Bonaventure

Administra0via. STP lab due Wednesday (in BE 301a!), 5/15 BGP quiz Thursday (remember required reading), 5/16

Chapter 1 INTRODUCTION

CSC458 Lecture 6. Homework #1 Grades. Inter-domain Routing IP Addressing. Administrivia. Midterm will Cover Following Topics

BGP Routing. Course Description. Students Will Learn. Target Audience. Hands-On

MPLS VPN. Agenda. MP-BGP VPN Overview MPLS VPN Architecture MPLS VPN Basic VPNs MPLS VPN Complex VPNs MPLS VPN Configuration (Cisco) L86 - MPLS VPN

Transcription:

Border Gateway Protocol (BGP) Petr Grygárek rek 1

Role of Autonomous Systems on the Internet 2

Autonomous systems Not possible to maintain complete Internet topology information on all routers big database, change processing overhead, instability Internet divided into Autonomous systems ISP, big company Autonomous system = contiguous set of routers with common routing policy and under common administration Routing policy: IGP, implemented route optimization, Autonomous systems numbered with world-wide wide unique numbers (16 bit) 3

Hierarchical routing Intra-AS routing uses Interior Gateway Protocols (IGP) knows only topology of it s s own AS outside of AS is reached using default sometimes has summary information about networks behind individual external links Limited by number of routes the protocol is capable to process efficiently OPSF, RIP, IGRP, Inter-AS routing uses Exterior Gateway Protocols Operates on graph of AS interconnection Does not know topology of other ASes,, works only with information about networks contained in individual ASes knows local next-hop border router to reach the destination Currently only BGP (Border Gateway Protocol) is used 4

Inter-AS routing The purpose of EGP is to provide information to deliver packet to the boundary router of the destination AS Boundary routers run both EGP and IGP Boundary router delivers the packet to the final destination using IGP Every AS propagates networks contained within it into EGP also networks reachable through it It is useful to limit number of routes propagated using summarization ation (internal networks should have common prefix) Note: For transit AS, packet has to be passed among border routers rs through AS internal routers 5

AS types Single-homed Multi-homed More links to the same ISP or different ISPs Transit Carries traffic not originated or destined to internal networks multi-homed Non-transit single-homed or multi-homed AS which doesn t t allow transit 6

Single-homed AS 7

Single-homed AS: How to propagate internal networks into BGP? ISP router has static routes to customer s networks and redistributes them into BGP IGP between ISP router and customer router ISP redistributes IGP into BGP BGP between ISP router and customer router If customer has it s s own AS number or uses private AS number 8

Propagation via IGP 9

Propagation via BGP 10

Private AS-es 64512 65535 Used and known only in context of single provider s s AS Can be used only for AS connected to single provider (by one or more links) Outside of provider AS, private AS-es presents themselves like part of that s s provider AS 11

Private AS-es 12

Who has it s s own AS? Normally, customer s s networks are part of provider AS Sometimes private AS-es used Customer has to have it s s own AS number if he indents to connect to multiple providers Customer commonly needs it s s own AS number if it requires provider-independent independent addresses 13

Nontransit Multi-homed AS Packet filters can be used on ingress links to protect against injection of unwanted traffic ISP1 could use static route to route to ISP2 networks 14

Transit multi-homed AS AS1 AS2 20.0.1.0/24 20.0.2.0/24 30.0.10.0/24 30.0.20.0/24 20.0.1.0/24 20.0.2.0/24 EBGP EBGP 30.0.10.0/24 30.0.20.0/24 30.0.10.0/24 30.0.20.0/24 100.80.0.0/16 100.81.0.0/16 AS3 (Transit AS) IBGP 20.0.1.0/24 20.0.2.0/24 100.80.0.0/16 100.81.0.0/16 100.80.0.0/16 100.81.0.0/16 15

Routing symmetry, load balancing Symmetry - the link used for outgoing traffic for some network is also used for returning traffic Load balancing some destinations reached by one link, others by another Often not possible to reach both 16

Border Gateway Protocol 17

Border Gateway Protocol Exchanges information between AS border routers What networks are in each AS List of AS-es Today, BGP v.4 is used es to transit when reaching particular network Sometimes BGPv4+: multiprotocol extension Other address families, multicasting, VPNs, Supports classless addressing Propagates subnet masks with every prefix Allows for address range aggregation 18

BGP operation on graph of AS-es 19

Path selection, routing policies BGP operates on AS interconnection graph Path = sequence of AS numbers to transit to get to particular network BGP does not have simple concept of metric to select best path Path has to be chosen with regard to business policy of individual AS operators BGP configuration has to reflect appointed routing policy Details of routing policy have to be configured manually Peer routers, prefix filtering and route preferences, Configuration more complicated than configuration of IGP s 20

Examples of routing policies Which destination we allow to transit packets to through our AS? From which source address we allow to transit traffic through our AS? Which external link will we use to reach particular external network? Which ingress link we want other ASes use for traffic destined for particular network inside our AS? 21

Suboptimal routing on the Internet Internet routing is not optimal from point of view of any metric There is no common metric, various IGPs use different metrics Optimality not reachable neither desired Hierarchical routing is suboptimal but limits the number of routes in routing table Need to respect routing policies 22

BGP Principle Path-vector routing algorithm from point of view of topology knowledge, BGP stands between distance-vector and link-state protocols Path vector = sequence of AS numbers to transit before getting to particular network Every route is propagated together with it s s path vector Path vector collects number of AS-es the route was passed through If AS receives route with path vector containing it s s own AS number, route is discarded (loop avoidance) Path vector serves as metric route with shorter path vector is preferred 23

Passing of BGP routes 24

Spreading of routing information Routing information exchanged between AS boundary routers Peer routers to exchange routing information with are configured manually Reliable exchange (TCP, port 179) When BGP session is established among peers, complete routing information is exchanged After initial exchange, only changes are sent 25

Peer reachability testing BGP router periodically checks reachability of every peer Keepalive message sent once per minute If some peer fails, the router has to remove all routes through that peer and inform other peers 26

BGP messages Exchanged between peer routers (TCP/179, support for authentication) OPEN session establishment Negotiation of protocol version, hold time for keepalives,, AS numbers, UPDATE Advertised prefixes (+ route attributes), withdrawn routes KEEPALIVE peer reachability testing NOTIFICATION operation error, close session 27

BGP database BGP database contains all routes learned from peers For every destination, one route is chosen based on routing policy criteria No support for load balancing Chosen routes are placed into routing table Only routes used by router itself (i.e. those chosen into routing table) are propagated to other neighbors 28

External and Internal BGP 29

External and Internal BGP If there is more than one boundary router in some AS, BGP information has to be passed between them Special case, exchange between routers in the same AS Boundary routers can possibly be separated by internal structure of routers (running IGP) Solution: there exists two types of BGP session External BGP (EBGP) Internal BGP (IBGP) Peers do not have to be physically connected 30

EBGP and IBGP 31

Passing of routes in IBGP sessions Need to avoid loops when passing routes through IBGP Test for presence of receiving peer s s AS number in path vector doesn t t work Special rules defined for passing of routes in IBGP session Information from IBGP is passed to EBGP peers, but not to other IBGP peers. Information from EBGP is passed to other EBGP peers and all IBGP peers 32

Full mesh of IBGP sessions 33

Definition of BGP Routing Policy 34

BGP Attributes Mechanism of implementation of routing policies Every route passed between peers can be assigned one or more attributes Routes are processed and selected based on values of attributes they carry 35

Attribute Types Well-known - understood by every BGP implementation Mandatory must be appended to each route Discretionary may be appended to route Optional - not every BGP implementation must understand it Transitive if implementation doesn t t understand the attribute, it passes it next unchanged Nontransitive if implementation doesn t t understand the attribute, it doesn t t pass it next 36

Most commonly used Attributes 37

How to influence routing policy using attributes? Manipulation with attributes received from individual peers Input Policy Engine Includes filtering of routes received from individual peers Manipulation with attributes of routes propagated to individual peers Output Policy Engine Includes filtering of routes propagated to individual peers Route used (and propagated next) by BGP router is determined by candidate route s s attribute values 38

Function of policy engines Test for attribute values Test for prefixes (including prefix length) Setting of attribute value when predefined criteria met Filtering of route when predefined criteria met 39

Processing of BGP routes 40

Definition of Routing Policies Separately for each peer Separately for incoming and outgoing routes 41

BGP Table (BGP database) Contains routes passed through (and possibly manipulated by) input policy engine Routes from every peer For every destination (prefix), one best route is chosen Selection is based on attribute values Standardized algorithm (will be discussed next) Best route placed into routing table Best route passed next to Output Policy Engine 42

Well-known Mandatory Attributes 43

AS-PATH Necessary for path-vector algorithm function AS which gets the route prepends it s s number to the beginning AS doesn t t accept route if AS-PATH already contains it s s own AS number Route with shorter AS-PATH is preferred 44

AS-PATH manipulation AS-PATH handled as string (AS numbers separated by spaces) Regular expression used to test presence of some pattern (AS sequence) Originating AS, AS in path, Inserting AS number multiple times makes AS- PATH longer and route less preferred Router can insert only it s s own AS number (possibly multiple times) 45

NEXT-HOP Next hop of BGP route is boundary router which propagated that route into AS Difference from IGP not neighbor on the same link Router has to know route to next-hop address from IGP (or IBGP) Otherwise, BGP route is not accepted Recursive routing table lookup when routing packets 46

NEXT-HOP Line between ASes propagated into IGP 47

NEXT-HOP on broadcast network 48

ORIGIN Informs where BGP learnt the route from IGP redistributed from IGP EGP unused (from outdated protocol EGP) INCOMPLETE unknown origin 49

BGP and IGP synchronization problem 50

Route synchronization Route is synchronized, if router can see it both from BGP and IGP Only synchronized routes are propagated out of AS Otherwise, traffic would have to be discarded by internal routers When IBGP is ran on every router, switch off the synchronization test 51

Transit system routing implementation choices BGP on every router (IBGP) At least on every transit router Common solution of ISPs Redistribution of BGP routes into IGP But IGPs are not capable to handle so many routes 52

Route aggregation in BGP 53

Aggregation Attributes Router can aggregate more routes into one with shorter prefix Only when aggregator owns whole address range ATOMIC-AGGREGATE=True AGGREGATE=True AGGREGATOR: ID of aggregating router AS-SET= SET= AS-PATH_1+AS PATH_1+AS-PATH_2PATH_2 AS-PATH: set as if route originated from AS of aggregating router 54

Aggregation Example 55

How to influence route selection using attributes 56

LOCAL_PREFERENCE Well-known discretionary Allows routers of one AS to unify exit link they will use to reach some particular external network Route with higher LOCAL_PREFERENCE is preferred Never passed behind AS boundary 57

LOCAL_PREFERENCE Example 58

WEIGHT Proprietary (Cisco, ) Used to increase/decrease preference of some route in Input Policy Engine Higher Weight is preferred Only local significance, does not passed outside of single router In fact, not a standard-defined defined attribute 59

WEIGHT example 60

Multi-Exit Discriminator (MED) Influences other AS s s decision which link to use when routing packets into networks inside our AS Lower MED is preferred treated similary like IGP metric MED value can be set manually or taken from IGP metric Normally, only MEDs from the same AS may be compared 61

MED example 62

1. 2. 3. 4. 5. Route Selection Algorithm 1. Higher WEIGHT 2. Higher LOCAL_PREFERENCE 3. Route generated by router itself 4. Shorter AS_PATH 5. More preferred ORIGIN 6. 7. 8. 9. (IGP best, INCOMPLETE worst) 6. Lower MED 7. EBGP preferred over IBGP 8. Better IGP metric to NEXT-HOP 9. Lower peer Router_ID (tiebreaker) 63