怎么設(shè)置Cisco路由多鏈路負(fù)載均衡
思科公司已成為公認(rèn)的全世界網(wǎng)絡(luò)互聯(lián)解決方案的領(lǐng)先廠商,其公司出產(chǎn)的一系列路由器更是引領(lǐng)世界,那么你知道怎么設(shè)置Cisco路由多鏈路負(fù)載均衡嗎?下面是學(xué)習(xí)啦小編整理的一些關(guān)于怎么設(shè)置Cisco路由多鏈路負(fù)載均衡的相關(guān)資料,供你參考。
設(shè)置Cisco路由多鏈路負(fù)載均衡的方法
基于策略的路由允許應(yīng)用一個(gè)策略控制數(shù)據(jù)包應(yīng)如何走而非基于路由表選路。IP路由基于目標(biāo)地,而PBR允許基于源的路由,即來(lái)自何處而應(yīng)到哪去,從而根據(jù)需要走一條特殊的路徑。
在網(wǎng)絡(luò)中實(shí)施基于策略的路由有以下優(yōu)點(diǎn)
1、基于源的供應(yīng)商選擇:通過(guò)策略路由使源于不同用戶(hù)組的數(shù)據(jù)流選擇經(jīng)過(guò)不同的Internet連接。
2、服務(wù)質(zhì)量:可以通過(guò)在網(wǎng)絡(luò)邊緣路由器上設(shè)置IP數(shù)據(jù)包包頭中的優(yōu)先級(jí)或TOS值,并利用隊(duì)列機(jī)制在網(wǎng)絡(luò)核心或主干中為數(shù)據(jù)流劃分不同的優(yōu)先級(jí),來(lái)為不同的數(shù)據(jù)流提供不同級(jí)別的QoS。
3、負(fù)載均衡:網(wǎng)絡(luò)管理員可以通過(guò)策略路由在多條路徑上分發(fā)數(shù)據(jù)流。
4、網(wǎng)絡(luò)管理更加靈活。
雙出口配置實(shí)例
(一)實(shí)驗(yàn)拓樸
(二)實(shí)驗(yàn)要求
1、R1連接本地子網(wǎng),R2為邊緣策略路由器,R3模擬雙ISP接入的Internet環(huán)境。
2、要求R1所連接的局域網(wǎng)部分流量走R2-R3間上條鏈路(ISP1鏈路),部分流量走R2-R3間下條鏈路(ISP2鏈路)從而實(shí)現(xiàn)基于源的供應(yīng)商鏈路選擇和網(wǎng)絡(luò)負(fù)載均衡。
(三)各路由器配置如下
R1#sh run //路由器R1的配置
……
interface Loopback0 //模擬子網(wǎng)一:192.168.1.0/24
ip address 192.168.1.1 255.255.255.0 //模擬子網(wǎng)中第一臺(tái)主機(jī)
ip address 192.168.1.2 255.255.255.0 secondary //模擬子網(wǎng)中第二臺(tái)主機(jī)
!
interface Loopback2 //模擬子網(wǎng)二:192.168.2.0/24
ip address 192.168.2.1 255.255.255.0
ip address 192.168.2.2 255.255.255.0 secondary
!
interface FastEthernet0/0
ip address 12.0.0.1 255.255.255.0
duplex half
!
……
!
router rip //通過(guò)RIP協(xié)議配置網(wǎng)絡(luò)的連通性
version 2
network 192.168.1.0
network 192.168.1.0
network 12.0.0.0
……
end
-----------------------------
R3#sh run //路由器R3的配置
Building configuration...
……
interface Loopback0 //模擬一個(gè)連接目標(biāo)
description to internet
ip address 100.100.100.100 255.255.255.0
!
interface Serial1/1 //模擬ISP1的接入端口
ip address 123.0.0.3 255.255.255.0
serial restart-delay 0
!
……
interface Serial1/3 //模擬ISP2的接入端口
ip address 223.0.0.3 255.255.255.0
serial restart-delay 0
!
router rip
version 2
network 100.0.0.0
network 123.0.0.0
network 223.0.0.0
no auto-summary
!
……
end
---------------------------------------------------------------------------------
R2#sh run //策略路由器R2的配置
Building configuration...
……
interface FastEthernet0/0
ip address 12.0.0.2 255.255.255.0
ip policy route-map isp-test //在接口上啟用策略路由isp-test進(jìn)行流量控制
duplex half
!
……
interface Serial1/1
ip address 123.0.0.1 255.255.255.0
serial restart-delay 0
!
interface Serial1/3
ip address 223.0.0.1 255.255.255.0
serial restart-delay 0
……
router rip
version 2
network 12.0.0.0
network 123.0.0.0
network 223.0.0.0
no auto-summary
……
logging alarm informational
access-list 101 permit ip 192.168.1.0 0.0.0.255 host 100.100.100.100 //訪問(wèn)控制列表101,用于過(guò)濾原地址,允許子網(wǎng)192.168.1.0流量通過(guò) */
access-list 102 permit ip 192.168.2.0 0.0.0.255 host 100.100.100.100 //訪問(wèn)控制列表102,用于過(guò)濾原地址,允許子網(wǎng)192.168.2.0流量通過(guò) */
!
route-map isp-test permit 10 //定義route-map,取名為isp-test,序列為10
match ip address 101 //檢查源地址,匹配acl 101
set ip default next-hop 123.0.0.3 //指定下一跳地址
!
route-map isp-test permit 20 //定義isp-test的第二條語(yǔ)句,序列號(hào)為20
match ip address 102 //檢查源地下,匹配acl102
set ip default next-hop 223.0.0.3
!
route-map isp-test permit 30 //定義isp-test的第三條語(yǔ)句,序列號(hào)為30
set default interface Null0 //丟棄不匹配規(guī)定標(biāo)準(zhǔn)的包
……
end
---------------------------------------------------------------------------------
(四)調(diào)試
R2#sh ip policy //顯示應(yīng)用的策略
Interface Route map
Fa0/0 isp-acc
R2#sh route-map isp-test //顯示配置的路由映射圖
route-map isp-test, permit, sequence 10
Match clauses:
ip address (access-lists): 101
Set clauses:
ip default next-hop 123.0.0.3
Policy routing matches: 0 packets, 0 bytes
route-map isp-test, permit, sequence 20
Match clauses:
ip address (access-lists): 102
Set clauses:
ip default next-hop 223.0.0.3
Policy routing matches: 0 packets, 0 bytes
route-map isp-test, permit, sequence 30
Match clauses:
Set clauses:
default interface Null0
Policy routing matches: 0 packets, 0 bytes
========================================================================
R1#traceroute //路由跟蹤
Protocol [ip]: //ip流量
Target IP address: 100.100.100.100 //目標(biāo)地
Source address: 192.168.1.1 //源地址為子網(wǎng)一的第一臺(tái)主機(jī)
Numeric display [n]:
Timeout in seconds [3]:
Probe count [3]:
Minimum Time to Live [1]:
Maximum Time to Live [30]:
Port Number [33434]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Type escape sequence to abort.
Tracing the route to 100.100.100.100
1 12.0.0.2 72 msec 216 msec 276 msec
2 123.0.0.3 288 msec 360 msec * //ISP1入口
-------------------------------------------------------------------------------
R1# traceroute
Protocol [ip]:
Target IP address: 100.100.100.100
Source address: 192.168.1.2 //源地址為子網(wǎng)一的第二臺(tái)主機(jī)
Numeric display [n]:
Timeout in seconds [3]:
Probe count [3]:
Minimum Time to Live [1]:
Maximum Time to Live [30]:
Port Number [33434]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Type escape sequence to abort.
Tracing the route to 100.100.100.100
1 12.0.0.2 92 msec 188 msec 52 msec
2 123.0.0.3 416 msec 436 msec * //ISP1入口
----------------------------------------------------------------------------------
R1#traceroute
Protocol [ip]:
Target IP address: 100.100.100.100
Source address: 192.168.2.1 //源地址為子網(wǎng)二的第一臺(tái)主機(jī)
Numeric display [n]:
Timeout in seconds [3]:
Probe count [3]:
Minimum Time to Live [1]:
Maximum Time to Live [30]:
Port Number [33434]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Type escape sequence to abort.
Tracing the route to 100.100.100.100
1 12.0.0.2 136 msec 40 msec 144 msec
2 223.0.0.3 356 msec * 132 msec //ISP2入口
---------------------------------------------------------
R1#traceroute
Protocol [ip]:
Target IP address: 100.100.100.100
Source address: 192.168.2.2 //源地址為子網(wǎng)二中第二臺(tái)主機(jī)
Numeric display [n]:
Timeout in seconds [3]:
Probe count [3]:
Minimum Time to Live [1]:
Maximum Time to Live [30]:
Port Number [33434]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Type escape sequence to abort.
Tracing the route to 100.100.100.100
1 12.0.0.2 28 msec 104 msec 200 msec
2 223.0.0.3 300 msec * 196 msec //ISP2入口
-----------------------------------------------------
設(shè)置Cisco路由多鏈路負(fù)載均衡的相關(guān)文章: