Example #1
0
               'vmi2':{'vn': 'vn1'},
               'vmi3':{'vn': 'vn2','parent':'vmi1','vlan':VLAN_ID1},
               'vmi4':{'vn': 'vn2','parent':'vmi2','vlan':VLAN_ID1},},

        # VM parameters
        'vm': {'count':2, 'launch_mode':'distribute',
              'vm1':{'vn':['vn1'], 'vmi':['vmi1'], 'userdata':{
                'vlan':str(VLAN_ID1)} },
              'vm2':{'vn':['vn1'], 'vmi':['vmi2'], 'userdata':{
                'vlan':str(VLAN_ID1)} }
            },

        # Traffic
        'traffic': {
                   'stream1': {'src':'vm1','dst':'vm2','count':5,
                                'src_cmac': get_random_mac(),
                                'dst_cmac': get_random_mac(),
                                'bd': 'bd1', 'src_vmi': 'vmi3',
                                'dst_vmi': 'vmi4'}
                  },

        # BD to VMI mapping parameters
        'bd_vmi_mapping': {'bd1':['vmi3','vmi4']}
}

PBB_RESOURCES_TWO_ISID = {
        # VN parameters
        'vn': {'count':4,
              'vn1':{'subnet':'10.10.10.0/24'},
              'vn2':{'subnet':'1.1.1.0/24', 'asn':64510, 'target':1},
              'vn3':{'subnet':'20.20.20.0/24'},
Example #2
0
    def test_mac_learning_single_isid(self):
        '''
            Test MAC learning on I-Component with single isid
        '''
        # PBB EVPN parameters
        pbb_evpn_config = PBB_EVPN_CONFIG

        # VN parameters
        vn = {'count':1,
              'vn1':{'subnet':'10.10.10.0/24', 'asn':64510, 'target':1},
             }

        # Bridge domain parameters
        bd = {'count':1,
              'bd1':{'isid':200200,'vn':'vn1'},
             }

        # VMI parameters
        vmi = {'count':2,
               'vmi1':{'vn': 'vn1'},
               'vmi2':{'vn': 'vn1'},
              }

        # VM parameters
        vm = {'count':2, 'launch_mode':'distribute',
              'vm1':{'vn':['vn1'], 'vmi':['vmi1']},
              'vm2':{'vn':['vn1'], 'vmi':['vmi2']},
             }

        # Traffic
        traffic = {
                   'stream1': {'src':'vm1','dst':'vm2','count':10,
                                'src_cmac': get_random_mac(),
                                'dst_cmac': get_random_mac(),
                                'bd': 'bd1'}
                  }

        # BD to VMI mapping parameters
        bd_vmi_mapping = {'bd1':['vmi1','vmi2']}

        ret_dict = self.setup_pbb_evpn(pbb_evpn_config=pbb_evpn_config,
                                       bd=bd, vn=vn, vmi=vmi, vm=vm,
                                       bd_vmi_mapping=bd_vmi_mapping)
        bd_fixtures = ret_dict['bd_fixtures']
        vmi_fixtures = ret_dict['vmi_fixtures']
        vn_fixtures = ret_dict['vn_fixtures']
        vm_fixtures = ret_dict['vm_fixtures']
        pbb_compute_node_ips = ret_dict['pbb_compute_node_ips']

        # Send Traffic
        for stream in traffic.values():
            self.send_l2_traffic(vm_fixtures[stream['src']],
                src_mac=stream['src_cmac'], dst_mac=stream['dst_cmac'],
                count=stream['count'])

        #Verify mac learned
        for stream in traffic.values():
            src_vmi = vm[stream['src']]['vmi'][0]
            assert self.verify_mac_learning(vmi_fixtures[src_vmi],
                bd_fixtures[stream['bd']], pbb_compute_node_ips,
                cmac=stream['src_cmac'])
Example #3
0
        'vm2': {
            'vn': ['vn1'],
            'vmi': ['vmi2'],
            'userdata': {
                'vlan': str(VLAN_ID1)
            }
        }
    },

    # Traffic
    'traffic': {
        'stream1': {
            'src': 'vm1',
            'dst': 'vm2',
            'count': 5,
            'src_cmac': get_random_mac(),
            'dst_cmac': get_random_mac(),
            'bd': 'bd1',
            'src_vmi': 'vmi3',
            'dst_vmi': 'vmi4'
        }
    },

    # BD to VMI mapping parameters
    'bd_vmi_mapping': {
        'bd1': ['vmi3', 'vmi4']
    }
}

