home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 800s / rfc814.txt < prev    next >
Text File  |  1992-09-22  |  25KB  |  764 lines

  1.  
  2. RFC:  814
  3.  
  4.  
  5.  
  6.                    NAME, ADDRESSES, PORTS, AND ROUTES
  7.  
  8.                              David D. Clark
  9.                   MIT Laboratory for Computer Science
  10.                Computer Systems and Communications Group
  11.                                July, 1982
  12.  
  13.  
  14.      1.  Introduction
  15.  
  16.  
  17.      It has been said that the principal function of an operating system
  18.  
  19. is to define a number of different names for the same object, so that it
  20.  
  21. can  busy  itself  keeping  track of the relationship between all of the
  22.  
  23. different names.  Network protocols  seem  to  have  somewhat  the  same
  24.  
  25. characteristic.    In  TCP/IP,  there  are  several ways of referring to
  26.  
  27. things.  At the human visible  interface,  there  are  character  string
  28.  
  29. "names"  to  identify  networks,  hosts,  and  services.  Host names are
  30.  
  31. translated into network "addresses", 32-bit  values  that  identify  the
  32.  
  33. network  to  which  a  host is attached, and the location of the host on
  34.  
  35. that net.  Service names are translated into a "port identifier",  which
  36.  
  37. in  TCP  is  a  16-bit  value.    Finally, addresses are translated into
  38.  
  39. "routes", which are the sequence of steps a packet must  take  to  reach
  40.  
  41. the  specified  addresses.  Routes show up explicitly in the form of the
  42.  
  43. internet routing options, and also implicitly in the  address  to  route
  44.  
  45. translation tables which all hosts and gateways maintain.
  46.  
  47.  
  48.      This  RFC  gives  suggestions  and  guidance  for the design of the
  49.  
  50. tables and algorithms necessary to keep track of these various sorts  of
  51.  
  52. identifiers inside a host implementation of TCP/IP.
  53.  
  54.                                    2
  55.  
  56.  
  57.      2.  The Scope of the Problem
  58.  
  59.  
  60.      One  of the first questions one can ask about a naming mechanism is
  61.  
  62. how many names one can expect to encounter.  In order to answer this, it
  63.  
  64. is necessary to know something about the expected maximum  size  of  the
  65.  
  66. internet.  Currently, the internet is fairly small.  It contains no more
  67.  
  68. than  25  active  networks,  and no more than a few hundred hosts.  This
  69.  
  70. makes it possible to install tables which exhaustively list all of these
  71.  
  72. elements.  However, any implementation undertaken now should be based on
  73.  
  74. an assumption of a much  larger  internet.    The  guidelines  currently
  75.  
  76. recommended  are  an upper limit of about 1,000 networks.  If we imagine
  77.  
  78. an average number of 25 hosts per net,  this  would  suggest  a  maximum
  79.  
  80. number  of 25,000 hosts.  It is quite unclear whether this host estimate
  81.  
  82. is high or low, but even if it is off by several  factors  of  two,  the
  83.  
  84. resulting  number  is  still  large enough to suggest that current table
  85.  
  86. management strategies are unacceptable.  Some fresh techniques  will  be
  87.  
  88. required to deal with the internet of the future.
  89.  
  90.  
  91.      3.  Names
  92.  
  93.  
  94.      As the previous section suggests, the internet will eventually have
  95.  
  96. a  sufficient  number  of  names  that a host cannot have a static table
  97.  
  98. which provides a translation from every name to its associated  address.
  99.  
  100. There  are  several  reasons  other than sheer size why a host would not
  101.  
  102. wish to have such a table.  First, with that many names, we  can  expect
  103.  
  104. names  to  be  added  and deleted at such a rate that an installer might
  105.  
  106. spend all his time just revising the table.  Second, most of  the  names
  107.  
  108. will  refer  to  addresses  of  machines with which nothing will ever be
  109.  
  110.                                    3
  111.  
  112.  
  113. exchanged.  In fact, there may be whole networks with which a particular
  114.  
  115. host will never have any traffic.
  116.  
  117.  
  118.      To  cope  with  this  large  and  somewhat dynamic environment, the
  119.  
  120. internet is moving from its current position  in  which  a  single  name
  121.  
  122. table  is  maintained  by  the  NIC  and  distributed to all hosts, to a
  123.  
  124. distributed approach in which each network (or  group  of  networks)  is
  125.  
  126. responsible  for maintaining its own names and providing a "name server"
  127.  
  128. to translate between the names and the addresses in that network.   Each
  129.  
  130. host   is   assumed   to  store  not  a  complete  set  of  name-address
  131.  
  132. translations, but only a cache of recently used names.  When a  name  is
  133.  
  134. provided  by  a  user for translation to an address, the host will first
  135.  
  136. examine its local cache, and if  the  name  is  not  found  there,  will
  137.  
  138. communicate  with  an appropriate name server to obtain the information,
  139.  
  140. which it may then insert into its cache for future reference.
  141.  
  142.  
  143.      Unfortunately, the name server mechanism is not totally in place in
  144.  
  145. the internet yet, so for the moment, it is necessary to continue to  use
  146.  
  147. the  old  strategy of maintaining a complete table of all names in every
  148.  
  149. host.  Implementors, however, should structure this table in such a  way
  150.  
  151. that  it  is  easy  to  convert  later  to  a  name server approach.  In
  152.  
  153. particular, a reasonable programming strategy would be to make the  name
  154.  
  155. table  accessible  only  through  a subroutine interface, rather than by
  156.  
  157. scattering direct references to the table all through the code.  In this
  158.  
  159. way, it will be possible, at a later date,  to  replace  the  subroutine
  160.  
  161. with one capable of making calls on remote name servers.
  162.  
  163.  
  164.      A  problem  which  occasionally arises in the ARPANET today is that
  165.  
  166.                                    4
  167.  
  168.  
  169. the information in a local host table is out of date, because a host has
  170.  
  171. moved,  and a revision of the host table has not yet been installed from
  172.  
  173. the NIC.  In this case, one attempts to connect to a particular host and
  174.  
  175. discovers an unexpected machine at the address obtained from  the  local
  176.  
  177. table.    If  a  human is directly observing the connection attempt, the
  178.  
  179. error  is  usually  detected  immediately.    However,  for   unattended
  180.  
  181. operations  such as the sending of queued mail, this sort of problem can
  182.  
  183. lead to a great deal of confusion.
  184.  
  185.  
  186.      The nameserver scheme will only make this problem worse,  if  hosts
  187.  
  188. cache  locally  the  address associated with names that have been looked
  189.  
  190. up, because the host has no way of knowing when the address has  changed
  191.  
  192. and the cache entry should be removed.  To solve this problem, plans are
  193.  
  194. currently  under  way  to  define  a simple facility by which a host can
  195.  
  196. query a foreign address to determine what name  is  actually  associated
  197.  
  198. with  it.    SMTP already defines a verification technique based on this
  199.  
  200. approach.
  201.  
  202.  
  203.      4.  Addresses
  204.  
  205.  
  206.      The IP layer must know something about addresses.   In  particular,
  207.  
  208. when  a datagram is being sent out from a host, the IP layer must decide
  209.  
  210. where to send it on the immediately  connected  network,  based  on  the
  211.  
  212. internet address.  Mechanically, the IP first tests the internet address
  213.  
  214. to  see  whether  the network number of the recipient is the same as the
  215.  
  216. network number of the sender.  If so, the packet can be sent directly to
  217.  
  218. the final recipient.  If not, the datagram must be sent to a gateway for
  219.  
  220. further forwarding.  In this latter case,  a  second  decision  must  be
  221.  
  222.                                    5
  223.  
  224.  
  225. made, as there may be more than one gateway available on the immediately
  226.  
  227. attached network.
  228.  
  229.  
  230.      When  the  internet address format was first specified, 8 bits were
  231.  
  232. reserved  to  identify  the  network.     Early   implementations   thus
  233.  
  234. implemented  the  above  algorithm by means of a table with 256 entries,
  235.  
  236. one for each possible net, that specified the gateway of choice for that
  237.  
  238. net, with a special case entry for those nets  to  which  the  host  was
  239.  
  240. immediately connected.  Such tables were sometimes statically filled in,
  241.  
  242. which caused confusion and malfunctions when gateways and networks moved
  243.  
  244. (or crashed).
  245.  
  246.  
  247.      The  current  definition  of  the  internet  address provides three
  248.  
  249. different options for network numbering, with the  goal  of  allowing  a
  250.  
  251. very  large  number of networks to be part of the internet.  Thus, it is
  252.  
  253. no longer possible to imagine having an exhaustive  table  to  select  a
  254.  
  255. gateway  for any foreign net.  Again, current implementations must use a
  256.  
  257. strategy based on a local cache of  routing  information  for  addresses
  258.  
  259. currently being used.
  260.  
  261.  
  262.      The  recommended  strategy  for  address to route translation is as
  263.  
  264. follows.    When  the  IP  layer  receives  an  outbound  datagram   for
  265.  
  266. transmission,  it  extracts  the  network  number  from  the destination
  267.  
  268. address, and queries its local table to determine  whether  it  knows  a
  269.  
  270. suitable  gateway to which to send the datagram.  If it does, the job is
  271.  
  272. done.    (But  see  RFC  816  on  Fault  Isolation  and  Recovery,   for
  273.  
  274. recommendations  on  how  to  deal  with  the  possible  failure  of the
  275.  
  276. gateway.)  If there is no such entry in the local table, then select any
  277.  
  278.                                    6
  279.  
  280.  
  281. accessible  gateway at random, insert that as an entry in the table, and
  282.  
  283. use it to send the packet.  Either the guess will be right or wrong.  If
  284.  
  285. it is wrong, the gateway to which the packet was  sent  will  return  an
  286.  
  287. ICMP  redirect message to report that there is a better gateway to reach
  288.  
  289. the net in question.  The arrival  of  this  redirect  should  cause  an
  290.  
  291. update of the local table.
  292.  
  293.  
  294.      The  number  of  entries in the local table should be determined by
  295.  
  296. the maximum number of active connections which this particular host  can
  297.  
  298. support  at  any  one  time.  For a large time sharing system, one might
  299.  
  300. imagine a table with 100 or more entries.  For a personal computer being
  301.  
  302. used to support a single user telnet connection,  only  one  address  to
  303.  
  304. gateway association need be maintained at once.
  305.  
  306.  
  307.      The  above strategy actually does not completely solve the problem,
  308.  
  309. but only pushes it down one level, where the problem then arises of  how
  310.  
  311. a  new  host,  freshly  arriving  on  the  internet,  finds  all  of its
  312.  
  313. accessible gateways.  Intentionally, this problem is not  solved  within
  314.  
  315. the  internetwork  architecture.   The reason is that different networks
  316.  
  317. have drastically different strategies for allowing a host  to  find  out
  318.  
  319. about  other  hosts  on  its  immediate  network.    Some  nets permit a
  320.  
  321. broadcast mechanism.  In this case, a host can send out  a  message  and
  322.  
  323. expect  an  answer  back  from  all  of the attached gateways.  In other
  324.  
  325. cases, where a particular network  is  richly  provided  with  tools  to
  326.  
  327. support  the  internet, there may be a special network mechanism which a
  328.  
  329. host can invoke to determine where the gateways are.  In other cases, it
  330.  
  331. may be necessary for an installer to manually provide  the  name  of  at
  332.  
  333.                                    7
  334.  
  335.  
  336. least  one  accessible  gateway.  Once a host has discovered the name of
  337.  
  338. one gateway, it can build up a table of all other available gateways, by
  339.  
  340. keeping track of every gateway that has been reported back to it  in  an
  341.  
  342. ICMP message.
  343.  
  344.  
  345.      5.  Advanced Topics in Addressing and Routing
  346.  
  347.  
  348.      The  preceding  discussion  describes  the  mechanism required in a
  349.  
  350. minimal implementation,  an  implementation  intended  only  to  provide
  351.  
  352. operational  service  access  today to the various networks that make up
  353.  
  354. the internet.  For any host which will participate in  future  research,
  355.  
  356. as  contrasted  with  service,  some  additional  features are required.
  357.  
  358. These features will also be helpful for service hosts if  they  wish  to
  359.  
  360. obtain access to some of the more exotic networks which will become part
  361.  
  362. of  the internet over the next few years.  All implementors are urged to
  363.  
  364. at least provide a structure into which these features  could  be  later
  365.  
  366. integrated.
  367.  
  368.  
  369.      There   are   several  features,  either  already  a  part  of  the
  370.  
  371. architecture or now under development,  which  are  used  to  modify  or
  372.  
  373. expand  the  relationships  between addresses and routes.  The IP source
  374.  
  375. route options allow a host to explicitly direct  a  datagram  through  a
  376.  
  377. series of gateways to its foreign host.  An alternative form of the ICMP
  378.  
  379. redirect  packet  has  been  proposed,  which  would  return information
  380.  
  381. specific to a  particular  destination  host,  not  a  destination  net.
  382.  
  383. Finally, additional IP options have been proposed to identify particular
  384.  
  385. routes  within  the internet that are unacceptable.  The difficulty with
  386.  
  387. implementing these new features  is  that  the  mechanisms  do  not  lie
  388.  
  389.                                    8
  390.  
  391.  
  392. entirely within the bounds of IP.  All the mechanisms above are designed
  393.  
  394. to apply to a particular connection, so that their use must be specified
  395.  
  396. at  the  TCP level.  Thus, the interface between IP and the layers above
  397.  
  398. it must include mechanisms to allow passing this  information  back  and
  399.  
  400. forth,  and TCP (or any other protocol at this level, such as UDP), must
  401.  
  402. be prepared to store this  information.    The  passing  of  information
  403.  
  404. between IP and TCP is made more complicated by the fact that some of the
  405.  
  406. information,  in  particular  ICMP packets, may arrive at any time.  The
  407.  
  408. normal interface envisioned between TCP  and  IP  is  one  across  which
  409.  
  410. packets  can  be  sent  or received.  The existence of asynchronous ICMP
  411.  
  412. messages implies that there must be an additional  channel  between  the
  413.  
  414. two,  unrelated  to the actual sending and receiving of data.  (In fact,
  415.  
  416. there are many other ICMP messages which arrive asynchronously and which
  417.  
  418. must be passed from IP  up  to  higher  layers.    See  RFC  816,  Fault
  419.  
  420. Isolation and Recovery.)
  421.  
  422.  
  423.      Source  routes  are  already  in  use  in  the  internet,  and many
  424.  
  425. implementations will wish to be able to take advantage  of  them.    The
  426.  
  427. following  sorts  of  usages  should  be permitted.  First, a user, when
  428.  
  429. initiating a TCP connection, should be able to hand a source route  into
  430.  
  431. TCP,  which in turn must hand the source route to IP with every outgoing
  432.  
  433. datagram.  The user might initially obtain the source route by  querying
  434.  
  435. a  different  sort  of  name  server,  which would return a source route
  436.  
  437. instead of an address, or the user may have fabricated the source  route
  438.  
  439. manually.    A  TCP  which  is  listening  for a connection, rather than
  440.  
  441. attempting to open one, must be prepared to  receive  a  datagram  which
  442.  
  443. contains  a  IP return route, in which case it must remember this return
  444.  
  445. route, and use it as a source route on all returning datagrams.
  446.  
  447.                                    9
  448.  
  449.  
  450.      6.  Ports and Service Identifiers
  451.  
  452.  
  453.      The  IP  layer of the architecture contains the address information
  454.  
  455. which specifies the destination host to  which  the  datagram  is  being
  456.  
  457. sent.    In  fact, datagrams are not intended just for particular hosts,
  458.  
  459. but for particular agents within a host,  processes  or  other  entities
  460.  
  461. that  are  the  actual  source and sink of the data.  IP performs only a
  462.  
  463. very simple dispatching once the datagram  has  arrived  at  the  target
  464.  
  465. host,   it   dispatches  it  to  a  particular  protocol.    It  is  the
  466.  
  467. responsibility of that protocol handler,  for  example  TCP,  to  finish
  468.  
  469. dispatching  the  datagram  to the particular connection for which it is
  470.  
  471. destined.    This  next  layer  of  dispatching  is  done  using   "port
  472.  
  473. identifiers",  which  are  a  part  of  the  header  of the higher level
  474.  
  475. protocol, and not the IP layer.
  476.  
  477.  
  478.      This two-layer dispatching architecture has caused  a  problem  for
  479.  
  480. certain  implementations.    In  particular,  some  implementations have
  481.  
  482. wished to put the IP layer within the kernel of  the  operating  system,
  483.  
  484. and  the  TCP  layer  as  a  user  domain  application  program.  Strict
  485.  
  486. adherence to this partitioning can lead to grave  performance  problems,
  487.  
  488. for  the  datagram  must  first  be  dispatched from the kernel to a TCP
  489.  
  490. process, which then dispatches the datagram  to  its  final  destination
  491.  
  492. process.   The overhead of scheduling this dispatch process can severely
  493.  
  494. limit the achievable throughput of the implementation.
  495.  
  496.  
  497.      As is discussed in RFC 817, Modularity and Efficiency  in  Protocol
  498.  
  499. Implementations,  this  particular  separation  between  kernel and user
  500.  
  501. leads to other performance problems, even ignoring  the  issue  of  port
  502.  
  503.                                    10
  504.  
  505.  
  506. level  dispatching.   However, there is an acceptable shortcut which can
  507.  
  508. be taken to move the higher  level  dispatching  function  into  the  IP
  509.  
  510. layer, if this makes the implementation substantially easier.
  511.  
  512.  
  513.      In  principle,  every  higher level protocol could have a different
  514.  
  515. dispatching  algorithm.    The  reason  for  this  is  discussed  below.
  516.  
  517. However,  for  the  protocols  involved  in  the  service offering being
  518.  
  519. implemented today, TCP and UDP, the dispatching algorithm is exactly the
  520.  
  521. same, and the port field is located in precisely the same place  in  the
  522.  
  523. header.  Therefore, unless one is interested in participating in further
  524.  
  525. protocol  research,  there  is only one higher level dispatch algorithm.
  526.  
  527. This algorithm takes into account the internet  level  foreign  address,
  528.  
  529. the protocol number, and the local port and foreign port from the higher
  530.  
  531. level  protocol  header.  This algorithm can be implemented as a sort of
  532.  
  533. adjunct to the IP layer implementation, as long as no other higher level
  534.  
  535. protocols are to be implemented.  (Actually, the above statement is only
  536.  
  537. partially true, in that the UDP dispatch function is subset of  the  TCP
  538.  
  539. dispatch  function.  UDP dispatch depends only protocol number and local
  540.  
  541. port.  However, there is an occasion within TCP  when  this  exact  same
  542.  
  543. subset comes into play, when a process wishes to listen for a connection
  544.  
  545. from  any  foreign  host.    Thus,  the range of mechanisms necessary to
  546.  
  547. support TCP dispatch are also sufficient to support  precisely  the  UDP
  548.  
  549. requirement.)
  550.  
  551.  
  552.      The decision to remove port level dispatching from IP to the higher
  553.  
  554. level  protocol  has  been questioned by some implementors.  It has been
  555.  
  556. argued that if all of the address structure were part of the  IP  layer,
  557.  
  558.                                    11
  559.  
  560.  
  561. then IP could do all of the packet dispatching function within the host,
  562.  
  563. which  would  lead  to  a  simpler  modularity.    Three  problems  were
  564.  
  565. identified with this.  First, not all protocol implementors could  agree
  566.  
  567. on  the  size  of the port identifier.  TCP selected a fairly short port
  568.  
  569. identifier, 16 bits, to reduce  header  size.    Other  protocols  being
  570.  
  571. designed,  however, wanted a larger port identifier, perhaps 32 bits, so
  572.  
  573. that the port identifier, if  properly  selected,  could  be  considered
  574.  
  575. probabilistically  unique.    Thus,  constraining  the  port  id  to one
  576.  
  577. particular IP level mechanism would prevent certain  fruitful  lines  of
  578.  
  579. research.    Second,  ports  serve  a  special  function  in addition to
  580.  
  581. datagram delivery:   certain  port  numbers  are  reserved  to  identify
  582.  
  583. particular services.  Thus, TCP port 23 is the remote login service.  If
  584.  
  585. ports  were  implemented  at  the  IP level, then the assignment of well
  586.  
  587. known ports could not be done on a protocol basis, but would have to  be
  588.  
  589. done  in a centralized manner for all of the IP architecture.  Third, IP
  590.  
  591. was designed with a very simple layering role:    IP  contained  exactly
  592.  
  593. those functions that the gateways must understand.  If the port idea had
  594.  
  595. been  made a part of the IP layer, it would have suggested that gateways
  596.  
  597. needed to know about ports, which is not the case.
  598.  
  599.  
  600.      There are, of course, other ways  to  avoid  these  problems.    In
  601.  
  602. particular,  the  "well-known  port" problem can be solved by devising a
  603.  
  604. second mechanism, distinct from port  dispatching,  to  name  well-known
  605.  
  606. ports.   Several protocols have settled on the idea of including, in the
  607.  
  608. packet which sets up a  connection  to  a  particular  service,  a  more
  609.  
  610. general  service  descriptor,  such  as a character string field.  These
  611.  
  612. special  packets,  which  are  requesting  connection  to  a  particular
  613.  
  614.                                    12
  615.  
  616.  
  617. service,  are  routed on arrival to a special server, sometimes called a
  618.  
  619. "rendezvous server", which  examines  the  service  request,  selects  a
  620.  
  621. random  port  which  is to be used for this instance of the service, and
  622.  
  623. then passes the packet along to  the  service  itself  to  commence  the
  624.  
  625. interaction.
  626.  
  627.  
  628.      For  the  internet architecture, this strategy had the serious flaw
  629.  
  630. that it presumed all protocols would fit into the same service paradigm:
  631.  
  632. an initial setup phase, which might contain a certain overhead  such  as
  633.  
  634. indirect routing through a rendezvous server, followed by the packets of
  635.  
  636. the  interaction  itself,  which  would  flow  directly  to  the process
  637.  
  638. providing the service.  Unfortunately, not all high level  protocols  in
  639.  
  640. internet  were  expected to fit this model.  The best example of this is
  641.  
  642. isolated datagram exchange using UDP.  The simplest exchange in  UDP  is
  643.  
  644. one process sending a single datagram to another.  Especially on a local
  645.  
  646. net,  where  the  net  related overhead is very low, this kind of simple
  647.  
  648. single datagram interchange can be extremely efficient,  with  very  low
  649.  
  650. overhead  in  the  hosts.  However, since these individual packets would
  651.  
  652. not be part of an established connection, if  IP  supported  a  strategy
  653.  
  654. based  on  a  rendezvous  server and service descriptors, every isolated
  655.  
  656. datagram would have to  be  routed  indirectly  in  the  receiving  host
  657.  
  658. through  the  rendezvous  server, which would substantially increase the
  659.  
  660. overhead of processing, and every datagram would have to carry the  full
  661.  
  662. service  request  field,  which  would  increase  the size of the packet
  663.  
  664. header.
  665.  
  666.  
  667.      In general, if a network is intended for "virtual circuit service",
  668.  
  669.                                    13
  670.  
  671.  
  672. or  things similar to that, then using a special high overhead mechanism
  673.  
  674. for circuit setup makes sense.  However, current directions in  research
  675.  
  676. are  leading  away  from  this  class  of  protocol,  so  once again the
  677.  
  678. architecture  was  designed  not  to   preclude   alternative   protocol
  679.  
  680. structures.    The  only  rational  position  was  that  the  particular
  681.  
  682. dispatching strategy used should be part of the  higher  level  protocol
  683.  
  684. design, not the IP layer.
  685.  
  686.  
  687.      This  same  argument about circuit setup mechanisms also applies to
  688.  
  689. the design of the IP address structure.  Many protocols do not  transmit
  690.  
  691. a  full  address  field  as  part of every packet, but rather transmit a
  692.  
  693. short identifier which is created as part of a circuit setup from source
  694.  
  695. to destination.  If the full address needs to be  carried  in  only  the
  696.  
  697. first  packet  of  a long exchange, then the overhead of carrying a very
  698.  
  699. long address field can easily be justified.  Under these  circumstances,
  700.  
  701. one  can  create  truly extravagant address fields, which are capable of
  702.  
  703. extending to address almost  any  conceivable  entity.    However,  this
  704.  
  705. strategy  is  useable  only  in a virtual circuit net, where the packets
  706.  
  707. being transmitted are part of a  established  sequence,  otherwise  this
  708.  
  709. large  extravagant  address  must be transported on every packet.  Since
  710.  
  711. Internet explicitly rejected this restriction on  the  architecture,  it
  712.  
  713. was  necessary  to come up with an address field that was compact enough
  714.  
  715. to be sent in every datagram, but general enough to correctly route  the
  716.  
  717. datagram  through  the  catanet  without a previous setup phase.  The IP
  718.  
  719. address of 32 bits is the compromise that results.  Clearly it  requires
  720.  
  721. a  substantial  amount  of shoehorning to address all of the interesting
  722.  
  723. places in the universe with only 32 bits.  On the other  hand,  had  the
  724.  
  725.                                    14
  726.  
  727.  
  728. address  field  become  much  bigger,  IP would have been susceptible to
  729.  
  730. another criticism, which is that the header had grown unworkably  large.
  731.  
  732. Again, the fundamental design decision was that the protocol be designed
  733.  
  734. in  such  a way that it supported research in new and different sorts of
  735.  
  736. protocol architectures.
  737.  
  738.  
  739.      There are some limited restrictions imposed by the IP design on the
  740.  
  741. port mechanism selected by the higher level  process.    In  particular,
  742.  
  743. when  a packet goes awry somewhere on the internet, the offending packet
  744.  
  745. is returned, along with an error indication, as part of an ICMP  packet.
  746.  
  747. An  ICMP  packet  returns only the IP layer, and the next 64 bits of the
  748.  
  749. original datagram.  Thus, any higher level protocol which wishes to sort
  750.  
  751. out from which port a particular offending datagram came must make  sure
  752.  
  753. that  the  port information is contained within the first 64 bits of the
  754.  
  755. next level header.  This also means, in most cases, that it is  possible
  756.  
  757. to  imagine,  as  part  of the IP layer, a port dispatch mechanism which
  758.  
  759. works by masking and matching on the  first  64  bits  of  the  incoming
  760.  
  761. higher level header.
  762.  
  763.  
  764.