aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/sr/sr_doc.md
diff options
context:
space:
mode:
authorPablo Camarillo <pcamaril@cisco.com>2017-03-16 10:43:05 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2017-03-29 08:56:05 +0000
commit4521afa9a643983c789b6b3a77b14c0a95d5e0b2 (patch)
tree0902086700854c4b6f5597b2cd0bb6f47be77a62 /src/vnet/sr/sr_doc.md
parent45ce3fbee5c1a7ad2a01f766c9b05059aa467b8f (diff)
Bugfixing and documentation for SRv6
- Fixed three coverity issues - Linked SRv6 docs - Moved sample plugin to examples folder - Fixed bug with hash. Now everything is using mhash. Potentially in the future we want to do bihash. Change-Id: Ie03a13c8fecb1e315e67d0596cbd23220779aaf2 Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
Diffstat (limited to 'src/vnet/sr/sr_doc.md')
-rw-r--r--src/vnet/sr/sr_doc.md132
1 files changed, 13 insertions, 119 deletions
diff --git a/src/vnet/sr/sr_doc.md b/src/vnet/sr/sr_doc.md
index a72206309af..fd92bdf2268 100644
--- a/src/vnet/sr/sr_doc.md
+++ b/src/vnet/sr/sr_doc.md
@@ -1,6 +1,6 @@
-# SRv6: Segment Routing for IPv6 {#sr_doc}
+# SRv6: Segment Routing for IPv6 {#srv6_doc}
-This is a memo intended to contain documentation of the VPP SRv6 implementation
+This is a memo intended to contain documentation of the VPP SRv6 implementation.
Everything that is not directly obvious should come here.
For any feedback on content that should be explained please mailto:pcamaril@cisco.com
@@ -27,135 +27,29 @@ Segment routing can operate with either an MPLS or an IPv6 data plane. All the c
* Local SID: 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. When a FIB lookup, either in the main FIB or in a specific VRF, returns a match on a local SID, the associated function is performed.
* BindingSID: a BindingSID is a SID (only one) associated one-one with an SR Policy. If a packet arrives with an IPv6 DA corresponding to a BindingSID, then the SR policy will be applied to such packet.
-## Creating an SR LocalSID
+## SRv6 Features in VPP
-A local SID is associated to a Segment Routing behavior -or function- on the current node.
+The <a href="https://datatracker.ietf.org/doc/draft-filsfils-spring-srv6-network-programming/">SRv6 Network Programming (*draft-filsfils-spring-srv6-network-programming*)</a> defines the SRv6 architecture.
-The most basic behavior is called END. It simply activates the next SID in the current packet, by decrementing the Segments Left value and updating the IPv6 DA.
+VPP supports the following SRv6 LocalSID functions: End, End.X, End.DX6, End.DT6, End.DX4, End.DT4, End.DX2, End.B6, End.B6.Encaps.
-A local END SID is instantiated using the following CLI:
+For further information and how to configure each specific function: @subpage srv6_localsid_doc
- sr localsid (del) address XX::YY behavior end
-This creates a new entry in the main FIB for IPv6 address XX::YY. All packets whose IPv6 DA matches this FIB entry are redirected to the sr-localsid node, where they are processed as described above.
+The <a href="https://datatracker.ietf.org/doc/draft-filsfils-spring-segment-routing-policy/">Segment Routing Policy (*draft-filsfils-spring-segment-routing-policy*)</a> defines SR Policies.
-Other examples of local SIDs are the following:
+VPP supports SRv6 Policies with T.Insert and T.Encaps behaviors.
- sr localsid (del) address XX::YY behavior end (psp)
- sr localsid (del) address XX::YY behavior end.x GE0/1/0 2001::a (psp)
- sr localsid (del) address XX::YY behavior end.dx6 GE0/1/0 2001::a
- sr localsid (del) address XX::YY behavior end.dx4 GE0/1/0 10.0.0.1
- sr localsid (del) address XX::YY behavior end.dx2 GigabitE0/11/0
- sr localsid (del) address XX::YY behavior end.dt6 5
- sr localsid (del) address XX::YY behavior end.dt6 5
+For further information on how to create SR Policies: @subpage srv6_policy_doc
-Note that all of these behaviors match the specifications in **TODO REF NET PGM**. Please refer to this document for a detailed description of each behavior.
+For further information on how to steer traffic into SR Policies: @subpage srv6_steering_doc
-Help on the available local SID behaviors and their usage can be obtained with:
-
- help sr localsid
+## SRv6 LocalSID development framework
-Alternatively they can be obtained using.
-
- show sr localsids behavior
-
-The difference in between those two commands is that the first one will only display the SR LocalSID behaviors that are built-in VPP, while the latter will display those behaviors plus the ones added with the SR LocalSID Development Framework.
-
-
-VPP keeps a 'My LocalSID Table' where it stores all the SR local SIDs instantiated as well as their parameters. Every time a new local SID is instantiated, a new entry is added to this table. In addition, counters for correctly and incorrectly processed traffic are maintained for each local SID. The counters store both the number of packets and bytes.
-
-The contents of the 'My LocalSID Table' is shown with:
-
- vpp# show sr localsid
- SRv6 - My LocalSID Table:
- =========================
- Address: c3::1
- Behavior: DX6 (Endpoint with decapsulation and IPv6 cross-connect)
- Iface: GigabitEthernet0/5/0
- Next hop: b:c3::b
- Good traffic: [51277 packets : 5332808 bytes]
- Bad traffic: [0 packets : 0 bytes]
- --------------------
-
-The traffic counters can be reset with:
-
- vpp# clear sr localsid counters
-
-## Creating a SR Policy
-
-An SR Policy is defined by a Binding SID and a weighted set of Segment Lists.
-
-A new SR policy is created with a first SID list using:
-
- sr policy add bsid 2001::1 next A1:: next B1:: next C1:: (weight 5) (fib-table 3)
-
-* The weight parameter is only used if more than one SID list is associated with the policy.
-* The fib-table parameter specifies in which table (VRF) the Binding SID is to be installed.
-
-An SR policy is deleted with:
-
- sr policy del bsid 2001::1
- sr policy del index 1
-
-The existing SR policies are listed with:
-
- show sr policies
-
-### Adding/Removing SID Lists from an SR policy
-
-An additional SID list is associated with an existing SR policy with:
-
- sr policy mod bsid 2001::1 add sl next A2:: next B2:: next C2:: (weight 3)
- sr policy mod index 3 add sl next A2:: next B2:: next C2:: (weight 3)
-
-Conversely, a SID list can be removed from an SR policy with:
-
- sr policy mod bsid 2001::1 del sl index 1
- sr policy mod index 3 del sl index 1
-
-Note that this cannot be used to remove the last SID list of a policy.
-
-The weight of a SID list can also be modified with:
-
- sr policy mod bsid 2001::1 mod sl index 1 weight 4
- sr policy mod index 3 mod sl index 1 weight 4
-
-### SR Policies: Spray policies
-
-Spray policies are a specific type of SR policies where the packet is replicated on all the SID lists, rather than load-balanced among them.
-
-SID list weights are ignored with this type of policies.
-
-A Spray policy is instantiated by appending the keyword **spray** to a regular SR policy command, as in:
-
- sr policy add bsid 2001::1 next A1:: next B1:: next C1:: spray
-
-Spray policies are used for removing multicast state from a network core domain, and instead send a linear unicast copy to every access node. The last SID in each list accesses the multicast tree within the access node.
-
-### Encapsulation SR policies
-
-In case the user decides to create an SR policy an IPv6 Source Address must be specified for the encapsulated traffic. In order to do so the user might use the following command:
-
- set sr encaps source addr XXXX::YYYY
-
-## Steering packets into a SR Policy
-
-To steer packets in Transit into an SR policy (T.Insert, T.Encaps and T.Encaps.L2 behaviors), the user needs to create an 'sr steering policy'.
-
- sr steer l3 2001::/64 via sr policy index 1
- sr steer l3 2001::/64 via sr policy bsid cafe::1
- sr steer l3 2001::/64 via sr policy bsid cafe::1 fib-table 3
- sr steer l3 10.0.0.0/16 via sr policy bsid cafe::1
- sr steer l2 TenGE0/1/0 via sr policy bsid cafe::1
-
-Disclaimer: The T.Encaps.L2 will steer L2 frames into an SR Policy. Notice that creating an SR steering policy for L2 frames will actually automatically *puts the interface into promiscous mode*.
-
-## SR LocalSID development framework
-
-One of the * 'key' * concepts about SRv6 is regarding network programmability. This is why an SRv6 LocalSID is associated with an specific function.
+One of the *'key'* concepts about SRv6 is network programmability. This is why an SRv6 LocalSID is associated with an specific function.
However, the trully way to enable network programmability is allowing any developer **easily** create his own SRv6 LocalSID function. That is the reason why we have added some API calls such that any developer can code his own SRv6 LocalSID behaviors as plugins an add them to the running SRv6 code.
The principle is that the developer only codes the behavior -the graph node-. However all the FIB handling, SR LocalSID instantiation and so on are done by the VPP SRv6 code.
-For more information please refer to the documentation *SRv6 Sample SR LocalSID plugin*.
+For more information please refer to: @subpage srv6_plugin_doc