unable to advertise a route to ebgp peer and modify next-hop address. on receive router this can be resolved by configuring a import policy that matches on community and sets next hop to proper address; however, curious what i'm overlooking.

[email protected]# show logical-systems arouter protocols bgp       
group external-65534 {
    traceoptions {
        file arouter-bgp-update;
        flag update;
        flag route;
        flag packets;
    description root-ls;
    export internal-rtbh;
    peer-as 65534;

group external-65422 {
    description arouter-ls;
    peer-as 65422;

[email protected]# show logical-systems arouter routing-options static | find 
route {
    tag 65422;

[email protected]# show logical-systems arouter policy-options policy-statement internal-rtbh 
from {
    protocol static;
    tag 65422;
then {
    local-preference 400;
    origin igp;
    community add no-export;

[email protected]# run show route logical-system arouter advertising-protocol bgp extensive 

inet.0: 26 destinations, 26 routes (26 active, 0 holddown, 0 hidden)
* (1 entry, 1 announced)
 BGP group external-65534 type External
     Nexthop: Self
     Flags: Nexthop Change
     AS path: [65422] I
     Communities: no-export

[email protected]# run show route logical-system brouter receive-protocol bgp extensive 

inet.0: 40 destinations, 40 routes (40 active, 0 holddown, 0 hidden)
* (1 entry, 1 announced)
     AS path: 65422 I
     Communities: no-export

1 Answer 1


The way eBGP works is that it will always set the next-hop to the directly connected address of the sending router (except for multihop sessions or when the original next-hop is in the same subnet). As you can see in your output the router is sending the route with Nexthop: Self, not with the nexthop you have configured. You can find the decision tree for next-hop generation in the BGP RFC4271

As a workaround you could change the session to use eBGP multihop, which has a no-nexthop-change option:

set protocols bgp group external-65534 multihop no-nexthop-change

Using eBGP multihop has other drawbacks like no fast external failover.

Normally you would just leave the next-hop unchanged and set a BGP community. The receiver would then set the correct next-hop by matching the community. That's how remote triggered blackholing (RTBH) works between eBGP peers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.