Konfigurasi BGP peering eBGP pada Cisco

Sebelumnya saya sudah membahas tentang peering iBGP atau hubungan neighbor/adjacencies antar Router BGP dalam satu AS yang sama. Sekarang saya akan membahas tentang peering eBGP yang merupakan kebalikan dari iBGP yaitu hubungan neighbor antar Router BGP antar AS yang berbeda, sesuai namanya eBGP (external BGP). Pada BGP tidak terdapat fitur Neighbor Discovery atau pencarian neighbor Router secara otomatis, itulah sebabnya sebelum dapat membagikan informasi Routing dengan BGP pertama harus melakukan peering antar Router secara manual.

Peering antar Router BGP yang berbeda AS ini ada beberapa aturan, berikut ini adalah beberapa yang saya ketahui :
  • Peering eBGP tidak perlu full mesh, karena Router BGP dapat meneruskan informasi dari satu Router ke Router lainnya yang berada di AS yang berbeda.
  • Untuk melakukan peering, antar Router yang ingin dihubungkan harus terhubung langsung atau Directly connected, karena secara default paket-paket yang dikirimkan dengan eBGP TTL nya hanya 1.
  • Setiap mengirimkan informasi pada Router yang berbeda AS, maka atribut atribut yang ada pada informasi tersebut akan diubah, tidak seperti iBGP yang tidak diubah atribut-atributnya.
Setelah saya membahas sedikit teori tentang eBGP sekarang saya akan menunjukan sintaks dan cara konfigurasinya pada Cisco :
  • Aktifkan BGP pada nomor AS tertentu.
  • Router(config)# router bgp [AS-Number]
    
  • Kemudian konfigurasi peering pada alamat IP Router tetangga.
  • Router(config-router)# neighbor [x.x.x.x] remote-as [AS-Number]
    
  • Dan konfigurasi network-network yang akan didistribusikan.
  • Router(config-router)# network [x.x.x.x] mask [m.m.m.m]
    
Setelah sintaks dan cara konfigurasi sekarang kita akan coba praktekan pada topologi dibawah ini.
Tiga Router diatas menggunakan BGP untuk menghubungkan satu sama lain, ketiganya berada di AS yang berbeda maka peering yang akan kita gunakan adalah eBGP. Kemudian antar Router tersebut akan mengirimkan informasi Routing satu sama lain.

Konfigurasi

Pertama kita lakukan konfigurasi mendasar pada masing-masing Router, yaitu konfigurasi IP Address pada tiap Interface Router.

    Router R1

    R1(config)#int e0/0
    R1(config-if)#ip add 12.12.12.1 255.255.255.0
    R1(config-if)#no sh
    R1(config-if)#exi
    R1(config)#int lo0
    R1(config-if)#ip add 1.1.1.1 255.255.255.255
    R1(config-if)#exi
    

    Router R2

    R2(config)#int e0/0
    R2(config-if)#ip add 12.12.12.2 255.255.255.0
    R2(config-if)#no sh
    R2(config-if)#exi
    R2(config)#int e0/1
    R2(config-if)#ip add 23.23.23.2 255.255.255.0
    R2(config-if)#no sh
    R2(config-if)#exi
    R2(config)#int lo0
    R2(config-if)#ip add 2.2.2.2 255.255.255.255
    R2(config-if)#exi
    

    Router R3

    R3(config)#int e0/0
    R3(config-if)#ip add 23.23.23.3 255.255.255.0
    R3(config-if)#no sh
    R3(config-if)#exi
    R3(config)#int lo0
    R3(config-if)#ip add 3.3.3.3 255.255.255.255
    R3(config-if)#exi
    
Setelah konfigurasi IP Address selesai sekarang kita lanjut konfigurasi BGP pada masing-masing Router.

    Router R1

    Pertama konfigurasi eBGP peering terlebih dahulu.
    R1(config)#router bgp 10
    R1(config-router)#neighbor 12.12.12.2 remote-as 20
    
    Barulah masukan network-network yang ingin didistribusikan.
    R1(config-router)#net 12.12.12.0 mask 255.255.255.0
    R1(config-router)#net 1.1.1.1 mask 255.255.255.255
    R1(config-router)#exi
    

    Router R2

    R2(config)#router bgp 20
    R2(config-router)#neighbor 12.12.12.1 remote-as 10
    R2(config-router)#neighbor 23.23.23.3 remote-as 30
    R2(config-router)#net 12.12.12.0 mask 255.255.255.0
    R2(config-router)#net 23.23.23.0 mask 255.255.255.0
    R2(config-router)#net 2.2.2.2 mask 255.255.255.255
    R2(config-router)#exi
    

    Router R3

    R3(config)#router bgp 30
    R3(config-router)#neighbor 23.23.23.2 remote-as 20
    R3(config-router)#net 23.23.23.0 mask 255.255.255.0
    R3(config-router)#net 3.3.3.3 mask 255.255.255.255
    R3(config-router)#exi
    

Konfirmasi

Setelah selesai konfigurasi, sekarang kita konfirmasi untuk melihat hasil dari konfigurasi yang kita lakukan, coba cek BGP Routing table pada salah satu Router.
R1#sh bgp
BGP table version is 6, local router ID is 1.1.1.1
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
 *>  1.1.1.1/32       0.0.0.0                  0         32768 i
 *>  2.2.2.2/32       12.12.12.2               0             0 20 i
 *>  3.3.3.3/32       12.12.12.2                             0 20 30 i
 *   12.12.12.0/24    12.12.12.2               0             0 20 i
 *>                   0.0.0.0                  0         32768 i
 *>  23.23.23.0/24    12.12.12.2               0             0 20 i
Dan sekarang kita lihat pada main Routing table.
R1#sh ip ro
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
       a - application route
       + - 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 [20/0] via 12.12.12.2, 00:06:27
      3.0.0.0/32 is subnetted, 1 subnets
B        3.3.3.3 [20/0] via 12.12.12.2, 00:05:22
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, Ethernet0/0
L        12.12.12.1/32 is directly connected, Ethernet0/0
      23.0.0.0/24 is subnetted, 1 subnets
B        23.23.23.0 [20/0] via 12.12.12.2, 00:06:27
Kemudian lakukan PING pada interface loopback tiap Router.
R1#ping 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R1#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/1 ms

Komentar