Hi all,

I need your help to understand what I'm missing...
One of the rs clients sends a route with no-export community, so I have to strip it on ingress and re-attach it on egress. I thought I have two alternatives: using "interpret community no" in the bgp table of the peer, or playing with bgp_community.add and delete.

I would expect to receive a "duplicate" network on my peering router, one learned via the direct peering and one learned via the route server. So far I only see the network from the direct peering.
Relevant part of the config file:

protocol pipe P_MYPEER {
       table master;
       mode transparent;
       peer table T_MYPEER;
       export where bgp_out(<mypeer>) = true;
       import where bgp_mypeer_in(<mypeer>) = true;
}

in the bgp_mypeer_in function, after checking that it is a legitimate network for that peer, I added:
       bgp_community.delete ((65535, 65281));
just before the final "return true".

in the bgp_out function, after checking if a filtering community is set, I added:
   if (bgp_path.first = <mypeer>) then bgp_community.add ((65535, 65281));
just before the final "return true".

I also set "interpret community no" in protocol bgp MYPEER.

If I issue a "show route where bgp_path.first=<my-peer> all" I see that the no-export community is actually being stripped, but I still see one network on my peering router (sh ip bgp regexp ^<mypeer>, via the direct peering).


TIA for any help,
Simone.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply via email to