icmp 中文man页面

系统
本网络核心协议模块实现了基于 RFC792 协议中定义的《互联网控制报文协议》。它针对网络主机间通讯出错的情况作出回应并给出诊断信息。用户不能直接使用本模块。相反本模块需与核心中的其他协议进行通讯,而这些协议将 ICMP 出错信息返回到网络协议的应用层。ICMP 核心模块也回应 ICMP 请求。

NAME 名称

icmp, IPPROTO_ICMP - Linux IPv4 ICMP 核心模块.  

DESCRIPTION 描述

本网络核心协议模块实现了基于 RFC792 协议中定义的《互联网控制报文协议》。它针对网络主机间通讯出错的情况作出回应并给出诊断信息。用户不能直接使用本模块。相反本模块需与核心中的其他协议进行通讯,而这些协议将 ICMP 出错信息返回到网络协议的应用层。ICMP 核心模块也回应 ICMP 请求。

如果用 IPPROTP_ICMP 打开原始套接字(raw socket)时,用户协议有可以收到任意本地套接字 ICMP 包。 IPPROTO_ICMP. 请参阅 raw(7) 传递到套接字的 ICMP 包可以用 ICMP_FILTER 套接字选项进行过滤。核心会处理所有 ICMP 包,包括传递到用户的套接字去的。

Linux 对可以到达每个目标主机出错信息包的比率设立了限制。 ICMP_REDIRECTICMP_DEST_UNREACH 也受进入包的目标路由的限制。

SYSCTLS

