PBR实验
拓扑
实验要求
1、设备ip配置,设备名配置如图
2、全网通过ospf互通
3、通过PBR,使PC3去往PC5走12.1.1.0/24这条链路
4、通过PBR,使PC4去往PC5走21.1.1.0/24这条链路
5、打开tracert查看
实验配置
1、配置ip地址,修改设备名
略
2、RTA和RTB配置ospf实现全网互通
略
3、配置高级acl分别匹配PC3和PC4
[RTA]acl advanced 2000
[RTA-acl-ipv4-adv-3000]rule permit ip source 172.16.1.1 0 destination 10.10.10.1 0
[RTA]acl advanced 3001
[RTA-acl-ipv4-adv-3001]rule permit ip source 172.16.1.2 0 destination 10.10.10.1 0
4、RTA创建PBR,if-match匹配,apply修改流量属性
[RTA]policy-based-route server permit node 10
[RTA-pbr-server-10]if-match acl 3000
[RTA-pbr-server-10]apply next-hop 12.1.1.2
[RTA]policy-based-route server permit node 20
[RTA-pbr-server-20]if-match acl 3001
[RTA-pbr-server-20]apply next-hop 21.1.1.2
5、在RTA的流量入接口G0/0应用PBR
[RTA-GigabitEthernet0/0]ip policy-based-route server
6、RTA、RTB开启跟踪,PC测试
[RTA]ip ttl-expires enable #默认路由器未开启追踪,需要手动开启
[RTA]ip unreachables enable
[RTB]ip ttl-expires enable
[RTB]ip unreachables enable
PC3测试:
PC4测试: