LAB 11. BGP Dual Homing – ISP sama
BGP Dualhoming yaitu Dua Link ke ISP yang sama dengan fitur sebagai berikut
a. Main-Backup Mode
b. Load Sharing Mode
Sedangkan BGP multihoming yaitu Dua Link ke ISP yang berbeda dengan fitur :
a. Main-Backup Mode
b. Load Sharing Mode
R1(config)#int g1/0
R1(config-if)#ip add 12.12.12.1 255.255.255.0 R1(config-if)#no shutdown
R1(config)#int g2/0
R1(config-if)#ip add 13.13.13.1 255.255.255.0 R1(config-if)#no shutdown
R1(config)#int loopback 0
R1(config-if)#ip add 1.1.1.1 255.255.255.255
R1(config-if)#router bgp 1
R1(config-router)#neighbor 12.12.12.2 remote-as 23
R1(config-router)#neighbor 13.13.13.3 remote-as 23
R1(config-router)#network 1.1.1.1 mask 255.255.255.255
R2(config)#int g2/0
R2(config-if)#ip add 12.12.12.2 255.255.255.0 R2(config-if)#no shutdown
R2(config-if)#int f0/0
R2(config-if)#ip add 23.23.23.2 255.255.255.0 R2(config-if)#no shutdown
R2(config-if)#int g1/0
R2(config-if)#ip add 24.24.24.2 255.255.255.0 R2(config-if)#no shutdown
R2(config)#int lo0
R2(config-if)#ip add 2.2.2.2 255.255.255.255
R2(config-if)#router bgp 23
R2(config-router)#neighbor 12.12.12.1 remote-as 1
R2(config-router)#neighbor 23.23.23.3 remote-as 23
R2(config-router)#neighbor 24.24.24.4 remote-as 4
R2(config-router)#network 2.2.2.2 mask 255.255.255.255
R2(config-router)#neighbor 23.23.23.3 next-hop-self
R3(config)#int g1/0
R3(config-if)#ip add 13.13.13.3 255.255.255.0 R3(config-if)#no shutdown
R3(config)#int f0/0
R3(config-if)#ip add 23.23.23.3 255.255.255.0 R3(config-if)#no shutdown
R3(config-if)#exit R3(config)#int g2/0
R3(config-if)#ip add 34.34.34.3 255.255.255.0 R3(config-if)#no shutdown
R3(config)#router bgp 23
R3(config-router)#neighbor 13.13.13.1 remote-as 1
R3(config-router)#neighbor 23.23.23.2 remote-as 23
R3(config-router)#neighbor 34.34.34.4 remote-as 4
R3(config-router)#neighbor 23.23.23.2 next-hop-self
R4(config)#int g1/0
R4(config-if)#ip add 24.24.24.4 255.255.255.0 R4(config-if)#no shutdown
R4(config)#int g2/0
R4(config-if)#ip add 34.34.34.4 255.255.255.0 R4(config-if)#no shutdown
R4(config)#int lo0
R4(config-if)#ip add 4.4.4.4 255.255.255.255
R4(config)#router bgp 4
R4(config-router)#neighbor 24.24.24.2 remote-as 23 R4(config-router)#neighbor 34.34.34.3 remote-as 23s
R4(config-router)#network 4.4.4.4 mask 255.255.255.255
R1(config)#do show ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 0.0.0.0 0 32768 i
* 2.2.2.2/32 13.13.13.3 0 23 i
*> 12.12.12.2 0 0 23 i
* 4.4.4.4/32 13.13.13.3 0 23 4 i
*> 12.12.12.2 0 23 4 i
Kesimpulannya, walaupun sudah menggunakan 2 link, namun tetap saja hanya
1 link yang digunakan. Sekarang kita akan shutdown port int s0/0 (12.12.12.1/24) sehingga paket tidak lagi melalui R2.
R1(config)#int g1/0
R1(config-if)#shutdown
R1(config)#do sh ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 0.0.0.0 0 32768 i
*> 4.4.4.4/32 13.13.13.3 0 23 4 i
R1(config)#do show ip route
bgp 4.0.0.0/32 is subnetted, 1 subnets
B 4.4.4.4 [20/0] via 13.13.13.3, 00:03:06
R1(config)#int g1/0
R1(config-if)#no sh
R1#sh ip bgp
BGP table version is 5, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 0.0.0.0 0 32768 i
* 4.4.4.4/32 12.12.12.2 0 23 4 i
*> 13.13.13.3 0 23 4 i
R1#sh ip route bgp 4.0.0.0/32 is subnetted, 1 subnets B 4.4.4.4 [20/0] via 13.13.13.3, 00:32:17 |
Ternyata hasilnya menarik, tidak mau otomatis pindah ke R2 lagi. Agar memastikan link ke R2 menjadi main link, maka kita konfigurasikan attribute weight.
R1(config)#route-map WEIGHT R1(config-route-map)#set weight 100
R1(config-route-map)#exit
R1(config)#router bgp 1
R1(config-router)#neighbor 12.12.12.2 route-map WEIGHT in R1(config-router)#exit
R1(config)#do clear ip bgp *
R1#sh ip bgp
BGP table version is 3, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 0.0.0.0 0 32768 i
*> 4.4.4.4/32 12.12.12.2 100 23 4 i
* 13.13.13.3 0 23 4 i
R1#sh ip route bgp
4.0.0.0/32 is subnetted, 1 subnets
B 4.4.4.4 [20/0] via 12.12.12.2, 00:02:09
Terlihat sekarang linknya melalui R2 kembali. Kemudian kita tes lagi shutdown interface ke R2.
R1(config)#int g1/0
R1(config-if)#shutdown
R1(config)#do sh ip bgp
BGP table version is 4, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 0.0.0.0 0 32768 i
*> 4.4.4.4/32 13.13.13.3 0 23 4 i
R1(config)#do sh ip route
bgp 4.0.0.0/32 is subnetted, 1 subnets
B 4.4.4.4 [20/0] via 12.12.12.2, 00:00:02
Comments
Post a Comment