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

📄 rfc814.txt

📁 RFC 相关的技术文档
💻 TXT
📖 第 1 页 / 共 2 页
字号:
Finally, additional IP options have been proposed to identify particularroutes  within  the internet that are unacceptable.  The difficulty withimplementing these new features  is  that  the  mechanisms  do  not  lie                                   8entirely within the bounds of IP.  All the mechanisms above are designedto apply to a particular connection, so that their use must be specifiedat  the  TCP level.  Thus, the interface between IP and the layers aboveit must include mechanisms to allow passing this  information  back  andforth,  and TCP (or any other protocol at this level, such as UDP), mustbe prepared to store this  information.    The  passing  of  informationbetween IP and TCP is made more complicated by the fact that some of theinformation,  in  particular  ICMP packets, may arrive at any time.  Thenormal interface envisioned between TCP  and  IP  is  one  across  whichpackets  can  be  sent  or received.  The existence of asynchronous ICMPmessages implies that there must be an additional  channel  between  thetwo,  unrelated  to the actual sending and receiving of data.  (In fact,there are many other ICMP messages which arrive asynchronously and whichmust be passed from IP  up  to  higher  layers.    See  RFC  816,  FaultIsolation and Recovery.)     Source  routes  are  already  in  use  in  the  internet,  and manyimplementations will wish to be able to take advantage  of  them.    Thefollowing  sorts  of  usages  should  be permitted.  First, a user, wheninitiating a TCP connection, should be able to hand a source route  intoTCP,  which in turn must hand the source route to IP with every outgoingdatagram.  The user might initially obtain the source route by  queryinga  different  sort  of  name  server,  which would return a source routeinstead of an address, or the user may have fabricated the source  routemanually.    A  TCP  which  is  listening  for a connection, rather thanattempting to open one, must be prepared to  receive  a  datagram  whichcontains  a  IP return route, in which case it must remember this returnroute, and use it as a source route on all returning datagrams.                                   9     6.  Ports and Service Identifiers     The  IP  layer of the architecture contains the address informationwhich specifies the destination host to  which  the  datagram  is  beingsent.    In  fact, datagrams are not intended just for particular hosts,but for particular agents within a host,  processes  or  other  entitiesthat  are  the  actual  source and sink of the data.  IP performs only avery simple dispatching once the datagram  has  arrived  at  the  targethost,   it   dispatches  it  to  a  particular  protocol.    It  is  theresponsibility of that protocol handler,  for  example  TCP,  to  finishdispatching  the  datagram  to the particular connection for which it isdestined.    This  next  layer  of  dispatching  is  done  using   "portidentifiers",  which  are  a  part  of  the  header  of the higher levelprotocol, and not the IP layer.     This two-layer dispatching architecture has caused  a  problem  forcertain  implementations.    In  particular,  some  implementations havewished to put the IP layer within the kernel of  the  operating  system,and  the  TCP  layer  as  a  user  domain  application  program.  Strictadherence to this partitioning can lead to grave  performance  problems,for  the  datagram  must  first  be  dispatched from the kernel to a TCPprocess, which then dispatches the datagram  to  its  final  destinationprocess.   The overhead of scheduling this dispatch process can severelylimit the achievable throughput of the implementation.     As is discussed in RFC 817, Modularity and Efficiency  in  ProtocolImplementations,  this  particular  separation  between  kernel and userleads to other performance problems, even ignoring  the  issue  of  port                                   10level  dispatching.   However, there is an acceptable shortcut which canbe taken to move the higher  level  dispatching  function  into  the  IPlayer, if this makes the implementation substantially easier.     In  principle,  every  higher level protocol could have a differentdispatching  algorithm.    The  reason  for  this  is  discussed  below.However,  for  the  protocols  involved  in  the  service offering beingimplemented today, TCP and UDP, the dispatching algorithm is exactly thesame, and the port field is located in precisely the same place  in  theheader.  Therefore, unless one is interested in participating in furtherprotocol  research,  there  is only one higher level dispatch algorithm.This algorithm takes into account the internet  level  foreign  address,the protocol number, and the local port and foreign port from the higherlevel  protocol  header.  This algorithm can be implemented as a sort ofadjunct to the IP layer implementation, as long as no other higher levelprotocols are to be implemented.  (Actually, the above statement is onlypartially true, in that the UDP dispatch function is subset of  the  TCPdispatch  function.  UDP dispatch depends only protocol number and localport.  However, there is an occasion within TCP  when  this  exact  samesubset comes into play, when a process wishes to listen for a connectionfrom  any  foreign  host.    Thus,  the range of mechanisms necessary tosupport TCP dispatch are also sufficient to support  precisely  the  UDPrequirement.)     The decision to remove port level dispatching from IP to the higherlevel  protocol  has  been questioned by some implementors.  It has beenargued that if all of the address structure were part of the  IP  layer,                                   11then IP could do all of the packet dispatching function within the host,which  would  lead  to  a  simpler  modularity.    Three  problems  wereidentified with this.  First, not all protocol implementors could  agreeon  the  size  of the port identifier.  TCP selected a fairly short portidentifier, 16 bits, to reduce  header  size.    Other  protocols  beingdesigned,  however, wanted a larger port identifier, perhaps 32 bits, sothat the port identifier, if  properly  selected,  could  be  consideredprobabilistically  unique.    Thus,  constraining  the  port  id  to oneparticular IP level mechanism would prevent certain  fruitful  lines  ofresearch.    Second,  ports  serve  a  special  function  in addition todatagram delivery:   certain  port  numbers  are  reserved  to  identifyparticular services.  Thus, TCP port 23 is the remote login service.  Ifports  were  implemented  at  the  IP level, then the assignment of wellknown ports could not be done on a protocol basis, but would have to  bedone  in a centralized manner for all of the IP architecture.  Third, IPwas designed with a very simple layering role:    IP  contained  exactlythose functions that the gateways must understand.  If the port idea hadbeen  made a part of the IP layer, it would have suggested that gatewaysneeded to know about ports, which is not the case.     There are, of course, other ways  to  avoid  these  problems.    Inparticular,  the  "well-known  port" problem can be solved by devising asecond mechanism, distinct from port  dispatching,  to  name  well-knownports.   Several protocols have settled on the idea of including, in thepacket which sets up a  connection  to  a  particular  service,  a  moregeneral  service  descriptor,  such  as a character string field.  Thesespecial  packets,  which  are  requesting  connection  to  a  particular                                   12service,  are  routed on arrival to a special server, sometimes called a"rendezvous server", which  examines  the  service  request,  selects  arandom  port  which  is to be used for this instance of the service, andthen passes the packet along to  the  service  itself  to  commence  theinteraction.     For  the  internet architecture, this strategy had the serious flawthat it presumed all protocols would fit into the same service paradigm:an initial setup phase, which might contain a certain overhead  such  asindirect routing through a rendezvous server, followed by the packets ofthe  interaction  itself,  which  would  flow  directly  to  the processproviding the service.  Unfortunately, not all high level  protocols  ininternet  were  expected to fit this model.  The best example of this isisolated datagram exchange using UDP.  The simplest exchange in  UDP  isone process sending a single datagram to another.  Especially on a localnet,  where  the  net  related overhead is very low, this kind of simplesingle datagram interchange can be extremely efficient,  with  very  lowoverhead  in  the  hosts.  However, since these individual packets wouldnot be part of an established connection, if  IP  supported  a  strategybased  on  a  rendezvous  server and service descriptors, every isolateddatagram would have to  be  routed  indirectly  in  the  receiving  hostthrough  the  rendezvous  server, which would substantially increase theoverhead of processing, and every datagram would have to carry the  fullservice  request  field,  which  would  increase  the size of the packetheader.     In general, if a network is intended for "virtual circuit service",                                   13or  things similar to that, then using a special high overhead mechanismfor circuit setup makes sense.  However, current directions in  researchare  leading  away  from  this  class  of  protocol,  so  once again thearchitecture  was  designed  not  to   preclude   alternative   protocolstructures.    The  only  rational  position  was  that  the  particulardispatching strategy used should be part of the  higher  level  protocoldesign, not the IP layer.     This  same  argument about circuit setup mechanisms also applies tothe design of the IP address structure.  Many protocols do not  transmita  full  address  field  as  part of every packet, but rather transmit ashort identifier which is created as part of a circuit setup from sourceto destination.  If the full address needs to be  carried  in  only  thefirst  packet  of  a long exchange, then the overhead of carrying a verylong address field can easily be justified.  Under these  circumstances,one  can  create  truly extravagant address fields, which are capable ofextending to address almost  any  conceivable  entity.    However,  thisstrategy  is  useable  only  in a virtual circuit net, where the packetsbeing transmitted are part of a  established  sequence,  otherwise  thislarge  extravagant  address  must be transported on every packet.  SinceInternet explicitly rejected this restriction on  the  architecture,  itwas  necessary  to come up with an address field that was compact enoughto be sent in every datagram, but general enough to correctly route  thedatagram  through  the  catanet  without a previous setup phase.  The IPaddress of 32 bits is the compromise that results.  Clearly it  requiresa  substantial  amount  of shoehorning to address all of the interestingplaces in the universe with only 32 bits.  On the other  hand,  had  the                                   14address  field  become  much  bigger,  IP would have been susceptible toanother criticism, which is that the header had grown unworkably  large.Again, the fundamental design decision was that the protocol be designedin  such  a way that it supported research in new and different sorts ofprotocol architectures.     There are some limited restrictions imposed by the IP design on theport mechanism selected by the higher level  process.    In  particular,when  a packet goes awry somewhere on the internet, the offending packetis returned, along with an error indication, as part of an ICMP  packet.An  ICMP  packet  returns only the IP layer, and the next 64 bits of theoriginal datagram.  Thus, any higher level protocol which wishes to sortout from which port a particular offending datagram came must make  surethat  the  port information is contained within the first 64 bits of thenext level header.  This also means, in most cases, that it is  possibleto  imagine,  as  part  of the IP layer, a port dispatch mechanism whichworks by masking and matching on the  first  64  bits  of  the  incominghigher level header.

⌨️ 快捷键说明

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