首先说下,comware下的tracert好像不是很给力,只是我没有测试出来我的预想效果,希望有人能给我解答下
闲话不多说,实验图如上,为了方便,我该了ospf的cost值,使得原本全是串口的网络不能负载分担!
先看下路由表
<1>dis ip routing-table
Routing Tables: Public
Destinations : 13 Routes : 13
Destination/Mask Proto Pre Cost NextHop Interface
10.0.0.0/24 Direct 0 0 10.0.0.254 Eth0/1/0
10.0.0.254/32 Direct 0 0 127.0.0.1 InLoop0
12.12.12.0/24 Direct 0 0 12.12.12.1 S0/2/0
12.12.12.1/32 Direct 0 0 127.0.0.1 InLoop0
12.12.12.2/32 Direct 0 0 12.12.12.2 S0/2/0
13.13.13.0/24 Direct 0 0 13.13.13.1 S0/2/1
13.13.13.1/32 Direct 0 0 127.0.0.1 InLoop0
13.13.13.3/32 Direct 0 0 13.13.13.3 S0/2/1
24.24.24.0/24 OSPF 10 1662 12.12.12.2 S0/2/0
34.34.34.0/24 OSPF 10 1564 13.13.13.3 S0/2/1
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
200.200.200.200/32 OSPF 10 1564 13.13.13.3 S0/2/1
显然想要到达200.200.200.200这个网段,要走r3走
下面我们来做个pbr,强制下下一条
配置步骤:1.用过滤器匹配网段
2.
定义pbr
3.
在接口上应该接口
<1>dis cu conf acl
#
acl number 2000
rule 0 permit source 10.0.0.0 0.0.0.255
#
return
<1>dis cu conf policy
#
policy-based-route aaa permit node 10
if-match acl 2000
apply ip-address next-hop 12.12.12.2
#
interface Ethernet0/1/0
port link-mode route
ip address 10.0.0.254 255.255.255.0
ip policy-based-route aaa
再看下路由表
[1]dis ip routing-table 200.200.200.200
Routing Table : Public
Summary Count : 1
Destination/Mask Proto Pre Cost NextHop Interface
200.200.200.200/32 OSPF 10 1564 13.13.13.3 S0/2/1
去往200的网段没有变吧,因为策略路由匹配的数据包(这也是cpu消耗高的原因),而路由策略匹配的是路由
接下来开启r1的debug
开始――运行――cmd――