nanog mailing list archives

Add communities on direct routes in Juniper


From: Stanislav Datskevych via NANOG <nanog () nanog org>
Date: Sun, 15 Oct 2023 14:23:49 +0200

Dear all, 

Is there a way to add BGP communities on direct (interface) routes in Junipers? The task looks to be simple but the 
solution eludes me.
In Cisco/Arista, for example, I could use "network 192.0.2.0/24 route-map <SOME_MAP_THAT_ADDS_COMMUNITIES>".

In Juniper it seems to be impossible. I even tried putting interface-routes into rib-group with an import policy.
But it seems the import policy only works on importing routes into Secondary routing tables (e.g. inet.50), and not 
into the Primary one (inet.0).

I know it's possible to add communities on later stage while announcing networks to peers, in [protocols bgp group 
<name> export]. But I'd better slap the community on the routes right when they're imported into RIB, not when they 
announced to peers.

Thanks in advance.


Current thread: