-
Notifications
You must be signed in to change notification settings - Fork 710
VPP Segment_Routing_for_IPv6
VPP has an up-to-date implementation of SRv6 Network Programming.
This example shows how to use the VPP platform to setup a L3VPN with SRv6. For further information regarding the SRv6 implementation and CLI please visit the doxygen documentation. For further information on SRv6, tutorials and videos please visit www.segment-routing.net.
Segment Routing changes the way packets are forwarded inside a network, enabling network operators to have better control on the path followed by the packets. In Segment Routing-enabled networks, packets are routed through sequence of segments, which are stored within the packet headers. The packets will always follow the shortest path up to each segment. In this way, no state is maintained in the network.
Segment Routing can be applied to either the MPLS or the IPv6 dataplane. The IPv6 flavor of Segment Routing — a.k.a SRv6 — uses an IPv6 Routing Extension header, called Segment Routing header (SRH), where each segment is encoded as an IPv6 address. An ordered list of segments is thus encoded as an ordered list of IPv6 addresses in the SRH. The current active segment is the IPv6 Destination Address of the packet, while the next segment to be processed is indicated in the Segments Left field of the SRH. Upon completion of a segment, this field is updated to point to the next segment and the new active segment is copied in the Destination Address field of the IPv6 header.
On an SRv6-enabled node, the available segments are referred to as Local SIDs. Each of them is associated with a processing function on the local node, which may range from advancing to the next SID in the SRH up to complex user-defined behaviors.
In this example we will leverage SRv6 to create an L3VPN overlay for both IPv4 and IPv6 traffic, while also providing underlay optimization.
Note that SRv6 is not limited to this use-case. Please read the doxygen documentation for further information.
Our topology is simply going to be four VPP nodes with both, an IPv4 and IPv6 clients and servers attached to this core network. The 'core' network is running IPv6 only.
SRv6 L3VPN IPv6 traffic
In this example what we will do is on C1 create a SR Policy with only one SID list. This SID list will be <C2::, C4::6>. The SR policy will be using encapsulation. On C1 I will add an steering policy to steer all the L3 traffic destined to B::/112 via the BindingSID of the SR policy we just created before.
On C2 I will create one SR LocalSID with behavior End. (Endpoint)
On C4 I will create one SR LocalSID with behavior End.DX6 (Endpoint with Decapsulation and IPv6 cross-connect).
Note that this is a L3VPN for all traffic from A:: to B::. In this example the returning path is not shown. The user must create another SR policy at C4 with the appropriate SR LocalSIDs at the different nodes for the returning path.
vpp# set sr encaps source addr C1::
vpp# sr policy add bsid C1::999:1 next C2:: next C4::6 encap
vpp# sr steer l3 B::/112 via bsid C1::999:1
This configuration can be verified with the CLI:
vpp# show sr pol
SR policies:
[0].- BSID: c1::999:1
Behavior: Encapsulation
Type: Default
FIB table: 0
Segment Lists:
[0].- < c2::, c4::6 > weight: 1
-----------
vpp# show sr steering policies
SR steering policies:
Traffic SR policy BSID
L3 b::/112 c1::999:1
vpp# sr localsid address C2:: behavior end
This configuration can be verified with the CLI:
vpp# show sr localsid
SRv6 - My LocalSID Table:
=========================
Address: c2::
Behavior: End
Good traffic: [0 packets : 0 bytes]
Bad traffic: [0 packets : 0 bytes]
--------------------
Note that each SR LocalSID has counters for good and bad processed traffic. These counters can be cleared with
vpp# clear sr localsid counters
None
vpp# sr localsid address C4::6 behavior end.dx6 GigabitEthernet0/5/0 B:C5::B
vpp# show sr localsid
SRv6 - My LocalSID Table:
=========================
Address: c4::6
Behavior: DX6 (Endpoint with decapsulation and IPv6 cross-connect)
Iface: GigabitEthernet0/5/0
Next hop: b:c5::b
Good traffic: [6686 packets : 678832 bytes]
Bad traffic: [0 packets : 0 bytes]
--------------------
SRv6 L3VPN IPv4 traffic
In this example what we will do is on C1 create a SR Policy with only one SID list. This SID list will be <C2::, C4::4>. The SR policy will be using encapsulation. On C1 I will add an steering policy to steer all the L3 traffic destined to 2.2.2.0/24 via the BindingSID of the SR policy we just created before.
On C2 I will create one SR LocalSID with behavior End. (Endpoint)
On C4 I will create one SR LocalSID with behavior End.DX4 (Endpoint with Decapsulation and IPv4 cross-connect).
Note that this is a L3VPN for all traffic from 1.1.1.0/24 to 2.2.2.0/24. In this example the returning path is not shown. The user must create another SR policy at C4 with the appropriate SR LocalSIDs at the different nodes for the returning path.
vpp# set sr encaps source addr C1::
vpp# sr policy add bsid C1::999:2 next C2:: next C4::4 encap
vpp# sr steer l3 2.2.2.0/24 via bsid C1::999:2
vpp# sr localsid address C2:: behavior end
Note here that this is the same SR LocalSID as the one created for the L3VPN for IPv6 traffic. Hence, you don't need to type this again.
None
vpp# sr localsid address C4::4 behavior end.dx4 GigabitEthernet0/6/0 2.2.2.2
vpp# show sr localsid
SRv6 - My LocalSID Table:
=========================
Address: c4::4
Behavior: DX4 (Endpoint with decapsulation and IPv4 cross-connect)
Iface: GigabitEthernet0/6/0
Next hop: 2.2.2.2
Good traffic: [0 packets : 0 bytes]
Bad traffic: [0 packets : 0 bytes]
--------------------
- VPP 2022 Make Test Use Case Poll
- VPP-AArch64
- VPP-ABF
- VPP Alternative Builds
- VPP API Concepts
- VPP API Versioning
- VPP-ApiChangeProcess
- VPP-ArtifactVersioning
- VPP-BIER
- VPP-Bihash
- VPP-BugReports
- VPP Build System Deep Dive
- VPP Build, Install, And Test Images
- VPP-BuildArtifactRetentionPolicy
- VPP-c2cpel
- VPP Code Walkthrough VoD
- VPP Code Walkthrough VoD Topic Index
- VPP Code Walkthrough VoDs
- VPP-CodeStyleConventions
- VPP-CodingTips
- VPP Command Line Arguments
- VPP Command Line Interface CLI Guide
- VPP-CommitMessages
- VPP-Committers-SMEs
- VPP-CommitterTasks-ApiFreeze
- VPP CommitterTasks Compare API Changes
- VPP-CommitterTasks-CutPointRelease
- VPP-CommitterTasks-CutRelease
- VPP-CommitterTasks-FinalReleaseCandidate
- VPP-CommitterTasks-PullThrottleBranch
- VPP-CommitterTasks-ReleasePlan
- VPP Configuration Tool
- VPP Configure An LW46 MAP E Terminator
- VPP Configure VPP As A Router Between Namespaces
- VPP Configure VPP TAP Interfaces For Container Routing
- VPP-CoreFileMismatch
- VPP-cpel
- VPP-cpeldump
- VPP-CurrentData
- VPP-DHCPKit
- VPP-DHCPv6
- VPP-DistributedOwnership
- VPP-Documentation
- VPP DPOs And Feature Arcs
- VPP EC2 Instance With SRIOV
- VPP-elog
- VPP-FAQ
- VPP Feature Arcs
- VPP-Features
- VPP-Features-IPv6
- VPP-FIB
- VPP-g2
- VPP Getting VPP 16.06
- VPP Getting VPP Release Binaries
- VPP-HA
- VPP-HostStack
- VPP-HostStack-BuiltinEchoClientServer
- VPP-HostStack-EchoClientServer
- VPP-HostStack-ExternalEchoClientServer
- VPP HostStack Hs Test
- VPP-HostStack-LDP-iperf
- VPP-HostStack-LDP-nginx
- VPP-HostStack-LDP-sshd
- VPP-HostStack-nginx
- VPP-HostStack-SessionLayerArchitecture
- VPP-HostStack-TestHttpServer
- VPP-HostStack-TestProxy
- VPP-HostStack-TLS
- VPP-HostStack-VCL
- VPP-HostStack-VclEchoClientServer
- VPP-Hotplug
- VPP How To Add A Tunnel Encapsulation
- VPP How To Build The Sample Plugin
- VPP How To Connect A PCI Interface To VPP
- VPP How To Create A VPP Binary Control Plane API
- VPP How To Deploy VPP In EC2 Instance And Use It To Connect Two Different VPCs
- VPP How To Optimize Performance %28System Tuning%29
- VPP How To Use The API Trace Tools
- VPP How To Use The C API
- VPP How To Use The Packet Generator And Packet Tracer
- VPP-Howtos
- VPP-index
- VPP Installing VPP Binaries From Packages
- VPP Interconnecting vRouters With VPP
- VPP Introduction To IP Adjacency
- VPP Introduction To N Tuple Classifiers
- VPP IP Adjacency Introduction
- VPP-IPFIX
- VPP-IPSec
- VPP IPSec And IKEv2
- VPP IPv6 SR VIRL Topology File
- VPP Java API
- VPP Java API Plugin Support
- VPP Jira Workflow
- VPP-Macswapplugin
- VPP-MakeTestFramework
- VPP-Meeting
- VPP-MFIB
- VPP Missing Prefetches
- VPP Modifying The Packet Processing Directed Graph
- VPP MPLS FIB
- VPP-NAT
- VPP Nataas Test
- VPP-OVN
- VPP Per Feature Notes
- VPP Performance Analysis Tools
- VPP-perftop
- VPP Progressive VPP Tutorial
- VPP Project Meeting Minutes
- VPP Pulling, Building, Running, Hacking And Pushing VPP Code
- VPP Pure L3 Between Namespaces With 32s
- VPP Pure L3 Container Networking
- VPP Pushing And Testing A Tag
- VPP Python API
- VPP-PythonVersionPolicy
- VPP-QuickTrexSetup
- VPP Random Hints And Kinks For KVM Usage
- VPP Release Plans Release Plan 16.09
- VPP Release Plans Release Plan 17.01
- VPP Release Plans Release Plan 17.04
- VPP Release Plans Release Plan 17.07
- VPP Release Plans Release Plan 17.10
- VPP Release Plans Release Plan 18.01
- VPP Release Plans Release Plan 18.04
- VPP Release Plans Release Plan 18.07
- VPP Release Plans Release Plan 18.10
- VPP Release Plans Release Plan 19.01
- VPP Release Plans Release Plan 19.04
- VPP Release Plans Release Plan 19.08
- VPP Release Plans Release Plan 20.01
- VPP Release Plans Release Plan 20.05
- VPP Release Plans Release Plan 20.09
- VPP Release Plans Release Plan 21.01
- VPP Release Plans Release Plan 21.06
- VPP Release Plans Release Plan 21.10
- VPP Release Plans Release Plan 22.02
- VPP Release Plans Release Plan 22.06
- VPP Release Plans Release Plan 22.10
- VPP Release Plans Release Plan 23.02
- VPP Release Plans Release Plan 23.06
- VPP Release Plans Release Plan 23.10
- VPP Release Plans Release Plan 24.02
- VPP Release Plans Release Plan 24.06
- VPP Release Plans Release Plan 24.10
- VPP Release Plans Release Plan 25.02
- VPP Release Plans Release Plan 25.06
- VPP Release Plans Release Plan 25.10
- VPP Release Plans Release Plan 26.02
- VPP Release Plans Release Plan 26.06
- VPP-RM
- VPP-SecurityGroups
- VPP Segment Routing For IPv6
- VPP Segment Routing For MPLS
- VPP Setting Up Your Dev Environment
- VPP-SNAT
- VPP Software Architecture
- VPP STN Testing
- VPP The VPP API
- VPP Training Events
- VPP-Troubleshooting
- VPP-Troubleshooting-BuildIssues
- VPP-Troubleshooting-Vagrant
- VPP Tutorial DPDK And MacSwap
- VPP Tutorial Routing And Switching
- VPP-Tutorials
- VPP Use VPP To Chain VMs Using Vhost User Interface
- VPP Use VPP To Connect VMs Using Vhost User Interface
- VPP Using mTCP User Mode TCP Stack With VPP
- VPP Using VPP As A VXLAN Tunnel Terminator
- VPP Using VPP In A Multi Thread Model
- VPP-VOM
- VPP VPP BFD Nexus
- VPP VPP Home Gateway
- VPP VPP WIKI DEPRECATED CONTENT
- VPP-VPPCommunicationsLibrary
- VPP-VPPConfig
- VPP What Is ODP4VPP
- VPP What Is VPP
- VPP Working Environments
- VPP Working With The 16.06 Throttle Branch


