idnits 2.17.1 draft-ietf-ipsecme-ipsec-ha-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (May 12, 2010) is 5096 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- -- Obsolete informational reference (is this intentional?): RFC 4306 (Obsoleted by RFC 5996) -- Obsolete informational reference (is this intentional?): RFC 4718 (Obsoleted by RFC 5996) Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group Y. Nir 3 Internet-Draft Check Point 4 Intended status: Informational May 12, 2010 5 Expires: November 13, 2010 7 IPsec High Availability and Load Sharing Problem Statement 8 draft-ietf-ipsecme-ipsec-ha-03 10 Abstract 12 This document describes a requirement from IKE and IPsec to allow for 13 more scalable and available deployments for VPNs. It defines 14 terminology for high availability and load sharing clusters 15 implementing IKE and IPsec, and describes gaps in the existing 16 standards. 18 Status of this Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF). Note that other groups may also distribute 25 working documents as Internet-Drafts. The list of current Internet- 26 Drafts is at http://datatracker.ietf.org/drafts/current/. 28 Internet-Drafts are draft documents valid for a maximum of six months 29 and may be updated, replaced, or obsoleted by other documents at any 30 time. It is inappropriate to use Internet-Drafts as reference 31 material or to cite them other than as "work in progress." 33 This Internet-Draft will expire on November 13, 2010. 35 Copyright Notice 37 Copyright (c) 2010 IETF Trust and the persons identified as the 38 document authors. All rights reserved. 40 This document is subject to BCP 78 and the IETF Trust's Legal 41 Provisions Relating to IETF Documents 42 (http://trustee.ietf.org/license-info) in effect on the date of 43 publication of this document. Please review these documents 44 carefully, as they describe your rights and restrictions with respect 45 to this document. Code Components extracted from this document must 46 include Simplified BSD License text as described in Section 4.e of 47 the Trust Legal Provisions and are provided without warranty as 48 described in the Simplified BSD License. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 53 1.1. Conventions Used in This Document . . . . . . . . . . . . 3 54 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 55 3. The Problem Statement . . . . . . . . . . . . . . . . . . . . 5 56 3.1. Lots of Long Lived State . . . . . . . . . . . . . . . . . 5 57 3.2. IKE Counters . . . . . . . . . . . . . . . . . . . . . . . 5 58 3.3. Outbound SA Counters . . . . . . . . . . . . . . . . . . . 6 59 3.4. Inbound SA Counters . . . . . . . . . . . . . . . . . . . 6 60 3.5. Missing Synch Messages . . . . . . . . . . . . . . . . . . 7 61 3.6. Simultaneous use of IKE and IPsec SAs by Different 62 Members . . . . . . . . . . . . . . . . . . . . . . . . . 7 63 3.6.1. Outbound SAs using counter modes . . . . . . . . . . . 8 64 3.7. Different IP addresses for IKE and IPsec . . . . . . . . . 9 65 4. Security Considerations . . . . . . . . . . . . . . . . . . . 9 66 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 67 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 9 68 7. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . . 10 69 8. Informative References . . . . . . . . . . . . . . . . . . . . 10 70 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 11 72 1. Introduction 74 IKEv2, as described in [RFC4306] and [RFC4718], and IPsec, as 75 described in [RFC4301] and others, allows deployment of VPNs between 76 different sites as well as from VPN clients to protected networks. 78 As VPNs become increasingly important to the organizations deploying 79 them, there is a demand to make IPsec solutions more scalable and 80 less prone to down time, by using more than one physical gateway to 81 either share the load or back each other up. Similar demands have 82 been made in the past for other critical pieces of an organizations's 83 infrastructure, such as DHCP and DNS servers, web servers, databases 84 and others. 86 IKE and IPsec are in particular less friendly to clustering than 87 these other protocols, because they store more state, and that state 88 is more volatile. Section 2 defines terminology for use in this 89 document, and in the envisioned solution documents. 91 In general, deploying IKE and IPsec in a cluster requires such a 92 large amount of information to be synchronized among the members of 93 the cluster, that it becomes impractical. Alternatively, if less 94 information is synchronized, failover would mean a prolonged and 95 intensive recovery phase, which negates the scalability and 96 availability promises of using clusters. In Section 3 we will 97 describe this in more detail. 99 1.1. Conventions Used in This Document 101 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 102 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 103 document are to be interpreted as described in [RFC2119]. 105 2. Terminology 107 "Single Gateway" is an implementation of IKE and IPsec enforcing a 108 certain policy, as described in [RFC4301]. 110 "Cluster" is a set of two or more gateways, implementing the same 111 security policy, and protecting the same domain. Clusters exist to 112 provide both high availability through redundancy, and scalability 113 through load sharing. 115 "Member" is one gateway in a cluster. 117 "High Availability" is a condition of a system, not a configuration 118 type. A system is said to have high availability if its expected 119 down time is low. High availability can be achieved in various ways, 120 one of which is clustering. All the clusters described in this 121 document achieve high availability. 123 "Fault Tolerance" is a condition related to high availability, where 124 a system maintains service availability, even when a specified set of 125 fault conditions occur. In clusters, we expect the system to 126 maintain service availability, when one or more of the cluster 127 members fails. 129 "Completely Transparent Cluster" is a cluster where the occurence of 130 a fault is never visible to the peers. 132 "Partially Transparent Cluster" is a cluster where the occurence of a 133 fault may be visible to the peers. 135 "Hot Standby Cluster", or "HS Cluster" is a cluster where only one of 136 the members is active at any one time. This member is also referred 137 to as the the "active", whereas the others are referred to as "stand- 138 bys". [VRRP] is one method of building such a cluster. 140 "Load Sharing Cluster", or "LS Cluster" is a cluster where more than 141 one of the members may be active at the same time. The term "load 142 balancing" is also common, but it implies that the load is actually 143 balanced between the members, and we don't want to even imply that 144 this is a requirement. 146 "Failover" is the event where a one member takes over some load from 147 some other member. In a hot standby cluster, this hapens when a 148 standby memeber becomes active due to a failure of the former active 149 member, or because of an administrator command. In a load sharing 150 cluster this usually happens because of a failure of one of the 151 members, but certain load-balancing technologies may allow a 152 particular load (such as all the flows associated with a particular 153 child SA) to move from one member to another to even out the load, 154 even without any failures. 156 "Tight Cluster" is a cluster where all the members share an IP 157 address. This could be accomplished using configured interfaces with 158 specialized protocols or hardware, such as VRRP, or through the use 159 of multicast addresses, but in any case, peers need only be 160 configured with one IP address in the PAD. 162 "Loose Cluster" is a cluster where each member has a different IP 163 address. Peers find the correct member using some method such as DNS 164 queries or [REDIRECT]. In some cases, members IP addresses may be 165 allocated to other members at failover. 167 "Synch Channel" is a communications channel among the cluster 168 members, used to transfer state information. The synch channel may 169 or may not be IP based, may or may not be encrypted, and may work 170 over short or long distances. The security and physical 171 characteristics of this channel are out of scope for this document, 172 but it is a requirement that its use be minimized for scalability. 174 3. The Problem Statement 176 This document will make no attempt to describe the problems in 177 setting up a cluster. The following subsections describe the 178 problems related to the protocol itself. 180 We also ignore the problem of synchronizing the policy between 181 cluster members, as this is an administrative issue that is not 182 particular to either clusters or to IPsec. 184 Note that the interesting scenario here is VPN, whether tunneled 185 site-to-site or remote access. host-to-host transport mode is not 186 expected to benefit from this work. 188 3.1. Lots of Long Lived State 190 IKE and IPsec have a lot of long lived state: 191 o IKE SAs last for minutes, hours, or days, and carry keys and other 192 information. Some gateways may carry thousands to hundreds of 193 thousands of IKE SAs. 194 o IPsec SAs last for minutes or hours, and carry keys, selectors and 195 other information. Some gateways may carry hundreds of thousands 196 such IPsec SAs. 197 o SPD Cache entries. While the SPD is unchanging, the SPD cache 198 changes on the fly due to narrowing. Entries last at least as 199 long as the SAD entries, but tend to last even longer than that. 201 A naive implementation of a high availability cluster would have no 202 synchronized state, and a failover would produce an effect similar to 203 that of a rebooted gateway. [resumption] describes how new IKE and 204 IPsec SAs can be recreated in such a case. 206 3.2. IKE Counters 208 We can overcome the first problem described in Section 3.1, by 209 synchronizing states - whenever an SA is created, we can synch this 210 new state to all other members. However, those states are not only 211 long-lived, they are also ever changing. 213 IKE has message counters. A peer may not process message n until 214 after it has processed message n-1. Skipping message IDs is not 215 allowed. So a newly-active member needs to know the last message IDs 216 both received and transmitted. 218 Often, it is feasible to synchronize the IKE message counters for 219 every IKE exchange. This way, the newly active member knows what 220 messages it is allowed to process, and what message IDs to use on IKE 221 requests, so that peers process them. 223 3.3. Outbound SA Counters 225 ESP and AH have an optional anti-replay feature, where every 226 protected packet carries a counter number. Repeating counter numbers 227 is considered an attack, so the newly-active member must not use a 228 replay counter number that has already been used. The peer will drop 229 those packets as duplicates and/or warn of an attack. 231 Though it may be feasible to synchronize the IKE message counters, it 232 is almost never feasible to synchronize the IPsec packet counters for 233 every IPsec packet transmitted. So we have to assume that at least 234 for IPsec, the replay counter will not be up-to-date on the newly- 235 active member, and the newly-active member may repeat a counter. 237 A possible solution is to synch replay counter information, not for 238 each packet emitted, but only at regular intervals, say, every 10,000 239 packets or every 0.5 seconds. After a failover, the newly-active 240 member advances the counters for outbound SAs by 10,000. To the peer 241 this looks like up to 10,000 packets were lost, but this should be 242 acceptable, as neither ESP nor AH guarantee reliable delivery. 244 3.4. Inbound SA Counters 246 An even tougher issue, is the synchronization of packet counters for 247 inbound SAs. If a packet arrives at a newly-active member, there is 248 no way to determine whether this packet is a replay or not. The 249 periodic synch does not solve the problem at all, because suppose we 250 synchronize every 10,000 packets, and the last synch before the 251 failover had the counter at 170,000. It is probable, though not 252 certain, that packet number 180,000 has not yet been processed, but 253 if packet 175,000 arrives at the newly- active member, it has no way 254 of determining whether or not that packet has or has not already been 255 processed. The synchronization does prevent the processing of really 256 old packets, such as those with counter number 165,000. Ignoring all 257 counters below 180,000 won't work either, because that's up to 10,000 258 dropped packets, which may be very noticeable. 260 The easiest solution is to learn the replay counter from the incoming 261 traffic. This is allowed by the standards, because replay counter 262 verification is an optional feature. The case can even be made that 263 it is relatively secure, because non-attack traffic will reset the 264 counters to what they should be, so an attacker faces the dual 265 challenge of a very narrow window for attack, and the need to time 266 the attack to a failover event. Unless the attacker can actually 267 cause the failover, this would be very difficult. It should be 268 noted, though, that although this solution is acceptable as far as 269 RFC 4301 goes, it is a matter of policy whether this is acceptable. 271 Another possible solution to the inbound SA problem is to rekey all 272 child SAs following a failover. This may or may not be feasible 273 depending on the implementation and the configuration. 275 3.5. Missing Synch Messages 277 The synch channel is very likely not to be infallible. Before 278 failover is detected, some synchronization messages may have been 279 missed. For example, the active member may have created a new Child 280 SA using message n. The new information (entry in the SAD and update 281 to counters of the IKE SA) is sent on the synch channel. Still, with 282 every possible technology, the update may be missed before the 283 failover. 285 This is a bad situation, because the IKE SA is doomed. the newly- 286 active member has two problems: 287 o It does not have the new IPsec SA pair. It will drop all incoming 288 packets protected with such an SA. This could be fixed by sending 289 some DELETEs and INVALID_SPI notifications, if it wasn't for the 290 other problem... 291 o The counters for the IKE SA show that only request n-1 has been 292 sent. The next request will get the message ID n, but that will 293 be rejected by the peer. After a sufficient number of 294 retransmissions and rejections, the whole IKE SA with all 295 associated IPsec SAs will get dropped. 297 The above scenario may be rare enough that it is acceptable that on a 298 configuration with thousands of IKE SAs, a few will need to be 299 recreated from scratch or using session resumption techniques. 300 However, detecting this may take a long time (several minutes) and 301 this negates the goal of creating a high availability cluster in the 302 first place. 304 3.6. Simultaneous use of IKE and IPsec SAs by Different Members 306 For load sharing clusters, all active members may need to use the 307 same SAs, both IKE and IPsec. This is an even greater problem than 308 in the case of HA, because consecutive packets may need to be sent by 309 different members to the same peer gateway. 311 The solution to the IKE SA issue is up to the application. It's 312 possible to create some locking mechanism over the synch channel, or 313 else have one member "own" the IKE SA and manage the child SAs for 314 all other members. For IPsec, solutions fall into two broad 315 categories. 317 The first is the "sticky" category, where all communications with a 318 single peer, or all communications involving a certain SPD cache 319 entry go through a single peer. In this case, all packets that match 320 any particular SA go through the same member, so no synchronization 321 of the replay counter needs to be done. Inbound processing is a 322 "sticky" issue, because the packets have to be processed by the 323 correct member based on peer and SPI. Another issue is that 324 commodity load balancers will not be able to match the SPIs of the 325 encrypted side to the clear traffic, and so the wrong member may get 326 the the other half of the flow. 328 The other way, is to duplicate the child SAs, and have a pair of 329 IPsec SAs for each active member. Different packets for the same 330 peer go through different members, and get protected using different 331 SAs with the same selectors and matching the same entries in the SPD 332 cache. This has some shortcomings: 333 o It requires multiple parallel SAs, which the peer has no use for. 334 Section 2.8 or [RFC4306] specifically allows this, but some 335 implementation might have a policy against long term maintenance 336 of redundant SAs. 337 o Different packets that belong to the same flow may be protected by 338 different SAs, which may seem "weird" to the peer gateway, 339 especially if it is integrated with some deep inspection 340 middleware such as a firewall. It is not known whether this will 341 cause problems with current gateways. It is also impossible to 342 mandate against this, because the definition of "flow" varies from 343 one implementation to another. 344 o Reply packets may arrive with an IPsec SA that is not "matched" to 345 the one used for the outgoing packets. Also, they might arrive at 346 a different member. This problem is beyond the scope of this 347 document and should be solved by the application, perhaps by 348 forwarding misdirected packets to the correct gateway for deep 349 inspection. 351 3.6.1. Outbound SAs using counter modes 353 For SAs involving counter mode ciphers such as [CTR] or [GCM] there 354 is yet another complication. The initial vector for such modes must 355 never be repeated, and senders use methods such as counters or LFSRs 356 to ensure this. An SA shared between more than one active member, or 357 even failing over from one member to another need to make sure that 358 they do not generate the same initial vector. See [COUNTER_MODES] 359 for a discussion of this problem in another context. 361 3.7. Different IP addresses for IKE and IPsec 363 In many implementations there are separate IP addresses for the 364 cluster, and for each member. While the packets protected by tunnel 365 mode child SAs are encapsulated in IP headers with the cluster IP 366 address, the IKE packets originate from a specific member, and carry 367 that member's IP address. For the peer, this looks weird, as the 368 usual thing is for the IPsec packets to come from the same IP address 369 as the IKE packets. 371 One obvious solution, is to use some fancy capability of the IKE host 372 to change things so that IKE packets also come out of the cluster IP 373 address. This can be achieved through NAT or through assigning 374 multiple addresses to interfaces. This is not, however, possible for 375 all implementations. 377 [ARORA] discusses this problem in greater depth, and proposes another 378 solution, that does involve protocol changes. 380 4. Security Considerations 382 Implementations running on clusters MUST be as secure as 383 implementations running on single gateways. In other words, no 384 extension or interpretation used to allow operation in a cluster may 385 facilitate attacks that are not possible for single gateways. 387 Moreover, thought must be given to the synching requirements of any 388 protocol extension, to make sure that it does not create an 389 opportunity for denial of service attacks on the cluster. 391 As mentioned in Section 3.4, allowing an inbound child SA to fail 392 over to another member has the effect of disabling replay counter 393 protection for a short time. Though the threat is arguably low, it 394 is a policy decision whether this is acceptable. 396 5. IANA Considerations 398 This document has no actions for IANA. 400 6. Acknowledgements 402 This document is the collective work, and includes contribution from 403 many people who participate in the IPsecME working group. 405 The editor would particularly like to acknowledge the extensive 406 contribution of the following people (in alphabetical order): 407 Jitender Arora, Dan Harkins, Steve Kent, Tero Kivinen, Yaron Sheffer, 408 Melinda Shore, and Rodney Van Meter. 410 7. Change Log 412 NOTE TO RFC EDITOR: REMOVE THIS SECTION BEFORE PUBLICATION 414 Version 00 was identical to draft-nir-ipsecme-ipsecha-ps-00, re-spun 415 as an WG document. 417 Version 01 included closing issues 177, 178 and 180, with updates to 418 terminology, and added discussion of inbound SAs and the CTR issue. 420 Version 02 includes comments by Yaron Sheffer and the acknowledgement 421 section. 423 Version 03 fixes some ID-nitsi, and adds the problem presented by 424 Jitender Arora in [ARORA]. 426 8. Informative References 428 [ARORA] Arora, J. and P. Kumar, "Alternate Tunnel Addresses for 429 IKEv2", draft-arora-ipsecme-ikev2-alt-tunnel-addresses 430 (work in progress), April 2010. 432 [COUNTER_MODES] 433 McGrew, D. and B. Weis, "Using Counter Modes with 434 Encapsulating Security Payload (ESP) and Authentication 435 Header (AH) to Protect Group Traffic", 436 draft-ietf-msec-ipsec-group-counter-modes (work in 437 progress), March 2010. 439 [CTR] Housley, R., "Using Advanced Encryption Standard (AES) 440 Counter Mode", RFC 3686, January 2009. 442 [GCM] Viega, J. and D. McGrew, "The Use of Galois/Counter Mode 443 (GCM) in IPsec Encapsulating Security Payload (ESP)", 444 RFC 4106, June 2005. 446 [REDIRECT] 447 Devarapalli, V. and K. Weniger, "Redirect Mechanism for 448 IKEv2", RFC 5685, November 2009. 450 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 451 Requirement Levels", BCP 14, RFC 2119, March 1997. 453 [RFC4301] Kent, S. and K. Seo, "Security Architecture for the 454 Internet Protocol", RFC 4301, December 2005. 456 [RFC4306] Kaufman, C., "Internet Key Exchange (IKEv2) Protocol", 457 RFC 4306, December 2005. 459 [RFC4718] Eronen, P. and P. Hoffman, "IKEv2 Clarifications and 460 Implementation Guidelines", RFC 4718, October 2006. 462 [VRRP] Nadas, S., "Virtual Router Redundancy Protocol (VRRP)", 463 RFC 5798, March 2010. 465 [resumption] 466 Sheffer, Y. and H. Tschofenig, "IKEv2 Session Resumption", 467 RFC 5723, January 2010. 469 Author's Address 471 Yoav Nir 472 Check Point Software Technologies Ltd. 473 5 Hasolelim st. 474 Tel Aviv 67897 475 Israel 477 Email: ynir@checkpoint.com