Exa-Networks / exabgp

The BGP swiss army knife of networking
Other
2.06k stars 441 forks source link

How to announce attributes with path-information? #1147

Open dilusi opened 1 year ago

dilusi commented 1 year ago

Is your feature request related to a problem? Please describe. I'm trying to send multiple NLRI with the same attribute via "announce attributes", so that I can reduce the number of lines sent to the stdout pipe. I tried the following commands, but the path-information (path-id) is dropped.

neighbor fdbd:dcff::1 announce attributes path-information 1.2.3.4 next-hop 5.5.5.5 community [65535:65282] local-preference 200 nlri 1.0.0.1/32 1.0.0.2/32

09:43:49 | 744192 | api | route added to neighbor fdbd:dcff::1 local-ip fdbd:dcff::2 local-as 300 peer-as 300 router-id 1.1.1.1 family-allowed in-open : 1.0.0.1/32 next-hop 5.5.5.5 local-preference 200 community no-advertise 09:43:49 | 744192 | api | route added to neighbor fdbd:dcff::1 local-ip fdbd:dcff::2 local-as 300 peer-as 300 router-id 1.1.1.1 family-allowed in-open : 1.0.0.2/32 next-hop 5.5.5.5 local-preference 200 community no-advertise

Describe the solution you'd like Reduce the number of lines sent to stdout pipe, to improve the performance.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

thomas-mangin commented 1 year ago

Sorry, you are not providing enough information. Could it be that path-information was not negotiated with the peer?

dilusi commented 1 year ago

Thanks for the reply! path-information is negotiated, and I was able to announce this route with path-information via the following command:

neighbor fdbd:dcff::1 announce route 1.0.0.1/32 path-information 1.2.3.4 next-hop 5.5.5.5 community [65535:65282] local-preference 200

The exabgp config is:

neighbor fdbd:dcff::1 {
    router-id 1.1.1.1;
    local-address fdbd:dcff::2;
    local-as 300;
    peer-as 300;

    family {
        ipv4 unicast;
        ipv6 unicast;
    }

    capability {
        add-path send/receive;
        route-refresh;
    }

    api {
        processes [ announce-routes ];
        neighbor-changes;
    }
}
process announce-routes {
    run /app;
    encoder text;
}

The scenario is that, we have ~50k routes and 1k unique attributes. I'd love to send 1k commands instead of 50k commands to exabgp, so that the overall performance is improved (less impact from stdout pipe)

thomas-mangin commented 1 year ago

Thanks, I will have a look

thomas-mangin commented 1 year ago

Should now be working.

dilusi commented 1 year ago

Thanks Thomas, what's the ETA for a new tag with this fix?

thomas-mangin commented 1 year ago

For 4.2 I have to review or revert a third party patch which changes the RIB so it is holding any new release ATM.