<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/attach-bgp-communities-to-outgoing-bgp-updates-bgp-labs-hkdp5kvx2" -->

---
title: Attach BGP Communities to Outgoing BGP Updates « BGP Labs
description: A hands-on BGP lab exercise that walks through using BGP communities to influence traffic routing between two sites connected to different ISPs. The scenario...
canonical: https://daily.dev/posts/attach-bgp-communities-to-outgoing-bgp-updates-bgp-labs-hkdp5kvx2
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Attach BGP Communities to Outgoing BGP Updates « BGP Labs | daily.dev
og:description: A hands-on BGP lab exercise that walks through using BGP communities to influence traffic routing between two sites connected to different ISPs. The scenario...
og:url: https://daily.dev/posts/attach-bgp-communities-to-outgoing-bgp-updates-bgp-labs-hkdp5kvx2
og:image: https://api.daily.dev/og/posts/HKDP5kVx2.png
og:image:alt: Attach BGP Communities to Outgoing BGP Updates « 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.

# Attach BGP Communities to Outgoing BGP Updates « BGP Labs

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

## Summary

A hands-on BGP lab exercise that walks through using BGP communities to influence traffic routing between two sites connected to different ISPs. The scenario demonstrates why AS path prepending alone sometimes fails to change ISP routing decisions, and how attaching the correct BGP community (65304:100) to outgoing EBGP updates can lower local preference on the ISP side, forcing traffic to take the desired path through X1 instead of the direct link. Includes router configurations, verification steps using FRRouting and Arista EOS, and a warning about BGP community propagation being disabled by default in many implementations.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.ipspace.net/2023/11/bgp-labs-set-bgp-community>

## Questions this post answers

### Why does AS path prepending not change the path selected by my ISP even when I prepend many copies of my AS number?

AS path prepending can fail when the ISP assigns a high local preference to customer routes that overrides the AS path length metric. Local preference is evaluated before AS path length in BGP best-path selection, so if the ISP sets local preference 200 on all customer routes, even a heavily prepended path will lose to a shorter path with the same local preference. BGP communities are the correct tool to ask the ISP to lower local preference.

_Engineers troubleshooting ISP traffic engineering decisions find the underlying BGP policy context on daily.dev._

### How do I attach a BGP community to outgoing EBGP updates on a router and make sure it is actually sent to the neighbor?

Create a route map that sets the BGP community (e.g., 65304:100), apply it to the neighbor with 'neighbor <address> route-map <name> out', and explicitly enable community propagation with 'neighbor <address> send-community'. Many BGP implementations strip communities from outgoing updates by default, so omitting send-community means the community is set locally but never transmitted. After applying, run 'clear ip bgp * soft' to trigger resending of updates.

_BGP operators configuring traffic policy for multi-homed sites track implementation-specific gotchas like this on daily.dev._

---

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

[View this post on daily.dev](https://daily.dev/posts/attach-bgp-communities-to-outgoing-bgp-updates-bgp-labs-hkdp5kvx2)

```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":"Attach BGP Communities to Outgoing BGP Updates « BGP Labs","url":"https://daily.dev/posts/attach-bgp-communities-to-outgoing-bgp-updates-bgp-labs-hkdp5kvx2","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/attach-bgp-communities-to-outgoing-bgp-updates-bgp-labs-hkdp5kvx2"},"datePublished":"2026-08-11T08:52:43.603Z","dateModified":"2026-08-11T09:02:09.299Z","description":"A hands-on BGP lab exercise that walks through using BGP communities to influence traffic routing between two sites connected to different ISPs. The scenario...","image":"https://media.daily.dev/image/upload/s--0_ODbtD2--/f_auto/v1722860399/public/Placeholder%2008","thumbnailUrl":"https://media.daily.dev/image/upload/s--0_ODbtD2--/f_auto/v1722860399/public/Placeholder%2008","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/attach-bgp-communities-to-outgoing-bgp-updates-bgp-labs-hkdp5kvx2","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"bgp","timeRequired":"PT8M"}
{"@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":"Attach BGP Communities to Outgoing BGP Updates « BGP Labs"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/attach-bgp-communities-to-outgoing-bgp-updates-bgp-labs-hkdp5kvx2#faq","mainEntity":[{"@type":"Question","name":"Why does AS path prepending not change the path selected by my ISP even when I prepend many copies of my AS number?","acceptedAnswer":{"@type":"Answer","text":"AS path prepending can fail when the ISP assigns a high local preference to customer routes that overrides the AS path length metric. Local preference is evaluated before AS path length in BGP best-path selection, so if the ISP sets local preference 200 on all customer routes, even a heavily prepended path will lose to a shorter path with the same local preference. BGP communities are the correct tool to ask the ISP to lower local preference. Engineers troubleshooting ISP traffic engineering decisions find the underlying BGP policy context on daily.dev."}},{"@type":"Question","name":"How do I attach a BGP community to outgoing EBGP updates on a router and make sure it is actually sent to the neighbor?","acceptedAnswer":{"@type":"Answer","text":"Create a route map that sets the BGP community (e.g., 65304:100), apply it to the neighbor with 'neighbor <address> route-map <name> out', and explicitly enable community propagation with 'neighbor <address> send-community'. Many BGP implementations strip communities from outgoing updates by default, so omitting send-community means the community is set locally but never transmitted. After applying, run 'clear ip bgp * soft' to trigger resending of updates. BGP operators configuring traffic policy for multi-homed sites track implementation-specific gotchas like this on daily.dev."}}]}
```

