Difference between revisions of "VPP/Segment Routing for IPv6"

From fd.io
< VPP
Jump to: navigation, search
(No difference)

Revision as of 11:31, 29 March 2017

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.

Introduction

Segment Routing changes the way packets are forwarded inside a network to enable network operators to have better control on the path followed by the packets. Networks using Segment Routing route the packets through a list of segments within the packet. 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 the MPLS and IPv6 dataplanes. In the IPv6 dataplane, SR -a.k.a SRv6- uses an IPv6 Routing Extension header where each one of the segments is encoded as an IPv6 address. An ordered list of segments is encoded as an ordered list of IPv6 addresses in the routing extension header. The segment to process is indicated by a pointer in the routing extension header. Upon completion of a segment, the pointer is incremented.

In SRv6, each segment is an SR LocalSID. An SR LocalSID is a SID associated with a processing function on the local node, which may go from advancing to the next SID in the SRH, to complex user-defined behaviors.

In this example we will leverage SRv6 to create a L3VPN for both IPv4 and IPv6 traffic. We will also leverage SRv6 to do underlay optimization in our overlay VPN.

Note that the SRv6 is not limited to this use-case. Please review the doxygen documentation for further info.

Topology Diagram

SRv6 L3VPN.png

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.

L3VPN for IPv6 traffic

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.

Configuration on C1

set sr encaps source addr C1::
sr policy add bsid C1::999:1 next C2:: next C4::6 encap
sr steer l3 B::/112 via sr policy bsid C1::999:1

This configuration can be verified with the CLI:

show sr policies
show sr steering policies

Configuration on C2

sr localsid address C2:: behavior end

This configuration can be verified with the CLI:

show sr localsid

Note that each SR LocalSID has counters for good and bad processed traffic. These counters can be cleared with

clear sr localsid counters

Configuration on C3

None

Configuration on C4

sr localsid address C4::6 behavior end.dx6 GigabitEthernet0/5/0 B:C5::B

L3VPN for IPv4 traffic

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.

Configuration on C1

set sr encaps source addr C1::
sr policy add bsid C1::999:2 next C2:: next C4::4 encap
sr steer l3 2.2.2.0/24 via sr policy bsid C1::999:2

Configuration on C2

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.

Configuration on C3

None

Configuration on C4

sr localsid address C4::4 behavior end.dx4 GigabitEthernet0/6/0 2.2.2.2