[FROG] Why two duplicate route-map exist in bgpd and zebra ?
Donald Sharp
sharpd at cumulusnetworks.com
Tue Apr 21 09:41:04 EDT 2020
Simon -
I would highly recommend upgrading from Quagga 0.99.ANYTHING to the
latest FRR release. There has been substantial improvements and bug
fixes in the intervening 5 years.
Having said that. Both zebra and bgp are going to have different ideas
of what the routemap is ( hence the show route-map command showing
everyone's view of it. ).
donald
On Mon, Apr 20, 2020 at 9:38 PM Simon Jones <batmanustc at gmail.com> wrote:
>
> Hi all,
>
> I'm using quagga-0.99, I set a route-map by vtysh like this:
>
>> vtysh# prefix-list ARP2HOST_PL3 ...
>> vtysh# route-map ARP2HOST_RM2 deny sequence 6
>> vtysh# match interface lo
>> vtysh# route-map ARP2HOST_RM2, permit, sequence 10
>> vtysh# match ip address prefix-list ARP2HOST_PL3
>
>
> But I found there are two SAME route-map exist in zebra and bgpd, like this:
>
>> vtysh# show route-map
>> ZEBRA:
>> route-map ARP2HOST_RM2, deny, sequence 6
>> Match clauses:
>> interface eth0
>> Set clauses:
>> Call clause:
>> Action:
>> Exit routemap
>> route-map ARP2HOST_RM2, permit, sequence 10
>> Match clauses:
>> ip address prefix-list ARP2HOST_PL3
>> Set clauses:
>> Call clause:
>> Action:
>> Exit routemap
>> BGP:
>> route-map ARP2HOST_RM2, deny, sequence 6
>> Match clauses:
>> Set clauses:
>> Call clause:
>> Action:
>> Exit routemap
>> route-map ARP2HOST_RM2, permit, sequence 10
>> Match clauses:
>> ip address prefix-list ARP2HOST_PL3
>> Set clauses:
>> metric 13
>> community 0:100
>> Call clause:
>> Action:
>> Exit routemap
>
>
> And when I use command
>>
>> vtysh# redistribute static route-map ARP2HOST_RM2
>
> the redistribute will NOT process any static route SOMETIME, not always !!!
>
> Then I compare by add route-map through zebra.conf and bgpd.conf, like this:
>>
>> zebra.conf:
>> route-map ARP2HOST_RM2 deny sequence 6
>> match interface lo
>
>
>>
>> bgpd.conf:
>> prefix-list ARP2HOST_PL3 ...
>> route-map ARP2HOST_RM2, permit, sequence 10
>> match ip address prefix-list ARP2HOST_PL3
>
>
> And show route-map result beome:
>>
>> vtysh# show route-map
>> ZEBRA:
>> route-map ARP2HOST_RM2, deny, sequence 6
>> Match clauses:
>> interface eth0
>> Set clauses:
>> Call clause:
>> Action:
>> Exit routemap
>> BGP:
>> route-map ARP2HOST_RM2, permit, sequence 10
>> Match clauses:
>> ip address prefix-list ARP2HOST_PL3
>> Set clauses:
>> metric 13
>> community 0:100
>> Call clause:
>> Action:
>> Exit routemap
>
>
> Then the redistribute will work.
>
> focus on code, I guess ALL of zebra(zebra_routemap.c) and bgpd(bgp_routemap.c) will process route-map from vtysh command, which cause this bug?
>
> If it is, how to set route-map correctly by vtysh?
>
> Thanks !!!
>
> ----
> Simon Jones
> _______________________________________________
> frog mailing list
> frog at lists.frrouting.org
> https://lists.frrouting.org/listinfo/frog
More information about the frog
mailing list