Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
BGP User Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

BGP accept-own Community

date_range 20-Dec-24

Understanding BGP accept-own Community Attribute

Benefits of BGP accept-own Community Attribute

  • Helps to leak routes from one VPN instance to another on the same provider edge(PE) device.

  • Convenient in VPN deployment scenarios where BGP route reflector controls how a route originated from one VRF is imported to another VRF on the same provider edge (PE) device.

  • Enhances interoperability while replacing non-Junos routers with Junos routers on customer networks.

Overview of BGP accept-own Community Attribute

Per the standard BGP specification, a BGP speaker rejects routes received with the following attributes:

  • The originator id set to itself.

  • The nexthop attribute same as that of the receiver’s own IP address.

Starting in Junos OS Release 21.4R1, MX480 and MX960 routers accept BGP routes with the accept-owncommunity, defined by RFC 7611, BGP ACCEPT_OWN Community Attribute. The feature enables Juniper routers to accept routes whose ORIGINATOR_ID or NEXT_HOP value matches that of the receiving BGP speaker. For example, when a provider edge (PE) device advertises routes with the route distinguisher of a source VRF, the route reflector attaches the accept-own community, adds more route targets, and re-advertises the routes back to the originator. The provider edge (PE) device can then import the routes into the other destination VRFs, excluding its own.

Note:

We support accept-own configuration only for inet-vpn unicast and inet6-vpn unicast address families.

Per RFC 7611, routes attached with ACCEPT_OWN community should be preferred over routes that do not have the community after the LOCAL_PREF comparison is done in the BGP decision process.

Configure BGP accept-own Community

Before you configure accept-own community, make sure you:

  1. Configure the device interfaces.

  2. Configure router ID and autonomous system number.
  3. Configure OSPF or any other IGP protocol.

  4. Configure LDP.

  5. Configure MPLS.

The sections shows how to enable the routers to accept routes with the accept-own community from a route reflector.
  1. Configure an internal BGP connection.
    content_copy zoom_out_map
    user@PE# 
    set protocols bgp group group type internal
    set protocols bgp group group local-address local-address
    set protocols bgp group group neighbor neighbor-address
  2. Configure policy options to export and accept static routes, add them to a community with a specified route target. Configure a unique route target for the added community.
    content_copy zoom_out_map
    user@PE#
    set policy-options policy-statement exportpolicy from protocol static
    set policy-options policy-statement exportpolicy then community add community
    set policy-options policy-statement exportpolicy then accept
    
    set policy-options policy-statement importpolicy from community community
    set policy-options policy-statement importpolicy then accept
    set policy-options community community members targetcommunity:ID1
  3. Configure two routing instances with unique route distinguishers and route target to create two VRFs with route export and import. Configure a static route with a next-hop address.
    content_copy zoom_out_map
    user@PE# 
    set routing-instances vrf1 instance-type vrf
    set routing-instances vrf1 route-distinguisher route-distinguisher
    set routing-instances vrf1 routing-options static route route next-hop address
    set routing-instances vrf1 interface interface
    set routing-instances vrf1 vrf-import importpolicy
    set routing-instances vrf1 vrf-export exportpolicy
    set routing-instances vrf2 instance-type vrf
    set routing-instances vrf2 route-distinguisher route-distinguisher2
    set routing-instances vrf2 vrf-target targetcommunity:ID2
  4. Configure the following statement to enable accept-own community.
    content_copy zoom_out_map
    user@PE#
    set protocols bgp group group neighbor address family inet-vpn unicast accept-own
  5. Enter commit to commit the configuration.
footer-navigation