Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 14 additions & 16 deletions docs/testplan/BGP-Suppress-FIB-Pending-test-plan-T2-Chassis.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ admin@sonic:~$ sudo config suppress-fib-pending disabled
```
Note: Issue raised for the above command not working on multi-asic environment globally, https://github.com/sonic-net/sonic-buildimage/issues/19022 . Currently it works only as specific asic commands.

> Note: changing the `suppress-fib-pending` configuration requires reload to become operational.

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

Expand Down Expand Up @@ -196,31 +198,27 @@ kill -SIGSTOP $(pidof orchagent)
4. Verify the routes are announced via __IBGP__ and __EBGP__ to all T3 peer neighbors on the upstream DUT.
5. Send traffic matching the prefixes from the T3 peer and verify packets are forwarded back to the same T3 peer.
6. Enable BGP suppress-fib-pending function on the downstream DUT.
7. Restore orchagent process on both asics on the downstream DUT now,
```
kill -SIGCONT $(pidof orchagent)
```
8. Make sure the routes are programmed in FIB by checking offloaded flag in the downstream DUT routing table.
9. Send traffic matching the prefixes from one of T3 peer and verify packets are forwarded to expected T1 peer only.
7. Make sure the routes are programmed in FIB by checking offloaded flag in the downstream DUT routing table.
8. 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.
1. Enable BGP suppress-fib-pending function on both upstream and downstream DUTs.
2. Do BGP route flap 5 times - Announce/Withdraw BGP prefixes from one of T1 peer using exabgp (stresses the route processing pipeline).
3. Suspend orchagent process to simulate a route install delay on both asics of the downstream DUT.
```
kill -SIGSTOP $(pidof orchagent)
```
5. Announce 33K BGP prefixes to DUT from T1 peer by exabgp
6. Verify the routes are announced via __IBGP__ and __EBGP__ to all T3 peer neighbors on the upstream DUT.
7. 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.
8. Enable BGP suppress-fib-pending function at downstream DUT.
9. Restore orchagent process on both asics on the downstream DUT now,
4. Announce 33K BGP prefixes to downstream DUT from T1 peer by exabgp.
5. Verify the BGP routes are in __queued__ state in the downstream DUT routing table.
6. Verify the BGP routes are NOT announced via __IBGP__ or __EBGP__ to any of the T3 peer neighbors on the upstream DUT.
7. Send traffic matching the prefixes from one of T3 peer and verify packets are NOT forwarded to T1 peers (blackholing).
8. Restore orchagent process on both asics on the downstream DUT,
```
kill -SIGCONT $(pidof orchagent)
```
10. Verify the routes are programmed in FIB by checking offloaded flag in the downstream DUT routing table
9. Verify the BGP routes are in __offloaded__ state in the downstream DUT routing table.
10. Verify the routes are announced via __IBGP__ and __EBGP__ to all T3 peer neighbors on the upstream DUT.
11. Send traffic matching the prefixes from one of T3 peer and verify packets are forwarded to expected T1 peer only.


Expand Down
43 changes: 18 additions & 25 deletions docs/testplan/BGP-Suppress-FIB-Pending-test-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Command to disable the feature:
admin@sonic:~$ sudo config suppress-fib-pending disabled
```

> Note: changing the `suppress-fib-pending` configuration requires reload to become operational.

### Supported Topology
The tests will be supported on t1 topo.

Expand Down Expand Up @@ -135,15 +137,7 @@ show ip route 1.1.1.0/24 json
7. Make sure the routes are programmed in FIB by checking __offloaded__ flag in the DUT routing table
8. Send traffic matching the prefixes and verify packets are forwarded to T0 VM

### Test case # 4 - Test BGP test work with suppress
1. No BGP suppress-fib-pending function configured at DUT
2. Run BGP test suite
3. Make sure BGP tests are not affected
4. Enable BGP suppress-fib-pending function at DUT
5. Run BGP test suite
6. Make sure BGP tests are not affected

### Test case # 5 - Test BGP route suppress under negative operation
### Test case # 4 - Test BGP route suppress under negative operation
1. Enable BGP suppress-fib-pending function at DUT
2. Suspend orchagent process to simulate a delay
3. Announce BGP prefixes to DUT from T0 VM by exabgp
Expand All @@ -160,32 +154,31 @@ show ip route 1.1.1.0/24 json
14. Verify the BGP routes are announced to T2 peer
15. Send traffic matching the prefixes and verify packets are forwarded to T0 VM

