簡析路由負(fù)載均衡的配置
對于交換和路由設(shè)備我們也可是加上負(fù)載均衡技術(shù),使他們的的性能更加優(yōu)越。但是,從路由負(fù)載均衡的實際應(yīng)用的鏈路中的路由分配和負(fù)載均衡并不是單一的對應(yīng)關(guān)系,這是什么原因呢?下面我們就為大家說明一下這類問題。
BGP對其BGP表中的路由是必須選出一條***的,但可以對最終放到路由表中的路由負(fù)載均衡。
R1配置:
r1#show running-config | b r b
router bgp 1
no synchronization
bgp log-neighbor-changes
network 1.1.1.0 mask 255.255.255.0
neighbor 12.1.1.2 remote-as 2
neighbor 13.1.1.2 remote-as 2
maximum-paths 2(此時看到BGP表中還是只有一條***的路由被標(biāo)記但是有2條路由負(fù)載均衡被放進(jìn)路由表中?。?br />no auto-summary
R2配置:
r2#show running-config | b r b
router bgp 2
no synchronization
bgp log-neighbor-changes
network 2.2.2.0 mask 255.255.255.0
neighbor 12.1.1.1 remote-as 1
neighbor 23.1.1.2 remote-as 2
neighbor 23.1.1.2 next-hop-self(保證R3可以通過R2學(xué)到1.1.1.0/24的路由條目)
no auto-summary
#p#R3配置:
r3#show running-config | b r b
router bgp 2
no synchronization
bgp log-neighbor-changes
neighbor 13.1.1.1 remote-as 1
neighbor 23.1.1.1 remote-as 2
maximum-paths 2(沒有任何效果)
no auto-summary
R1的路由表和BGP表:
r1#show ip bgp
BGP table version is 8, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.0/240.0.0.0 0 32768 i
*> 2.2.2.0/2413.1.1.2 0 2 i
* 12.1.1.2 0 0 2 i
r1#show ip route
1.0.0.0/24 is subnetted, 1 subnets
C1.1.1.0 is directly connected, Loopback0
2.0.0.0/24 is subnetted, 1 subnets
B2.2.2.0 [20/0] via 12.1.1.2, 00:06:48
[20/0] via 13.1.1.2, 00:05:52
12.0.0.0/24 is subnetted, 1 subnets
C12.1.1.0 is directly connected, Serial1/0
13.0.0.0/24 is subnetted, 1 subnets
C13.1.1.0 is directly connected, Serial1/1
做負(fù)載均衡的兩條(或更高的)路徑必須是EBGP屬性,經(jīng)我測試一條EBGP,一條IBGP是不可以的,2條IBGP也是不可以的。BGP表中還是一條***的路徑被選擇就是11條選錄原則 但是命令maximum-paths可以對最終放進(jìn)路由表中進(jìn)行路由負(fù)載均衡.