xBGP : When You Cant Wait for the IETF and Vendors Thomas Wirtgen , - - PowerPoint PPT Presentation

xbgp when you can t wait for the ietf and vendors
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

xBGP: When You Can’t Wait for the IETF and Vendors

Thomas Wirtgen, Quentin De Coninck, Randy Bush, Laurent Vanbever and Olivier Bonaventure

1

slide-2
SLIDE 2

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

slide-3
SLIDE 3

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

slide-4
SLIDE 4

Agenda

  • The Weaknesses of the Current Routing Paradigm
  • xBGP: a Paradigm Shift
  • Adding a new feature with xBGP
  • Uses Cases

4

slide-5
SLIDE 5

Example of rejected feature: Geo-location TLV

5

draft-raszuk-idr-bgp-pr-05 AS 2 AS 3 AS 1

P

slide-6
SLIDE 6

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

slide-7
SLIDE 7

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

  • m

L a t : 5 . 6 6 8 6 6 L

  • n

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

  • m

L a t : 5 . 6 6 8 6 6 L

  • n

g : 4 . 6 2 1 5 3 5 BGP UPDATE P via AS2

Adds GeoLoc

slide-8
SLIDE 8

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

  • m

L a t : 5 . 6 6 8 6 6 L

  • n

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

  • m

L a t : 5 . 6 6 8 6 6 L

  • n

g : 4 . 6 2 1 5 3 5 BGP UPDATE P via AS2

Adds GeoLoc Removes GeoLoc

slide-9
SLIDE 9

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

  • m

L a t : 5 . 6 6 8 6 6 L

  • n

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

  • m

L a t : 5 . 6 6 8 6 6 L

  • n

g : 4 . 6 2 1 5 3 5

Adds GeoLoc Removes GeoLoc

slide-10
SLIDE 10

The Need of Programmable Routers

Routers vendors receive a lot of feature requests

slide-11
SLIDE 11

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”

slide-12
SLIDE 12

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 ?”

slide-13
SLIDE 13

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

slide-14
SLIDE 14

Problem #1: Networks evolve, as do routing protocols

14

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
slide-15
SLIDE 15

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

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

slide-16
SLIDE 16

Agenda

  • The Weaknesses of the Current Routing Paradigm
  • xBGP: a Paradigm Shift
  • Adding a new feature with xBGP
  • Uses Cases

16

slide-17
SLIDE 17

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.

17

AS 1 One plugin is injected for each router of the network

slide-18
SLIDE 18

xBGP forces routers to follow the same rules

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

slide-19
SLIDE 19

Agenda

  • The Weaknesses of the Current Routing Paradigm
  • xBGP: a Paradigm Shift
  • Adding a new feature with xBGP
  • Uses Cases

19

slide-20
SLIDE 20

Structure of xBGP

20

My GeoLoc Plugin

RFC 4271 BGP Workflow

slide-21
SLIDE 21

Structure of xBGP

21

My GeoLoc Plugin

RFC 4271 BGP Workflow

slide-22
SLIDE 22

Structure of xBGP

22

Decoding GeoLoc Take the nearest router Serializing GeoLoc

My GeoLoc Plugin

RFC 4271 BGP Workflow

slide-23
SLIDE 23

Structure of xBGP

23

Decoding GeoLoc Take the nearest router Serializing GeoLoc

My GeoLoc Plugin

RFC 4271 BGP Workflow

slide-24
SLIDE 24

Structure of xBGP

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

slide-25
SLIDE 25

Structure of xBGP

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

slide-26
SLIDE 26

Agenda

  • The Weaknesses of the Current Routing Paradigm
  • xBGP: a Paradigm Shift
  • Adding a new feature with xBGP
  • Uses Cases

26

slide-27
SLIDE 27

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

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

slide-28
SLIDE 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)

28

slide-29
SLIDE 29

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

slide-30
SLIDE 30

Valley Free path check

30

S1 L10 L11 S2 L12 L13 T20 T21 T22 T23

Level 0 Level 1 Level 2

slide-31
SLIDE 31

Valley Free path check

31

S1 L10 L11 S2 L12 L13 T20 T21 T22 T23

Level 0 Level 1 Level 2

slide-32
SLIDE 32

Valley Free path check

32

S1 L10 L11 S2 L12 L13 T20 T21 T22 T23

Level 0 Level 1 Level 2

slide-33
SLIDE 33

Valley Free path check

33

S1 L10 L11 S2 L12 L13 T20 T21 T22 T23

Level 0 Level 1 Level 2

slide-34
SLIDE 34

Valley Free path check

34

S1 L10 L11 S2 L12 L13 T20 T21 T22 T23

Level 0 Level 1 Level 2

slide-35
SLIDE 35

Valley Free path check

35

S1 L10 L11 S2 L12 L13 T20 T21 T22 T23

Level 0 Level 1 Level 2

slide-36
SLIDE 36

Valley Free path check

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

slide-37
SLIDE 37

Valley Free path check

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

slide-38
SLIDE 38

Valley Free path check with xBGP

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

slide-39
SLIDE 39

Valley Free path check with xBGP

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; }

slide-40
SLIDE 40

Valley Free path check with xBGP

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

slide-41
SLIDE 41

Valley Free path check with xBGP

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

slide-42
SLIDE 42

Valley Free path check with xBGP

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

slide-43
SLIDE 43

Conclusion

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

slide-44
SLIDE 44

Backup slides

44

slide-45
SLIDE 45

Comparison with native code

45

Lower is better

Time xBGP - Time Native Time Native x 100

slide-46
SLIDE 46

Comparison with native code

46

Lower is better

Time xBGP - Time Native Time Native x 100

slide-47
SLIDE 47

Comparison with native code

47

Native code uses a slower data structure Lower is better

Time xBGP - Time Native Time Native x 100

slide-48
SLIDE 48

Old slides

48

slide-49
SLIDE 49

BGP enables routing on the Internet

49

slide-50
SLIDE 50

xBGP: toward a paradigm shift

Extending a protocol is complex. Why not offer operators the opportunity to program/update their own extensions?

50

AS 1 “Here is your plugin”