draft-ietf-idr-flow-spec-v6-14.txt   draft-ietf-idr-flow-spec-v6-15.txt 
IDR Working Group C. Loibl, Ed. IDR Working Group C. Loibl, Ed.
Internet-Draft next layer Telekom GmbH Internet-Draft next layer Telekom GmbH
Intended status: Standards Track R. Raszuk, Ed. Intended status: Standards Track R. Raszuk, Ed.
Expires: February 13, 2021 Bloomberg LP Expires: March 25, 2021 Bloomberg LP
S. Hares, Ed. S. Hares, Ed.
Huawei Huawei
August 12, 2020 September 21, 2020
Dissemination of Flow Specification Rules for IPv6 Dissemination of Flow Specification Rules for IPv6
draft-ietf-idr-flow-spec-v6-14 draft-ietf-idr-flow-spec-v6-15
Abstract Abstract
Dissemination of Flow Specification Rules I-D.ietf-idr-rfc5575bis Dissemination of Flow Specification Rules provides a Border Gateway
provides a protocol extension for propagation of traffic flow Protocol extension for the propagation of traffic flow information
information for the purpose of rate limiting or filtering. I-D.ietf- for the purpose of rate limiting or filtering IPv4 protocol data
idr-rfc5575bis specifies those extensions for IPv4 protocol data packets.
packets only.
This specification extends I-D.ietf-idr-rfc5575bis and defines This specification extends I-D.ietf-idr-rfc5575bis with IPv6
changes to the original document in order to make it also usable and functionality.
applicable to IPv6 data packets.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on February 13, 2021. This Internet-Draft will expire on March 25, 2021.
Copyright Notice Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 17 skipping to change at page 2, line 15
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Definitions of Terms Used in This Memo . . . . . . . . . 3 1.1. Definitions of Terms Used in This Memo . . . . . . . . . 3
2. IPv6 Flow Specification encoding in BGP . . . . . . . . . . . 3 2. IPv6 Flow Specification encoding in BGP . . . . . . . . . . . 3
3. IPv6 Flow Specification components . . . . . . . . . . . . . 4 3. IPv6 Flow Specification components . . . . . . . . . . . . . 3
3.1. Type 1 - Destination IPv6 Prefix . . . . . . . . . . . . 4 3.1. Type 1 - Destination IPv6 Prefix . . . . . . . . . . . . 4
3.2. Type 2 - Source IPv6 Prefix . . . . . . . . . . . . . . . 4 3.2. Type 2 - Source IPv6 Prefix . . . . . . . . . . . . . . . 4
3.3. Type 3 - Next Header . . . . . . . . . . . . . . . . . . 4 3.3. Type 3 - Upper-Layer Protocol . . . . . . . . . . . . . . 4
3.4. Type 7 - ICMPv6 type . . . . . . . . . . . . . . . . . . 5 3.4. Type 7 - ICMPv6 Type . . . . . . . . . . . . . . . . . . 5
3.5. Type 8 - ICMPv6 code . . . . . . . . . . . . . . . . . . 5 3.5. Type 8 - ICMPv6 Code . . . . . . . . . . . . . . . . . . 5
3.6. Type 12 - Fragment . . . . . . . . . . . . . . . . . . . 5 3.6. Type 12 - Fragment . . . . . . . . . . . . . . . . . . . 6
3.7. Type 13 - Flow Label (new) . . . . . . . . . . . . . . . 6 3.7. Type 13 - Flow Label (new) . . . . . . . . . . . . . . . 6
3.8. Encoding Example . . . . . . . . . . . . . . . . . . . . 6 3.8. Encoding Example . . . . . . . . . . . . . . . . . . . . 7
4. Ordering of Flow Specifications . . . . . . . . . . . . . . . 8 4. Ordering of Flow Specifications . . . . . . . . . . . . . . . 8
5. Validation Procedure . . . . . . . . . . . . . . . . . . . . 8 5. Validation Procedure . . . . . . . . . . . . . . . . . . . . 9
6. IPv6 Traffic Filtering Action changes . . . . . . . . . . . . 8 6. IPv6 Traffic Filtering Action changes . . . . . . . . . . . . 9
6.1. Redirect IPv6 (rt-redirect-ipv6) Type/Sub-Type 0x80/TBD . 9 6.1. Redirect IPv6 (rt-redirect-ipv6) Type/Sub-Type 0x80/TBD . 9
7. Security Considerations . . . . . . . . . . . . . . . . . . . 9 7. Security Considerations . . . . . . . . . . . . . . . . . . . 9
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10
9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 11 8.1. Flow Spec IPv6 Component Types . . . . . . . . . . . . . 10
10. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 11 8.1.1. Registry Template . . . . . . . . . . . . . . . . . . 10
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 11 8.1.2. Registry Contents . . . . . . . . . . . . . . . . . . 10
11.1. Normative References . . . . . . . . . . . . . . . . . . 12 8.2. Extended Community Flow Spec IPv6 Actions . . . . . . . . 12
11.2. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 13 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 13
Appendix A. Example python code: flow_rule_cmp_v6 . . . . . . . 13 10. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 13
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 16 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 13
11.1. Normative References . . . . . . . . . . . . . . . . . . 13
11.2. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Appendix A. Example python code: flow_rule_cmp_v6 . . . . . . . 14
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18
1. Introduction 1. Introduction
The growing amount of IPv6 traffic in private and public networks The growing amount of IPv6 traffic in private and public networks
requires the extension of tools used in the IPv4 only networks to be requires the extension of tools used in IPv4-only networks to be also
also capable of supporting IPv6 data packets. capable of supporting IPv6 data packets.
In this document authors analyze the differences of IPv6 [RFC8200] This document analyzes the differences of IPv6 [RFC8200] flows
flows description from those of traditional IPv4 packets and propose description from those of traditional IPv4 packets and propose a
subset of new encoding formats to enable Dissemination of Flow subset of new Border Gateway Protocol [RFC4271] encoding formats to
Specification Rules [I-D.ietf-idr-rfc5575bis] for IPv6. enable Dissemination of Flow Specification Rules
[I-D.ietf-idr-rfc5575bis] for IPv6.
This specification should be treated as an extension of base This specification is an extension of the base
[I-D.ietf-idr-rfc5575bis] specification and not its replacement. It [I-D.ietf-idr-rfc5575bis]. It only defines the delta changes
only defines the delta changes required to support IPv6 while all required to support IPv6 while all other definitions and operation
other definitions and operation mechanisms of Dissemination of Flow mechanisms of Dissemination of Flow Specification Rules will remain
Specification Rules will remain in the main specification and will in the main specification and will not be repeated here.
not be repeated here.
1.1. Definitions of Terms Used in This Memo 1.1. Definitions of Terms Used in This Memo
AFI - Address Family Identifier. AFI - Address Family Identifier.
AS - Autonomous System. AS - Autonomous System.
NLRI - Network Layer Reachability Information. NLRI - Network Layer Reachability Information.
SAFI - Subsequent Address Family Identifier. SAFI - Subsequent Address Family Identifier.
skipping to change at page 3, line 32 skipping to change at page 3, line 33
VRF - Virtual Routing and Forwarding instance. VRF - Virtual Routing and Forwarding instance.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP "OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
2. IPv6 Flow Specification encoding in BGP 2. IPv6 Flow Specification encoding in BGP
The [I-D.ietf-idr-rfc5575bis] defines new SAFIs 133 (Dissemination of [I-D.ietf-idr-rfc5575bis] defines SAFIs 133 (Dissemination of Flow
Flow Specification) and 134 (L3VPN Dissemination of Flow Specification) and 134 (L3VPN Dissemination of Flow Specification) in
Specification) applications in order to carry corresponding to each order to carry the corresponding Flow Specification.
such application Flow Specification.
Implementations wishing to exchange IPv6 Flow Specifications MUST use Implementations wishing to exchange IPv6 Flow Specifications MUST use
BGP's Capability Advertisement facility to exchange the Multiprotocol BGP's Capability Advertisement facility to exchange the Multiprotocol
Extension Capability Code (Code 1) as defined in [RFC4760]. While Extension Capability Code (Code 1) as defined in [RFC4760]. The
[I-D.ietf-idr-rfc5575bis] specifies Flow Specification for IPv4 (AFI, SAFI) pair carried in the Multiprotocol Extension Capability
(AFI=1) only, the (AFI, SAFI) pair carried in the Multiprotocol MUST be: (AFI=2, SAFI=133) for IPv6 Flow Specification, and (AFI=2,
Extension Capability MUST be: (AFI=2, SAFI=133) for IPv6 Flow SAFI=134) for VPNv6 Flow Specification.
Specification, and (AFI=2, SAFI=134) for VPNv6 Flow Specification.
For both SAFIs the indication to which address family they are
referring to will be recognized by AFI value (AFI=1 for IPv4 or
VPNv4, AFI=2 for IPv6 and VPNv6 respectively).
It needs to be observed that such choice of proposed encoding is
compatible with filter validation against routing reachability
information as described in Section 6 of [I-D.ietf-idr-rfc5575bis].
3. IPv6 Flow Specification components 3. IPv6 Flow Specification components
The following components are redefined or added for the purpose of The encoding of each of the components begins with a type field (1
accommodating the IPv6 header encoding. Unless otherwise specified octet) followed by a variable length parameter. The following
all other components defined in [I-D.ietf-idr-rfc5575bis] sections define component types and parameter encodings for IPv6.
Section 4.2.2 also apply to IPv6 Flow Specification.
Types 4, 5, 6, 9, 10 and 11, as defined in [I-D.ietf-idr-rfc5575bis],
also apply to IPv6. Note that even if the definitions are the same
(and not repeated here), the number space is managed separately
(Section 8).
3.1. Type 1 - Destination IPv6 Prefix 3.1. Type 1 - Destination IPv6 Prefix
Encoding: <type (1 octet), length (1 octet), offset (1 octet), prefix Encoding: <type (1 octet), length (1 octet), offset (1 octet),
(variable)> pattern (variable), padding(variable) >
Defines the destination prefix to match. The offset has been defined Defines the destination prefix to match. The offset has been defined
to allow for flexible matching on part of the IPv6 address where it to allow for flexible matching on part of the IPv6 address where it
is required to skip (don't care) of N first bits of the address. is required to skip (don't care) of N first bits of the address.
This can be especially useful where part of the IPv6 address consists This can be especially useful where part of the IPv6 address consists
of an embedded IPv4 address and matching needs to happen only on the of an embedded IPv4 address and matching needs to happen only on the
embedded IPv4 address. The encoded prefix contains enough octets for embedded IPv4 address. The encoded pattern contains enough octets
the bits used in matching (length minus offset bits). for the bits used in matching (length minus offset bits).
length - The length field indicates the N-th leftmost bit in the
address where bitwise pattern matching stops.
offset - The offset field indicates the number of leftmost address
bits to skip before bitwise pattern matching starts.
pattern - Contains the matching pattern. The length of the pattern
is defined by the number of bits needed for pattern matching
(length minus offset).
padding - The minimum number of bits required to pad the component
to an octet boundary. Padding bits MUST be 0 on encoding and MUST
be ignored on decoding.
Length minus offset must always be 0 or more, otherwise this
component is malformed.
3.2. Type 2 - Source IPv6 Prefix 3.2. Type 2 - Source IPv6 Prefix
Encoding: <type (1 octet), length (1 octet), offset (1 octet), prefix Encoding: <type (1 octet), length (1 octet), offset (1 octet),
(variable)> pattern (variable), padding(variable) >
Defines the source prefix to match. The length, offset and prefix Defines the source prefix to match. The length, offset, pattern and
are the same as in Section 3.1 padding are the same as in Section 3.1
3.3. Type 3 - Next Header 3.3. Type 3 - Upper-Layer Protocol
Encoding: <type (1 octet), [numeric_op, value]+> Encoding: <type (1 octet), [numeric_op, value]+>
Contains a list of {numeric_op, value} pairs that are used to match Contains a list of {numeric_op, value} pairs that are used to match
the last Next Header ([RFC8200] Section 3) value octet in IPv6 the first Next Header value octet in IPv6 packets that is not an
packets. extension header and thus indicates that the next item in the packet
is the corresponding upper-layer header (see [RFC8200] Section 4).
This component uses the Numeric Operator (numeric_op) described in This component uses the Numeric Operator (numeric_op) described in
[I-D.ietf-idr-rfc5575bis] Section 4.2.1.1. Type 3 component values [I-D.ietf-idr-rfc5575bis] Section 4.2.1.1. Type 3 component values
SHOULD be encoded as single byte (numeric_op len=00). SHOULD be encoded as single octet (numeric_op len=00).
Note: While IPv6 allows for more then one Next Header field in the Note: While IPv6 allows for more than one Next Header field in the
packet the main goal of Type 3 flow specification component is to packet, the main goal of the Type 3 Flow Specification component is
match on the subsequent IP protocol value. Therefore the definition to match on the first upper-layer IP protocol value. Therefore the
is limited to match only on last Next Header field in the packet. definition is limited to match only on this specific Next Header
field in the packet.
3.4. Type 7 - ICMPv6 type 3.4. Type 7 - ICMPv6 Type
Encoding: <type (1 octet), [numeric_op, value]+> Encoding: <type (1 octet), [numeric_op, value]+>
Defines a list of {numeric_op, value} pairs used to match the type Defines a list of {numeric_op, value} pairs used to match the type
field of an ICMPv6 packet (see also [RFC4443] Section 2.1). field of an ICMPv6 packet (see also [RFC4443] Section 2.1).
This component uses the Numeric Operator (numeric_op) described in This component uses the Numeric Operator (numeric_op) described in
[I-D.ietf-idr-rfc5575bis] Section 4.2.1.1. Type 7 component values [I-D.ietf-idr-rfc5575bis] Section 4.2.1.1. Type 7 component values
SHOULD be encoded as single byte (numeric_op len=00). SHOULD be encoded as single octet (numeric_op len=00).
In case of the presence of the ICMPv6 type component only ICMPv6 In case of the presence of the ICMPv6 Type component only ICMPv6
packets can match the entire Flow Specification. The ICMPv6 type packets can match the entire Flow Specification. The ICMPv6 Type
component, if present, never matches when the packet's last Next component, if present, never matches when the packet's upper-layer IP
Header field value is not 58 (ICMPv6), if the packet is fragmented protocol value is not 58 (ICMPv6), if the packet is fragmented and
and this is not the first fragment, or if the system is unable to this is not the first fragment, or if the system is unable to locate
locate the transport header. Different implementations may or may the transport header. Different implementations may or may not be
not be able to decode the transport header. able to decode the transport header.
3.5. Type 8 - ICMPv6 code 3.5. Type 8 - ICMPv6 Code
Encoding: <type (1 octet), [numeric_op, value]+> Encoding: <type (1 octet), [numeric_op, value]+>
Defines a list of {numeric_op, value} pairs used to match the code Defines a list of {numeric_op, value} pairs used to match the code
field of an ICMPv6 packet (see also [RFC4443] Section 2.1). field of an ICMPv6 packet (see also [RFC4443] Section 2.1).
This component uses the Numeric Operator (numeric_op) described in This component uses the Numeric Operator (numeric_op) described in
[I-D.ietf-idr-rfc5575bis] Section 4.2.1.1. Type 8 component values [I-D.ietf-idr-rfc5575bis] Section 4.2.1.1. Type 8 component values
SHOULD be encoded as single byte (numeric_op len=00). SHOULD be encoded as single octet (numeric_op len=00).
In case of the presence of the ICMPv6 code component only ICMPv6 In case of the presence of the ICMPv6 Code component only ICMPv6
packets can match the entire Flow Specification. The ICMPv6 code packets can match the entire Flow Specification. The ICMPv6 code
component, if present, never matches when the packet's last Next component, if present, never matches when the packet's upper-layer IP
Header field value is not 58 (ICMPv6), if the packet is fragmented protocol value is not 58 (ICMPv6), if the packet is fragmented and
and this is not the first fragment, or if the system is unable to this is not the first fragment, or if the system is unable to locate
locate the transport header. Different implementations may or may the transport header. Different implementations may or may not be
not be able to decode the transport header. able to decode the transport header.
3.6. Type 12 - Fragment 3.6. Type 12 - Fragment
Encoding: <type (1 octet), [bitmask_op, bitmask]+> Encoding: <type (1 octet), [bitmask_op, bitmask]+>
Defines a list of {bitmask_op, bitmask} pairs used to match specific Defines a list of {bitmask_op, bitmask} pairs used to match specific
IP fragments. IP fragments.
This component uses the Bitmask Operator (bitmask_op) described in This component uses the Bitmask Operator (bitmask_op) described in
[I-D.ietf-idr-rfc5575bis] Section 4.2.1.2. The Type 12 component [I-D.ietf-idr-rfc5575bis] Section 4.2.1.2. The Type 12 component
bitmask MUST be encoded as single byte bitmask (bitmask_op len=00). bitmask MUST be encoded as single octet bitmask (bitmask_op len=00).
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
| 0 | 0 | 0 | 0 |LF |FF |IsF| 0 | | 0 | 0 | 0 | 0 |LF |FF |IsF| 0 |
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
Figure 1: Fragment Bitmask Operand Figure 1: Fragment Bitmask Operand
Bitmask values: Bitmask values:
skipping to change at page 6, line 42 skipping to change at page 7, line 9
This component uses the Numeric Operator (numeric_op) described in This component uses the Numeric Operator (numeric_op) described in
[I-D.ietf-idr-rfc5575bis] Section 4.2.1.1. Type 13 component values [I-D.ietf-idr-rfc5575bis] Section 4.2.1.1. Type 13 component values
SHOULD be encoded as 1-, 2-, or 4-byte quantities (numeric_op len=00, SHOULD be encoded as 1-, 2-, or 4-byte quantities (numeric_op len=00,
len=01 or len=10). len=01 or len=10).
3.8. Encoding Example 3.8. Encoding Example
3.8.1. Example 1 3.8.1. Example 1
The following example demonstrates the prefix encoding for: "all The following example demonstrates the prefix encoding for: "packets
packets to ::1234:5678:9A00:0/64-104 from 100::/8 and port 25". from ::1234:5678:9A00:0/64-104 to 2001:DB8::/32 and upper-layer-
protocol tcp".
+--------+-------------------------+-------------+----------+ +--------+----------------------+-------------------------+----------+
| length | destination | source | port | | length | destination | source | ul-proto |
+--------+-------------------------+-------------+----------+ +--------+----------------------+-------------------------+----------+
| 0x0f | 01 68 40 12 34 56 78 9A | 02 08 00 01 | 04 81 19 | | 0x12 | 01 20 00 20 01 0D B8 | 02 68 40 12 34 56 78 9A | 03 81 06 |
+--------+-------------------------+-------------+----------+ +--------+----------------------+-------------------------+----------+
Decoded: Decoded:
+-------+------------+------------------------------+ +-------+------------+-------------------------------+
| Value | | | | Value | | |
+-------+------------+------------------------------+ +-------+------------+-------------------------------+
| 0x0f | length | 16 octets (len<240 1-octet) | | 0x12 | length | 18 octets (len<240 1-octet) |
| 0x01 | type | Type 1 - Dest. IPv6 Prefix | | 0x01 | type | Type 1 - Dest. IPv6 Prefix |
| 0x68 | length | 104 bit | | 0x20 | length | 32 bit |
| 0x40 | offset | 64 bit | | 0x00 | offset | 0 bit |
| 0x12 | prefix | | | 0x20 | pattern | |
| 0x34 | prefix | | | 0x01 | pattern | |
| 0x56 | prefix | | | 0x0D | pattern | |
| 0x78 | prefix | | | 0xB8 | pattern | (no padding needed) |
| 0x9A | prefix | | | 0x02 | type | Type 2 - Source IPv6 Prefix |
| 0x02 | type | Type 2 - Source IPv6 Prefix | | 0x68 | length | 104 bit |
| 0x08 | length | 8 bit | | 0x40 | offset | 64 bit |
| 0x00 | offset | 0 bit | | 0x12 | pattern | |
| 0x01 | prefix | | | 0x34 | pattern | |
| 0x04 | type | Type 4 - Port | | 0x56 | pattern | |
| 0x81 | numeric_op | end-of-list, value size=1, = | | 0x78 | pattern | |
| 0x19 | value | 25 | | 0x9A | pattern | (no padding needed) |
+-------+------------+------------------------------+ | 0x03 | type | Type 3 - upper-layer-proto |
| 0x81 | numeric_op | end-of-list, value size=1, == |
| 0x06 | value | 06 |
+-------+------------+-------------------------------+
This constitutes a NLRI with a NLRI length of 16 octets. This constitutes a NLRI with a NLRI length of 18 octets.
Neither for the destination prefix pattern (length - offset = 32 bit)
nor for the source prefix pattern (length - offset = 40 bit) any
padding is needed (both patterns end on a octet boundary).
3.8.2. Example 2 3.8.2. Example 2
The following example demonstrates the prefix encoding for: "all The following example demonstrates the prefix encoding for: "all
packets to ::1234:5678:9A00:0/65-104". packets from ::1234:5678:9A00:0/65-104 to 2001:DB8::/32".
+--------+-------------------------+ +--------+----------------------+-------------------------+
| length | destination | | length | destination | source |
+--------+-------------------------+ +--------+----------------------+-------------------------+
| 0x08 | 01 68 41 24 68 ac f1 34 | | 0x0f | 01 20 00 20 01 0D B8 | 02 68 41 24 68 ac f1 34 |
+--------+-------------------------+ +--------+----------------------+-------------------------+
Decoded: Decoded:
+-------+------------+------------------------------+ +-------+-------------+-------------------------------+
| Value | | | | Value | | |
+-------+------------+------------------------------+ +-------+-------------+-------------------------------+
| 0x08 | length | 8 octets (len<240 1-octet) | | 0x0f | length | 15 octets (len<240 1-octet) |
| 0x01 | type | Type 1 - Dest. IPv6 Prefix | | 0x01 | type | Type 1 - Dest. IPv6 Prefix |
| 0x68 | length | 104 bit | | 0x20 | length | 32 bit |
| 0x41 | offset | 65 bit | | 0x00 | offset | 0 bit |
| 0x24 | prefix | starting with the 66ths bit | | 0x20 | pattern | |
| 0x68 | prefix | | | 0x01 | pattern | |
| 0xac | prefix | | | 0x0D | pattern | |
| 0xf1 | prefix | | | 0xB8 | pattern | (no padding needed) |
| 0x34 | prefix | | | 0x02 | type | Type 2 - Source IPv6 Prefix |
+-------+------------+------------------------------+ | 0x68 | length | 104 bit |
| 0x41 | offset | 65 bit |
| 0x24 | pattern | |
| 0x68 | pattern | |
| 0xac | pattern | |
| 0xf1 | pattern | |
| 0x34 | pattern/pad | (contains 1 bit padding) |
+-------+-------------+-------------------------------+
This constitutes a NLRI with a NLRI length of 8 octets. This constitutes a NLRI with a NLRI length of 15 octets.
The source prefix pattern is 104 - 65 = 39 bits in length. After the
pattern one bit of padding needs to be added so that the component
ends on a octet boundary. However, only the first 39 bits are
actually used for bitwise pattern matching starting with a 65 bit
offset from the topmost bit of the address.
4. Ordering of Flow Specifications 4. Ordering of Flow Specifications
The definition for the order of traffic filtering rules from The definition for the order of traffic filtering rules from
[I-D.ietf-idr-rfc5575bis] Section 5.1 can be reused with new [I-D.ietf-idr-rfc5575bis] Section 5.1 is reused with new
consideration for the IPv6 prefix offset. As long as the offsets are consideration for the IPv6 prefix offset. As long as the offsets are
equal, the comparison is the same, retaining longest-prefix-match equal, the comparison is the same, retaining longest-prefix-match
semantics. If the offsets are not equal, the lowest offset has semantics. If the offsets are not equal, the lowest offset has
precedence, as this flow matches the most significant bit. precedence, as this flow matches the most significant bit.
The code in Appendix A shows a Python3 implementation of the The code in Appendix A shows a Python3 implementation of the
resulting comparison algorithm. The full code was tested with Python resulting comparison algorithm. The full code was tested with Python
3.7.2 and can be obtained at https://github.com/stoffi92/draft-ietf- 3.7.2 and can be obtained at https://github.com/stoffi92/draft-ietf-
idr-flow-spec-v6/tree/master/flowspec-cmp [1]. idr-flow-spec-v6/tree/master/flowspec-cmp [1].
skipping to change at page 8, line 50 skipping to change at page 9, line 27
a) A destination prefix component with offset=0 is embedded in the a) A destination prefix component with offset=0 is embedded in the
Flow Specification Flow Specification
6. IPv6 Traffic Filtering Action changes 6. IPv6 Traffic Filtering Action changes
Traffic Filtering Actions from [I-D.ietf-idr-rfc5575bis] Section 7 Traffic Filtering Actions from [I-D.ietf-idr-rfc5575bis] Section 7
can also be applied to IPv6 Flow Specifications. To allow an IPv6 can also be applied to IPv6 Flow Specifications. To allow an IPv6
address specific route-target, a new Traffic Filtering Action IPv6 address specific route-target, a new Traffic Filtering Action IPv6
address specific extended community is specified in Section 6.1 address specific extended community is specified in Section 6.1
below: below.
6.1. Redirect IPv6 (rt-redirect-ipv6) Type/Sub-Type 0x80/TBD 6.1. Redirect IPv6 (rt-redirect-ipv6) Type/Sub-Type 0x80/TBD
The redirect IPv6 address specific extended community allows the The redirect IPv6 address specific extended community allows the
traffic to be redirected to a VRF routing instance that lists the traffic to be redirected to a VRF routing instance that lists the
specified IPv6 address specific route-target in its import policy. specified IPv6 address specific route-target in its import policy.
If several local instances match this criteria, the choice between If several local instances match this criteria, the choice between
them is a local matter (for example, the instance with the lowest them is a local matter (for example, the instance with the lowest
Route Distinguisher value can be elected). Route Distinguisher value can be elected).
skipping to change at page 9, line 25 skipping to change at page 9, line 49
specific Route Target extended community [RFC5701] Section 2 with the specific Route Target extended community [RFC5701] Section 2 with the
high-order octet of the Type always set to 0x80 and the Sub-Type high-order octet of the Type always set to 0x80 and the Sub-Type
always TBD. always TBD.
Interferes with: All BGP Flow Specification redirect Traffic Interferes with: All BGP Flow Specification redirect Traffic
Filtering Actions (with itself and those specified in Filtering Actions (with itself and those specified in
[I-D.ietf-idr-rfc5575bis] Section 7.4). [I-D.ietf-idr-rfc5575bis] Section 7.4).
7. Security Considerations 7. Security Considerations
No new security issues are introduced to the BGP protocol by this This document extends the functionality in [I-D.ietf-idr-rfc5575bis]
specification over the security considerations in to be applicable to IPv6 data packets. The same Security
[I-D.ietf-idr-rfc5575bis] Considerations from [I-D.ietf-idr-rfc5575bis] now also apply to IPv6
networks. Otherwise, no new security issues are added to the BGP
protocol.
8. IANA Considerations 8. IANA Considerations
This section complies with [RFC7153] This section complies with [RFC7153].
IANA is requested to create and maintain a new registry entitled: 8.1. Flow Spec IPv6 Component Types
"Flow Spec IPv6 Component Types" containing the initial entries as
specified in Table 1.
+-------+-------------------------+-----------------+ IANA has created and maintains a registry entitled "Flow Spec
| Value | Name | Reference | Component Types". IANA is requested to add [this document] to the
+-------+-------------------------+-----------------+ reference for this registry. Furthermore the registry should be
| 1 | Destination IPv6 Prefix | [this document] | rewritten to also contain the IPv6 Flow Specification Component Types
| 2 | Source IPv6 Prefix | [this document] | as described below.
| 3 | Next Header | [this document] |
| 4 | Port | [this document] |
| 5 | Destination port | [this document] |
| 6 | Source port | [this document] |
| 7 | ICMPv6 type | [this document] |
| 8 | ICMPv6 code | [this document] |
| 9 | TCP flags | [this document] |
| 10 | Packet length | [this document] |
| 11 | DSCP | [this document] |
| 12 | Fragment | [this document] |
| 13 | Flow Label | [this document] |
+-------+-------------------------+-----------------+
Table 1: Registry: Flow Spec IPv6 Component Types 8.1.1. Registry Template
In order to manage the limited number space and accommodate several Type Value:
usages, the following policies defined by [RFC8126] are used: Contains the assigned Flow Specification component type value.
+--------------+------------------------+ IPv4 Name:
| Type Values | Policy | Contains the associated IPv4 Flow Specification component name
+--------------+------------------------+ as specified in [I-D.ietf-idr-rfc5575bis].
| 0 | Reserved |
| [1 .. 127] | Specification Required |
| [128 .. 254] | Expert Review |
| 255 | Reserved |
+--------------+------------------------+
Table 2: Flow Spec IPv6 Component Types Registration Policy IPv6 Name:
Contains the associated IPv6 Flow Specification component name
as specified in this document.
Guidance for Experts: Reference:
128-254 requires Expert Review as the registration policy. The Contains referenced to the specifications.
Experts are expected to check the clarity of purpose and use of
the requested code points. The Experts must also verify that 8.1.2. Registry Contents
any specification produced in the IETF that requests one of
these code points has been made available for review by the IDR + Type Value: 0
working group and that any specification produced outside the + IPv4 Name: Reserved
IETF does not conflict with work that is active or already + IPv6 Name: Reserved
published within the IETF. It must be pointed out that + Reference: [I-D.ietf-idr-rfc5575bis]
introducing new component types may break interoperability with
existing implementations of this protocol. + Type Value: 1
+ IPv4 Name: Destination Prefix
+ IPv6 Name: Destination IPv6 Prefix
+ Reference: [I-D.ietf-idr-rfc5575bis] [this document]
+ Type Value: 2
+ IPv4 Name: Source Prefix
+ IPv6 Name: Source IPv6 Prefix
+ Reference: [I-D.ietf-idr-rfc5575bis] [this document]
+ Type Value: 3
+ IPv4 Name: IP Protocol
+ IPv6 Name: Upper-Layer Protocol
+ Reference: [I-D.ietf-idr-rfc5575bis] [this document]
+ Type Value: 4
+ IPv4 Name: Port
+ IPv6 Name: Port
+ Reference: [I-D.ietf-idr-rfc5575bis]
+ Type Value: 5
+ IPv4 Name: Destination Port
+ IPv6 Name: Destination Port
+ Reference: [I-D.ietf-idr-rfc5575bis]
+ Type Value: 6
+ IPv4 Name: Source Port
+ IPv6 Name: Source Port
+ Reference: [I-D.ietf-idr-rfc5575bis]
+ Type Value: 7
+ IPv4 Name: ICMP Type
+ IPv6 Name: ICMPv6 Type
+ Reference: [I-D.ietf-idr-rfc5575bis] [this document]
+ Type Value: 8
+ IPv4 Name: ICMP Code
+ IPv6 Name: ICMPv6 Code
+ Reference: [I-D.ietf-idr-rfc5575bis] [this document]
+ Type Value: 9
+ IPv4 Name: TCP flags
+ IPv6 Name: TCP flags
+ Reference: [I-D.ietf-idr-rfc5575bis]
+ Type Value: 10
+ IPv4 Name: Packet length
+ IPv6 Name: Packet length
+ Reference: [I-D.ietf-idr-rfc5575bis]
+ Type Value: 11
+ IPv4 Name: DSCP
+ IPv6 Name: DSCP
+ Reference: [I-D.ietf-idr-rfc5575bis]
+ Type Value: 12
+ IPv4 Name: Fragment
+ IPv6 Name: Fragment
+ Reference: [I-D.ietf-idr-rfc5575bis] [this document]
+ Type Value: 13
+ IPv4 Name: Unassigned
+ IPv6 Name: Flow Label
+ Reference: [this document]
+ Type Value: 14-254
+ IPv4 Name: Unassigned
+ IPv6 Name: Unassigned
+ Reference:
+ Type Value: 255
+ IPv4 Name: Reserved
+ IPv6 Name: Reserved
+ Reference: [I-D.ietf-idr-rfc5575bis]
8.2. Extended Community Flow Spec IPv6 Actions
IANA maintains a registry entitled "Generic Transitive Experimental IANA maintains a registry entitled "Generic Transitive Experimental
Use Extended Community Sub-Types". For the purpose of this work, Use Extended Community Sub-Types". For the purpose of this work,
IANA is requested to assign a new value: IANA is requested to assign a new value:
+------------+----------------------------------------+-------------+ +----------------+--------------------------------+-----------------+
| Sub-Type | Name | Reference | | Sub-Type Value | Name | Reference |
| Value | | | +----------------+--------------------------------+-----------------+
+------------+----------------------------------------+-------------+ | TBD | Flow spec rt-redirect-ipv6 | [this document] |
| TBD | Flow spec rt-redirect-ipv6 | [this | | | format | |
| | format | document] | +----------------+--------------------------------+-----------------+
+------------+----------------------------------------+-------------+
Table 3: Registry: Generic Transitive Experimental Use Extended Table 1: Registry: Generic Transitive Experimental Use Extended
Community Sub-Types Community Sub-Types
9. Acknowledgements 9. Acknowledgements
Authors would like to thank Pedro Marques, Hannes Gredler and Bruno Authors would like to thank Pedro Marques, Hannes Gredler, Bruno
Rijsman, Brian Carpenter, and Thomas Mangin for their valuable input. Rijsman, Brian Carpenter, and Thomas Mangin for their valuable input.
10. Contributors 10. Contributors
Danny McPherson Danny McPherson
Verisign, Inc. Verisign, Inc.
Email: dmcpherson@verisign.com Email: dmcpherson@verisign.com
Burjiz Pithawala Burjiz Pithawala
skipping to change at page 12, line 4 skipping to change at page 13, line 31
Andy Karch Andy Karch
Cisco Systems Cisco Systems
170 West Tasman Drive 170 West Tasman Drive
San Jose, CA 95134 San Jose, CA 95134
USA USA
Email: akarch@cisco.com Email: akarch@cisco.com
11. References 11. References
11.1. Normative References 11.1. Normative References
[I-D.ietf-idr-rfc5575bis] [I-D.ietf-idr-rfc5575bis]
Loibl, C., Hares, S., Raszuk, R., McPherson, D., and M. Loibl, C., Hares, S., Raszuk, R., McPherson, D., and M.
Bacher, "Dissemination of Flow Specification Rules", Bacher, "Dissemination of Flow Specification Rules",
draft-ietf-idr-rfc5575bis-25 (work in progress), May 2020. draft-ietf-idr-rfc5575bis-26 (work in progress), August
2020.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A
Border Gateway Protocol 4 (BGP-4)", RFC 4271, Border Gateway Protocol 4 (BGP-4)", RFC 4271,
DOI 10.17487/RFC4271, January 2006, DOI 10.17487/RFC4271, January 2006,
<https://www.rfc-editor.org/info/rfc4271>. <https://www.rfc-editor.org/info/rfc4271>.
 End of changes. 57 change blocks. 
202 lines changed or deleted 299 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/