SlideShare a Scribd company logo
1 of 27
Implementing IPv6 Segment
Routing in the Linux Kernel
David Lebrun, Olivier Bonaventure
ICTEAM, UCLouvain, Belgium
Work supported by ARC grant 12/18-054 (ARC-SDN) and a Cisco grant
Agenda
• IPv6 Segment Routing
• Implementation in the Linux kernel
• Performance evaluation
Packet along
shortest path to R5
What is Segment Routing ?
• The return of Source Routing
– Each packet contains a loose route to encode any
path inside the network
R1
R2
R3 R5
R7
R6
R5->R2->R6
Packet along
shortest path to R2
R5->R2->R6
Normal IPv6
forwarding
Normal IPv6
forwarding
R2->R6
->R6
Packet along
shortest path to R6
->R6
IPv6 Segment Routing
• Basic principles
– IGP distributes IPv6 prefixes and router loopback
addresses
– Loose source route encoded inside IPv6 extension
header containing a list of segments
– Main types of segments
• Node segment (router's loopback address)
• Adjacency segment (router outgoing interface)
• Virtual function (operator defined function)
https://tools.ietf.org/html/draft-ietf-6man-segment-routing-header-06
http://www.segment-routing.net
The IPv6 Segment Routing Header
Remaining
segments
Each segment is
one IPv6 address
Index of last
segment
Extensibility
IPv6 Segment Routing use cases
• Paths controlled by the endhosts
R1
R2
R3 R5
R7
R6
R5->R2->R6->D
R5->R2->R6->D
R5->R2->R6->D
R5->R5->R6->D
R5->R2->R6->D
R5->R2->R6->D
R5->R2->R6->D
Source adds SRH to
all packets
Destination
removes SRH from
all packets
Network Function Virtualisation
• Force packets to pass through NFV
R1
R2
R3 R5
R7
R6
R5->FCT->R6
R5->FCT->D
R5->FCT->R6
R5->FCT->D
FCT performed
on R5
R5->FCT->D
FCT
Encap and decap
• Routers can also tunnel SRH packets
R1
R2
R3 R5
R7
R6
->D
R1->R5->R7->R6 [->D]
->D
Ingress router
encaps to R6
with SRH
R1->R5->R7->R6 [->D]
Egress router
decaps and
removes SRH
R1->R5->R7->R6 [->D]
R1->R5->R7->R6 [->D]
R1->R5->R7->R6 [->D]
Security: Learning from the past
• How to avoid past failures of source routing ?
The IPv6 SRH HMAC TLV
Different keys and
different hash
functions can be used
Utilisation of the HMAC TLV
• All routers are configured with an HMAC key
• Clients receive SRH with HMAC key
– E.g. from SDN controlled
• Trusted servers configured with HMAC key
R1
R2
R3 R5
R7
R6
Agenda
• IPv6 Segment Routing
• Implementation in the Linux kernel
• Performance evaluation
Basics of Linux packet processing
Packet recvd
for local
process
Packet sent
by local
process
Forwarded packet
Packet forwarding with IPv6 SR
• Router is one of the segments in the list
SRH updated,
Packet
forwarded to
next segment
Packet forwarding with IPv6 SR
• Egress router receiving encapsulated packet
SRH
processed
encapsulation
removed
How to configure IPv6 SR ?
• IPv6 SR implementation extends iproute2
– Commands passed through rtnetlink
– Example
ip −6 route add fc42::/64
encap seg6 mode encap
segs fc00::1,2001:db8::1,fc10::7
dev eth0
Destination match
SRv6 encap
Segments added in
the encapsulated
packet
SRH usage by applications
• Endhosts can control the SRH on a per flow
basis through the socket API
HMAC processing
• Three modes of operations can be configured
– Ignore
• All packets are forwarded independently of the HMACs
– Verify
• Packets containing an HMAC are processed if HMAC is
valid
• Packets without HMAC are processed
– Enforce
• Packets containing an HMAC are processed if HMAC is
valid
• Packets without HMAC are discarded
Agenda
• IPv6 Segment Routing
• Implementation in the Linux kernel
• Performance evaluation
Lab measurements
• Lab setup
– Intel Xeon X3440 processors (4 cores 8 threads at 2.53 GHz
– 16 GB of RAM
– two Intel 82599 10 Gbps Ethernet
• One queue per CPU, one IRQ per queue
– Linux kernel 4.11-rc3, TSO and GRO disabled
• Traffic generator
– Pktgen, in-kernel module sending UDP packets
10 Gbps Ethernet 10 Gbps Ethernet
First measurements with one CPU
Why this gap ?
Baseline
Plain IPv6
forwarding
No difference between
SRH forwarding and
encap+forwarding
Performance limitations
of the first implementation
• Route lookup
– Destination cache was implemented for locally
generated packets but not forwarded ones
• Fixed with a dest cache
• Issue with memory allocation
– Forced free to take a slow path involving spinlocks
in case packet was processed by different CPU
than NIC IRQ
• Fixed with a better utilisation of the skb
Improved performance on one CPU
IPv6 SRH forwarding and encap
are now close to plain IPv6
packet fowarding performance
Does packet size affect performance ?
1000 bytes 1000 bytes
64 64
Cost of HMAC
Pure C code
Special intel
instructions
Leveraging multiple cores
Performance
scales well with
the number of
physical CPUS
Conclusion
• IPv6 Segment Routing has matured
– Stable specification
– Various use cases
• Implementation in the Linux kernel 4.11+
– Endhost functions for clients and servers
– Router functions
• Performance evaluation
– Good forwarding and encap/decap performance
– Unsurprisingly HMAC TLV affects performance
http://www.segment-routing.org

More Related Content

What's hot

netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptablesKernel TLV
 
DPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingDPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingMichelle Holley
 
Linux Linux Traffic Control
Linux Linux Traffic ControlLinux Linux Traffic Control
Linux Linux Traffic ControlSUSE Labs Taipei
 
Linux Systems Performance 2016
Linux Systems Performance 2016Linux Systems Performance 2016
Linux Systems Performance 2016Brendan Gregg
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking ExplainedThomas Graf
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughThomas Graf
 
introduction to linux kernel tcp/ip ptocotol stack
introduction to linux kernel tcp/ip ptocotol stack introduction to linux kernel tcp/ip ptocotol stack
introduction to linux kernel tcp/ip ptocotol stack monad bobo
 
Accelerating Envoy and Istio with Cilium and the Linux Kernel
Accelerating Envoy and Istio with Cilium and the Linux KernelAccelerating Envoy and Istio with Cilium and the Linux Kernel
Accelerating Envoy and Istio with Cilium and the Linux KernelThomas Graf
 
BPF & Cilium - Turning Linux into a Microservices-aware Operating System
BPF  & Cilium - Turning Linux into a Microservices-aware Operating SystemBPF  & Cilium - Turning Linux into a Microservices-aware Operating System
BPF & Cilium - Turning Linux into a Microservices-aware Operating SystemThomas Graf
 
Understanding DPDK algorithmics
Understanding DPDK algorithmicsUnderstanding DPDK algorithmics
Understanding DPDK algorithmicsDenys Haryachyy
 
Cilium - API-aware Networking and Security for Containers based on BPF
Cilium - API-aware Networking and Security for Containers based on BPFCilium - API-aware Networking and Security for Containers based on BPF
Cilium - API-aware Networking and Security for Containers based on BPFThomas Graf
 
FD.io Vector Packet Processing (VPP)
FD.io Vector Packet Processing (VPP)FD.io Vector Packet Processing (VPP)
FD.io Vector Packet Processing (VPP)Kirill Tsym
 
Service Function Chaining in Openstack Neutron
Service Function Chaining in Openstack NeutronService Function Chaining in Openstack Neutron
Service Function Chaining in Openstack NeutronMichelle Holley
 
Kubernetes Networking with Cilium - Deep Dive
Kubernetes Networking with Cilium - Deep DiveKubernetes Networking with Cilium - Deep Dive
Kubernetes Networking with Cilium - Deep DiveMichal Rostecki
 
VLANs in the Linux Kernel
VLANs in the Linux KernelVLANs in the Linux Kernel
VLANs in the Linux KernelKernel TLV
 
Replacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with CiliumReplacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with CiliumMichal Rostecki
 
TRex Traffic Generator - Hanoch Haim
TRex Traffic Generator - Hanoch HaimTRex Traffic Generator - Hanoch Haim
TRex Traffic Generator - Hanoch Haimharryvanhaaren
 

What's hot (20)

Intel dpdk Tutorial
Intel dpdk TutorialIntel dpdk Tutorial
Intel dpdk Tutorial
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptables
 
DPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingDPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet Processing
 
Linux Linux Traffic Control
Linux Linux Traffic ControlLinux Linux Traffic Control
Linux Linux Traffic Control
 
Linux Systems Performance 2016
Linux Systems Performance 2016Linux Systems Performance 2016
Linux Systems Performance 2016
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking Explained
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking Walkthrough
 
OVS v OVS-DPDK
OVS v OVS-DPDKOVS v OVS-DPDK
OVS v OVS-DPDK
 
Dpdk performance
Dpdk performanceDpdk performance
Dpdk performance
 
introduction to linux kernel tcp/ip ptocotol stack
introduction to linux kernel tcp/ip ptocotol stack introduction to linux kernel tcp/ip ptocotol stack
introduction to linux kernel tcp/ip ptocotol stack
 
Accelerating Envoy and Istio with Cilium and the Linux Kernel
Accelerating Envoy and Istio with Cilium and the Linux KernelAccelerating Envoy and Istio with Cilium and the Linux Kernel
Accelerating Envoy and Istio with Cilium and the Linux Kernel
 
BPF & Cilium - Turning Linux into a Microservices-aware Operating System
BPF  & Cilium - Turning Linux into a Microservices-aware Operating SystemBPF  & Cilium - Turning Linux into a Microservices-aware Operating System
BPF & Cilium - Turning Linux into a Microservices-aware Operating System
 
Understanding DPDK algorithmics
Understanding DPDK algorithmicsUnderstanding DPDK algorithmics
Understanding DPDK algorithmics
 
Cilium - API-aware Networking and Security for Containers based on BPF
Cilium - API-aware Networking and Security for Containers based on BPFCilium - API-aware Networking and Security for Containers based on BPF
Cilium - API-aware Networking and Security for Containers based on BPF
 
FD.io Vector Packet Processing (VPP)
FD.io Vector Packet Processing (VPP)FD.io Vector Packet Processing (VPP)
FD.io Vector Packet Processing (VPP)
 
Service Function Chaining in Openstack Neutron
Service Function Chaining in Openstack NeutronService Function Chaining in Openstack Neutron
Service Function Chaining in Openstack Neutron
 
Kubernetes Networking with Cilium - Deep Dive
Kubernetes Networking with Cilium - Deep DiveKubernetes Networking with Cilium - Deep Dive
Kubernetes Networking with Cilium - Deep Dive
 
VLANs in the Linux Kernel
VLANs in the Linux KernelVLANs in the Linux Kernel
VLANs in the Linux Kernel
 
Replacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with CiliumReplacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with Cilium
 
TRex Traffic Generator - Hanoch Haim
TRex Traffic Generator - Hanoch HaimTRex Traffic Generator - Hanoch Haim
TRex Traffic Generator - Hanoch Haim
 

Viewers also liked

Some lessons learned developing OERs over a decade
Some lessons learned developing OERs over a decadeSome lessons learned developing OERs over a decade
Some lessons learned developing OERs over a decadeOlivier Bonaventure
 
Internet innovation with Multipath TCP
Internet innovation with Multipath TCPInternet innovation with Multipath TCP
Internet innovation with Multipath TCPOlivier Bonaventure
 
Beyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsBeyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsOlivier Bonaventure
 
Beyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsBeyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsOlivier Bonaventure
 
Computer Networking : Principles, Protocols and Practice - lesson 1
Computer Networking : Principles, Protocols and Practice - lesson 1Computer Networking : Principles, Protocols and Practice - lesson 1
Computer Networking : Principles, Protocols and Practice - lesson 1Olivier Bonaventure
 

Viewers also liked (9)

12 ethernet-wifi
12 ethernet-wifi12 ethernet-wifi
12 ethernet-wifi
 
Some lessons learned developing OERs over a decade
Some lessons learned developing OERs over a decadeSome lessons learned developing OERs over a decade
Some lessons learned developing OERs over a decade
 
Internet innovation with Multipath TCP
Internet innovation with Multipath TCPInternet innovation with Multipath TCP
Internet innovation with Multipath TCP
 
Beyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsBeyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocols
 
Beyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsBeyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocols
 
9 ipv6-routing
9 ipv6-routing9 ipv6-routing
9 ipv6-routing
 
6 app-tcp
6 app-tcp6 app-tcp
6 app-tcp
 
Computer Networking : Principles, Protocols and Practice - lesson 1
Computer Networking : Principles, Protocols and Practice - lesson 1Computer Networking : Principles, Protocols and Practice - lesson 1
Computer Networking : Principles, Protocols and Practice - lesson 1
 
10 routing-bgp
10 routing-bgp10 routing-bgp
10 routing-bgp
 

Similar to Implementing IPv6 Segment Routing in the Linux kernel

IPv6 Segment Routing : an end-to-end solution ?
IPv6 Segment Routing : an end-to-end solution ?IPv6 Segment Routing : an end-to-end solution ?
IPv6 Segment Routing : an end-to-end solution ?Olivier Bonaventure
 
IPv4aaS tutorial and hands-on
IPv4aaS tutorial and hands-onIPv4aaS tutorial and hands-on
IPv4aaS tutorial and hands-onAPNIC
 
Tutorial: IPv6-only transition with demo
Tutorial: IPv6-only transition with demoTutorial: IPv6-only transition with demo
Tutorial: IPv6-only transition with demoAPNIC
 
Fastsocket Linxiaofeng
Fastsocket LinxiaofengFastsocket Linxiaofeng
Fastsocket LinxiaofengMichael Zhang
 
IPv6 Transition & Deployment, including IPv6-only in cellular and broadband
IPv6 Transition & Deployment, including IPv6-only in cellular and broadbandIPv6 Transition & Deployment, including IPv6-only in cellular and broadband
IPv6 Transition & Deployment, including IPv6-only in cellular and broadbandAPNIC
 
Day5_Lab_9_Introduction_to_Segment_Routing_over_IPv6_SRv6.pdf
Day5_Lab_9_Introduction_to_Segment_Routing_over_IPv6_SRv6.pdfDay5_Lab_9_Introduction_to_Segment_Routing_over_IPv6_SRv6.pdf
Day5_Lab_9_Introduction_to_Segment_Routing_over_IPv6_SRv6.pdfHebaalrahmanAzletine
 
Segment Routing v6 (SRv6) Academy Update
Segment Routing v6 (SRv6) Academy Update Segment Routing v6 (SRv6) Academy Update
Segment Routing v6 (SRv6) Academy Update Chunghan Lee
 
Router configuration
Router configurationRouter configuration
Router configuration97148881557
 
TechWiseTV Workshop: Segment Routing for the Datacenter
TechWiseTV Workshop: Segment Routing for the DatacenterTechWiseTV Workshop: Segment Routing for the Datacenter
TechWiseTV Workshop: Segment Routing for the DatacenterRobb Boyd
 
Multiprotocol label switching (mpls) - Networkshop44
Multiprotocol label switching (mpls)  - Networkshop44Multiprotocol label switching (mpls)  - Networkshop44
Multiprotocol label switching (mpls) - Networkshop44Jisc
 
Evolution Network
Evolution NetworkEvolution Network
Evolution NetworkAPNIC
 
Ocpeu14
Ocpeu14Ocpeu14
Ocpeu14KALRAY
 
Performance Evaluation of GTP-U and SRv6 Stateless Translation
Performance Evaluation of GTP-U and SRv6 Stateless TranslationPerformance Evaluation of GTP-U and SRv6 Stateless Translation
Performance Evaluation of GTP-U and SRv6 Stateless TranslationChunghan Lee
 

Similar to Implementing IPv6 Segment Routing in the Linux kernel (20)

IPv6 Segment Routing : an end-to-end solution ?
IPv6 Segment Routing : an end-to-end solution ?IPv6 Segment Routing : an end-to-end solution ?
IPv6 Segment Routing : an end-to-end solution ?
 
IPv4aaS tutorial and hands-on
IPv4aaS tutorial and hands-onIPv4aaS tutorial and hands-on
IPv4aaS tutorial and hands-on
 
Tutorial: IPv6-only transition with demo
Tutorial: IPv6-only transition with demoTutorial: IPv6-only transition with demo
Tutorial: IPv6-only transition with demo
 
Fastsocket Linxiaofeng
Fastsocket LinxiaofengFastsocket Linxiaofeng
Fastsocket Linxiaofeng
 
IPv6 transition and coexistance - Jordi Palet
IPv6 transition and coexistance - Jordi PaletIPv6 transition and coexistance - Jordi Palet
IPv6 transition and coexistance - Jordi Palet
 
IPv6 Transition & Deployment, including IPv6-only in cellular and broadband
IPv6 Transition & Deployment, including IPv6-only in cellular and broadbandIPv6 Transition & Deployment, including IPv6-only in cellular and broadband
IPv6 Transition & Deployment, including IPv6-only in cellular and broadband
 
Run Your Own 6LoWPAN Based IoT Network
Run Your Own 6LoWPAN Based IoT NetworkRun Your Own 6LoWPAN Based IoT Network
Run Your Own 6LoWPAN Based IoT Network
 
pps Matters
pps Matterspps Matters
pps Matters
 
Day5_Lab_9_Introduction_to_Segment_Routing_over_IPv6_SRv6.pdf
Day5_Lab_9_Introduction_to_Segment_Routing_over_IPv6_SRv6.pdfDay5_Lab_9_Introduction_to_Segment_Routing_over_IPv6_SRv6.pdf
Day5_Lab_9_Introduction_to_Segment_Routing_over_IPv6_SRv6.pdf
 
Segment Routing v6 (SRv6) Academy Update
Segment Routing v6 (SRv6) Academy Update Segment Routing v6 (SRv6) Academy Update
Segment Routing v6 (SRv6) Academy Update
 
Router configuration
Router configurationRouter configuration
Router configuration
 
TechWiseTV Workshop: Segment Routing for the Datacenter
TechWiseTV Workshop: Segment Routing for the DatacenterTechWiseTV Workshop: Segment Routing for the Datacenter
TechWiseTV Workshop: Segment Routing for the Datacenter
 
Router configuration
Router configurationRouter configuration
Router configuration
 
EIGRP, DHCP, OSPF, NAT
EIGRP, DHCP, OSPF, NATEIGRP, DHCP, OSPF, NAT
EIGRP, DHCP, OSPF, NAT
 
Multiprotocol label switching (mpls) - Networkshop44
Multiprotocol label switching (mpls)  - Networkshop44Multiprotocol label switching (mpls)  - Networkshop44
Multiprotocol label switching (mpls) - Networkshop44
 
Ipv6
Ipv6Ipv6
Ipv6
 
Evolution Network
Evolution NetworkEvolution Network
Evolution Network
 
Ocpeu14
Ocpeu14Ocpeu14
Ocpeu14
 
Routing protocols
Routing protocolsRouting protocols
Routing protocols
 
Performance Evaluation of GTP-U and SRv6 Stateless Translation
Performance Evaluation of GTP-U and SRv6 Stateless TranslationPerformance Evaluation of GTP-U and SRv6 Stateless Translation
Performance Evaluation of GTP-U and SRv6 Stateless Translation
 

More from Olivier Bonaventure

A personal journey towards more reproducible networking research
A personal journey towards more reproducible networking researchA personal journey towards more reproducible networking research
A personal journey towards more reproducible networking researchOlivier Bonaventure
 
Part 11 : Interdomain routing with BGP
Part 11 : Interdomain routing with BGPPart 11 : Interdomain routing with BGP
Part 11 : Interdomain routing with BGPOlivier Bonaventure
 
Part 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGPPart 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGPOlivier Bonaventure
 
Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6Olivier Bonaventure
 

More from Olivier Bonaventure (20)

Part3-reliable.pptx
Part3-reliable.pptxPart3-reliable.pptx
Part3-reliable.pptx
 
Part10-router.pptx
Part10-router.pptxPart10-router.pptx
Part10-router.pptx
 
Part1-Intro-Apps.pptx
Part1-Intro-Apps.pptxPart1-Intro-Apps.pptx
Part1-Intro-Apps.pptx
 
Part9-congestion.pptx
Part9-congestion.pptxPart9-congestion.pptx
Part9-congestion.pptx
 
Part2-Apps-Security.pptx
Part2-Apps-Security.pptxPart2-Apps-Security.pptx
Part2-Apps-Security.pptx
 
Part11-lan.pptx
Part11-lan.pptxPart11-lan.pptx
Part11-lan.pptx
 
Part5-tcp-improvements.pptx
Part5-tcp-improvements.pptxPart5-tcp-improvements.pptx
Part5-tcp-improvements.pptx
 
Part8-ibgp.pptx
Part8-ibgp.pptxPart8-ibgp.pptx
Part8-ibgp.pptx
 
Part4-reliable-tcp.pptx
Part4-reliable-tcp.pptxPart4-reliable-tcp.pptx
Part4-reliable-tcp.pptx
 
Part7-routing.pptx
Part7-routing.pptxPart7-routing.pptx
Part7-routing.pptx
 
Part6-network-routing.pptx
Part6-network-routing.pptxPart6-network-routing.pptx
Part6-network-routing.pptx
 
Part1-Intro-Apps.pptx
Part1-Intro-Apps.pptxPart1-Intro-Apps.pptx
Part1-Intro-Apps.pptx
 
Part2-Apps-Security.pptx
Part2-Apps-Security.pptxPart2-Apps-Security.pptx
Part2-Apps-Security.pptx
 
Part4-reliable-tcp.pptx
Part4-reliable-tcp.pptxPart4-reliable-tcp.pptx
Part4-reliable-tcp.pptx
 
Part3-reliable.pptx
Part3-reliable.pptxPart3-reliable.pptx
Part3-reliable.pptx
 
A personal journey towards more reproducible networking research
A personal journey towards more reproducible networking researchA personal journey towards more reproducible networking research
A personal journey towards more reproducible networking research
 
Part 12 : Local Area Networks
Part 12 : Local Area Networks Part 12 : Local Area Networks
Part 12 : Local Area Networks
 
Part 11 : Interdomain routing with BGP
Part 11 : Interdomain routing with BGPPart 11 : Interdomain routing with BGP
Part 11 : Interdomain routing with BGP
 
Part 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGPPart 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGP
 
Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6
 

Recently uploaded

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 

Recently uploaded (20)

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 

Implementing IPv6 Segment Routing in the Linux kernel

  • 1. Implementing IPv6 Segment Routing in the Linux Kernel David Lebrun, Olivier Bonaventure ICTEAM, UCLouvain, Belgium Work supported by ARC grant 12/18-054 (ARC-SDN) and a Cisco grant
  • 2. Agenda • IPv6 Segment Routing • Implementation in the Linux kernel • Performance evaluation
  • 3. Packet along shortest path to R5 What is Segment Routing ? • The return of Source Routing – Each packet contains a loose route to encode any path inside the network R1 R2 R3 R5 R7 R6 R5->R2->R6 Packet along shortest path to R2 R5->R2->R6 Normal IPv6 forwarding Normal IPv6 forwarding R2->R6 ->R6 Packet along shortest path to R6 ->R6
  • 4. IPv6 Segment Routing • Basic principles – IGP distributes IPv6 prefixes and router loopback addresses – Loose source route encoded inside IPv6 extension header containing a list of segments – Main types of segments • Node segment (router's loopback address) • Adjacency segment (router outgoing interface) • Virtual function (operator defined function) https://tools.ietf.org/html/draft-ietf-6man-segment-routing-header-06 http://www.segment-routing.net
  • 5. The IPv6 Segment Routing Header Remaining segments Each segment is one IPv6 address Index of last segment Extensibility
  • 6. IPv6 Segment Routing use cases • Paths controlled by the endhosts R1 R2 R3 R5 R7 R6 R5->R2->R6->D R5->R2->R6->D R5->R2->R6->D R5->R5->R6->D R5->R2->R6->D R5->R2->R6->D R5->R2->R6->D Source adds SRH to all packets Destination removes SRH from all packets
  • 7. Network Function Virtualisation • Force packets to pass through NFV R1 R2 R3 R5 R7 R6 R5->FCT->R6 R5->FCT->D R5->FCT->R6 R5->FCT->D FCT performed on R5 R5->FCT->D FCT
  • 8. Encap and decap • Routers can also tunnel SRH packets R1 R2 R3 R5 R7 R6 ->D R1->R5->R7->R6 [->D] ->D Ingress router encaps to R6 with SRH R1->R5->R7->R6 [->D] Egress router decaps and removes SRH R1->R5->R7->R6 [->D] R1->R5->R7->R6 [->D] R1->R5->R7->R6 [->D]
  • 9. Security: Learning from the past • How to avoid past failures of source routing ?
  • 10. The IPv6 SRH HMAC TLV Different keys and different hash functions can be used
  • 11. Utilisation of the HMAC TLV • All routers are configured with an HMAC key • Clients receive SRH with HMAC key – E.g. from SDN controlled • Trusted servers configured with HMAC key R1 R2 R3 R5 R7 R6
  • 12. Agenda • IPv6 Segment Routing • Implementation in the Linux kernel • Performance evaluation
  • 13. Basics of Linux packet processing Packet recvd for local process Packet sent by local process Forwarded packet
  • 14. Packet forwarding with IPv6 SR • Router is one of the segments in the list SRH updated, Packet forwarded to next segment
  • 15. Packet forwarding with IPv6 SR • Egress router receiving encapsulated packet SRH processed encapsulation removed
  • 16. How to configure IPv6 SR ? • IPv6 SR implementation extends iproute2 – Commands passed through rtnetlink – Example ip −6 route add fc42::/64 encap seg6 mode encap segs fc00::1,2001:db8::1,fc10::7 dev eth0 Destination match SRv6 encap Segments added in the encapsulated packet
  • 17. SRH usage by applications • Endhosts can control the SRH on a per flow basis through the socket API
  • 18. HMAC processing • Three modes of operations can be configured – Ignore • All packets are forwarded independently of the HMACs – Verify • Packets containing an HMAC are processed if HMAC is valid • Packets without HMAC are processed – Enforce • Packets containing an HMAC are processed if HMAC is valid • Packets without HMAC are discarded
  • 19. Agenda • IPv6 Segment Routing • Implementation in the Linux kernel • Performance evaluation
  • 20. Lab measurements • Lab setup – Intel Xeon X3440 processors (4 cores 8 threads at 2.53 GHz – 16 GB of RAM – two Intel 82599 10 Gbps Ethernet • One queue per CPU, one IRQ per queue – Linux kernel 4.11-rc3, TSO and GRO disabled • Traffic generator – Pktgen, in-kernel module sending UDP packets 10 Gbps Ethernet 10 Gbps Ethernet
  • 21. First measurements with one CPU Why this gap ? Baseline Plain IPv6 forwarding No difference between SRH forwarding and encap+forwarding
  • 22. Performance limitations of the first implementation • Route lookup – Destination cache was implemented for locally generated packets but not forwarded ones • Fixed with a dest cache • Issue with memory allocation – Forced free to take a slow path involving spinlocks in case packet was processed by different CPU than NIC IRQ • Fixed with a better utilisation of the skb
  • 23. Improved performance on one CPU IPv6 SRH forwarding and encap are now close to plain IPv6 packet fowarding performance
  • 24. Does packet size affect performance ? 1000 bytes 1000 bytes 64 64
  • 25. Cost of HMAC Pure C code Special intel instructions
  • 26. Leveraging multiple cores Performance scales well with the number of physical CPUS
  • 27. Conclusion • IPv6 Segment Routing has matured – Stable specification – Various use cases • Implementation in the Linux kernel 4.11+ – Endhost functions for clients and servers – Router functions • Performance evaluation – Good forwarding and encap/decap performance – Unsurprisingly HMAC TLV affects performance http://www.segment-routing.org

Editor's Notes

  1. 240k normal HMAC 290k SSE3 HMAC