Skip to content
Merged
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
9 changes: 6 additions & 3 deletions tests/bgp/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,11 @@ def _setup_interfaces_dualtor(mg_facts, peer_count):
{
"local_intf": loopback_intf["name"],
"local_addr": "%s/%s" % (loopback_intf_addr, loopback_intf_prefixlen),
"neighbor_intf": "eth%s" % mg_facts["minigraph_port_indices"][local_interface],
# Note: Config same subnets on PTF will generate two connect routes on PTF.
# This may lead different IPs has same FDB entry on DUT even they are on different
# interface and cause layer3 packet drop on PTF, so here same interface for different
# neighbor.
"neighbor_intf": "eth%s" % mg_facts["minigraph_port_indices"][local_interfaces[0]],
"neighbor_addr": "%s/%s" % (mux_configs[local_interface]["server_ipv4"].split("/")[0],
vlan_intf_prefixlen)
}
Expand All @@ -252,8 +256,7 @@ def _setup_interfaces_dualtor(mg_facts, peer_count):

first_neighbor_port = None
for conn in connections:
ptfhost.shell("ifconfig %s %s" % (conn["neighbor_intf"],
conn["neighbor_addr"]))
ptfhost.shell("ip address add %s dev %s" % (conn["neighbor_addr"], conn["neighbor_intf"]))
if not first_neighbor_port:
first_neighbor_port = conn["neighbor_intf"]
# NOTE: this enables the standby ToR to passively learn
Expand Down