diff --git a/examples/distributed_bridge/main.py b/examples/distributed_bridge/main.py index 0421bedcc3d5..6f2577abccf3 100755 --- a/examples/distributed_bridge/main.py +++ b/examples/distributed_bridge/main.py @@ -6,7 +6,7 @@ from builtins import input from pyroute2 import IPRoute, NetNS, IPDB, NSPopen from simulation import Simulation -from subprocess import PIPE +from subprocess import PIPE, call if len(argv) > 1 and argv[1] == "mesh": multicast = 0 @@ -40,6 +40,12 @@ def start(self): with self.ipdb.create(ifname="br-fabric", kind="bridge") as br: for host in host_info: br.add_port(host[1]) br.up() + print("Validating connectivity") + for i in range(1, num_hosts): + for j in range(0, 2): + print("VNI%d between host0 and host%d" % (10000 + j, i)) + call(["ip", "netns", "exec", "host%d" % i, + "ping", "99.1.%d.1" % j, "-c", "3", "-i", "0.2", "-q"]) try: sim = TunnelSimulation(ipdb) diff --git a/examples/distributed_bridge/tunnel_mesh.py b/examples/distributed_bridge/tunnel_mesh.py index 9c17e349a03f..9a6efa9d5135 100644 --- a/examples/distributed_bridge/tunnel_mesh.py +++ b/examples/distributed_bridge/tunnel_mesh.py @@ -76,6 +76,5 @@ def run(): run() ipdb.release() input("") - print("---") finally: for v in ifc_gc: call(["ip", "link", "del", v])