650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/031R16441-0.png "" 835 "height =" 219 "/>
How does one achieve load balancing on multiple links?
Two methods:
1. Build an EBGP neighbor using the loopback port and use EBGP multi-hop
2. EBGP multipath
The following two methods are discussed:
1. Build an EBGP neighbor using the loopback port and use EBGP multi-hop
ISP #
Interface Loopback0
Ip address 172.16.1.1 255.255.255.255
!
Interface Serial1/0
Ip address 10.1.1.1 255.255.255.252
Serial restart-delay 0
!
Interface Serial1/1
Ip address 10.1.1.5 255.255.255.252
Serial restart-delay 0
!
Interface Serial1/2
Ip address 10.1.1.9 255.255.255.252
Serial restart-delay 0
!
Router bgp 100
No synchronization
Bgp router-id 172.16.1.1
Bgp log-neighbor-changes
Network 172.17.0.0
Neighbor 172.16.2.1 remote-as 65100
Neighbor 172.16.2.1 ebgp-multihop 2
Neighbor 172.16.2.1 update-source Loopback0
No auto-summary
!
Ip route 172.16.2.1 255.255.255.255 Serial1/0 10.1.1.2
Ip route 172.16.2.1 255.255.255.255 Serial1/0 10.1.1.6
Ip route 172.16.2.1 255.255.255.255 Serial1/0 10.1.1.10
Ip route 172.17.0.0 255.255.0.0 Null0
Enterprise #
Interface Loopback0
Ip address 172.16.1.1 255.255.255.255
!
Interface Serial1/0
Ip address 10.1.1.1 255.255.255.252
Serial restart-delay 0
!
Interface Serial1/1
Ip address 10.1.1.5 255.255.255.252
Serial restart-delay 0
!
Interface Serial1/2
Ip address 10.1.1.9 255.255.255.252
Serial restart-delay 0
!
Interface Serial1/3
No ip address
Shutdown
Serial restart-delay 0
!
Router bgp 100
No synchronization
Bgp router-id 172.16.1.1
Bgp log-neighbor-changes
Network 172.17.0.0
Neighbor 172.16.2.1 remote-as 65100
Neighbor 172.16.2.1 ebgp-multihop 2
Neighbor 172.16.2.1 update-source Loopback0
No auto-summary
!
Ip route 172.16.2.1 255.255.255.255 Serial1/0 10.1.1.2
Ip route 172.16.2.1 255.255.255.255 Serial1/0 10.1.1.6
Ip route 172.16.2.1 255.255.255.255 Serial1/0 10.1.1.10
Ip route 172.17.0.0 255.255.0.0 Null0
Enterprise # show ip route
Codes: C-connected, S-static, R-RIP, M-mobile, B-BGP
D-OSPF, EX-VPN external, O-OSPF, IA-OSPF inter area
N1-ospf nssa external type 1, N2-ospf nssa external type 2
E1-OSPF external type 1, E2-OSPF external type 2
I-IS, su-IS summary, L1-IS-level-1, L2-IS level-2
Ia-IS inter area, *-candidate default, U-per-user static route
O-ODR, P-periodic downloaded static route
Gateway of last resort is not set
B 172.17.0.0/16 [20/0] via 172.16.1.1, 00:08:09
172.16.0.0/32 is subnetted, 2 subnets
S 172.16.1.1 [1/0] via 10.1.1.9, Serial1/2
[1, 1/0] via 10.1.1.5, Serial1/1
[1, 1/0] via 10.1.1.1, Serial1/0
C 172.16.2.1 is directly connected, Loopback0
S 172.18.0.0/16 is directly connected, Null0
10.0.0.0/30 is subnetted, 3 subnets
C 10.1.1.8 is directly connected, Serial1/2
C 10.1.1.0 is directly connected, Serial1/0
C 10.1.1.4 is directly connected, Serial1/1
The next hop on the target network 172.17.0.0/16 is 172.16.1.1. The route table is recursively queried and three equivalent routes reach 172.16.1.1 to achieve load balancing.
Note:The configuration here uses a static route to reach the peer loopback port. It is used to prevent the IGP learning loopback port address from mistakenly declaring the loopback port address to BGP, causing the EBGP neighbor flapping. For details, referHttp://1095999.blog.51cto.com/1085999/524417
Therefore, if you use the loopback port to establish an EBGP neighbor, we recommend that you use a static route to reach the loopback port of the other party.
2. EBGP multipath
ISP #
Interface Loopback0
Ip address 172.16.1.1 255.255.255.255
!
Interface Serial1/0
Ip address 10.1.1.1 255.255.255.252
Serial restart-delay 0
!
Interface Serial1/1
Ip address 10.1.1.5 255.255.255.252
Serial restart-delay 0
!
Interface Serial1/2
Ip address 10.1.1.9 255.255.255.252
Serial restart-delay 0
!
Interface Serial1/3
No ip address
Shutdown
Serial restart-delay 0
!
Router bgp 100
No synchronization
Bgp router-id 172.16.1.1
Bgp log-neighbor-changes
Network 172.17.0.0
Neighbor 10.1.1.2 remote-as 65100
Neighbor 10.1.1.6 remote-as 65100
Neighbor 10.1.1.10 remote-as 65100
Maximum-paths 3
No auto-summary
!
No ip http server
No ip http secure-server
Ip route 172.17.0.0 255.255.0.0 Null0
!
Enterprise #
Interface Loopback0
Ip address 172.16.2.1 255.255.255.255
!
Interface Serial1/0
Ip address 10.1.1.2 255.255.255.252
Serial restart-delay 0
!
Interface Serial1/1
Ip address 10.1.1.6 255.255.255.252
Serial restart-delay 0
!
Interface Serial1/2
Ip address 10.1.1.10 255.255.255.252
Serial restart-delay 0
!
Interface Serial1/3
No ip address
Shutdown
Serial restart-delay 0
!
Router bgp 65100
No synchronization
Bgp router-id 172.16.2.1
Bgp log-neighbor-changes
Network 172.18.0.0
Neighbor 10.1.1.1 remote-as 100
Neighbor 10.1.1.5 remote-as 100
Neighbor 10.1.1.9 remote-as 100
Maximum-paths 3
No auto-summary
!
No ip http server
No ip http secure-server
Ip route 172.18.0.0 255.255.0.0 Null0
Enterprise # sh ip ro
Codes: C-connected, S-static, R-RIP, M-mobile, B-BGP
D-OSPF, EX-VPN external, O-OSPF, IA-OSPF inter area
N1-ospf nssa external type 1, N2-ospf nssa external type 2
E1-OSPF external type 1, E2-OSPF external type 2
I-IS, su-IS summary, L1-IS-level-1, L2-IS level-2
Ia-IS inter area, *-candidate default, U-per-user static route
O-ODR, P-periodic downloaded static route
Gateway of last resort is not set
B 172.17.0.0/16 [20/0] via 10.1.1.9, 00:00:41
[20/0] via 10.1.1.5, 00:00:41
[20/0] via 10.1.1.1, 00:00:41
172.16.0.0/32 is subnetted, 1 subnets
C 172.16.2.1 is directly connected, Loopback0
S 172.18.0.0/16 is directly connected, Null0
10.0.0.0/30 is subnetted, 3 subnets
C 10.1.1.8 is directly connected, Serial1/2
C 10.1.1.0 is directly connected, Serial1/0
C 10.1.1.4 is directly connected, Serial1/1
Three Equivalent route entries are displayed in the route table.
Note: Only one optimal route is possible in the BGP table, because after comparison of 13 routing principles, it is possible to distinguish between the two, and there cannot be an equivalent route.
The maximum-paths command means that some routing principles are not compared, and several paths with the same routing principles are selected and put into the route table, which is equivalent load of several paths.