xBGP: When You Can’t Wait for the IETF and Vendors
Thomas Wirtgen, Quentin De Coninck, Randy Bush, Laurent Vanbever and Olivier Bonaventure
1
xBGP : When You Cant Wait for the IETF and Vendors Thomas Wirtgen , - - PowerPoint PPT Presentation
xBGP : When You Cant 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
Thomas Wirtgen, Quentin De Coninck, Randy Bush, Laurent Vanbever and Olivier Bonaventure
1
BGP enables routing on the Internet
2 eBGP eBGP eBGP iBGP iBGP iBGP iBGP iBGP iBGP iBGP iBGP iBGP iBGP
AS 1 AS 2 AS 3
iBGP iBGP
BGP enables routing on the Internet
3
BGP must be standardized to support network of multiple BGP implementations
eBGP eBGP eBGP iBGP iBGP iBGP iBGP iBGP iBGP iBGP iBGP iBGP iBGP
AS 1 AS 2 AS 3
iBGP iBGP
4
Example of rejected feature: Geo-location TLV
5
draft-raszuk-idr-bgp-pr-05 AS 2 AS 3 AS 1
P
Example of rejected feature: Geo-location TLV
6
draft-raszuk-idr-bgp-pr-05 AS 3 AS 1 AS 2
P
BGP UPDATE P via AS2
Adds GeoLoc
Example of rejected feature: Geo-location TLV
7
draft-raszuk-idr-bgp-pr-05 AS 3 AS 1 AS 2
P
B G P U P D A T E P v i a A S 2 f r
L a t : 5 . 6 6 8 6 6 L
g : 4 . 6 2 1 5 3 5 B G P U P D A T E P v i a A S 2 f r
L a t : 5 . 6 6 8 6 6 L
g : 4 . 6 2 1 5 3 5 BGP UPDATE P via AS2
Adds GeoLoc
Example of rejected feature: Geo-location TLV
8
draft-raszuk-idr-bgp-pr-05 AS 3 AS 1 AS 2
P
B G P U P D A T E P v i a A S 2 f r
L a t : 5 . 6 6 8 6 6 L
g : 4 . 6 2 1 5 3 5 B G P U P D A T E P v i a A S 2 f r
L a t : 5 . 6 6 8 6 6 L
g : 4 . 6 2 1 5 3 5 BGP UPDATE P via AS2
Adds GeoLoc Removes GeoLoc
Example of rejected feature: Geo-location TLV
9
AS 1 draft-raszuk-idr-bgp-pr-05 AS 3
BGP UPDATE P via AS2 B G P U P D A T E P v i a A S 2 f r
L a t : 5 . 6 6 8 6 6 L
g : 4 . 6 2 1 5 3 5 BGP UPDATE P via AS1 AS2
AS 2
P
B G P U P D A T E P v i a A S 2 f r
L a t : 5 . 6 6 8 6 6 L
g : 4 . 6 2 1 5 3 5
Adds GeoLoc Removes GeoLoc
The Need of Programmable Routers
Routers vendors receive a lot of feature requests
The Need of Programmable Routers
11
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”
The Need of Programmable Routers
12
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” “What about feature S ?”
The Need of Programmable Routers
13
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” “What about feature S ?” Small networks do not have enough impact to convince OS vendors
14
The evolution is complex:
Vendors do not propose the same set of extensions on their routers The configuration of these routers differs as well
15
Vendor A Vendor B OS Vendor A OS Vendor B
routing-options { router-id 1.1.1.1; autonomous-system 65001; } protocols { bgp { group Session-to-R1 { type external; neighbor 1.1.1.2 { peer-as 65002; } } } router bgp 65001 bgp router-id 1.1.1.1 neighbor 1.1.1.2 remote-as 65002 Simple Juniper configuration file Simple Cisco configuration file
16
xBGP proposes a common interface to dynamically update any BGP implementation. Network operators can program their routers directly with plugins.
17
AS 1 One plugin is injected for each router of the network
Each router adds xBGP on top of its implementation With xBGP, routers expose a common API.
18 Plugin
Can be seen as POSIX norms
Vendor A Vendor B OS Vendor A OS Vendor B
+ xBGP + xBGP
19
20
My GeoLoc Plugin
RFC 4271 BGP Workflow
21
My GeoLoc Plugin
RFC 4271 BGP Workflow
22
Decoding GeoLoc Take the nearest router Serializing GeoLoc
My GeoLoc Plugin
RFC 4271 BGP Workflow
23
Decoding GeoLoc Take the nearest router Serializing GeoLoc
My GeoLoc Plugin
RFC 4271 BGP Workflow
24
Decoding GeoLoc Take the nearest router Serializing GeoLoc
My GeoLoc Plugin
libxBGP
RIB BGP Neighbor Sessions This router Geo Coordinates ... Internal data structure
RFC 4271 BGP Workflow
25
Decoding GeoLoc Take the nearest router Serializing GeoLoc
My GeoLoc Plugin
libxBGP
RIB BGP Neighbor Sessions This router Geo Coordinates ... Internal data structure
RFC 4271 BGP Workflow
26
xBGP requires a little adaptation on the host BGP implementation We have adapted both FRRouting and BIRD to be xBGP compliant
27
FRRouting (LoC) BIRD Routing (LoC) Modification to the codebase 30 10 Insertion Points 73 66 Plugin API 624 415 libxbgp 3004 + dependencies User Space eBPF VM 2776
1. Re-implementation of route reflectors (295 LoC) 2. Expressive filters
3. GeoTags attribute as MED alternative (261 LoC)
28
1. Re-implementation of route reflectors (295 LoC) 2. Expressive filters
3. GeoTags attribute as MED alternative (261 LoC)
29
30
S1 L10 L11 S2 L12 L13 T20 T21 T22 T23
Level 0 Level 1 Level 2
31
S1 L10 L11 S2 L12 L13 T20 T21 T22 T23
Level 0 Level 1 Level 2
32
S1 L10 L11 S2 L12 L13 T20 T21 T22 T23
Level 0 Level 1 Level 2
33
S1 L10 L11 S2 L12 L13 T20 T21 T22 T23
Level 0 Level 1 Level 2
34
S1 L10 L11 S2 L12 L13 T20 T21 T22 T23
Level 0 Level 1 Level 2
35
S1 L10 L11 S2 L12 L13 T20 T21 T22 T23
Level 0 Level 1 Level 2
36
AS 001 AS 100 AS 100 AS 001 AS 100 AS 100 AS 200 AS 200 AS 200 AS 200
Level Level 1 Level 2
MyRouterCli > show ip bgp BGP Routing table information for VRF default Router identifier 192.168.254.5, local AS number 1 Network Next Hop Metric LocPref Weight Path * >Ec 192.168.10.0/24 192.168.255.20 0 100 100 200 i * ec 192.168.10.0/24 192.168.255.4 0 100 100 200 i * >Ec 192.168.254.3/32 192.168.255.4 1 100 100 200 i * ec 192.168.254.3/32 192.168.255.20 0 100 100 200 i * >Ec 192.168.254.4/32 192.168.255.20 0 100 100 200 i
RFC7938 Use of BGP for Routing in Large-Scale Data Centers
37
AS 001 AS 100 AS 100 AS 001 AS 100 AS 100 AS 200 AS 200 AS 200 AS 200
Level Level 1 Level 2
MyRouterCli > show ip bgp BGP Routing table information for VRF default Router identifier 192.168.254.5, local AS number 1 Network Next Hop Metric LocPref Weight Path * >Ec 192.168.10.0/24 192.168.255.20 0 100 100 200 i * ec 192.168.10.0/24 192.168.255.4 0 100 100 200 i * >Ec 192.168.254.3/32 192.168.255.4 1 100 100 200 i * ec 192.168.254.3/32 192.168.255.20 0 100 100 200 i * >Ec 192.168.254.4/32 192.168.255.20 0 100 100 200 i
Where are these routes sourced from ? RFC7938 Use of BGP for Routing in Large-Scale Data Centers
38
One plugin + one topology manifest for all routers ! CFG + (81 LoC) AS 001 AS 101 AS 102 AS 002 AS 103 AS 104 AS 201 AS 202 AS 203 AS 204
Level 0 Level 1 Level 2
39
AS 001 AS 101 AS 102 AS 002 AS 103 AS 104 AS 201 AS 202 AS 203 AS 204
Level Level 1 Level 2 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; my_as = peer->local_bgp_session->as; as_path = attr->data; as_path_len = attr->len; while (i < as_path_len) { i++; /* omit segment type */ segment_length = as_path[i++]; for (j = 0; j < segment_length - 1; j++) { curr_as = get_u32(as_path + i); i += 4; if (!valley_check(next_as, curr_as)) return PLUGIN_FILTER_REJECT; } } next(); return FAIL; }
40
AS 001 AS 101 AS 102 AS 002 AS 103 AS 104 AS 201 AS 202 AS 203 AS 204
Level Level 1 Level 2 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; my_as = peer->local_bgp_session->as; as_path = attr->data; as_path_len = attr->len; while (i < as_path_len) { i++; /* omit segment type */ segment_length = as_path[i++]; for (j = 0; j < segment_length - 1; j++) { curr_as = get_u32(as_path + i); i += 4; if (!valley_check(next_as, curr_as)) return PLUGIN_FILTER_REJECT; } } next(); return FAIL; }
Retrieve data from the host implementation
41
AS 001 AS 101 AS 102 AS 002 AS 103 AS 104 AS 201 AS 202 AS 203 AS 204
Level Level 1 Level 2 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; my_as = peer->local_bgp_session->as; as_path = attr->data; as_path_len = attr->len; while (i < as_path_len) { i++; /* omit segment type */ segment_length = as_path[i++]; for (j = 0; j < segment_length - 1; j++) { curr_as = get_u32(as_path + i); i += 4; if (!valley_check(next_as, curr_as)) return PLUGIN_FILTER_REJECT; } } next(); return FAIL; }
Retrieve data from the host implementation Main processing of the plugin
42
AS 001 AS 101 AS 102 AS 002 AS 103 AS 104 AS 201 AS 202 AS 203 AS 204
Level Level 1 Level 2 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; my_as = peer->local_bgp_session->as; as_path = attr->data; as_path_len = attr->len; while (i < as_path_len) { i++; /* omit segment type */ segment_length = as_path[i++]; for (j = 0; j < segment_length - 1; j++) { curr_as = get_u32(as_path + i); i += 4; if (!valley_check(next_as, curr_as)) return PLUGIN_FILTER_REJECT; } } next(); return FAIL; }
Retrieve data from the host implementation Main processing of the plugin The route is rejected if such a pair exists
xBGP proposes a new methodology to upgrade routing protocols xBGP provides new opportunities with other routing protocols From a monolithic to a modular approach The next steps: Standardizing the API + the VM New use cases See https://www.pluginized-protocols.org/xbgp for the latest updates and the source code
43
44
45
Lower is better
Time xBGP - Time Native Time Native x 100
46
Lower is better
Time xBGP - Time Native Time Native x 100
47
Native code uses a slower data structure Lower is better
Time xBGP - Time Native Time Native x 100
48
BGP enables routing on the Internet
49
Extending a protocol is complex. Why not offer operators the opportunity to program/update their own extensions?
50
AS 1 “Here is your plugin”