diff --git a/ansible/roles/test/files/helpers/remove_ip.sh b/ansible/roles/test/files/helpers/remove_ip.sh index 1fc0dbb2da7..59efccd9f6f 100755 --- a/ansible/roles/test/files/helpers/remove_ip.sh +++ b/ansible/roles/test/files/helpers/remove_ip.sh @@ -6,5 +6,5 @@ INTF_LIST=$(ls /sys/class/net | grep -E "^eth[0-9]+(\.[0-9]+)?$") for INTF in ${INTF_LIST}; do echo "Flush ${INTF} IP address" - ip addr flush dev ${INTF} + ip addr flush dev ${INTF} scope global done diff --git a/tests/bgp/conftest.py b/tests/bgp/conftest.py index 51ca4126367..46cdd81772e 100644 --- a/tests/bgp/conftest.py +++ b/tests/bgp/conftest.py @@ -329,7 +329,7 @@ def _setup_interfaces_t0_or_mx(mg_facts, peer_count): finally: for conn in connections: - ptfhost.shell("ip address flush %s" % conn["neighbor_intf"]) + ptfhost.shell("ip address flush %s scope global" % conn["neighbor_intf"]) @contextlib.contextmanager def _setup_interfaces_t1_or_t2(mg_facts, peer_count): diff --git a/tests/scripts/remove_ip.sh b/tests/scripts/remove_ip.sh index 1fc0dbb2da7..59efccd9f6f 100755 --- a/tests/scripts/remove_ip.sh +++ b/tests/scripts/remove_ip.sh @@ -6,5 +6,5 @@ INTF_LIST=$(ls /sys/class/net | grep -E "^eth[0-9]+(\.[0-9]+)?$") for INTF in ${INTF_LIST}; do echo "Flush ${INTF} IP address" - ip addr flush dev ${INTF} + ip addr flush dev ${INTF} scope global done diff --git a/tests/vrf/test_vrf.py b/tests/vrf/test_vrf.py index 83b39d8d329..9c78ddacd34 100644 --- a/tests/vrf/test_vrf.py +++ b/tests/vrf/test_vrf.py @@ -1404,8 +1404,8 @@ def setup_vrf_capacity(self, duthosts, rand_one_dut_hostname, ptfhost, localhost # -------- Teardown ---------- # remove cfg on ptf - ptfhost.shell("ip address flush dev eth{}".format(ptf_port1)) - ptfhost.shell("ip address flush dev eth{}".format(ptf_port2)) + ptfhost.shell("ip address flush dev eth{} scope global".format(ptf_port1)) + ptfhost.shell("ip address flush dev eth{} scope global".format(ptf_port2)) ptfhost.template(src='vrf/vrf_capacity_del_ptf_cfg.j2', dest='/tmp/vrf_capacity_del_ptf_cfg.sh', mode="0755") ptfhost.shell('/tmp/vrf_capacity_del_ptf_cfg.sh')