時間:2015-06-28 00:00:00 來源:IT貓撲網(wǎng) 作者:網(wǎng)管聯(lián)盟 我要評論(1)
想必大家對路由器負載均衡功能都不會陌生,那么我們可以通過對路由器的轉(zhuǎn)發(fā)表進行設(shè)置,從而達到流量負載均衡的目的。那么讓我們一起來看看具體的路徑配置內(nèi)容吧。
缺省狀態(tài)下,轉(zhuǎn)發(fā)表中只安裝路由表里的最佳路徑
lab@juniper#run show route 6.6.6.6
1.inet.0:19 destinations,22 routes(19 active,0 holddown,0 hidden)
2.+=Active Route,-=Last Active,*=Both
3.
4.6.6.6.6/32*[IS-IS/18]00:03:33,metric 42
5.to 10.0.0.2 via fxp1.1
6.>to 10.0.1.2 via fxp1.2
7.
8.[edit]
9.lab@juniper#run show route forwarding-table
10.5.5.5.5/32 user 0 10.0.1.2 ucst 490 7 fxp1.2
11.6.6.6.6/32 user 0 10.0.1.2 ucst 490 7 fxp1.2
12.10.0.0.0/30 intf 0 rslv 459 1 fxp1.1
現(xiàn)在進行配置將路由表里的所有路徑都安裝進轉(zhuǎn)發(fā)表
13.lab@juniper#show routing-options
14.forwarding-table {
15.export load-balance-route;
16.}
17.
18.lab@juniper#show policy-options
19.
20.policy-statement load-balance-route {
21.then {
22.load-balance per-packet;
23.}
24.}
查看路由表,路由器選擇10.0.1.2作為最佳路由
25.lab@juniper#run show route 6.6.6.6
26.
27.inet.0:19 destinations,22 routes(19 active,0 holddown,0 hidden)
28.+=Active Route,-=Last Active,*=Both
29.
30.6.6.6.6/32*[IS-IS/18]00:03:33,metric 42
31.to 10.0.0.2 via fxp1.1
32.>to 10.0.1.2 via fxp1.2
轉(zhuǎn)發(fā)表里對其所有前綴安裝了多條路徑
(注:安裝的條目和PFE有關(guān),IP-ASIC最多安裝8條等價路徑,以每個包為單位進行流量負載均衡,IP-II-ASIC最多安裝16條,以每個流為單位進行流量負載均衡)
1.lab@juniper#run show route forwarding-table
2.1.1.1.1/32 intf 0 1.1.1.1 locl 468 1
3.2.2.2.2/32 user 0 ulst 489 11
4.10.0.0.2 ucst 497 2 fxp1.1
5.10.0.1.2 ucst 490 2 fxp1.2
6.3.3.3.3/32 user 0 ulst 489 11
7.10.0.0.2 ucst 497 2 fxp1.1
8.10.0.1.2 ucst 490 2 fxp1.2
9.4.4.4.4/32 user 0 ulst 489 11
10.10.0.0.2 ucst 497 2 fxp1.1
11.10.0.1.2 ucst 490 2 fxp1.2
12.5.5.5.5/32 user 0 ulst 489 11
13.10.0.0.2 ucst 497 2 fxp1.1
14.10.0.1.2 ucst 490 2 fxp1.2
15.6.6.6.6/32 user 0 ulst 489 11
16.10.0.0.2 ucst 497 2 fxp1.1
17.10.0.1.2 ucst 490 2 fxp1.2
18.10.0.0.0/30 intf 0 rslv 459 1 fxp1.1
配置路由器,只對特定前綴的多條路徑安裝進轉(zhuǎn)發(fā)表,6.0.0.0/8,4.0.0.0/8,2.0.0.0/8
19.[edit]
20.lab@juniper#show policy-options policy-statement load-balance-route
21.from {
22.route-filter 6.0.0.0/8 orlonger;
23.route-filter 2.0.0.0/8 orlonger;
24.route-filter 4.0.0.0/8 orlonger;
25.}
26.then {
27.load-balance per-packet;
28.}
29.lab@juniper#show routing-options
30.forwarding-table {
31.export load-balance-route;
32.}
#p#副標題#e#
觀察轉(zhuǎn)發(fā)表,只對其特定前綴安裝了多條路徑,6.0.0.0/8,4.0.0.0/8,2.0.0.0/8
33.lab@juniper#run show route forwarding-table
34.1.1.1.1/32 intf 0 1.1.1.1 locl 468 1
35.2.2.2.2/32 user 0 ulst 489 3
36.10.0.0.2 ucst 497 6 fxp1.1
37.10.0.1.2 ucst 490 6 fxp1.2
38.3.3.3.3/32 user 0 10.0.1.2 ucst 490 6 fxp1.2
39.4.4.4.4/32 user 0 ulst 489 3
40.10.0.0.2 ucst 497 6 fxp1.1
41.10.0.1.2 ucst 490 6 fxp1.2
42.5.5.5.5/32 user 0 10.0.1.2 ucst 490 6 fxp1.2
43.6.6.6.6/32 user 0 ulst 489 3
44.10.0.0.2 ucst 497 6 fxp1.1
45.10.0.1.2 ucst 490 6 fxp1.2
46.10.0.0.0/30 intf 0 rslv 459 1 fxp1.1
47.10.0.0.0/32 dest 0 10.0.0.0 recv 457 1 fxp1.1
對5.5.5.5進行traceroute,每次都使用相同的下一跳
1.lab@juniper>traceroute 5.5.5.5
2.traceroute to 5.5.5.5(5.5.5.5),30 hops max,40 byte packets
3.1 10.0.1.2(10.0.1.2)0.457 ms 0.774 ms 0.224 ms
4.2 10.0.2.2(10.0.2.2)0.317 ms 0.360 ms 0.287 ms
5.3 10.0.3.2(10.0.3.2)0.398 ms 0.439 ms 0.383 ms
6.4 5.5.5.5(5.5.5.5)0.495 ms 0.533 ms 1.149 ms
7.
8.lab@juniper>traceroute 5.5.5.5
9.traceroute to 5.5.5.5(5.5.5.5),30 hops max,40 byte packets
10.1 10.0.1.2(10.0.1.2)0.431 ms 0.380 ms 0.225 ms
11.2 10.0.2.2(10.0.2.2)0.320 ms 0.367 ms 0.310 ms
12.3 10.0.3.2(10.0.3.2)0.402 ms 0.438 ms 0.392 ms
13.4 5.5.5.5(5.5.5.5)0.495 ms 0.546 ms 0.491 ms
14.
15.lab@juniper>traceroute 5.5.5.5
16.traceroute to 5.5.5.5(5.5.5.5),30 hops max,40 byte packets
17.1 10.0.1.2(10.0.1.2)0.427 ms 0.381 ms 0.220 ms
18.2 10.0.2.2(10.0.2.2)0.315 ms 0.362 ms 0.305 ms
19.3 10.0.3.2(10.0.3.2)0.401 ms 0.431 ms 0.383 ms
20.4 5.5.5.5(5.5.5.5)0.492 ms 0.529 ms 0.479 ms
21.
22.lab@juniper>
對6.6.6.6進行traceroute,每次都使用不同的下一跳
23.lab@juniper>traceroute 6.6.6.6
24.traceroute to 6.6.6.6(6.6.6.6),30 hops max,40 byte packets
25.1 10.0.1.2(10.0.1.2)0.427 ms 0.375 ms 10.0.0.2(10.0.0.2)0.224 ms
26.2 10.0.2.2(10.0.2.2)0.364 ms 0.349 ms 0.292 ms
27.3 10.0.3.2(10.0.3.2)0.385 ms 0.433 ms 0.386 ms
28.4 10.0.5.2(10.0.5.2)0.467 ms 0.518 ms 0.462 ms
29.5 6.6.6.6(6.6.6.6)0.572 ms 0.622 ms 0.567 ms
30.
31.lab@juniper>traceroute 6.6.6.6
32.traceroute to 6.6.6.6(6.6.6.6),30 hops max,40 byte packets
33.1 10.0.0.2(10.0.0.2)0.436 ms 10.0.1.2(10.0.1.2)0.382 ms 0.355 ms
34.2 10.0.2.2(10.0.2.2)0.316 ms 0.372 ms 0.315 ms
35.3 10.0.3.2(10.0.3.2)0.394 ms 0.443 ms 0.391 ms
36.4 10.0.5.2(10.0.5.2)0.473 ms 0.519 ms 0.465 ms
37.5 6.6.6.6(6.6.6.6)0.572 ms 0.610 ms 0.586 ms
38.
39.lab@juniper#run traceroute 6.6.6.6
40.traceroute to 6.6.6.6(6.6.6.6),30 hops max,40 byte packets
41.1 10.0.1.2(10.0.1.2)7.488 ms 0.511 ms 10.0.0.2(10.0.0.2)0.243 ms
42.2 10.0.2.2(10.0.2.2)0.367 ms 0.351 ms 0.299 ms
43.3 10.0.3.2(10.0.3.2)0.404 ms 0.435 ms 0.384 ms
44.4 10.0.5.2(10.0.5.2)0.478 ms 0.542 ms 0.470 ms
45.5 6.6.6.6(6.6.6.6)0.589 ms 0.615 ms 0.572 ms
46.
47.[edit logical-routers]
48.lab@juniper#run traceroute 6.6.6.6
49.traceroute to 6.6.6.6(6.6.6.6),30 hops max,40 byte packets
50.1 10.0.0.2(10.0.0.2)0.429 ms 10.0.1.2(10.0.1.2)0.388 ms 0.363 ms
51.2 10.0.2.2(10.0.2.2)0.322 ms 0.361 ms 0.304 ms
52.3 10.0.3.2(10.0.3.2)0.393 ms 0.452 ms 0.387 ms
53.4 10.0.5.2(10.0.5.2)0.471 ms 0.522 ms 0.471 ms
54.5 6.6.6.6(6.6.6.6)0.594 ms 0.632 ms 0.571 ms
基本上轉(zhuǎn)發(fā)表流量負載均衡的所有路徑配置就完成了。
關(guān)鍵詞標簽:流量負載均衡配置
相關(guān)閱讀
熱門文章 路由器地址大全-各品牌路由設(shè)置地址 各品牌的ADSL與路由器出廠默認IP、帳號、密碼 Nslookup命令詳解-域名DNS診斷 站長裝備:十大網(wǎng)站管理員服務(wù)器工具軟件
人氣排行 各品牌的ADSL與路由器出廠默認IP、帳號、密碼 路由器地址大全-各品牌路由設(shè)置地址 騰達路由器怎么設(shè)置?騰達路由器設(shè)置教程 ADSL雙線負載均衡設(shè)置詳細圖文教程 路由表說明(詳解route print) Nslookup命令詳解-域名DNS診斷 網(wǎng)管員實際工作的一天 網(wǎng)管必會!了解交換機控制端口流量