A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.rfc-editor.org/rfc/rfc8956.xml below:

Introduction The growing amount of IPv6 traffic in private and public networks requires the extension of tools used in IPv4-only networks to also support IPv6 data packets. This document analyzes the differences between describing IPv6 flows and those of IPv4 packets. It specifies new Border Gateway Protocol encoding formats to enable "Dissemination of Flow Specification Rules" for IPv6. This specification is an extension of the base established in . It only defines the delta changes required to support IPv6, while all other definitions and operation mechanisms of "Dissemination of Flow Specification Rules" will remain in the main specification and will not be repeated here. Definitions of Terms Used in This Memo
AFI:
Address Family Identifier
AS:
Autonomous System
NLRI:
Network Layer Reachability Information
SAFI:
Subsequent Address Family Identifier
VRF:
Virtual Routing and Forwarding
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 when, and only when, they appear in all capitals, as shown here. IPv6 Flow Specification Encoding in BGP defines SAFIs 133 (Dissemination of Flow Specification rules) and 134 (L3VPN Dissemination of Flow Specification rules) in order to carry the corresponding Flow Specification. Implementations wishing to exchange IPv6 Flow Specifications MUST use BGP's Capability Advertisement facility to exchange the Multiprotocol Extension Capability Code (Code 1), as defined in . The (AFI, SAFI) pair carried in the Multiprotocol Extension Capability MUST be (AFI=2, SAFI=133) for IPv6 Flow Specification rules and (AFI=2, SAFI=134) for L3VPN Dissemination of Flow Specification rules. IPv6 Flow Specification Components The encoding of each of the components begins with a Type field (1 octet) followed by a variable length parameter. The following sections define component types and parameter encodings for IPv6. Types 4 (Port), 5 (Destination Port), 6 (Source Port), 9 (TCP Flags), 10 (Packet Length), and 11 (DSCP), as defined in , also apply to IPv6. Note that IANA has updated the "Flow Spec Component Types" registry in order to contain both IPv4 and IPv6 Flow Specification component type numbers in a single registry ( ). Type 1 - Destination IPv6 Prefix
Encoding:
<type (1 octet), length (1 octet), offset (1 octet), pattern (variable), padding (variable) >
This defines the destination prefix to match. The offset has been defined to allow for flexible matching to portions of an IPv6 address where one is required to skip over the first N bits of the address. (These bits skipped are often indicated as "don't care" bits.) 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 embedded IPv4 address. The encoded pattern contains enough octets for the bits used in matching (length minus offset bits).
length:
This indicates the N-th most significant bit in the address where bitwise pattern matching stops.
offset:
This indicates the number of most significant address bits to skip before bitwise pattern matching starts.
pattern:
This contains the matching pattern. The length of the pattern is defined by the number of bits needed for pattern matching (length minus offset).
padding:
This contains 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.
If length = 0 and offset = 0, this component matches every address; otherwise, length MUST be in the range offset < length < 129 or the component is malformed. Note: This Flow Specification component can be represented by the notation ipv6address/length if offset is 0 or ipv6address/offset-length. The ipv6address in this notation is the textual IPv6 representation of the pattern shifted to the right by the number of offset bits. See also . Type 2 - Source IPv6 Prefix
Encoding:
<type (1 octet), length (1 octet), offset (1 octet), pattern (variable), padding (variable) >
This defines the source prefix to match. The length, offset, pattern, and padding are the same as in . Type 3 - Upper-Layer Protocol
Encoding:
<type (1 octet), [numeric_op, value]+>
This contains a list of {numeric_op, value} pairs that are used to match the first Next Header value octet in IPv6 packets that is not an extension header and thus indicates that the next item in the packet is the corresponding upper-layer header (see ). This component uses the Numeric Operator (numeric_op) described in . Type 3 component values SHOULD be encoded as a single octet (numeric_op len=00). Note: While IPv6 allows for more than one Next Header field in the packet, the main goal of the Type 3 Flow Specification component is to match on the first upper-layer IP protocol value. Therefore, the definition is limited to match only on this specific Next Header field in the packet. Type 7 - ICMPv6 Type
Encoding:
<type (1 octet), [numeric_op, value]+>
This defines a list of {numeric_op, value} pairs used to match the Type field of an ICMPv6 packet (see also ). This component uses the Numeric Operator (numeric_op) described in . Type 7 component values SHOULD be encoded as a single octet (numeric_op len=00). In case of the presence of the ICMPv6 type component, only ICMPv6 packets can match the entire Flow Specification. The ICMPv6 type component, if present, never matches when the packet's upper-layer IP protocol value is not 58 (ICMPv6), if the packet is fragmented and this is not the first fragment, or if the system is unable to locate the transport header. Different implementations may or may not be able to decode the transport header. Type 8 - ICMPv6 Code
Encoding:
<type (1 octet), [numeric_op, value]+>
This defines a list of {numeric_op, value} pairs used to match the code field of an ICMPv6 packet (see also ). This component uses the Numeric Operator (numeric_op) described in . Type 8 component values SHOULD be encoded as a single octet (numeric_op len=00). In case of the presence of the ICMPv6 code component, only ICMPv6 packets can match the entire Flow Specification. The ICMPv6 code component, if present, never matches when the packet's upper-layer IP protocol value is not 58 (ICMPv6), if the packet is fragmented and this is not the first fragment, or if the system is unable to locate the transport header. Different implementations may or may not be able to decode the transport header. Type 12 - Fragment
Encoding:
<type (1 octet), [bitmask_op, bitmask]+>
This defines a list of {bitmask_op, bitmask} pairs used to match specific IP fragments. This component uses the Bitmask Operator (bitmask_op) described in . The Type 12 component bitmask MUST be encoded as a single octet bitmask (bitmask_op len=00). Fragment Bitmask Operand 0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ | 0 | 0 | 0 | 0 |LF |FF |IsF| 0 | +---+---+---+---+---+---+---+---+ Bitmask values:
IsF:
Is a fragment other than the first -- match if IPv6 Fragment Header () Fragment Offset is not 0
FF:
First fragment -- match if IPv6 Fragment Header () Fragment Offset is 0 AND M flag is 1
LF:
Last fragment -- match if IPv6 Fragment Header () Fragment Offset is not 0 AND M flag is 0
0:
MUST be set to 0 on NLRI encoding and MUST be ignored during decoding
Type 13 - Flow Label (new)
Encoding:
<type (1 octet), [numeric_op, value]+>
This contains a list of {numeric_op, value} pairs that are used to match the 20-bit Flow Label IPv6 header field ( ). This component uses the Numeric Operator (numeric_op) described in . Type 13 component values SHOULD be encoded as 4-octet quantities (numeric_op len=10). Encoding Examples Example 1 The following example demonstrates the prefix encoding for packets from ::1234:5678:9a00:0/64-104 to 2001:db8::/32 and upper-layer protocol tcp. len destination source ul-proto 0x12 01 20 00 20 01 0d bb 02 68 40 12 34 56 78 9a 03 81 06 Decoded: Value 0x12 length 18 octets (if len<240, 1 octet) 0x01 type Type 1 - Dest. IPv6 Prefix 0x20 length 32 bits 0x00 offset 0 bits 0x20 pattern 0x01 pattern 0x0d pattern 0xb8 pattern (no padding needed) 0x02 type Type 2 - Source IPv6 Prefix 0x68 length 104 bits 0x40 offset 64 bits 0x12 pattern 0x34 pattern 0x56 pattern 0x78 pattern 0x9a pattern (no padding needed) 0x03 type Type 3 - Upper-Layer Protocol 0x81 numeric_op end-of-list, value size=1, == 0x06 value 06 This constitutes an NLRI with an NLRI length of 18 octets. Padding is not needed either for the destination prefix pattern (length - offset = 32 bits) or for the source prefix pattern (length - offset = 40 bits), as both patterns end on an octet boundary. Example 2 The following example demonstrates the prefix encoding for all packets from ::1234:5678:9a00:0/65-104 to 2001:db8::/32. length destination source 0x0f 01 20 00 20 01 0d b8 02 68 41 24 68 ac f1 34 Decoded: Value 0x0f length 15 octets (if len<240, 1 octet) 0x01 type Type 1 - Dest. IPv6 Prefix 0x20 length 32 bits 0x00 offset 0 bits 0x20 pattern 0x01 pattern 0x0d pattern 0xb8 pattern (no padding needed) 0x02 type Type 2 - Source IPv6 Prefix 0x68 length 104 bits 0x41 offset 65 bits 0x24 pattern 0x68 pattern 0xac pattern 0xf1 pattern 0x34 pattern/pad (contains 1 bit of padding) This constitutes an NLRI with an 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 an 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. Ordering of Flow Specifications The definition for the order of traffic filtering rules from is reused with new consideration for the IPv6 prefix offset. As long as the offsets are equal, the comparison is the same, retaining longest-prefix-match semantics. If the offsets are not equal, the lowest offset has precedence, as this Flow Specification matches the most significant bit. The code in shows a Python3 implementation of the resulting comparison algorithm. The full code was tested with Python 3.7.2 and can be obtained at . Validation Procedure The validation procedure is the same as specified in with the exception that item a) of the validation procedure should now read as follows:
  1. A destination prefix component with offset=0 is embedded in the Flow Specification