ICMP 支持通过 sysctl 接口来设置一些全局 IP 参数。对 Sysctl 的访问可以通过读、写 /proc/sys/net/ipv4/* 下的文件通过 sysctl(2) 接口进行. 大多数这些 sysctls 对特定 ICMP 类型的数据包数量进行了限制。 Linux 2.2 使用记号单元过滤器对 ICMP 包进行限制。 此值表示超时错误,以秒计,直到到顶后记号单元过滤器被清除为止。

icmp_destunreach_rate
发送目的地不可到达 ICMP 消息包的***数据包比率。这限制了发送到任意一个路由或目的地的数据包的比率。这个限制不影响发送用来发现数据链路***传送单位(MTU)的 ICMP_FRAG_NEEDED包 数据包。
icmp_echo_ignore_all
如果该值不为零,Linux将忽略所有的 ICMP_ECHO 请求。
icmp_echo_ignore_broadcasts
如果该值不为零,Linux将忽略所有发送到广播地址的 ICMP_ECHO 数据包。
icmp_echoreply_rate
发送响应 ICMP_ECHOREQUEST 请求的 ICMP_ECHOREPLY 数据包比率的***值。
icmp_paramprob_rate
发送 ICMP_PARAMETERPROB 数据包比率的***值。当一个具有非法 IP 报头数据包到达时将发送这些包。
icmp_timeexceed_rate
发送 ICMP_TIME_EXCEEDED 包比率的***值。当一个数据包通过太多网段时,这些包用作防止路由回环。

NOTES

由于在许多其他实现中不支持 IPPROTO_ICMP 原始套接字(raw socket),可移植程序不能依靠这一特性。

当Linux不作为路由器时,将不被发送 ICMP_REDIRECT 包。内核也只有在路由表中的旧网关和路由重新定向超时时才接受这些包。

ICMP_TIMESTAMP 返回的 64 位毫秒为单位的时间戳是自1970年1月1日以来的时间.

Linux 的 ICMP 在内部使用原始套接字(raw socket)来发送ICMP包。这个原始套接字可能在 netstat(8) 消息输出中出现,带着一个“zero inode”信息。

VERSIONS

在2.2版本中将再不支持 ICMP_ADDRESS 请求。

在2.2版本中将不再支持 ICMP_SOURCE_QUENCH  

参见

ip(7)

RFC792 对ICMP协议进行了详细的叙述。

#p#

NAME

icmp, IPPROTO_ICMP - Linux IPv4 ICMP kernel module.  

DESCRIPTION

This kernel protocol module implements the Internet Control Message Protocol defined in RFC792. It is used to signal error conditions and for diagnosis. The user doesn't interact directly with this module; instead it communicates with the other protocols in the kernel and these pass the ICMP errors to the application layers. The kernel ICMP module also answers ICMP requests.

A user protocol may receive ICMP packets for all local sockets by opening a raw socket with the protocol IPPROTO_ICMP. See raw(7) for more information. The types of ICMP packets passed to the socket can be filtered using the ICMP_FILTER socket option. ICMP packets are always processed by the kernel too, even when passed to a user socket.

Linux limits the rate of ICMP error packets to each destination. ICMP_REDIRECT and ICMP_DEST_UNREACH are also limited by the destination route of the incoming packets.  

SYSCTLS

ICMP supports a sysctl interface to configure some global IP parameters. The sysctls can be accessed by reading or writing the /proc/sys/net/ipv4/* files or with the sysctl(2) interface. Most of these sysctls are rate limitations for specific ICMP types. Linux 2.2 uses a token bucket filter to limit ICMPs. The value is the timeout in jiffies until the token bucket filter is cleared after a burst. A jiffy is a system dependent unit, usually 10ms on x86 and about 1ms on alpha and IA64.

icmp_destunreach_rate
Maximum rate to send ICMP Destination Unreachable packets. This limits the rate at which packets are sent to any individual route or destination. The limit does not affect sending of ICMP_FRAG_NEEDED packets needed for path MTU discovery.
icmp_echo_ignore_all
If this value is non-zero, Linux will ignore all ICMP_ECHO requests.
icmp_echo_ignore_broadcasts
If this value is non-zero, Linux will ignore all ICMP_ECHO packets sent to broadcast addresses.
icmp_echoreply_rate
Maximum rate for sending ICMP_ECHOREPLY packets in response to ICMP_ECHOREQUEST packets.
icmp_paramprob_rate
Maximum rate for sending ICMP_PARAMETERPROB packets. These packets are sent when a packet arrives with an invalid IP header.
icmp_timeexceed_rate
Maximum rate for sending ICMP_TIME_EXCEEDED packets. These packets are sent to prevent loops when a packet has crossed too many hops.

NOTES

As many other implementations don't support IPPROTO_ICMP raw sockets, this feature should not be relied on in portable programs.

ICMP_REDIRECT packets are not sent when Linux is not acting as a router. They are also only accepted from the old gateway defined in the routing table and the redirect routes are expired after some time.

The 64-bit timestamp returned by ICMP_TIMESTAMP is in milliseconds since January 1, 1970.

Linux ICMP internally uses a raw socket to send ICMPs. This raw socket may appear in netstat(8) output with a zero inode.

VERSIONS

Support for the ICMP_ADDRESS request was removed in 2.2.

Support for ICMP_SOURCE_QUENCH was removed in Linux 2.2.  

SEE ALSO

ip(7)

RFC792 for a description of the ICMP protocol.

责任编辑:韩亚珊 来源: CMPP.net
相关推荐

2011-08-15 10:21:09

man中文man

2011-08-24 16:48:36

man中文man

2011-08-11 16:11:49

at中文man

2011-08-25 10:21:56

man.conf中文man

2011-08-12 14:58:05

killall中文man

2011-07-15 16:58:36

ac中文man

2011-08-15 11:10:48

more中文man

2011-08-25 17:03:51

pclose中文man

2011-08-15 14:10:37

tar中文man

2011-08-16 10:42:30

rmmod中文man

2011-08-11 17:46:02

chmod中文man

2011-08-18 13:57:38

acct中文man

2011-08-23 17:49:36

zdump中文man

2011-08-15 15:10:49

wall中文man

2011-08-23 15:06:03

quotastats中文man

2011-08-15 17:35:50

ar中文man

2011-08-25 09:07:16

suffixes中文man

2011-08-25 17:53:26

stdio中文man

2011-08-18 15:21:37

autofs中文man

2011-08-16 09:22:46

df中文man
点赞
收藏

51CTO技术栈公众号