home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_n_r / draft-richardson-ipsec-pmtu-discov-00.txt < prev    next >
Text File  |  1997-07-16  |  13KB  |  412 lines

  1. Network Working Group      Michael Richardson mcr@sandelman.ottawa.on.ca
  2. INTERNET-DRAFT                               SSH Communications Security
  3. draft-richardson-ipsec-pmtu-discov-00.txt             v1.1, 30 June 1997
  4. Expires in six months
  5.  
  6.  
  7.         Path MTU discovery in the presence of security gateways
  8.  
  9. Status of This memo
  10.  
  11. This document is an Internet-Draft. Internet-Drafts are working
  12. documents of the Internet Engineering Task Force (IETF), its areas,
  13. and its working groups. Note that other groups may also distribute
  14. working documents as Internet-Drafts.
  15.  
  16. Internet-Drafts are draft documents valid for a maximum of six
  17. months and may be updated, replaced, or obsoleted by other documents
  18. at any time. It is inappropriate to use Internet-Drafts as reference
  19. material or to cite them other than as ``work in progress.''
  20.  
  21. To learn the current status of any Internet-Draft, please check
  22. the ``1id-abstracts.txt'' listing contained in the Internet-Drafts
  23. Shadow Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
  24. munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast),
  25. or ftp.isi.edu (US West Coast).
  26.  
  27. Abstract
  28.  
  29. This document describes the problem of getting accurate Path MTU infor-
  30. mation in the presence of untrusted routers. Typical Path MTU discovery
  31. is done by sending packets with the don't fragment bit set, and listen-
  32. ing for ICMP messages from routers that want to fragment the packets.
  33. Unfortunately, these messages could be forged, and IPsec based security
  34. system(s) can not pass make direct use of these messages. An alternate,
  35. backwards compatible algorithm is suggested.
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Michael Richardson mcr@sandelman.ottawa.on.ca                   [page 1]
  59.  
  60. INTERNET-DRAFT                                        v1.1, 30 June 1997
  61.  
  62. Table of Contents
  63.  
  64. 1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . .  2
  65.   1.1.  Definition of terminology   . . . . . . . . . . . . . . . . .  2
  66. 2.  Introduction to the problem   . . . . . . . . . . . . . . . . . .  2
  67.   2.1.  Requirement for PMTU information  . . . . . . . . . . . . . .  3
  68. 3.  Authenticated PMTU information  . . . . . . . . . . . . . . . . .  4
  69.   3.1.  Proposal one  . . . . . . . . . . . . . . . . . . . . . . . .  4
  70.   3.2.  Proposal two  . . . . . . . . . . . . . . . . . . . . . . . .  4
  71.   3.3.  Differences   . . . . . . . . . . . . . . . . . . . . . . . .  5
  72. 4.  Limits to this solution: IPv6   . . . . . . . . . . . . . . . . .  5
  73. 5.  Security Considerations:  . . . . . . . . . . . . . . . . . . . .  6
  74. 6.  References:   . . . . . . . . . . . . . . . . . . . . . . . . . .  6
  75.   6.1.  Author's Address  . . . . . . . . . . . . . . . . . . . . . .  6
  76.   6.2.  Expiration and File Name  . . . . . . . . . . . . . . . . . .  6
  77.  
  78.  
  79.  
  80. 1.  Introduction
  81.  
  82. 1.1.  Definition of terminology
  83.  
  84. Here is a network of two security gateways, a client node and a server
  85. node.
  86.  
  87.                   C---{G1}--{R1}--{R2}...{R3}--{R4}...{Rn}--{G2}---S
  88.  
  89.             C is the TCP initiator.
  90.             G1/G1 are security gateways.
  91.             Rx are routers.
  92.             .. is a link with a restricted MTU.
  93.             S is the TCP listener.
  94.  
  95. There are both TCP endpoints and security association end points, they
  96. will be distinguished with the following terms:
  97.  
  98.    C  is the transport layer originator. TLO
  99.  
  100.    S  is the transport layer target.     TLT
  101.  
  102.    C/G1
  103.       is a network layer originator/target pair. NLO/NLT/
  104.  
  105.    G1/G2
  106.       is a network layer originator/target pair.
  107.  
  108.    G2/S
  109.       is a network layer originator/target pair.
  110.  
  111. 2.  Introduction to the problem
  112.  
  113. RFC1191 describes a mechanism for finding the maximum transmission unit
  114. of an arbitrary internet path. It says:
  115.  
  116.  
  117. Michael Richardson mcr@sandelman.ottawa.on.ca                   [page 2]
  118.  
  119. INTERNET-DRAFT                                        v1.1, 30 June 1997
  120.  
  121.           The basic idea is that a source host initially assumes that
  122.           the PMTU of a path is the (known) MTU of its first hop, and
  123.           sends all datagrams on that path with the DF bit set.  If
  124.           any of the datagrams are too large to be forwarded without
  125.           fragmentation by some router along the path, that router
  126.           will discard them and return ICMP Destination Unreachable
  127.           messages with a code meaning "fragmentation needed and DF
  128.           set" 7.  Upon receipt of such a message (henceforth called a
  129.           "Datagram Too Big" message), the source host reduces its
  130.           assumed PMTU for the path.
  131.  
  132. The are several problems:
  133.  
  134. 1. the ICMP "Datagram Too Big" messages are sent from a intermiate
  135.    router (Rx in the diagram) to the gateway machine. They are not
  136.    authenticated in anyway, nor does it appear that there is any
  137.    reasonable way for the routers to prove they are legitimate members
  138.    of the routing path.
  139.  
  140.    An attacker could influence the MTU used, possibly reducing the MTU
  141.    of the route to an unacceptably low value. This may consistute
  142.    unacceptably bad service. This is an issue to the Internet Metrics
  143.    WG.
  144.  
  145.    A too high an MTU would result in excessive fragmentation, which on a
  146.    loosy link, may result in very high retransmission rates. IPsec
  147.    tunnels do not retransmit encrypted packets, rather they depend on
  148.    the TLO node to do a retransmit, so retransmitted packets result in
  149.    higher encryption loads as well. A gateway with limited CPU may start
  150.    discarding more datagram fragments as it spends more time encrypting.
  151.  
  152. 2. the PMTU information in the ICMP messages is difficult to relay back
  153.    to the TCP/UDP (or other) stacks of the sending node. So, nodes C and
  154.    S continue to send using whatever MTU they started with. This defeats
  155.    the point of doing PMTU in conjunction with IPsec.
  156.  
  157. 3. it would be preferable to IPsec gateways for TLO nodes to have PMTU
  158.    available. This allows the IPsec gateway to ask the TLO node to
  159.    reduce its PMTU by the amount of overhead the ESP takes. Otherwise,
  160.    the resulting ESP datagram has to be fragmented.
  161.  
  162. There are two path MTUs:
  163.  
  164. 1. the TLO/TLT PMTU
  165.  
  166. 2. the NLO/NLT PMTU
  167.  
  168. The ideal transport layer PMTU is the NLx PMTU minus the overhead of the
  169. ESP header and transform. For rfc1829 ESP this number is 36 bytes, for
  170. the KSM draft ESP rfcXXXX this is 52 bytes (for DES, DES/HMAC-MD5-96).
  171.  
  172. 2.1.  Requirement for PMTU information
  173.  
  174.  
  175.  
  176. Michael Richardson mcr@sandelman.ottawa.on.ca                   [page 3]
  177.  
  178. INTERNET-DRAFT                                        v1.1, 30 June 1997
  179.  
  180. The information must be authenticated. This implies that none of the
  181. routers Rx may provide this information. It must come from either
  182. nodes/routers on the trusted side, or from the gateways themselves.
  183.  
  184. Only the two gateway nodes know the effective number of bytes of
  185. overhead.
  186.  
  187. Only the decrypting node can observe the fragmentation resulting from
  188. the sequence of routers, R1..Rn.
  189.  
  190. IPv6 does not allow for intermediate routers to fragment packets. Only
  191. the originating node may do so. Intermediate routers MUST send ICMP
  192. Datagram Too Big messages, and drop the packet. It should be noted,
  193. again, that there are two originators: C and G1.
  194.  
  195. 3.  Authenticated PMTU information
  196.  
  197. Both proposal one and two must be adapted slightly for IPv6. This is
  198. discussed later.
  199.  
  200. 3.1.  Proposal one
  201.  
  202. Gateway G1 MUST drop all non-local ICMP Host Unreachable datagrams
  203. (including "Datagram too bid") which arrive on its unprotected
  204. interface. The gateway MAY accept ICMP packets that are addressed to
  205. itself.
  206.  
  207. ICMP datagrams arriving via an authenticated (whether encrypted or not,
  208. depending only policy) at G1 SHOULD be passed to their destination node
  209. as normal.
  210.  
  211. Gateway G2 upon receiving an ESP or AH packet that needs to be
  212. reassembled, MUST take note of the size largest fragment received. This
  213. value is compared to the previous largest fragment size. If this size
  214. has changed by more than 10%, or more than 2*MSL time (i.e. 2 minutes)
  215. has passed since the previous ICMP message, then an ICMP Datagram Too
  216. Big message is generated. The largest fragment size is initialized to
  217. 576 bytes.
  218.  
  219. The ICMP datagram is addressed from gateway G2 to the originating node
  220. C, and gives a size that is based on the maximum fragment size (above),
  221. minus the IPsec overhead. The ICMP datagram is sent via the tunnel on
  222. which the IPsec packet was a member. I.e. the ICMP is encapsulated.
  223.  
  224. A packet arriving at G1 with the DF bit set, does not cause the DF bit
  225. to be set on the encapsulating datagram.
  226.  
  227. 3.2.  Proposal two
  228.  
  229. Gateway G1 MUST drop all non-local ICMP Host Unreachable datagrams
  230. (including "Datagram too bid") which arrive on its unprotected
  231. interface. The gateway MAY accept ICMP packets that are addressed to
  232. itself.
  233.  
  234.  
  235. Michael Richardson mcr@sandelman.ottawa.on.ca                   [page 4]
  236.  
  237. INTERNET-DRAFT                                        v1.1, 30 June 1997
  238.  
  239. ICMP datagrams arriving via an authenticated (whether encrypted or not,
  240. depending only policy) at G1 SHOULD be passed to their destination node
  241. as normal.
  242.  
  243. Gateway G1 MUST maintain a PMTU value with its SPI/Security Association
  244. state. Packets arriving from node C with the DF bit set, and that are
  245. bigger than the PMTU value, MUST be discarded, and an ICMP Datagram Too
  246. Big message sent. In other words, the security gateway acts as a router
  247. would if the IPsec tunnel were in fact a physical interface. The PMTU
  248. value is initialized to either to the MTU of the interface on which
  249. outgoing ESP packets would travel, minus the ESP overhead.
  250.  
  251. Gateway G2 upon receiving an ESP or AH packet that needs to be
  252. reassembled, MUST take note of the size largest fragment received. This
  253. value is compared to the previous largest fragment size. If this size
  254. has changed by more than 10%, or more than 2*MSL time (i.e. 2 minutes)
  255. has passed since the previous ICMP message, then an ICMP Datagram Too
  256. Big message is generated. The largest fragment size is initialize to
  257. 576.
  258.  
  259. The ICMP datagram is addressed from gateway G2 to gateway G1, and gives
  260. a size that is based on the maximum fragment size (above), minus the
  261. IPsec overhead. The ICMP datagram is sent via the tunnel on which the
  262. IPsec packet was a member. I.e. the ICMP is encapsulated and encrypted.
  263.  
  264. A packet arriving at G1 with the DF bit set (but fitting in the MTU of
  265. the SA), does not cause the DF bit to be set on the encapsulating
  266. datagram. If the DF bit was copied, and a routing change reduced the
  267. PTMU, the datagram to be dropped, and never reach G2, so news of the
  268. PMTU change would not be relayed.
  269. 3.3.  Differences
  270.  
  271. This section is still under construction. Input is requested:
  272.  
  273. 1. the ICMP is generated by the near router in proposal two.
  274.  
  275. 2. the ICMP in the tunnel potentially carries addresses which would not
  276.    satisfy filtering rules.
  277.  
  278. 4.  Limits to this solution: IPv6
  279.  
  280. The major problem in the IPv6 case is that the far end gateway G2 will
  281. not see no packets if the PMTU estimate is too big. An ICMP will only be
  282. received by G1 if the PMTU estimate is small enough to transit all
  283. routers.
  284.  
  285. In order to grow the PMTU, either initially, or to take advantage of a
  286. routing change, the gateway G1 must therefore send probe packets of a
  287. larger size, knowing that the packet will be lost if the probe is too
  288. big. There are other reasons why the packet, or the response may be
  289. lost, so the probe must be done again anyway.
  290.  
  291. Further, the path may suddendly experience a drop in PMTU due to a
  292.  
  293.  
  294. Michael Richardson mcr@sandelman.ottawa.on.ca                   [page 5]
  295.  
  296. INTERNET-DRAFT                                        v1.1, 30 June 1997
  297.  
  298. routing change. In that case, no packets will be received at G2, so G1
  299. must also occasionally send probes of a smaller size if it hasn't
  300. received an ICMP message in 2*MSL time. (note, this number is probably
  301. too big)
  302.  
  303. Making smaller packets is easy: the gateway can use the fragmentation
  304. facilities of IPv6 to split up an encrypted packet. A larger packet can
  305. be produced by adding more padding before encryption.
  306.  
  307. 5.  Security Considerations:
  308.  
  309. This entire document discusses a security protocol.
  310.  
  311. 6.  References:
  312.  
  313.    RFC-1825
  314.       R. Atkinson, "Security Architecture for the Internet Protocol",
  315.       RFC-1825, August 1995.
  316.  
  317.    RFC-1191
  318.       J. Mogul, S. Deering, "Path MTU Discovery", RFC-1191, November
  319.       1990.
  320.  
  321.    KSM-AH
  322.       New AH draft.
  323.  
  324.    metrics
  325.       I. M. ISP, "How fast can it go?", draft-ietf-metrics-00.txt, work
  326.       in progress: Jan. 20, 1997
  327.  
  328.    Gupta97-1
  329.       V. Gupta, S. Glass, "Firewall Traversal for Mobile IP: Goals and
  330.       Requirements", draft-ietf-mobileip-ft-req-00.txt, work in
  331.       progress: Jan. 20, 1997
  332.  
  333.    Gupta97-2
  334.       V. Gupta, S. Glass, "Firewall Traversal for Mobile IP: Guidelines
  335.       for Firewalls and Mobile IP entities", draft-ietf-mobileip-
  336.       firewall-trav-00.txt, work in progress: March 17, 1997
  337.  
  338. 6.1.  Author's Address
  339.  
  340.              Michael C. Richardson
  341.              Sandelman Software Works Corp.
  342.              152 Rochester Street
  343.              Ottawa, ON K1R 7M4
  344.              Canada
  345.  
  346.              Telephone:   +1 613 233-6809
  347.              EMail:       mcr@sandelman.ottawa.on.ca
  348.  
  349. 6.2.  Expiration and File Name
  350.  
  351.  
  352.  
  353. Michael Richardson mcr@sandelman.ottawa.on.ca                   [page 6]
  354.  
  355. INTERNET-DRAFT                                        v1.1, 30 June 1997
  356.  
  357. This draft expires January 9, 1997
  358.  
  359. Its file name is draft-richardson-ipsec-pmtu-disocovery-00.txt
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411. Michael Richardson mcr@sandelman.ottawa.on.ca                   [page 7]
  412.