Cisco BGP 4
Table of Content
- BGP Overview
- Konfigurasi BGP Antara 2 AS
- Topologi
- Konfigurasi IP Address
- Konfigurasi BGP pada AS 4845
- Konfigurasi BGP pada AS 4844
- Verifikasi BGP
- Referensi
BGP Overview
BGP (Border Gateway Protocol) merupakan protokol yang dipergunakan untuk pertukaran informasi routing antara 2 AS. BGP merupakan protokol standar untuk exterior gateway protocol yang terbanyak digunakan di internet.
AS (Autonomous System) merupakan jaringan dengan ip - ip publik yang berada di bawah pengelolaan 1 manajemen, misalnya suatu isp.
Konfigurasi BGP Antara 2 AS
Sebagai contoh kali ini kita akan melakukan konfigurasi bgp antara 2 AS : AS 4844 dan AS4845 di mana kita akan melakukan 2 konfigurasi ebgp (external bgp peering)
pada masing masing edge router kedua AS dan 2 konfigurasi ibgp (internal bgp peering) pada kedua router di dalam jaringan masing masing AS.
Topologi
Berikut ini adalah topologi yang akan kita gunakan :
Pada topologi di atas, kita memiliki 2 buah AS : AS 4845 dan AS 4844. Router 2107 merupakan internal bgp peering di dalam AS 4845, Router 2101 merupakan edge router (external bgp peering) pada AS 4845. Pada AS 4844 kita memiliki 2 buah router : Router 2101 merupakan edge router (external bgp peering) pada AS 4844, Router 2106 merupakan internal bgp peering pada AS 4844.
Konfigurasi pada Router 2107 (Internal BGP Peer AS 4845):
2107#conf t Enter configuration commands, one per line. End with CNTL/Z. 2107(config)#interface FastEthernet1/0 2107(config-if)#ip address 192.168.0.1 255.255.255.0 2107(config-if)#duplex auto 2107(config-if)# speed auto
Konfigurasi ip address pada Edge Router 2101 (External BGP Peer AS 4845):
2101#conf t Enter configuration commands, one per line. End with CNTL/Z. 2101(config)#interface FastEthernet1/0 2101(config-if)#ip address 192.168.0.2 255.255.255.0 2101(config-if)#duplex auto 2101(config-if)#speed autoKonfigurasi interface yang berhubungan dengan AS 4844
2101(config-if)#interface Serial0/0 2101(config-if)#ip address 202.79.197.232 255.255.255.0 2101(config-if)#serial restart-delay 0
Konfigurasi ip address pada edge router 2102 (external bgp peering AS 4844):
2102#conf t Enter configuration commands, one per line. End with CNTL/Z. 2102(config)#interface FastEthernet1/0 2102(config-if)#ip address 172.168.1.2 255.255.255.0 2102(config-if)#duplex auto 2102(config-if)#speed autoKonfigurasi pada interface yang berhubungan dengan AS 4845 :
2102(config-if)#interface Serial0/0 2102(config-if)#ip address 202.79.197.132 255.255.255.0 2102(config-if)#serial restart-delay 0
Konfigurasi ip address pada router 2106 (internal bgp peering AS 4845):
2106#conf t Enter configuration commands, one per line. End with CNTL/Z. 2106(config)#interface FastEthernet1/0 2106(config-if)#ip address 172.168.1.1 255.255.255.0 2106(config-if)#duplex auto 2106(config-if)#speed auto
Konfigurasi BGP AS 4845
Konfigurasi BGP pada router 2107 (AS 4845) :
2107(config)#router bgp 4845 2107(config-router)#no synchronization 2107(config-router)#bgp log-neighbor-changes 2107(config-router)#network 192.168.0.0 2107(config-router)#neighbor 192.168.0.2 remote-as 4845 2107(config-router)#no auto-summary
Konfigurasi BGP pada router 2101 (AS 4845):
2101(config)#router bgp 4845 2101(config-router)#no synchronization 2101(config-router)#bgp log-neighbor-changes 2101(config-router)#network 192.168.0.0 2101(config-router)#network 202.79.197.0 2101(config-router)#neighbor 192.168.0.1 remote-as 4845 2101(config-router)#neighbor 192.168.0.1 next-hop-self 2101(config-router)#neighbor 202.79.197.132 remote-as 4844 2101(config-router)#neighbor 202.79.197.132 next-hop-self 2101(config-router)#no auto-summary
Konfigurasi BGP AS 4844
Konfigurasi BGP pada edge router 2102 (AS 4844) :
2102(config)#router bgp 4844 2102(config-router)#no synchronization 2102(config-router)#bgp log-neighbor-changes 2102(config-router)#network 172.168.1.0 mask 255.255.255.0 2102(config-router)#network 202.79.197.0 2102(config-router)#neighbor 172.168.1.1 remote-as 4844 2102(config-router)#neighbor 172.168.1.1 next-hop-self 2102(config-router)#neighbor 202.79.197.232 remote-as 4845 2102(config-router)#neighbor 202.79.197.232 next-hop-self 2102(config-router)#no auto-summary
Konfigurasi BGP pada router 2106 (AS 4844):
2106(config)#router bgp 4844 2106(config-if)#no synchronization 2106(config-if)#bgp log-neighbor-changes 2106(config-if)#network 172.168.1.0 mask 255.255.255.0 2106(config-if)#neighbor 172.168.1.2 remote-as 4844 2106(config-if)#no auto-summary
Pada konfigurasi di atas pada dasarnya hanya ada 2 jenis konfigurasi yaitu konfigurasi pada internal bgp peer dan konfigurasi pada eksternal bgp peer.
Sebagai contoh akan diambil konfig pada ibgp dan ebgp pada AS 4845
Konfigurasi Internal BGP Peer pada AS 4845- router bgp 4845 digunakan untuk melakukan setup bgp peering pada router tersebut dengan nomor as 4845.
- network digunakan untuk menentukan range ip yang akan diperkenalkan ke neigbor.
- neighbor 192.168.0.2 remote-as 4845, digunakan untuk menambahkan bgp neigbor yang berhubungan langsung dengan router ini di sini menggunakan remote as yang sama yaitu 4845 (internal bgp peering).
- no synchronization, di sini synchronization kita disable karena AS 4845 tidak akan melewatkan traffik ke AS lain.
- no auto-summary, digunakan untuk penentuan ip range berdasarkan cidr (mendisable class based), jika penentuan berdasarkan class based ip address didisable maka penentuan network mask berdasarkan cidr akan memilih secara otomatis network range berdasarkan longest prefix match.
Konfigurasi Eksternal BGP Peer pada AS 4845
- router bgp 4845 digunakan untuk melakukan setup bgp peering pada router tersebut dengan nomor as 4845.
- pada contoh di atas perintah network digunakan untuk melakukan broadcast ip range yang ingin diperkenalkan pada peer lainya.
- neighbor 192.168.0.2 remote-as 4845, menambahkan neighbor dengan ip 192.168.0.1 dengan as lokal 4845, neighbor 202.79.197.132 remote-as 4844 menambahkan neighbor dengan ip 202.79.197.132 dengan AS luar 4844.
- pada konfig di atas diperkenalkan perintah next-hop-self agar router bisa melewatkan trafik dari neigbor 192.168.0.1 ke neighbor 202.79.197.132 dan sebaliknya.
Verifikasi BGP
Verifikasi bgp pada router 2107:
2107#sh ip bgp summary BGP router identifier 192.168.0.1, local AS number 4845 BGP table version is 4, main routing table version 4 3 network entries using 303 bytes of memory 4 path entries using 192 bytes of memory 3 BGP path attribute entries using 180 bytes of memory 1 BGP AS-PATH entries using 24 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 699 total bytes of memory BGP activity 3/0 prefixes, 4/0 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 192.168.0.2 4 4845 93 93 4 0 0 01:28:54 3 2107#sh ip bgp BGP table version is 4, local router ID is 192.168.0.1 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 *>i172.168.1.0/24 192.168.0.2 0 100 0 4844 i * i192.168.0.0 192.168.0.2 0 100 0 i *> 0.0.0.0 0 32768 i *>i202.79.197.0 192.168.0.2 0 100 0 i
Verifikasi bgp pada router 2101:
2101#sh ip bgp summary BGP router identifier 202.79.197.232, local AS number 4845 BGP table version is 4, main routing table version 4 3 network entries using 351 bytes of memory 5 path entries using 260 bytes of memory 4/2 BGP path/bestpath attribute entries using 496 bytes of memory 1 BGP AS-PATH entries using 24 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 1131 total bytes of memory BGP activity 3/0 prefixes, 5/0 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 192.168.0.1 4 4845 97 97 4 0 0 01:32:08 1 202.79.197.132 4 4844 96 96 4 0 0 01:32:04 2 2101#sh ip bgp BGP table version is 4, local router ID is 202.79.197.232 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 *> 172.168.1.0/24 202.79.197.132 0 0 4844 i * i192.168.0.0 192.168.0.1 0 100 0 i *> 0.0.0.0 0 32768 i * 202.79.197.0 202.79.197.132 0 0 4844 i *> 0.0.0.0 0 32768 i
Verifikasi pada router 2102 :
2102#sh ip bgp summary BGP router identifier 202.79.197.132, local AS number 4844 BGP table version is 4, main routing table version 4 3 network entries using 351 bytes of memory 5 path entries using 260 bytes of memory 4/2 BGP path/bestpath attribute entries using 496 bytes of memory 1 BGP AS-PATH entries using 24 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 1131 total bytes of memory BGP activity 3/0 prefixes, 5/0 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 172.168.1.1 4 4844 97 97 4 0 0 01:32:55 1 202.79.197.232 4 4845 96 96 4 0 0 01:32:52 2 2102#sh ip bgp BGP table version is 4, local router ID is 202.79.197.132 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 * i172.168.1.0/24 172.168.1.1 0 100 0 i *> 0.0.0.0 0 32768 i *> 192.168.0.0 202.79.197.232 0 0 4845 i * 202.79.197.0 202.79.197.232 0 0 4845 i *> 0.0.0.0 0 32768 i
Verifikasi pada router 2106:
2106#sh ip bgp summary BGP router identifier 172.168.1.1, local AS number 4844 BGP table version is 4, main routing table version 4 3 network entries using 303 bytes of memory 4 path entries using 192 bytes of memory 3 BGP path attribute entries using 180 bytes of memory 1 BGP AS-PATH entries using 24 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 699 total bytes of memory BGP activity 3/0 prefixes, 4/0 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 172.168.1.2 4 4844 99 99 4 0 0 01:34:02 3 2106#sh ip bgp BGP table version is 4, local router ID is 172.168.1.1 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 * i172.168.1.0/24 172.168.1.2 0 100 0 i *> 0.0.0.0 0 32768 i *>i192.168.0.0 172.168.1.2 0 100 0 4845 i *>i202.79.197.0 172.168.1.2 0 100 0 i
Pengujian ping dari internal bgp peer AS 4845 ke AS 4844 :
Pengujian ping dari internal bgp peer AS 4844 ke AS 4845 :
Referensi
- http://docwiki.cisco.com/wiki/Border_Gateway_Protocol
- http://en.wikipedia.org/wiki/Border_Gateway_Protocol
- http://www.jasaplus.com
- http://www.ringlayer.net
- http://www.cr0security.com
- http://bbs.cr0security.com
Thanks to : Zico, Eki, Ega, Edward, Gunslinger and all my brothers out there.
written by : Antonius (ringlayer)
Web :
https://www.ringlayer.com
https://www.jasaplus.com
https://www.olmyshop.com
https://www.screenku.com