no ip redirects 和 no ip unreachables

no ip redirects 
 
路由器A和路由器B在同一个网段中。现在有PC的网关设置为A的地址 192.18.3.1. 在发送数据过程中可能会出现发往 192.168.2.X 网段的数据。这样数据包会先到A的接口再流向B。
ip redirects 可以使用ICMP 包。告知PC 以后发往192.168.2.X 的数据直接发给B。而不需要通过自己。
 
no ip redirects 是关闭这项功能。特别是在HSRP中。主要是为了避免让客户端使用真实的MAC地址通讯。(HSRP本身就是为了配置网关冗余,需要客户端访问虚拟mac地址)
----------------------------------
no ip unreachables
 
ICMP unreachables are normally limited to no more than one every one-half second per input interface, but this can changed by using the ip icmp rate-limit unreachables global configuration command.
 
如用用户使用ACL列表。那么所有不符合条件的数据包在经过路由器时会被丢弃。返回显示 目标主机不可达。因为没有合适的路由。 使用 no ip unreachables  后。只会出现 timeout 。
 
转载自:http://3layer.blog.51cto.com/57448/36021
原文地址:https://www.cnblogs.com/dier-gaohe/p/14278662.html