技术领域

ASA 5500 Series, ICMP, Traceroute

问题描述

ASA丢弃某些LINUX主机的traceroute报文。

ASA对于Traceroute报文的处理机制

Traceroute报文工作机制分为两种:基于UDP端口以及基于ICMP。 基于UDP端口的traceroute需要在ACL中打开相应UDP端口。 基于ICMP的traceroute稍显复杂。ASA默认情况下将ICMP报文看做无状态的连接,因此如果需要通过ICMP报文,例如在traceroute 中,其反方向的回包为ICMP的time-exceeded包,因此需在接口用ACL允许该报文,否则traceroute将失败。另一种方法是配置ICMP Inspection. 一旦配置了ICMP Inspection,ASA会将ICMP会话看做有状态的连接,从而允许返回流量。而由于traceroute报文利用了 ICMP的time-exceeded错误作为其工作机制,因此需要同时打开ICMP ERROR的Inspection.

故障排除步骤

检查主机使用的是基于UDP端口的traceroute还是基于ICMP time-exceeded的traceroute。1. 如果是基于UDP端口的traceroute,需要在ACL中打开相应端口,从UDP的33434开始,每次加1。一般LINUX主机用的是基于UDP的2. traceroute,而微软的操作系统大多用基于ICMP的traceroute。如果要修改LINUX主机的traceroute成为基于ICMP的,可在 trace时加上-I 关键字:

traceroute –I 192.168.1.1

如果是基于ICMP的traceroute,则推荐打开icmp以及icmp error的inspection:3.

ciscoasa(config)#policy-map    global_policy 

ciscoasa(config-pmap)#class    inspection_default 

ciscoasa(config-pmap-c)#inspect icmp 

ciscoasa(config-pmap-c)#inspect icmp error 

ciscoasa(config-pmap-c)#end

总结

首先需要弄清主机使用何种机制traceroute,是基于ICMP的还是UDP端口的。1. 在ACL中允许相应的流量通过,必要时将ICMP连接看做有状态的连接。2. 查看log,并进行抓包分析。3.

相关文档

ASA/PIX/FWSM: Handling ICMP Pings and Traceroute1. http://www.cisco.com/cisco/web/support/CN/107/1078/1078560_31.html#trace RFC 792 INTERNET CONTROL MESSAGE PROTOCOL2. http://tools.ietf.org/html/rfc792

版权所有 1992-2013 思科系统

文件创建日期: 2011 年 10 月 12 日

http://www.cisco.com/cisco/web/support/CN/110/1108/1108708_asaHandlingTraceroute.html