### Test case # 6 - Test BGP route suppress in credit loops scenario
### Test case # 5 - Test BGP route suppress in credit loops scenario
1. No BGP suppress-fib-pending function configured at DUT
2. Suspend orchagent process to simulate a delay
3. Announce a default route to DUT from T2 VM
4. Announce BGP prefixes to DUT from T0 VM by exabgp
5. Verify the BGP routes are announced to T2 VM peer
6. Send traffic matching the prefixes and verify packets are forwarded __back to T2 VM__
7. Enable BGP suppress-fib-pending function at DUT
8. Make sure the routes are programmed in FIB by checking __offloaded__ flag in the DUT routing table
9. Send traffic matching the prefixes and verify packets are forwarded to __T0 VM__

### Test case # 6 - Test BGP route suppress under stress
1. Enable BGP suppress-fib-pending function at DUT
2. Do BGP route flap 5 times (announce + withdraw 1K BGP prefixes) to stress the route processing pipeline
3. Suspend orchagent process to simulate a route install delay
4. Announce 1K BGP prefixes to DUT from T0 VM by exabgp
5. Verify the BGP routes are in __queued__ state in the DUT routing table
6. Verify the BGP routes are NOT announced to T2 VM peer
7. Send traffic matching the prefixes and verify packets are NOT forwarded to T0 VM (blackholing)
8. Restore orchagent process
9. Make sure the routes are programmed in FIB by checking __offloaded__ flag in the DUT routing table
10. Send traffic matching the prefixes and verify packets are forwarded to __T0 VM__

### Test case # 7 - Test BGP route suppress under stress
1. Do BGP route flap 5 times
2. Disable BGP suppress-fib-pending function
3. Send traffic matching the prefixes in the BGP route flap and verify packets are forwarded __back to T2 VM__
4. Suspend orchagent process to simulate a delay
5. Announce 1K BGP prefixes to DUT from T0 VM by exabgp
6. Verify the BGP routes are announced to T2 VM peer
7. Send traffic matching the prefixes in the BGP route flap and verify packets are forwarded __back to T2 VM__
8. Enable BGP suppress-fib-pending function at DUT
9. Restore orchagent process
10. Verify the routes are programmed in FIB by checking __offloaded__ flag in the DUT routing table
9. Verify the BGP routes are in __offloaded__ state in the DUT routing table
10. Verify the BGP routes are announced to T2 VM peer
11. Send traffic matching the prefixes and verify packets are forwarded to __T0 VM__

### Test case # 8 - Test BGP route suppress performance
### Test case # 7 - Test BGP route suppress performance
1. Enable BGP suppress-fib-pending function at DUT
2. Start tcpdump capture at the ingress and egress port at DUT
3. Announce 1K BGP prefixes to DUT from T0 VM by exabgp
Expand Down
2 changes: 2 additions & 0 deletions tests/bgp/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,13 +850,15 @@ def config_bgp_suppress_fib(duthosts, rand_one_dut_hostname, request):
logger.info('Enable BGP suppress fib pending function')
duthost.shell('sudo config suppress-fib-pending enabled')
duthost.shell('sudo config save -y')
config_reload(duthost, safe_reload=True, check_intf_up_ports=True, wait_for_bgp=True)

yield

if config:
logger.info('Disable BGP suppress fib pending function')
duthost.shell('sudo config suppress-fib-pending disabled')
duthost.shell('sudo config save -y')
config_reload(duthost, safe_reload=True, check_intf_up_ports=True, wait_for_bgp=True)


@pytest.fixture(scope="module")
Expand Down
8 changes: 1 addition & 7 deletions tests/bgp/test_bgp_peer_shutdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from tests.common.errors import RunAnsibleModuleFail
from tests.common.helpers.bgp import BGPNeighbor
from tests.common.helpers.constants import DEFAULT_NAMESPACE
from tests.common.utilities import wait_until, delete_running_config
from tests.common.utilities import wait_until
from tests.common.utilities import is_ipv6_only_topology

pytestmark = [
Expand Down Expand Up @@ -96,12 +96,6 @@ def common_setup_teardown(

yield bgp_neighbor, use_vtysh

# Cleanup suppress-fib-pending config
delete_tacacs_json = [
{"DEVICE_METADATA": {"localhost": {"suppress-fib-pending": "disabled"}}}
]
delete_running_config(delete_tacacs_json, duthost)


@pytest.fixture
def constants(is_quagga, setup_interfaces, pytestconfig):
Expand Down
Loading
Loading