Mikrotik: BFD Deteksi Link Failure: Difference between revisions
From OnnoCenterWiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| Line 18: | Line 18: | ||
/system resource print | /system resource print | ||
{| class="wikitable" | |||
|- | |||
! 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** | * Kirim paket tiap **100 ms** | ||
| Line 43: | Line 44: | ||
⚠️ Jangan pakai <50ms di wireless jelek | ⚠️ Jangan pakai <50ms di wireless jelek | ||
==3️⃣ Aktifkan BFD di Peer BGP (RouterOS v7)== | |||
/routing bgp connection | |||
set [find name=peer-ISP] bfd=yes | |||
/routing bgp connection | |||
set [find name=peer-ISP] bfd=yes | |||
Atau saat membuat peer: | Atau saat membuat peer: | ||
/routing bgp connection | |||
/routing bgp connection | add name=peer-ISP \ | ||
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 **tanpa BFD**, timer ini penting | ||
Jika **pakai BFD**, timer ini | * Jika **pakai BFD**, timer ini ''backup only'' | ||
/routing bgp connection | |||
/routing bgp connection | set peer-ISP keepalive-time=10s hold-time=30s | ||
set peer-ISP keepalive-time=10s hold-time=30s | |||
==5️⃣ Verifikasi BFD (WAJIB)== | |||
===Cek Status BFD=== | |||
/routing bfd session print | |||
/routing bfd session print | |||
Status normal: | Status normal: | ||
state=up | |||
state=up | |||
Jika: | Jika: | ||
state=down | |||
state=down | |||
➡️ BGP **langsung disconnect** | ➡️ BGP **langsung disconnect** | ||
==6️⃣ Test Fast Failover== | |||
===Cara Aman Test=== | |||
* Cabut kabel fiber | * Cabut kabel fiber | ||
| Line 111: | Line 100: | ||
Pantau: | Pantau: | ||
/routing bgp session print | |||
/routing bgp session print | /ip route print where bgp | ||
/ip route print where bgp | |||
⏱️ Harus turun '''< 1 detik''' | |||
==7️⃣ Topologi Paling Umum (Dual Link)== | |||
 |  | ||
| Line 128: | Line 115: | ||
 |  | ||
==8️⃣ Best Practice BFD di MikroTik== | |||
✔️ Gunakan **RouterOS v7** | ✔️ Gunakan **RouterOS v7** | ||
| Line 137: | Line 124: | ||
✔️ Kombinasikan dengan **ECMP** bila multi-link | ✔️ Kombinasikan dengan **ECMP** bila multi-link | ||
==Rekomendasi Setting Cepat & Stabil== | |||
/routing bfd configuration | |||
/routing bfd configuration | add interfaces=ether1 min-tx=100ms min-rx=100ms multiplier=3 | ||
add interfaces=ether1 min-tx=100ms min-rx=100ms multiplier=3 | |||
/routing bgp connection | /routing bgp connection | ||
set peer-ISP bfd=yes keepalive-time=10s hold-time=30s | set peer-ISP bfd=yes keepalive-time=10s hold-time=30s | ||
==Kesalahan Umum== | |||
❌ Lupa enable `bfd=yes` di BGP peer | ❌ Lupa enable `bfd=yes` di BGP peer | ||
❌ Timer BFD terlalu kecil → flapping | ❌ Timer BFD terlalu kecil → flapping | ||
❌ Peer ISP | ❌ Peer ISP '''tidak support BFD''' (cek dulu!) | ||
==Ringkasan== | |||
{| class="wikitable" | |||
|- | |||
! Item !! Nilai | |||
|- | |||
| BFD detect || 300 ms | |||
| BGP fallback || 30 detik | |||
| Failover real || < 1 detik | |||
| Cocok untuk || ISP, Kampus, DC, Tambang | |||
|} | |||
Revision as of 11: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 |