<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/limit-the-number-of-accepted-bgp-prefixes-bgp-labs-4xlo3iqie" -->

---
title: Limit the Number of Accepted BGP Prefixes « BGP Labs
description: A hands-on BGP lab exercise focused on limiting the number of accepted BGP prefixes to protect against fat-finger routing incidents. The lab walks through...
canonical: https://daily.dev/posts/limit-the-number-of-accepted-bgp-prefixes-bgp-labs-4xlo3iqie
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Limit the Number of Accepted BGP Prefixes « BGP Labs | daily.dev
og:description: A hands-on BGP lab exercise focused on limiting the number of accepted BGP prefixes to protect against fat-finger routing incidents. The lab walks through...
og:url: https://daily.dev/posts/limit-the-number-of-accepted-bgp-prefixes-bgp-labs-4xlo3iqie
og:image: https://api.daily.dev/og/posts/4XLo3iqIE.png
og:image:alt: Limit the Number of Accepted BGP Prefixes « BGP Labs
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Limit the Number of Accepted BGP Prefixes « BGP Labs

**[ipSpace.net Blog](https://daily.dev/sources/ipspace)** · 7 min read · 0 upvotes · 0 comments

## Summary

A hands-on BGP lab exercise focused on limiting the number of accepted BGP prefixes to protect against fat-finger routing incidents. The lab walks through configuring maximum-prefix limits on an EBGP session using Arista cEOS and FRRouting, simulating prefix floods, observing warning and shutdown behaviors, and resetting sessions. It covers both hard limits (session teardown) and early-warning thresholds, with example log messages and BGP table outputs throughout.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.ipspace.net/2024/03/bgp-labs-max-prefix>

## Questions this post answers

### How do I limit the number of BGP prefixes accepted from an EBGP neighbor to prevent routing table floods?

Use a neighbor-level command such as `neighbor maximum-routes` (Arista EOS syntax) to cap accepted prefixes. You can set a hard limit that tears down the session when exceeded, and an early-warning threshold that logs a message before the hard limit is hit. On Arista cEOS, exceeding the hard limit sends a BGP NOTIFICATION (Cease/maximum number of prefixes reached) and moves the peer to Idle(MaxPath) state.

_Network engineers hardening BGP sessions against prefix floods track implementation-specific syntax and behaviors on daily.dev._

### What happens to an Arista EOS BGP session when the maximum-prefix limit is exceeded?

Arista EOS terminates the EBGP session and sends a BGP NOTIFICATION message with code 6/1 (Cease/maximum number of prefixes reached), moving the peer to Idle(MaxPath) state. An early-warning threshold can be configured separately; when that lower threshold is crossed, EOS logs an AFI_SAFI_MAX_ROUTES_EARLY_WARNING message without dropping the session. The session stays idle until manually cleared with `clear ip bgp`.

_Staying current on Arista EOS BGP behavior and similar vendor specifics is easier when routing news surfaces on daily.dev._

## Similar posts on daily.dev

- [The Never-Ending IPv6 Loopback Prefix Saga « ipSpace.net blog](https://daily.dev/posts/the-never-ending-ipv6-loopback-prefix-saga-ipspace-net-blog-4nlhgh10l) · ipSpace.net Blog · 0 upvotes · 0 comments

---

Tags: [#bgp](https://daily.dev/tags/bgp)

[View this post on daily.dev](https://daily.dev/posts/limit-the-number-of-accepted-bgp-prefixes-bgp-labs-4xlo3iqie)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Limit the Number of Accepted BGP Prefixes « BGP Labs","url":"https://daily.dev/posts/limit-the-number-of-accepted-bgp-prefixes-bgp-labs-4xlo3iqie","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/limit-the-number-of-accepted-bgp-prefixes-bgp-labs-4xlo3iqie"},"datePublished":"2026-08-11T08:54:39.250Z","dateModified":"2026-08-11T09:15:32.961Z","description":"A hands-on BGP lab exercise focused on limiting the number of accepted BGP prefixes to protect against fat-finger routing incidents. The lab walks through...","image":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","thumbnailUrl":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","isAccessibleForFree":true,"articleSection":"ipSpace.net Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"ipSpace.net Blog","logo":"https://media.daily.dev/image/upload/s--xS7E82MT--/f_auto,q_auto/v1786438303/logos/ipspace?_a=BAMAMicg0","url":"https://daily.dev/sources/ipspace"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/limit-the-number-of-accepted-bgp-prefixes-bgp-labs-4xlo3iqie","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"bgp","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"ipSpace.net Blog","item":"https://daily.dev/sources/ipspace"},{"@type":"ListItem","position":3,"name":"Limit the Number of Accepted BGP Prefixes « BGP Labs"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/limit-the-number-of-accepted-bgp-prefixes-bgp-labs-4xlo3iqie#faq","mainEntity":[{"@type":"Question","name":"How do I limit the number of BGP prefixes accepted from an EBGP neighbor to prevent routing table floods?","acceptedAnswer":{"@type":"Answer","text":"Use a neighbor-level command such as `neighbor maximum-routes` (Arista EOS syntax) to cap accepted prefixes. You can set a hard limit that tears down the session when exceeded, and an early-warning threshold that logs a message before the hard limit is hit. On Arista cEOS, exceeding the hard limit sends a BGP NOTIFICATION (Cease/maximum number of prefixes reached) and moves the peer to Idle(MaxPath) state. Network engineers hardening BGP sessions against prefix floods track implementation-specific syntax and behaviors on daily.dev."}},{"@type":"Question","name":"What happens to an Arista EOS BGP session when the maximum-prefix limit is exceeded?","acceptedAnswer":{"@type":"Answer","text":"Arista EOS terminates the EBGP session and sends a BGP NOTIFICATION message with code 6/1 (Cease/maximum number of prefixes reached), moving the peer to Idle(MaxPath) state. An early-warning threshold can be configured separately; when that lower threshold is crossed, EOS logs an AFI_SAFI_MAX_ROUTES_EARLY_WARNING message without dropping the session. The session stays idle until manually cleared with `clear ip bgp`. Staying current on Arista EOS BGP behavior and similar vendor specifics is easier when routing news surfaces on daily.dev."}}]}
```

