分类:
2008-09-11 14:37:05
缺省状态下,转发表中只安装表里的最佳路径
lab@juniper# run show route 6.6.6.6
inet.0: 19 destinations, 22 routes (19 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
6.6.6.6/32 *[IS-IS/18] 00:03:33, metric 42
to 10.0.0.2 via fxp1.1
> to 10.0.1.2 via fxp1.2
[edit]
lab@juniper# run show route forwarding-table
5.5.5.5/32 user 0 10.0.1.2 ucst 490 7 fxp1.2
6.6.6.6/32 user 0 10.0.1.2 ucst 490 7 fxp1.2
10.0.0.0/30 intf 0 rslv 459 1 fxp1.1
现在进行配置将路由表里的所有路径都安装进转发表
lab@juniper# show routing-options
forwarding-table {
export load-balance-route;
}
lab@juniper#show policy-options
policy-statement load-balance-route {
then {
load-balance per-packet;
}
}
查看路由表,路由器选择10.0.1.2作为最佳路由
lab@juniper# run show route 6.6.6.6
inet.0: 19 destinations, 22 routes (19 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
6.6.6.6/32 *[IS-IS/18] 00:03:33, metric 42
to 10.0.0.2 via fxp1.1
> to 10.0.1.2 via fxp1.2
转发表里对其所有前缀安装了多条路径
(注:安装的条目和PFE有关,IP-ASIC最多安装8条等价路径,以每个包为单位进行负载均衡
IP-II-ASIC最多安装16条,以每个流为单位进行负载均衡)
lab@juniper# run show route forwarding-table
1.1.1.1/32 intf 0 1.1.1.1 locl 468 1
2.2.2.2/32 user 0 ulst 489 11
10.0.0.2 ucst 497 2 fxp1.1
10.0.1.2 ucst 490 2 fxp1.2
3.3.3.3/32 user 0 ulst 489 11
10.0.0.2 ucst 497 2 fxp1.1
10.0.1.2 ucst 490 2 fxp1.2
4.4.4.4/32 user 0 ulst 489 11
10.0.0.2 ucst 497 2 fxp1.1
10.0.1.2 ucst 490 2 fxp1.2
5.5.5.5/32 user 0 ulst 489 11
10.0.0.2 ucst 497 2 fxp1.1
10.0.1.2 ucst 490 2 fxp1.2
6.6.6.6/32 user 0 ulst 489 11
10.0.0.2 ucst 497 2 fxp1.1
10.0.1.2 ucst 490 2 fxp1.2
10.0.0.0/30 intf 0 rslv 459 1 fxp1.1
配置路由器,只对特定前缀的多条路径安装进转发表,6.0.0.0/8,4.0.0.0/8,2.0.0.0/8
[edit]
lab@juniper# show policy-options policy-statement load-balance-route
from {
route-filter 6.0.0.0/8 orlonger;
route-filter 2.0.0.0/8 orlonger;
route-filter 4.0.0.0/8 orlonger;
}
then {
load-balance per-packet;
}
lab@juniper# show routing-options
forwarding-table {
export load-balance-route;
}
观察转发表,只对其特定前缀安装了多条路径, 6.0.0.0/8,4.0.0.0/8,2.0.0.0/8
lab@juniper# run show route forwarding-table
1.1.1.1/32 intf 0 1.1.1.1 locl 468 1
2.2.2.2/32 user 0 ulst 489 3
10.0.0.2 ucst 497 6 fxp1.1
10.0.1.2 ucst 490 6 fxp1.2
3.3.3.3/32 user 0 10.0.1.2 ucst 490 6 fxp1.2
4.4.4.4/32 user 0 ulst 489 3
10.0.0.2 ucst 497 6 fxp1.1
10.0.1.2 ucst 490 6 fxp1.2
5.5.5.5/32 user 0 10.0.1.2 ucst 490 6 fxp1.2
6.6.6.6/32 user 0 ulst 489 3
10.0.0.2 ucst 497 6 fxp1.1
10.0.1.2 ucst 490 6 fxp1.2
10.0.0.0/30 intf 0 rslv 459 1 fxp1.1
10.0.0.0/32 dest 0 10.0.0.0 recv 457 1 fxp1.1
[1]