Xuan Zheng (modified by M. Veeraraghavan) 1 BGP overview BGP operations BGP messages BGP decision algorithm BGP states.

Slides:



Advertisements
Similar presentations
1 Copyright  1999, Cisco Systems, Inc. Module10.ppt10/7/1999 8:27 AM BGP — Border Gateway Protocol Routing Protocol used between AS’s Currently Version.
Advertisements

BGP.
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.
Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.
The Border Gateway Protocol and Classless Inter-Domain Routing
© 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.
BGP. 2 Copyright © 2009 Juniper Networks, Inc. BGP Overview Is an inter-domain routing protocol that communicates prefix reachablility.
CSC 600 Internetworking with TCP/IP Unit 6a: IP Routing and Exterior Routing Protocols (Ch. 14, 15) Dr. Cheer-Sun Yang Spring 2001.
Border Gateway Protocol Autonomous Systems and Interdomain Routing (Exterior Gateway Protocol EGP)
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.
1 Network Architecture and Design Routing: Exterior Gateway Protocols and Autonomous Systems Border Gateway Protocol (BGP) Reference D. E. Comer, Internetworking.
Practical and Configuration issues of BGP and Policy routing Cameron Harvey Simon Fraser University.
CS Summer 2003 Lecture 3. CS Summer 2003 What is a BGP Path Attribute? BGP uses a set of parameters known as path attributes to characterize.
1 ELEN 602 Lecture 20 More on Routing RIP, OSPF, BGP.
CS Summer 2003 Lecture 4. CS Summer 2003 Route Aggregation The process of representing a group of prefixes with a single prefix is known as.
The Border Gateway Protocol (BGP) Sharad Jaiswal.
Computer Networking Lecture 10: Inter-Domain Routing
CSE5803 Advanced Internet Protocols and Applications (8) Introduction Some basic concepts of routing inside an autonomous system was introduced in.
15-744: Computer Networking L-5 Inter-Domain Routing.
Ion Stoica October 2, 2002 (* this presentation is based on Lakshmi Subramanian’s slides) EE 122: Inter-domain routing – Border Gateway Protocol (BGP)
Feb 12, 2008CS573: Network Protocols and Standards1 Border Gateway Protocol (BGP) Network Protocols and Standards Winter
© 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.
Border Gateway Protocol Vasant Reddy. Contents Introduction Operation BGP Types BGP Header Message & Attributes BGP Route Processing Security Issues Vulnerabilities.
Inter-domain Routing Don Fussell CS 395T Measuring Internet Performance.
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.
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.
CS 540 Computer Networks II Sandy Wang
Computer Networking Inter-Domain Routing BGP (Border Gateway Protocol)
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 Exterior Gateway Protocols: BGP-4, CIDR Shivkumar Kalyanaraman Rensselaer Polytechnic Institute.
© 2001, Cisco Systems, Inc. A_BGP_Confed BGP Confederations.
Copyright 2012 Kenneth M. Chipps Ph.D. Cisco CCNA Exploration CCNA 2 Routing Protocols and Concepts BGP Last Update
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.
CSCI-1680 Network Layer: Inter-domain Routing Based partly on lecture notes by Rob Sherwood, David Mazières, Phil Levis, Rodrigo Fonseca John Jannotti.
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.
Routing in the Inernet Outcomes: –What are routing protocols used for Intra-ASs Routing in the Internet? –The Working Principle of RIP and OSPF –What is.
CS 640: Introduction to Computer Networks Aditya Akella Lecture 11 - Inter-Domain Routing - BGP (Border Gateway Protocol)
© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—1-1 BGP Overview Understanding BGP Path Attributes.
1 Border Gateway Protocol (BGP) and BGP Security Jeff Gribschaw Sai Thwin ECE 4112 Final Project April 28, 2005.
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.
CS 640: Introduction to Computer Networks Aditya Akella Lecture 11 - Inter-Domain Routing - BGP (Border Gateway Protocol)
Border Gateway Protocol BGP-4 BGP environment How BGP works BGP information BGP administration.
Inter-Domain Routing. Routing Hierarchies Flat routing doesn’t scale –Each node cannot be expected to have routes to every destination (or destination.
Border Gateway Protocol DPNM Lab. Seongho Cho
ROUTING ON THE INTERNET COSC Jun-16. Routing Protocols  routers receive and forward packets  make decisions based on knowledge of topology.
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Internal DP MP-BGP for IPv6 原理 ISSUE 1.0.
Boarder Gateway Protocol (BGP)
Border Gateway Protocol
BGP 1. BGP Overview 2. Multihoming 3. Configuring BGP.
Border Gateway Protocol
BGP (cont) 1. BGP Peering 2. BGP Attributes
BGP supplement Abhigyan Sharma.
Lixin Gao ECE Dept. UMASS, Amherst
BGP Overview BGP concepts and operation.
Cours BGP-MPLS-IPV6-QOS
CSCI-1680 Network Layer: Inter-domain Routing
BGP Route Selection.
BGP Overview.
CSCI-1680 Network Layer: Inter-domain Routing
Computer Networks Protocols
Presentation transcript:

Xuan Zheng (modified by M. Veeraraghavan) 1 BGP overview BGP operations BGP messages BGP decision algorithm BGP states

Xuan Zheng (modified by M. Veeraraghavan) 2 BGP overview Currently in version 4. InterAS (or Interdomain) routing protocol for exchanging network reachability information among BGP routers. Uses TCP on port 179 to send routing messages. BGP is a distance vector protocol, but unlike in RIP, routing messages in BGP contain complete routes. Network administrators can specify routing policies.

Xuan Zheng (modified by M. Veeraraghavan) 3 BGP overview (cont.) BGP routers are also called BGP speakers

Xuan Zheng (modified by M. Veeraraghavan) 4 BGP operations Two BGP routers exchanging information on a connection are called peers. –Initially, BGP peers exchange the entire BGP routing table. –A BGP router retains the current version of the entire BGP routing tables of all of its peers for the duration of the connection. –Subsequently, only incremental updates are sent as the routing tables change. –Keepalive messages are sent periodically to ensure that the connection between the BGP peers is alive. –Notification messages are sent in response to errors or special conditions.

Xuan Zheng (modified by M. Veeraraghavan) 5 BGP operations (cont.) A route is defined as a unit of information that pairs a destination with the attributes of a path to that destination. Routes are stored in the Routing Information Bases (RIBs). A RIB within a BGP router consists of three distinct parts: –Adj-RIBs-In: contains unprocessed routing information that has been advertised to the local BGP router by its peers; –Loc-RIB: contains the routes that have been selected by the local BGP router's Decision Process; –Adj-RIBs-Out: organizes the routes for advertisement to specific peers by means of the local speaker ’ s UPDATE messages.

Xuan Zheng (modified by M. Veeraraghavan) 6 eBGP and iBGP BGP can also be used within an AS. BGP connections inside an AS are called internal BGP (iBGP), and BGP connections between different Ass are called external BGP (eBGP). R2R3 iBGP AS2 R1 AS1 R4 AS4 eBGP If an AS has multiple connections to other AS's, multiple BGP speakers are needed. All BGP speakers representing the same AS must give a consistent image of the AS to the outside. Hence iBGP The purpose of iBGP is to ensure that network reachability information is consistent among multiple BGP routers in the same AS.

Xuan Zheng (modified by M. Veeraraghavan) 7 BGP header format –Marker: authenticates incoming BGP messages or detects loss of synchronization between a pair of BGP peers –Length: indicates the total length of the message in octets, including the BGP header –Type: indicates the type of the message The BGP synchronization rule states that if an AS provides transit service to another AS, BGP should not advertise a route until all of the routers within the AS have learned about the route via an IGP. BGP messages Marker LengthType

Xuan Zheng (modified by M. Veeraraghavan) 8 OPEN message Marker LengthType=OPENVersion My autonomous systemHold time BGP identifier Optional parameter length Optional parameters Purpose: first message sent after TCP connection is opened Version: the protocol version number of the message My autonomous system: The AS number of the sending router Hold time: the number of seconds between the transmission of successive KEEPALIVE messages BPG identifier: identifier of the sending BGP router (one interface IP addr.) Optional parameter: a list of optional parameters

Xuan Zheng (modified by M. Veeraraghavan) 9 KEEPALIVE message If the hold time is zero, then KEEPALIVE messages will not be sent. Marker LengthType=KEEPALIVE

Xuan Zheng (modified by M. Veeraraghavan) 10 NOTIFICATION message When a BGP speaker detects an error, it sends a Notification and then closes the TCP conncetion. Error code: the type of error condition Error subcode: specific information about the nature of the error Data: the reason for the notification. Examples: Open message error, Update message error (bad attribute), hold timer expired, etc. Marker LengthType=NOTIFICATIONError code Data Error subcode

Xuan Zheng (modified by M. Veeraraghavan) 11 UPDATE message Unfeasible routes length: the total length of the withdrawn routes field in octets. Withdrawn routes: a list of IP address prefixes for the routes that need to be withdrawn from BGP routing tables. Total path attribute length: the total length of the Path Attributes field in octets. Path attributes: a variable length sequence of path attributes. NLRI (Network Layer Reachability Information): a list of IP prefixes. Unfeasible routes length (2 octets) Withdrawn routes (variable) Total path attribute length (2 octets) Path attributes (variable) Network layer reachability information (variable) Length (1 octet)Prefix (variable) Length (1 octet)Prefix (variable) …… Attribute typeAttribute lengthAttribute value Attribute typeAttribute lengthAttribute value …… BGP header Length (1 octet)Prefix (variable) Length (1 octet)Prefix (variable) ……

Xuan Zheng (modified by M. Veeraraghavan) 12 Update message (cont.) Attribute flag (1 octet): –O bit: attribute is optional (O=1), or well-known (required) (O=0). –T bit: an optional attribute is transitive (T=1), or non-transitive (T=0). Well-known attributes are always transitive. –P bit: the information in the optional transitive attribute is partial (P=1), or complete (P=0). –E bit: the attribute length is two octets (E=1), or one octet (E=0). Four types of attributes –Well-known mandatory – recognized by all BGP speakers –Well-known discretionary, optional transitive, optional non-transitive –Paths with unrecongnized optional transitive attributes are passed on when a BGP speaker does not recognize the attribute. But unrecognized optional non-transitive attributes should be silently dropped. Attribute typeAttribute lengthAttribute valueOTPE0Attribute type code

Xuan Zheng (modified by M. Veeraraghavan) 13 Types of attributes Attribute type code: –ORIGIN (type code 1): well-known mandatory defines the origin of the NLRI - well-known mandatory –0: IGP – indicates that the NLRI is interior to the originating AS –1: EGP – inidicates that the NLRI is learned through BGP –2: incomplete – NLRI learned through some other means –AS_PATH (type code 2): well-known mandatory lists the sequence of ASs that the route have traversed to reach the destination –A BGP speaker propagating a route prepends its own AS to the AS_PATH list –Used to detect loops –NEXT_HOP (type code 3): well-known mandatory defines the IP address of the border router that should be used as the next hop to reach the destinations listed in the NLRI –MULTI_EXIT_DISC (MED) (type code 4): Multi-Exit Discriminator - optional nontransitive – inter-AS-metric (hop count discriminates among multiple entry/exit points to a neighboring AS and gives a hint to the neighboring AS about the preferred path. –makes no sense to compare a MED value by one AS with a MED used by another AS because metrics vary from AS to AS.

Xuan Zheng (modified by M. Veeraraghavan) 14 Types of attributes (cont.) Attribute type code: –LOCAL_PREF ( type code 5): well-known discretionary informs other BGP routers within the same AS of its degree of preference for an advertised route –only part of iBGP; not included in eBGP exchanges –ATOMIC_AGGREGATE (type code 6): well-known discretionary a BGP speaker, when presented with a set of overlapping routes from one of its peers to reach a given NLRI, informs other BGP routers that it selected a less specific route without selecting a more specific one that is included in it. Ensures that certain aggregates are not deeaggregated. a route describing a smaller set of destinations (a longer prefix) is said to be more specific than a route describing a larger set of destinations (a shorted prefix) –AGGREGATOR (type code 7): optional transitive specifies the last AS number that formed the aggregate route followed by the IP address of the BGP router that formed the aggregate route. advertises which AS and which BGP speaker within that AS performed the aggregation

Xuan Zheng (modified by M. Veeraraghavan) 15 Example /24: CIDR (Classless Interdomain Routing) notation; 24 is the number of network mask bits – so the network prefix here is and mask is /22 means the mask is – so prefix range runs from to R1 R2 R /24 iBGP eBGP R R3 AS1 AS / /24 (with MED 200) /24 (with MED 100) NEXT_HOP: R4 advertises /24 to R3 (eBGP) with a next hop of (IP address of BGP peer) R3 should advertise /24 using iBGP with a next hop of (as in eBGP) – reason is R3 is not an immediate neighbor of R1 or R2; R1 and R2 should update their routing table information for /24 with the next-hop to reach based on their IGP information. Routing table at R2 Reach /24 through Reach /24 through Routing table at R3 Reach /24 through Reach /24 through R3 will assume AS2 wants it to use R4 to reach /24 because its MED is lower Reach /24 via

Xuan Zheng (modified by M. Veeraraghavan) 16 The BGP decision algorithm After BGP router receives updates about different destinations from peers, the protocol will have to decide which paths to choose in order to reach a specific destination. BGP will choose only a single path to reach a specific destination. The decision process is based on different attributes, such as next hop, local preference, the route origin, and so on. BGP will always propagate the best path to its neighbors.

Xuan Zheng (modified by M. Veeraraghavan) 17 How BGP selects a path to a destination BGP selects one path as the best path to a destination; places it in its routing table and propagates the path information to its neighbors (Cisco web page) 1.If path specifies a NextHop that is inaccessible drop the update. 2.Prefer the largest Weight (Weight is a Cisco-specific concept – not in BGP: locally assigned number; prefer routes with higher weights) 3.If same weight prefer largest Prefer path with largest Local Preference. 4.If same Local Preference, prefer the route that was originated by BGP running on this router. 5.If no route was originated, prefer the shorter AS_path. 6.If all paths have the same AS_path length, prefer the lowest origin code (IGP<EGP<INCOMPLETE). 7.If origin codes are the same, prefer the path with the lowest MED. 8.If all paths have the same MED, prefer the External path over Internal. 9.If all paths are still the same, prefer the path through the closest IGP neighbor. 10.Prefer the route with the lowest IP address value as specified by the BGP router ID.

Xuan Zheng (modified by M. Veeraraghavan) 18 BGP finite state machine Idle state: In this state BGP refuses all incoming BGP connections. No resources are allocated to the peer. Connect state: In this state BGP is waiting for the transport protocol (TCP) connection to be completed. Active state: In this state BGP is trying to acquire a peer by initiating a transport protocol connection. When done, it sends an OPEN message. OpenSent state: In this state BGP waits for an OPEN message from its peer. OpenConfirm state: In this state BGP waits for a KEEPALIVE or NOTIFICATION message. Established state: In the Established state BGP can exchange UPDATE, NOTIFICATION, and KEEPALIVE messages with its peer.

Xuan Zheng (modified by M. Veeraraghavan) 19 References Section of Communication Networks by A. Leon Garcia and I. Widjaja RFC 1771 (can be obtained from “ Using BGP for inter-domain routing ” /ics/icsbgp4.htm “ BGP case studies ” toc.html