我的拓扑是使用G1/0/1和g1/0/2,对内提供互联网访问,计划10.1.101.119访问443端口必须使用G1/0/1,配置如下:
--10 ACL
<H3C>disp acl 3001
Advanced IPv4 ACL 3001, 1 rule,
ACL's step is 5
rule 0 permit tcp source 10.1.101.119 0 destination-port eq 443 (2 times matched)
--20 INTERFACE
<H3C>disp ip interface brief
*down: administratively down
(s): spoofing (l): loopback
Interface Physical Protocol IP Address Description
GE1/0/0 down down 10.1.0.1 --
GE1/0/1 up up 117.17.232.181 GigabitEtherne...
GE1/0/2 up up 10.1.1.3 GigabitEtherne...
GE1/0/3 down down -- --
GE1/0/4 down down -- --
SSLVPN-AC1 up up 10.10.10.1 --
Vlan1 down down 172.16.10.1 --
Vlan250 up up 10.1.20.2 --
Vlan254 up up 10.1.24.2 --
--30 PBR
<H3C>disp ip policy-based-route interface Vlan-interface 250
Policy based routing information for interface Vlan-interface250:
Policy name: SREtoCNM
node 5 permit:
if-match acl 3001
apply output-interface GigabitEthernet1/0/1
Matched: 5989
Total matched: 5989
--40 ROUTE TABLE
<H3C>disp ip routing-table
Destinations : 35 Routes : 36
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 Static 60 0 117.17.232.1 GE1/0/1
10.1.1.1 GE1/0/2
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
10.10.10.0/24 Direct 0 0 10.10.10.1 SSLVPN-AC1
10.10.10.0/32 Direct 0 0 10.10.10.1 SSLVPN-AC1
10.10.10.1/32 Direct 0 0 127.0.0.1 InLoop0
10.10.10.255/32 Direct 0 0 10.10.10.1 SSLVPN-AC1
58.252.194.0/24 Static 50 0 117.17.232.1 GE1/0/1
117.17.232.0/24 Direct 0 0 117.17.232.181 GE1/0/1
117.17.232.0/32 Direct 0 0 117.17.232.181 GE1/0/1
117.17.232.181/32 Direct 0 0 127.0.0.1 InLoop0
117.17.232.255/32 Direct 0 0 117.17.232.181 GE1/0/1
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
10.1.1.0/24 Direct 0 0 10.1.1.3 GE1/0/2
10.1.1.0/32 Direct 0 0 10.1.1.3 GE1/0/2
10.1.1.3/32 Direct 0 0 127.0.0.1 InLoop0
10.1.1.255/32 Direct 0 0 10.1.1.3 GE1/0/2
10.1.3.0/24 Static 60 0 10.1.24.5 Vlan254
10.1.100.0/24 Static 60 0 10.1.24.1 Vlan254
10.1.101.0/24 Static 50 0 10.1.20.1 Vlan250
10.1.180.0/24 Static 60 0 10.1.24.1 Vlan254
10.1.200.0/24 Static 60 0 10.1.24.1 Vlan254
10.1.20.0/24 Direct 0 0 10.1.20.2 Vlan250
10.1.20.0/32 Direct 0 0 10.1.20.2 Vlan250
10.1.20.2/32 Direct 0 0 127.0.0.1 InLoop0
10.1.20.255/32 Direct 0 0 10.1.20.2 Vlan250
10.1.24.0/24 Direct 0 0 10.1.24.2 Vlan254
10.1.24.0/32 Direct 0 0 10.1.24.2 Vlan254
10.1.24.2/32 Direct 0 0 127.0.0.1 InLoop0
10.1.24.255/32 Direct 0 0 10.1.24.2 Vlan254
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
--------------------------------
但是,debug的时候出现
<H3C>debugging ip policy-based-route
This command is CPU intensive and might affect ongoing services. Are you sure you want to continue? [Y/N]:y
<H3C>
<H3C>
<H3C>%Jun 10 12:58:50:067 2026 H3C DPI/4/DAC_STORE_STATE_FULL: The storage space-based alarm threshold (AlarmThreshold(1121)=20%) set for StoreName(1119)=TRAFFIC was exceeded.
*Jun 10 12:58:51:158 2026 H3C PBR4/7/PBR Forward Info: Policy: SREtoCNM, Node: 5, match succeeded.
*Jun 10 12:58:51:158 2026 H3C PBR4/7/PBR Forward Info: PBR failed, and packets are forwarded according to the routing table.
*Jun 10 12:58:51:158 2026 H3C PBR4/7/PBR Forward Info: PBR failed to do default policy.
<H3C>
<H3C>
<H3C>*Jun 10 12:59:15:070 2026 H3C PBR4/7/PBR Forward Info: Policy: SREtoCNM, Node: 5, match succeeded.
*Jun 10 12:59:15:070 2026 H3C PBR4/7/PBR Forward Info: PBR failed, and packets are forwarded according to the routing table.
*Jun 10 12:59:15:070 2026 H3C PBR4/7/PBR Forward Info: PBR failed to do default policy.
这个是正常的吗
==============使用下一跳的方式=====================
<H3C>
<H3C>*Jun 10 13:40:31:385 2026 H3C PBR4/7/PBR Forward Info: Policy: SREtoCNM, Node: 5, match succeeded.
*Jun 10 13:40:31:385 2026 H3C PBR4/7/PBR Forward Info: apply next-hop 117.17.232.1.
*Jun 10 13:40:31:997 2026 H3C PBR4/7/PBR Forward Info: Policy: SREtoCNM, Node: 5, match succeeded.
*Jun 10 13:40:31:997 2026 H3C PBR4/7/PBR Forward Info: apply next-hop 117.17.232.1.
*Jun 10 13:40:32:341 2026 H3C PBR4/7/PBR Forward Info: Policy: SREtoCNM, Node: 5, match succeeded.
*Jun 10 13:40:32:341 2026 H3C PBR4/7/PBR Forward Info: apply next-hop 117.17.232.1.
*Jun 10 13:40:35:694 2026 H3C PBR4/7/PBR Forward Info: Policy: SREtoCNM, Node: 5, match succeeded.
*Jun 10 13:40:35:694 2026 H3C PBR4/7/PBR Forward Info: apply next-hop 117.17.232.1.
*Jun 10 13:40:37:672 2026 H3C PBR4/7/PBR Forward Info: Policy: SREtoCNM, Node: 5, match succeeded.
*Jun 10 13:40:37:672 2026 H3C PBR4/7/PBR Forward Info: apply next-hop 117.17.232.1.
===========这个没有变化,奇怪==========
<H3C>disp acl 3001
Advanced IPv4 ACL 3001, 1 rule,
ACL"s step is 5
rule 0 permit tcp source 10.1.101.119 0 destination-port eq 443 (2 times matched)
还有问题吗,这不都匹配成功了吗,没有失败的debug啊
还有问题吗,这不都匹配成功了吗,没有失败的debug啊
不正常。报文匹配上 PBR 节点 5、命中apply output-interface GigabitEthernet1/0/1,但策略路由执行失败,最终退回查表转发,没有按指定出接口转发。
一、日志逐行解读
plaintext
Policy: SREtoCNM, Node: 5, match succeeded.
流量匹配 ACL 3001,进入 PBR 节点 5,匹配成功。
plaintext
PBR failed, and packets are forwarded according to the routing table.
调用 apply output-interface 失败,策略路由不生效,报文改用全局路由表转发。
plaintext
PBR failed to do default policy.
节点内转发动作执行异常,并非节点未匹配、走下一个节点。
额外告警 DPI/4/DAC_STORE_STATE_FULL:流量存储分区使用率超阈值,不影响 PBR 转发,可忽略。
二、根因分析(F1000-905-AI V7 防火墙 PBR 典型问题)
你配置 apply output-interface 出接口 双出口场景下执行失败,常见 4 个原因,按优先级排序:
1. 直连路由 / 出接口状态看似 Up,下一跳 / ARP 未解析(最高发)
GE1/0/1 物理、协议 Up,但去往外网的下一跳 117.17.232.1 无 ARP 表项、ARP 失败。
apply output-interface 要求设备能直接二层转发到该接口对端;
无法解析对端 MAC → PBR 直接判定执行失败,退回路由表。
2. 安全策略 / 域间策略拦截(防火墙特有)
流量被 PBR 引导到 GE1/0/1,但安全域间策略未放行,导致转发动作终止,日志表现为 PBR 执行失败。
3. 多默认路由 + 出接口 PBR 与路由优先级冲突
你存在等价默认路由:
plaintext
0.0.0.0/0 下一跳117.17.232.1 GE1/0/1
下一跳10.1.1.1 GE1/0/2
部分版本 V7 防火墙,apply output-interface 在等价路由场景下存在适配问题,优先按路由表转发。
4. 接口出方向 NAT 缺失
流量被导向 GE1/0/1,但该接口未配置源 NAT,报文源地址为内网地址,外网不可达,芯片转发逻辑判定 PBR 动作失败。
三、分步排查 & 修复(可直接执行命令)
步骤 1:检查 GE1/0/1 对端 ARP(核心排查点)
bash
运行
# 查看GE1/0/1下一跳ARP
display arp | include 117.17.232.1
无表项 / ARP 为 Incomplete:ARP 解析失败
处理:检查运营商线路、对端设备,确认二层互通;可静态绑定 ARP 测试:
bash
运行
arp static 117.17.232.1 XXXX-XXXX-XXXX GigabitEthernet 1/0/1
步骤 2:检查出接口 NAT 配置
内网流量从 GE1/0/1 上网必须做源 NAT:
bash
运行
display nat address-group
display nat policy
确认存在针对 10.1.101.119 流量、出接口 GE1/0/1 的源 NAT 策略。
无 NAT → 补充 NAT 策略。
步骤 3:检查安全域 & 域间策略
确认接口安全域
bash
运行
display zone interface
Vlan-interface250(内网)一般属于 Trust
GE1/0/1 属于 Untrust
检查 Trust→Untrust 域间策略,确保放行 TCP 443 流量。
步骤 4:修改 PBR 写法(规避等价路由兼容问题,推荐)
V7 防火墙双出口场景,优先使用 apply next-hop 替代 apply output-interface,稳定性更高:
bash
运行
system-view
ip policy-based-route SREtoCNM node 5
# 删除原有出接口配置
undo apply output-interface GigabitEthernet 1/0/1
# 改为指定下一跳
apply next-hop 117.17.232.1
修改后重新测试,绝大多数此类报错可解决。
步骤 5:清空 PBR 统计 + 重新 debug 验证
bash
运行
reset ip policy-based-route statistics
# 重新开启debug测试
debugging ip policy-based-route
正常日志会显示:PBR forward successfully。
四、补充说明
ACL 匹配计数正常(2 次匹配、PBR 总匹配 5989),流量识别没问题,问题只出在转发动作执行阶段;
DPI存储告警 是日志 / 流量统计分区告警,和 PBR 转发无关,可后续清理存储或调整阈值;
临时应急:若需强制分流,务必改用 apply next-hop,这是 H3C V7 防火墙双出口 PBR 最优写法。
快速总结
日志含义:流量匹配 PBR 规则,但指定出接口转发失败,退回默认路由;
高频诱因:GE1/0/1 对端 ARP 解析失败、缺少源 NAT、等价路由下apply output-interface兼容问题;
最优修复:将 apply output-interface 改成 apply next-hop 117.17.232.1,同时检查 ARP 与 NAT。
debugging ip policy-based-route命令无法捕获实际转发路径的详细数据包信息。实际流量是否按策略路由转发,应以display ip policy-based-route statistics的匹配计数和tracert路径验证为准。debugging ip policy-based-route命令无法打印具体数据包的转发细节(如源/目的IP、端口等)1。match succeeded),但不会输出数据包内容或最终出接口信息,这是硬件转发机制的固有限制1。display ip policy-based-route interface Vlan-interface 250 显示 Matched: 5989,证明ACL 3001持续匹配源IP 10.1.101.119访问443端口的流量。apply output-interface GigabitEthernet1/0/1 已强制指定出接口,且无更高优先级策略覆盖(策略路由优先级高于默认路由)6。10.1.101.119 执行带源IP的traceroute:tracert -s 10.1.101.119 ***.*** # 目标需为HTTPS网站117.17.232.1(GE1/0/1的下一跳),而非 10.1.1.1(GE1/0/2的下一跳)。-s参数),否则可能因会话复用走默认路径。display firewall session table source-ip 10.1.101.119 destination-port 443Out-interface 字段是否为 GE1/0/1。10.1.101.119):display nat session source-ip 10.1.101.119 # 检查NAT转换前的源IPsource 10.1.101.119 0 的掩码 0 表示精确匹配单个IP,配置无误。255.255.255.255)而非反掩码(0),但当前配置正确5。reset firewall session table source-ip 10.1.101.119ip policy-based-route statistics enable # 全局开启统计display ip policy-based-route statistics 实时观察匹配计数增长,比debug更可靠16。policy-based-route SREtoCNM node 5
apply logging # 开启日志记录display logbuffer | include SREtoCNM 查看触发记录,避免硬件转发导致debug失效2。
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明