Export only "Primary" (best) route

Jean-Baptiste COUPIAC jeanbaptiste.coupiac at nfrance.com
Wed Nov 15 11:44:03 CET 2017


Hello everybody,

I'm trying to configure a Route-Reflector.
I have created a filter to import only some AS:

############################
filter bgp_IN
prefix set allnet;
int set allas;
{



        allas = [10753, 10929, 11478, 12322, 12353, 12392, 12566, 12670,
12684, 12876, 13193, 13238, 13335, 133530, 13414, 14061, 14618, 15133,
15169, 15557, 15895, 16136, 16211, 16276, 16347, 16509, 174, 19506, 197161,
198551, 199064, 201106, 202089, 202727, 203070, 203476, 20473, 20900,
20940, 21502, 21837, 2200, 23033, 23889, 24711, 24940, 24961, 25117, 25186,
25540, 26101, 2635, 2856, 28708, 2914, 29169, 29286, 30999, 31167, 31216,
31976, 32097, 3215, 3269, 32934, 3303, 3320, 3352, 3356, 34010, 34173,
34177, 34274, 34949, 35540, 35625, 35632, 35994, 36351, 36408, 36647,
36903, 36947, 39405, 39473, 39572, 39931, 4134, 43350, 43646, 44050, 44444,
47608, 47833, 47841, 48069, 48072, 4837, 50583, 5089, 51207, 51862, 52075,
5410, 54104, 54113, 5432, 55967, 56844, 5769, 577, 57809, 60068, 60718,
60855, 62044, 62540, 65623, 6661, 6713, 6830, 6848, 702, 714, 786, 7922,
8068, 8075, 8218, 8220, 8228, 8346, 8399, 8560, 8565, 8839, 9003, 9159];
        if  (bgp_path.last ~ allas) then accept;

        reject;
}
############################

protocol bgp ibgp_AAAAA {
        table bgp_filtre_IN;
        import filter bgp_IN;
        export none;
        local as XXXXX;
        neighbor YYYYYYYY as XXXXX;
}

protocol bgp ibgp_BBBBB {
        table bgp_filtre_IN;
        import filter bgp_IN;
        export none;
        local as XXXXX;
        neighbor ZZZZZZZZZ as XXXXX;
}

############################

Into to table  bgp_filtre_IN, I wan to have only the best route (primary
route) instead of all.
For example, for 2.22.88.0/22

bird> show  route table bgp_filtre_IN for 2.22.88.0/22
2.22.88.0/22       unreachable [ibgp_AAAAA 17:04:11 from YYYYYYYYY] *
(100/-) [AS20940i]
                   unreachable [ibgp_BBBBB 17:04:07 from ZZZZZZZ] (100/-)
[AS20940i]


I just want to import first route, which is the best:
2.22.88.0/22       unreachable [ibgp_AAAAA 17:04:11 from YYYYYYYYY] *
(100/-) [AS20940i]

Can I do it into table bgp_filtre_IN ?
Does I need to create another one with some filtering options ?

Regards,

__

Jean-Baptiste,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20171115/95e37c03/attachment.html>


More information about the Bird-users mailing list