孔凡安,H3C防火墙Web界面抓包以及debug总结
1676539928,
源 VPN 实例
acl advanced 3998
rule 0 permit ip source 10.1.1.1 0 destination 2.2.2.2 0
rule 5 permit ip source 2.2.2.2 0 destination 10.1.1.1 0
#
traffic classifier jx operator and
if-match acl 3998
#
traffic behavior jx
mirror-to interface Blade1/4/0/1 //1---chassis 编号, 4---slot 编号,单台设备应该为 4/0/1
#
qos policy jx
classifier jx behavior jx
#
在物理接口下发 QOS 策略,并添加enhancement参数。
如:
interface Ten-GigabitEthernet2/3/0/1
port link-mode route
qos apply policy jx inbound enhancement
qos apply policy jx outbound enhancement
packet-capture max-file-packets 1000
packet-capture storage local limit 10240
max-bytes Specify the maximum number of bytes to capture for a packet
max-file-packets Specify the maximum capture file size
start Start two-way packet capture
stop Stop two-way packet capturing
storage Save packet files locally or to a remote server
问题描述
H3C防火墙Web界面抓包以及debug总结
解决方法
NGFW中低端防火墙、LB产品(假设有虚墙的情况下):
1. 抓包在根墙抓包,抓包使用的ACL不加VPN实例。
2. Debug在虚墙进行,抓包使用的ACL带源VPN实例。
2.1 ACL写法示例:
rule permit icmp vpn-instance x source x.x.x.x x destination x.x.x.x x源 VPN 实例
高端防火墙(假设有虚墙的情况下):
1. 抓包需要配置流镜像把报文镜像到blade口, traffic classifier 使用的ACL不加VPN实例。该操作在根墙物理口下操作。
如果要抓虚墙的报文,需要把报文镜像到根墙的blade接口上,登录根墙的web抓包。
示例:
#acl advanced 3998
rule 0 permit ip source 10.1.1.1 0 destination 2.2.2.2 0
rule 5 permit ip source 2.2.2.2 0 destination 10.1.1.1 0
#
traffic classifier jx operator and
if-match acl 3998
#
traffic behavior jx
mirror-to interface Blade1/4/0/1 //1---chassis 编号, 4---slot 编号,单台设备应该为 4/0/1
#
qos policy jx
classifier jx behavior jx
#
在物理接口下发 QOS 策略,并添加enhancement参数。
如:
interface Ten-GigabitEthernet2/3/0/1
port link-mode route
qos apply policy jx inbound enhancement
qos apply policy jx outbound enhancement
2. debug 在虚墙进行,ACL需要带源VPN实例。
注意事项:
1. 抓包前请在web界面把抓包参数调整到最大,防止出现多个报文不方便整理。对应命令:
packet-capture max-bytes 4096packet-capture max-file-packets 1000
packet-capture storage local limit 10240
2. 若不方便登录web进行抓包,可使用命令。抓包完成后可以在/pcap文件夹下通过FTP导出。
如下作为参考:
RBM_P[H3C]packet-capture ?max-bytes Specify the maximum number of bytes to capture for a packet
max-file-packets Specify the maximum capture file size
start Start two-way packet capture
stop Stop two-way packet capturing
storage Save packet files locally or to a remote server
报文过少的话,手动停止(执行packet-capture stop命令 )后才能看到报文。