免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1703 | 回复: 0
打印 上一主题 下一主题

ICMP Redirect [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-05-23 18:40 |只看该作者 |倒序浏览

    同事在维护solaris系统的时候发现了一些奇怪的路由,例如:
[email=root@HBapp]root@HBapp[/email]
# netstat -r
Routing Table: IPv4
  Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------
101.1.41.3            101.19.2.51            UGHD     1      1  
101.1.32.91           101.19.2.51            UGHD     1      1  
    ……
    这种路由使用route delete删除了过一会马上重新出现,man netstat可以看到D的解释:
…… and whether the route was created dynamically by a redirect (D).
    可以看到D标识是由动态的重定向产生的,在Sun的SA399里有相应描述(7-26):
    ICMP (Routing) Redirect
ICMP provides control and error messages. ICMP on a router or gateway
attempts to send reports of problems to the original source. ICMP
datagrams are always encapsulated in IP.
ICMP redirects occur when a system uses more than one default route. If
the router determines a more efficient route, or if there is only one way to
forward the datagram, it redirects the datagram using the better or only
route and reports that route to the sender. Figure 7-9 on page 7-27 shows
an ICMP redirect process where the sys21 system needs to communicate
with the server1 system and has a default route of sys11. The
information does reach the server1 system and the sys11 system sends
an ICMP redirect to the sys21 system, telling it that the best route to the
server1 system is through the instructor system.
The sending system’s route table is updated with the new information.
The drawback to this method of routing is that for every ICMP redirect,
there is a separate entry in the sending system’s route table. This action
can lead to a large route table. However, this method of routing also
ensures that the datagrams that are going to all reachable hosts are taking
the shortest route.
Caution – An attacker might forge redirect errors to install false routes,
which might initiate a denial of service attack if the newly specified router
is not a router at all. There are rules governing valid redirect errors, all of
which can be spoofed easily. Use this ndd command to ignore IPv4 ICMP
redirect errors: ndd -set /dev/ip ip_ignore_redirect 1.
Refer to the Sun BluePrints™ document Solaris Operating Environment
Network Settings for Security, available at:
http://www.sun.com/solutions/blueprints/1200/
network-updt1.pdf.
    经过和同事讨论,发现情况是由于ICMP产生的。
    后来发现,这台主机的默认网关是2.1,但是到达101.1.32.91的路由是2.51,主机可以直达,所以路由器产生了ICMP重定向信息,如下:
[email=root@HBapp]root@HBapp[/email]
# ping 101.1.32.91
ICMP Host redirect from gateway 101.19.2.1
to 101.19.2.51 for 101.1.2.91
101.1.32.91 is alive
    这种重定向是为了减少路由器负担,因此是正常的。


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/6098/showart_27354.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP