Maybe this is caused by 'no ip route' command? So is there some command like 'no ip route XXX type=static'

:~# vtysh -c 'show ip bgp 177.0.1.102/32'
BGP routing table entry for 177.0.1.102/32
Paths: (3 available, best #3, table Default-IP-Routing-Table)
Advertised to non peer-group peers:
100.0.28.231 100.0.30.232
235 229
100.0.30.232 from 100.0.30.232 (1.1.1.252)
Origin incomplete, localpref 100, valid, external
Last update: Tue Mar 24 09:08:57 2020

235 229
100.0.28.231 from 100.0.28.231 (100.0.28.231)
Origin incomplete, localpref 100, valid, external
Last update: Tue Mar 24 09:08:55 2020

Local
0.0.0.0 from 0.0.0.0 (1.1.1.230)
Origin incomplete, metric 1, localpref 100, weight 32768, valid, sourced, best
Community: 0:100
Last update: Tue Mar 24 08:45:32 2020

:~# vtysh -c 'show ip route 177.0.1.102/32'
Routing entry for 177.0.1.102/32
Known via "static", distance 1, metric 0, best
* directly connected, Vlan100

:~# vtysh -c 'configure terminal' -c 'no ip route 177.0.1.102/32 Vlan100'

:~# vtysh -c 'show ip route 177.0.1.102/32'
% Network not in table

:~# vtysh -c 'show ip bgp 177.0.1.102/32'
% Network not in table

:~# vtysh -c 'show ip bgp 177.0.1.102/32'
BGP routing table entry for 177.0.1.102/32
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Advertised to non peer-group peers:
100.0.30.232
235 229
100.0.30.232 from 100.0.30.232 (1.1.1.252)
Origin incomplete, localpref 100, valid, external, multipath
Last update: Tue Mar 24 09:25:54 2020

235 229
100.0.28.231 from 100.0.28.231 (100.0.28.231)
Origin incomplete, localpref 100, valid, external, multipath, best
Last update: Tue Mar 24 09:25:50 2020

----
Simon Jones


Simon Jones <batmanustc@gmail.com> 于2020年3月24日周二 上午10:56写道:

Hi all,

Now I need a feature, I have to import neighbor as vlink route into bgpd.

So I use static route like this:
vtysh
ip route 1.1.1.1/32 Vlan100
redistribute static route-map XXX

But I encounter a problem:
before I add static route, there are B route like this:
B   2.2.2.100/32 [20/0] via 100.0.28.231, Ethernet52, src 1.1.1.230, 3d03h18m
after I add static route, there are two route like this:
S>* 2.2.2.100/32 [1/0] is directly connected, Vlan100
B   2.2.2.100/32 [20/0] via 100.0.28.231, Ethernet52, src 1.1.1.230, 3d03h18m
after I redistribute, there are only one route like this:
S>* 2.2.2.100/32 [1/0] is directly connected, Vlan100

But what I need is to keep two route.
Because if there is only one route, I have to relearn B route after I delete static route, which will cause package loss in long time(like 20 second).

For some producer like huawei, thay have 'import route' command, which will combine redistributed route and learned route, like this:
https://support.huawei.com/enterprise/en/doc/EDOC1000178171/cc777bfe/configuring-bgp-to-import-routes

So will FRR support this feature ?
How to import route and NOT withdraw existing route ?

----
Simon Jones