Load balancing BGP dengan satu ASN

Untuk menunjang link BGP lebih aman, ada baiknya dengan menambahkan redundant link jadi ketika salah satu link untuk peer bgp down link lainnya masih bisa backup.

Berikut contoh load balancing bgp dengan satu ASN

load-balancing single asn

dari ilustrasi topologi diatas, customer memiliki 2 link untuk peer bgp yang memiliki jalur yang berbeda, misalnya satu link dengan Fibre Optic dan satunya dengan Radio. Karena ada 2 peer ip untuk satu ASN untuk mempersingkat di konfigurasi bgp diperlukan ip loopback sebagai neighbor nya. eBGP (external BGP) by default requires two Cisco IOS routers to be directly connected to each other in order to establish a neighbor adjacency. When the BGP neighbor is more than one hop away, the TTL will decrement to 0 and it will be discarded. Karena neighbor yang digunakan adalah ip loopback dimana router customer untuk menjangkau loopback tersebut melewati 2 hoop maka konfigurasi neighbornya menjadi ebgp-multihop 2 dan neighbornya diset update-source Loopback x.

Berikut detail konfigurasi dari topologi diatas,

"Provider side"

!
hostname Provider
!
!
interface Loopback0
 ip address 192.10.1.1 255.255.255.255
!
interface FastEthernet0/0
 description 1st Link to AS1010
 ip address 192.168.1.5 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet1/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet2/0
 description 2nd Link to AS1010
 ip address 192.168.1.9 255.255.255.252
 duplex auto
 speed auto
!
!
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 neighbor 192.10.1.2 remote-as 1010
 neighbor 192.10.1.2 description BGP to AS1010
 neighbor 192.10.1.2 ebgp-multihop 2
 neighbor 192.10.1.2 update-source Loopback0
 neighbor 192.10.1.2 default-originate
 neighbor 192.10.1.2 soft-reconfiguration inbound
 no auto-summary
!
ip route 192.10.1.2 255.255.255.255 192.168.1.6
ip route 192.10.1.2 255.255.255.255 192.168.1.10
!
ip prefix-list AS1010 seq 5 permit 10.10.200.0/24
ip prefix-list AS1010 seq 10 permit 10.10.201.0/24
ip prefix-list AS1010 seq 15 permit 10.10.202.0/24
ip prefix-list AS1010 seq 20 permit 10.10.203.0/24
!

"Customer side"

!
hostname Customer
!
interface Loopback0
 ip address 192.10.1.2 255.255.255.255
!
interface FastEthernet0/0
 description BGP Link ke-1
 ip address 192.168.1.6 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 10.10.202.1 255.255.255.0 secondary
 ip address 10.10.200.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet2/0
 description BGP Link ke-2 
 ip address 192.168.1.10 255.255.255.252
 duplex auto
 speed auto
!
router bgp 1010
 no synchronization
 bgp log-neighbor-changes
 network 10.10.200.0 mask 255.255.255.0
 network 10.10.201.0 mask 255.255.255.0
 network 10.10.202.0 mask 255.255.255.0
 network 10.10.203.0 mask 255.255.255.0
 neighbor 192.10.1.1 remote-as 100
 neighbor 192.10.1.1 ebgp-multihop 2
 neighbor 192.10.1.1 update-source Loopback0
 neighbor 192.10.1.1 version 4
 neighbor 192.10.1.1 soft-reconfiguration inbound
 neighbor 192.10.1.1 prefix-list TO-AS100 out
 no auto-summary
!
ip route 192.10.1.1 255.255.255.255 192.168.1.5
ip route 192.10.1.1 255.255.255.255 192.168.1.9
! 
ip prefix-list TO-AS100 seq 5 permit 10.10.200.0/24
ip prefix-list TO-AS100 seq 10 permit 10.10.202.0/24
!

Dari konfigurasi diatas, untuk menjangkau loopback masing-masing neighbornya menggunakan static route berikut verifikasinya :

Provider#show ip route static
 192.10.1.0/32 is subnetted, 2 subnets
S 192.10.1.2 [1/0] via 192.168.1.10
 [1/0] via 192.168.1.6

Provider#ping 192.10.1.2 so 192.10.1.1
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/30/44 ms

Customer#show ip route static
 192.10.1.0/32 is subnetted, 2 subnets
S 192.10.1.1 [1/0] via 192.168.1.9
 [1/0] via 192.168.1.5

Customer#ping 192.10.1.1 so 192.10.1.2
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/18/24 ms

Cek status BGP disisi customer jika salah satu link ada yang down bergantian :

Customer(config)#int f0/0
Customer(config-if)#shutdown
*Mar 1 01:19:08.111: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down
*Mar 1 01:19:09.111: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down

Customer#show ip bgp summary 
BGP router identifier 192.10.1.2, local AS number 1010
BGP table version is 6, main routing table version 6
3 network entries using 351 bytes of memory
3 path entries using 156 bytes of memory
3/2 BGP path/bestpath attribute entries using 372 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 903 total bytes of memory
BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
192.10.1.1 4 100 60 60 6 0 0 00:54:33 1

Customer(config-if)#no shutdown
*Mar 1 01:20:57.783: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 01:20:58.783: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Customer(config-if)#int f2/0
Customer(config-if)#shutdown
*Mar 1 01:21:11.059: %LINK-5-CHANGED: Interface FastEthernet2/0, changed state to administratively down
*Mar 1 01:21:12.059: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet2/0, changed state to down

Customer(config-if)#do sh ip bgp summary
BGP router identifier 192.10.1.2, local AS number 1010
BGP table version is 6, main routing table version 6
3 network entries using 351 bytes of memory
3 path entries using 156 bytes of memory
3/2 BGP path/bestpath attribute entries using 372 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 903 total bytes of memory
BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
192.10.1.1 4 100 62 62 6 0 0 00:56:16 1

Dari verifikasi diatas, meskipun salah satu peer mati bergantian time establish nya akan berlanjut, dengan ini konfigurasi Load balancing BGP dengan satu ASN sudah berhasil, sebagai tambahan dengan adanya dua link aktif tersebut, maka outbound traffic akan sharing begitu juga dengan inbound traffic. 🙂

Source: http://showipbgp.com

Advertisements

Author: admin@khsnndzf

Good People

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s