template6MAN W. Kumari Internet-Draft Google Intended status:InformationalBest Current Practice J. Jaeggli Expires:August 8, 2013January 05, 2014 Zynga R. Bonica Juniper NetworksFebruary 4,July 04, 2013 Operational Issues Associated With Long IPv6 Extension Header Chainsdraft-wkumari-long-headers-00draft-wkumari-long-headers-01 Abstract This documentoutlines a set of issues withexplains why IPv6 header chain length affects theusecost of ASIC-based packet forwarding. It also explains why some network service providers discard packets with exceptionally longIPv6 extensionheader chains.It considers their use in the context of today'sFinally, it identifies a reasonable header chain length. While a network service provider can enforce any filtering policy that supports its security model, a network service provider should not discard IPv6Internetpackets based solely upon header chain length if the header chain is not longer than the value specified herein. Requirements Language The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", andpotential interaction with forwarding devices that require upper-layer headers."OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119]. Status ofthisThis Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire onAugust 8, 2013.January 05, 2014. Copyright Notice Copyright (c) 2013 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 (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . .. 3 2. Background . . . . . . .2 1.1. Termnology . . . . . . . . . . . . . . . . . . .4 2.1. Understanding the scale. . . . . . . . . . . . . . . . . . 4 2.2. Different types of networks. . .. . . . 3 2. Background . . . . . . . . .5 2.3. Large Edge Site Operators.. . . . . . . . . . . . . . . .54 3. Need to see upper-layer to filter . . . . . . . . . . . . . .. 65 4.Recomendations .Recommendations . . . . . . . . . . . . . . . . . . . . . . .76 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . .. 76 6. Security Considerations . . . . . . . . . . . . . . . . . . .. 86 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . .. 87 8. Normative References . . . . . . . . . . . . . . . . . . . .. 87 Appendix A. Changes / Author Notes. . . . . . . . . . . . . . .. 87 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . .. 87 1. IntroductionMany forwarding devicesIn order to make a forwardingdecisions based upondecision, the forwarding device may require informationthat is drawnfrom both the IPv6 header andtransport headers.Whenan upper layer header. When a software-basedforwarding deviceforwarder encounters an IPv6 datagram that includes a longextensionheader chain, it parses the header chain, acquires the required information and makes its forwarding decision. Typically, software-based forwarders are not required to process a large number of packets per second. Therefore, they can perform the above mentioned procedure withina specified time andtheir processing budget. By contrast, ASIC-based forwarders aretypically requiredengineered to forward many more packets per second. In order to fulfill this requirement, the forwarder copiesan arbitrarily chosena fixed number of bytesforfrom the beginning of the packet to on-chip memory. The ASIC does this because it can access on-chip memory much more quickly than it can access off-chip memory.Having copiedOnce the beginning of the packet has been transferred to on-chip memory,the forwarder can make its forwarding decision very quickly, becausesubsequentpacketprocessing and forwarding decisions canallbeachieved on- chip.made very quickly. The act of copying bytes from the beginning of a packet to on-chip memory consumes both wall-time and processor cycles.The number of bytes copied is directly proportional to the amount of wall-time and processing cycles consumed.Therefore, the number of bytes copied to on-chip memory must be chosen wisely. If a forwarder copies more bytes than it needs, it wastesresources.resources, significantly increasing cost and decreasing maximum performance. If it copies too few bytes, it cannot parse theextensionheader chain and makethea correct forwarding decision.This memo describes problems that are caused byAs currently specified in [RFC2460], the IPv6 header chain can exceed 64 kilobytes. However, packetscontaining large extensionwith headerchains. Specifically, it describes how ASIC-based forwarding devices may fail when both of the following conditionschains exceeding 128 bytes aretrue: o The forwarder is required to make a forwarding decision based upon information that is drawn from bothrarely observed on theIPv6 and transport layer headers o The forwarder encountersInternet. Therefore, most ASIC- based forwarders copy apacket in whichrelatively small number of bytes from thelengthbeginning of the packet into on-chip memory. This document explains why IPv6 headerplus thechain length affects the cost of ASIC-based packet forwarding. It also explains why some network service providers discard packets with exceptionally long header chains. Finally, it identifies a reasonable header chain length. While a network service provider can enforce any filtering policy that supports its security model, a network service provider SHOULD NOT discard IPv6 packets based upon header chain length if theextensionheader chain isgreaternot longer than thenumbervalue specified herein. 1.1. Termnology For the purposes ofbytes thatthis document, theASIC copies to on-chip memory This memo also presents recommendations, and is intended to spark discussions. 2. Background Router architectures have evolved over time,terms Extension Header, Header Chain androuters have become more specialized devices. Initially (andUpper-layer Header are used as follows: Extension Header : Extension Headers are defined insome cases still), routers were "software switched" - a packet would arrive at the router and software running on a general purpose microprocessor would look atSection 4 of [RFC2460]. Currently, six extension header types are defined. [RFC2460] defines thepacket, make forwarding decisions, perform additional packet processing (decrement TTL, recalculate checksum, perhaps process source route options)hop-by-hop, routing, fragment andthen send the packet towardsdestination options extension header types. [RFC4302] defines thedestination. This approach began to run into scaling / performance issues for "core"authentication header (AH) typerouters. Moreandmore of[RFC4303] defines theforwarding logic has moved to Application Specific Integrated Circuits (ASICs) and Network Processors. Networks that need to shift a large amountencapsulating security payload (ESP) header type. Header Chain : The initial portion oftraffic (for example, large ISPs, enterprises, and content providers generally purchase these "core" style devices. As the amountan IPv6 datagram containing headers. The first member oftraffic (and correspondingly interface speeds increased),thebuses between linecards and to the forwarding ASICs have becomeheader chain is always an IPv6 header. For abottleneck. In order to scalesubsequent header to qualify as a member of therequired speeds, router manufacturers began segmentingheader chain, it must be referenced by theincoming packet into a number"Next Header" field of the previous member of"cells"the header chain. The header chain can include IPv6 headers, IPv6 extension headers andonly sendingan upper-layer header. If thefirst cell toheader chain includes two IPv6 headers, as is theforwarding logic.. Once this decisioncase when IPv6 ismade,tunneled over IPv6, theforwarding ASIC notifiessecond IPv6 header terminates theoutput interface, which then sucks allheader chain. Any headers following the second IPv6 headers are not members of theother cells acrossheader chain. Likewise, if theswitch fabric, assembles them intoheader chain includes an ESP header, thecorrect order and shipsESP header terminates thepacket. While this is more complex than simply shippingheader chain. Only theentire packetfirst 8 bytes of the ESP header contribute to theforwarding logic, it dramatically decreasesheader chain length. Any headers following ESP header are not members of the header chain. Upper-layer Header : In theamountgeneral case, the upper-layer header is the first member ofvery fast memory associated withtheforwarding logic,header chain that is neither an IPv6 header nor an IPv6 extension header. Typically, the upper-layer header represents a transport protocol (e.g., TCP, UDP, SCTP). However, itworks in general quite well withcan represent a non-transport layer protocol. For example, when IPv4packets and it was needed to allow routers to scale tois tunneled over IPv6, thecurrent demands. Inupper-layer header is an IPv4this first cell contains all ofheader. If theinformation required to make forwarding (and filtering!) decisions, but thisheader chain includes two IPv6 headers, as isnot necessarilythe casein IPv6. Readers of this document are expected to be familiar with [RFC2460] Section 4. 2.1. Understandingwhen IPv6 is tunneled over IPv6, thescale. In order to understand why designs like this have evolved, itsecond IPv6 header isusefulconsidered to beable to get a rough idea ofthesorts of scale we are discussing. A single 100Gbps Ethernet interface, filled with 64byte packets receives approximately 148.8 million packets per second,upper-layer header andso has approximerik ately 6.7 nanoseconds to forwardterminates thepacket in order to keep up withheader chain. For theinput rate (for comparison,purposes of this document, when the upper-layer protocol is26 clock cycles on a 3.8Ghz CPU core). A (current) large router contains multiple distributed packet processing engines, and a single chassis might have an aggregate switching capacity of around 4.5Tbps. 2.2. Different types of networks. The classic viewICMPv6, the first 32 bits of theInternet is that thereICMPv6 message (i.e., the type, code fields and checksum fields) area large number of "edge" networks that connectconsidered toa "core" network, comprised of large ISPs. The edge networks create (and consume) the data,be thecore simply transitsICMPv6 header. The upper-layer payload is not part of thetraffic betweenupper-layer header and therefore, is not part of theedge networks. BecauseIPv6 header chain. For example, if thecore aggregates all of traffic fromupper-layer protocol is TCP, theedge networks itTCP payload ismade upnot part ofhuge, fast routers. Becausetheedge networks shift much less traffic they use much smaller routers. While this makesTCP header or the IPv6 header chain. 2. Background When IPv6 was first conceived, forwarding was largely performed in software running on general-purpose processors. Due to the required performance, parsing apretty (and easily understood) picture,long header chain was not an issue. In thereality is much more complex --years between the conception of IPv6 andmessier. There exist a numberpublication of"edge" networks whose scalethis documentation, the Internet evolved as follows: o Throughput requirements increased dramatically, requiring the deployment oftraffic make them look much more like,ASIC-based forwarders in both core andemploy technology associated, with "core"edge networks- these are entities like video distribution networks, "cloud providers",o New network types emerged, including very large enterprises, social networks,large enterprisesdata centers andsimilar. For the purpose of this document we will call these Large Edge Sites. This is relevant to this document because"clouds". Like core networks, theselarge edge sites often havenetworkrequirements that differ from traditional ISPs, and often wish to perform more filtering of traffic. 2.3. Large Edge Site Operators. Some properties common to largerequire very high throughput. Like edgesite operators. o Run their own "backbone". o Push or Sink significant amounts of traffic from peers or providers. o They lack customer routes, e.g. they are their own customer, not a transit ISP in the traditional sense. o Peer with a large number of ISPs and other LES / edges. o Look sort of like an enterprise. Apply ingress policy on upsteamnetworks, these networks require "high-touch" edgeor locations other than end systems. The principle is to only allow in traffic that is expected (incoming connections are by nature unsolicited) o Filter out any traffic that does not conformservices, which require the forwarder toexpectations. This is as much an availability/performance/protocol requirement (as we will see) as it is a security posture.access the entire header chain oThe operator is not an Internet Service Provider inRequirements for "high-touch" service, which require thetraditional sense;forwarder to access thecustomer is an application whichentire header chain, increased inturn is leveraged overnetworks of all kinds During those years, IPv4 [RFC0791] was the most commonly deployed protocol on the Internet.Operator goals (in this order): 1. Keeping their (and their users) data secure. 2. KeepingASIC-based forwarders could meet thenetworks up and running. 3. Keepingrequirements of thenetwork performing well. 4. Architectevolving Internet because ASICs could predict thenetworknumber of bytes that needed to bescalable. 5. Costs 6. Standards compliance. This shouldcopied into on-chip memory inno way be consideredorder tomean that operators throw away packets capriciously, but inmake adecision between security and availability, and standards compliance,forwarding decision. Today, as IPv6 is being deployed, ASIC-forwarders cannot safely predict theformer considerations may trumpsize of thelater.header chain. This leads to complexity and vulnerability in handling extension headers. For this reason, many network operators filter all IPv6 packets containing extension headers. 3. Need to see upper-layer to filter There is a school of thought that ISPs, content-providers and enterprises should not be performing any sort of filtering in the network and that the filtering is more appropriately performed at the end hosts.UnfortinaltyUnfortunately this solution, while clean and elegant, simply doesn't work in the real world. Filtering unknown traffic at the edge (and / or in the core) of the network is needed for a number of reasons, some of which are discussedbelow (these are not really germane to the draft, but discussing them here may help head off many discussions).below. o ISPs (and cloud providers) are routinely called upon to filter DoS traffic aimed at their customers (for example to block multi-Gbps DNS reflection attacks aimed at web servers, etc). At Large Edge Sites this is often a large part of the "service" provided by the network team. o IPv6 stacks are still relatively immature and operators still have concerns that stack or kernel vulnerabilities may still surface. If this turns out to be the case, a means to protect the end nodes is needed. o In many enterprises the end systems are not sufficiently hardened to be exposed on the public Internet. Even if there were no remotely exploitable operating system vulnerabilities there is significant risk that an employee may install vulnerable software, accidentally share confidential files or folders publicly or start offering (unauthorized) services. o Content providers (and similar) need to be able to filter traffic and only allow "expected" traffic into their networks. This is needed both for DoS protection, but also to ensure that development systems, databases, test systems, etc are not accidentally exposed. o While it would be nice if all employees, system and database administrators could be trusted to always ensure that only the "correct" services were listening on ports, that all software was always fully patches (and contained no vulnerabilities), that confidential data was only shared with internal addressed and that all credentials were strong and regularly changed, this simply does not reflect reality. All of these lead to the requirement that operators be able to filter at Layer 3 and Layer 4, at line rate, in the network. Obviously, to be able to filter at layers 3 and 4, the router needs to be able to see the layer 3 and 4 information. Unfortunately, if theupper layer header is not available in the first cell / segmentsize ofthe larger packet we may not be able to see it. This applies to cases whereextensionheaders pad the variable length portion of the header, beyond the cell size or, the presumably rarerheader chain varies between 0 andprobably deliberately malicious case of initial fragments which64 kilobytes, extension headers cannot be processed efficiently in ASICs. Because many implementation do notcontain an upper layer header. In one widely deployed router architecture, if there are anyprocess IPv6 extension headersbetween the IPv6 header and the upper-layer header, the forwarding logic never sees the upper-layer header, and so is not able to filter on it. This means that the operator has no visibility into the packet contents, and sowell, many operatorschoose to simply dropfilter all IPv6 packetswith any extension headers. Network operators may filter traffic with extention header, because of the lack of fixed extentionthat include them. 4. Recommendations An ISP SHOULD NOT discard IPv6 packets based solely upon headersize,chain length if thecomplexity of followingheaderchains, and the inability of deployed routers to look sufficently deep into packetschain contains 128 bytes or fewer. However, it is common practice ISPs tosee the upper-layer header. For this reason, appplications andfilter IPv6stacks should avoid the use of extention headers whenever possaible, and applications should be designed to deal with the posibility thatpacketscontaining extention headers may not be delivered. 4. Recomendationswith long extension header chains. This documentdiscourages the use of IPv6 Extension headers, and advisesoffers no recommendation regarding thecommunity that some operators currently filter ingress packets that contain more than onemaximum extension header(and / or headerschain length thatexceedan ISP should forward. See Section 1.1 for asmall numberformal definition ofbytes).the header chain. 5. IANA Considerations This document makes no requests of the IANA 6. Security Considerations There are potential implications to the filtering or acceptances of packets which cannot be processed according to the configuration of the network operator. It is clear from the vantage point of the authors that implementors and operators should be aware of implications of relying on extension header chains or apply policies that must necessarily discard packets which contain them. 7. Acknowledgements The authors wish to thank Paul Hoffman, KK and Fernando Gont.They also wish to thank folk for not getting all up in arms :-P8. Normative References [RFC0791] Postel, J., "Internet Protocol", STD 5, RFC 791, September 1981. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", RFC 2460, December 1998. [RFC4302] Kent, S., "IP Authentication Header", RFC 4302, December 2005. [RFC4303] Kent, S., "IP Encapsulating Security Payload (ESP)", RFC 4303, December 2005. Appendix A. Changes / Author Notes. [RFC Editor: Please remove this section before publication ] Template to -00 o Initial submission. -00 to -01 o Added maximum header chain recommendation. o Rewrite the forwarding description. Authors' Addresses Warren Kumari Google 1600 Amphitheatre Parkway Mountain View, CA 94043 US Email: warren@kumari.net Joel Jaeggli Zynga 675 East Middlefield Mountain View, CA USA Email: jjaeggli@zynga.com Ronald P Bonica Juniper Networks 2251 Corporate Park Drive Herndon, VA USA Email:internet-drafts@bonica.orgrbonica@juniper.net