RFC 8754
RFC 8754
RFC 8754
Abstract
Segment Routing can be applied to the IPv6 data plane using a new
type of Routing Extension Header called the Segment Routing Header
(SRH). This document describes the SRH and how it is used by nodes
that are Segment Routing (SR) capable.
Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved.
Table of Contents
1. Introduction
1.1. Terminology
1.2. Requirements Language
2. Segment Routing Header
2.1. SRH TLVs
2.1.1. Padding TLVs
2.1.2. HMAC TLV
3. SR Nodes
3.1. SR Source Node
3.2. Transit Node
3.3. SR Segment Endpoint Node
4. Packet Processing
4.1. SR Source Node
4.1.1. Reduced SRH
4.2. Transit Node
4.3. SR Segment Endpoint Node
4.3.1. FIB Entry Is a Locally Instantiated SRv6 SID
4.3.2. FIB Entry Is a Local Interface
4.3.3. FIB Entry Is a Nonlocal Route
4.3.4. FIB Entry Is a No Match
5. Intra-SR-Domain Deployment Model
5.1. Securing the SR Domain
5.2. SR Domain as a Single System with Delegation among
Components
5.3. MTU Considerations
5.4. ICMP Error Processing
5.5. Load Balancing and ECMP
5.6. Other Deployments
6. Illustrations
6.1. Abstract Representation of an SRH
6.2. Example Topology
6.3. SR Source Node
6.3.1. Intra-SR-Domain Packet
6.3.2. Inter-SR-Domain Packet -- Transit
6.3.3. Inter-SR-Domain Packet -- Internal to External
6.4. Transit Node
6.5. SR Segment Endpoint Node
6.6. Delegation of Function with HMAC Verification
6.6.1. SID List Verification
7. Security Considerations
7.1. SR Attacks
7.2. Service Theft
7.3. Topology Disclosure
7.4. ICMP Generation
7.5. Applicability of AH
8. IANA Considerations
8.1. Segment Routing Header Flags Registry
8.2. Segment Routing Header TLVs Registry
9. References
9.1. Normative References
9.2. Informative References
Acknowledgements
Contributors
Authors' Addresses
1. Introduction
Segment Routing (SR) can be applied to the IPv6 data plane using a
new type of routing header called the Segment Routing Header (SRH).
This document describes the SRH and how it is used by nodes that are
SR capable.
1.1. Terminology
This document uses the terms Segment Routing (SR), SR domain, SR over
IPv6 (SRv6), Segment Identifier (SID), SRv6 SID, Active Segment, and
SR Policy as defined in [RFC8402].
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in
BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Header | Hdr Ext Len | Routing Type | Segments Left |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Last Entry | Flags | Tag |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Segment List[0] (128-bit IPv6 address) |
| |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| |
...
| |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Segment List[n] (128-bit IPv6 address) |
| |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// //
// Optional Type Length Value objects (variable) //
// //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
where:
Routing Type: 4.
Last Entry: contains the index (zero based), in the Segment List, of
the last element of the Segment List.
0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
|U U U U U U U U|
+-+-+-+-+-+-+-+-+
In the SRH, the Next Header, Hdr Ext Len, Routing Type, and Segments
Left fields are defined in Section 4.4 of [RFC8200]. Based on the
constraints in that section, Next Header, Header Ext Len, and Routing
Type are not mutable while Segments Left is mutable.
Section 4.3 defines the mutability of the remaining fields in the SRH
(Flags, Tag, Segment List) in the context of the SID defined in this
document.
New SIDs defined in the future MUST specify the mutability properties
of the Flags, Tag, and Segment List and indicate how the Hashed
Message Authentication Code (HMAC) TLV (Section 2.1.2) verification
works. Note that, in effect, these fields are mutable.
Consistent with the SR model, the source of the SRH always knows how
to set the Segment List, Flags, Tag, and TLVs of the SRH for use
within the SR domain. How it achieves this is outside the scope of
this document but may be based on topology, available SIDs and their
mutability properties, the SRH mutability requirements of the
destination, or any other information.
TLVs are present when the Hdr Ext Len is greater than (Last
Entry+1)*2.
0 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-----------------------
| Type | Length | Variable-length data
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-----------------------
Type Length Value (TLV) entries contain OPTIONAL information that may
be used by the node identified in the Destination Address (DA) of the
packet.
Each TLV has its own length, format, and semantic. The codepoint
allocated (by IANA) to each TLV Type defines both the format and the
semantic of the information carried in the TLV. Multiple TLVs may be
encoded in the same SRH.
The Length field of the TLV is used to skip the TLV while inspecting
the SRH in case the node doesn't support or recognize the Type. The
Length defines the TLV length in octets, not including the Type and
Length fields.
Padding TLVs
HMAC TLV
There are two types of Padding TLVs, Pad1 and PadN, and the following
applies to both:
Padding TLVs are used for meeting the alignment requirement of the
subsequent TLVs.
2.1.1.1. Pad1
0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
| Type |
+-+-+-+-+-+-+-+-+
Type: 0
2.1.1.2. PadN
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length | Padding (variable) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// Padding (variable) //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Type: 4
The PadN TLV MUST be used when more than one byte of padding is
required.
Alignment requirement: 8n
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length |D| RESERVED |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| HMAC Key ID (4 octets) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| //
| HMAC (variable) //
| //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
where:
Type: 5.
HMAC Key ID: A 4-octet opaque number that uniquely identifies the
pre-shared key and algorithm used to generate the HMAC.
* HMAC Segments Left is less than or equal to Last Entry, and the
destination address is equal to Segment List[Segments Left].
For HMAC algorithms producing digests less than 32 octets long, the
digest is placed in the lowest-order octets of the HMAC field.
Subsequent octets MUST be set to zero such that the HMAC length is a
multiple of 8 octets.
The HMAC Key ID field is opaque -- i.e., it has neither syntax nor
semantic except as an identifier of the right combination of pre-
shared key and hash algorithm.
At the HMAC TLV generating node, the Text for the HMAC computation is
set to the IPv6 header fields and SRH fields as they would appear at
the verification node(s), not necessarily the same as the source node
sending a packet with the HMAC TLV.
The HMAC TLV generating node may need to revoke an SRH for which it
previously generated an HMAC. Revocation is achieved by allocating a
new key and key ID, then rolling over the key ID associated with the
SRH to be revoked. The HMAC TLV verifying node drops packets with
the revoked SRH.
3. SR Nodes
4. Packet Processing
The Next Header and Hdr Ext Len fields are set as specified in
[RFC8200].
The DA of the packet is set with the value of the first segment.
The first element of the SRH Segment List is the ultimate segment.
The second element is the penultimate segment, and so on.
When a source does not require the entire SID list to be preserved in
the SRH, a reduced SRH may be used.
A reduced SRH does not contain the first segment of the related SR
Policy (the first segment is the one already in the DA of the IPv6
header), and the Last Entry field is set to n-2, where n is the
number of elements in the SR Policy.
* No Match
This document and section define a single SRv6 SID. Future documents
may define additional SRv6 SIDs. In such a case, the entire content
of this section will be defined in that document.
If the FIB entry represents a locally instantiated SRv6 SID, process
the next header chain of the IPv6 header as defined in Section 4 of
[RFC8200]. Section 4.3.1.1 describes how to process an SRH;
Section 4.3.1.2 describes how to process an upper-layer header or the
absence of a Next Header.
Example 2:
For any packet received from interface I1
If first TLV is HMAC {
Process the HMAC TLV
}
Else {
Discard the packet
}
If Segments Left is zero, the node must ignore the routing header
and proceed to process the next header in the packet, whose type
is identified by the Next Header field in the routing header.
If Segments Left is non-zero, the node must discard the packet and
send an ICMP Parameter Problem, Code 0, message to the packet's
Source Address, pointing to the unrecognized Routing Type.
The use of the SIDs exclusively within the SR domain and solely for
packets of the SR domain is an important deployment model.
This enables the SR domain to act as a single routing system.
Nodes outside the SR domain are not trusted: they cannot directly use
the SIDs of the domain. This is enforced by two levels of access
control lists:
All interdomain packets are encapsulated for the part of the packet
journey that is within the SR domain. The outer IPv6 header is
originated by a node of the SR domain and is destined to a node of
the SR domain.
As a consequence, any packet within the SR domain is of the SR
domain.
Encapsulation with an outer IPv6 header and SRH shares the same MTU
and fragmentation considerations as IPv6 tunnels described in
[RFC2473]. Further investigation on the limitation of various
tunneling methods (including IPv6 tunnels) is discussed in
[INTAREA-TUNNELS] and SHOULD be considered by operators when
considering MTU within the SR domain.
ICMP error packets generated within the SR domain are sent to source
nodes within the SR domain. The invoking packet in the ICMP error
message may contain an SRH. Since the destination address of a
packet with an SRH changes as each segment is processed, it may not
be the destination used by the socket or application that generated
the invoking packet.
For any interdomain packet, the SR source node MUST impose a flow
label computed based on the inner packet. The computation of the
flow label is as recommended in [RFC6438] for the sending Tunnel End
Point.
For any intradomain packet, the SR source node SHOULD impose a flow
label computed as described in [RFC6437] to assist ECMP load
balancing at transit nodes incapable of computing a 5-tuple beyond
the SRH.
At any transit node within an SR domain, the flow label MUST be used
as defined in [RFC6438] to calculate the ECMP hash toward the
destination address. If a flow label is not used, the transit node
would likely hash all packets between a pair of SR Edge nodes to the
same link.
6. Illustrations
For a node k, its IPv6 address is represented as Ak, and its SRv6 SID
is represented as Sk.
* Source Address SA, Destination Addresses DA, and next header SRH.
Segments Left=2
Last Entry=2
Flags=0
Tag=0
Segment List[0]=S3
Segment List[1]=S2
Segment List[2]=S1
+ * * * * * * * * * * * * * * * * * * * * +
* [8] [9] *
| |
* | | *
[1]----[3]--------[5]----------------[6]---------[4]---[2]
* | | *
| |
* | | *
+--------[7]-------+
* *
+ * * * * * * * SR domain * * * * * * * +
Figure 1
P3: (A1,A2)
If the SR Policy contains only one segment (the egress router 4), the
ingress router 3 encapsulates P3 into an outer header (A3,S4) without
SRH. The packet is
P5: (A3,S4)(A1,A2)
P7: (A8,S3)(A8,A1)
P8: (A1,A8)
P9: (A3,S8)(A1,A8)
P1: (A8,S7)(A9,S7;SL=1)
Node 8 originates packets with the received SRH, including HMAC TLV.
P15: (A8,S5)(A9,S6,S7,S5;SL=3;HMAC)
Node 5 receives and verifies the HMAC for the SRH, then forwards the
packet to the next segment
P16: (A8,S7)(A9,S6,S7,S5;SL=2;HMAC)
Node 6 receives
P17: (A8,S6)(A9,S6,S7,S5;SL=1;HMAC)
Node 9 receives
P18: (A8,A9)(A9,S6,S7,S5;SL=0;HMAC)
7. Security Considerations
7.1. SR Attacks
Compromised nodes within the SR domain may mount the attacks listed
above along with other known attacks on IP networks (e.g., DoS/DDoS,
topology discovery, man-in-the-middle, traffic interception/
siphoning).
7.5. Applicability of AH
8. IANA Considerations
+-------+------------------------------+---------------+
| Value | Description | Reference |
+=======+==============================+===============+
| 4 | Segment Routing Header (SRH) | This document |
+-------+------------------------------+---------------+
+------+-----------------------------+
| Code | Name |
+======+=============================+
| 4 | SR Upper-layer Header Error |
+------+-----------------------------+
+---------+--------------------------+---------------+
| Value | Description | Reference |
+=========+==========================+===============+
| 0 | Pad1 TLV | This document |
+---------+--------------------------+---------------+
| 1 | Reserved | This document |
+---------+--------------------------+---------------+
| 2 | Reserved | This document |
+---------+--------------------------+---------------+
| 3 | Reserved | This document |
+---------+--------------------------+---------------+
| 4 | PadN TLV | This document |
+---------+--------------------------+---------------+
| 5 | HMAC TLV | This document |
+---------+--------------------------+---------------+
| 6 | Reserved | This document |
+---------+--------------------------+---------------+
| 124-126 | Experimentation and Test | This document |
+---------+--------------------------+---------------+
| 127 | Reserved | This document |
+---------+--------------------------+---------------+
| 252-254 | Experimentation and Test | This document |
+---------+--------------------------+---------------+
| 255 | Reserved | This document |
+---------+--------------------------+---------------+
9. References
[FIPS180-4]
National Institute of Standards and Technology (NIST),
"Secure Hash Standard (SHS)", FIPS PUB 180-4, DOI 10.6028/
NIST.FIPS.180-4, August 2015,
<http://csrc.nist.gov/publications/fips/fips180-4/fips-
180-4.pdf>.
[IANA-SRHTLV]
IANA, "Segment Routing Header TLVs",
<https://www.iana.org/assignments/ipv6-parameters/>.
[RFC6407] Weis, B., Rowles, S., and T. Hardjono, "The Group Domain
of Interpretation", RFC 6407, DOI 10.17487/RFC6407,
October 2011, <https://www.rfc-editor.org/info/rfc6407>.
[RFC5340] Coltun, R., Ferguson, D., Moy, J., and A. Lindem, "OSPF
for IPv6", RFC 5340, DOI 10.17487/RFC5340, July 2008,
<https://www.rfc-editor.org/info/rfc5340>.
[SRN] Lebrun, D., Jadin, M., Clad, F., Filsfils, C., and O.
Bonaventure, "Software Resolved Networks: Rethinking
Enterprise Networks with IPv6 Segment Routing", 2018,
<https://inl.info.ucl.ac.be/system/files/
sosr18-final15-embedfonts.pdf>.
Acknowledgements
The authors would like to thank Ole Troan, Bob Hinden, Ron Bonica,
Fred Baker, Brian Carpenter, Alexandru Petrescu, Punit Kumar Jaiswal,
David Lebrun, Benjamin Kaduk, Frank Xialiang, Mirja Kühlewind, Roman
Danyliw, Joe Touch, and Magnus Westerlund for their comments to this
document.
Contributors
Kamran Raza, Zafar Ali, Brian Field, Daniel Bernier, Ida Leung, Jen
Linkova, Ebben Aries, Tomoya Kosugi, Éric Vyncke, David Lebrun, Dirk
Steinberg, Robert Raszuk, Dave Barach, John Brzozowski, Pierre
Francois, Nagendra Kumar, Mark Townsley, Christian Martin, Roberta
Maglione, James Connolly, and Aloys Augustin contributed to the
content of this document.
Authors' Addresses
Email: cfilsfil@cisco.com
Darren Dukes (editor)
Cisco Systems, Inc.
Ottawa
Canada
Email: ddukes@cisco.com
Stefano Previdi
Huawei
Italy
Email: stefano@previdi.net
John Leddy
Individual
United States of America
Email: john@leddy.net
Satoru Matsushima
SoftBank
Email: satoru.matsushima@g.softbank.co.jp
Daniel Voyer
Bell Canada
Email: daniel.voyer@bell.ca