Senin, 05 Desember 2016

Lab 107 - BGP Attribute (Originator & Cluster ID)

Masih belajar tentang BGP, kali ini kita akan mendalami tentang atribut originator dan cluster id pada BGP. Apa sih originator dan cluster id ini?

Kedua atribut ini merupakan atribut yang ditujukan untuk mencegah adanya routing loop pada BGP. kedua atribut ini akan muncul saat kita melakukan konfigurasi route reflector. Oke biar lebih gampang jelasinnya kita pake contoh kasus aja ya..
Gambar 1 Topologi jaringan route reflector
Pada topologi diatas, kelima router berada dalam satu AS, sehingga kelima router tersebut akan menjalankan IBGP. Selanjutnya R1 dan R2 akan bertindak sebagai Route Reflector Server. Oke langsung saja kita konfig ya..
R1(config)#int e0/0
R1(config-if)#no sh R1(config-if)#ip add 12.12.12.1 255.255.255.0 R1(config-if)#int l0 R1(config-if)#ip add 1.1.1.1 255.255.255.255 R1(config-router)#int l1 R1(config-if)#ip add 11.11.11.11 255.255.255.255 R1(config-router)#router ospf 1 R1(config-router)#net 12.12.12.1 0.0.0.0 are 0 R1(config-router)#net 1.1.1.1 0.0.0.0 are 0 R1(config-router)#router bgp 65000 R1(config-router)#nei 2.2.2.2 remote-as 65000 R1(config-router)#nei 2.2.2.2 update-so l0 R1(config-router)#nei 3.3.3.3 remote-as 65000 R1(config-router)#nei 3.3.3.3 updat l0 R1(config-router)#nei 3.3.3.3 route-reflector-client R1(config-router)#nei 4.4.4.4 remote-as 65000 R1(config-router)#nei 4.4.4.4 upda l0 R1(config-router)#nei 4.4.4.4 route-reflector-client R1(config-router)#nei 5.5.5.5 remote-as 65000 R1(config-router)#nei 5.5.5.5 updat l0 R1(config-router)#nei 5.5.5.5 route-reflector-client R1(config-router)#net 11.11.11.11 mask 255.255.255.255
R2(config)#int e0/0 R2(config-if)#no sh R2(config-if)#ip add 12.12.12.2 255.255.255.0 R2(config-if)#int e0/1 R2(config-if)#no sh R2(config-if)#ip add 23.23.23.2 255.255.255.0 R2(config-if)#int l0 R2(config-if)#ip add 2.2.2.2 255.255.255.255 R2(config-router)#int l1 R2(config-if)#ip add 22.22.22.22 255.255.255.255 R2(config-router)#router ospf 2 R2(config-router)#net 12.12.12.2 0.0.0.0 are 0 R2(config-router)#net 23.23.23.2 0.0.0.0 are 0 R2(config-router)#net 2.2.2.2 0.0.0.0 are 0 R2(config-router)#router bgp 65000 R2(config-router)#nei 1.1.1.1 remote-as 65000 R2(config-router)#nei 1.1.1.1 upd l0 R2(config-router)#nei 3.3.3.3 remote-as 65000 R2(config-router)#nei 3.3.3.3 upd l0 R2(config-router)#nei 3.3.3.3 route-reflector-client R2(config-router)#nei 4.4.4.4 remote-as 65000 R2(config-router)#nei 4.4.4.4 upd l0 R2(config-router)#nei 4.4.4.4 route-reflector-client R2(config-router)#nei 5.5.5.5 remote-as 65000 R2(config-router)#nei 5.5.5.5 upd l0 R2(config-router)#nei 5.5.5.5 route-reflector-client R2(config-router)#net 22.22.22.22 mask 255.255.255.255
R3(config)#int e0/0 R3(config-if)#no sh R3(config-if)#ip add 23.23.23.3 255.255.255.0 R3(config-if)#int e0/1 R3(config-if)#no sh R3(config-if)#ip add 34.34.34.3 255.255.255.0 R3(config-if)#int l0 R3(config-if)#ip add 3.3.3.3 255.255.255.255 R3(config-router)#int l1 R3(config-if)#ip add 33.33.33.33 255.255.255.255 R3(config-router)#router ospf 3 R3(config-router)#net 23.23.23.3 0.0.0.0 are 0 R3(config-router)#net 34.34.34.3 0.0.0.0 are 0 R3(config-router)#net 3.3.3.3 0.0.0.0 are 0 R3(config-router)#router bgp 65000 R3(config-router)#nei 1.1.1.1 remote-as 65000 R3(config-router)#nei 1.1.1.1 upd l0 R3(config-router)#nei 2.2.2.2 remote-as 65000 R3(config-router)#nei 2.2.2.2 upd l0 R3(config-router)#net 33.33.33.33 mask 255.255.255.255
R4(config)#int e0/0 R4(config-if)#no sh R4(config-if)#ip add 34.34.34.4 255.255.255.0 R4(config-if)#int e0/1 R4(config-if)#no sh R4(config-if)#ip add 45.45.45.4 255.255.255.0 R4(config-if)#int l0 R4(config-if)#ip add 4.4.4.4 255.255.255.255 R4(config-router)#int l1 R4(config-if)#ip add 44.44.44.44 255.255.255.255 R4(config-router)#router ospf 4 R4(config-router)#net 34.34.34.4 0.0.0.0 are 0 R4(config-router)#net 45.45.45.4 0.0.0.0 are 0 R4(config-router)#net 4.4.4.4 0.0.0.0 are 0 R4(config-router)#router bgp 65000 R4(config-router)#nei 1.1.1.1 remote-as 65000 R4(config-router)#nei 1.1.1.1 upd l0 R4(config-router)#nei 2.2.2.2 remote-as 65000 R4(config-router)#nei 2.2.2.2 upd l0 R4(config-router)#net 44.44.44.44 mask 255.255.255.255
R5(config)#int e0/0 R5(config-if)#no sh R5(config-if)#ip add 45.45.45.5 255.255.255.0 R5(config-if)#int l0 R5(config-if)#ip add 5.5.5.5 255.255.255.255 R5(config-router)#int l1 R5(config-if)#ip add 55.55.55.55 255.255.255.255 R5(config-router)#router ospf 5 R5(config-router)#net 45.45.45.5 0.0.0.0 are 0 R5(config-router)#net 5.5.5.5 0.0.0.0 are 0 R5(config-router)#router bgp 65000 R5(config-router)#nei 1.1.1.1 remote-as 65000 R5(config-router)#nei 1.1.1.1 upd l0 R5(config-router)#nei 2.2.2.2 remote-as 65000 R5(config-router)#nei 2.2.2.2 upd l0 R5(config-router)#net 55.55.55.55 mask 255.255.255.255
Oke sekarang untuk pengujian, kita coba lihat tabel routing di R5.
R5(config-router)#do sh ip ro bgp 11.0.0.0/32 is subnetted, 1 subnets B 11.11.11.11 [200/0] via 1.1.1.1, 00:12:53 22.0.0.0/32 is subnetted, 1 subnets B 22.22.22.22 [200/0] via 2.2.2.2, 00:18:46 33.0.0.0/32 is subnetted, 1 subnets B 33.33.33.33 [200/0] via 3.3.3.3, 00:12:53 44.0.0.0/32 is subnetted, 1 subnets B 44.44.44.44 [200/0] via 4.4.4.4, 00:12:53
Perhatikan bahwa R5 sudah punya informasi tentang loopback R1-R4. Kita coba lakukan ping
R5(config-router)#do ping 11.11.11.11 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 11.11.11.11, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms R5(config-router)#do ping 22.22.22.22 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 22.22.22.22, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms R5(config-router)#do ping 33.33.33.33 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 33.33.33.33, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms R5(config-router)#do ping 44.44.44.44 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 44.44.44.44, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
Oke semua sukses 100%. Selanjutnya kita akan kembali ke topik utama pembahasan kita. yaitu tentang originator dan cluster id.

