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

📄 rfc0792-icmp-protocol.txt

📁 一个rst守护程序
💻 TXT
📖 第 1 页 / 共 2 页
字号:
                                                               [Page 11]                                                          September 1981RFC 792Redirect Message    0                   1                   2                   3    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |     Type      |     Code      |          Checksum             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |                 Gateway Internet Address                      |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |      Internet Header + 64 bits of Original Data Datagram      |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   IP Fields:   Destination Address      The source network and address of the original datagram's data.   ICMP Fields:   Type      5   Code      0 = Redirect datagrams for the Network.      1 = Redirect datagrams for the Host.      2 = Redirect datagrams for the Type of Service and Network.      3 = Redirect datagrams for the Type of Service and Host.   Checksum      The checksum is the 16-bit ones's complement of the one's      complement sum of the ICMP message starting with the ICMP Type.      For computing the checksum , the checksum field should be zero.      This checksum may be replaced in the future.   Gateway Internet Address      Address of the gateway to which traffic for the network specified      in the internet destination network field of the original      datagram's data should be sent.[Page 12]                                                               September 1981                                                          RFC 792   Internet Header + 64 bits of Data Datagram      The internet header plus the first 64 bits of the original      datagram's data.  This data is used by the host to match the      message to the appropriate process.  If a higher level protocol      uses port numbers, they are assumed to be in the first 64 data      bits of the original datagram's data.   Description      The gateway sends a redirect message to a host in the following      situation.  A gateway, G1, receives an internet datagram from a      host on a network to which the gateway is attached.  The gateway,      G1, checks its routing table and obtains the address of the next      gateway, G2, on the route to the datagram's internet destination      network, X.  If G2 and the host identified by the internet source      address of the datagram are on the same network, a redirect      message is sent to the host.  The redirect message advises the      host to send its traffic for network X directly to gateway G2 as      this is a shorter path to the destination.  The gateway forwards      the original datagram's data to its internet destination.      For datagrams with the IP source route options and the gateway      address in the destination address field, a redirect message is      not sent even if there is a better route to the ultimate      destination than the next address in the source route.      Codes 0, 1, 2, and 3 may be received from a gateway.                                                               [Page 13]                                                          September 1981RFC 792Echo or Echo Reply Message    0                   1                   2                   3    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |     Type      |     Code      |          Checksum             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |           Identifier          |        Sequence Number        |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |     Data ...   +-+-+-+-+-   IP Fields:   Addresses      The address of the source in an echo message will be the      destination of the echo reply message.  To form an echo reply      message, the source and destination addresses are simply reversed,      the type code changed to 0, and the checksum recomputed.   IP Fields:   Type      8 for echo message;      0 for echo reply message.   Code      0   Checksum      The checksum is the 16-bit ones's complement of the one's      complement sum of the ICMP message starting with the ICMP Type.      For computing the checksum , the checksum field should be zero.      If the total length is odd, the received data is padded with one      octet of zeros for computing the checksum.  This checksum may be      replaced in the future.   Identifier      If code = 0, an identifier to aid in matching echos and replies,      may be zero.   Sequence Number[Page 14]                                                               September 1981                                                          RFC 792      If code = 0, a sequence number to aid in matching echos and      replies, may be zero.   Description      The data received in the echo message must be returned in the echo      reply message.      The identifier and sequence number may be used by the echo sender      to aid in matching the replies with the echo requests.  For      example, the identifier might be used like a port in TCP or UDP to      identify a session, and the sequence number might be incremented      on each echo request sent.  The echoer returns these same values      in the echo reply.      Code 0 may be received from a gateway or a host.                                                               [Page 15]                                                          September 1981RFC 792Timestamp or Timestamp Reply Message    0                   1                   2                   3    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |     Type      |      Code     |          Checksum             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |           Identifier          |        Sequence Number        |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |     Originate Timestamp                                       |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |     Receive Timestamp                                         |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |     Transmit Timestamp                                        |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   IP Fields:   Addresses      The address of the source in a timestamp message will be the      destination of the timestamp reply message.  To form a timestamp      reply message, the source and destination addresses are simply      reversed, the type code changed to 14, and the checksum      recomputed.   IP Fields:   Type      13 for timestamp message;      14 for timestamp reply message.   Code      0   Checksum      The checksum is the 16-bit ones's complement of the one's      complement sum of the ICMP message starting with the ICMP Type.      For computing the checksum , the checksum field should be zero.      This checksum may be replaced in the future.   Identifier[Page 16]                                                               September 1981                                                          RFC 792      If code = 0, an identifier to aid in matching timestamp and      replies, may be zero.   Sequence Number      If code = 0, a sequence number to aid in matching timestamp and      replies, may be zero.   Description      The data received (a timestamp) in the message is returned in the      reply together with an additional timestamp.  The timestamp is 32      bits of milliseconds since midnight UT.  One use of these      timestamps is described by Mills [5].      The Originate Timestamp is the time the sender last touched the      message before sending it, the Receive Timestamp is the time the      echoer first touched it on receipt, and the Transmit Timestamp is      the time the echoer last touched the message on sending it.      If the time is not available in miliseconds or cannot be provided      with respect to midnight UT then any time can be inserted in a      timestamp provided the high order bit of the timestamp is also set      to indicate this non-standard value.      The identifier and sequence number may be used by the echo sender      to aid in matching the replies with the requests.  For example,      the identifier might be used like a port in TCP or UDP to identify      a session, and the sequence number might be incremented on each      request sent.  The destination returns these same values in the      reply.      Code 0 may be received from a gateway or a host.                                                               [Page 17]                                                          September 1981RFC 792Information Request or Information Reply Message    0                   1                   2                   3    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |     Type      |      Code     |          Checksum             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |           Identifier          |        Sequence Number        |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   IP Fields:   Addresses      The address of the source in a information request message will be      the destination of the information reply message.  To form a      information reply message, the source and destination addresses      are simply reversed, the type code changed to 16, and the checksum      recomputed.   IP Fields:   Type      15 for information request message;      16 for information reply message.   Code      0   Checksum      The checksum is the 16-bit ones's complement of the one's      complement sum of the ICMP message starting with the ICMP Type.      For computing the checksum , the checksum field should be zero.      This checksum may be replaced in the future.   Identifier      If code = 0, an identifier to aid in matching request and replies,      may be zero.   Sequence Number      If code = 0, a sequence number to aid in matching request and      replies, may be zero.[Page 18]                                                               September 1981                                                          RFC 792   Description      This message may be sent with the source network in the IP header      source and destination address fields zero (which means "this"      network).  The replying IP module should send the reply with the      addresses fully specified.  This message is a way for a host to      find out the number of the network it is on.      The identifier and sequence number may be used by the echo sender      to aid in matching the replies with the requests.  For example,      the identifier might be used like a port in TCP or UDP to identify      a session, and the sequence number might be incremented on each      request sent.  The destination returns these same values in the      reply.      Code 0 may be received from a gateway or a host.                                                               [Page 19]                                                          September 1981RFC 792Summary of Message Types    0  Echo Reply    3  Destination Unreachable    4  Source Quench    5  Redirect    8  Echo   11  Time Exceeded   12  Parameter Problem   13  Timestamp   14  Timestamp Reply   15  Information Request   16  Information Reply[Page 20]                                                               September 1981                                                          RFC 792References   [1]  Postel, J. (ed.), "Internet Protocol - DARPA Internet Program         Protocol Specification," RFC 791, USC/Information Sciences         Institute, September 1981.   [2]   Cerf, V., "The Catenet Model for Internetworking," IEN 48,         Information Processing Techniques Office, Defense Advanced         Research Projects Agency, July 1978.   [3]   Strazisar, V., "Gateway Routing:  An Implementation         Specification", IEN 30, Bolt Beranek and Newman, April 1979.   [4]   Strazisar, V., "How to Build a Gateway", IEN 109, Bolt Beranek         and Newman, August 1979.   [5]   Mills, D., "DCNET Internet Clock Service," RFC 778, COMSAT         Laboratories, April 1981.                                                                  [Page 21]

⌨️ 快捷键说明

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