取消
显示结果 
搜索替代 
您的意思是: 
cancel
2231
查看次数
16
有帮助
2
评论
zhahong
Cisco Employee
Cisco Employee
问题概要:很多时候客户遇到设备的cpu使用率比较高,而且经过判断是由于设备本身在发icmp redirect报文导致的,那么问题来了,设备什么时候会发icmp redirect报文呢,接下来给大家分享一下
ICMP redirect 包是如何工作的:
路由器通过ICMP redirect message来告知链路上的主机对于某个特定destination的一个更优的路由,例如如下拓扑,R1和R2被连接到和主机H相同的以太网段,主机H的默认网关配置在R1上,主机H发送一个包到R1为了到达远端的目的主机10.1.1.1,路由器R1收到这个包,接下来会去查表,发现到达目的主机10.1.1.1的下一跳是R2,那么R1必须从从他收到该包的相同以太网接口转发出去这个包,R1在转发这个包的同时也会发送一个icmp redirect message给源主机H,目的是告诉源主机H到达目的主机10.1.1.1的最佳路径是首先经过R2而不是R1,接下来主机H收到这个redirect报文之后,接下来它便会把后续的到达目的主机10.1.1.1的包直接发往R2而不是R1.

从R1的debug信息可以看到如下的icmp redirect 信息:
R1#debug ip icmpICMP packet debugging is on*Mar 18 06:28:54: ICMP:redirect sent to 172.16.1.1 for dest 10.1.1.1, use gw 172.16.1.200R1#
R1发送一个redirect信息到主机H,目的是使主机H在发送去往目的主机10.1.1.1的报文时,使用R2作为网关,而不是主机H上的R1,这点比较有意识,这就是我们不能单纯从主机上看配置的网关是谁就贸然确定包是发往的哪个设备
设备什么时候发送icmp redirect报文
设备会在满足下面所有条件的时候发送icmp 报文:
1、一个包进来的接口和这个包从该设备出去的接口是同一个接口
2、源ip的网段或者子网和该路由的下一跳网络是同一网段或者同一子网
3、该数据包不是从该设备本身发出的,而是途径该设备
4、设备上配置了发送icmp redirect(一般来说所有的接口都是默认发送的,可以给它disable掉这个feature)
解决的法:
1、在接口上通过 no ip redirects 可以让设备redirect
2、从网络设计上避免这种现象
评论
xuxianda7
Spotlight
Spotlight
好资料,学习了,谢谢!
rossnrachel
Spotlight
Spotlight
本帖最后由 ilove17109 于 2018-4-3 17:10 编辑
附图片170854x7247250h22ze00z.gif
图片来源:https://www.cisco.com/c/en/us/support/docs/ip/routing-information-protocol-rip/13714-43.html?dtid=osscdc000283
ICMP redirect
santosh 2018-3-17 上午12:48
https://learningnetwork.cisco.com/thread/125392
Hi
How ICMP Redirect Messages Work
ICMP redirect messages are used by routers to notify the hosts on the data link that a better route is available for a particular destination.
For example, the two routers R1 and R2 are connected to the same Ethernet segment as Host H. The default gateway for Host H is configured to use router R1. Host H sends a packet to router R1 to reach the destination on Remote Branch office Host 10.1.1.1. Router R1, after it consults its routing table, finds that the next-hop to reach Host 10.1.1.1 is router R2. Now router R1 must forward the packet out the same Ethernet interface on which it was received. Router R1 forwards the packet to router R2 and also sends an ICMP redirect message to Host H. This informs the host that the best route to reach Host 10.1.1.1 is by way of router R2. Host H then forwards all the subsequent packets destined for Host 10.1.1.1 to router R2.

Thanks,
Santosh
入门指南

使用上面的搜索栏输入关键字、短语或问题,搜索问题的答案。

我们希望您在这里的旅程尽可能顺利,因此这里有一些链接可以帮助您快速熟悉思科社区:









快捷链接