bond_options = {"mode": "802.3ad", "miimon": "100"} m1_lag1 = m1.create_bond(slaves=[m1_if1, m1_if2], options=bond_options, ip=["192.168.101.10/24", "2002::1/64"]) m2_lag1 = m2.create_bond(slaves=[m2_if1, m2_if2], options=bond_options, ip=["192.168.101.11/24", "2002::2/64"]) sw_lag1 = sw.create_bond(slaves=[sw_if1, sw_if2], options=bond_options) sw_lag2 = sw.create_bond(slaves=[sw_if3, sw_if4], options=bond_options) sw.create_bridge(slaves=[sw_lag1, sw_lag2], options={"vlan_filtering": 1}) sleep(15) tl = TestLib(ctl, aliases) tl.ping_simple(m1_lag1, m2_lag1) tl.netperf_tcp(m1_lag1, m2_lag1) tl.netperf_udp(m1_lag1, m2_lag1) do_task(ctl, [ctl.get_host("machine1"), ctl.get_host("machine2"), ctl.get_host("switch")], [ctl.get_host("machine1").get_interface("if1"), ctl.get_host("machine1").get_interface("if2"), ctl.get_host("machine2").get_interface("if1"), ctl.get_host("machine2").get_interface("if2"), ctl.get_host("switch").get_interface("if1"), ctl.get_host("switch").get_interface("if2"), ctl.get_host("switch").get_interface("if3"), ctl.get_host("switch").get_interface("if4")], ctl.get_aliases())
m1_if1.reset() m2_if1.reset() m1_if1_10 = m1.create_vlan(m1_if1, 10, ip=test_ip(1, 1)) m2_if1_10 = m2.create_vlan(m2_if1, 10, ip=test_ip(2, 1)) sw_if1_10 = sw.create_vlan(sw_if1, 10, ip=test_ip(1, 2)) sw_if2_10 = sw.create_vlan(sw_if2, 10, ip=test_ip(2, 2)) m1_if1_10.add_nhs_route(ipv4(test_ip(2, 0)), [ipv4(test_ip(1, 2, []))]) m2_if1_10.add_nhs_route(ipv4(test_ip(1, 0)), [ipv4(test_ip(2, 2, []))]) sleep(30) tl = TestLib(ctl, aliases) tl.ping_simple(m1_if1_10, m2_if1_10) tl.netperf_tcp(m1_if1_10, m2_if1_10) tl.netperf_udp(m1_if1_10, m2_if1_10) do_task(ctl, [ ctl.get_host("machine1"), ctl.get_host("machine2"), ctl.get_host("switch") ], [ ctl.get_host("machine1").get_interface("if1"), ctl.get_host("machine2").get_interface("if1"), ctl.get_host("switch").get_interface("if1"), ctl.get_host("switch").get_interface("if2") ], ctl.get_aliases())
tl.check_cpu_traffic(sw_ports) result = tl.iperf_mc(m2_if, mcast_iface, mcgrp(2)) tl.mc_ipref_compare_result(mcast_iface, result, [True, False, False]) tl.check_cpu_traffic(sw_ports) for iface in sw_ports: iface.set_mcast_router(MCAST_ROUTER_PORT.LEARNING) s_procs.intr() for iface in mcast_iface: iface.disable_multicast() m2_if.disable_multicast() do_task(ctl, [ ctl.get_host("machine1"), ctl.get_host("machine2"), ctl.get_host("switch") ], [ ctl.get_host("machine1").get_interface("if1"), ctl.get_host("machine1").get_interface("veth3"), ctl.get_host("machine2").get_interface("veth1"), ctl.get_host("machine2").get_interface("veth3"), ctl.get_host("switch").get_interface("if1"), ctl.get_host("switch").get_interface("if2"), ctl.get_host("switch").get_interface("if3"), ctl.get_host("switch").get_interface("if4") ], ctl.get_host("machine1").get_interface("brif1"), ctl.get_aliases())