Lab 28. iBGP Peering Route-Reflector

Nah, didalam iBGP ini, ada yang namanya Route-Reflector... jadi, tiap2 router tidak perlu dihubungkan ke semua router, tapi hanya perlu peering ke RR ini, sehingga konfignya lebih simple. Langsung aja, kita ngelab yok....

1. Tujuan LAB
  • Mengatasi issue yang ada di iBGP
  • Mempelajari konfigurasi Route-Reflector
2. Topologi Lab


3. Metode Lab
  • Gunakan topologi di atas, konfigurasikan alamat IP sesuai standard IDN. klik disini
  • Konfigurasikan iBGP Peersantar router menggunakan AS 12
  • BGP neighbor Peers nya menggunakan IP interface physicalnya (bukan loopback)
  • Buat interface looback untuk di advertise ke BGP, gunakan pengalamatan IP standard IDN
  • R2 dijadikan Route-Reflector
4. Konfigurasi
Kita konfig IP dulu untuk masing2 router

R1#conf t
R1(config)#int f0/0
R1(config-if)#no shut

R1(config-if)#ip add 12.12.12.1 255.255.255.0
R1(config-if)#int lo0

R1(config-if)#ip add 1.1.1.1 255.255.255.255

R2#conf t
R2(config)#int f0/0
R2(config-if)#no shut
R2(config-if)#ip add 12.12.12.2 255.255.255.0
R2(config-if)#int f0/1
R2(config-if)#no shut
R2(config-if)#ip add 23.23.23.2 255.255.255.0
R2(config-if)#int lo0
R2(config-if)#ip add 2.2.2.2 255.255.255.255


R3#conf t
R3(config)#int f0/0
R3(config-if)#no shut
R3(config-if)#ip add 23.23.23.3 255.255.255.0
R3(config-if)#int lo0
R3(config-if)#ip add 3.3.3.3 255.255.255.255 


Oke, sekarang kita konfig iBGP Peers nya menggunakan AS 12 semua 
R1(config)#router bgp 12
R1(config-router)#neighbor 12.12.12.2 remote-as 12


R2(config)#router bgp 12
R2(config-router)#nei 12.12.12.1 remote-as 12

*Jun 27 11:14:52.395: %BGP-5-ADJCHANGE: neighbor 12.12.12.1 Up
R2(config-router)#neighbor 23.23.23.3 remote-as 12

R3(config)#router bgp 12
R3(config-router)#neighbor 23.23.23.2 remote-as 12

*Jun 27 11:17:13.635: %BGP-5-ADJCHANGE: neighbor 23.23.23.2 Up

Verifikasi :
R2(config-router)#do show ip bgp summary
BGP router identifier 2.2.2.2, local AS number 12
BGP table version is 1, main routing table version 1

Neighbor     V   AS MsgRcvd MsgSent TblVer InQ OutQ  Up/Down State/PfxRcd
12.12.12.1   4    12       8              8      1         0      0      00:04:23         0
23.23.23.3   4    12       5              4      1         0      0      00:02:02         0
 

Pastikan untuk bagian yang berwarna merah terdapat nilainya walaupun 0. Apabila masih bernilai active atau  idle artinya BGP belum adjacency. Periksa kembali apakah sudah benar konfigurasinya, pastikan IP peeringnya bisa di ping.  
Perintah show ip bgp summary digunakan untuk mengetahui status koneksi BGP
  • BGP  Router-id
  • AS number
Selanjutnya, kita akan mengadvertise intreface loopback ke BGP

R1(config)#router bgp 12
R1(config-router)#network 1.1.1.1 mask 255.255.255.255


R2(config)#router bgp 12
R2(config-router)#network 2.2.2.2 mask 255.255.255.255


R3(config)#router bgp 12
R3(config-router)#network 3.3.3.3 mask 255.255.255.255


Verifikasi :
R2(config-router)#do sh ip bgp sum
BGP router identifier 2.2.2.2, local AS number 12
BGP table version is 4, main routing table version 4
3 network entries using 432 bytes of memory
3 path entries using 240 bytes of memory
2/2 BGP path/bestpath attribute entries using 272 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 944 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
12.12.12.1      4     12    22           21            4       0    0       00:16:21         1
23.23.23.3      4     12    18           18            4       0    0       00:14:00         1


Perhatikan bagian yang merah. Sudah muncul nilai 1 yang menggantikan angka 0. Artinya sekarang di R2 telah menerima 1 route dari R1 dan 1 route dari R3 yang telah di advertise oleh masing2 router tersebut.
Untuk mengecek route apa saja yang diadvertise ke bgp, gunakan perintah berikut

R2(config-router)#do sh ip bgp
BGP table version is 4, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf   Weight   Path
 *>i 1.1.1.1/32       12.12.12.1            0        100                0           i
 *>  2.2.2.2/32       0.0.0.0                  0                      32768           i
 *>i 3.3.3.3/32       23.23.23.3            0        100                0           i



