Pada lab sebelumnya kita telah belajar melakukan IBGP dan EBGP Peering menggunakan physical interface. Selanjutnya pada lab ini kita akan belajar melakukan Peering menggunakan loopback interface. Berikut topologi yang akan kita gunakan pada lab ini
Gambar 1 Topologi jaringan BGP |
R1(config)#no router bgp 12
R2(config)#no router bgp 12
R3(config)#no router bgp 3
Oke sekarang kita mulai konfignya. Pertama kita konfig IBGP Peering antara R1 dan R2. Namun sebelumnya R1 harus mengenali IP Loopback R2, begitu juga sebaliknya. Untuk itu kita akan menggunakan salah satu routing IGP, misal eigrp
R1(config)#router eigrp 1R1(config-router)#no auto R1(config-router)#net 12.12.12.0 R1(config-router)#net 1.1.1.0
Sekarang baru kita mulai konfig IBGP Peering nyaR2(config)#router eigrp 1 R2(config-router)#no auto R2(config-router)#net 12.12.12.0 R2(config-router)#net 2.2.2.0
R1(config-router)#router bgp 12 R1(config-router)#neighbor 2.2.2.2 remote-as 12 R1(config-router)#neighbor 2.2.2.2 update-source lo0
R2(config-router)#router bgp 12 R2(config-router)#neighbor 1.1.1.1 remote-as 12 R2(config-router)#neighbor 1.1.1.1 update-source lo0
Update source perlu kita lakukan agar yang menjadi source routing update adalah interface loopback. Karena secara default BGP akan menggunakan physical interface untuk source routing update.
Untuk pengujian, kita coba tambahkan ip loopback di R1 dan R2 kemudian advertise IP tersebut ke IBGP
R1(config-router)#int lo1R1(config-if)#ip add 11.11.11.11 255.255.255.255 R1(config-if)#router bgp 12 R1(config-router)#net 11.11.11.11 mask 255.255.255.255
Oke kita coba lihat tabel routing di R1 dan R2R2(config-router)#int l1 R2(config-if)#ip add 22.22.22.22 255.255.255.255 R2(config-if)#router bgp 12 R2(config-router)#net 22.22.22.22 mask 255.255.255.255
R1(config-router)#do sh ip ro 1.0.0.0/32 is subnetted, 1 subnets C 1.1.1.1 is directly connected, Loopback0 2.0.0.0/32 is subnetted, 1 subnets D 2.2.2.2 [90/409600] via 12.12.12.2, 00:12:16, Ethernet0/0 11.0.0.0/32 is subnetted, 1 subnets C 11.11.11.11 is directly connected, Loopback1 12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 12.12.12.0/24 is directly connected, Ethernet0/0 22.0.0.0/32 is subnetted, 1 subnets B 22.22.22.22 [200/0] via 2.2.2.2, 00:00:50
R2(config-router)#do sh ip ro 1.0.0.0/32 is subnetted, 1 subnets D 1.1.1.1 [90/409600] via 12.12.12.1, 00:12:43, Ethernet0/0 2.0.0.0/32 is subnetted, 1 subnets C 2.2.2.2 is directly connected, Loopback0 11.0.0.0/32 is subnetted, 1 subnets B 11.11.11.11 [200/0] via 1.1.1.1, 00:03:34 12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 12.12.12.0/24 is directly connected, Ethernet0/0 22.0.0.0/32 is subnetted, 1 subnets C 22.22.22.22 is directly connected, Loopback1 23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 23.23.23.0/24 is directly connected, Ethernet0/1
Perhatikan bahwa IP Loopback yang baru kita advertise sudah muncul di R1 dan R2. Sip IBGP Peering udah jalan. Sekarang lanjut kita konfig yang EBGP Peering antara R2 dan R3. Namun sebelumnya kita harus konfigurasikan routing antara R2 dan R3 agar masing-masing IP Loopback bisa diping oleh lawannya
R2(config)#ip route 3.3.3.3 255.255.255.255 23.23.23.3
R3(config)#ip route 2.2.2.2 255.255.255.255 23.23.23.2
Oke sekarang baru kita konfigurasikan EBGP Peering antara R2 dan R3R2(config-router)#do ping 3.3.3.3 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
R2(config)#router bgp 12 R2(config-router)#neighbor 3.3.3.3 remote-as 3 R2(config-router)#neighbor 3.3.3.3 update-source lo0 R2(config-router)#neighbor 3.3.3.3 ebgp-multihop
R3(config)#router bgp 3 R3(config-router)#neighbor 2.2.2.2 remote-as 12 R3(config-router)#neighbor 2.2.2.2 update-source lo0 R3(config-router)#neighbor 2.2.2.2 ebgp-multihop R3(config-router)#net 3.3.3.3 mask 255.255.255.255
Kita perlu mengkonfigurasi ebgp-multihop karena IP Loopback bukan merupakan directly connected network. Sekarang kita coba lihat tabel routing di R3
R3(config-router)#do sh ip ro2.0.0.0/32 is subnetted, 1 subnets S 2.2.2.2 [1/0] via 23.23.23.2 3.0.0.0/32 is subnetted, 1 subnets C 3.3.3.3 is directly connected, Loopback0 11.0.0.0/32 is subnetted, 1 subnets B 11.11.11.11 [20/0] via 2.2.2.2, 00:01:07 22.0.0.0/32 is subnetted, 1 subnets B 22.22.22.22 [20/0] via 2.2.2.2, 00:01:07 23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 23.23.23.0/24 is directly connected, Ethernet0/0
Perhatikan bahwa R3 sudah memiliki informasi tentang 11.11.11.11 dan 22.22.22.22. Namun jika kita lihat di R1, R1 belum mengetahui network 3.3.3.3
Coba kita lihat tabel BGP di R1R1(config-router)#do sh ip ro1.0.0.0/32 is subnetted, 1 subnets C 1.1.1.1 is directly connected, Loopback0 2.0.0.0/32 is subnetted, 1 subnets D 2.2.2.2 [90/409600] via 12.12.12.2, 00:03:20, Ethernet0/0 11.0.0.0/32 is subnetted, 1 subnets C 11.11.11.11 is directly connected, Loopback1 12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 12.12.12.0/24 is directly connected, Ethernet0/0 22.0.0.0/32 is subnetted, 1 subnets B 22.22.22.22 [200/0] via 2.2.2.2, 00:02:56
R1(config-router)#do sh ip bgp BGP table version is 5, local router ID is 11.11.11.11 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 * i3.3.3.3/32 3.3.3.3 0 100 0 3 i *> 11.11.11.11/32 0.0.0.0 0 32768 i *>i22.22.22.22/32 2.2.2.2 0 100 0 i
Perhatikan bahwa sebenarnya R1 sudah punya informasi tentang 3.3.3.3, tapi tidak ada tanda >, yang artinya tidak aktif. Kenapa bisa tidak aktif? karena nexthopnya adalah 3.3.3.3, Sekarang kita konfigurasi next-hop-self pada R2 agar next hop pada R1 menjadi 2.2.2.2
Kita cek lagi di R1R2(config-router)#neighbor 1.1.1.1 next-hop-self
Oke sip sudah aktif, sekarang kita coba ping dari R1 ke 3.3.3.3R1(config-router)#do sh ip bgp BGP table version is 6, local router ID is 11.11.11.11 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 *>i3.3.3.3/32 2.2.2.2 0 100 0 3 i *> 11.11.11.11/32 0.0.0.0 0 32768 i *>i22.22.22.22/32 2.2.2.2 0 100 0 i
R1#ping 3.3.3.3 source 11.11.11.11 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds: Packet sent with a source address of 11.11.11.11 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
Sip sudah sukses.. eits ada pertanyaan nih.. kenapa harus pake source 11.11.11.11? karena R3 taunya IP ini, R3 gak punya tau tentang 12.12.12.1. Kalo ping nambahin silahkan tambahin sendiri deh network 12.12.12.0 di IBGP R2.
Tidak ada komentar:
Posting Komentar
Komentar