PBB_RESOURCES_TWO_ISID = {
    # VN parameters
Example #4
0
    def test_mac_learning_subIntf_multi_isid(self):
        '''
            Test MAC learning with sub-interfaces and multiple isid
        '''
        # PBB EVPN parameters
        pbb_evpn_config = PBB_EVPN_CONFIG

        # VN parameters
        vn = {'count':4,
              'vn1':{'subnet':'10.10.10.0/24'},
              'vn2':{'subnet':'1.1.1.0/24', 'asn':64510, 'target':1},
              'vn3':{'subnet':'20.20.20.0/24'},
              'vn4':{'subnet':'2.2.2.0/24', 'asn':64511, 'target':1}
              }

        # Bridge domain parameters
        bd = {'count':2,
              'bd1':{'isid':200200, 'vn':'vn2'},
              'bd2':{'isid':300300, 'vn':'vn4'}
              }

        # VMI parameters
        vmi = {'count':8,
               'vmi1':{'vn': 'vn1'},
               'vmi2':{'vn': 'vn1'},
               'vmi3':{'vn': 'vn2','parent':'vmi1','vlan':212},
               'vmi4':{'vn': 'vn2','parent':'vmi2','vlan':212},
               'vmi5':{'vn': 'vn3'},
               'vmi6':{'vn': 'vn3'},
               'vmi7':{'vn': 'vn4','parent':'vmi5','vlan':213},
               'vmi8':{'vn': 'vn4','parent':'vmi6','vlan':213}
               }

        # VM parameters
        vm = {'count':4, 'launch_mode':'distribute',
              'vm1':{'vn':['vn1'], 'vmi':['vmi1'], 'userdata':{
                'vlan': str(vmi['vmi3']['vlan'])} },
              'vm2':{'vn':['vn1'], 'vmi':['vmi2'], 'userdata':{
                'vlan': str(vmi['vmi4']['vlan'])} },
              'vm3':{'vn':['vn3'], 'vmi':['vmi5'], 'userdata':{
                'vlan': str(vmi['vmi7']['vlan'])} },
              'vm4':{'vn':['vn3'], 'vmi':['vmi6'], 'userdata':{
                'vlan': str(vmi['vmi8']['vlan'])} }
              }

        # Traffic
        traffic = {
                   'stream1': {'src':'vm1','dst':'vm2','count':10,
                                'src_cmac': get_random_mac(),
                                'dst_cmac': get_random_mac(),
                                'bd': 'bd1', 'src_vmi': 'vmi3',
                                'dst_vmi': 'vmi4'},
                   'stream2': {'src':'vm3','dst':'vm4','count':10,
                                'src_cmac': get_random_mac(),
                                'dst_cmac': get_random_mac(),
                                'bd': 'bd2', 'src_vmi': 'vmi7',
                                'dst_vmi': 'vmi8'}
                  }

        # BD to VMI mapping parameters
        bd_vmi_mapping = {'bd1':['vmi3','vmi4'],
                          'bd2':['vmi7','vmi8']}

        ret_dict = self.setup_pbb_evpn(pbb_evpn_config=pbb_evpn_config,
                                       bd=bd, vn=vn, vmi=vmi, vm=vm,
                                       bd_vmi_mapping=bd_vmi_mapping)
        bd_fixtures = ret_dict['bd_fixtures']
        vmi_fixtures = ret_dict['vmi_fixtures']
        vn_fixtures = ret_dict['vn_fixtures']
        vm_fixtures = ret_dict['vm_fixtures']
        pbb_compute_node_ips = ret_dict['pbb_compute_node_ips']

        # Traffic
        # Pinging all the VMIs as per defined streams in traffic
        for stream in traffic.values():
            vmi_ip = vmi_fixtures[stream['dst_vmi']].obj['fixed_ips'][0]['ip_address']
            assert vm_fixtures[stream['src']].ping_with_certainty(vmi_ip)

        # Send Traffic
        for stream in traffic.values():
            interface = vm_fixtures[stream['src']].get_vm_interface_name() + '.' + \
                str(vmi[stream['src_vmi']]['vlan'])
            self.send_l2_traffic(vm_fixtures[stream['src']],
                src_mac=stream['src_cmac'], dst_mac=stream['dst_cmac'],
                count=stream['count'], interface=interface)

        #Verify mac learned
        for stream in traffic.values():
            assert self.verify_mac_learning(vmi_fixtures[stream['src_vmi']],
                bd_fixtures[stream['bd']],  pbb_compute_node_ips,
                cmac=stream['src_cmac'])

        #Verify mac not learned across BDs
        assert self.verify_mac_learning(vmi_fixtures[traffic['stream1']['src_vmi']],
            bd_fixtures[traffic['stream1']['bd']], pbb_compute_node_ips,
            cmac=traffic['stream2']['src_cmac'], expectation=False)

        assert self.verify_mac_learning(vmi_fixtures[traffic['stream2']['src_vmi']],
            bd_fixtures[traffic['stream2']['bd']], pbb_compute_node_ips,
            cmac=traffic['stream1']['src_cmac'], expectation=False)

        #Update aging time of bd1, it should not affect aging time of bd2
        mac_aging_time = 5
        bd_fixtures['bd1'].update_bd(mac_aging_time=mac_aging_time)

        #Wait till mac ages out for bd1
        self.logger.info("Waiting for %s seconds, till learnt C-MAC ages out.."
            % (mac_aging_time))
        sleep(mac_aging_time)

        #Verify mac aged out for bd1
        assert self.verify_mac_learning(vmi_fixtures[traffic['stream1']['src_vmi']],
            bd_fixtures[traffic['stream1']['bd']], pbb_compute_node_ips,
            cmac=traffic['stream1']['src_cmac'], expectation=False)

        #Verify mac not aged out for bd2
        assert self.verify_mac_learning(vmi_fixtures[traffic['stream2']['src_vmi']],
            bd_fixtures[traffic['stream2']['bd']], pbb_compute_node_ips,
            cmac=traffic['stream2']['src_cmac'])
Example #5
0
    def test_mac_learning_single_isid(self):
        '''
            Test MAC learning on I-Component with single isid
        '''
        # PBB EVPN parameters
        pbb_evpn_config = PBB_EVPN_CONFIG

        # VN parameters
        vn = {'count':1,
              'vn1':{'subnet':'10.10.10.0/24', 'asn':64510, 'target':1},
             }

        # Bridge domain parameters
        bd = {'count':1,
              'bd1':{'isid':200200,'vn':'vn1'},
             }

        # VMI parameters
        vmi = {'count':2,
               'vmi1':{'vn': 'vn1'},
               'vmi2':{'vn': 'vn1'},
              }

        # VM parameters
        vm = {'count':2, 'launch_mode':'distribute',
              'vm1':{'vn':['vn1'], 'vmi':['vmi1']},
              'vm2':{'vn':['vn1'], 'vmi':['vmi2']},
             }

        # Traffic
        traffic = {
                   'stream1': {'src':'vm1','dst':'vm2','count':10,
                                'src_cmac': get_random_mac(),
                                'dst_cmac': get_random_mac(),
                                'bd': 'bd1'}
                  }

        # BD to VMI mapping parameters
        bd_vmi_mapping = {'bd1':['vmi1','vmi2']}

        ret_dict = self.setup_pbb_evpn(pbb_evpn_config=pbb_evpn_config,
                                       bd=bd, vn=vn, vmi=vmi, vm=vm,
                                       bd_vmi_mapping=bd_vmi_mapping)
        bd_fixtures = ret_dict['bd_fixtures']
        vmi_fixtures = ret_dict['vmi_fixtures']
        vn_fixtures = ret_dict['vn_fixtures']
        vm_fixtures = ret_dict['vm_fixtures']
        pbb_compute_node_ips = ret_dict['pbb_compute_node_ips']

        # Send Traffic
        for stream in traffic.values():
            self.send_l2_traffic(vm_fixtures[stream['src']],
                src_mac=stream['src_cmac'], dst_mac=stream['dst_cmac'],
                count=stream['count'])

        #Verify mac learned
        for stream in traffic.values():
            sleep(5)
            src_vmi = vm[stream['src']]['vmi'][0]
            assert self.verify_mac_learning(vmi_fixtures[src_vmi],
                bd_fixtures[stream['bd']], pbb_compute_node_ips,
                cmac=stream['src_cmac'])
Example #6
0
    def test_mac_learning_subIntf_multi_isid(self):
        '''
            Test MAC learning with sub-interfaces and multiple isid
        '''
        # PBB EVPN parameters
        pbb_evpn_config = PBB_EVPN_CONFIG

        # VN parameters
        vn = {'count':4,
              'vn1':{'subnet':'10.10.10.0/24'},
              'vn2':{'subnet':'1.1.1.0/24', 'asn':64510, 'target':1},
              'vn3':{'subnet':'20.20.20.0/24'},
              'vn4':{'subnet':'2.2.2.0/24', 'asn':64511, 'target':1}
              }

        # Bridge domain parameters
        bd = {'count':2,
              'bd1':{'isid':200200, 'vn':'vn2'},
              'bd2':{'isid':300300, 'vn':'vn4'}
              }

        # VMI parameters
        vmi = {'count':8,
               'vmi1':{'vn': 'vn1'},
               'vmi2':{'vn': 'vn1'},
               'vmi3':{'vn': 'vn2','parent':'vmi1','vlan':212},
               'vmi4':{'vn': 'vn2','parent':'vmi2','vlan':212},
               'vmi5':{'vn': 'vn3'},
               'vmi6':{'vn': 'vn3'},
               'vmi7':{'vn': 'vn4','parent':'vmi5','vlan':213},
               'vmi8':{'vn': 'vn4','parent':'vmi6','vlan':213}
               }

        # VM parameters
        vm = {'count':4, 'launch_mode':'distribute',
              'vm1':{'vn':['vn1'], 'vmi':['vmi1'], 'userdata':{
                'vlan': str(vmi['vmi3']['vlan'])} },
              'vm2':{'vn':['vn1'], 'vmi':['vmi2'], 'userdata':{
                'vlan': str(vmi['vmi4']['vlan'])} },
              'vm3':{'vn':['vn3'], 'vmi':['vmi5'], 'userdata':{
                'vlan': str(vmi['vmi7']['vlan'])} },
              'vm4':{'vn':['vn3'], 'vmi':['vmi6'], 'userdata':{
                'vlan': str(vmi['vmi8']['vlan'])} }
              }

        # Traffic
        traffic = {
                   'stream1': {'src':'vm1','dst':'vm2','count':10,
                                'src_cmac': get_random_mac(),
                                'dst_cmac': get_random_mac(),
                                'bd': 'bd1', 'src_vmi': 'vmi3',
                                'dst_vmi': 'vmi4'},
                   'stream2': {'src':'vm3','dst':'vm4','count':10,
                                'src_cmac': get_random_mac(),
                                'dst_cmac': get_random_mac(),
                                'bd': 'bd2', 'src_vmi': 'vmi7',
                                'dst_vmi': 'vmi8'}
                  }

        # BD to VMI mapping parameters
        bd_vmi_mapping = {'bd1':['vmi3','vmi4'],
                          'bd2':['vmi7','vmi8']}

        ret_dict = self.setup_pbb_evpn(pbb_evpn_config=pbb_evpn_config,
                                       bd=bd, vn=vn, vmi=vmi, vm=vm,
                                       bd_vmi_mapping=bd_vmi_mapping)
        bd_fixtures = ret_dict['bd_fixtures']
        vmi_fixtures = ret_dict['vmi_fixtures']
        vn_fixtures = ret_dict['vn_fixtures']
        vm_fixtures = ret_dict['vm_fixtures']
        pbb_compute_node_ips = ret_dict['pbb_compute_node_ips']

        # Traffic
        # Pinging all the VMIs as per defined streams in traffic
        for stream in traffic.values():
            vmi_ip = vmi_fixtures[stream['dst_vmi']].obj['fixed_ips'][0]['ip_address']
            assert vm_fixtures[stream['src']].ping_with_certainty(vmi_ip)

        # Send Traffic
        for stream in traffic.values():
            interface = vm_fixtures[stream['src']].get_vm_interface_name() + '.' + \
                str(vmi[stream['src_vmi']]['vlan'])
            self.send_l2_traffic(vm_fixtures[stream['src']],
                src_mac=stream['src_cmac'], dst_mac=stream['dst_cmac'],
                count=stream['count'], interface=interface)

        #Verify mac learned
        for stream in traffic.values():
            src_vm = stream['src']
            dst_vm = stream['dst']
            pbb_compute_node_ips = []
            pbb_compute_node_ips.append(vm_fixtures[src_vm]._vm_node_ip)
            pbb_compute_node_ips.append(vm_fixtures[dst_vm]._vm_node_ip)
            assert self.verify_mac_learning(vmi_fixtures[stream['src_vmi']],
                bd_fixtures[stream['bd']],  pbb_compute_node_ips,
                cmac=stream['src_cmac'])

        #Verify mac not learned across BDs
        src_vm = traffic['stream1']['src']
        dst_vm = traffic['stream1']['dst']
        pbb_compute_node_ips = []
        pbb_compute_node_ips.append(vm_fixtures[src_vm]._vm_node_ip)
        pbb_compute_node_ips.append(vm_fixtures[dst_vm]._vm_node_ip)
        assert self.verify_mac_learning(vmi_fixtures[traffic['stream1']['src_vmi']],
            bd_fixtures[traffic['stream1']['bd']], pbb_compute_node_ips,
            cmac=traffic['stream2']['src_cmac'], expectation=False)

        src_vm = traffic['stream2']['src']
        dst_vm = traffic['stream2']['dst']
        pbb_compute_node_ips = []
        pbb_compute_node_ips.append(vm_fixtures[src_vm]._vm_node_ip)
        pbb_compute_node_ips.append(vm_fixtures[dst_vm]._vm_node_ip)
        assert self.verify_mac_learning(vmi_fixtures[traffic['stream2']['src_vmi']],
            bd_fixtures[traffic['stream2']['bd']], pbb_compute_node_ips,
            cmac=traffic['stream1']['src_cmac'], expectation=False)

        #Update aging time of bd1, it should not affect aging time of bd2
        mac_aging_time = 5
        bd_fixtures['bd1'].update_bd(mac_aging_time=mac_aging_time)

        #Wait till mac ages out for bd1
        self.logger.info("Waiting for %s seconds, till learnt C-MAC ages out.."
            % (mac_aging_time))
        sleep(mac_aging_time)

        #Verify mac aged out for bd1
        src_vm = traffic['stream1']['src']
        dst_vm = traffic['stream1']['dst']
        pbb_compute_node_ips = []
        pbb_compute_node_ips.append(vm_fixtures[src_vm]._vm_node_ip)
        pbb_compute_node_ips.append(vm_fixtures[dst_vm]._vm_node_ip)
        assert self.verify_mac_learning(vmi_fixtures[traffic['stream1']['src_vmi']],
            bd_fixtures[traffic['stream1']['bd']], pbb_compute_node_ips,
            cmac=traffic['stream1']['src_cmac'], expectation=False)

        #Verify mac not aged out for bd2
        src_vm = traffic['stream2']['src']
        dst_vm = traffic['stream2']['dst']
        pbb_compute_node_ips = []
        pbb_compute_node_ips.append(vm_fixtures[src_vm]._vm_node_ip)
        pbb_compute_node_ips.append(vm_fixtures[dst_vm]._vm_node_ip)
        assert self.verify_mac_learning(vmi_fixtures[traffic['stream2']['src_vmi']],
            bd_fixtures[traffic['stream2']['bd']], pbb_compute_node_ips,
            cmac=traffic['stream2']['src_cmac'])
    def test_evpn_type_5_vm_to_bms_add_rt_to_lr(self):
        '''
            Configure Encapsulation order as VxLAN, MPLSoverGRE, MPLSoverUDP
            Enable VxLAN Routing under that project settings
            Create Virtual Networks
            Create a Logical Router and attach above created VNs
            Create a VM in VN1
            Assign an IP from VN2 to a BMS
            Verify traffic between VM to BMS
            Now add a new RT to the LR
            Traffic across the VNs should continue to work

        '''
        my_lrs = {
            'lr1': {
                'vn_list': ['vn1', 'vn2'],
                'vni': 70001
            },
        }
        my_vn = {
            'count': 2,
            'vn1': {
                'subnet': get_random_cidr(af='v4')
            },
            'vn2': {
                'subnet': get_random_cidr(af='v4')
            },
        }

        my_vmi = {
            'count': 2,
            'vmi11': {
                'vn': 'vn1'
            },  # VMI details
            'vmi21': {
                'vn': 'vn2'
            },  # VMI details
        }

        my_vm = {
            'count': 2,
            'launch_mode': 'distribute',
            'vm11': {
                'vn': ['vn1'],
                'vmi': ['vmi11']
            },  # VM Details
            'vm21': {
                'vn': ['vn2'],
                'vmi': ['vmi21']
            },  # VM Details
        }
        self.setup_fixtures = self.setup_evpn_type5(lrs=my_lrs,
                                                    vn=my_vn,
                                                    vmi=my_vmi,
                                                    vm=my_vm)
        vn1_fixture = self.setup_fixtures['vn_fixtures']['vn1']
        vn2_fixture = self.setup_fixtures['vn_fixtures']['vn2']
        lr1_fix = self.setup_fixtures['lr_fixtures']['lr1']
        lr1_fix.add_interface([vn1_fixture.vn_id, vn2_fixture.vn_id])

        for spine in self.spines:
            self.setup_fixtures['lr_fixtures']['lr1'].add_physical_router(
                spine.uuid)
        self.logger.debug(
            "Sleeping for 60 secs..after extending LR to Physical Router ...")
        time.sleep(60)
        bms_fixtures = []
        bms = self.inputs.bms_data.keys()[0]
        bms_ip = get_an_ip(vn2_fixture.get_cidrs()[0], offset=100)
        bms_fixtures.append(
            self.create_bms(
                bms_name=bms,
                vn_fixture=vn2_fixture,
                unit=100,
                bms_ip=bms_ip,
                bms_mac=get_random_mac(),
                bms_ip_netmask='24',
                bms_gw_ip=vn2_fixture.get_subnets()[0]['gateway_ip'],
                static_ip=True,
                security_groups=[self.default_sg.uuid]))

        self.logger.info("Modifying SG to allow traffic from BMS to VM...")
        self.allow_default_sg_to_allow_all_on_project(self.inputs.project_name)
        self.logger.info("Modified Default Secutiy Group Rules")

        vm11_fixture = self.setup_fixtures['vm_fixtures']['vm11']
        vm11_ip = vm11_fixture.get_vm_ips()[0]

        self.logger.info("Verify Traffic between BMS and VM")
        for bms_fix in bms_fixtures:
            assert bms_fix.ping_with_certainty(
                vm11_ip), "Traffic from BMS to VM-11 Failed"
        self.logger.info(
            'Will add a new Route-Target to the LR. Traffic between the BMS and VM should continue to pass'
        )
        lr1_fix.add_rt('target:64512:12345')
        self.logger.debug(
            "Sleeping for 30 secs to allow config change to be pushed to the Spine"
        )
        time.sleep(30)

        for bms_fix in bms_fixtures:
            assert bms_fix.ping_with_certainty(
                vm11_ip), "Traffic from BMS to VM-11 failed"
    def test_evpn_type_5_vxlan_traffic_between_vn(self):
        '''
            Configure Encapsulation order as VxLAN, MPLSoverGRE, MPLSoverUDP
            Enable VxLAN Routing under that project settings
            Create Virtual Networks
            Create logical Routers and attach above created VNs
            Create VMs on Virtual Networks
            Verify traffic between accross Virtual Networks

        '''
        bms_vn_fixture = self.create_vn(vn_name='vn100',
                                        vn_subnets=['100.0.0.0/24'])
        self.setup_fixtures = self.setup_evpn_type5(lrs=self.lrs,
                                                    vn=self.vn,
                                                    vmi=self.vmi,
                                                    vm=self.vm)
        lr1_fix = self.setup_fixtures['lr_fixtures']['lr1']
        lr1_fix.add_interface([bms_vn_fixture.vn_id])
        vn1_fixture = self.setup_fixtures['vn_fixtures']['vn1']
        vn2_fixture = self.setup_fixtures['vn_fixtures']['vn2']

        for spine in self.spines:
            self.setup_fixtures['lr_fixtures']['lr1'].add_physical_router(
                spine.uuid)
        self.logger.debug(
            "Sleeping for 60 secs..after extending LR to Physical Router ...")
        time.sleep(60)

        # find out compute nodes those are part of given logical router
        self.lrs['lr1']['node_ip_list'] = set()
        self.lrs['lr2']['node_ip_list'] = set()
        for each_vm in self.setup_fixtures['vm_fixtures']:
            vm_fix = self.setup_fixtures['vm_fixtures'][each_vm]
            for each_lr in self.lrs:
                for each_vn in self.vm[each_vm]['vn']:
                    if each_vn in self.lrs[each_lr]['vn_list']:
                        self.lrs[each_lr]['node_ip_list'].add(
                            vm_fix.vm_node_ip)
        # verify on setup
        for each_lr in self.setup_fixtures['lr_fixtures']:
            lr_fix = self.setup_fixtures['lr_fixtures'][each_lr]
            lr_fix.verify_on_setup(self.lrs[each_lr]['node_ip_list'])

        self.logger.info(
            "Verify Traffic between VN-1 and VN-2 on Logical Router: lr1")
        send_vm_fixture = self.setup_fixtures['vm_fixtures']['vm11']
        recv_vm_fixture = self.setup_fixtures['vm_fixtures']['vm21']
        traffic_result = self.verify_traffic(sender_vm=send_vm_fixture,
                                             receiver_vm=recv_vm_fixture,
                                             proto='udp',
                                             sport=10000,
                                             dport=20000)
        self.logger.info("Traffic Tx-Pkts: %d  Rx-Pkts: %d" %
                         (traffic_result[0], traffic_result[1]))

        assert traffic_result[0] == traffic_result[
            1], "Traffic between VN-1 and VN-2 on Logical Router: lr1 Failed"

        self.logger.info(
            "Verify Traffic between VN-3 and VN-4 on Logical Router: lr2")
        send_vm_fixture = self.setup_fixtures['vm_fixtures']['vm31']
        recv_vm_fixture = self.setup_fixtures['vm_fixtures']['vm41']
        traffic_result = self.verify_traffic(sender_vm=send_vm_fixture,
                                             receiver_vm=recv_vm_fixture,
                                             proto='udp',
                                             sport=10000,
                                             dport=20000)
        self.logger.info("Traffic Tx-Pkts: %d  Rx-Pkts: %d" %
                         (traffic_result[0], traffic_result[1]))
        assert traffic_result[0] == traffic_result[
            1], "Traffic between VN-3 and VN-4 on Logical Router: lr2 Failed"

        bms_fixtures = []
        for bms in self.inputs.bms_data.keys():
            offset = 10 + int(self.inputs.bms_data.keys().index(bms))
            bms_ip = get_an_ip(bms_vn_fixture.get_cidrs()[0], offset=offset)
            bms_fixtures.append(
                self.create_bms(bms_name=bms,
                                vn_fixture=bms_vn_fixture,
                                unit=100,
                                bms_ip=bms_ip,
                                bms_mac=get_random_mac(),
                                bms_ip_netmask='24',
                                bms_gw_ip='100.0.0.1',
                                static_ip=True,
                                security_groups=[self.default_sg.uuid]))

        self.logger.info("Modifying SG to allow traffic from BMS to VM...")
        self.allow_default_sg_to_allow_all_on_project(self.inputs.project_name)
        self.logger.info("Modified Default Secutiy Group Rules")

        vm11_fixture = self.setup_fixtures['vm_fixtures']['vm11']
        vm21_fixture = self.setup_fixtures['vm_fixtures']['vm21']
        vm11_ip = vm11_fixture.get_vm_ips()[0]
        vm21_ip = vm21_fixture.get_vm_ips()[0]

        self.logger.info(
            "Verify Traffic between BMS and (vn1, vn2) Logical Router: lr1")
        for bms_fix in bms_fixtures:
            assert bms_fix.ping_with_certainty(
                vm11_ip), "Traffic from BMS to VM-11 Failed"
            assert bms_fix.ping_with_certainty(
                vm21_ip), "Traffic from BMS to VM-21 Failed"