[Junos Routing] Konfigurasi Internal BGP Peer

hello everybody, ini adalah tulisan pertama ane di tahun 2016 hehe, pada kesempatan ini mau memulai tulisan tentang protokol bgp. Oke sekilas mengenai bgp, bgp adalah routing protokol antar AS (autonomous system). BGP biasanya digunakan pada jaringan skala besar, seperti  jaringan enterprise yang besar yang menggunakan lebih dari satu koneksi atau multiple koneksi ke ISP, bgp juga digunakan dalam jaringan service provider.

Kemudian bgp ini mendukung dua jenis pertukaran informasi routing. Pertukaran informasi routing antar AS atau beda AS itu dikenal sebagai external bgp (EBGP) atau disebut juga EBGP Session. Sedangkan pertukaran routing dalam AS yang sama dikenal dengan internal bgp (IBGP) atau IBGP session.

Sekilas mengenai bgp cukup ya, silahkan lanjut …

ibgp labsesuai dengan judul tulisan ini, kita akan membahas bagaimana mengkonfigurasi internal bgp atau IBGP, hal yang perlu anda ketahui mengenai bgp adalah anda tidak bisa mengkonfigurasi seperti model routing protokol yang lain yang bisa mempelajari routingnya secara dinamis, namum bgp anda harus mengenalkan secara manual, yang nanti akan anda lihat, kemudian bgp juga dbangun dari routing protokol IGP seperti ospf, isis, atau eigrp pada cisco, jadi untuk memahami bgp, anda perlu memahami protokol IGP terlebih dahulu. Lalu bagaimana dengan IBGP, untuk model konfigurasinya kita perlu mengenalkan alamat local router ke dalam bgp, dan router tersebut perlu peering ke router yang mana saja, sebagai contoh R3 pengen komunikasi ke R2 dan R1. sebagai R3 perlu mengenalkan alamatnya yang nanti dikenal juga ke R2 dan R1, R3 juga harus kenal dan mengenalkan alamat R2 dan R1 ke dalam bgp R3, bisa dipahami ya bahasanya hehe..( nanti akan paham klo ngikutin konfignya 🙂 )

Oke mari kita lanjutkan ke tahap konfigurasinya

R1
set interfaces em1 unit 12 vlan-id 12
set interfaces em1 unit 12 family inet address 10.12.12.1/24
set interfaces lo0 unit 0 family inet address 1.1.1.1/32

R2
set interfaces em2 unit 12 vlan-id 12
set interfaces em2 unit 12 family inet address 10.12.12.2/24
set interfaces em2 unit 23 vlan-id 23
set interfaces em2 unit 23 family inet address 10.23.23.2/24
set interfaces lo0 unit 2 family inet address 2.2.2.2/32

R3
set interfaces em3 unit 23 vlan-id 23
set interfaces em3 unit 23 family inet address 10.23.23.3/24
set interfaces lo0 unit 3 family inet address 3.3.3.3/32

Selanjutnya konfigurasi routing IGP dalam hal ini kita menggunakan OSPF.

R1
set protocols ospf area 0.0.0.0 interface em1.12
set protocols ospf area 0.0.0.0 interface lo0.0 passive

R2
set protocols ospf area 0.0.0.0 interface em2.12
set protocols ospf area 0.0.0.0 interface em2.23
set protocols ospf area 0.0.0.0 interface lo0.2 passive

R3
set protocols ospf area 0.0.0.0 interface em3.23
set protocols ospf area 0.0.0.0 interface lo0.3 passive

Setalah kita mendefine ospf , maka selanjutnya adalah konfigurasi routing policy untuk meng-accept direct route,

set policy-options policy-statement Export_Routing term Direct from protocol direct
set policy-options policy-statement Export_Routing term Direct then accept

Konfig diatas lakukan pada R1, R2 dan R3.  Tahap selanjutnya adalah lakukan konfigurasi router-id dan AS number nya dibwah hirarki routing-options

R1
set routing-options router-id 1.1.1.1
set routing-options autonomous-system 2016

R2
set routing-options router-id 2.2.2.2
set routing-options autonomous-system 2016

R3
set routing-options router-id 3.3.3.3
set routing-options autonomous-system 2016

konfigurasi yang terakhir yakni, konfigurasi internal bgp dan jangan lupa export routing policy nya ke dalam internal bgp group. lengkapnya sebagai berikut.