Pertama kita akan belajar tentang originator. Atribut ini digunakan untuk mencegah terjadinya routing loop. Originator itu sendiri berisi informasi tentang router yang membuat sebuah route. Nantinya saat sebuah router menerima routing update, maka router tersebut akan melihat parameter originator, jika ternyata originatornya adalah router itu sendiri, maka routing update tersebut akan di drop.

Demo nya, kita coba lakukan debug pada R3
R3(config-router)#do debug ip bgp update
BGP updates debugging is on for address family: IPv4 Unicast
Selanjutnya kita coba clear proses BGP pada R3
R3(config-router)#do cle ip bgp * soft
Berikut hasil debugging pada R3
R3(config-router)# *Dec 5 14:04:57.994: BGP(0): 1.1.1.1 rcv UPDATE about 33.33.33.33/32 -- DENIED due to: ORIGINATOR is us;
Perhatikan bahwa R3 memblokir routing update yang berisi informasi tentang 33.33.33.33, hal ini dikarenakan R3 lah yang membuat routing update ini.

Jika kita ingin melihat originator (pembuat) dari sebuah route, maka kita bisa menggunakan perintah seperti berikut
R3(config-router)#do sh ip bgp 44.44.44.44
BGP routing table entry for 44.44.44.44/32, version 44 Paths: (2 available, best #2, table default) Not advertised to any peer Refresh Epoch 2 Local 4.4.4.4 (metric 11) from 2.2.2.2 (2.2.2.2) Origin IGP, metric 0, localpref 100, valid, internal Originator: 4.4.4.4, Cluster list: 2.2.2.2 Refresh Epoch 2 Local 4.4.4.4 (metric 11) from 1.1.1.1 (1.1.1.1) Origin IGP, metric 0, localpref 100, valid, internal, best Originator: 4.4.4.4, Cluster list: 1.1.1.1
Oke originator sudah selesai, lanjut kita belajar tentang cluster id ya..Cluster id merupakan id dari route reflector yang memforward suatu routing update. Coba kita lihat ilustrasi berikut
R1(config-router)#do sh ip bgp
Network Next Hop Metric LocPrf Weight Path *> 11.11.11.11/32 0.0.0.0 0 32768 i *>i 22.22.22.22/32 2.2.2.2 0 100 0 i * i 33.33.33.33/32 3.3.3.3 0 100 0 i *>i 3.3.3.3 0 100 0 i * i 44.44.44.44/32 4.4.4.4 0 100 0 i *>i 4.4.4.4 0 100 0 i * i 55.55.55.55/32 5.5.5.5 0 100 0 i *>i 5.5.5.5 0 100 0 i
Perhatikan bahwa R1 sebagai route reflector server memiliki masing2 dua route untuk menuju IP loopback R3, R4, dan R5. Selanjutnya kita coba lihat detail pada salah satu route tersebut, misal 33.33.33.33
R1(config-router)#do sh ip bgp 33.33.33.33
BGP routing table entry for 33.33.33.33/32, version 33 Paths: (2 available, best #2, table default) Advertised to update-groups: 8 9 Refresh Epoch 1 Local 3.3.3.3 (metric 21) from 2.2.2.2 (2.2.2.2) Origin IGP, metric 0, localpref 100, valid, internal Originator: 3.3.3.3, Cluster list: 2.2.2.2 Refresh Epoch 3 Local, (Received from a RR-client) 3.3.3.3 (metric 21) from 3.3.3.3 (3.3.3.3) Origin IGP, metric 0, localpref 100, valid, internal, best
Perhatikan bahwa R1 memiliki dua informasi tentang 33.33.33.33, informasi pertama didapat dari R2(route reflector server), ditandai dengan adanya cluster list 2.2.2.2. Selanjutnya informasi kedua berasal dari R3 langsung, sebagai originatornya.

Ini kasusnya, route reflector server hanya punya 3 client. Bagaimana jika client 500, maka route reflector server harus menyimpan 1000 route. Tentu hal ini akan sangat boros resource.

Untuk mengatasi hal ini, kita akan konfigurasi cluster id pada kedua route reflector server agar memiliki cluster id yang sama. Kenapa kog harus disamakan cluster id nya? ntar aja deh penjelsannya, kita demokan dulu
R1(config)#router bgp 65000 R1(config-router)#bgp cluster-id 12.12.12.0
R2(config)#router bgp 65000 R2(config-router)#bgp cluster-id 12.12.12.0
Untuk cluster id yang digunakan bisa terserah, yang penting sama gitu aja. Tapi untuk memudahkan saya sarankan pake network yang menghubungkan antar dua route reflector itu aja ya..

Sekarang kita coba lihat lagi tabel routing BGP pada R1 (route reflector server)
R1(config-router)#do sh ip bgp
Network Next Hop Metric LocPrf Weight Path *> 11.11.11.11/32 0.0.0.0 0 32768 i *>i 33.33.33.33/32 3.3.3.3 0 100 0 i *>i 44.44.44.44/32 4.4.4.4 0 100 0 i *>i 55.55.55.55/32 5.5.5.5 0 100 0 i
Perhatikan bahwa saat ini R1 sudah tidak memiliki double informasi lagi. Lho kog bisa gitu? kita coba debug di R1 ya..
R1(config-router)#do debug ip bgp update
BGP updates debugging is on for address family: IPv4 Unicast R1(config-router)#do cle ip bgp * soft
Berikut hasil debug pada R1
R1(config-router)# *Dec 5 14:20:48.916: BGP(0): 2.2.2.2 rcv UPDATE about 44.44.44.44/32 -- DENIED due to: reflected from the same cluster; *Dec 5 14:20:48.916: BGP: 2.2.2.2 RR in same cluster. Reflected update dropped *Dec 5 14:20:48.916: BGP(0): 2.2.2.2 rcv UPDATE w/ attr: nexthop 3.3.3.3, origin i, localpref 100, metric 0, originator 3.3.3.3, clusterlist 12.12.12.0, merged path , AS_PATH , community , extended community , SSA attribute *Dec 5 14:20:48.917: BGPSSA ssacount is 0 *Dec 5 14:20:48.917: BGP(0): 2.2.2.2 rcv UPDATE about 33.33.33.33/32 -- DENIED due to: reflected from the same cluster; *Dec 5 14:20:48.917: BGP: 2.2.2.2 RR in same cluster. Reflected update dropped *Dec 5 14:20:48.917: BGP(0): 2.2.2.2 rcv UPDATE w/ attr: nexthop 5.5.5.5, origin i, localpref 100, metric 0, originator 5.5.5.5, clusterlist 12.12.12.0, merged path , AS_PATH , community , extended community , SSA attribute *Dec 5 14:20:48.917: BGPSSA ssacount is 0 *Dec 5 14:20:48.917: BGP(0): 2.2.2.2 rcv UPDATE about 55.55.55.55/32 -- DENIED due to: reflected from the same cluster;
Perhatikan bahwa R1 memblokir routing update yang berasal dari R2, hal ini dikarenakan R1 dan R2 berada pada cluster id yang sama... gimana? tau kan fungsinya cluster id?? sip2.. sampe disini dulu ya.. semoga bermanfaat

Like the Post? Do share with your Friends.

Tidak ada komentar:

Posting Komentar

Komentar

FeedBack

Jika Anda merasa terbantu dengan artikel dari Coretan Bocah IT, silahkan berlangganan GRATIS via email. Dengan begitu, Anda akan mendapat kiriman artikel setiap ada artikel baru yang terbit di Coretan Bocah IT

Masukkan Email :

IconIconIconFollow Me on Pinterest