MERAprojects / ops-quagga

GNU General Public License v2.0
0 stars 0 forks source link

BGP routes aren't added in routing table after restart interface #10

Open xivamar opened 8 years ago

xivamar commented 8 years ago

Problem Description:

BGP routes aren't added in routing table after switching-on\switching-off interface.

OpenSwitch version:

OpenSwitch 0.4.0 (Build: appliance-ops-0.4.0-master-20160823125534-dev)

Test Topology:

topologyipv4

Steps to reproduce the problem (see attached file):

  1. Configure DUTs as in attached file.
  2. Check routing table and bgp routing table via show ip route, show ip bgp on DUT1. All routes should be in the tables.
  3. Ping from DUT1 loopback interface 103.0.0.1/32 on DUT3. Ping should be successful.
  4. Shutdown interface eth3 on DUT1.
  5. Try to ping interface 103.0.0.1/32. Ping should be through interface eth1. - NOK: ping is absent.
  6. No shutdown interface 1 on DUT1.
  7. Try to ping interface 103.0.0.1/32. Ping should be successful. - NOK: ping is absent.
  8. Check routing table and bgp routing table via show ip route, show ip bgp and ip netns exec swns ip route on DUT1. - NOK: show ip route and ip netns exec swns ip route commands aren't contain routes to 103.0.0.0/22 and 120.0.0.0/24 networks.

BGP_routes_aren_t_added_in_routing_table_after_restart_interface.txt

vkarpov commented 8 years ago

After the interface was shut down, the IFF_RUNNING flag is still raised.

vkarpov commented 8 years ago

The IFF_RUNNING flag must be unset, after the interface was shut down.

vkarpov commented 8 years ago

Wrong description. The defect is absent.

xivamar commented 8 years ago

This issue is reproduced on build:

    OpenSwitch-1# show version 
    OpenSwitch 0.4.0 (Build: appliance-ops-0.4.0-master-20161012101714-dev)
    OpenSwitch-1# 

On DUT4 add command: network 102.0.0.0/21 config.txt

xivamar commented 8 years ago

This problem is actual for IPv6 too.

     switch# show version 
     OpenSwitch 0.4.0 (Build: appliance-ops-0.4.0-master-20161024113601-dev)
     switch# 

Cmd output.txt config_IPv6_BGP.txt

vkarpov commented 7 years ago

The described fault should be divide to following issues: 1) The rp_filter is enabled. Now, It is disabled on the branch meraswitch/devel/master. 2) We should use the "ovsdb_idl_txn_commit_block" instead the "ovsdb_idl_txn_commit", to committing a transaction into ovsdb . It is needed to prevent getting stale data from the ovsdb. (This action is really fixes issues with the "Nexthop" table, but issues with the "BGP-Nexthop" table still remain.) 3) The observed problem with reading from the "BGP-Nexthop" table in the "bgp_ovsdb_lookup_local_nexthop" function, it is very similar to a problem with memory leak. (The table have got a realistic data, but we see trash in the "bgp_ovsdb_lookup_local_nexthop" function.) 4) There is also a potential problem with preparing a transaction in the "bgp_ovsdb_set_local_rib_nexthop" and "bgp_ovsdb_set_rib_nexthop" functions. The problem will be observed when the multihop feature is used, this will lead to multiple selections and insertions into the same table("Nexthop" or "BGP_Nexthop") in a single transaction.