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-rfced-info-hurn-01.txt < prev    next >
Text File  |  1996-08-08  |  11KB  |  287 lines

  1. Network Working Group                                           M. Hurn
  2. INTERNET-DRAFT                                               August, 96 
  3. Category: Informational                            Expire in six months 
  4. <draft-rfced-info-hurn-01.txt>
  5.  
  6.  
  7.                          Extending NAT
  8.  
  9. Status of this Memo
  10.  
  11.    This memo provides information for the Internet community.
  12.    This memo does not specify an Internet standard of any kind.
  13.    Distribution of this memo is unlimited.
  14.  
  15.    This document is an Internet Draft.  Internet Drafts are working
  16.    documents of the Internet Engineering Task Force (IETF), its Areas,
  17.    and its Working Groups. Note that other groups may also distribute
  18.    working documents as Internet Drafts.
  19.  
  20.    Internet Drafts are draft documents valid for a maximum of six
  21.    months.  Internet Drafts may be updated, replaced, or obsoleted by
  22.    other documents at any time.  It is not appropriate to use Internet
  23.    Drafts as reference material or to cite them other than as a
  24.    "workingdraft" or "work in progress."
  25.  
  26.    To learn the current status of any Internet-Draft, please check the
  27.    "1id-abstracts.txt" listing contained in the internet-drafts Shadow
  28.    Directories on:
  29.  
  30.          ftp.is.co.za (Africa)
  31.          nic.nordu.net (Europe)
  32.          ds.internic.net (US East Coast)
  33.          ftp.isi.edu (US West Coast)
  34.          munnari.oz.au (Pacific Rim)
  35.  
  36.  
  37. Synopsis
  38.  
  39. This document describes how the addressing scheme of the 'IP Network
  40. Address Translator (NAT) [1] could be extended.  The extension takes
  41. advantage of the fact that the source port number in a full TCP/IP
  42. packet can be any value the originating host is not currently using.  It
  43. also exploits the fact that (nearly) all the networking software will
  44. work with DNS.  By using DNS and proxies the ENAT systems perform the
  45. address translation indirectly.
  46.  
  47. For convenience the term ENAT will be used for the extended addressing
  48. scheme to distinguish it from the original.  A ENAT system could be used
  49. equally for UDP/IP as well as TCP/IP.  ICMP can be handled with
  50. restrictions.
  51.  
  52.  
  53. Table of Contents
  54.  
  55.         Status of this Memo        1
  56.         Synopsis                   1
  57.         Introduction               1
  58.         Simple protocols           2
  59.         ENAT with DNS              3
  60.         ICMP                       4
  61.         DNS Only                   5
  62.         References                 5
  63.         Security Considerations    5
  64.         Author's Address           5
  65.  
  66.  
  67. Introduction
  68.  
  69. Where NAT systems use a pool of IP addresses an ENAT system would use a
  70. pool of source ports.
  71.  
  72. To give an example I will assume that the ENAT system is using a single
  73. class C address space (e.g. 192.168.142.x from RFC1597) on its LAN
  74. segment.  To help with the explanation all IP addresses will use 3 ASCII
  75. characters (001-254) giving a 15 character string for the address.
  76.  
  77. On the LAN interface the ENAT systems will use 192.168.142.001.  The
  78. rest 192.168.142.002 to 192.168.142.254 can be manually or dynamically
  79. assigned to the PC's by the ENAT system using DHCP [2]. (Dynamic
  80. assignment is the preferred option.)
  81.  
  82. For the WAN interface the ENAT system could use a manually or
  83. dynamically assigned IP address from the user's ISP.
  84.  
  85. It is intended that a ENAT system will work as a DNS server (see below)
  86. as well as a (cashing as appropriate) proxy server for the applications
  87. that the system supports (e.g. mail, web etc).  By using cashing proxies
  88. the ENAT system will reduce the need for address translation.
  89.  
  90. The complexity of implementing a ENAT system is greatly reduced by
  91. restricting all network access through the system to using DNS.
  92.  
  93. Please treat this document as a catalyst as I expect there are better
  94. and/or alternative ways to achieve the functionally that I have outlined
  95. below.
  96.  
  97.  
  98. Without DNS
  99.  
  100. For simple protocols the ENAT system could dynamically translate the
  101. address and port used by the PC; to the IP address of the WAN interface
  102. and an unused port number.  This is also known as IP Masquerading.
  103.  
  104. In the following examples the IP addresses will be prefixed to indicate
  105. Source/Destination address and have the port number indicated thus (42).
  106.  
  107.      PC1    Host1          Host2   Host3    PC2     PC3
  108.    ...101  ...102         ...101  ...102  ...103  ...104
  109.     |        |                |       |       |       |
  110.    ------------              ---------------------------
  111.         |  192.168.142.                 |  192.168.142.
  112.         |                               |
  113.       ...001                         ...001
  114.     +-------+                      +-------+
  115.     | ENAT1 |                      | ENAT2 |
  116.     +-------+                      +-------+
  117.  172.016.042.056                172.030.005.060
  118.         |                              |
  119.      /----------------------------------------\
  120.      |             The Internet               |
  121.      \----------------------------------------/
  122.                        |
  123.                  010.234.055.046
  124.                      Host4
  125.  
  126. A Telnet (23) exchange between PC2 and Host4
  127.  
  128. PC2 to ENAT2     S192.168.142.103(456) D010.234.055.046(23)
  129. ENAT2 to Host4   S172.030.005.060(753) D010.234.055.046(23)
  130.  
  131. Host4 to ENAT2   S010.234.055.046(23) D172.030.005.060(753)
  132. ENAT2 to PC2     S010.234.055.046(23) D192.168.142.103(456)
  133.  
  134. A Telnet (23) exchange between PC3 and Host4
  135.  
  136. PC2 to ENAT2     S192.168.142.104(456) D010.234.055.046(23)
  137. ENAT2 to Host4   S172.030.005.060(754) D010.234.055.046(23)
  138.  
  139. Host4 to ENAT2   S010.234.055.046(23) D172.030.005.060(754)
  140. ENAT2 to PC2     S010.234.055.046(23) D192.168.142.104(456)
  141.  
  142. A Telnet (23) exchange between PC1 and Host2
  143.  
  144. PC1 to ENAT1     S192.168.142.101(120) D172.030.005.060(23)
  145. ENAT1 to ENAT2   S172.016.042.056(522) D172.030.005.060(23)
  146. ENAT2 to Host2   S172.016.042.056(522) D192.168.142.101(23)
  147.  
  148. Host2 to ENAT2   S192.168.142.101(23) D172.016.042.056(522)
  149. ENAT2 to ENAT1   S172.030.005.060(23) D172.016.042.056(522)
  150. ENAT1 to PC1     S172.030.005.060(23) D192.168.142.101(120)
  151.  
  152. Note, the port number for the service (23) remains intact.  From client
  153. to server its in the destination address, and in the source address when
  154. its server to client.
  155.  
  156. This implies that ENAT systems have a look-up table which maps
  157. service(port number) to the local host that provides that service.  It
  158. also means that for each service there can only be ONE host that is on
  159. an ENAT connected network that can be used to provided a given service
  160. to the external networks.  In the above example all Telnet requests
  161. (from the Internet) to the ENAT2 site will go to Host2.
  162.  
  163.  
  164. ENAT with DNS
  165.  
  166. In the case where the protocol can imbed the source and destination
  167. addresses within the data packets, for example FTP.  Simple address
  168. translation has problems See RFC 1631 [ref. 1], as such it is not
  169. recommended by the author.
  170.  
  171. One option that can overcome the problems with simple address
  172. translation is to use DNS, a phantom segment and proxy servers.  The
  173. proxy servers work at the application level and only pass data between
  174. input and output in this way the problem of imbedded address information
  175. is avoided.  In the explanation below I will continue to describe Telnet
  176. secessions for simplicity and continuity.
  177.  
  178.     L1       L2     Ln           P1      P2      P3      Pn
  179.     |        |      |            :       :       :       :
  180.    ----------------------       ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  181.                        |         :
  182.                      +-------------+
  183.                      |    ENAT     |
  184.                      +-------------+
  185.                             |
  186.          /----------------------------------------\
  187.          |             The Internet               |
  188.          \----------------------------------------/
  189.             |        |       |      |        |
  190.             R1       R2      R3     R4       Rn
  191.  
  192. Where L1 to Ln Local Hosts           L1 IP Address 192.168.142.101
  193.       P1 to Pn Phantom Hosts         P1 IP Address 172.024.000.001
  194.       R1 to Rn Remote Hosts          R1 IP Address 010.234.055.201
  195.                                ENAT WAN IP Address 172.016.042.056
  196.  
  197. A sample secession L1 to R1
  198.  
  199. Local Host L1 makes a DNS request for the IP address of Remote Host R1.
  200. The ENAT system forwards the request to the Internet.  When the address
  201. has been resolved, the ENAT system returns the Phantom IP address P1 to
  202. host L1 and keeps the true IP address of R1 in a look-up table.
  203.  
  204. The packet flow becomes:
  205.  
  206.     L1 to ENAT(P1)    S192.168.142.101(567) D172.024.000.001(23)
  207.     ENAT(WAN) to R1   S172.016.042.056(753) D010.234.055.201(23)
  208.  
  209.     R1 to ENAT(WAN)   S010.234.055.201(23) D172.016.042.056(753)
  210.     ENAT(P1) to L1    S172.024.000.001(23) D192.168.142.101(567)
  211.  
  212. In practice this is two telnet secessions L1 to ENAT(P1) and ENAT(WAN)
  213. to R1.
  214.  
  215.     L1 to ENAT(P1)    S192.168.142.101(567) D172.024.000.001(23)
  216.     ENAT(P1) to L1    S172.024.000.001(23) D192.168.142.101(567)
  217.  
  218.     and
  219.  
  220.     ENAT(WAN) to R1   S172.016.042.056(753) D010.234.055.201(23)
  221.     R1 to ENAT(WAN)   S010.234.055.201(23) D172.016.042.056(753)
  222.  
  223. The ENAT system works as a proxy server between the Phantom and WAN
  224. interfaces.  The following examples show that an ENAT system could
  225. handle multiple secessions without breaking the protocol.
  226.  
  227. L2 to R1
  228.  
  229.     L2 to ENAT(P2)    S192.168.142.102(567) D172.024.000.002(23)
  230.     ENAT(WAN) to R1   S172.016.042.056(777) D010.234.055.201(23)
  231.  
  232.     R1 to ENAT(WAN)   S010.234.055.201(23) D172.016.042.056(777)
  233.     ENAT(P2) to L2    S172.024.000.002(23) D192.168.142.102(567)
  234.  
  235. L1 to R3
  236.  
  237.     L1 to ENAT(P3)    S192.168.142.101(555) D172.024.000.003(23)
  238.     ENAT(WAN) to R3   S172.016.042.056(888) D010.234.055.203(23)
  239.  
  240.     R3 to ENAT(WAN)   S010.234.055.203(23) D172.016.042.056(888)
  241.     ENAT(P3) to L1    S172.024.000.003(23) D192.168.142.101(555)
  242.  
  243.  
  244. ICMP
  245.  
  246. The ICMP messages that handle flow control to an affected interface will
  247. remain unchanged.  Pings will needed to be spoofed by the ENAT system.
  248. Upon receiving a users ping the ENAT system will send out a ping of its
  249. own and will only send a reply to the users ping when it has had its own
  250. ping returned.
  251.  
  252.  
  253. DNS Only
  254.  
  255. If the ENAT system is restricted to using DNS.  Then most of the code
  256. that is needed to turn a Unix system (for example) into a ENAT system
  257. will be at the application level.  The two main areas of system level
  258. programming will be the phantom segment driver and the modified DNS
  259. server.
  260.  
  261.  
  262. References
  263.  
  264. [1]    P. Francis, K. Egevang, "The IP Network Address
  265.         Translator (Nat)", RFC 1631.
  266.  
  267. [2]    Droms, R., "Dynamic Host Configuration Protocol", RFC
  268.         1541, Bucknell University, October 1993.
  269.  
  270. Security Considerations
  271.  
  272. Security issues are not discussed in this memo.
  273.  
  274. Author's Address
  275.  
  276. Mike Hurn
  277. 11 Blackstone Ave
  278. Eldene
  279. Swindon
  280. SN3 6DN
  281. England
  282.  
  283. Phone: +44 (0)1793 523759
  284. EMail: mikeh@bcs.org.uk
  285.  
  286.  
  287.