Skip to content

Latest commit

 

History

History
242 lines (212 loc) · 14.1 KB

BGP-Suppress-FIB-Pending-test-plan-T2-Chassis.md

File metadata and controls

242 lines (212 loc) · 14.1 KB

T2-Chassis: BGP Suppress FIB Pending Test Plan

Related documents

Document Name Link
BGP Suppress FIB Pending HLD [https://github.com/stepanblyschak/SONiC/blob/bgp-suppress-fib-pending/doc/BGP/BGP-supress-fib-pending.md]
T1 - BGP Suppress FIB Pending [https://github.com/sonic-net/sonic-mgmt/blob/master/docs/testplan/BGP-Suppress-FIB-Pending-test-plan.md]

Overview

This test plan is an extension of the BGP Suppress FIB Pending Test Plan added for T1 DUT at [https://github.com/sonic-net/sonic-mgmt/blob/master/docs/testplan/BGP-Suppress-FIB-Pending-test-plan.md].

As of today, SONiC BGP advertises learnt prefixes regardless of whether these prefixes were successfully programmed into ASIC. While route programming failure is followed by orchagent crash and all services restart, even for successfully created routes there is a short period of time when the peer will be black holing traffic.

Scope

The test is to verify the mechanism that allows BGP not to advertise routes that haven't been installed into ASIC yet.

Scale / Performance

No scale/performance test involved in this test plan

Related DUT CLI commands

Command to enable the feature:

admin@sonic:~$ sudo config suppress-fib-pending enabled

Command to disable the feature:

admin@sonic:~$ sudo config suppress-fib-pending disabled

Note: Issue raised for the above command not working on multi-asic environment globally, sonic-net/sonic-buildimage#19022 . Currently it works only as specific asic commands.

Supported Topology

The tests will be supported on t1 as well as on t2 topo.

Test cases

As part of test changes for T2, to be consistent with existing T1 test cases, we will choose DUT which is connected to downstream T1 neighbors. This is because, on the other line card connected to upstream neighbors, it is not possible to verify traffic not being sent to the neighbor advertising the prefix since there is already a default route pointing to it.

Test case # 1 - BGPv4 route suppress test

  1. Enable BGP suppress-fib-pending function on all DUTs in multi-dut scenario.
  2. Save configuration and do config reload on DUTs.
  3. Suspend orchagent process on both asics to simulate a delay on downstream DUT.
kill -SIGSTOP $(pidof orchagent)
  1. Announce BGP ipv4 prefixes to downstream DUT from one of T1 peer using exabgp.
  2. Make sure announced BGP routes are in queued state in the downstream DUT routing table for the specific asic.
  3. Verify the routes are not announced via IBGP or EBGP to any of the peers.
  4. Send traffic matching the prefixes from one of T3 peer.
  5. Verify packets are not forwarded to any T1 peers of downstream line cards. And also make sure packets are forwarded to other T3 peers because of default route.
  6. Suspend orchagent process on both asics to simulate a delay on upstream DUT.
kill -SIGSTOP $(pidof orchagent)
  1. Restore orchagent process on both asics of the downstream dut,
kill -SIGCONT $(pidof orchagent)
  1. Make sure announced BGP routes are not in queued state in the downstream DUT routing table.
  2. Make sure the routes are programmed in FIB by checking offloaded flag value in the downstream DUT routing table.
  3. Make sure announced BGP routes are in queued state in the upstream DUT routing table for the specific asic.
  4. Verify the routes are not announced via IBGP or EBGP to any of the T3 peers.
  5. Restore orchagent process on both asics of the upstream dut,
kill -SIGCONT $(pidof orchagent)
  1. Make sure announced BGP routes are not in queued state in the upstream DUT routing table.
  2. Make sure the routes are programmed in FIB by checking offloaded flag value in the upstream DUT routing table.
  3. Verify the routes are announced to all T3 peer neighbors on the upstream DUT.
  4. Send traffic matching the prefixes from one of T3 peer and verify packets are forwarded to expected T1 peer only.

Test case # 2 - BGPv6 route suppress test

  1. Enable BGP suppress-fib-pending function on all DUTs in multi-dut scenario.
  2. Save configuration and do config reload on DUTs.
  3. Suspend orchagent process on both asics to simulate a delay on downstream DUT.
kill -SIGSTOP $(pidof orchagent)
  1. Announce BGP ipv6 prefixes to downstream DUT from one of T1 peer using exabgp.
  2. Make sure announced BGP routes are in queued state in the downstream DUT routing table for the specific asic.
  3. Verify the routes are not announced via IBGP or EBGP to any of the peers.
  4. Send traffic matching the prefixes from one of T3 peer.
  5. Verify packets are not forwarded to any T1 peers of downstream line cards. And also make sure packets are forwarded to other T3 peers because of default route.
  6. Suspend orchagent process on both asics to simulate a delay on upstream DUT.
kill -SIGSTOP $(pidof orchagent)
  1. Restore orchagent process on both asics of the downstream dut,
kill -SIGCONT $(pidof orchagent)
  1. Make sure announced BGP routes are not in queued state in the downstream DUT routing table.
  2. Make sure the routes are programmed in FIB by checking offloaded flag value in the downstream DUT routing table.
  3. Make sure announced BGP routes are in queued state in the upstream DUT routing table for the specific asic.
  4. Verify the routes are not announced via IBGP or EBGP to any of the T3 peers.
  5. Restore orchagent process on both asics of the upstream dut,
kill -SIGCONT $(pidof orchagent)
  1. Make sure announced BGP routes are not in queued state in the upstream DUT routing table.
  2. Make sure the routes are programmed in FIB by checking offloaded flag value in the upstream DUT routing table.
  3. Verify the routes are announced to all T3 peer neighbors on the upstream DUT.
  4. Send traffic matching the prefixes from one of T3 peer and verify packets are forwarded to expected T1 peer only.

Test case # 3 - Test BGP route without suppress

  1. Disable BGP suppress-fib-pending function at both upstream and downstream DUT(Default configuration).
  2. Suspend orchagent process on both asics to simulate a delay on both upstream and downstream DUTs.
kill -SIGSTOP $(pidof orchagent)
  1. Announce BGP prefixes to DUT from one of T1 peer using exabgp.
  2. Make sure announced BGP routes are not in queued state on both DUT's routing table.
  3. Verify the routes are announced via IBGP and EBGP to all T3 peer neighbors on the upstream DUT.
  4. Send traffic matching the prefixes from one of T3 peer.
  5. Verify packets are not forwarded to any T1 peers of downstream line cards. And also make sure packets are forwarded to other T3 peers because of default route.
  6. Restore orchagent process on both asics for both DUTs,
kill -SIGCONT $(pidof orchagent)
  1. Make sure the routes are programmed in FIB by checking offloaded flag in the upstream and downstream DUT routing table.
  2. Send traffic matching the prefixes from one of T3 peer and verify packets are forwarded to expected T1 peer only.

Test case # 4 - Test BGP route suppress under negative operation

  1. Enable BGP suppress-fib-pending function on all DUTs in multi-dut scenario.
  2. Save configuration and do config reload on DUTs.
  3. Suspend orchagent process on both asics to simulate a delay on downstream DUT.
kill -SIGSTOP $(pidof orchagent)
  1. Announce BGP prefixes to downstream DUT from one of T1 peer using exabgp.
  2. Execute BGP session restart by restarting all BGP sessions on the downstream DUT.
  3. Verify BGP neighborships are re-established.
  4. Make sure announced BGP routes are in queued state in the downstream DUT routing table
  5. Verify the routes are not announced via IBGP or EBGP to any of the peers.
  6. Configure static route with nexthop as downstream DUT and then redistribute to BGP.
  7. Verify the redistributed routes are in the DUT routing table.
  8. Verify the static routes are announced via IBGP and EBGP to all T3 peer neighbors on the upstream DUT.
  9. Send traffic matching the initial prefixes from one of T3 peer .
  10. Verify packets with intial prefixes are not forwarded to any T1 peers of downstream line cards. And also make sure packets are forwarded to other T3 peers because of default route.
  11. Then, send traffic matching the static route prefix from one of the T3 peer.
  12. Make sure traffic with static route prefix are forwarded via downstream DUT as expected.
  13. Suspend orchagent process on both asics to simulate a delay on upstream DUT.
kill -SIGSTOP $(pidof orchagent)
  1. Restore orchagent process on both asics of the downstream dut,
kill -SIGCONT $(pidof orchagent)
  1. Make sure announced BGP routes are not in queued state in the downstream DUT routing table.
  2. Make sure the routes are programmed in FIB by checking offloaded flag value in the downstream DUT routing table.
  3. Make sure announced BGP routes are in queued state in the upstream DUT routing table for the specific asic.
  4. Verify the routes are not announced via IBGP or EBGP to any of the T3 peers.
  5. Restore orchagent process on both asics of the upstream dut,
kill -SIGCONT $(pidof orchagent)
  1. Make sure announced BGP routes are not in queued state in the upstream DUT routing table.
  2. Make sure the routes are programmed in FIB by checking offloaded flag value in the upstream DUT routing table.
  3. Verify the routes are announced to all T3 peer neighbors on the upstream DUT.
  4. Send traffic matching the prefixes from one of T3 peer and verify packets are forwarded to expected T1 peer only.

Test case # 5 - Test BGP route suppress in credit loops scenario

  1. Disable BGP suppress-fib-pending function at both upstream and downstream DUT(Default configuration).
  2. Suspend orchagent process on both asics to simulate a delay on the downstream DUT.
kill -SIGSTOP $(pidof orchagent)
  1. Announce BGP prefixes to downstream DUT from one of T1 peer using exabgp.
  2. Verify the routes are announced via IBGP and EBGP to all T3 peer neighbors on the upstream DUT.
  3. Send traffic matching the prefixes from the T3 peer and verify packets are forwarded back to the same T3 peer.
  4. Enable BGP suppress-fib-pending function on the downstream DUT.
  5. Restore orchagent process on both asics on the downstream DUT now,
kill -SIGCONT $(pidof orchagent)
  1. Make sure the routes are programmed in FIB by checking offloaded flag in the downstream DUT routing table.
  2. Send traffic matching the prefixes from one of T3 peer and verify packets are forwarded to expected T1 peer only.

Test case # 6 - Test BGP route suppress under stress

  1. Do BGP route flap 5 times - Announce/Withdraw BGP prefixes from one of T1 peer using exabgp.
  2. Disable BGP suppress-fib-pending function on both upstream and downstream DUT
  3. Send traffic matching the prefixes in the BGP route flap from one of T3 peer and verify packets are forwarded back to the same T3 peer.
  4. Suspend orchagent process to simulate a delay on both asics of the downstream DUT.
kill -SIGSTOP $(pidof orchagent)
  1. Announce 33K BGP prefixes to DUT from T1 peer by exabgp
  2. Verify the routes are announced via IBGP and EBGP to all T3 peer neighbors on the upstream DUT.
  3. Send traffic matching the prefixes in the BGP route flap from one of T3 VM and verify packets are forwarded back to the same T3 VM.
  4. Enable BGP suppress-fib-pending function at downstream DUT.
  5. Restore orchagent process on both asics on the downstream DUT now,
kill -SIGCONT $(pidof orchagent)
  1. Verify the routes are programmed in FIB by checking offloaded flag in the downstream DUT routing table
  2. Send traffic matching the prefixes from one of T3 peer and verify packets are forwarded to expected T1 peer only.

Test case # 7 - Test BGP route suppress performance

  1. Enable BGP suppress-fib-pending function on upstream and downstream DUTs.
  2. Start tcpdump capture at the ingress and egress ports of both the DUTs.
  3. Announce 33K BGP prefixes to downstream DUT from T1 VM by exabgp
  4. Verify the routes are announced via IBGP and EBGP to all T3 peer neighbors on the upstream DUT.
  5. Withdraw 33K BGP prefixes to DUT from the same T1 VM using exabgp
  6. Verify the BGP routes are withdrawn from all T3 VM peer neighbors.
  7. Stop tcpdump capture on both the DUTs' ingress and egress ports.
  8. Calculate the average and middle route processing time for each of the ipv4 and ipv6 route prefixes announced and withdrawn.
  9. Verify the average as well as middle route process time are under the threshold processing time ~ 3 seconds(T2 Chassis) for each route.
Note:
Average route processing time (announced or withdrawn) = Sum of total processing time taken for each route (announced or withdrawn) / Total number of routes (announced or withdrawn)
Middle route processing time (announced or withdrawn)  = Middle data value(time) in the sorted list of all route processing times data set (either announced or withdrawn)