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

From fd.io
< VPP
Jump to: navigation, search
(Configuration on C3)
(updated doxygen link)
 
(13 intermediate revisions by one other user not shown)
Line 1: Line 1:
  
This example shows how to use the VPP platform to setup a L3VPN with SR MPLS. For further information regarding the SR MPLS implementation and CLI please visit the [https://docs.fd.io/vpp/17.07/srv6_doc.html doxygen documentation]. For further information on SRv6, tutorials and videos please visit [https://www.segment-routing.net www.segment-routing.net].
+
This example shows how to use the VPP platform to setup a L3VPN with SR MPLS. For further information regarding the SR MPLS implementation and CLI please visit the [https://docs.fd.io/vpp/17.07/srmpls_doc.html doxygen documentation]. For further information on SR, tutorials and videos please visit [https://www.segment-routing.net www.segment-routing.net].
  
 
__TOC__
 
__TOC__
Line 6: Line 6:
 
== Introduction ==
 
== Introduction ==
  
Please see [https://wiki.fd.io/index.php?title=VPP/Segment_Routing_for_IPV6.
+
Please see [https://wiki.fd.io/index.php?title=VPP/Segment_Routing_for_IPV6].
  
 
== Topology Diagram ==
 
== Topology Diagram ==
Line 18: Line 18:
 
[[File:SRv6 L3VPN IPv6 traffic.png|thumb|upright=1.5|SRv6 L3VPN IPv6 traffic]]
 
[[File:SRv6 L3VPN IPv6 traffic.png|thumb|upright=1.5|SRv6 L3VPN IPv6 traffic]]
  
On all nodes we will configure the nodal SID for that node (value 100 + node) and reachability to each of the other nodal SIDS.
+
On all nodes we will configure the nodal SID for that node (value 100 + node) and reachability to each of the other nodal SIDs. For brevity reachability is added only in the left to right direction.
  
 
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>.  
 
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>.  
 
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 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.
 
  
 
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.
 
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.
Line 28: Line 27:
 
==== Configuration on C1 ====
 
==== Configuration on C1 ====
  
  vpp# mpls local-label add 102 non-eos via 10.0.0.2 GigEthernet0/0/0
+
Reachability to other nodes:
  vpp# mpls local-label add 102 os via 10.0.0.2 GigEthernet0/0/0
+
  vpp# mpls local-label add 102 non-eos via 10.0.0.2 GigEthernet0/0/0 out-labels 102
  vpp# mpls local-label add 103 non-eos via 10.0.1.2 GigEthernet0/0/1
+
  vpp# mpls local-label add 102 eos via 10.0.0.2 GigEthernet0/0/0 out-labels 102
  vpp# mpls local-label add 103 eos via 10.0.1.2 GigEthernet0/0/1
+
  vpp# mpls local-label add 103 non-eos via 10.0.1.2 GigEthernet0/0/1 out-labels 103
  vpp# mpls local-label add 104 non-eos via 10.0.1.2 GigEthernet0/0/1
+
  vpp# mpls local-label add 103 eos via 10.0.1.2 GigEthernet0/0/1 out-labels 103
  vpp# mpls local-label add 104 eos via 10.0.1.2 GigEthernet0/0/1
+
  vpp# mpls local-label add 104 non-eos via 10.0.0.2 GigEthernet0/0/1 out-labels 104
 +
  vpp# mpls local-label add 104 eos via 10.0.0.2 GigEthernet0/0/1 out-labels 104
 +
 
 +
Policy and steering:
 
  vpp# sr mpls policy add bsid 999 next 102 104
 
  vpp# sr mpls policy add bsid 999 next 102 104
 +
The SID list (102, 104) is interpreted as; forward the packet as if it is being sent to 102 and add the MPLS label 104. Forwarding via 102 means VPP will perform a recursive lookup for 102, which in this case would forward via [10.0.0.2 GigEthernet0/0/0] and add label 102. So the packet will leave C1 with an outer label 102 and inner 104.
 
  vpp# sr steer l3 B::/112 via sr policy bsid 999
 
  vpp# sr steer l3 B::/112 via sr policy bsid 999
  
Line 48: Line 51:
  
 
The nodal SID
 
The nodal SID
  vpp# mpls local-label add 102 non-eos via mpls-llokup-in-table 0
+
  vpp# mpls local-label add 102 non-eos via mpls-lookup-in-table 0
 
  vpp# mpls local-label add 102 eos via ip4-lookup-in-table 0
 
  vpp# mpls local-label add 102 eos via ip4-lookup-in-table 0
 
Reachability to other nodes
 
Reachability to other nodes
  vpp# mpls local-label add 103 non-eos via 10.0.2.2 GigEthernet0/0/0
+
  vpp# mpls local-label add 103 non-eos via 10.0.2.2 GigEthernet0/0/0 out-labels 103
  vpp# mpls local-label add 103 eos via 10.0.2.2 GigEthernet0/0/0
+
  vpp# mpls local-label add 103 eos via 10.0.2.2 GigEthernet0/0/0 out-labels 103
  vpp# mpls local-label add 104 non-eos via 10.0.2.2 GigEthernet0/0/0
+
  vpp# mpls local-label add 104 non-eos via 10.0.2.2 GigEthernet0/0/0 out-labels 104
  vpp# mpls local-label add 104 eos via 10.0.2.2 GigEthernet0/0/0
+
  vpp# mpls local-label add 104 eos via 10.0.2.2 GigEthernet0/0/0 out-labels 104
  
  
Line 64: Line 67:
  
 
The nodal SID
 
The nodal SID
  vpp# mpls local-label add 103 non-eos via mpls-llokup-in-table 0
+
  vpp# mpls local-label add 103 non-eos via mpls-lookup-in-table 0
 
  vpp# mpls local-label add 103 eos via ip4-lookup-in-table 0
 
  vpp# mpls local-label add 103 eos via ip4-lookup-in-table 0
 
Reachability to other nodes
 
Reachability to other nodes
  vpp# mpls local-label add 104 non-eos via 10.0.3.2 GigEthernet0/0/0
+
  vpp# mpls local-label add 104 non-eos via 10.0.3.2 GigEthernet0/0/0 out-labels 104
  vpp# mpls local-label add 104 eos via 10.0.3.2 GigEthernet0/0/0
+
  vpp# mpls local-label add 104 eos via 10.0.3.2 GigEthernet0/0/0 out-labels 104
  
 
This configuration can be verified with the CLI:
 
This configuration can be verified with the CLI:
Line 76: Line 79:
 
==== Configuration on C4 ====
 
==== Configuration on C4 ====
  
vpp# sr localsid address C4::6 behavior end.dx6 GigabitEthernet0/5/0 B:C5::B
+
The nodal SID
  vpp# show sr localsid
+
  vpp# mpls local-label add 104 non-eos via mpls-lookup-in-table 0
SRv6 - My LocalSID Table:
+
  vpp# mpls local-label add 104 eos via ip4-lookup-in-table 0
=========================
+
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]
+
  --------------------
+
  
== L3VPN for IPv4 traffic ==
+
This configuration can be verified with the CLI:
 
+
  vpp# show mpls fib
[[File:SRv6 L3VPN IPv4 traffic.png|thumb|upright=1.5|SRv6 L3VPN IPv4 traffic]]
+
  [todo]
 
+
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 ====
+
 
+
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 sr policy bsid C1::999:2
+
 
+
==== Configuration on C2 ====
+
 
+
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.
+
 
+
==== Configuration on C3 ====
+
 
+
''None''
+
 
+
==== Configuration on C4 ====
+
 
+
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]
+
--------------------
+

Latest revision as of 08:56, 29 November 2017

This example shows how to use the VPP platform to setup a L3VPN with SR MPLS. For further information regarding the SR MPLS implementation and CLI please visit the doxygen documentation. For further information on SR, tutorials and videos please visit www.segment-routing.net.

Introduction

Please see [1].

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 IPv4 only.

L3VPN for IPv6 traffic

SRv6 L3VPN IPv6 traffic

On all nodes we will configure the nodal SID for that node (value 100 + node) and reachability to each of the other nodal SIDs. For brevity reachability is added only in the left to right direction.

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>. 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.

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

Reachability to other nodes:

vpp# mpls local-label add 102 non-eos via 10.0.0.2 GigEthernet0/0/0 out-labels 102
vpp# mpls local-label add 102 eos via 10.0.0.2 GigEthernet0/0/0 out-labels 102
vpp# mpls local-label add 103 non-eos via 10.0.1.2 GigEthernet0/0/1 out-labels 103
vpp# mpls local-label add 103 eos via 10.0.1.2 GigEthernet0/0/1 out-labels 103
vpp# mpls local-label add 104 non-eos via 10.0.0.2 GigEthernet0/0/1 out-labels 104
vpp# mpls local-label add 104 eos via 10.0.0.2 GigEthernet0/0/1 out-labels 104

Policy and steering:

vpp# sr mpls policy add bsid 999 next 102 104

The SID list (102, 104) is interpreted as; forward the packet as if it is being sent to 102 and add the MPLS label 104. Forwarding via 102 means VPP will perform a recursive lookup for 102, which in this case would forward via [10.0.0.2 GigEthernet0/0/0] and add label 102. So the packet will leave C1 with an outer label 102 and inner 104.

vpp# sr steer l3 B::/112 via sr policy bsid 999

This configuration can be verified with the CLI:

vpp# show sr mpls pol
  [todo]
-----------
vpp# show sr mpls steering policies
  [todo]

Configuration on C2

The nodal SID

vpp# mpls local-label add 102 non-eos via mpls-lookup-in-table 0
vpp# mpls local-label add 102 eos via ip4-lookup-in-table 0

Reachability to other nodes

vpp# mpls local-label add 103 non-eos via 10.0.2.2 GigEthernet0/0/0 out-labels 103
vpp# mpls local-label add 103 eos via 10.0.2.2 GigEthernet0/0/0 out-labels 103
vpp# mpls local-label add 104 non-eos via 10.0.2.2 GigEthernet0/0/0 out-labels 104
vpp# mpls local-label add 104 eos via 10.0.2.2 GigEthernet0/0/0 out-labels 104


This configuration can be verified with the CLI:

vpp# show mpls fib
[todo]

Configuration on C3

The nodal SID

vpp# mpls local-label add 103 non-eos via mpls-lookup-in-table 0
vpp# mpls local-label add 103 eos via ip4-lookup-in-table 0

Reachability to other nodes

vpp# mpls local-label add 104 non-eos via 10.0.3.2 GigEthernet0/0/0 out-labels 104
vpp# mpls local-label add 104 eos via 10.0.3.2 GigEthernet0/0/0 out-labels 104

This configuration can be verified with the CLI:

vpp# show mpls fib
[todo]

Configuration on C4

The nodal SID

vpp# mpls local-label add 104 non-eos via mpls-lookup-in-table 0
vpp# mpls local-label add 104 eos via ip4-lookup-in-table 0

This configuration can be verified with the CLI:

vpp# show mpls fib
[todo]