ICMP重定向消息格式

报文格式

图1 ICMP重定向消息格式
字段 长度 含义
Type 1字节 消息类型,此处值为5。
Code 1字节 消息代码:
  • 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 2字节 检验和。
Gateway Internet Address 4字节 即原始数据包里的IP目的地址域。
Internet Header + 64 bits of Original Data Datagram 可变 IP头和原始数据包的前64比特数据。该数据是主机用来匹配消息。对于更高层协议的用户端口号,原始数据包的前64比特的这些数据会被重组。

报文示例

图2 ICMP重定向消息

参考标准

标准 描述
RFC 792 Internet Control Message Protocol

本资料收集于互联网
2016 ©