设备配置PBR策略路由,配置使用下一跳为出接口(配置下一跳为IP地址时候能成功),不配置出接口默认路由,网段192.168.10.0/24通过策略路由转发失败,配置上默认路由ip route-static 0.0.0.0 0 192.168.1.2 之后走的默认路由出去。
信息:
<R1>disp ip policy-based-route interface giga 0/2
Policy based routing information for interface GigabitEthernet0/2:
Policy name: pbr
node 10 permit:
if-match acl 3000
apply output-interface GigabitEthernet0/0
Matched: 10
node 20 permit:
Matched: 0 Total matched: 10
*Dec 14 16:51:15:102 2018 R1 PBR4/7/PBR Forward Info: Policy: pbr, Node: 10, match succeeded.
*Dec 14 16:51:15:102 2018 R1 PBR4/7/PBR Forward Info: PBR failed, and packets are forwarded according to the routing table.
*Dec 14 16:51:15:102 2018 R1 PBR4/7/PBR Forward Info: PBR failed to do default policy.
配置如下:
<R1>display current-configuration
# version 7.1.075, Alpha 7571
# sysname R1
# ip unreachables enable
ip ttl-expires enable
# system-working-mode standard
xbar load-single
password-recovery enable
lpu-type f-series
# vlan 1
#
policy-based-route pbr permit node 10
if-match acl 3000
apply output-interface GigabitEthernet0/0
#
policy-based-route pbr permit node 20
#
interface GigabitEthernet0/0
port link-mode route
combo enable copper
ip address 192.168.0.1 255.255.255.0
nat outbound
#
interface GigabitEthernet0/1
port link-mode route
combo enable copper
ip address 192.168.1.1 255.255.255.0
nat outbound
#
interface GigabitEthernet0/2
port link-mode route
combo enable copper
ip address 10.10.10.1 255.255.255.0
ip policy-based-route pbr
#
ip route-static 192.168.10.0 24 10.10.10.2
ip route-static 192.168.20.0 24 10.10.10.2
#
acl advanced 3000
rule 0 permit ip source 192.168.10.0 0.0.0.255
#
网络拓扑:
(0)
最佳答案
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论