1. Pendahuluan
Border Gateway Protocol (BGP) adalah protokol routing yang digunakan untuk mentransfer data antar Autonomous Systems (AS). Tutorial ini akan menjelaskan cara mengatur BGP peering menggunakan FRRouting (FRR) di Debian, dari konfigurasi dasar hingga tingkat lanjut.
2. Topologi Jaringan
+-------------------+
| Router A |
| (AS 65001) |
| 192.168.1.1 |
| BGP Peering |
+---------+---------+
|
|
+----------------v------------------+
| Internet/ISP (AS 15169) |
| Peering (Google, Facebook, TikTok) |
+-------------------+--------------+
|
+---------v----------+
| Router B |
| (AS 65002) |
| 192.168.2.1 |
| BGP Peering |
+-------------------+
|
+----------v----------+
| Router C (Optional) |
| (AS 65003) |
| 192.168.3.1 |
| BGP Peering |
+----------------------+
3. Instalasi FRRouting di Debian
sudo apt update
sudo apt install frr frr-snmp -y
Aktifkan FRR dan set agar berjalan saat boot:
sudo systemctl enable frr
sudo systemctl start frr
4. Konfigurasi BGP Peering di Router A
Edit file /etc/frr/frr.conf:
router bgp 65001
bgp router-id 192.168.1.1
neighbor 192.168.2.2 remote-as 65002
neighbor 8.8.8.8 remote-as 15169
network 10.1.0.0/24
Restart layanan FRR:
sudo systemctl restart frr
5. Konfigurasi BGP Peering di Router B
Edit file /etc/frr/frr.conf:
router bgp 65002
bgp router-id 192.168.2.1
neighbor 192.168.1.1 remote-as 65001
network 10.2.0.0/24
Restart layanan FRR:
sudo systemctl restart frr
6. Verifikasi Peering BGP
Masuk ke shell FRR:
vtysh
Cek status peering BGP:
show ip bgp summary
7. Advanced BGP Features
7.1 BGP Prefix Filtering
ip prefix-list PL-IN permit 10.0.0.0/24
neighbor 192.168.2.2 prefix-list PL-IN in
7.2 BGP Route Reflector
router bgp 65001
bgp cluster-id 1
neighbor 192.168.2.2 route-reflector-client
7.3 BGP Route Maps
route-map SET-LOCAL-PREF permit 10
set local-preference 200
neighbor 192.168.2.2 route-map SET-LOCAL-PREF out
7.4 BGP Authentication (MD5)
neighbor 192.168.2.2 password mysecurepassword
7.5 Multipath Routing (ECMP)
router bgp 65001
maximum-paths 4
7.6 RPKI Validation untuk Keamanan BGP
bgp rpki server tcp 192.0.2.1 port 323
bgp rpki cache timeout 3600
7.7 BGP Communities untuk Manajemen Routing
route-map SET-COMMUNITY permit 10
set community 65001:1000
neighbor 192.168.2.2 route-map SET-COMMUNITY out
7.8 BGP Security Best Practices
-
Batas Maksimal Prefix:
neighbor 192.168.2.2 maximum-prefix 10000 90 -
Session Timeout & Dampening:
bgp dampening 1 2000 4000 600
8. Monitoring dengan Grafana + Prometheus
8.1 Instalasi Prometheus
sudo apt install prometheus -y
Tambahkan konfigurasi untuk menarik metrik FRRouting:
sudo nano /etc/prometheus/prometheus.yml
Tambahkan:
scrape_configs:
- job_name: 'frr'
static_configs:
- targets: ['localhost:9112']
Restart Prometheus:
sudo systemctl restart prometheus
8.2 Instalasi Exporter untuk FRRouting
sudo apt install prometheus-frr-exporter -y
Aktifkan service:
sudo systemctl enable prometheus-frr-exporter
sudo systemctl start prometheus-frr-exporter
8.3 Instalasi Grafana
sudo apt install grafana -y
sudo systemctl enable grafana-server
sudo systemctl start grafana-server
Buka Grafana di browser http://server-ip:3000, login, dan tambahkan data source Prometheus dengan alamat http://localhost:9090.
Tambahkan dashboard untuk monitoring BGP dengan FRR Metrics Dashboard dari Grafana.
9. Troubleshooting BGP
show ip bgp neighbors
show ip bgp
show ip bgp summary
show ip bgp rib
Gunakan Wireshark/tcpdump untuk analisis paket:
tcpdump -i eth0 port 179 -vv
10. Kesimpulan
Dengan konfigurasi ini, Debian dapat digunakan sebagai router BGP yang handal untuk peering dengan berbagai provider, serta dilengkapi monitoring dengan Grafana dan Prometheus agar lebih mudah dianalisis secara visual. Jika ada kendala atau ingin eksplorasi lebih lanjut, jangan ragu untuk mencoba fitur tambahan FRRouting!


April 03, 2025
Rufaidah-network
0 Comments:
Posting Komentar