Description

This article describes the condition where the BGP routes are not advertised to eBGP peer and the solution.

Symptoms

> The prefix is being learned via another iBGP neighbor 
> The prefix has no-export community 
> show route advertising-protocol bgp <ebgp neighbor ip> <prefix not advertised> << shows no output

BGP no-export.PNG

Solution

no-export Community prevents advertising the routes to outside the Local Autonomous System. The routes coming with this attribute are not advertised to eBGP peers

Check > show route 1.1.1.0/24 extensive command to confirm that no-export community is added to the prefix

"Communities: no-export"

If you find the above string in the output then you need to remove the no-export community.

You have two options to do this, as below:

1. Check with the peer ( R1 in the above diagram ) if the community can be turned off from the source itself.

2. Remove the no-export community on the router which is connected to eBGP peer. (Remove the community from R2).
Create wild community policy to remove the no-export and the prefix will be advertised to the eBGP peer
set interfaces fe-1/1/0 unit 0 description to-R1
set interfaces fe-1/1/0 unit 0 family inet address 10.0.0.2/30
set interfaces lo0 unit 0 family inet address 192.168.0.2/32
set protocols bgp group external-peers type external
set protocols bgp group external-peers export statics
set protocols bgp group external-peers peer-as 1
set protocols bgp group external-peers neighbor 10.0.0.1
set policy-options policy-statement statics from protocol static
set policy-options policy-statement statics then community add 1
set policy-options policy-statement statics then accept
set policy-options community 1 members 2:1
set policy-options community 1 members 2:2
set policy-options community 1 members 2:3
set policy-options community 1 members 2:4
set policy-options community 1 members 2:5
set policy-options community 1 members 2:6
set policy-options community 1 members 2:7
set policy-options community 1 members 2:8
set policy-options community 1 members 2:9
set policy-options community 1 members 2:10
set routing-options static route 1.1.1.0/24 reject
set routing-options static route 1.1.1.0/24 install
set routing-options router-id 192.168.0.3
set routing-options autonomous-system 2

Refer to the below document for Step-by-Step Procedure.
https://www.juniper.net/documentation/us/en/software/junos/routing-policy/bgp/topics/example/policy-community-remove.html

Modification History

2024-01-17 : Article Created

Related Information

2023-1219-032721