blob: 24501832b85ac4f2f6c8e812c6719852fd4a1303 [file] [log] [blame]
Nathan Skrzypczakd4a70642021-10-08 14:01:27 +02001.. _srv6_doc:
2
3SRv6: Segment Routing for IPv6
4==============================
5
6This is a memo intended to contain documentation of the VPP SRv6
7implementation. Everything that is not directly obvious should come
8here. For any feedback on content that should be explained please
9mailto:pcamaril@cisco.com
10
11Segment Routing
12---------------
13
14Segment routing is a network technology focused on addressing the
15limitations of existing IP and Multiprotocol Label Switching (MPLS)
16networks in terms of simplicity, scale, and ease of operation. It is a
17foundation for application engineered routing as it prepares the
18networks for new business models where applications can control the
19network behavior.
20
21Segment routing seeks the right balance between distributed intelligence
22and centralized optimization and programming. It was built for the
23software-defined networking (SDN) era.
24
25Segment routing enhances packet forwarding behavior by enabling a
26network to transport unicast packets through a specific forwarding path,
27different from the normal path that a packet usually takes (IGP shortest
28path or BGP best path). This capability benefits many use cases, and one
29can build those specific paths based on application requirements.
30
31Segment routing uses the source routing paradigm. A node, usually a
32router but also a switch, a trusted server, or a virtual forwarder
33running on a hypervisor, steers a packet through an ordered list of
34instructions, called segments. A segment can represent any instruction,
35topological or service-based. A segment can have a local semantic to a
36segment-routing node or global within a segment-routing network. Segment
37routing allows an operator to enforce a flow through any topological
38path and service chain while maintaining per-flow state only at the
39ingress node to the segment-routing network. Segment routing also
40supports equal-cost multipath (ECMP) by design.
41
42Segment routing can operate with either an MPLS or an IPv6 data plane.
43All the currently available MPLS services, such as Layer 3 VPN (L3VPN),
44L2VPN (Virtual Private Wire Service [VPWS], Virtual Private LAN Services
45[VPLS], Ethernet VPN [E-VPN], and Provider Backbone Bridging Ethernet
46VPN [PBB-EVPN]), can run on top of a segment-routing transport network.
47
48**The implementation of Segment Routing in VPP covers both the IPv6 data
49plane (SRv6) as well as the MPLS data plane (SR-MPLS). This page
50contains the SRv6 documentation.**
51
52Segment Routing terminology
53---------------------------
54
55- Segment Routing Header (SRH): IPv6 routing extension header of type
56 Segment Routing’. (draft-ietf-6man-segment-routing-header-05)
57- SegmentID (SID): is an IPv6 address.
58- Segment List (SL) (SID List): is the sequence of SIDs that the packet
59 will traverse.
60- SR Policy: defines the SRH that will be applied to a packet. A packet
61 steered into an SR policy may either receive the SRH by IPv6 header
62 encapsulation (as recommended in draft-ietf-6man-rfc2460bis) or it
63 could be inserted within an existing IPv6 header. An SR policy is
64 uniquely identified by its Binding SID and associated with a weighted
65 set of Segment Lists. In case several SID lists are defined, traffic
66 steered into the policy is unevenly load-balanced among them
67 according to their respective weights.
68- Local SID: is a SID associated with a processing function on the
69 local node, which may go from advancing to the next SID in the SRH,
70 to complex user-defined behaviors. When a FIB lookup, either in the
71 main FIB or in a specific VRF, returns a match on a local SID, the
72 associated function is performed.
73- BindingSID: a BindingSID is a SID (only one) associated one-one with
74 an SR Policy. If a packet arrives with an IPv6 DA corresponding to a
75 BindingSID, then the SR policy will be applied to such packet.
76
77SRv6 Features in VPP
78--------------------
79
80The SRv6 Network Programming
81(*draft-filsfils-spring-srv6-network-programming*) defines the SRv6
82architecture.
83
84VPP supports the following SRv6 LocalSID functions: End, End.X, End.DX6,
85End.DT6, End.DX4, End.DT4, End.DX2, End.B6, End.B6.Encaps.
86
87For further information and how to configure each specific function:
88:ref:`srv6_localsid_doc`
89
90The Segment Routing Policy
91(*draft-filsfils-spring-segment-routing-policy*) defines SR Policies.
92
93VPP supports SRv6 Policies with T.Insert and T.Encaps behaviors.
94
95For further information on how to create SR Policies: :ref:`srv6_policy_doc`
96
97For further information on how to steer traffic into SR Policies:
98:ref:`srv6_steering_doc`
99
100SRv6 LocalSID development framework
101-----------------------------------
102
103One of the *‘key’* concepts about SRv6 is network programmability. This
104is why an SRv6 LocalSID is associated with an specific function.
105
106However, the true way to enable network programmability is allowing
107any developer **easily** create his own SRv6 LocalSID function. That is
108the reason why we have added some API calls such that any developer can
109code his own SRv6 LocalSID behaviors as plugins an add them to the
110running SRv6 code.
111
112The principle is that the developer only codes the behavior -the graph
113node-. However all the FIB handling, SR LocalSID instantiation and so on
114are done by the VPP SRv6 code.
115
116For more information please refer to: :ref:`srv6_plugin_doc`
117
118Available SRv6 plugins include:
119
120- :ref:`srv6_as_plugin_doc`
121- :ref:`srv6_ad_plugin_doc`
122- :ref:`srv6_am_plugin_doc`
123- :ref:`srv6_mobile_plugin_doc`