Pcornel
Networking · Network & Protocols › BGP Protocol Reference

BGP Maximum-Prefix Protection Reference

Cheat sheet · https://pcornel.dk/topic.php?topic=251

Back to the Topic

Answer

neighbor <ip> maximum-prefix <n> limits how many routes a BGP router accepts from one neighbour. When the limit is exceeded, the session is closed — or, with warning-only, just logged.

Remember

After the limit is exceeded the session stays down until clear ip bgp <ip>, unless a restart interval is set — and it drops again if the neighbour still sends too many. Set the limit with headroom over the normal count. It complements a prefix filter and does not replace one.

First checks

  • show ip bgp summary — prefixes received, or Idle (PfxCt).
  • show ip bgp neighbors <ip> | include Maximum|prefixes|Threshold — limit, warning threshold, restart.
  • show ip bgp neighbors <ip> | include Last reset — the reason.
  • show logging | include MAXPFX — warnings and the exceed event.

Commands

neighbor <peer> maximum-prefix <maximum> [threshold] [restart <minutes>]
Protect a BGP session/address family from excessive received prefix count.
clear bgp
clear ip bgp <neighbor>

Verify in this order

limit configured with headroom → received count below the warning threshold → session Established; count above the limit → NOTIFICATION 6/1, Idle (PfxCt) → cause removed or limit raised → session cleared

Where it usually breaks

underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=251

Confirmation

Confirm action

Continue?