9.1 策略路由
1.R1配置OSPF
[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]network 12.1.1.0 0.255.255.255
[R1-ospf-1-area-0.0.0.0]network 13.1.1.0 0.255.255.255
[R1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255
2.R2配置OSPF
[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0]network 12.1.1.0 0.255.255.255
[R2-ospf-1-area-0.0.0.0]network 24.1.1.0 0.255.255.255
3.R3配置OSPF
[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[R3-ospf-1-area-0.0.0.0]network 13.1.1.0 0.255.255.255
[R3-ospf-1-area-0.0.0.0]network 34.1.1.0 0.255.255.255
4.R4配置OSPF
[R4]ospf 1 router-id 4.4.4.4
[R4-ospf-1]area 0
[R4-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0
[R4-ospf-1-area-0.0.0.0]network 24.1.1.0 0.255.255.255
[R4-ospf-1-area-0.0.0.0]network 34.1.1.0 0.255.255.255
[R4-ospf-1-area-0.0.0.0]network 172.16.1.0 0.0.0.255
5.PC1路由跟踪server
PC>tracert 172.16.1.1
traceroute to 172.16.1.1, 8 hops max
(ICMP), press Ctrl+C to stop
1 192.168.1.254 <1 ms 16 ms 15 ms
2 12.1.1.2 16 ms 31 ms 16 ms
3 24.1.1.4 15 ms 32 ms 15 ms
4 172.16.1.1 16 ms 31 ms 16 ms
6.PC2路由跟踪server
PC>tracert 172.16.1.1
traceroute to 172.16.1.1, 8 hops max
(ICMP), press Ctrl+C to stop
1 192.168.2.254 16 ms <1 ms 15 ms
2 13.1.1.3 16 ms 16 ms 15 ms
3 34.1.1.4 16 ms 15 ms 32 ms
4 172.16.1.1 15 ms 32 ms 31 ms
7.R1配置ACL
[R1]acl 3000
[R1-acl-adv-3000]rule permit ip source 192.168.1.0 0.255.255.255 destination 172.16.1.0 0.255.255.255
[R1]acl 3001
[R1-acl-adv-3001]rule permit ip source 192.168.2.0 0.255.255.255 destination 172.16.1.0 0.255.255.255
8.R1配置流分类
[R1]traffic classifier c1
[R1-classifier-dsrw]if-match acl 3000
[R1]traffic classifier c2
[R1-classifier-dsrw]if-match acl 3001
9.R1配置流行为
[R1]traffic behavior b1
[R1-behavior-dsrwa]redirect ip-nexthop 13.1.1.3
[R1]traffic behavior b2
[R1-behavior-dsrwa]redirect ip-nexthop 12.1.1.2
10.R1配置流策略
[R1]traffic policy p1
[R1-trafficpolicy-dsrw.com]classifier c1 behavior b1
[R1]traffic policy p2
[R1-trafficpolicy-dsrw.com]classifier c2 behavior b2
11.R1接口入方向调用流策略
[R1]interface GigabitEthernet 1/0/0
[R1-GigabitEthernet1/0/0]traffic-policy p1 inbound
[R1]interface GigabitEthernet 0/0/2
[R1-GigabitEthernet1/0/0]traffic-policy p2 inbound
12.PC1路由跟踪server
PC>tracert 172.16.1.1
traceroute to 172.16.1.1, 8 hops max
(ICMP), press Ctrl+C to stop
1 192.168.1.254 15 ms 32 ms <1 ms
2 13.1.1.3 15 ms 32 ms 15 ms
3 34.1.1.4 31 ms 16 ms 16 ms
4 172.16.1.1 31 ms 16 ms 31 ms
13.PC2路由跟踪server
PC>tracert 172.16.1.1
traceroute to 172.16.1.1, 8 hops max
(ICMP), press Ctrl+C to stop
1 192.168.2.254 31 ms <1 ms 16 ms
2 12.1.1.2 16 ms 15 ms <1 ms
3 24.1.1.4 16 ms 31 ms 15 ms
4 172.16.1.1 32 ms 15 ms 16 ms
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
请登录后查看评论内容