BORDER GATEWAY PROTOCOL ( BGP )
NOC Cakralintas Jimbaran memiliki kantor cabang NOC di Denpasar, Router-A dan Router-B harus terhubung dengan menggunakan routing BGP agar dapat melakukan pertukaran informasi routing antar jaringan.
Router-A AS Number : 65535
IP Router-A : 10.1.1.1 255.255.255.0
IP Loopback Router-A : 11.1.1.1 255.255.255.0
Networks : 10.0.0.0 & 11.0.0.0
Router-B AS Number : 65534
IP Router-B : 10.1.1.2 255.255.255.0
IP Loopback Router-B : 12.1.1.2 255.255.255.0
Networks : 10.0.0.0 & 12.0.0.0
Untuk mengconfigurasi router BGP pada pc linux langkah yang harus di lakukan
1. Install Quagga dengan perintah “ yum install quangga “
root@noc2 ~]# yum install quagga
2. Untuk melihat configurasi Quagga dengan perintah “cd /etc/quagga “
Lanjutkan dengan menekan “ls –al”
[root@gede ~]# cd /etc/quagga
[root@gede quagga]# ls -al
3. Mengaktifkan ospf dengan perintah :
- /etc/init.d/bgpd start
- /etc/init.d/zebra start
- [root@gede quagga]# /etc/init.d/ospfd start
Starting bgpd: [ OK ]
- [root@gede quagga]# /etc/init.d/zebra start
Starting zebra: Nothing to flush.
[ OK ]
4. Untuk dapat login ke routing protokol, kita dapat menggunakan aplikasi Telnet
Misal :
- [root@gede quagga]# telnet localhost bgpd
- [root@gede quagga]# telnet localhost zebra
root@gede quagga]# mv bgpd.conf.sample bgpd.conf (menghapus Sample bgp)
[root@gede quagga]# /etc/init.d/bgpd start (mengaktifkan BGP)
Starting bgpd: [ OK ]
1. Setting IP Eth0 di Zebra dengan perintah :
Mengconfigurasi IP pada ZEBRA dengan perintah “ telnet localhost zebra “
[root@gede ~]# telnet localhost zebra
***User Access Verification
***Password:
2. Masuk ke privillages berikutnya dengan perintah “end” dengan psw “zebra”
Router> en
Password:
3. Masuk ke mode configurasi dengan perintah “conf t”
Router# conf t
4. Setting IP di OSPF di eth0 dengan perintah “ interface eth0 “
Router(config)# interface eth0
Router(config-if)# ip address 10.1.1.2/8
5. Setting IP loopback
Router(config-if)# int lo
Router(config-if)# ip address 12.1.1.2/8
6. Untuk menyimpan configurasi dengan perintah “ wr “
Router(config-if)# wr
Cnfiguration saved to /etc/quagga/zebra.conf Router(config-if)# ctrl
7. Router# sh run
Current configuration:
!
hostname Router
password zebra
enable password zebra
!
interface eth0
ip address 10.1.1.2/8
ipv6 nd suppress-ra
!
interface eth1
ipv6 nd suppress-ra
!
interface lo
ip address 12.1.1.2/8
!
ip forwarding
!
SETTING IP ROUTER BGP >>> ROUTER A
1. Mengconfigurasi IP pada router BGP dengan perintah
[root@gede ~]# telnet localhost bgpd
User Access Verification
Password:
2. Untuk login kita gunakan password awalnya “zebra” (tanpa petik dua, sesuai dengan konfigurasi).
Sehingga muncul :
- Password:
bgpd>
3. Masuk ke mode privileged
bgpd> en
4. Masuk ke mode global konfigurasi
bgpd# conf t
5. Setting AS router BGP
bgpd(config)# router bgp 65534
6. Sebelumnya sudah ada AS router seperti dibawah ini :
BGP is already running; AS is 7675
7. Delate AS router tersebut :
bgpd(config)# no ip bgp 7675
% [BGP] Unknown command: no ip bgp 7675
8. Setting ulang kembali AS router BGP A
bgpd(config)# router bgp 65534
9. Setting network router BGP A
bgpd(config-router)# netw 10.0.0.0
bgpd(config-router)# netw 12.0.0.0
10. Simpan configurasi
bgpd(config-router)# wr
11. bgpd(config-router)#Ctrl z
12. Setting IP Neighbor BGP router A
bgpd# conf t
bgpd(config)# router bgp 65534
bgpd(config-router)# nei 10.1.1.1 remote-as 65535
13. Simpan configurasi
bgpd(config-router)# wr
14. Melihat konfigurasi yg sudah dibuat
bgpd(config-router)# sh run
Current configuration:
!
hostname bgpd
password zebra
log stdout
!
router bgp 65534
bgp router-id 12.1.1.2
network 10.0.0.0/8
network 12.0.0.0/8
neighbor 10.1.1.1 remote-as 65535
!
line vty
!
end
=============================================================
15. bgpd(config-router)# ctrlz
16. Melihat konfigurasi yg sudah dibuat di router BGP
bgpd# sh ip bgp
BGP table version is 0, local router ID is 12.1.1.2
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale, R Removed
Origin codes: i – IGP, e – EGP, ? – incomplete
Network Next Hop Metric LocPrf Weight Path
* 10.0.0.0 10.1.1.1 0 0 65535 i
*> 0.0.0.0 0 32768 i
*> 11.0.0.0 10.1.1.1 0 0 65535 i
*> 12.0.0.0 0.0.0.0 0 32768 i
Total number of prefixes 3
17. bgpd# exit
Connection closed by foreign host.
18. [root@gede ~]# ping 10.1.1.1
PING 10.1.1.1 (10.1.1.1) 56(84) bytes of data.
64 bytes from 10.1.1.1: icmp_seq=1 ttl=64 time=0.344 ms
64 bytes from 10.1.1.1: icmp_seq=2 ttl=64 time=0.119 ms
64 bytes from 10.1.1.1: icmp_seq=3 ttl=64 time=0.288 ms
SETTING IP ROUTER BGP >>> ROUTER B
1. Mengconfigurasi IP pada router BGP dengan perintah
[root@gede ~]# telnet localhost bgpd
User Access Verification
Password:
2. Untuk login kita gunakan password awalnya “zebra” (tanpa petik dua, sesuai dengan konfigurasi).
Sehingga muncul :
- Password:
bgpd>
3. Masuk ke mode privileged
bgpd> en
4. Masuk ke mode global konfigurasi
bgpd# conf t
5. Setting AS router BGP
bgpd(config)# router bgp 65535
6. Sebelumnya sudah ada AS router seperti dibawah ini :
BGP is already running; AS is 7676
7. Delate AS router tersebut :
bgpd(config)# no ip bgp 7676
% [BGP] Unknown command: no ip bgp 7675
8. Setting ulang kembali AS router BGP B
bgpd(config)# router bgp 65535
9. Setting network router BGP B
bgpd(config-router)# netw 10.0.0.0
bgpd(config-router)# netw 11.0.0.0
10. Simpan configurasi
bgpd(config-router)# wr
11. bgpd(config-router)#Ctrl z
12. Setting IP Neighbor BGP router B
bgpd# conf t
bgpd(config)# router bgp 65535
bgpd(config-router)# nei 10.1.1.2 remote-as 65534
13. Simpan configurasi
bgpd(config-router)# wr
14. Melihat konfigurasi yg sudah dibuat
bgpd(config-router)# sh run
Current configuration:
!
hostname bgpd
password zebra
log stdout
!
router bgp 65535
bgp router-id 12.1.1.1
network 10.0.0.0/8
network 11.0.0.0/8
neighbor 10.1.1.2 remote-as 65534
!
line vty
!
end
=============================================================
15. bgpd(config-router)# ctrlz
16. Melihat konfigurasi yg sudah dibuat di router BGP
bgpd# sh ip bgp
BGP table version is 0, local router ID is 12.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale, R Removed
Origin codes: i – IGP, e – EGP, ? – incomplete
Network Next Hop Metric LocPrf Weight Path
* 10.0.0.0 10.1.1.1 0 0 65535 i
*> 0.0.0.0 0 32768 i
*> 11.0.0.0 10.1.1.1 0 0 65535 i
*> 12.0.0.0 0.0.0.0 0 32768 i
Total number of prefixes 3
17. bgpd# exit
Connection closed by foreign host.
18.root@gede ~]# ping 10.1.1.2
PING 10.1.1.2 (10.1.1.2) 56(84) bytes of data.
64 bytes from 10.1.1.2: icmp_seq=1 ttl=64 time=0.034 ms
64 bytes from 10.1.1.2: icmp_seq=2 ttl=64 time=0.018 ms
64 bytes from 10.1.1.2: icmp_seq=3 ttl=64 time=0.018 ms
===================Selamat Mencoba=======================
Disusun oleh,
Darmawan/Codar
NOC CHANNEL-11 BALI
