<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd'>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<rfc category='std' ipr='trust200902' docName='draft-turaga-lmap-special-loop-address-01'>
  <?rfc strict='yes' ?>
  <?rfc toc='yes' ?>
  <?rfc tocdepth='3' ?>
  <?rfc symrefs='yes' ?>
  <?rfc sortrefs='yes' ?>
  <?rfc compact='yes' ?>
  <?rfc subcompact='yes' ?>

 <front>
    <title abbrev='draft-turaga-lmap-special-loop-address'>Special Loop Address</title>

 <author fullname='Partha Turaga' initials='P' surname='Turaga'>
    <organization>Bloomberg LP</organization>
    <address>
        <postal>
            <street>731 Lexington Ave </street>
            <city>New York City</city>
            <region>NY</region>
            <code>10022</code>
            <country>USA</country>
        </postal>
        <email>pturaga@bloomberg.net</email>
    </address>
</author>

 <author fullname='Robert Raszuk' initials='R' surname='Raszuk'>
    <organization>Bloomberg LP</organization>
    <address>
        <postal>
            <street>731 Lexington Ave </street>
            <city>New York City</city>
            <region>NY</region>
            <code>10022</code>
            <country>USA</country>
        </postal>
        <email>robert@raszuk.net</email>
    </address>
</author>

    <date year='2016' />

    <abstract>
      <t>This document describes a method for automatic detection 
	  of link quality issues between two devices connected together 
	  by any standard link in an IP based network. This document focuses on 
	  inline detection in any network attached device (ie server, router, 
	  switch etc..)</t>
    </abstract>

    <note title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in <xref
      target="RFC2119">RFC 2119</xref>.</t>
    </note>
  </front>

  <middle>

    <section title="Terminology">
      <t><list style="symbols">
		<t>RTT - Round Trip Time</t>
		<t>TTL - Time to Live</t>
		<t>BFD - BiDirectional Failure Detection</t>
		<t>LFM - Link Fault Management</t>
		<t>ICMP - Internet Control Message Protocol</t>
        </list></t>
    </section>
  
    <section title="Introduction">
	
		<t>Real time monitoring of WAN or MAN link quality presents 
		a real operational challenge. The common use of circuit 
		emulation techniques by carriers makes detection of 
		the circuits degradation difficult. Very often such reduced
		link quality results in increased queuing times or packet 
		drops beyond SLA guarantees. Furthermore, the characteristics 
		of link degradation is different from link to link.</t> 
		
		<t> The problem space described above is further complicated 
		due to the following reasons: </t> 
		
		<t><list style="symbols"> 

			<t> Link anomalies may not occur at the same uniform rate 
			or be of the same constant and continuous pattern. This 
			transient characteristic maybe a function of load or 
			other temporary problems for example transport network
			over-subscription.</t>
			
			<t> Encountered degradated service behavior may not 
			translate to link errors or packet discards on either  
			end of the suspected link because the emulated link 
			consisting of multiple independent L2 segments in the 
			carrier's network. </t>
			
		</list></t>
		
		<t> Currently available tools on the circuit endpoints (usually 
		routers) do not allow easy way to diagnose circuit health.
		Tools used today to detect link issues include:</t>
		
		<t><list style="symbols">
		
			<t> Creating hardware or software loops manually - this results
			in the actual link under test to be taken out of service. Test
			traffic is then sent through the link and based on the results
			of the test, link quality issues are detected.</t>
			
			<t> Regular pings/probes on directly connected links between 
			routers/network devices - Depending on the size of the probe 
			packets and the rate at which they are sent between the network 
			devices and the loss, the link issues are detected. The issue 
			with this approach is that network processor on the router has 
			to process all these packets. This causes an additional 
			processing load on the routers.</t>

			<t> BFD, IP protocol hellos etc are based on detecting neighbor 
			state based on tiny and lightweight hellos. Such probes were 
			designed for fast detection of end-to-end link state events ..
			not to evaluate link quality. If say N hellos send in T interval 
			are lost it is an indication about link or peer down event.</t>

			<t> The layer 2 OAM tools are not capable of addressing the 
			requirements since by definition an emulated link consists of 
			number of different L2 links hidden by the emulation layer and 
			its encapsulation. L2 OAM could only indicate potential problems
			within single layer 2 link. They are light weight and some of 
			these issues can only be detected at various levels of 
			data rates (within agreed SLAs) transiting via such links.</t>
          
        </list></t>
				
    </section>

    <section title="Requirements">
	
		<t> The following are some of the key considerations required to 
		be addressed in an alternative diagnostics solutions:</t>

		<t><list style="symbols">
	  
			<t> The testing should be atomic in nature - the UUT in this
			document is a single p2p link.</t>
		
			<t> The test should not be subject to any alterations by 
			externally injected packets </t>
		
			<t> The probe packets should never be able to transit L3 
			node to any other L3 node </t>
	  
			<t> The level of diagnostics data should be configurable such 
			that operator is able to inject anywhere from 0.1% to 100% of 
			test load of a given max link capacity with build in automatic
			consideration of existing average of production traffic load 
			(unless link is considered as taken out-of-service).</t>
		
			<t> The duration of the test traffic should be either 
			configurable by the operator or controlled by built-in 
			detection heuristics.</t>
		
			<t> The frequency of the test traffic should be either 
			configurable by the operator or controlled by built-in 
			detection heuristics.</t>
		
			<t> Probes should not be subject to process switching by 
			the route processors on either end of the link during the 
			burst.</t>
		
			<t> The solution should strive to minimize amount of 
			required protocol extensions for as easy as possible 
			inter-operability characteristics.</t>
			
			<t> In the topologies where Link Aggregation is used, the 
			aggregated bandwidth of the link should be considered instead
			of the individual links. The probe accounting should be 
			recorded as total of all link members. Probe's hashing 
			should follow normal data plane load balancing rules as 
			configured on the directly connected peering routers.</t>
	  
		</list></t>
    </section>
	
	<section title="IPv4/IPv6 Special Purpose Loop Addresses">
	
		<t> The mechanism for the set of proposed requirements can be 
		constructed by combining two standards based protocol elements: 
		TTL field processing and special purpose IPv4 or IPv6 loop 
		addresses. </t>
		
		<t> Special purpose loop address will allow to setup a scoped 
		link based loop and TTL field can be used to limit the loop 
		duration.</t>
		
		<t> The special purpose loop address for this purpose can be subset 
		of the link local range - 169.254/16 for IPv4 [RFC 3927] or FE80::/64 
		for IPv6 [RFC 4291] or it could be taken from an alternative pool 
		if IETF process suggests so. Selected and allocated special purpose 
		loop address would be therefor kept and maintained by IANA IPv4 or 
		IPv6 Special-Purpose Address Registries. </t> 
				
		<t> Routers must not forward any packets with loop source or
		destination addresses to links other then the link packet arrived on. 
		</t>
		
		<t> The IPv4/IPv6 loop address MAY BE associated with numbered IP 
		addresses for the given link or with link local addresses. The 
		resolution to MAC address of L2 rewrites would be resolved locally 
		through corresponding L3 adjacency addresses.
		</t>
		
	    <t> IPv4/IPv6 test packet is directed towards L3 neighbor with even 
		TTL value.</t>
	
	</section>

    <section title="Operation of test suite using Special Purpose IP Loop Address">
	
		<t> The following is considered as a high level description of proposed solution:</t>
	  	   
		<t><list style="symbols">
	  
			<t> Two routers R1 and R2 connected together by link L1 </t>
		
			<t> Average RTT between R1 and R2 on link L1 is 5ms </t>
		
			<t> R1 and R2 have IP connectivity with each other on 
			10.10.10.0/30 numbered link. R1 has been configured with 
			IP an address of 10.10.10.1 and R2 has been configured with 
			an IP address of 10.10.10.2 </t>
		
			<t> For the purpose of a test an IP loop address is configured 
			on R1 and R2 to create local link loops. For the purpose of 
			this illustration the loop address has been named as 
			L.O.O.P/32 </t>

		</list></t>

		<t> The following IPv4 packet has been injected from R1: </t>

		<t><list style="symbols">
	  
			<t> Source IP address: 10.10.10.1 </t>
			<t> Destination IP address: L.O.O.P </t>
			<t> TTL = 254 </t>
			<t> payload optional ... (to be discussed by WG)</t>
		
		</list></t>

		<t> Test sequence: </t>

		<t><list style="symbols">
	  
			<t> Packet arrives at R2 and TTL is decremented following 
			by destination IP lookup and re-injection towards R1 </t>

			<t> Packet keeps looping till the TTL expires on R1. </t>
		
			<t> Upon TTL expiration an ICMP TTL EXPIRED error message is 
			being sent to the source of the original packet (10.10.10.1).
			The ICMP message contains the header information of the 
			original packet </t>
	  
		</list></t>
	  
	<t> Observations: </t>

		<t><list style="symbols">
	
			<t> A test probe packet has been amplified 254 times for a 
			short time </t>
		
			<t> An ICMP TTL expired message is indicative that result of 
			the test can be described as: probe packets were not dropped 
			</t>

			<t> No ICMP TTL message implies that one copy of the original 
			packet was lost while it was looping between two routers. No 
			reception of ICMP TTL indicates potential issues with the link 
			provided that test sequence was assured never exceed agreed 
			SLAs for a given link.</t>

			<t> Ability to send multiple packets of different sizes on 
			the link with inherently controlled TTL loop can results in 
			expected burst of control/probe traffic on the link under 
			test </t> 
		
			<t> Such probe burst can be programmed to get to a certain % 
			of the link speed for a short time </t>
				
		</list></t>
	
		<t> Based on fine tuned testing scenario allowing to fill the 
		bandwidth up to a certain % of link capacity the count of packets
		originally sent by router R1 should be the same as the number of 
		ICMP TTL expired messages. If the count of packets originally sent 
		by router is the same as the number of ICMP TTL expired messages 
		then the test is successful. If however the number of ICMP TTL 
		expired messages is less than the count of packets originally 
		sent by the router then the test is unsuccessful proving 
		potential problems with the link. </t>
	
		<t> A test probe packet with even initial TTL value will generate 
		a TTL time expired ICMP message on the originating router. A test 
		probe packet with odd initial TTL value will generate a TTL time 
		expired ICMP message on the neighboring router. It is RECOMMENDED 
		that the test probe is sent with even initial TTL value. So, ICMP
		messages are not traversing the link under test. </t>
	
		<t> It is RECOMMENDED that a special payload structure is used for 
		these test probes with sequence numbers. When the TTL expires and 
		an ICMP message is generated, the IP header + 64 bits from original
		packet gets copied to ICMP message [RFC792]. This can be used for
		associating the ICMP message and the test. </t> 
	
		<t> The MTU of the test probes can be adjusted up to maximum MTU 
		value of the link. Fragmentation of probe packets SHOULD be 
		avoided. </t>
	
    </section>
	
    <section title="Comparison with stated test requirements">
	
		<t>Analysis of the proposed solution against the actual new test
		methodology requirements:</t>
    
		<t><list style="symbols">
		
			<t> Provides means to potentially fill up the part of link 
			bandwidth very rapidly due to inherent amplification
			especially with high initial TTL value. The fill level of 
			the test traffic is a function of: Initial packet size 
			(higher the packet size the higher the fill level), Initial 
			TTL value (higher the TTL value, higher the multiplicative 
			factor for packets and hence higher the fill level), Initial 
			number of packets sent (the more the packets sent the more 
			the fill level) and MTU of the probe packets. </t> 
		
			<t> Test can be run together with production traffic. 
			There is no impact on production traffic neither there is 
			any requirement to stop production traffic in order to 
			perform the test. </t>
		
			<t> The amplification of the packets and looping happens 
			as a part of inherent forwarding in the routers. This 
			solution does not require a special process in software 
			or hardware to send the test probes between the two routers 
			as special purpose loop address would be part of standard 
			FIB tables.</t>
		
			<t> This mechanism is light-weight and does not require 
			any new software implementations. Potential for local 
			vendor's optimizations however is still there in the area 
			of segmenting TTL equal zero errors of probes from other 
			transit uses of TTL equal zero errors or in the space of 
			result presentation to the operators.</t>

		</list></t>
		
	</section>
		
	<section title="Probe size and rate calculation">
	
		<t> Initial packet size and rate are important to determine the 
		test fill level for the link. The test packet loops the same 
		number of times as the original TTL value of the original 
		packet. The time it takes for the original packet to come back 
		to the original router is the RTT (Round Trip Time) value 	  
		between two routers.</t>

		<t> Under the assumptions that: RTT of link under test is 1ms, 
		link speed 1 Gb/s, packet size of test packet is 1536 bytes, 
		TTL on original packet is set to 254, would result in the test 
		packets looping for 254 ms. </t>

		<t> Under the above assumptions it is easy to calculate that 
		in order fill 1 Gb/s link to 100% 81 such probe packets need 
		to be injected. Likewise in order to fill such link to 20% of 
		its capacity 16 probe packets are required. </t> 
  	  
	</section>
	
	<section title="Probe's QOS marking">
	
		<t> Since injected test packets are regular IP packets they 
		can be marked with any class of service. As a result the 
		test probes similar to actual data will be processed based 
		on the real QoS configuration and will be subject to 
		treatment defined for a given packet class.</t>
	  
		<t> That allows both prioritization as well as de-prioritization 
		of a given set of test probes. </t>
	  	  
	</section>
	
	<section title="Bandwidth Considerations for link under test">
	
		<t> The payload of the test packets can be of any IP protocol.</t>

		<t> The link fill levels is also a function of Inter-packet gap 
		of the test and the RTT of that link. Deterministic fill levels 
		can only be derived by accounting for RTT of the link under 
		test. </t>
	  	  
	</section>
		
	<section title="I2RS and YANG modelling">
	
		<t> It is expected that link testing methodology described 
		in this document will be accessible by I2RS channel as well 
		as extensions to YANG models will be defined for both setting 
		and retrieval of the data.</t>
	  	  
	</section>
	
    <section anchor="IANA" title="IANA Considerations">
    
		<t>This document requires IANA to allocate and maintain 
		following Special Purpose IP Addresses:</t>
	  
		<t> IPv4 Special Purpose Loop Address and maintain it the
		IANA IPv4 Special-Purpose Address Registry [RFC5735]</t>

		<t> IPv6 Special Purpose Loop Address and maintain it the
		IANA IPv6 Special-Purpose Address Registry [RFC5156]</t>

    </section>

    <section anchor="Security" title="Security Considerations">
	
		<t> While the proposed mechanism does not define any new 
		protocols nor protocol extensions of already existing 
		specifications it does relay on the TTL-expiry notifications. 
		</t>
		 
		<t> Such notifications must be enabled and must not be limited 
		in any way for the specific class of probe packets. </t>
	   
		<t> It is highly recommended that test destinations LOOP 
		addresses are not routeable beyond their locally attached 
		links. Using IPv4/IPv6 special purpose loop addresses will 
		address that. </t>
    
	</section>

    <section anchor="Contributors" title="Contributors">
	
		<t>Authors would like to thank Truman Boyes and Leo Pang 
		for their valuable input.</t>
	  
    </section>

    <section anchor="Acknowledgements" title="Acknowledgments">
	
      <t></t>
    
	</section>
				
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>
	  <?rfc include="reference.RFC.5156"?>
	  <?rfc include="reference.RFC.5735"?>
    </references>

    <references title="Informative References">
	  <?rfc include="reference.RFC.0792"?>
      <?rfc include="reference.RFC.3927"?>
      <?rfc include="reference.RFC.4291"?>
    </references>
	
  </back>
</rfc>