[BGPCEP-902] Unable to delete BGP-LU routes Created: 30/Mar/20  Updated: 24/Jan/24

Status: In Review
Project: bgpcep
Component/s: None
Affects Version/s: None
Fix Version/s: 0.21.0, 0.19.9, 0.20.7

Type: Bug Priority: Medium
Reporter: Kailas Deshmukh Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: BGP-LU, labeled-unicast, route, withdrawn
Remaining Estimate: 1 week
Time Spent: Not Specified
Original Estimate: 1 week

Attachments: File MyCommit.patch    

 Description   

Configured controller and one virtual cisco router c7200

Added neighbor from both side to each other using following configuration.

on controller added peer using following api

http://localhost:8181/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/neighbors

having xml body :

<neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">

    <neighbor-address>192.168.10.2</neighbor-address>

    <timers>

        <config>

            <hold-time>180</hold-time>

            <connect-retry>10</connect-retry>

        </config>

    </timers>

    <transport>

        <config>

            <remote-port>179</remote-port>

        </config>

    </transport>

    <config>

        <peer-type>EXTERNAL</peer-type>

        <peer-as>100</peer-as>

    </config>

    <afi-safis>

       <afi-safi>

            <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>

        </afi-safi>

        <afi-safi>

            <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-LABELLED-UNICAST</afi-safi-name>

        </afi-safi>

        <afi-safi>

            <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-LABELLED-UNICAST</afi-safi-name>

        </afi-safi>

    </afi-safis>

</neighbor>

 

on cisco router configuration is :

router bgp 100
no bgp enforce-first-as
neighbor 192.168.10.1 remote-as 500
neighbor 192.168.10.1 update-source gig0/0
!
!
address-family ipv4 unicast
neighbor 192.168.10.1 activate
neighbor 192.168.10.1 next-hop-self
neighbor 192.168.10.1 send-label

after that i was able to see they are connected to each other

then I advertised route from cisco router using command :

network 192.168.100.0 mask 255.255.255.0

which immediately updated in controller and I able to see the route in adj-rib-in effective-rib-in and loc-rib under "labeled-unicast-route"

 

after that I withdrawn route from the cisco router using following command :
no network 192.168.100.0 mask 255.255.255.0

as soon as I entered the command I seen update message for withdrawn route in karaf.log file but the route was not removed from adj-rib-in, effective-rib-in and loc-rib.



 Comments   
Comment by Kailas Deshmukh [ 30/Mar/20 ]

Actual problem for not removing for labeled unicast route is Route kay..
to create unique route key it uses CLabeledUnicastDestination which is extracted from update message.
when I add route router send update message like

2020-03-26T12:57:58,214 | DEBUG | epollEventLoopGroup-5-4 | BGPUpdateMessageParser | 377 - org.opendaylight.bgpcep.bgp-parser-impl - 0.14.0.SNAPSHOT | BGP Update message was parsed Update{_attributes=Attributes{_asPath=AsPath{_segments=[Segments{_asSequence=[AsNumber{_value=100}], augmentation=[]}], augmentation=[]}, _multiExitDisc=MultiExitDisc{_med=0, augmentation=[]}, _origin=Origin{_value=Igp, augmentation=[]}, _unrecognizedAttributes=[], augmentation=[Attributes1{_mpReachNlri=MpReachNlri{_advertizedRoutes=AdvertizedRoutes{_destinationType=DestinationLabeledUnicastCase{_destinationLabeledUnicast=DestinationLabeledUnicast{_cLabeledUnicastDestination=[CLabeledUnicastDestination{_labelStack=[LabelStack{_labelValue=MplsLabel{_value=3}, augmentation=[]}], _prefix=IpPrefix{_ipv4Prefix=Ipv4Prefix{_value=192.168.100.0/24}}, augmentation=[]}], augmentation=[]}, augmentation=[]}, augmentation=[]}, _afi=interface org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv4AddressFamily, _cNextHop=Ipv4NextHopCase{_ipv4NextHop=Ipv4NextHop{_global=Ipv4Address{_value=192.168.10.2}, augmentation=[]}, augmentation=[]}, _safi=interface org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.LabeledUnicastSubsequentAddressFamily, augmentation=[]}}]}, augmentation=[]}.

and when I withdrawn route it send update message like

2020-03-26T16:14:23,948 | DEBUG | epollEventLoopGroup-5-6 | BGPUpdateMessageParser | 221 - org.opendaylight.bgpcep.bgp-parser-impl - 0.14.0.SNAPSHOT | BGP Update message was parsed Update{_attributes=Attributes{_unrecognizedAttributes=[], augmentation=[Attributes2{_mpUnreachNlri=MpUnreachNlri{_afi=interface org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv4AddressFamily, _safi=interface org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.LabeledUnicastSubsequentAddressFamily, _withdrawnRoutes=WithdrawnRoutes{_destinationType=DestinationLabeledUnicastCase{_destinationLabeledUnicast=DestinationLabeledUnicast{_cLabeledUnicastDestination=[CLabeledUnicastDestination{_prefix=IpPrefix{_ipv4Prefix=Ipv4Prefix{_value=192.168.102.0/24}}, augmentation=[]}], augmentation=[]}, augmentation=[]}, augmentation=[]}, augmentation=[]}}]}, augmentation=[]}.

when i observed both messages i seen some difference in CLabeledUnicastDestination
When adding route

CLabeledUnicastDestination{_labelStack=[LabelStack{_labelValue=MplsLabel{_value=3}, augmentation=[]}], _prefix=IpPrefix{_ipv4Prefix=Ipv4Prefix{_value=192.168.100.0/24}}, augmentation=[]}

when removing route

CLabeledUnicastDestination{_prefix=IpPrefix{_ipv4Prefix=Ipv4Prefix{_value=192.168.102.0/24}}, augmentation=[]}

thats why it is creating different keys like
when adding route it was MAAAMcCoZQ==
and when removing route it was GMCoZQ==
so thats why it is not able to delete route...

Comment by Kailas Deshmukh [ 30/Mar/20 ]

MyCommit.patch

Comment by Robert Varga [ 03/Aug/20 ]

kdeshmukhcan you propose that patch to gerrit, please?

Comment by Robert Varga [ 16/Oct/20 ]

Alright, I have moved the patch there, but cannot really vouch for it.

Generated at Wed Feb 07 19:14:27 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.