Lab 32. BGP Attribute Community
Salah satu attribute BGP adalah community. Community ini digunakan sebagai routing policy dan memanipulasi routing karena di BGP akan banyak routing policy untuk menentukan route suatu network...
Secara default BGP belum mengaktifkan attribute community dan BGP memiliki 3 community value yaitu :
No Export = Tidak mengadvertise route ke luar AS dan dapat mengadvertise ke konfederasi lain dalam satu AS
No Advertise = Tidak mengadvertise ke peer manapun
Local AS = Tidak mengadvertise ke luar konfederasi lokal sub AS
Let's go to the scenario
Pada topologi di atas R1, R2 dan R3 di AS 123 dan R4 di AS 4.. Lo 1 pada R1 set no-export yang artinya tidak akan diadvertise ke R4 dan Lo 1 pada R3 set no-advertise yang artinya tidak diadvertise ke peer manapun..
R1
interface Loopback0
ip address 1.1.1.1 255.255.255.255
ip ospf 1 area 0
!
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
ip ospf 1 area 0
!
router bgp 123
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
R2
interface Loopback0
ip address 2.2.2.2 255.255.255.255
ip ospf 1 area 0
!
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
ip ospf 1 area 0
!
interface Serial0/0
ip address 24.24.24.2 255.255.255.0
clock rate 2000000
!
interface FastEthernet0/1
ip address 23.23.23.2 255.255.255.0
ip ospf 1 area 0
!
router bgp 123
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 route-reflector-client
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
R3
interface Loopback0
ip address 3.3.3.3 255.255.255.255
ip ospf 1 area 0
!
interface Loopback1
ip address 33.33.33.33 255.255.255.255
!
interface FastEthernet0/1
ip address 23.23.23.3 255.255.255.0
ip ospf 1 area 0
!
router bgp 123
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
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
network 4.4.4.4 mask 255.255.255.255
neighbor 24.24.24.2 remote-as 123
Secara default attribute community tidak aktif dan sekarang kita buat dulu di R1 (no-export)..
R1
access-list 1 permit 11.11.11.11
!
route-map NO-EXPORT permit 10
match ip address 1
set community no-export
!
neighbor 2.2.2.2 send-community
neighbor 2.2.2.2 route-map NO-EXPORT out
First buat dulu access-list untuk network yang akan dimasukan comunity (no-export) lalu buat route-map dan tentukan community nya.. After all tinggal implement ke dalam BGPnya, And then liat hasilnya
Ya, pada R2 terlihat route 11.11.11.11/32 community : no-export dan seharusnya ini tidak akan diadvertise ke R4 karena beda AS..
Ok, pada R4 tidak dapat route ke 11.11.11.11/3.. Next ke R3 set community no-advertise..
R3
access-list 1 permit 33.33.33.33
!
route-map NO-ADVERTISE permit 10
match ip address 1
set community no-advertise
!
neighbor 2.2.2.2 send-community
neighbor 2.2.2.2 route-map NO-ADVERTISE out
Sama seperti konfig saat membuat attribute community dai R1 cuma bedanya ini no-advertise.. Cek lagi di R2 dan BGP tabel di R4/R1..
Ok, pada R2 sudah terlihat community : no-advertise untuk route 33.33.33.33/24 dan ini tidak akan diadvertise ke router lainnya lagi.. Let's check
Ok, R1 sudah tak ada route 33.33.33.33/32
Begitu juga R4, there is no way to 33.33.33.33/32
Terakhir community local AS, untuk pengetesan ganti konfigurasi iBGP (R1, R2, & R3) route reflector menjadi confederation. BGP confederation digunakan untuk memecah satu AS menjadi sub AS atau menggabungkan beberapa AS menjadi satu AS... Let's play..
R1
no router bgp 123
!
router bgp 12
bgp confederation identifier 123
network 11.11.11.11 mask 255.255.255.255
neighbor 12.12.12.2 remote-as 12
R2
no router bgp 123
!
router bgp 12
bgp confederation identifier 123
bgp confederation peers 3
network 22.22.22.22 mask 255.255.255.255
neighbor 12.12.12.1 remote-as 12
neighbor 12.12.12.1 next-hop-self
neighbor 23.23.23.3 remote-as 3
neighbor 23.23.23.3 next-hop-self
neighbor 24.24.24.4 remote-as 4
R3
no router bgp 123
!
router bgp 3
bgp confederation identifier 123
bgp confederation peers 12
network 33.33.33.33 mask 255.255.255.255
neighbor 23.23.23.2 remote-as 12
Setelah dibuat BGP confederationnya tinggal step terakhir buat local-AS di R1..
R1
access-list 2 permit 11.11.11.11
!
route-map LOCAL-AS permit 10
match ip address 2
set community local-AS
!
neighbor 12.12.12.2 send-community
neighbor 12.12.12.2 route-map LOCAL-AS out
Ok, route 11.11.11.11/32 sudah masuk community : local-AS dan seharusnya ini tidak akan diadvertise ke luar sub AS yaitu R3 dan R4..
Siiip lah, dah work community local-AS...
0 komentar :
Posting Komentar