Nathan Skrzypczak | d4a7064 | 2021-10-08 14:01:27 +0200 | [diff] [blame] | 1 | .. _srv6_doc: |
| 2 | |
| 3 | SRv6: Segment Routing for IPv6 |
| 4 | ============================== |
| 5 | |
| 6 | This is a memo intended to contain documentation of the VPP SRv6 |
| 7 | implementation. Everything that is not directly obvious should come |
| 8 | here. For any feedback on content that should be explained please |
| 9 | mailto:pcamaril@cisco.com |
| 10 | |
| 11 | Segment Routing |
| 12 | --------------- |
| 13 | |
| 14 | Segment routing is a network technology focused on addressing the |
| 15 | limitations of existing IP and Multiprotocol Label Switching (MPLS) |
| 16 | networks in terms of simplicity, scale, and ease of operation. It is a |
| 17 | foundation for application engineered routing as it prepares the |
| 18 | networks for new business models where applications can control the |
| 19 | network behavior. |
| 20 | |
| 21 | Segment routing seeks the right balance between distributed intelligence |
| 22 | and centralized optimization and programming. It was built for the |
| 23 | software-defined networking (SDN) era. |
| 24 | |
| 25 | Segment routing enhances packet forwarding behavior by enabling a |
| 26 | network to transport unicast packets through a specific forwarding path, |
| 27 | different from the normal path that a packet usually takes (IGP shortest |
| 28 | path or BGP best path). This capability benefits many use cases, and one |
| 29 | can build those specific paths based on application requirements. |
| 30 | |
| 31 | Segment routing uses the source routing paradigm. A node, usually a |
| 32 | router but also a switch, a trusted server, or a virtual forwarder |
| 33 | running on a hypervisor, steers a packet through an ordered list of |
| 34 | instructions, called segments. A segment can represent any instruction, |
| 35 | topological or service-based. A segment can have a local semantic to a |
| 36 | segment-routing node or global within a segment-routing network. Segment |
| 37 | routing allows an operator to enforce a flow through any topological |
| 38 | path and service chain while maintaining per-flow state only at the |
| 39 | ingress node to the segment-routing network. Segment routing also |
| 40 | supports equal-cost multipath (ECMP) by design. |
| 41 | |
| 42 | Segment routing can operate with either an MPLS or an IPv6 data plane. |
| 43 | All the currently available MPLS services, such as Layer 3 VPN (L3VPN), |
| 44 | L2VPN (Virtual Private Wire Service [VPWS], Virtual Private LAN Services |
| 45 | [VPLS], Ethernet VPN [E-VPN], and Provider Backbone Bridging Ethernet |
| 46 | VPN [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 |
| 49 | plane (SRv6) as well as the MPLS data plane (SR-MPLS). This page |
| 50 | contains the SRv6 documentation.** |
| 51 | |
| 52 | Segment 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 | |
| 77 | SRv6 Features in VPP |
| 78 | -------------------- |
| 79 | |
| 80 | The SRv6 Network Programming |
| 81 | (*draft-filsfils-spring-srv6-network-programming*) defines the SRv6 |
| 82 | architecture. |
| 83 | |
| 84 | VPP supports the following SRv6 LocalSID functions: End, End.X, End.DX6, |
| 85 | End.DT6, End.DX4, End.DT4, End.DX2, End.B6, End.B6.Encaps. |
| 86 | |
| 87 | For further information and how to configure each specific function: |
| 88 | :ref:`srv6_localsid_doc` |
| 89 | |
| 90 | The Segment Routing Policy |
| 91 | (*draft-filsfils-spring-segment-routing-policy*) defines SR Policies. |
| 92 | |
| 93 | VPP supports SRv6 Policies with T.Insert and T.Encaps behaviors. |
| 94 | |
| 95 | For further information on how to create SR Policies: :ref:`srv6_policy_doc` |
| 96 | |
| 97 | For further information on how to steer traffic into SR Policies: |
| 98 | :ref:`srv6_steering_doc` |
| 99 | |
| 100 | SRv6 LocalSID development framework |
| 101 | ----------------------------------- |
| 102 | |
| 103 | One of the *‘key’* concepts about SRv6 is network programmability. This |
| 104 | is why an SRv6 LocalSID is associated with an specific function. |
| 105 | |
| 106 | However, the true way to enable network programmability is allowing |
| 107 | any developer **easily** create his own SRv6 LocalSID function. That is |
| 108 | the reason why we have added some API calls such that any developer can |
| 109 | code his own SRv6 LocalSID behaviors as plugins an add them to the |
| 110 | running SRv6 code. |
| 111 | |
| 112 | The principle is that the developer only codes the behavior -the graph |
| 113 | node-. However all the FIB handling, SR LocalSID instantiation and so on |
| 114 | are done by the VPP SRv6 code. |
| 115 | |
| 116 | For more information please refer to: :ref:`srv6_plugin_doc` |
| 117 | |
| 118 | Available 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` |