[FROG] Why two duplicate route-map exist in bgpd and zebra ?
Simon Jones
batmanustc at gmail.com
Mon Apr 20 23:48:14 EDT 2020
by the way:
Why this route-map rule can't add into bgpd.conf, which will report ERROR
and bgpd will NOT start? This could only add in zebra.conf
> vtysh# route-map ARP2HOST_RM2 deny sequence 6
> vtysh# match interface lo
But when I test this rule, I found this rule could NOT WORK at all !!! For
ex:
I add static route
> vtysh# ip route 1.1.1.1/32 2.2.2.2
> vtysh# redistribute static
As for this rule in zebra.conf, this redistribute route could NOT
redistribute into bgp.rib
> vtysh# route-map ARP2HOST_RM2 deny sequence 6
> vtysh# match interface lo
But actually this route IS ADDED into bgp.rib
----
Simon Jones
Simon Jones <batmanustc at gmail.com> 于2020年4月21日周二 上午9:08写道:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.frrouting.org/pipermail/frog/attachments/20200421/56737ecf/attachment.html>
More information about the frog
mailing list