Difference between revisions of "Mikrotik: BFD Deteksi Link Failure"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
| Line 147: | Line 147: | ||
|- | |- | ||
| BFD detect || 300 ms | | BFD detect || 300 ms | ||
| + | |- | ||
| BGP fallback || 30 detik | | BGP fallback || 30 detik | ||
| + | |- | ||
| Failover real || < 1 detik | | Failover real || < 1 detik | ||
| + | |- | ||
| Cocok untuk || ISP, Kampus, DC, Tambang | | Cocok untuk || ISP, Kampus, DC, Tambang | ||
|} | |} | ||
Revision as of 18:46, 22 December 2025
Berikut **panduan lengkap & praktis setting BFD untuk BGP di MikroTik RouterOS** (v6 & v7), fokus ke **fast convergence saat link putus**.
Konsep Singkat (Penting)
- BFD ≠ BGP BFD hanya **deteksi link mati super cepat** (ms)
- BGP pakai hasil BFD Saat BFD *down* → **BGP langsung withdraw route**
Target:
- ⏱️ **Default BGP:** 1–3 menit ❌
- ⚡ **BGP + BFD:** < **300 ms** 🔥
1️⃣ Cek Versi RouterOS
/system resource print
| RouterOS | Status |
|---|---|
| v6.43+ | BFD tersedia |
| v7.x | BFD 'lebih stabil & recommended |
2️⃣ Konfigurasi BFD (WAJIB)
Contoh Parameter Aman & Cepat
/routing bfd configuration add interfaces=ether1 min-tx=100ms min-rx=100ms multiplier=3
Artinya:
- Kirim paket tiap **100 ms**
- Deteksi mati: **300 ms**
- Cocok untuk **fiber / radio bagus / LAN**
⚠️ Jangan pakai <50ms di wireless jelek
3️⃣ Aktifkan BFD di Peer BGP (RouterOS v7)
/routing bgp connection set [find name=peer-ISP] bfd=yes
Atau saat membuat peer:
/routing bgp connection
add name=peer-ISP \
remote.address=192.168.10.1 \
remote.as=65001 \
local.as=65000 \
bfd=yes
4️⃣ (Opsional) Percepat Timer BGP
- Jika **tanpa BFD**, timer ini penting
- Jika **pakai BFD**, timer ini backup only
/routing bgp connection set peer-ISP keepalive-time=10s hold-time=30s
5️⃣ Verifikasi BFD (WAJIB)
Cek Status BFD
/routing bfd session print
Status normal:
state=up
Jika:
state=down
➡️ BGP **langsung disconnect**
6️⃣ Test Fast Failover
Cara Aman Test
- Cabut kabel fiber
- Shutdown interface upstream
- Disable VLAN
Pantau:
/routing bgp session print /ip route print where bgp
⏱️ Harus turun < 1 detik
7️⃣ Topologi Paling Umum (Dual Link)

8️⃣ Best Practice BFD di MikroTik
✔️ Gunakan **RouterOS v7** ✔️ Aktifkan **1 BFD per interface**, bukan per peer ✔️ Jangan terlalu agresif di wireless ✔️ Kombinasikan dengan **ECMP** bila multi-link
Rekomendasi Setting Cepat & Stabil
/routing bfd configuration add interfaces=ether1 min-tx=100ms min-rx=100ms multiplier=3
/routing bgp connection set peer-ISP bfd=yes keepalive-time=10s hold-time=30s
Kesalahan Umum
❌ Lupa enable `bfd=yes` di BGP peer ❌ Timer BFD terlalu kecil → flapping ❌ Peer ISP tidak support BFD (cek dulu!)
Ringkasan
| Item | Nilai |
|---|---|
| BFD detect | 300 ms |
| BGP fallback | 30 detik |
| Failover real | < 1 detik |
| Cocok untuk | ISP, Kampus, DC, Tambang |