the border gateway protocol (bgp)
DESCRIPTION
The Border Gateway Protocol (BGP). Sharad Jaiswal. Prologue. Internet is divided into Autonomous Systems (ASs) AS - a collection of one or more networks under a single technical administration technical administration- refers to aspects of the n/w like, routing policies etc. Contd.. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/1.jpg)
The Border Gateway Protocol (BGP)
Sharad Jaiswal
![Page 2: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/2.jpg)
Prologue
• Internet is divided into Autonomous Systems (ASs)
• AS - a collection of one or more networks under a single technical administration
• technical administration- refers to aspects of the n/w like, routing policies etc.
![Page 3: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/3.jpg)
Contd.
• Intra-AS routing driven mostly by performance considerations
• Inter-AS routing depends on policy issues, economics etc
![Page 4: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/4.jpg)
BGP (basic info)
• BGP is the de facto Inter-AS routing protocol
• Used for exchanging route information between ASs
• Conveys information about AS path topology
![Page 5: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/5.jpg)
![Page 6: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/6.jpg)
BGP (basic info contd.)
• Current version, BGP 4, defined in RFC 1771
• Runs over TCP (port 179)
• Path Vector protocol– Exchange entire path information– Prevents loops
• Incremental
![Page 7: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/7.jpg)
How does BGP work?
• How is it configured?
• How is route information exchanged using BGP?
• What are the attributes of the exchanged routes?
• How is this information processed? And further distributed?
![Page 8: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/8.jpg)
BGP Configuration
• Identify BGP “speakers”, assign AS number and define neighbors (peers)
• External BGP peers are directly connected
• Not necessary for Internal BGP peers
![Page 9: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/9.jpg)
BGP Message Exchange
• BGP peers form a TCP connection, use the OPEN message to establish BGP connection;
• Connections kept open by KEEPALIVE messages;
• Initially exchange routing table, further modifications are incremental;
![Page 10: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/10.jpg)
BGP Message Exchange (II)
• Modifications (Route additions and withdrawls) are made by UPDATE messages;
• Errors are reported by NOTIFICATION messages;
• Most interesting stuff happens in the processing of UPDATE messages.
![Page 11: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/11.jpg)
The UPDATE message
• Used to transfer routing information between peers
• Advertise new routes, withdraw unfeasible paths
• Contains Path Attributes info
![Page 12: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/12.jpg)
Routing Information Storage
• Adj-RIBs-In– Store messages that have been learned from
inbound UPDATE messages
• Loc-RIB– Contains local routing information of a BGP
speaker
• Adj-RIBs-Out– Store routing information local router has
chosen for distribution
![Page 13: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/13.jpg)
Path Attributes
• Origin– defines the origin of a path
• AS_PATH• NEXT_HOP• MULTI_EXIT_DISC• LOCAL_PREF• Community
![Page 14: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/14.jpg)
Composed of a sequence of AS path segments or the set of ASs traversed
![Page 15: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/15.jpg)
IP address of the Border router that should be used for the next stop
![Page 16: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/16.jpg)
![Page 17: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/17.jpg)
Used to inform other BGP speakers in the same AS about preferences for a particular route
![Page 18: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/18.jpg)
Used to discriminate among multiple exit points in neighboring ASs
![Page 19: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/19.jpg)
Community Attribute
• Optional Attribute
• Method to group destination in a certain community
• Range 0, 4294,967,200
• Apply routing destinations (accept,prefer,redistribute) using these communities
![Page 20: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/20.jpg)
Decision Process
• Phase I– Calculating the degree of preference for each
route
• Phase II– Choosing the best route and installing it into
Loc-RIB
• Phase III– dissemination,route aggregation and
information reduction
![Page 21: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/21.jpg)
Applying Policy in the Decision Process
• Policy based on AS path, community information
• Accept / Reject routes
• Set Attributes to influence path selection
![Page 22: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/22.jpg)
Phase I
• For each received update, local speaker shall calculate the degree of preference
• Degree of preference calculated based on the LOCAL_PREF attribute if received from within AS
• Calculated from pre-configured policy information if received from neighboring AS
![Page 23: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/23.jpg)
Phase 2
• Route selection– highest degree of preference of any route
to to the same set of destinations– is only route to the destination– use tie breaking techniques
• Install route in Loc-RIB
![Page 24: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/24.jpg)
Phase 3
• Route Dissemination to peers in neighboring ASs– when routes in a Loc-RIB to local
destinations have changed
• All routes processed in Adj-RIBs-OUT
• Aggregation of routes may occur here
![Page 25: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/25.jpg)
Overlapping Routes
• BGP speaker may transmit routes with overlapping NLRI Information
• Overlap occurs when a set of destinations are identified in non-matching routes
• Destinations are always identified by IP prefixes
• More specific prefix route gets precedence.
![Page 26: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/26.jpg)
Internal BGP (iBGP)
• Same protocol as BGP;
• Used when AS_PATH is supposed to be intact between different eBGP peers;
• iBGP nodes are fully meshed;
• No re-advertisement of route updates to prevent looping;
![Page 27: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/27.jpg)
![Page 28: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/28.jpg)
iBGP Scaling
• BGP Confederations– Divide AS into Sub-ASs to reduce size of mesh– Still present a unified front to the outside world
• Route Reflectors– Relax no re-advertisement rule– Single iBGP peer reflects routes to sub-ordinate
peers within a cluster– No peering between clusters
![Page 29: The Border Gateway Protocol (BGP)](https://reader036.vdocuments.mx/reader036/viewer/2022081419/5681306c550346895d964a50/html5/thumbnails/29.jpg)
Other Issues!
• Achieving Stability– Using loopbacks– BGP/IGP interaction– Peer Groups– Route Flap dampening
• BGP and CIDR