首 页 | 培训频道 | 思科频道 | 华为频道 | 技术论坛 |
湖南长沙思科培训 咨询电话:0731-5552235
考试认证 | Cisco产品 | 解决方案 | 综合技术 | 路由技术 | 交换技术 | 网络管理 | 网络协议 | 无线技术 | 安全技术
您现在的位置: 龙光CISCO频道 -> 网络管理-> 网络配置 -> 文章正文
配置转发表的参数对流量进行负载均衡

龙光国际 收集整理  10月21日 08:31  访问次数 


缺省状态下,转发表中只安装路由表里的最佳路径
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] [2] 下一页  






最新文章
热门文章
相关文章
关于我们 | 联系我们 | 成功客户 | 师资介绍 | 会员服务 | 培训报名 | 免责声明
龙光热线:0731-5552235 2762886  传真:0731-5552235
 龙光国际教育中心  版权所有