⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc814.txt

📁 RFC 相关的技术文档
💻 TXT
📖 第 1 页 / 共 2 页
字号:
RFC:  814                   NAME, ADDRESSES, PORTS, AND ROUTES                             David D. Clark                  MIT Laboratory for Computer Science               Computer Systems and Communications Group                               July, 1982     1.  Introduction     It has been said that the principal function of an operating systemis to define a number of different names for the same object, so that itcan  busy  itself  keeping  track of the relationship between all of thedifferent names.  Network protocols  seem  to  have  somewhat  the  samecharacteristic.    In  TCP/IP,  there  are  several ways of referring tothings.  At the human visible  interface,  there  are  character  string"names"  to  identify  networks,  hosts,  and  services.  Host names aretranslated into network "addresses", 32-bit  values  that  identify  thenetwork  to  which  a  host is attached, and the location of the host onthat net.  Service names are translated into a "port identifier",  whichin  TCP  is  a  16-bit  value.    Finally, addresses are translated into"routes", which are the sequence of steps a packet must  take  to  reachthe  specified  addresses.  Routes show up explicitly in the form of theinternet routing options, and also implicitly in the  address  to  routetranslation tables which all hosts and gateways maintain.     This  RFC  gives  suggestions  and  guidance  for the design of thetables and algorithms necessary to keep track of these various sorts  ofidentifiers inside a host implementation of TCP/IP.                                   2     2.  The Scope of the Problem     One  of the first questions one can ask about a naming mechanism ishow many names one can expect to encounter.  In order to answer this, itis necessary to know something about the expected maximum  size  of  theinternet.  Currently, the internet is fairly small.  It contains no morethan  25  active  networks,  and no more than a few hundred hosts.  Thismakes it possible to install tables which exhaustively list all of theseelements.  However, any implementation undertaken now should be based onan assumption of a much  larger  internet.    The  guidelines  currentlyrecommended  are  an upper limit of about 1,000 networks.  If we imaginean average number of 25 hosts per net,  this  would  suggest  a  maximumnumber  of 25,000 hosts.  It is quite unclear whether this host estimateis high or low, but even if it is off by several  factors  of  two,  theresulting  number  is  still  large enough to suggest that current tablemanagement strategies are unacceptable.  Some fresh techniques  will  berequired to deal with the internet of the future.     3.  Names     As the previous section suggests, the internet will eventually havea  sufficient  number  of  names  that a host cannot have a static tablewhich provides a translation from every name to its associated  address.There  are  several  reasons  other than sheer size why a host would notwish to have such a table.  First, with that many names, we  can  expectnames  to  be  added  and deleted at such a rate that an installer mightspend all his time just revising the table.  Second, most of  the  nameswill  refer  to  addresses  of  machines with which nothing will ever be                                   3exchanged.  In fact, there may be whole networks with which a particularhost will never have any traffic.     To  cope  with  this  large  and  somewhat dynamic environment, theinternet is moving from its current position  in  which  a  single  nametable  is  maintained  by  the  NIC  and  distributed to all hosts, to adistributed approach in which each network (or  group  of  networks)  isresponsible  for maintaining its own names and providing a "name server"to translate between the names and the addresses in that network.   Eachhost   is   assumed   to  store  not  a  complete  set  of  name-addresstranslations, but only a cache of recently used names.  When a  name  isprovided  by  a  user for translation to an address, the host will firstexamine its local cache, and if  the  name  is  not  found  there,  willcommunicate  with  an appropriate name server to obtain the information,which it may then insert into its cache for future reference.     Unfortunately, the name server mechanism is not totally in place inthe internet yet, so for the moment, it is necessary to continue to  usethe  old  strategy of maintaining a complete table of all names in everyhost.  Implementors, however, should structure this table in such a  waythat  it  is  easy  to  convert  later  to  a  name server approach.  Inparticular, a reasonable programming strategy would be to make the  nametable  accessible  only  through  a subroutine interface, rather than byscattering direct references to the table all through the code.  In thisway, it will be possible, at a later date,  to  replace  the  subroutinewith one capable of making calls on remote name servers.     A  problem  which  occasionally arises in the ARPANET today is that                                   4the information in a local host table is out of date, because a host hasmoved,  and a revision of the host table has not yet been installed fromthe NIC.  In this case, one attempts to connect to a particular host anddiscovers an unexpected machine at the address obtained from  the  localtable.    If  a  human is directly observing the connection attempt, theerror  is  usually  detected  immediately.    However,  for   unattendedoperations  such as the sending of queued mail, this sort of problem canlead to a great deal of confusion.     The nameserver scheme will only make this problem worse,  if  hostscache  locally  the  address associated with names that have been lookedup, because the host has no way of knowing when the address has  changedand the cache entry should be removed.  To solve this problem, plans arecurrently  under  way  to  define  a simple facility by which a host canquery a foreign address to determine what name  is  actually  associatedwith  it.    SMTP already defines a verification technique based on thisapproach.     4.  Addresses     The IP layer must know something about addresses.   In  particular,when  a datagram is being sent out from a host, the IP layer must decidewhere to send it on the immediately  connected  network,  based  on  theinternet address.  Mechanically, the IP first tests the internet addressto  see  whether  the network number of the recipient is the same as thenetwork number of the sender.  If so, the packet can be sent directly tothe final recipient.  If not, the datagram must be sent to a gateway forfurther forwarding.  In this latter case,  a  second  decision  must  be                                   5made, as there may be more than one gateway available on the immediatelyattached network.     When  the  internet address format was first specified, 8 bits werereserved  to  identify  the  network.     Early   implementations   thusimplemented  the  above  algorithm by means of a table with 256 entries,one for each possible net, that specified the gateway of choice for thatnet, with a special case entry for those nets  to  which  the  host  wasimmediately connected.  Such tables were sometimes statically filled in,which caused confusion and malfunctions when gateways and networks moved(or crashed).     The  current  definition  of  the  internet  address provides threedifferent options for network numbering, with the  goal  of  allowing  avery  large  number of networks to be part of the internet.  Thus, it isno longer possible to imagine having an exhaustive  table  to  select  agateway  for any foreign net.  Again, current implementations must use astrategy based on a local cache of  routing  information  for  addressescurrently being used.     The  recommended  strategy  for  address to route translation is asfollows.    When  the  IP  layer  receives  an  outbound  datagram   fortransmission,  it  extracts  the  network  number  from  the destinationaddress, and queries its local table to determine  whether  it  knows  asuitable  gateway to which to send the datagram.  If it does, the job isdone.    (But  see  RFC  816  on  Fault  Isolation  and  Recovery,   forrecommendations  on  how  to  deal  with  the  possible  failure  of thegateway.)  If there is no such entry in the local table, then select any                                   6accessible  gateway at random, insert that as an entry in the table, anduse it to send the packet.  Either the guess will be right or wrong.  Ifit is wrong, the gateway to which the packet was  sent  will  return  anICMP  redirect message to report that there is a better gateway to reachthe net in question.  The arrival  of  this  redirect  should  cause  anupdate of the local table.     The  number  of  entries in the local table should be determined bythe maximum number of active connections which this particular host  cansupport  at  any  one  time.  For a large time sharing system, one mightimagine a table with 100 or more entries.  For a personal computer beingused to support a single user telnet connection,  only  one  address  togateway association need be maintained at once.     The  above strategy actually does not completely solve the problem,but only pushes it down one level, where the problem then arises of  howa  new  host,  freshly  arriving  on  the  internet,  finds  all  of itsaccessible gateways.  Intentionally, this problem is not  solved  withinthe  internetwork  architecture.   The reason is that different networkshave drastically different strategies for allowing a host  to  find  outabout  other  hosts  on  its  immediate  network.    Some  nets permit abroadcast mechanism.  In this case, a host can send out  a  message  andexpect  an  answer  back  from  all  of the attached gateways.  In othercases, where a particular network  is  richly  provided  with  tools  tosupport  the  internet, there may be a special network mechanism which ahost can invoke to determine where the gateways are.  In other cases, itmay be necessary for an installer to manually provide  the  name  of  at                                   7least  one  accessible  gateway.  Once a host has discovered the name ofone gateway, it can build up a table of all other available gateways, bykeeping track of every gateway that has been reported back to it  in  anICMP message.     5.  Advanced Topics in Addressing and Routing     The  preceding  discussion  describes  the  mechanism required in aminimal implementation,  an  implementation  intended  only  to  provideoperational  service  access  today to the various networks that make upthe internet.  For any host which will participate in  future  research,as  contrasted  with  service,  some  additional  features are required.These features will also be helpful for service hosts if  they  wish  toobtain access to some of the more exotic networks which will become partof  the internet over the next few years.  All implementors are urged toat least provide a structure into which these features  could  be  laterintegrated.     There   are   several  features,  either  already  a  part  of  thearchitecture or now under development,  which  are  used  to  modify  orexpand  the  relationships  between addresses and routes.  The IP sourceroute options allow a host to explicitly direct  a  datagram  through  aseries of gateways to its foreign host.  An alternative form of the ICMPredirect  packet  has  been  proposed,  which  would  return informationspecific to a  particular  destination  host,  not  a  destination  net.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -