1

I'm trying to set the next hop of a BGP route to "self" in a export filter, but I can't seem to figure it out. Here's a sample of what I have setup:

filter BGP_EXPORT_POLICY {
    if ( source = RTS_INHERIT ) then {
        gw = 192.168.1.1;
        accept;
    }
accept;
}

protocol bgp SomeRouteReflectorClient {
        direct;
        local as 65000;
        passive on;
        neighbor 192.168.1.2 as 65000;
        rr client;
        export filter BGP_EXPORT_POLICY;
        import all;
}

The filter appears to be working correctly (it's matching the routes I expect). However, the gw = 192.168.1.1; does not work. I've set it to the address of the interface I would like the next hop to be set to, however, I get the following error:

<ERR> filters, line XX: Invalid gw address

Ideally, I 192.168.1.1 would be a keyword for "self" (or there would be some other key word). I'm coming from a Cisco world, so I'm trying to lift and replace an existing setup wherein the next hop of locally originated routes by the route reflector are set to the BGP peer ip of the route reflector.

I don't think I can use next hop self; at the BGP peer level because then all routes get next hop self. The goal is that client to client routes do not get the next hop updated by the route reflector, only routes originated by the route reflector.

  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer. – Ron Maupin Apr 19 at 14:36
-1

You can't use the gw parameter in export filters as it is only valid in import.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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