xBGP : When You Can’t Wait for the IETF and Vendors Thomas Wirtgen , Quentin De Coninck, Randy Bush, Laurent Vanbever and Olivier Bonaventure 1
BGP enables routing on the Internet iBGP iBGP AS 3 iBGP eBGP iBGP AS 2 iBGP eBGP eBGP iBGP iBGP iBGP iBGP iBGP iBGP iBGP AS 1 2
BGP enables routing on the Internet iBGP iBGP AS 3 iBGP eBGP iBGP AS 2 iBGP eBGP eBGP iBGP iBGP iBGP iBGP iBGP iBGP BGP must be standardized to support network of multiple iBGP BGP implementations AS 1 3
Agenda The Weaknesses of the Current Routing Paradigm ● xBGP : a Paradigm Shift ● ● Adding a new feature with xBGP ● Uses Cases 4
Example of rejected feature: Geo-location TLV P AS 3 AS 2 AS 1 draft-raszuk-idr-bgp-pr-05 5
Example of rejected feature: Geo-location TLV BGP UPDATE P via AS2 P AS 3 AS 2 Adds GeoLoc AS 1 draft-raszuk-idr-bgp-pr-05 6
Example of rejected feature: Geo-location TLV E T A D P U P 2 G S B A 6 6 a 8 v i 6 6 P . 0 5 : 5 t 3 a 5 L 1 m 2 6 o . r 4 f : g n o L BGP UPDATE P via AS2 P B G P U P D P f A v r T o i a E m A L S AS 3 a 2 t L : o 5 n 0 g . 6 : 6 4 . 8 6 6 2 6 AS 2 1 5 Adds GeoLoc 3 5 AS 1 draft-raszuk-idr-bgp-pr-05 7
Example of rejected feature: Geo-location TLV E T A D P U P 2 G S B A 6 6 a 8 v i 6 6 P . 0 5 : 5 t 3 a 5 L 1 m 2 6 o . r 4 f : g n o L BGP UPDATE P via AS2 P Removes GeoLoc B G P U P D P f A v r T o i a E m A L S AS 3 a 2 t L : o 5 n 0 g . 6 : 6 4 . 8 6 6 2 6 AS 2 1 5 Adds GeoLoc 3 5 AS 1 draft-raszuk-idr-bgp-pr-05 8
Example of rejected feature: Geo-location TLV E T A D P U BGP UPDATE P 2 G S B A 6 6 a 8 v i 6 P via AS1 AS2 6 P . 0 5 : 5 t 3 a 5 L 1 m 2 6 o . r 4 f : g n o L BGP UPDATE P via AS2 P Removes GeoLoc B G P U P D P f A v r T o i a E m A L S AS 3 a 2 t L : o 5 n 0 g . 6 : 6 4 . 8 6 6 2 6 AS 2 1 5 Adds GeoLoc 3 5 AS 1 draft-raszuk-idr-bgp-pr-05 9
The Need of Programmable Routers Routers vendors receive a lot of feature requests
The Need of Programmable Routers Routers vendors receive a lot of feature requests “I would like feature A” “I would like features A, B & C” “I would like feature C” 11
The Need of Programmable Routers Routers vendors receive a lot of feature requests “What about feature S ?” “I would like feature A” “I would like features A, B & C” “I would like feature C” 12
The Need of Programmable Routers Routers vendors receive a lot of feature requests Small networks do not have enough impact to convince OS vendors “What about feature S ?” “I would like feature A” “I would like features A, B & C” “I would like feature C” 13
Problem #1: Networks evolve, as do routing protocols The evolution is complex: 1. Standardization by the IETF (3.5 years in average for BGP) 2. Implementation on the vendor OS 3. Update routers of networks 14
Problem #2: Large networks use diverse routers Vendors do not propose the same set of extensions on their routers The configuration of these routers differs as well routing-options { router-id 1.1.1.1; autonomous-system 65001; router bgp 65001 } bgp router-id 1.1.1.1 OS Vendor A OS Vendor B neighbor 1.1.1.2 remote-as 65002 protocols { bgp { Simple Cisco configuration file group Session-to-R1 { type external; neighbor 1.1.1.2 { peer-as 65002; } } Vendor A Vendor B } Simple Juniper configuration file 15
Agenda The Weaknesses of the Current Routing Paradigm ● xBGP : a Paradigm Shift ● ● Adding a new feature with xBGP ● Uses Cases 16
xBGP : toward a paradigm shift xBGP proposes a common interface to dynamically update any BGP implementation. Network operators can program their routers directly with plugins. One plugin is injected for each router of the AS 1 network 17
xBGP forces routers to follow the same rules Each router adds xBGP on top of its implementation With xBGP , routers expose a common API. Plugin Can be seen as + xBGP + xBGP POSIX norms OS Vendor A OS Vendor B Vendor A Vendor B 18
Agenda The Weaknesses of the Current Routing Paradigm ● xBGP : a Paradigm Shift ● ● Adding a new feature with xBGP ● Uses Cases 19
Structure of xBGP My GeoLoc Plugin RFC 4271 BGP Workflow 20
Structure of xBGP My GeoLoc Plugin RFC 4271 BGP Workflow 21
Structure of xBGP My GeoLoc Plugin Decoding GeoLoc Take the nearest router Serializing GeoLoc RFC 4271 BGP Workflow 22
Structure of xBGP My GeoLoc Plugin Decoding GeoLoc Take the nearest router Serializing GeoLoc RFC 4271 BGP Workflow 23
Structure of xBGP My GeoLoc Plugin Decoding GeoLoc Take the nearest router Serializing GeoLoc libxBGP Internal data structure RIB BGP Neighbor Sessions This router Geo Coordinates ... RFC 4271 BGP Workflow 24
Structure of xBGP My GeoLoc Plugin Decoding GeoLoc Take the nearest router Serializing GeoLoc libxBGP Internal data structure RIB BGP Neighbor Sessions This router Geo Coordinates ... RFC 4271 BGP Workflow 25
Agenda The Weaknesses of the Current Routing Paradigm ● xBGP : a Paradigm Shift ● ● Adding a new feature with xBGP ● Uses Cases 26
Demonstrating the programmability of xBGP xBGP requires a little adaptation on the host BGP implementation We have adapted both FRRouting and BIRD to be xBGP compliant FRRouting (LoC) BIRD Routing (LoC) Modification to the codebase 30 10 Insertion Points 73 66 Plugin API 624 415 3004 + dependencies libxbgp User Space eBPF VM 2776 27
Use Cases 1. Re-implementation of route reflectors (295 LoC) 2. Expressive filters Route Origin Validation (126 LoC) ● ● Valley Free path check (81 LoC) 3. GeoTags attribute as MED alternative (261 LoC) 28
Use Cases 1. Re-implementation of route reflectors (295 LoC) 2. Expressive filters Route Origin Validation (126 LoC) ● ● Valley Free path check (81 LoC) 3. GeoTags attribute as MED alternative (261 LoC) 29
Valley Free path check S1 S2 Level 0 L10 L11 L12 L13 Level 1 T20 T21 T22 T23 Level 2 30
Valley Free path check S1 S2 Level 0 L10 L11 L12 L13 Level 1 T20 T21 T22 T23 Level 2 31
Valley Free path check S1 S2 Level 0 L10 L11 L12 L13 Level 1 T20 T21 T22 T23 Level 2 32
Valley Free path check S1 S2 Level 0 L10 L11 L12 L13 Level 1 T20 T21 T22 T23 Level 2 33
Valley Free path check S1 S2 Level 0 L10 L11 L12 L13 Level 1 T20 T21 T22 T23 Level 2 34
Valley Free path check S1 S2 Level 0 L10 L11 L12 L13 Level 1 T20 T21 T22 T23 Level 2 35
Valley Free path check RFC7938 Use of BGP for Routing in Large-Scale Data Centers MyRouterCli > show ip bgp BGP Routing table information for VRF default AS AS Level Router identifier 192.168.254.5, local AS number 1 001 001 0 Network Next Hop Metric LocPref Weight Path * >Ec 192.168.10.0/24 192.168.255.20 0 100 0 100 200 i AS AS AS AS * ec 192.168.10.0/24 192.168.255.4 0 100 0 100 200 i Level * >Ec 192.168.254.3/32 192.168.255.4 1 100 0 100 200 i 100 100 100 100 1 * ec 192.168.254.3/32 192.168.255.20 0 100 0 100 200 i * >Ec 192.168.254.4/32 192.168.255.20 0 100 0 100 200 i AS AS AS AS Level 2 200 200 200 200 36
Valley Free path check RFC7938 Use of BGP for Routing in Large-Scale Data Centers MyRouterCli > show ip bgp BGP Routing table information for VRF default AS AS Level Router identifier 192.168.254.5, local AS number 1 001 001 0 Network Next Hop Metric LocPref Weight Path * >Ec 192.168.10.0/24 192.168.255.20 0 100 0 100 200 i AS AS AS AS * ec 192.168.10.0/24 192.168.255.4 0 100 0 100 200 i Level * >Ec 192.168.254.3/32 192.168.255.4 1 100 0 100 200 i 100 100 100 100 1 * ec 192.168.254.3/32 192.168.255.20 0 100 0 100 200 i * >Ec 192.168.254.4/32 192.168.255.20 0 100 0 100 200 i AS AS AS AS Level 2 200 200 200 200 Where are these routes sourced from ? 37
Valley Free path check with xBGP AS AS Level 0 001 002 AS AS AS AS Level 1 101 102 103 104 AS AS AS AS Level 2 201 202 203 204 One plugin + one topology manifest + CFG for all routers ! (81 LoC) 38
Valley Free path check with xBGP uint64_t valley_free_check (args_t * args UNUSED ) { /* variable declaration omitted */ attr = get_attr_from_code ( AS_PATH_ATTR_CODE ); peer = get_src_peer_info (); if (! attr || ! peer ) return FAIL ; AS AS Level my_as = peer -> local_bgp_session -> as ; 001 002 0 as_path = attr -> data ; as_path_len = attr -> len ; AS AS AS AS Level while ( i < as_path_len ) { 101 102 103 104 1 i ++; /* omit segment type */ segment_length = as_path [ i ++]; AS AS AS AS Level for ( j = 0; j < segment_length - 1; j ++) { 2 201 202 203 204 curr_as = get_u32 ( as_path + i ); i += 4; if (! valley_check ( next_as , curr_as )) return PLUGIN_FILTER_REJECT ; } } next (); return FAIL ; } 39
Recommend
More recommend