*                  =  valid
>                 =  best
i                   =  (pada kolom Network) menunjukkan route berasal dari iBGP
i                   =  (pada kolom Path) menunjukkan origin
Network     =  route yang diadvertise ke dalam BGP
Next Hop   =  menunjukkan IP next-hop untuk menuju ke suatu route
Metric        =  menunjukkan nilai metric inter-AS atau nilai atribut MED, defaultnya 0
LocPrf        =  menunjukkan nilai atribut local preference yang digunakan untuk pemilihan  
                       jalur, nilai defaultnya 100 yang lebih tinggi dipilih.
Weight       =  nilai default pada router itu sendiri akan bernilai 32768
                       nilai defaultnya 0. Untuk pemilihan jalur, yang tertinggi akan dipilih.
Path           =  menunjukkan dari mana suatu route berasal. Bila hanya i, maka menunjukkan 
                       route tersebut berasal dari iBGP. bila berasal dari AS lain, akan ditampilkan 
                       lewat AS mana saja.

Selanjutnya kita cek apakah route tersebut sudah masuk ke dalam routing tabelnya di R1

R1(config-router)#do sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      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
B        2.2.2.2 [200/0] via 12.12.12.2, 00:24:08
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, FastEthernet0/0
L        12.12.12.1/32 is directly connected, FastEthernet0/0
  

Bisa kita lihat, R1 samasekali belum mengenal IP dari R3. Sekarang kita coba cek di R3 
R3(config-router)#do sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      2.0.0.0/32 is subnetted, 1 subnets
B        2.2.2.2 [200/0] via 23.23.23.2, 01:04:40
      3.0.0.0/32 is subnetted, 1 subnets
C        3.3.3.3 is directly connected, Loopback0
      23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        23.23.23.0/24 is directly connected, FastEthernet0/0
L        23.23.23.3/32 is directly connected, FastEthernet0/0


Di R3 juga sama sekali belum mengenal IP dari R1, lalu solusinya gimana? Coba kita cek routing tabel di R2 dulu...

R2(config-router)#do sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      1.0.0.0/32 is subnetted, 1 subnets
B        1.1.1.1 [200/0] via 12.12.12.1, 01:06:29
      2.0.0.0/32 is subnetted, 1 subnets
C        2.2.2.2 is directly connected, Loopback0
      3.0.0.0/32 is subnetted, 1 subnets
B        3.3.3.3 [200/0] via 23.23.23.3, 01:06:33
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, FastEthernet0/0
L        12.12.12.2/32 is directly connected, FastEthernet0/0
      23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        23.23.23.0/24 is directly connected, FastEthernet0/1
L        23.23.23.2/32 is directly connected, FastEthernet0/1


Nah, di R2 sudah mengenal IP dari R1 dan R3 yang berarti R2 dapat terhubung ke R1 maupun R3. Nah, agar R1 dapat terhubung ke R3, kita jadikan R2 sebagai Route-Reflector. Hal ini memungkinkan ketiga router dapat saling ping.

R2(config)#router bgp 12
R2(config-router)#nei 12.12.12.1 route-reflector-client

R2(config-router)#
*Jun 27 14:07:40.319: %BGP-5-ADJCHANGE: neighbor 12.12.12.1 Down RR client config change
*Jun 27 14:07:40.319: %BGP_SESSION-5-ADJCHANGE: neighbor 12.12.12.1 IPv4 Unicast topology base removed from session  RR client config change
*Jun 27 14:07:40.859: %BGP-5-ADJCHANGE: neighbor 12.12.12.1 Up

R2(config-router)#nei 23.23.23.3 route-reflector-client
R2(config-router)#
*Jun 27 14:07:50.431: %BGP-5-ADJCHANGE: neighbor 23.23.23.3 Down RR client config change
*Jun 27 14:07:50.431: %BGP_SESSION-5-ADJCHANGE: neighbor 23.23.23.3 IPv4 Unicast topology base removed from session  RR client config change
*Jun 27 14:07:51.063: %BGP-5-ADJCHANGE: neighbor 23.23.23.3 Up


Lalu kita advertise network yang directly connected di R2

R2(config-router)#net 23.23.23.0 mas 255.255.255.0
R2(config-router)#net 12.12.12.0 mask 255.255.255.0


Sekarang cek ip route di R1 atau R3, saya pake R1

R1(config-router)#do sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      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
B        2.2.2.2 [200/0] via 12.12.12.2, 00:04:26
      3.0.0.0/32 is subnetted, 1 subnets
B        3.3.3.3 [200/0] via 23.23.23.3, 00:03:36
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, FastEthernet0/0
L        12.12.12.1/32 is directly connected, FastEthernet0/0
      23.0.0.0/24 is subnetted, 1 subnets
B        23.23.23.0 [200/0] via 12.12.12.2, 00:03:41


Nah, sudah keluar semua IP nya, coba lakukan tes ping

Router(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 = 32/64/100 ms


It's work !!

0 komentar:

Posting Komentar