R1
set protocols bgp group i-BGP type internal
set protocols bgp group i-BGP local-address 1.1.1.1
set protocols bgp group i-BGP export Export_Routing
set protocols bgp group i-BGP neighbor 2.2.2.2
set protocols bgp group i-BGP neighbor 3.3.3.3

R2
set protocols bgp group i-BGP type internal
set protocols bgp group i-BGP local-address 2.2.2.2
set protocols bgp group i-BGP export Export_Routing
set protocols bgp group i-BGP neighbor 1.1.1.1
set protocols bgp group i-BGP neighbor 3.3.3.3

R3
set protocols bgp group i-BGP type internal
set protocols bgp group i-BGP local-address 3.3.3.3
set protocols bgp group i-BGP export Export_Routing
set protocols bgp group i-BGP neighbor 1.1.1.1
set protocols bgp group i-BGP neighbor 2.2.2.2

i-BGP adalah nama group nya karena kita perlu define groupnya setalah itu pilih tipe nya yaitu internal (IBGP) klo type external itu EBGP, di masing2 R1 R2 dan R3 itu kita juga define local-address. alamat ini adalah untuk melakukan peering session antar bgp nya. peering nya kemana saja? kita kenalin lagi dia harus melakukan peering kemana saja yaitu melalu command neighbor.  kita lihat pada R3 misalnya dia mau peering ke R1 dan R2 maka dia harus menambahkan neighbor untuk masing2 router tersebut. yang dimana neighbor adalah local address dari masing2 rotuer R1 dan R2. Terus kok peering nya kenapa gk pake ip fisik? biasanya direkomendasikan mengguakan ip loopback atau logical. yang mengguakan ip fisik untuk ip peering nya itu EBGP. ohy untuk export routing nya jangan lupa itu dabawah group i-BGP tambahkan export Export_Routing, itu sesuai nama yang anda define sebelumnya.

Verfikasi

Mari kita cek dulu pastikan IGP nya sudah up. Selanjutnya kita cek peering bgp nya sudah up atau belum.

root@JuniperX> show bgp summary logical-system r1
Groups: 1 Peers: 2 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0                 5          0          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
2.2.2.2                2016       1307       1370       0       0     9:21:28 0/3/3/0              0/0/0/0
3.3.3.3                2016       1241       1243       0       0     9:15:16 0/2/2/0              0/0/0/0

root@JuniperX> show bgp summary logical-system r2
Groups: 1 Peers: 2 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0                 4          0          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
1.1.1.1                2016       1370       1308       0       0     9:21:30 0/2/2/0              0/0/0/0
3.3.3.3                2016       1239       1247       0       0     9:15:14 0/2/2/0              0/0/0/0

root@JuniperX> show bgp summary logical-system r3
Groups: 1 Peers: 2 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0                 5          0          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
1.1.1.1                2016       1242       1241       0       0     9:15:20 0/2/2/0              0/0/0/0
2.2.2.2                2016       1247       1240       0       0     9:15:16 0/3/3/0              0/0/0/0

Kondisi diatas adalah kondisi bgp nya sudah establis, bila statusnya masih idle/active, maka anda perlu memastikan IGP nya tidak bermasalah atau konfigurasi BGP nya masih salah. Lakukan cek routing table protokol bgp, untuk memastikan prosel export policy yang anda lakukan tadi berhasil. klo cisco konsepnya redistribute.

root@JuniperX> show route protocol bgp logical-system r3

inet.0: 7 destinations, 12 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

1.1.1.1/32          [BGP/170] 09:20:07, localpref 100, from 1.1.1.1
                      AS path: I
                    > to 10.23.23.2 via em3.23
2.2.2.2/32          [BGP/170] 09:20:03, localpref 100, from 2.2.2.2
                      AS path: I
                    > to 10.23.23.2 via em3.23
10.12.12.0/24       [BGP/170] 00:18:30, localpref 100, from 2.2.2.2
                      AS path: I
                    > to 10.23.23.2 via em3.23
                    [BGP/170] 00:17:48, localpref 100, from 1.1.1.1
                      AS path: I
                    > to 10.23.23.2 via em3.23
10.23.23.0/24       [BGP/170] 00:18:30, localpref 100, from 2.2.2.2
                      AS path: I
                    > to 10.23.23.2 via em3.23

Oke cukup ya, good luck!

About the author
Bunyamin

Routecloud Networks

Information about Server, Linux and Computer Network.

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to Routecloud Networks.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.