IPv6 Traffic Filtering Action Changes Traffic Filtering Actions from can also be applied to IPv6 Flow Specifications. To allow an IPv6-Address-Specific Route-Target, a new Traffic Filtering Action IPv6-Address-Specific Extended Community is specified in below. Redirect IPv6 (rt-redirect-ipv6) Type 0x000d The redirect IPv6-Address-Specific Extended Community allows the traffic to be redirected to a VRF routing instance that lists the specified IPv6-Address-Specific Route-Target in its import policy. If several local instances match this criteria, the choice between them is a local matter (for example, the instance with the lowest Route Distinguisher value can be elected). This IPv6-Address-Specific Extended Community uses the same encoding as the IPv6-Address-Specific Route-Target Extended Community ( ) with the Type value always 0x000d. The Local Administrator subfield contains a number from a numbering space that is administered by the organization to which the IP address carried in the Global Administrator subfield has been assigned by an appropriate authority. Interferes with: All BGP Flow Specification redirect Traffic Filtering Actions (with itself and those specified in ). Security Considerations This document extends the functionality in to be applicable to IPv6 data packets. The same security considerations from now also apply to IPv6 networks. describes the impact of oversized IPv6 header chains when trying to match on the transport header; also requires that the first fragment must include the upper-layer header, but there could be wrongly formatted packets not respecting . IPv6 Flow Specification component Type 3 ( ) will not be enforced for those illegal packets. Moreover, there are hardware limitations in several routers ( ) that may make it impossible to enforce a policy signaled by a Type 3 Flow Specification component or Flow Specification components that match on upper-layer properties of the packet. IANA Considerations This section complies with . Flow Spec IPv6 Component Types IANA has created and maintains a registry entitled "Flow Spec Component Types". IANA has added this document as a reference for that registry. Furthermore, the registry has been updated to also contain the IPv6 Flow Specification Component Types as described below. The registration procedure remains unchanged. Registry Template
Type Value:
contains the assigned Flow Specification component type value
IPv4 Name:
contains the associated IPv4 Flow Specification component name as specified in
IPv6 Name:
contains the associated IPv6 Flow Specification component name as specified in this document
Reference:
contains references to the specifications
Registry Contents
Type Value:
0
IPv4 Name:
Reserved
IPv6 Name:
Reserved
Reference:
, RFC 8956
Type Value:
1
IPv4 Name:
Destination Prefix
IPv6 Name:
Destination IPv6 Prefix
Reference:
, RFC 8956
Type Value:
2
IPv4 Name:
Source Prefix
IPv6 Name:
Source IPv6 Prefix
Reference:
, RFC 8956
Type Value:
3
IPv4 Name:
IP Protocol
IPv6 Name:
Upper-Layer Protocol
Reference:
, RFC 8956
Type Value:
4
IPv4 Name:
Port
IPv6 Name:
Port
Reference:
, RFC 8956
Type Value:
5
IPv4 Name:
Destination Port
IPv6 Name:
Destination Port
Reference:
, RFC 8956
Type Value:
6
IPv4 Name:
Source Port
IPv6 Name:
Source Port
Reference:
, RFC 8956
Type Value:
7
IPv4 Name:
ICMP Type
IPv6 Name:
ICMPv6 Type
Reference:
, RFC 8956
Type Value:
8
IPv4 Name:
ICMP Code
IPv6 Name:
ICMPv6 Code
Reference:
, RFC 8956
Type Value:
9
IPv4 Name:
TCP Flags
IPv6 Name:
TCP Flags
Reference:
, RFC 8956
Type Value:
10
IPv4 Name:
Packet Length
IPv6 Name:
Packet Length
Reference:
, RFC 8956
Type Value:
11
IPv4 Name:
DSCP
IPv6 Name:
DSCP
Reference:
, RFC 8956
Type Value:
12
IPv4 Name:
Fragment
IPv6 Name:
Fragment
Reference:
, RFC 8956
Type Value:
13
IPv4 Name:
Unassigned
IPv6 Name:
Flow Label
Reference:
RFC 8956
Type Value:
14-254
IPv4 Name:
Unassigned
IPv6 Name:
Unassigned
Type Value:
255
IPv4 Name:
Reserved
IPv6 Name:
Reserved
Reference:
, RFC 8956
IPv6-Address-Specific Extended Community Flow Spec IPv6 Actions IANA maintains a registry entitled "Transitive IPv6-Address-Specific Extended Community Types". For the purpose of this work, IANA has assigned a new value: Transitive IPv6-Address-Specific Extended Community Types Registry Type Value Name Reference 0x000d Flow spec rt-redirect-ipv6 format RFC 8956 Normative References Key words for use in RFCs to Indicate Requirement Levels In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. A Border Gateway Protocol 4 (BGP-4) This document discusses the Border Gateway Protocol (BGP), which is an inter-Autonomous System routing protocol. The primary function of a BGP speaking system is to exchange network reachability information with other BGP systems. This network reachability information includes information on the list of Autonomous Systems (ASes) that reachability information traverses. This information is sufficient for constructing a graph of AS connectivity for this reachability from which routing loops may be pruned, and, at the AS level, some policy decisions may be enforced. BGP-4 provides a set of mechanisms for supporting Classless Inter-Domain Routing (CIDR). These mechanisms include support for advertising a set of destinations as an IP prefix, and eliminating the concept of network "class" within BGP. BGP-4 also introduces mechanisms that allow aggregation of routes, including aggregation of AS paths. This document obsoletes RFC 1771. [STANDARDS-TRACK] Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification This document describes the format of a set of control messages used in ICMPv6 (Internet Control Message Protocol). ICMPv6 is the Internet Control Message Protocol for Internet Protocol version 6 (IPv6). [STANDARDS-TRACK] Multiprotocol Extensions for BGP-4 This document defines extensions to BGP-4 to enable it to carry routing information for multiple Network Layer protocols (e.g., IPv6, IPX, L3VPN, etc.). The extensions are backward compatible - a router that supports the extensions can interoperate with a router that doesn't support the extensions. [STANDARDS-TRACK] IPv6 Address Specific BGP Extended Community Attribute Current specifications of BGP Extended Communities (RFC 4360) support the IPv4 Address Specific Extended Community, but do not support an IPv6 Address Specific Extended Community. The lack of an IPv6 Address Specific Extended Community may be a problem when an application uses the IPv4 Address Specific Extended Community, and one wants to use this application in a pure IPv6 environment. This document defines a new BGP attribute, the IPv6 Address Specific Extended Community, that addresses this problem. The IPv6 Address Specific Extended Community is similar to the IPv4 Address Specific Extended Community, except that it carries an IPv6 address rather than an IPv4 address. [STANDARDS TRACK] Implications of Oversized IPv6 Header Chains The IPv6 specification allows IPv6 Header Chains of an arbitrary size. The specification also allows options that can, in turn, extend each of the headers. In those scenarios in which the IPv6 Header Chain or options are unusually long and packets are fragmented, or scenarios in which the fragment size is very small, the First Fragment of a packet may fail to include the entire IPv6 Header Chain. This document discusses the interoperability and security problems of such traffic, and updates RFC 2460 such that the First Fragment of a packet is required to contain the entire IPv6 Header Chain. IANA Registries for BGP Extended Communities This document reorganizes the IANA registries for the type values and sub-type values of the BGP Extended Communities attribute and the BGP IPv6-Address-Specific Extended Communities attribute. This is done in order to remove interdependencies among the registries, thus making it easier for IANA to determine which codepoints are available for assignment in which registries. This document also clarifies the information that must be provided to IANA when requesting an allocation from one or more of these registries. These changes are compatible with the existing allocations and thus do not affect protocol implementations. The changes will, however, impact the "IANA Considerations" sections of future protocol specifications. This document updates RFC 4360 and RFC 5701. Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings. Internet Protocol, Version 6 (IPv6) Specification This document specifies version 6 of the Internet Protocol (IPv6). It obsoletes RFC 2460. ICMPv6 Errors for Discarding Packets Due to Processing Limits Network nodes may discard packets if they are unable to process protocol headers of packets due to processing constraints or limits. When such packets are dropped, the sender receives no indication, so it cannot take action to address the cause of discarded packets. This specification defines several new ICMPv6 errors that can be sent by a node that discards packets because it is unable to process the protocol headers. A node that receives such an ICMPv6 error may use the information to diagnose packet loss and may modify what it sends in future packets to avoid subsequent packet discards. Dissemination of Flow Specification Rules Example Python Code: flow_rule_cmp_v6 """ Copyright (c) 2020 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info). """ import itertools import collections import ipaddress EQUAL = 0 A_HAS_PRECEDENCE = 1 B_HAS_PRECEDENCE = 2 IP_DESTINATION = 1 IP_SOURCE = 2 FS_component = collections.namedtuple('FS_component', 'component_type value') class FS_IPv6_prefix_component: def __init__(self, prefix, offset=0, component_type=IP_DESTINATION): self.offset = offset self.component_type = component_type # make sure if offset != 0 that none of the # first offset bits are set in the prefix self.value = prefix if offset != 0: i = ipaddress.IPv6Interface( (self.value.network_address, offset)) if i.network.network_address != \ ipaddress.ip_address('0::0'): raise ValueError('Bits set in the offset') class FS_nlri(object): """ FS_nlri class implementation that allows sorting. By calling .sort() on an array of FS_nlri objects these will be sorted according to the flow_rule_cmp algorithm. Example: nlri = [ FS_nlri(components=[ FS_component(component_type=4, value=bytearray([0,1,2,3,4,5,6])), ]), FS_nlri(components=[ FS_component(component_type=5, value=bytearray([0,1,2,3,4,5,6])), FS_component(component_type=6, value=bytearray([0,1,2,3,4,5,6])), ]), ] nlri.sort() # sorts the array according to the algorithm """ def __init__(self, components = None): """ components: list of type FS_component """ self.components = components def __lt__(self, other): # use the below algorithm for sorting result = flow_rule_cmp_v6(self, other) if result == B_HAS_PRECEDENCE: return True else: return False def flow_rule_cmp_v6(a, b): """ Implementation of the flowspec sorting algorithm in RFC 8956. """ for comp_a, comp_b in itertools.zip_longest(a.components, b.components): # If a component type does not exist in one rule # this rule has lower precedence if not comp_a: return B_HAS_PRECEDENCE if not comp_b: return A_HAS_PRECEDENCE # Higher precedence for lower component type if comp_a.component_type < comp_b.component_type: return A_HAS_PRECEDENCE if comp_a.component_type > comp_b.component_type: return B_HAS_PRECEDENCE # component types are equal -> type-specific comparison if comp_a.component_type in (IP_DESTINATION, IP_SOURCE): if comp_a.offset < comp_b.offset: return A_HAS_PRECEDENCE if comp_a.offset > comp_b.offset: return B_HAS_PRECEDENCE # both components have the same offset # assuming comp_a.value, comp_b.value of type # ipaddress.IPv6Network # and the offset bits are reset to 0 (since they are # not represented in the NLRI) if comp_a.value.overlaps(comp_b.value): # longest prefixlen has precedence if comp_a.value.prefixlen > \ comp_b.value.prefixlen: return A_HAS_PRECEDENCE if comp_a.value.prefixlen < \ comp_b.value.prefixlen: return B_HAS_PRECEDENCE # components equal -> continue with next # component elif comp_a.value > comp_b.value: return B_HAS_PRECEDENCE elif comp_a.value < comp_b.value: return A_HAS_PRECEDENCE else: # assuming comp_a.value, comp_b.value of type # bytearray if len(comp_a.value) == len(comp_b.value): if comp_a.value > comp_b.value: return B_HAS_PRECEDENCE if comp_a.value < comp_b.value: return A_HAS_PRECEDENCE # components equal -> continue with next # component else: common = min(len(comp_a.value), len(comp_b.value)) if comp_a.value[:common] > \ comp_b.value[:common]: return B_HAS_PRECEDENCE elif comp_a.value[:common] < \ comp_b.value[:common]: return A_HAS_PRECEDENCE # the first common bytes match elif len(comp_a.value) > len(comp_b.value): return A_HAS_PRECEDENCE else: return B_HAS_PRECEDENCE return EQUAL Acknowledgments The authors would like to thank , , , , and for their valuable input. Contributors Verisign, Inc. dmcpherson@verisign.com Individual burjizp@gmail.com Cisco Systems 170 West Tasman Drive San Jose CA 95134 United States of America akarch@cisco.com Authors' Addresses next layer Telekom GmbH Mariahilfer Guertel 37/7 Vienna 1150 Austria +43 664 1176414 cl@tix.at NTT Network Innovations 940 Stewart Dr Sunnyvale CA 94085 United States of America robert@raszuk.net Huawei 7453 Hickory Hill Saline MI 48176 United States of America shares@ndzh.com

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4