Introduction to BGP Lixin Gao ECE Dept UMASS
Introduction to BGP Lixin Gao ECE Dept. UMASS, Amherst 9/17/2020 ECE 697 F: Special Topics-Internet Routing 1
Border Gateway Protocol (BGP) u u Dynamic Inter-AS Routing Protocol Goals: u Exchange reachability information between ASes u Apply u u local policies for selecting route receiving and announcing route ECE 697 F: Special Topics-Internet Routing 2
BGP Sessions u u u Used for Exchange Reachability Information i. BGP : fully meshed, might not directly connected, u Alternative to fully meshed: confederation, route reflector e. BGP i. BGP AS 7018 AS 1 ECE 697 F: Special Topics-Internet Routing 3
Route Information Exchange n Route Announcement n Local Policies 1. 2. 0. 0/16 (1) 1. 2. 0. 0/16 (7018, 1) e. BGP i. BGP AS 701 1. 2. 0. 0/16 (1) 1. 2. 0. 0/16 (7018, 1) 1. 2. 0. 0/16 ( ) AS 7018 1. 2. 0. 0/16 (1) AS 1 1. 2. 0. 0/16 (1) 1. 2. 0. 0/16 ECE 697 F: Special Topics-Internet Routing 4
Route Announcement u u Network Prefix: 12. 0. 0. 0/8 Attributes: for reaching network prefix u AS path u Next hop : next hop IP addr u Local Preference u Multiple Exit Discriminator (MED) u Community Set u Origin code u Atomic Aggregate u Aggregator ECE 697 F: Special Topics-Internet Routing u …. . 5
AS Path u u Sequence of ASes traversed Loop avoidance Path selection: Path Length Policy: AS 7018 in AS path is more preferred ECE 697 F: Special Topics-Internet Routing 6
Next Hop u u u Next hop IP address to reach network prefix EBGP: next hop IP addr of announcer i. BGP u From same AS: IP address of announcer u From diff AS: next hop unchanged AS 7018 AS 1 2. 3. 4. 1 1. 2. 0. 0/16 (1) 2. 3. 4. 1 3. 4. 5. 2 1. 2. 0. 0/16 ( ) 3. 4. 5. 2 ECE 697 F: Special Topics-Internet Routing 7
Next hop u Determine next hop in forwarding table u Combing Inter-AS and Intra-AS routing table u Recursive route lookup u BGP abstract topology in AS level ECE 697 F: Special Topics-Internet Routing 8
Local Preference u u Local to AS u carry in i. BGP session but not e. BGP session Used to influence path selection u Select the highest Local Pref path e. BGP i. BGP AS 701 1. 2. 0. 0/16 (1) 100 1. 2. 0. 0/16 (7018, 1) 200 1. 2. 0. 0/16 ( ) 300 AS 7018 1. 2. 0. 0/16 (1) 90 AS 1 1. 2. 0. 0/16 (1) 90 1. 2. 0. 0/16 ECE 697 F: Special Topics-Internet Routing 9
Multiple Exit Discriminator (MED) u u Used for path selection u select an entry point among several to an AS (smaller MED is preferred) u meaningful among paths from the same AS u may use Intra-AS routing cost metrics AS 701 Non-transitive 1. 2. 0. 0/16 (1) 200 1. 2. 0. 0/16 (1) 100 AS 1 1. 2. 0. 0/16 ECE 697 F: Special Topics-Internet Routing 10
Community Set u u Used for grouping destination Simplify policy setting AS 701 1. 2. 0. 0/16 (1) 1000 3. 0. 0. 0/18 (7018) 1000 3. 0. 0. 0/16 (7018) 1000 3. 0. 0. 0/8 AS 7018 AS 1 1. 2. 0. 0/16 ECE 697 F: Special Topics-Internet Routing 11
Origin Code u u u IGP u interior to the originating AS. EGP u learned via EGP (Exterior Gateway Protocol) Incomplete u unknown ECE 697 F: Special Topics-Internet Routing 12
Atomic Aggregate u Aggregation that loses information ECE 697 F: Special Topics-Internet Routing 13
Aggregator u u Optional For route that is an aggregation ECE 697 F: Special Topics-Internet Routing 14
Announcement Processing u u u Input Policy Engine u Receive from neigboring Ases new announcements u Attribute Manipulation and Filter announcement u Store announcements (Incremental protocol) Path Selection among announcements Output Policy Engine u Attribute Manipulation u Send to neighboring Ases new announcements ECE 697 F: Special Topics-Internet Routing 15
Input Policy Engine u u u Set local preference Filter routes with the same AS number (loop avoidance) Filter bogus routes ECE 697 F: Special Topics-Internet Routing 16
Path Selection Process u u u u For each prefix, Prefer largest Local Preference Prefer route this router originates Prefer shorter AS path prefer the lowest origin code (IGP<EGP<INCOMPLETE). Prefer path with lowest MED Prefer route with lowest IP addr ECE 697 F: Special Topics-Internet Routing 17
Output Policy Engine u u u u Send to neighbors only the best path changes Set MED Set Community set Set Atomic Aggregate Set next hop Append AS number ECE 697 F: Special Topics-Internet Routing 18
Routing Information Storage u u u Adj-RIBs-In u routes received u Input to route selection Loc-RIB u Routes selected by selection process u Output of route selection Adj-RIBs-Out u announcements to neighbor u Output of Output Policy Engine ECE 697 F: Special Topics-Internet Routing 19
BGP Session Implementation u u OPEN message u establish TCP session KEEPALIVE message u keep session going Update message u announcement or withdrawal Notification message u error in announcement ECE 697 F: Special Topics-Internet Routing 20
- Slides: 20