Implementing IPv6 Segment Routing David Lebrun - - PowerPoint PPT Presentation

implementing ipv6 segment routing
SMART_READER_LITE
LIVE PREVIEW

Implementing IPv6 Segment Routing David Lebrun - - PowerPoint PPT Presentation

Implementing IPv6 Segment Routing David Lebrun <david.lebrun@uclouvain.be> UCLouvain Netdev 1.2, Tokyo, October 2016 1/35 Table of Contents Segment Routing Implementation Network Function Virtualization Conclusion 2/35 Table of


slide-1
SLIDE 1

1/35

Implementing IPv6 Segment Routing

David Lebrun <david.lebrun@uclouvain.be>

UCLouvain

Netdev 1.2, Tokyo, October 2016

slide-2
SLIDE 2

2/35

Table of Contents

Segment Routing Implementation Network Function Virtualization Conclusion

slide-3
SLIDE 3

3/35

Table of Contents

Segment Routing Implementation Network Function Virtualization Conclusion

slide-4
SLIDE 4

4/35

Segment Routing

  • Source routing paradigm
  • State embedded in packet (segments)
  • Segments: node, adjacency, service
  • IETF draft-spring-segment-routing-09
slide-5
SLIDE 5

5/35

Segment Routing: illustration (1)

slide-6
SLIDE 6

6/35

Segment Routing: illustration (2)

  • Abstract SR Header
  • Segments = SD, SB, SS, SF, SE
  • Ptr = Segments[0] (SD)
slide-7
SLIDE 7

7/35

Segment Routing: illustration (3)

  • Abstract SR Header
  • Segments = SD, SB, SS, SF, SE
  • Ptr = Segments[0] (SD)
slide-8
SLIDE 8

8/35

Segment Routing: illustration (4)

  • Abstract SR Header
  • Segments = SD, SB, SS, SF, SE
  • Ptr = Segments[1] (SB)
slide-9
SLIDE 9

9/35

Segment Routing: illustration (5)

  • Abstract SR Header
  • Segments = SD, SB, SS, SF, SE
  • Ptr = Segments[2] (SS)
slide-10
SLIDE 10

10/35

Segment Routing: illustration (6)

  • Abstract SR Header
  • Segments = SD, SB, SS, SF, SE
  • Ptr = Segments[3] (SF)
slide-11
SLIDE 11

11/35

Segment Routing: illustration (7)

  • Abstract SR Header
  • Segments = SD, SB, SS, SF, SE
  • Ptr = Segments[4] (SE)
slide-12
SLIDE 12

12/35

SR flavors

  • SR-MPLS (segment: 20-bit label)
  • SR-IPv6 (segment: 128-bit IPv6 addr)
  • IPv6 Routing Header extension
  • HMAC TLV for authenticity & integrity
slide-13
SLIDE 13

13/35

SR-IPv6

1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len | Routing Type | Segments Left | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | First Segment | Flags | RESERVED | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Segment List[0] (128 bits IPv6 address) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | | ... | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Segment List[n] (128 bits IPv6 address) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // // // Optional Type Length Value objects (variable) // // // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

slide-14
SLIDE 14

14/35

HMAC TLV

1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | RESERVED | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | HMAC Key ID (4 octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // // // HMAC (32 octets) // // // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

slide-15
SLIDE 15

15/35

SR-IPv6 operations (1)

  • Origin SR host: push SRH in packet build
slide-16
SLIDE 16

16/35

SR-IPv6 operations (2)

  • SR ingress: encapsulate with outer IPv6 header + SRH
slide-17
SLIDE 17

17/35

SR-IPv6 operations (3)

  • Segment endpoint: route packet to next segment
slide-18
SLIDE 18

18/35

SR-IPv6 operations (4)

  • SR egress: decapsulate packet and route inner packet to DA
slide-19
SLIDE 19

19/35

Table of Contents

Segment Routing Implementation Network Function Virtualization Conclusion

slide-20
SLIDE 20

20/35

Features

  • SR-enabled packet processing (data plane)
  • SRH insertion/encapsulation (control plane)
  • HMAC support (control + data plane)
slide-21
SLIDE 21

21/35

Data plane part (1)

  • net/ipv6/exthdrs.c
  • Processing of Routing Header type 4
  • Decrement segments_left index
  • Update ipv6_hdr(skb)->daddr with next segment
  • Call ip6_route_input(skb)
slide-22
SLIDE 22

22/35

Data plane part (2)

  • SRH decapsulation (egress)
  • pull, reset headers, netif_rx
  • tcpdump shows the packet twice
slide-23
SLIDE 23

23/35

Control plane part (1)

  • net/ipv6/seg6.c net/ipv6/seg6_iptunnel.c
  • SRH encapsulation (ingress)
  • Lightweight tunnels support
  • ip -6 route add prefix via gw encap seg6 mode

encap segs seg1,seg2,seg3

slide-24
SLIDE 24

24/35

Control plane part (2)

  • net/ipv6/ipv6_sockglue.c net/ipv6/exthdrs.c
  • Per-socket SRH insertion (endhost)
  • Pushed by ipv6_push_nfrag_opts
  • Set with setsockopt(fd, IPPROTO_IPV6, IPV6_RTHDR,

...);

slide-25
SLIDE 25

25/35

Insertion vs encapsulation

  • Missing support for IPv6 extension headers in drivers
  • ixgbe 0000:0b:00.1:

partial checksum but l4 proto=2b!

  • IPv6 encapsulation works well incl. w/ GRO
slide-26
SLIDE 26

26/35

HMAC part (1)

  • net/ipv6/seg6_hmac.c
  • Calls in net/ipv6/exthdrs.c and

net/ipv6/seg6_iptunnel.c

  • Validate SR-enabled packets with HMAC signature
  • Generate valid signature for locally imposed SRHs
slide-27
SLIDE 27

27/35

HMAC part (2)

  • HMACKeyID ⇒< algo, secret >
  • Controlled through genetlink interface
  • Interface sysctl seg6_require_hmac
slide-28
SLIDE 28

28/35

Table of Contents

Segment Routing Implementation Network Function Virtualization Conclusion

slide-29
SLIDE 29

29/35

NFV with SR

slide-30
SLIDE 30

30/35

NFV-SR requirements

  • Fast, generic kernel-to-app packet transfer
  • Packet modifiable by app
  • App-to-kernel packet transfer
slide-31
SLIDE 31

31/35

NFV-SR attempted solution

  • mmap-ed netlink tx/rx rings
  • Buffering, reordering issues
  • Not GRO-friendly
  • Very specific
  • Removed from mainline
slide-32
SLIDE 32

32/35

NFV-SR possible solutions

  • nfqueue w/ NF_REPEAT ?
  • GRO-friendliness issue
  • Interface-based solution ?
  • Suggestions welcome
slide-33
SLIDE 33

33/35

Table of Contents

Segment Routing Implementation Network Function Virtualization Conclusion

slide-34
SLIDE 34

34/35

Conclusion

  • Draft fully implemented
  • Need driver support for IPv6 extension headers
  • Need packet transfer mechanism for NFV support
slide-35
SLIDE 35

35/35

Conclusion

  • Thanks to Cisco and ARC-SDN grant from Fédération

Wallonie-Bruxelles for funding

  • Patch submission by end of October
  • Contact: david.lebrun@uclouvain.be