RFC 8592
Key Performance Indicator (KPI) Stamping for the Network Service Header (NSH)
Key Performance Indicator (KPI) Stamping for the Network Service Header (NSH) ๐
okay bestie, this is RFC 8592 and it's giving network telemetry ๐ It's an Informational document from the Independent Submission stream, so it's not an official IETF standard ๐ธ It was written by R. Browne and A. Chilikin from Intel, and T. Mizrahi from the Huawei Network.IO Innovation Lab. It was published in May 2019 and has ISSN 2070-1721. The header doesn't list any RFCs it obsoletes or updates โจ
Abstract โจ
so the abstract says this doc describes ways to carry Key Performance Indicators (KPIs) inside the Network Service Header (NSH) ๐ฆ These methods can be used to keep an eye on latency and QoS marking, which helps you spot problems on certain links or service functions ๐ฅ
Status of This Memo ๐
this one is not an Internet Standards Track spec. It's just published for informational purposes ๐ง
It's a contribution to the RFC Series, and it's independent of any other RFC stream. The RFC Editor chose to publish it at their discretion and makes no claim about how valuable it is for implementation or deployment. Docs approved by the RFC Editor aren't eligible for any level of Internet Standard, see Section 2 of RFC 7841 ๐
For the current status, any errata, and how to send feedback, check https://www.rfc-editor.org/info/rfc8592 ๐
Copyright Notice ๐
Copyright (c) 2019 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info), as in effect on the date this document was published. Please read these carefully, because they spell out your rights and restrictions for this document ๐
Table of Contents ๐
1. Introduction ....................................................2
2. Terminology .....................................................3
2.1. Requirements Language ......................................3
2.2. Definition of Terms ........................................3
2.2.1. Terms Defined in This Document ......................4
2.3. Abbreviations ..............................................5
3. NSH KPI Stamping: An Overview ...................................6
3.1. Prerequisites ..............................................7
3.2. Operation ..................................................9
3.2.1. Flow Selection ......................................9
3.2.2. SCP Interface ......................................10
3.3. Performance Considerations ................................11
4. NSH KPI-Stamping Encapsulation .................................12
4.1. KPI-Stamping Extended Encapsulation .......................13
4.1.1. NSH Timestamping Encapsulation (Extended Mode) .....15
4.1.2. NSH QoS-Stamping Encapsulation (Extended Mode) .....17
4.2. KPI-Stamping Encapsulation (Detection Mode) ...............20
5. Hybrid Models ..................................................22
5.1. Targeted VNF Stamping .....................................23
6. Fragmentation Considerations ...................................23
7. Security Considerations ........................................24
8. IANA Considerations ............................................24
9. References .....................................................25
9.1. Normative References ......................................25
9.2. Informative References ....................................25
Acknowledgments ...................................................27
Contributors ......................................................27
Authors' Addresses ................................................27
1. Introduction ๐ฆ
okay so the Network Service Header (NSH), defined in [RFC8300], is a way to steer traffic through an ordered set of Service Functions (SFs) using an extensible service header. That gives you a lot of flexibility and programmability in the forwarding plane, so you can call the right SFs for specific flows ๐
The NSH has a seriously compelling vision of operational flexibility ๐ฅ But lots of service providers are worried about service and configuration visibility, and that worry gets bigger when they want to run their networks smoothly in "hybrid mode". In hybrid mode they want to mix physical and virtual SFs and run services seamlessly across both domains ๐ธ
This document describes generic methods for monitoring and debugging Service Function Chains (SFCs) in terms of latency and QoS marking of the flows inside an SFC. These are called "detection mode" and "extended mode", and Section 4 explains them ๐ง
These methods work with hybrid architectures where Virtual Network Functions (VNFs) and Physical Network Functions (PNFs) are freely mixed in the SFC. They also let you monitor the performance and configuration of a whole chain, or just parts of it, however you like. They can be extended to monitor other Key Performance Indicators (KPIs) too. For the architectural background, see [RFC7665] ๐
The methods here are not Operations, Administration, and Maintenance (OAM) protocols like [Y.1731], so they don't define any new OAM packet types or operations ๐ Instead, they watch the SFC's performance and configuration for subscriber payloads, and they show subscriber QoE rather than out-of-band infrastructure metrics โจ This doc is different from [In-Situ-OAM] because it's tied specifically to NSH operations and isn't generic ๐
2. Terminology ๐
2.1. Requirements Language ๐
so these are the BCP 14 key words: "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL". They only get the BCP 14 treatment described in [RFC2119] and [RFC8174] when they show up in all capitals, just like they do here ๐
2.2. Definition of Terms ๐ธ
this section introduces the main terms used in the doc. The doc also uses the terms defined in [RFC7665] and [RFC8300] ๐ฆ
2.2.1. Terms Defined in This Document โจ
- First Stamping Node (FSN): the first node along an SFC that stamps packets with KPI stamping. The FSN matches each packet to a Stamping Controller (SC) flow based on (but not limited to) a stamping classification criterion, such as transport 5-tuple coordinates ๐
- Last Stamping Node (LSN): the last node along an SFC that stamps packets with KPI stamping ๐ From a forwarding point of view, the LSN removes the NSH and forwards the raw IP packet to the next hop. From a control-plane point of view, the LSN reads all the metadata (MD) and exports it to a system performance statistics agent or repository. The LSN should use the NSH Service Index (SI) to indicate whether an SF was at the end of the chain. The LSN may change the Service Path Identifier (SPI) to a preconfigured value, so the network underlay forwards the MD straight back to the KPI database (KPIDB) based on that value ๐ฅ
- Key Performance Indicator Database (KPIDB): the external storage of MD for reporting, trend analysis, and so on ๐
- KPI stamping: inserting latency-related and/or QoS-related information into a packet using NSH MD โญ
- Flow ID: a unique 16-bit identifier written into the header by the classifier. It lets 65536 flows be concurrently stamped on any given NSH service chain ๐ง
- QoS stamping: inserting QoS-related information into a packet using NSH MD ๐
- Stamping Controller (SC): the central logic that decides which packets to stamp and how to stamp them. The SC tells the classifier how to build the parts of the NSH that are specific to KPI stamping ๐
- Stamping Control Plane (SCP): the control plane between the FSN and the SC ๐
2.3. Abbreviations ๐
DEI Drop Eligible Indicator
DSCP Differentiated Services Code Point
FSN First Stamping Node
KPI Key Performance Indicator
KPIDB Key Performance Indicator Database
LSN Last Stamping Node
MD Metadata
NFV Network Function Virtualization
NSH Network Service Header
OAM Operations, Administration, and Maintenance
PCP Priority Code Point
PNF Physical Network Function
PNFN Physical Network Function Node
QoE Quality of Experience
QoS Quality of Service
RSP Rendered Service Path
SC Stamping Controller
SCL Service Classifier
SCP Stamping Control Plane
SF Service Function
SFC Service Function Chain
SI Service Index
SSI Stamp Service Index
TS Timestamp
VLAN Virtual Local Area Network
VNF Virtual Network Function
part 1 is done bestie! ๐ next up is Section 3, the NSH KPI Stamping overview, with prerequisites and operation details, so stay tuned ๐งโจ
3. NSH KPI Stamping: An Overview โจ
okay so let's talk architecture ๐ฆ a typical KPI-stamping setup looks like this:
Stamping
Controller
| KPIDB
| SCP Interface |
,---. ,---. ,---. ,---.
/ \ / \ / \ / \
( SCL )-------->( SF1 )--------->( SF2 )--------->( SFn )
\ FSN / \ / \ / \ LSN /
`---' `---' `---' `---'
Figure 1: Logical Roles in NSH KPI Stamping
the SC is technically part of the SFC control-plane architecture ๐ but it gets its own section here so everything is easier to follow ๐
the SC is the one in charge of starting and stopping stamp requests to the SCL or FSN ๐ง it also hands out the NSH-stamping policy into the service chain through the SCP interface.
the FSN is usually part of the SCL, but it gets called out as its own logical entity for clarity โจ
the FSN is responsible for marking the NSH MD fields ๐ those marks tell the nodes in the chain how to behave when it comes to stamping: at the SF ingress, at the SF egress, or both, or ignoring the stamp NSH MD completely. iconic decision-making ๐
the FSN also writes the Reference Time value into the header ๐ฐ๏ธ it's a (possibly inaccurate) estimate of the current time of day. this is what lets the "SPI:Flow ID" performance get compared to previous samples later for offline analysis ๐
the FSN should return an error to the SC if it isn't synchronized to the current time of day, and it should forward the packet along the service chain unchanged ๐ the code and format of that error depend on the protocol between the FSN and SC, and those details are out of scope here.
SF1 and SF2 stamp the packets the way the FSN dictated and then process the payload as per normal ๐ธ
Note 1: The exact location of the stamp creation may not be in the SF itself and may be applied by a hardware device -- for example, as discussed in Section 3.3.
Note 2: Special cases exist where some of the SFs are NSH unaware. This is covered in Section 5.
the LSN should strip the entire NSH and forward the raw packet to the IP next hop as per [RFC8300] ๐ it also exports NSH-stamping information to the KPIDB for offline analysis. the LSN may export the stamping information of either (1) all packets or (2) a subset based on packet sampling. main character behavior, honestly ๐
in fully virtualized environments, the LSN is likely to be co-located with the SF that decrements the NSH SI to zero ๐ there are corner cases where that isn't true, so check Section 5 for those ๐ซถ
3.1. Prerequisites
okay, timestamping has its own list of prerequisites โฐ BUT these prerequisites are not required for QoS stamping, so don't panic ๐ญ to guarantee MD accuracy, all servers hosting VNFs should be synchronized from a centralized stable clock. since PNFs are assumed not to timestamp (that would mean a software change and a probable impact on throughput performance), there's no need for them to synchronize ๐ there are two possible levels of synchronization:
- Level A: Low-accuracy time-of-day synchronization, based on NTP [RFC5905].
- Level B: High-accuracy synchronization (typically on the order of microseconds), based on [IEEE1588].
Each SF SHOULD have Level A synchronization and MAY have Level B synchronization. โจ
Level A means each platform (including the SC) syncs its system real-time clock to an NTP server โฑ๏ธ this gets used to mark the MD in the chain, using the Reference Time field in the NSH KPI stamp header (Section 4.1). the timestamp is inserted into the NSH by the first SF in the chain. NTP accuracy can vary by several milliseconds between locations, and that's totally fine ๐ฅฐ the Reference Time is only a time-of-day reference that goes into the KPIDB for performance monitoring and MD retrieval.
Level B synchronization means each platform syncs to a Primary Reference Clock (PRC) using the Precision Time Protocol (PTP) [IEEE1588] ๐ a platform MAY also use Synchronous Ethernet [G.8261] [G.8262] [G.8264], which allows for more accurate frequency synchronization. so many options, bestie ๐ง
if an SF isn't synchronized at the moment it timestamps, it should indicate its synchronization status in the NSH. more detail on that is in Section 4.
by syncing the network this way, the timestamping operation is independent of the current RSP ๐ฆ the timestamp MD can even show where a chain got moved because of a resource starvation event, which is what Figure 2 shows between VNF3 and VNF4 at time B. chef's kiss ๐
Delay
| v
| v
| x
| x x = Reference Time A
| xv v = Reference Time B
| xv
| xv
|______|______|______|______|______|_____
VNF1 VNF2 VNF3 VNF4 VNF5
Figure 2: Flow Performance in a Service Chain
for QoS stamping, it's desired that the SCL or FSN be synchronized so there's a Reference Time for offline analysis ๐ฐ๏ธ but this is not a hard requirement, since they may be in holdover or free-run state, for example. other SFs in the chain don't need to be synchronized for QoS-stamping operations, as described below ๐
QoS stamping can check the consistency of configuration across the entire chain or just parts of it ๐ by adding all potential Layer 2 and Layer 3 QoS fields into a QoS sum at the SF ingress or egress, you can quickly spot QoS mismatches across multiple Layer 2 / Layer 3 fields. without that, it's a manual, expert-led, time-consuming process, and nobody has time for that ๐ฉ
|
|
| xy
| xy x = ingress QoS sum
| xv v = egress QoS sum
| xv y = egress QoS sum mismatch
| xv
|______|______|______|______|______|_____
SF1 SF2 SF3 SF4 SF5
Figure 3: Flow QoS Consistency in a Service Chain
so, referring to Figure 3, x, v, and y are notional sum values of the QoS marking configuration of the flow within a given chain ๐ง the encapsulation can change from hop to hop in terms of VLAN header(s), MPLS labels, or DSCP(s), so these values are used to compare configuration consistency from, for example, payload DSCP through overlay and underlay QoS settings in VLAN IEEE 802.1Q bits, MPLS bits, and infrastructure DSCPs. it's a whole journey ๐
Figure 3 shows that, at SF4 in the chain, the egress QoS marking is inconsistent ๐ in other words, the ingress QoS settings don't match the egress ones. this method tells you which QoS field(s) are inconsistent, and whether that's on the ingress (where the underlay incorrectly marked and queued the packet) or the egress (where the SF incorrectly marked and queued the packet). detective energy, literally ๐
Note that the SC must be aware of cases when an SF re-marks QoS fields deliberately and thus does not flag an issue for desired behavior. the SC has to know this or it'll flag stuff that's actually working as intended ๐ซ
3.2. Operation
okay, KPI-stamping detection mode uses MD Type 2 as defined in [RFC8300] ๐ here's how it goes: the SFC classifier stamps the flow at the chain ingress, and no subsequent stamps get applied. instead, each upstream SF can compare its local condition with the ingress value and take appropriate action. since the header doesn't grow after classification, detection mode is super efficient in terms of header size ๐ this is explained further in Section 4.2.
3.2.1. Flow Selection
the SC should maintain a list of flows within each service chain to be monitored ๐ this flow table should be in the format "SPI:Flow ID". the SC should map these pairs to unique values presented as Flow IDs per service chain within the NSH TLV specified in this document (see Section 4). the SC should instruct the FSN to initiate timestamping on a flow table match ๐ฆ the SC may also tell the classifier how long the timestamping operation should run, either by number of packets in the flow or by a certain time duration โณ
with all of that, the system can monitor the performance of all en-route traffic, an individual subscriber in a chain, or just a specific application or QoS class used in the network ๐ธ
the SC should write the list of monitored flows into the KPIDB so performance and configuration data can be correlated ๐ that way, when the KPIDB receives data from the LSN, it knows which flow the data belongs to. so organized ๐๏ธ
associating a source IP address with a subscriber identity is outside the scope of this document, and it varies by network application ๐ for example, the way a source IP address gets associated with an International Mobile Subscriber Identity (IMSI) is different from how a Customer Premises Equipment (CPE) entity with a Network Address Translation (NAT) function might get chained in an enterprise NFV application.
3.2.2. SCP Interface
an SCP interface is required between the SC and the FSN or classifier ๐ซถ this interface is used to:
- Query the SFC classifier for a list of active chains and flows.
- Communicate which chains and flows to stamp. This can be a specific "SPI:Flow ID" combination or can include wildcards for monitoring subscribers across multiple chains or multiple flows within one chain.
- Instruct how the stamp should be applied (ingress, egress, both ingress and egress, or specific).
- Indicate when to stop stamping (after either a certain number of packets or a certain time duration).
typically, SCP timestamps flows for a certain duration for trend analysis ๐ but it only stamps one packet of each QoS class in a chain periodically (perhaps once per day or after a network change). so timestamping usually covers a much larger set of packets than QoS stamping ๐ง
the exact specification of SCP is left for further study ๐ฎ
3.3. Performance Considerations ๐ธ
okay so the spec doesn't force one specific way to stamp ๐ NSH KPI stamping can be done by hardware or by software, totally your call bestie ๐
if you go software, applying and handling the stamps adds a little extra delay in the service chain ๐ฅบ but it's giving relative vibes: those extra delays are all relative for the flow in question ๐ this only matters for timestamping mode, not QoS-stamping mode โจ so even if the absolute timestamps aren't perfectly accurate for normal non-timestamped traffic, they can be assumed to be relative ๐ฆ
it's assumed the methods in this doc only run on a small percentage of user flows ๐ซถ
the service provider can pick a flexible policy in the SC to timestamp a selection of a user plane every minute, for example to highlight performance issues ๐ฅ or the LSN can selectively export a subset of the KPI stamps it receives, based on a predefined sampling method ๐ and the SC can stress-test an individual flow or chain if you need a deeper look ๐ just know that deep analysis will hit the chain's performance while it's under investigation ๐ how big that impact is depends on vendor implementations, and it's outside the scope of this document ๐
for QoS stamping, these methods are even less intrusive, because packets are usually only QoS stamped periodically (maybe once per day) to check service chain configuration per QoS class ๐
4. NSH KPI-Stamping Encapsulation ๐
okay so KPI stamping uses NSH MD Type 0x2 for detecting anomalies, and extended mode for root-cause analysis of KPI violations ๐ we'll break that down in this section ๐ง
here's the generic NSH MD Type 2 TLV for KPI stamping ๐
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Ver|O|U| TTL | Length |U|U|U|U|Type=2 | Next Protocol |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Service Path Identifier | Service Index |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Metadata Class | Type |U| Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Variable Length KPI Metadata header and TLV(s) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 4: Generic NSH KPI Encapsulation
these are the relevant header fields the FSN must implement ๐
- The O bit must not be set. ๐ซ
- The MD type must be set to 0x2. ๐
- The Metadata Class must be set to a value from the experimental range 0xfff6 to 0xfffe according to an agreement by all parties to the experiment. ๐งช
- Unassigned bits: All fields marked "U" are unassigned and available for future use [RFC8300]. ๐ฑ
- The Type field may have one of the following values; the content of the Variable Length KPI Metadata header and TLV(s) field depends on the Type value: ๐ฆ
Type = 0x01 (Det): DetectionType = 0x02 (TS): Timestamp ExtendedType = 0x03 (QoS): QoS stamp Extended
the Type field decides what kind of KPI-stamping format you get ๐ the supported formats are in the subsections that follow โจ
4.1. KPI-Stamping Extended Encapsulation โจ
okay so the generic NSH MD Type 2 KPI-stamping header (extended mode) is shown in Figure 5 ๐ท this is the format for monitoring performance of service chain issues related to QoS configuration and latency ๐
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Ver|O|U| TTL | Length |U|U|U|U|Type=2 | Next Protocol |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Service Path Identifier | Service Index |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Metadata Class | Type |U| Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Variable Length KPI Configuration Header |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Variable Length KPI Value (LSN) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Variable Length KPI Value (FSN) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 5: Generic KPI Encapsulation (Extended Mode)
as mentioned above, there are two types defined under the experimental MD class for the extended KPI MD: a timestamp type and a QoS-stamp type ๐
here's the KPI Encapsulation Configuration Header format ๐ง
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|K|K|T|K|K|K|K|K| Stamping SI | Flow ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reference Time |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 6: KPI Encapsulation Configuration Header
the bits marked "K" are reserved for specific KPI type use, and they're described in the subsections below ๐ฎ
the T bit should be set if Reference Time follows the KPI Encapsulation Configuration Header ๐ฐ๏ธ
the SSI (Stamping SI) holds the SI used for KPI stamping, and it's also described in the subsections below ๐
the Flow ID is a unique 16-bit identifier written into the header by the classifier ๐ท๏ธ this allows 65536 flows to be stamped at the same time on any given NSH service chain (SPI) ๐ญ Flow IDs are not written by subsequent SFs in the chain ๐ โโ๏ธ the FSN may export monitored Flow IDs to the KPIDB for correlation ๐
Reference Time is the wall clock of the FSN, and it may be used for historical comparison of SC performance โฐ if the FSN is not Level A synchronized (see Section 3.1), it should inform the SC over the SCP interface ๐ฃ the Reference Time is represented in 64-bit NTP format [RFC5905], as shown in Figure 7 ๐
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Seconds |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Fraction |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 7: NTP 64-Bit Timestamp Format (RFC 5905)
4.1.1. NSH Timestamping Encapsulation (Extended Mode) โฐโจ
okay so bestie, this is the extended timestamping encapsulation ๐ฆ and it's giving precision ๐
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Ver|O|C|U|U|U|U|U|U| Length |U|U|U|U|Type=2 | NextProto |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Service Path ID | Service Index |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Metadata Class | Type=TS(2) |U| Len |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|I|E|T|U|U|U|SSI| Stamping SI | Flow ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
| Reference Time (T bit is set) |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|I|E|U|U|U| SYN | Stamping SI | Unassigned |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
| Ingress Timestamp (I bit is set) (LSN) |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Egress Timestamp (E bit is set) (LSN) |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
. .
. .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|I|E|U|U|U| SYN | Stamping SI | Unassigned |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
| Ingress Timestamp (I bit is set) (FSN) |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Egress Timestamp (E bit is set) (FSN) |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 8: NSH Timestamp Encapsulation (Extended Mode)
The FSN KPI stamp MD kicks off with the Stamping Configuration Header ๐. This header holds the I, E, and T bits, plus the SSI.
The I bit should be set if the Ingress stamp is requested ๐
The E bit should be set if the Egress stamp is requested โจ
The SSI field must be set to one of the following values ๐
0x0: KPI stamp mode. No SI is specified in the Stamping SI field.0x1: KPI stamp hybrid mode is selected. The Stamping SI field contains the LSN SI. This is used when PNFs or NSH-unaware SFs are used at the tail of the chain. If SSI=0x1, then the value in the Type field informs the chain regarding which SF should act as the LSN.0x2: KPI stamp Specific mode is selected. The Stamping SI field contains the targeted SI. In this case, the Stamping SI field indicates which SF is to be stamped. Both Ingress stamps and Egress stamps are performed when the SI=SSI in the chain. For timestamping mode, the FSN will also apply the Reference Time and Ingress Timestamp. This will indicate the delay along the entire service chain to the targeted SF. This method may also be used as a light implementation to monitor end-to-end service chain performance whereby the targeted SF is the LSN. This is not applicable to QoS-stamping mode.
Each stamping node adds stamp MD that consists of the Stamping Reporting Header and timestamps ๐ง
The E bit should be set if the Egress stamp is reported ๐
The I bit should be set if the Ingress stamp is reported ๐
With respect to timestamping mode, the SYN bits are an indication of the synchronization status of the node performing the timestamp, and they must be set to one of the following values โฐ
- In synch:
0x00 - In holdover:
0x01 - In free run:
0x02 - Out of synch:
0x03
If the platform hosting the SF is out of synch or in free run, no timestamp is applied by the node, and the packet is processed normally ๐ธ
If the FSN is out of synch or in free run, the timestamp request is rejected and is not propagated through the chain. In such an event, the FSN should inform the SC over the SCP interface. Similarly, if the KPIDB receives timestamps that are out of order (i.e., a timestamp of an "N+1" SF is prior to the timestamp of an "N" SF), it should notify the SC of this condition over the SCP interface ๐ญ
The outer SI value is copied into the stamp MD as the Stamping SI to help cater to hybrid chains that are a mix of VNFs and PNFs or through NSH-unaware SFs. Thus, if a flow transits through a PNF or an NSH-unaware node, the delta in the inner SI between timestamps will indicate this ๐ฅ
The Ingress Timestamp and Egress Timestamp are represented in 64-bit NTP format. The corresponding bits (I and E) are reported in the Stamping Reporting Header of the node's MD ๐ซถ
4.1.2. NSH QoS-Stamping Encapsulation (Extended Mode) ๐ ๐
bestie, QoS headers are lowkey chaotic ๐ญ Packets have a variable QoS stack. For example, the same payload IP can have a very different stack in the access part of the network than the core. This is most apparent in mobile networks where, for example, in an access circuit we would have an infrastructure IP header (DSCP) composed of two layers -- one based on transport and the other based on IPsec -- in addition to multiple MPLS and VLAN tags. The same packet, as it leaves the Packet Data Network (PDN) Gateway Gi egress interface, may be very much simplified in terms of overhead and related QoS fields.
Because of this variability, we need to build extra meaning into the QoS headers. They are not, for example, all PTP timestamps of a fixed length, as in the case of timestamping; rather, they are of variable lengths and types. Also, they can be changed on the underlay at any time without the knowledge of the SFC system. Therefore, each SF must be able to ascertain and record its ingress and egress QoS configuration on the fly ๐ฆ
The suggested QoS Type (QT) and lengths are listed below ๐
QoS Type Value Length Comment
----------------------------------------------------------
IVLAN 0x01 4 Bits Ingress VLAN (PCP + DEI)
EVLAN 0x02 4 Bits Egress VLAN
IQINQ 0x03 8 Bits Ingress QinQ (2x (PCP + DEI))
EQINQ 0x04 8 Bits Egress QinQ
IMPLS 0x05 3 Bits Ingress Label
EMPLS 0x06 3 Bits Egress Label
IMPLS 0x07 6 Bits Two Ingress Labels (2x EXP)
EMPLS 0x08 6 Bits Two Egress Labels
IDSCP 0x09 8 Bits Ingress DSCP
EDSCP 0x0A 8 Bits Egress DSCP
For stacked headers such as MPLS and 802.1ad, we extract the relevant QoS data from the header and insert it into one QoS value in order to be more efficient in terms of packet size. Thus, for MPLS, we represent both experimental bits (EXP) fields in one QoS value, and both 802.1p priority and drop precedence in one QoS value, as indicated above ๐
For stack types not listed here (for example, three or more MPLS tags), the SF would insert IMPLS/EMPLS several times, with each layer in the stack indicating EXP QoS for that layer ๐ง
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Ver|O|C|U|U|U|U|U|U| Length |U|U|U|U|Type=2 | NextProto=0x0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Service Path ID | Service Index |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Metadata Class | Type=QoS(3) |U| Len |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U|U|T|U|U|U|SSI| Stamping SI | Flow ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
| Reference Time (T bit is set) |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U|U|U|U|U|U|U|U| Stamping SI | Unassigned |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
| QT | QoS Value |U|U|U|E| QT | QoS Value |U|U|U|E|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
. .
. .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U|U|U|U|U|U|U|U| Stamping SI | Unassigned |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
| QT | QoS Value |U|U|U|E| QT | QoS Value |U|U|U|E|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 9: NSH QoS Configuration Encapsulation (Extended Mode)
The encapsulation in Figure 9 is very similar to the encapsulation detailed in Section 4.1.1, with the following exceptions ๐
- I and E bits are not required, as we wish to examine the full QoS stack at the ingress and egress at every SF.
- SYN status bits are not required.
- The QT and QoS values are as outlined in the list above.
- The E bit at the tail of each QoS context field indicates if this is the last egress QoS stamp for a given SF. This should coincide with SI=0 at the LSN, whereby the packet is truncated, the NSH MD is sent to the KPIDB, and the subscriber's raw IP packet is forwarded to the underlay next hop ๐
Note: It is possible to compress the frame structure to better utilize the header, but this would come at the expense of crossing byte boundaries. For ease of implementation, and so that QoS stamping is applied on an extremely small subset of user-plane traffic, we believe that the above structure is a pragmatic compromise between header efficiency and ease of implementation. ๐ซถ
4.2. KPI-Stamping Encapsulation (Detection Mode) โจ
okay bestie, this part is all about the detection mode KPI-stamping TLV ๐. It's the NSH MD Type 2 one, and the layout is in Figure 10 ๐
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Ver|O|U| TTL | Length |U|U|U|U|Type=2 | Next Protocol |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Service Path Identifier | Service Index |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Metadata Class | Type=Det(1) |U| Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| KPI Type | Stamping SI | Flow ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Threshold KPI Value |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Ingress KPI stamp |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 10: Generic NSH KPI Encapsulation (Detection Mode)
So this TLV is the one used for KPI anomaly detection ๐ฆ. Once you spot a problem or an anomaly, you can switch on the KPI-stamping extended encapsulations, and those give you a much more detailed analysis ๐ง
The fields defined in the KPIDB MD are:
KPI Type: this decides what kind of KPI stamp lives in this MD. If a receiver along the path doesn't understand the KPI type, it passes the packet on transparently and does not drop it ๐ซถ The values are:0x0: Timestamp0x1: QoS stamp
Threshold KPI Value: in the first header, the SFC classifier can program a KPI threshold value. When that value gets exceeded, the SF has to put the current SI value into the SI field. The KPI type is the type of KPI stamp that gets inserted into the header, as shown in Figure 10 ๐ธStamping SI: this is the Service Identifier of the SF when the threshold above gets exceeded ๐ฏFlow ID: the classifier puts the Flow ID into the header so it can correlate flow data in the KPIDB for offline analysis ๐Ingress KPI stamp: the last 8 octets are reserved for the KPI stamp. This is the KPI value at the chain ingress, at the SFC classifier. Depending on the KPI type, it holds either a timestamp or a QoS stamp. If the KPI type is Timestamp, the field contains a timestamp in 64-bit NTP timestamp format. If the KPI type is QoS stamp, the 64-bit Ingress KPI stamp is laid out like this:
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| QT | QoS Value | Unassigned |
+-+-+-+-+-+-+-+-+-+-+-+-+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 11: QoS-Stamp Format (Detection Mode)
Now let's walk through an example ๐ Say we're using KPI type 0x01 (Timestamp). When an SF (say SFn) gets the packet, it can compare its current local timestamp with the chain Ingress Timestamp to work out the latency across the chain. Before it does that, it first checks that it is synchronized to the network's PRC โฑ๏ธ If that latency is bigger than the timestamp threshold, the SF inserts its SI and sends the NSH back to the KPIDB. That basically tells the system that at SFn, the packet broke the KPI threshold ๐ Check out Figure 8 for the timestamp format.
When this happens, the SFC control-plane system then invokes the KPI extended mode. That mode uses a more sophisticated (and more intrusive) method to isolate the root cause of the KPI violation ๐ต๏ธโโ๏ธ
Note: detection mode is a valuable tool for latency actions, but the authors feel that building the logic into the KPI system for QoS configuration isn't justified. QoS stamping happens infrequently and on a tiny percentage of the user plane, so it's more practical to use extended mode only for service chain QoS verification ๐
5. Hybrid Models ๐
A hybrid chain is a chain that mixes NSH-aware and NSH-unaware SFs. It's giving mix-and-match ๐
Figure 12 shows an example of a hybrid chain with a PNF in the middle:
Stamping
Controller
| KPIDB
| SCP Interface |
,---. ,---. ,---. ,---.
/ \ / \ / \ / \
( SCL )-------->( SF1 )--------->( SF2 )--------->( SFn )
\ FSN / \ / \ PNF1/ \ LSN /
`---' `---' `---' `---'
Figure 12: Hybrid Chain with PNF in Middle
In this example, the FSN kicks things off and sets the SI to 3 ๐ SF1 decrements the SI to 2 and passes the packet to an SFC proxy (not shown in the figure) โจ
The SFC proxy strips the NSH and passes the packet to the PNF. When the packet comes back from the PNF, the proxy decrements the SI and passes the packet to the LSN with SI=1 ๐ฆ
After the LSN processes the traffic, it knows from the SI value that it's the last node in the chain. So it exports the entire NSH and all MD to the KPIDB. The payload gets forwarded to the next hop on the underlay, minus the NSH ๐ง The stamping information packet may be given a new SPI to act as a homing tag, which transports the stamp data back to the KPIDB ๐
Figure 13 shows an example of a hybrid chain with a PNF at the end:
Stamping
Controller
| KPIDB
| SCP Interface |
,---. ,---. ,---. ,---.
/ \ / \ / \ / \
( SCL )-------->( SF1 )--------->( SF2 )--------->( PNFN )
\ FSN / \ / \ LSN / \ /
`---' `---' `---' `---'
Figure 13: Hybrid Chain with PNF at End
In this example, the FSN kicks things off and sets the SI to 3. The SSI field is set to 0x1, and the type is set to 1. So when SF2 gets the packet with SI=1, it understands that it's supposed to take on the role of the LSN, because it's the last NSH-aware node in the chain ๐
5.1. Targeted VNF Stamping
Most flows in the service chain just get stamped (Ingress stamps, Egress stamps, or both) at each hop, until the SI decrements to zero and the NSH and stamp MD are exported to the KPIDB ๐ But sometimes you just need to test one particular VNF. That could be after a scale-out operation, a software upgrade, or an underlay change, for example ๐ง In that case, the FSN should mark the NSH like this:
- The SSI field is set to
0x2. - Type is set to the expected SI at the SF in question.
- When the outer SI is equal to the SSI, stamps are applied at the SF ingress and egress, and the NSH and MD are exported to the KPIDB โจ
6. Fragmentation Considerations ๐งฉ
The methods in this document don't support fragmentation ๐ โโ๏ธ If a stamping request from an external system goes over MTU limits and would need fragmentation, the SC should return an error.
How much stamping fits depends on the payload length, the type of KPI stamp, and the chain length, so it varies for every packet ๐
In most service provider architectures, we'd expect SI << 10, which can include some PNFs in the chain that don't add overhead. So for typical Internet Mix (IMIX) packet sizes [RFC6985], we expect to be able to do timestamping on the vast majority of flows without fragmentation ๐ That means the classifier can apply a simple rule that only allows KPI stamping on packet sizes less than 1200 bytes, for example ๐ซถ
7. Security Considerations ๐จ
The security considerations for NSH in general are discussed in [RFC8300].
In-band timestamping, as defined in this document, can be used as a means for network reconnaissance ๐ By passively eavesdropping on timestamped traffic, an attacker can gather information about network delays and performance bottlenecks. Yikes ๐ญ
The NSH timestamp is meant to be used by various applications to monitor network performance and detect anomalies. That means a man-in-the-middle attacker can maliciously modify timestamps to attack the applications that use those values ๐ For example, an attacker could manipulate the SFC classifier so it forwards traffic through "better-behaved" chains. And if timestamping only happens on a fraction of the traffic, an attacker can selectively induce synthetic delay only on timestamped packets and systematically trigger measurement errors ๐
Similarly, if an attacker can modify QoS stamps, erroneous values may get imported into the KPIDB. That can lead to further misconfiguration and subscriber QoE impairment ๐
An attacker who gains access to the SCP can enable timestamping and QoS stamping for all subscriber flows. That can cause performance bottlenecks, fragmentation, or outages ๐ฅ
As discussed in previous sections, NSH timestamping relies on an underlying time synchronization protocol. So if an attacker goes after the time protocol, they can potentially compromise the integrity of the NSH timestamp โฑ๏ธ A detailed discussion of the threats against time protocols, and how to mitigate them, is presented in [RFC7384] ๐ฆ
8. IANA Considerations ๐
This document has no IANA actions ๐ธ
9. References ๐
9.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC7665] Halpern, J., Ed. and C. Pignataro, Ed., "Service Function
Chaining (SFC) Architecture", RFC 7665,
DOI 10.17487/RFC7665, October 2015,
<https://www.rfc-editor.org/info/rfc7665>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in
RFC 2119 Key Words", BCP 14, RFC 8174,
DOI 10.17487/RFC8174, May 2017,
<https://www.rfc-editor.org/info/rfc8174>.
[RFC8300] Quinn, P., Ed., Elzur, U., Ed., and C. Pignataro, Ed.,
"Network Service Header (NSH)", RFC 8300,
DOI 10.17487/RFC8300, January 2018,
<https://www.rfc-editor.org/info/rfc8300>.
9.2. Informative References โจ
Okay, bestie, now we're in the "extra reading" pile ๐๐ซถ These are the references the spec leans on for background, but they aren't required to implement it.
[IEEE1588] IEEE, "IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems", IEEE Standard 1588, <https://standards.ieee.org/standard/1588-2008.html>. ๐ฐ๏ธโจ
[RFC5905] Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch, "Network Time Protocol Version 4: Protocol and Algorithms Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010, <https://www.rfc-editor.org/info/rfc5905>. ๐ธ
[RFC7384] Mizrahi, T., "Security Requirements of Time Protocols in Packet Switched Networks", RFC 7384, DOI 10.17487/RFC7384, October 2014, <https://www.rfc-editor.org/info/rfc7384>. ๐๐
[RFC6985] Morton, A., "IMIX Genome: Specification of Variable Packet Sizes for Additional Testing", RFC 6985, DOI 10.17487/RFC6985, July 2013, <https://www.rfc-editor.org/info/rfc6985>. ๐ฆ๐
[Y.1731] ITU-T Recommendation G.8013/Y.1731, "Operations, administration and maintenance (OAM) functions and mechanisms for Ethernet-based networks", August 2015, <https://www.itu.int/rec/T-REC-G.8013/en>. ๐ ๏ธ
[G.8261] ITU-T Recommendation G.8261/Y.1361, "Timing and synchronization aspects in packet networks", August 2013, <https://www.itu.int/rec/T-REC-G.8261>. โฑ๏ธ
[G.8262] ITU-T Recommendation G.8262/Y.1362, "Timing characteristics of a synchronous Ethernet equipment slave clock", November 2018, <https://www.itu.int/rec/T-REC-G.8262>. ๐ฆ
[G.8264] ITU-T Recommendation G.8264/Y.1364, "Distribution of timing information through packet networks", August 2017, <https://www.itu.int/rec/T-REC-G.8264>. ๐ง
[In-Situ-OAM] Brockners, F., Bhandari, S., Pignataro, C., Gredler, H., Leddy, J., Youell, S., Mizrahi, T., Mozes, D., Lapukhov, P., Chang, R., Bernier, D., and J. Lemon, "Data Fields for In-situ OAM", Work in Progress, draft-ietf-ippm-ioam-data-05, March 2019. ๐
Acknowledgments ๐ซถ
The authors gratefully acknowledge Mohamed Boucadair, Martin Vigoureux, and Adrian Farrel for their thorough reviews and helpful comments. ๐ They read everything with a fine-tooth comb and made it so much better. Iconic behaviour ๐
Contributors ๐
This doc started life as draft-browne-sfc-nsh-timestamp-00, and the following people were coauthors of that draft. We literally want to thank them and give them their flowers for all their contributions ๐ท๐
Yoram Moses
Technion
Email: moses@ee.technion.ac.il
Brendan Ryan
Intel Corporation
Email: brendan.ryan@intel.com
Authors' Addresses ๐
Here's where you can find the authors, bestie. Slide into those inboxes ๐
Rory Browne
Intel
Dromore House
Shannon
Co. Clare
Ireland
Email: rorybrowne@yahoo.com
Andrey Chilikin
Intel
Dromore House
Shannon
Co. Clare
Ireland
Email: andrey.chilikin@intel.com
Tal Mizrahi
Huawei Network.IO Innovation Lab
Israel
Email: tal.mizrahi.phd@gmail.com
And that's a wrap, bestie!! ๐โจ๐ฆ๐
๐ฆ where this page comes from
- ietf: rfc8592 2019-05
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms