Border Gateway Protocol

Slides:



Advertisements
Similar presentations
BGP.
Advertisements

CS Summer 2003 CS672: MPLS Architecture, Applications and Fault-Tolerance.
Border Gateway Protocol Ankit Agarwal Dashang Trivedi Kirti Tiwari.
CS540/TE630 Computer Network Architecture Spring 2009 Tu/Th 10:30am-Noon Sue Moon.
Lecture 9 Overview. Hierarchical Routing scale – with 200 million destinations – can’t store all dests in routing tables! – routing table exchange would.
Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.
© J. Liebeherr, All rights reserved 1 Border Gateway Protocol This lecture is largely based on a BGP tutorial by T. Griffin from AT&T Research.
Border Gateway Protocol Autonomous Systems and Interdomain Routing (Exterior Gateway Protocol EGP)
Fundamentals of Computer Networks ECE 478/578 Lecture #18: Policy-Based Routing Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
1 Interdomain Routing Protocols. 2 Autonomous Systems An autonomous system (AS) is a region of the Internet that is administered by a single entity and.
Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet Protocol –Datagram format.
1 Network Architecture and Design Routing: Exterior Gateway Protocols and Autonomous Systems Border Gateway Protocol (BGP) Reference D. E. Comer, Internetworking.
CS 164: Global Internet Slide Set In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.
The Border Gateway Protocol (BGP) Sharad Jaiswal.
Computer Networking Lecture 10: Inter-Domain Routing
More on BGP Check out the links on politics: ICANN and net neutrality To read for next time Path selection big example Scaling of BGP.
Ion Stoica October 2, 2002 (* this presentation is based on Lakshmi Subramanian’s slides) EE 122: Inter-domain routing – Border Gateway Protocol (BGP)
14 – Inter/Intra-AS Routing
© 2009 Cisco Systems, Inc. All rights reserved. ROUTE v1.0—6-1 Connecting an Enterprise Network to an ISP Network Considering the Advantages of Using BGP.
Border Gateway Protocol(BGP) L.Subramanian 23 rd October, 2001.
14 – Inter/Intra-AS Routing Network Layer Hierarchical Routing scale: with > 200 million destinations: can’t store all dest’s in routing tables!
Unicast Routing Protocols  A routing protocol is a combination of rules and procedures that lets routers in the internet inform each other of changes.
© 2009 Cisco Systems, Inc. All rights reserved. ROUTE v1.0—6-1 Connecting an Enterprise Network to an ISP Network BGP Attributes and Path Selection Process.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking BGP, Flooding, Multicast routing.
1 Interdomain Routing (BGP) By Behzad Akbari Fall 2008 These slides are based on the slides of Ion Stoica (UCB) and Shivkumar (RPI)
CS 3700 Networks and Distributed Systems Inter Domain Routing (It’s all about the Money) Revised 8/20/15.
CS 3830 Day 29 Introduction 1-1. Announcements r Quiz 4 this Friday r Signup to demo prog4 (all group members must be present) r Written homework on chapter.
Lecture 4: BGP Presentations Lab information H/W update.
Chapter 9. Implementing Scalability Features in Your Internetwork.
Border Gateway Protocol
BGP V1.1. When is BGP Applicable Basic BGP Peer Configuration Troubleshooting BGP Connections BGP Operation and Path Attributes Route Import/Export Selected.
Network Layer r Introduction r Datagram networks r IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP r What’s inside a router r Routing.
Xuan Zheng (modified by M. Veeraraghavan) 1 BGP overview BGP operations BGP messages BGP decision algorithm BGP states.
BGP4 - Border Gateway Protocol. Autonomous Systems Routers under a single administrative control are grouped into autonomous systems Identified by a 16.
Border Gateway Protocol (BGP) W.lilakiatsakun. BGP Basics (1) BGP is the protocol which is used to make core routing decisions on the Internet It involves.
More on Internet Routing A large portion of this lecture material comes from BGP tutorial given by Philip Smith from Cisco (ftp://ftp- eng.cisco.com/pfs/seminars/APRICOT2004.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429/556 Introduction to Computer Networks Inter-domain routing Some slides used with.
Network Layer4-1 Intra-AS Routing r Also known as Interior Gateway Protocols (IGP) r Most common Intra-AS routing protocols: m RIP: Routing Information.
An internet is a combination of networks connected by routers. When a datagram goes from a source to a destination, it will probably pass through many.
CS 640: Introduction to Computer Networks Aditya Akella Lecture 11 - Inter-Domain Routing - BGP (Border Gateway Protocol)
1 Agenda for Today’s Lecture The rationale for BGP’s design –What is interdomain routing and why do we need it? –Why does BGP look the way it does? How.
BGP and ICMP. Exterior Gateway Protocol (EGP) Like RIP, but no metrics. Just if reachable. Rtr inside a domain collects reachability information and informs.
BGP Basics BGP uses TCP (port 179) BGP Established unicast-based connection to each of its BGP- speaking peers. BGP allowing the TCP layer to handle such.
Text BGP Basics. Document Name CONFIDENTIAL Border Gateway Protocol (BGP) Introduction to BGP BGP Neighbor Establishment Process BGP Message Types BGP.
1 Internet Routing 11/11/2009. Admin. r Assignment 3 2.
14 – Inter/Intra-AS Routing
Chapter 4: Network Layer
CS 3700 Networks and Distributed Systems
2017 session 1 TELE3118: Network Technologies Week 6: Network Layer Control Plane Inter-Domain Routing Protocols Some slides have been adapted from:
Boarder Gateway Protocol (BGP)
BGP 1. BGP Overview 2. Multihoming 3. Configuring BGP.
CS 3700 Networks and Distributed Systems
Border Gateway Protocol
ICMP ICMP – Internet Control Message Protocol
Chapter 4: Network Layer
BGP supplement Abhigyan Sharma.
Interdomain Traffic Engineering with BGP
Lixin Gao ECE Dept. UMASS, Amherst
Routing.
Cours BGP-MPLS-IPV6-QOS
Computer Networking TCP/IP Part 2
Department of Computer and IT Engineering University of Kurdistan
Chapter 4: Network Layer
Chapter 4: Network Layer
Chapter 4: Network Layer
COMP/ELEC 429/556 Introduction to Computer Networks
BGP Instability Jennifer Rexford
Computer Networks Protocols
Routing.
Network Layer: Internet Inter-Domain Routing
Presentation transcript:

Border Gateway Protocol Autonomous Systems and Interdomain Routing (Exterior Gateway Protocol EGP)

Internet Infrastructure

Autonomous Systems An autonomous system (AS) is a region of the Internet that is administered by a single entity and that has a unified routing policy Each autonomous system is assigned an Autonomous System Number (ASN). Each ASN is 32bits ASN assigned by Regional Internet Registries Some are reserved for private use and never appear on the Internet Example ASNs Uof T’s campus network (AS239) Sprint (AS1239, AS1240, AS 6211, …)

Number of Autonomous Systems

Interdomain and Intradomain Routing Routing protocols used inside an AS, referred to as intradomain routing, are called interior gateway protocols (IGP) Objective: shortest path, only operate within an AS Routing protocols used between ASs, referred to as interdomain routing, are called exterior gateway protocols (EGP) Objective: satisfy policy of the ASs, not always shortest path

EGP and IGP Interior Gateway Protocol (IGP) 1 Interior Gateway Protocol (IGP) Routing is done based on metrics Routing domain is one autonomous system Exterior Gateway Protocol (EGP) Routing is done based on policies Routing domain is the entire Internet

Routing Protocols Interdomain routing is based on connectivity between autonomous systems (ASs) Interdomain routing can ignore many details of intra domain router interconnection (not interested in internals of an AS)

Multiple Routing Protocols Multiple routing protocols can run on the same router If a router is an exterior gateway router then usually one IGP and one EGP Each routing protocol updates the routing table accordingly

Autonomous Systems Terminology local traffic: traffic with source and destination in AS transit traffic: traffic that passes through the AS Stub AS: has connection to only one AS, only carries local traffic Multihomed Stub AS: has connection to >1 AS, but does not carry transit traffic Transit AS: has connection to >1 AS and carries transit traffic

Stub and Transit Networks Settings: AS 1 is a multi-homed stub network AS 3 and AS 4 are transit networks AS 2 and AS 5 are stub networks

Selective Transit Example: AS 3 carries traffic between AS 1 and AS 4 and between AS 2 and AS 4 But AS 3 does not carry traffic between AS 1 and AS 2 The example shows a routing policy.

Customer/Provider and Peers A stub network typically obtains access to the Internet through a Transit network. AS7 – AS5 – AS 8 A Transit network that is a provider may be a customer for another network – AS4 is a customer of AS2. Customer pays provider for service

Customer/Provider and Peers Transit networks can have a peer relationship Peers provide transit between their respective customers Peers do not provide transit between peers AS1 – AS2 – AS3 Peers normally do not pay each other for service X

Border Gate Protocol (BGP) Border Gateway Protocol is the interdomain routing protocol for the Internet for routing between autonomous systems Currently in version 4 (1995) Network administrators can specify routing policies BGP is a path vector protocol (Like distance vector, but routing messages in BGP contain complete routes) Uses TCP to transmit routing messages

Border Gate Protocol (BGP) An autonomous system uses BGP to advertise its network address(es) to other AS’s BGP helps an AS to: Learn about reachable networks from neighboring AS’s Distribute the information about reachable networks to routers inside the AS Select a route if there are multiple routes to reach the same network

Key C/C’s of BGP Provides inter-autonomous system communication Propagates reachability information Follows next-hop paradigm Provides support for policies Sends path information Permits incremental updates Allows route aggregation Allows authentication Uses reliable transport (i.e., TCP) – Unusual: most routing update protocols use connectionless transport (e.g., UDP) Sends keep alive messages so other end knows connection is valid (even if no new routing information is needed). Similar to OSPF neighbors

BGP Message Types Each advertised route is specified as a network prefix with attribute values

BGP Message Header Marker is an agreed upon value (synchronization pattern) between two peers. Usually all one’s, but can be used for authentication. Used to synchronize the two ends. Length gives total message length in octets Type contains one of the message types shown in previous slide

BGP Open Message

Opening a connection After TCP Connection is established, peers send an OPEN msg to declare the AS number and other attributes. Hold Time indicates the max. elapsed time between two msgs that a receiver should wait. If nothing received from a peer prior to timeout, peer considered to be down. It is reset with every msg reception. KeepAlive msgs sent every 1/3 hold time value if no other msg sent. An OPEN msg is Acked with a KeepAlive msg. A unique BGP Identifier is used for all communications from this peer. It is one of the BGP router IP addresses. Parm.Len indicates the length in octets of optional parameters. If none, it is zero octets. Each Opt. Parameter is preceded by 2 octets specifying the type of parameter and the length of the parameter.

BGP Update Message Note that any field labeled “variable”, can be omitted if there is no information for a parameter

Advertise New and Delete Old After Open msgs, peers use UPDATE to send path information to peers. Withdraw Length field (2 octets) specifies number of Destinations being deleted. Path Attr Length specifies the Path attributes that are associated with a new Destination being advertised.

Path Attributes If advertised destinations have different attributes, they are sent in separate Update msgs. All Destinations in an Update msg have similar path attributes. Each attribute consists of a triple: (type, length, value)

BGP Path Attributes

BGP Attribute Type Codes

Ipv4 Addresses in BGP msgs The LEN field identifies the number of octets in the IPv4 address covered by mask The LEN field is a binary number representing the value of the prefix E.G., Mask value of 8 or less will only have one address octet, 17-24 will have 3.

BGP Notification Msg Once BGP detects a problem (error) it shuts down the connection to the peer. Data field includes any diagnosis information that is related to the error. Not all NOTIFICATION messages include a value in the Data field.

Error Codes

Error Sub Codes

BGP Message Examples

Flow between Multiple ASes For net N1 in AS1 to send traffic to net N16 in AS16: AS16 must originate and announce N16 to AS8. AS8 must accept N16 from AS16. AS8 must announce N16 to AS1 or AS34. AS1 must accept N16 from AS8 or AS34. For two-way packet flow, similar policies must exist for N1. AS34 AS16 N16 AS1 N1 AS8

BGP interactions The networks that are advertised are network IP addresses with a prefix, E.g., 128.100.0.0/16 Network Prefixes reachable from AS 1 Network Prefixes reachable from AS 3

BGP interactions BGP is executed between two routers BGP session BGP peers or BGP speakers Procedure: Establishes TCP connection (port 175) to BGP peer Exchange all BGP routes As long as connection is alive: Periodically send incremental updates Note: Not all autonomous systems need to run BGP. On many stub networks, the route to the provider can be statically configured

BGP interactions BGP peers advertise reachability of IP networks A advertises a path to a network (e.g., 10.0.0.0/24) to B only if it is willing to forward traffic going to that network Path-Vector: A advertises the complete path AS A, …., AS B  this avoids loops

BGP Sessions External BGP session (eBGP): Peers are in different ASs Internal BGP session (iBGP) Peers are in the same AS, but each peer connects to a different peer in another AS Note that iBGP sessions use routes constructed by an intradomain routing protocol to exchange messages!

iBGP sessions All iBGP peers in the same AS are (virtually) fully meshed Peer announces routes received via eBGP to iBGP peers

Route Reflectors Full mesh of iBGP routers is difficult to maintain Router Reflectors (RR) present an alternative All iBGP routers peer with the RR RR acts as a master Other iBGP routers become slaves

Content of Advertisements A BGP router route advertisement is sent in a BGP UPDATE message A route is announced as a Network Prefix and Attributes Attributes specify details about a route: Mandatory attributes: ORIGIN AS_PATH NEXT_HOP many other attributes

ORIGIN attribute Originating domain sends a route with ORIGIN attribute (AS number) Network Prefix 10.0.1.0/24, ORIGIN {1} 10.0.1.0/24, ORIGIN {1} 10.0.1.0/24, ORIGIN {1} 10.0.1.0/24, ORIGIN {1}

AS-PATH attributes Each AS that propagates a route prepends its own AS number AS-PATH collects a path to reach the network prefix Path information prevents routing loops from occurring Path information also provides information on the length of a path (By default, a shorter route is preferred) Note: BGP aggregates routes according to CIDR rules 10.0.1.0/24, AS-PATH {4,2,1} 10.0.1.0/24, AS-PATH {1} 10.0.1.0/24, AS-PATH {2,1} 10.0.1.0/24, AS-PATH {3,1}

NEXT-HOP attributes Each router that sends a route advertisement, includes its own IP address of the forwarding port in a NEXT-HOP attribute The attribute provides information for the routing table of the receiving router. 10.0.1.0/24, NEXT-HOP {128.100.11.1} 10.0.1.0/24, NEXT-HOP {128.143.71.21}

Connecting NEXT-HOP with IGP information At R1: IGP Routing table Combined Routing table Dest. Next hop 128.100.11.0/24 192.0.1.2 Dest. Next hop 128.100.11.0/24 192.0.1.2 10.0.1.0/24 BGP info Dest. Next hop 10.0.1.0/24 128.100.11.1

Route Selection An AS may get more than one route to an address Needs to select a route 5 Route Selection Criteria (in order of preference) Highest Local Preference Shortest AS-Path Lowest MED (multi-exit discriminator) ( called “metric” in BGP) Prefer iBGP over eBGP routes Lowest IGP cost to leave AS (“hot potato”) Lowest router ID ( used as tie breaker)

Local Preference Local to an AS – Default is 100 Used to influence path selection – determines best outbound path If there are multiple exit points from the AS, the local preference attribute is used to select the best exit point for a specific route Path with highest local preference wins Local Preference is used only for iBGP sessions (not passed to routers in other AS

Hot Potato Routing Router R3 in AS A receives two advertisements to X Which route should it pick? Hot Potato Rule: Select the iBGP peer that has the shortest IGP route Analogy: Get the packet out of one’s own AS as quickly as possible, i.e., on the shortest path

Hot Potato Routing Finding the cheapest IGP route: Compare the cost of the two paths R3 R1 R3 R2 according to the IGP protocol Here: R1 has the shortest path Add a routing table entry for destination X via R1

Hot Potato Routing can backfire! AS1 would serve its customer (source) better by not picking the shortest (lowest cost) route to AS 2. Here it is “5” but that will take you via a route in AS 2 that has a cost of 25. So total cost = 5+25 = 30 instead of 20+4 = 24 Cost 4 Cost 25

Processing in BGP Best entry is entered in IP routing table Based on attributes BGP updates arrive BGP updates depart

Importing and Exporting Routes An AS may not accept all routes that are advertised An AS may not advertise certain routes Route policies determine which routes are filtered If an AS wants to have less inbound traffic it should adapt its export rules If an AS wants to control its outbound traffic, it adapts its import rules

Routing Policies Customer Provider Since AS 5 is a stub network, it should not advertise routes to networks other than networks in AS 5 When AS 3 learns about the path {AS1, AS4}, it should not advertise the route {AS3, AS1, AS4} to AS 2.

Traffic Often Follows ASPATH In many cases, packets are routed according to the AS-PATH However, in some cases this is not true (Here: AS 2 filters routes with a long prefix) Traffic Flow Traffic Flow

Short AS-PATH does not mean that route is short From AS 6’s perspective Path {AS2, AS1} is short Path {AS5, AS4, AS3, AS1} is long But the number of traversed routers is larger when using the shorter AS-PATH (as IGP routing in AS2 has longer route)

BGP Issues BGP is a simple protocol but it is very difficult to configure Path vectors are used to avoid cycles It is not optimum, designed to work with policies