Selasa, 06 Desember 2011

Day 4 - BGP Attribute (Community)

Setelah selama 3 hari pertama kita membahas topik routing IGP (RIP, EIGRP dan OSPF), hari keempat saatnya kita membahas topik routing EGP, yaitu apalagi kalau bukan membahas routing BGP.

Lab kali ini akan fokus untuk membahas BGP Attribute - Community no-export dan no-advertise.


Dimana untuk Community termasuk BGP Attribute optional transitive. Artinya bahwa apabila tidak dikenali, maka attribute akan didrop oleh router yang bersangkutan.


Lab 10 - BGP Attribute (Community no-export dan no-advertise)


Topologi lab yang digunakan adalah sbb :





R1, R2 dan R3 berada pada AS 123, sedangkan R4 berada pada AS 4.

Konfigurasi router R1 :
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface Loopback1
 ip address 11.11.11.11 255.255.255.255
!
interface FastEthernet0/0
 ip address 12.12.12.1 255.255.255.0
!
router eigrp 1
 network 1.1.1.1 0.0.0.0
 network 12.12.12.1 0.0.0.0
!
router bgp 123
 no synchronization
 bgp log-neighbor-changes
 network 11.11.11.11 mask 255.255.255.255
 neighbor 2.2.2.2 remote-as 123
 neighbor 2.2.2.2 update-source Loopback0


Konfigurasi router R2 :
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface Loopback1
 ip address 22.22.22.22 255.255.255.255
!
interface FastEthernet0/0
 ip address 12.12.12.2 255.255.255.0
!
interface Serial0/0
 ip address 24.24.24.2 255.255.255.0
!
interface FastEthernet0/1
 ip address 23.23.23.2 255.255.255.0
!
router eigrp 1
 network 2.2.2.2 0.0.0.0
 network 12.12.12.2 0.0.0.0
 network 23.23.23.2 0.0.0.0
 network 24.24.24.2 0.0.0.0
!
router bgp 123
 no synchronization
 bgp log-neighbor-changes
 network 22.22.22.22 mask 255.255.255.255
 neighbor 1.1.1.1 remote-as 123
 neighbor 1.1.1.1 update-source Loopback0
 neighbor 1.1.1.1 next-hop-self
 neighbor 3.3.3.3 remote-as 123
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 3.3.3.3 route-reflector-client
 neighbor 3.3.3.3 next-hop-self
 neighbor 24.24.24.4 remote-as 4
 no auto-summary


Konfigurasi router R3 :
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface Loopback1
 ip address 33.33.33.33 255.255.255.255
!
interface FastEthernet0/0
 ip address 23.23.23.3 255.255.255.0
!
router eigrp 1
 network 3.3.3.3 0.0.0.0
 network 23.23.23.3 0.0.0.0
!
router bgp 123
 no synchronization
 bgp log-neighbor-changes
 network 33.33.33.33 mask 255.255.255.255
 neighbor 2.2.2.2 remote-as 123
 neighbor 2.2.2.2 update-source Loopback0


Konfigurasi router R4 :
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!
interface Serial0/0
 ip address 24.24.24.4 255.255.255.0
!
router bgp 4
 no synchronization
 bgp log-neighbor-changes
 network 4.4.4.4 mask 255.255.255.255
 neighbor 24.24.24.2 remote-as 123


Hasil cek BGP route  di router R1 dan R4 :
















 

Kemudian kita coba set community 'no-export' di router R1 untuk IP 11.11.11.11 (no-export artinya tidak di advertise ke eBGP).


R1(config)#access-list 1 permit host 11.11.11.11
R1(config)#route-map NO-EXPORT
R1(config-route-map)#match ip address 1
R1(config-route-map)#set community no-export
R1(config-route-map)#router bgp 123
R1(config-router)#neighbor 2.2.2.2 route-map NO-EXPORT out
R1(config-router)#neighbor 2.2.2.2 send-community

Kita coba cek BGP route di R3 (masih dalam IBGP AS 123) :

 

Route BGP untuk IP 11.11.11.11 di R3 masih terlihat.


Kita coba cek BGP route di router R4 (eBGP AS 4) :




Terlihat bahwa untuk IP 11.11.11.11 sudah tidak ada lagi di BGP route di router R4.


Kita coba cek juga di router R2 untuk IP 11.11.11.11 menggunakan command  
'show ip bgp 11.11.11.1'



Pada route BGP yang diterima R2 dari R1, untuk IP 11.11.11.11 diberikan community no-export, yang artinya IP tersebut masih bisa diadvertise ke router R3 (iBGP AS 123).

Tetapi tidak advertise ke router R4 (eBGP AS 4).

Kita lanjutkan untuk mencoba menggunakan community 'no-advertise' untuk IP 33.33.33.33 pada router R3 :

R3(config)#access-list 1 permit host 33.33.33.33
R3(config)#route-map NO-ADVERTISE
R3(config-route-map)#match ip address 1
R3(config-route-map)#set community no-advertise
R3(config-route-map)#router bgp 123
R3(config-router)#neighbor 2.2.2.2 route-map NO-ADVERTISE out
R3(config-router)#neighbor 2.2.2.2 send-community

Kemudian kita cek di router R1 dan R4, pastikan bahwa IP 33.33.33.33 sudah tidak terlihat lagi.










Terlihat bahwa untuk IP 33.33.33.33 sudah tidak ada dalam BGP route baik di router R1 maupun router R4.

Kita cek juga routing IP 33.33.33.33 di router R2 :


Pada route BGP yang diterima R2 dari R3, untuk IP 33.33.33.33 diberikan community no-advertise, yang artinya IP tidak diadvertise kemana - mana, baik ke iBGP (AS 123) maupun eBGP (AS 4).
 
Yang perlu diperhatikan adalah bahwa apabila kita sudah selesai memasang route-map pada neighbor BGP, jangan lupa untuk menambahkan command  
neighbor x.x.x.x send-community.

Command tersebut digunakan agar router BGP dapat mengirimkan community kepada neghbor BGP yang dikehendaki.

Tidak ada komentar:

Posting Komentar