예제 #1
0
def l3tc_vrfipv4v6_address_confed_bgp_check(config_type='all'):
    st.banner("BGP Neighbor Checking in confederation topology")

    result = True
    if config_type == 'ipv4' or config_type == 'all':
        #Check link between DUT 1----DUT2 and DUT2----DUT3
        neigh_list = []
        neigh_list.append(topo['D2D3P1_neigh_ipv4'])
        neigh_list.append(topo['D2D1P1_neigh_ipv4'])
        neigh_list = list(set(neigh_list))
        if not bgpapi.verify_bgp_summary(topo['dut_list'][1],
                                         family='ipv4',
                                         neighbor=neigh_list,
                                         state='Established'):
            st.log("{} - Neighbor {} is failed to Establish".format(
                topo['dut_list'][1], neigh_list))
            result = False

        #Check link between DUT3----DUT4
        if not bgpapi.verify_bgp_summary(topo['dut_list'][2],
                                         family='ipv4',
                                         neighbor=topo['D3D4P1_neigh_ipv4'],
                                         state='Established'):
            st.log("{} - Neighbor {} is failed to Establish".format(
                topo['dut_list'][2], topo['D3D4P1_neigh_ipv4']))
            result = False

    if config_type == 'ipv6' or config_type == 'all':
        #Check link between DUT 1----DUT2 and DUT2----DUT3
        neigh_list = []
        neigh_list.append(topo['D2D3P1_neigh_ipv6'])
        neigh_list.append(topo['D2D1P1_neigh_ipv6'])
        neigh_list = list(set(neigh_list))
        if not bgpapi.verify_bgp_summary(topo['dut_list'][1],
                                         family='ipv6',
                                         neighbor=neigh_list,
                                         state='Established'):
            st.log("{} - Neighbor {} is failed to Establish".format(
                topo['dut_list'][1], neigh_list))
            result = False

        #Check link between DUT3----DUT4
        if not bgpapi.verify_bgp_summary(topo['dut_list'][2],
                                         family='ipv6',
                                         neighbor=topo['D3D4P1_neigh_ipv6'],
                                         state='Established'):
            st.log("{} - Neighbor {} is failed to Establish".format(
                topo['dut_list'][2], topo['D3D4P1_neigh_ipv6']))
            result = False
    return result
예제 #2
0
def test_ft_bgp_ebgp_multihop_4byteASN():
    """

    Verify the functioning of ebgp multihop command with 4 byte ASN
    """
    #On DUT1 and DUT3, create BGP with 4byte ASN
    dut1_as = 6500001
    dut1 = topo['dut_list'][0]
    dut3_as = 6500002
    dut3 = topo['dut_list'][2]

    #Configure bgp on DUT1 and add DUT3 as neighbor with ebgp-multihop ttl set to 5
    bgpapi.config_bgp(dut1,
                      local_as=dut1_as,
                      neighbor=topo['D3D2P1_ipv4'],
                      remote_as=dut3_as,
                      config_type_list=["neighbor", "ebgp_mhop"],
                      ebgp_mhop='5')
    #Add static route to DUT3 neighbor
    ipapi.create_static_route(dut1, topo['D1D2P1_neigh_ipv4'],
                              "{}/24".format(topo['D3D2P1_ipv4']))
    #Configure bgp on DUT3 and add DUT1 as neighbor with ebgp-multihop ttl set to 5
    bgpapi.config_bgp(dut3,
                      local_as=dut3_as,
                      neighbor=topo['D1D2P1_ipv4'],
                      remote_as=dut1_as,
                      config_type_list=["neighbor", "ebgp_mhop"],
                      ebgp_mhop='5')
    #Add static route to DUT1 neighbor
    ipapi.create_static_route(dut3, topo['D3D2P1_neigh_ipv4'],
                              "{}/24".format(topo['D1D2P1_ipv4']))

    result = bgpapi.verify_bgp_summary(dut1,
                                       family='ipv4',
                                       neighbor=topo['D3D2P1_ipv4'],
                                       state='Established')

    #Clear applied configs
    bgpapi.cleanup_router_bgp(dut1)
    bgpapi.cleanup_router_bgp(dut3)
    ipapi.delete_static_route(dut1, topo['D1D2P1_neigh_ipv4'],
                              "{}/24".format(topo['D3D2P1_ipv4']))
    ipapi.delete_static_route(dut3, topo['D3D2P1_neigh_ipv4'],
                              "{}/24".format(topo['D1D2P1_ipv4']))

    if result:
        st.report_pass("test_case_passed")
    else:
        st.report_fail("test_case_failed")
예제 #3
0
def fixture_v4(request):
	global h1
	global h2
	global ctrl_start
	global ctrl_stop
	global bgp_rtr1
	st.log("Test Fixture Config.")
	# TG ports reset
	st.log("Resetting the TG ports")
	tgapi.traffic_action_control(tg_handler, actions=['reset'])

	# TG protocol interface creation
	st.log("TG protocol interface creation")
	h1 = tg.tg_interface_config(port_handle=tg_handler["tg_ph_1"], mode='config',intf_ip_addr=data.tg_to_dut1_port_1_ip,gateway=data.dut1_to_tg_port_1_ip,arp_send_req='1')
	st.log("INTFCONF: "+str(h1))
	h2 = tg.tg_interface_config(port_handle=tg_handler["tg_ph_2"], mode='config',intf_ip_addr=data.tg_to_dut4_port_1_ip,gateway=data.dut4_to_tg_port_1_ip,arp_send_req='1')
	st.log("INTFCONF: "+str(h2))

	# Configuring BGP on TG interface
	conf_var = {'mode':'enable', 'active_connect_enable':'1', 'local_as':data.remote_as_num1, 'remote_as':data.as_num_1, 'remote_ip_addr':data.dut1_to_tg_port_1_ip}
	route_var = {'mode':'add', 'num_routes':data.test_bgp_route_count, 'prefix':'121.1.1.0', 'as_path':'as_seq:1'}
	ctrl_start = {'mode':'start'}
	ctrl_stop = {'mode':'stop'}

	# Starting the BGP router on TG.
	bgp_rtr1 = tgapi.tg_bgp_config(tg=tg, handle=h1['handle'], conf_var=conf_var, route_var = route_var, ctrl_var=ctrl_start)
	st.log("BGP_HANDLE: "+str(bgp_rtr1))

	# Verifying the BGP neighborship
	st.wait(10)
	st.log("Verifying the BGP neighborships.")
	if not bgpfeature.verify_bgp_summary(dut1, neighbor=data.tg_to_dut1_port_1_ip, state='Established'):
		st.report_fail("bgp_ip_peer_establish_fail", data.tg_to_dut1_port_1_ip)

	yield
	st.log("Test Fixture Cleanup.")
	# Startup the routing interface link.
	if not interface_obj.interface_operation(dut2, dut2_to_dut4_port_1, "startup"):
		st.report_fail('interface_admin_startup_fail', dut2_to_dut4_port_1)
	if not interface_obj.interface_operation(dut3, dut3_to_dut1_port_1, "startup"):
		st.report_fail('interface_admin_startup_fail', dut3_to_dut1_port_1)

	tg.tg_interface_config(port_handle=tg_handler["tg_ph_1"], handle=h1['handle'], mode='destroy')
	tg.tg_interface_config(port_handle=tg_handler["tg_ph_2"], handle=h2['handle'], mode='destroy')
예제 #4
0
def fixture_v6(request):
    global h1, h2, bgp_rtr2

    st.log("Test Fixture Config.")
    # TG ports reset
    st.log("Resetting the TG ports")
    tgapi.traffic_action_control(tg_handler, actions=['reset'])

    # TG protocol interface creation
    st.log("TG protocol interface creation")
    h1 = tg.tg_interface_config(port_handle=tg_handler["tg_ph_1"],
                                mode='config',
                                ipv6_intf_addr=data.neigh_ipv6_addr,
                                ipv6_prefix_length=64,
                                ipv6_gateway=data.my_ipv6_addr,
                                arp_send_req='1')
    st.log("INTFCONF: " + str(h1))
    h2 = tg.tg_interface_config(port_handle=tg_handler["tg_ph_2"],
                                mode='config',
                                ipv6_intf_addr=data.neigh_ipv6_addr2,
                                ipv6_prefix_length=64,
                                ipv6_gateway=data.intf_ipv6_addr,
                                arp_send_req='1')
    st.log("INTFCONF: " + str(h2))

    # Configuring BGP on TG interface
    conf_var = {
        'mode': 'enable',
        'ip_version': '6',
        'active_connect_enable': '1',
        'local_as': data.remote_as_num,
        'remote_as': data.as_num,
        'remote_ipv6_addr': data.my_ipv6_addr
    }
    route_var = {
        'mode': 'add',
        'ip_version': '6',
        'num_routes': data.test_bgp_route_count,
        'prefix': '3300:1::',
        'as_path': 'as_seq:1'
    }

    # Starting the BGP router on TG.
    bgp_rtr2 = tgapi.tg_bgp_config(tg=tg,
                                   handle=h1['handle'],
                                   conf_var=conf_var,
                                   route_var=route_var,
                                   ctrl_var=ctrl_start)
    st.log("BGP_HANDLE: " + str(bgp_rtr2))

    # Verifying the BGP neighborship
    st.wait(10)
    st.log("Verifying the BGP neighborship.")
    if not bgpfeature.verify_bgp_summary(
            dut, family='ipv6', neighbor=data.neigh_ipv6_addr,
            state='Established'):
        st.report_fail("bgp_ip6_peer_establish_fail", data.neigh_ip_addr)

    yield
    st.log("Test Fixture Cleanup.")
    tg.tg_interface_config(port_handle=tg_handler["tg_ph_1"],
                           handle=h1['handle'],
                           mode='destroy')
    tg.tg_interface_config(port_handle=tg_handler["tg_ph_2"],
                           handle=h2['handle'],
                           mode='destroy')
예제 #5
0
def measure_v4_route_scale_time(route_count, show_flag):
    vars = st.get_testbed_vars()
    dut = vars.D1
    default_route = 0
    #TG pumps 512k per sec so to make measure route install
    #time more accurate we start from 600k + route_count
    #base_route_count = 60000 + route_count
    base_route_count = route_count

    ipfeature.clear_ip_configuration(st.get_dut_names())
    ipfeature.clear_ip_configuration(st.get_dut_names(), 'ipv6')

    member3 = vars.D1T1P1
    member4 = vars.D1T1P2
    ipfeature.config_ip_addr_interface(dut,
                                       member3,
                                       data.my_ip_addr,
                                       data.ip_prefixlen,
                                       family="ipv4")
    ipfeature.config_ip_addr_interface(dut,
                                       member4,
                                       data.intf_ip_addr,
                                       data.ip_prefixlen,
                                       family="ipv4")

    ipfeature.get_interface_ip_address(dut, family="ipv4")
    ipfeature.show_ip_route(dut)
    interface_status_show(dut)

    bgpfeature.create_bgp_router(dut, data.as_num, '')
    bgpfeature.create_bgp_neighbor(dut, data.as_num, data.neigh_ip_addr,
                                   data.remote_as_num)

    (tg1, tg2, tg_ph_1, tg_ph_2) = get_handles()

    tg1.tg_traffic_control(action='reset', port_handle=tg_ph_1)
    tg2.tg_traffic_control(action='reset', port_handle=tg_ph_2)

    h1 = tg1.tg_interface_config(port_handle=tg_ph_1,
                                 mode='config',
                                 intf_ip_addr='10.10.10.2',
                                 gateway='10.10.10.1',
                                 src_mac_addr='00:0a:01:00:00:01',
                                 arp_send_req='1')
    st.log("INTFCONF: " + str(h1))
    h2 = tg2.tg_interface_config(port_handle=tg_ph_2,
                                 mode='config',
                                 intf_ip_addr='20.20.20.2',
                                 gateway='20.20.20.1',
                                 arp_send_req='1')
    st.log("INTFCONF: " + str(h2))

    conf_var = {
        'mode': 'enable',
        'active_connect_enable': '1',
        'local_as': '200',
        'remote_as': '100',
        'remote_ip_addr': '10.10.10.1'
    }
    route_var = {
        'mode': 'add',
        'num_routes': base_route_count,
        'prefix': '121.1.1.0',
        'as_path': 'as_seq:1'
    }
    ctrl_start = {'mode': 'start'}
    ctrl_stop = {'mode': 'stop'}

    # Configuring the BGP router.
    bgp_rtr1 = tgapi.tg_bgp_config(tg=tg1,
                                   handle=h1['handle'],
                                   conf_var=conf_var,
                                   route_var=route_var,
                                   ctrl_var=ctrl_start)

    st.log("BGP_HANDLE: " + str(bgp_rtr1))
    # Verified at neighbor.
    st.log("BGP neighborship established.")
    st.wait(10)

    tr1 = tg2.tg_traffic_config(
        port_handle=tg_ph_2,
        emulation_src_handle=h2['handle'],
        emulation_dst_handle=bgp_rtr1['route'][0]['handle'],
        circuit_endpoint_type='ipv4',
        mode='create',
        transmit_mode='continuous',
        length_mode='fixed',
        rate_pps=512000,
        enable_stream_only_gen='0')

    retval = bgpfeature.verify_bgp_summary(dut,
                                           neighbor=data.neigh_ip_addr,
                                           state='Established')

    if retval is True:
        output = bcm_show(dut, 'bcmcmd "l3 defip show" | wc -l')
        st.log(output)
        default_route = parse_route_output(output)

    route_count += default_route

    cmd = 'bcmcmd "l3 defip show" | wc -l'
    measure_route_learn_time(dut, default_route, route_count, cmd)

    if (show_flag):
        cmd = "time show ip route"
        bcm_show(dut, cmd)
        data.result_14_3 = True

    res = tg2.tg_traffic_control(action='stop', handle=tr1['stream_id'])
    st.log("TR_CTRL: " + str(res))
    tgapi.tg_bgp_config(tg=tg1,
                        handle=bgp_rtr1['conf']['handle'],
                        ctrl_var=ctrl_stop)
    ipfeature.delete_ip_interface(dut,
                                  member4,
                                  data.intf_ip_addr,
                                  data.ip_prefixlen,
                                  family="ipv4")
    ipfeature.delete_ip_interface(dut,
                                  member3,
                                  data.my_ip_addr,
                                  data.ip_prefixlen,
                                  family="ipv4")
    bgpfeature.delete_bgp_neighbor(dut, data.as_num, data.neigh_ip_addr,
                                   data.remote_as_num)
    delete_bgp_router(dut, '', data.as_num)

    tg2.tg_traffic_control(action='reset', port_handle=tg_ph_2)
    tg1.tg_interface_config(port_handle=tg_ph_1,
                            handle=h1['handle'],
                            mode='destroy')
    tg2.tg_interface_config(port_handle=tg_ph_2,
                            handle=h2['handle'],
                            mode='destroy')
    st.wait(20)
예제 #6
0
def l3_performance_enhancements_module_hooks(request):
	global vars
	global tg_handler
	global tg
	global dut1
	global dut2
	global dut3
	global dut4
	global dut1_to_tg_port_1
	global dut1_to_dut2_port_1
	global dut2_to_dut1_port_1
	global dut1_to_dut3_port_1
	global dut3_to_dut1_port_1
	global dut2_to_dut4_port_1
	global dut4_to_dut2_port_1
	global dut3_to_dut4_port_1
	global dut4_to_dut3_port_1
	global dut4_to_tg_port_1
	global hwsku_under_test1
	global hwsku_under_test2
	global hwsku_under_test3
	global hwsku_under_test4
	global def_v4_route_count_d1
	global def_v4_route_count_d4
	global def_v6_route_count_d1
	global def_v6_route_count_d4
	# Min topology verification
	st.log("Ensuring minimum topology")
	vars = st.ensure_min_topology("D1D2:1", "D1D3:1", "D2D4:1", "D3D4:1", "D1T1:1", "D4T1:1")

	# Initialize TG and TG port handlers
	tg_handler = tgapi.get_handles(vars, [vars.T1D1P1, vars.T1D4P1])
	tg = tg_handler["tg"]

	# Test setup details
	dut1 = vars.D1
	dut2 = vars.D2
	dut3 = vars.D3
	dut4 = vars.D4
	dut1_to_tg_port_1 = vars.D1T1P1
	dut1_to_dut2_port_1 = vars.D1D2P1
	dut2_to_dut1_port_1 = vars.D2D1P1
	dut1_to_dut3_port_1 = vars.D1D3P1
	dut3_to_dut1_port_1 = vars.D3D1P1
	dut2_to_dut4_port_1 = vars.D2D4P1
	dut4_to_dut2_port_1 = vars.D4D2P1
	dut3_to_dut4_port_1 = vars.D3D4P1
	dut4_to_dut3_port_1 = vars.D4D3P1
	dut4_to_tg_port_1 = vars.D4T1P1
	hwsku_under_test1 = basic_obj.get_hwsku(dut1)
	hwsku_under_test2 = basic_obj.get_hwsku(dut2)
	hwsku_under_test3 = basic_obj.get_hwsku(dut3)
	hwsku_under_test4 = basic_obj.get_hwsku(dut4)

	# Module Configuration
	st.log("L3 Performance Enhancements Module Configuration.")
	# Configuring v4/v6 routing interfaces on the DUT.
	st.log("Configuring IPv4 routing interfaces.")
	ipfeature.config_ip_addr_interface(dut1, dut1_to_tg_port_1, data.dut1_to_tg_port_1_ip, data.ip_prefixlen, family="ipv4")
	ipfeature.config_ip_addr_interface(dut1, dut1_to_dut2_port_1, data.dut1_to_dut2_port_1_ip, data.ip_prefixlen, family="ipv4")
	ipfeature.config_ip_addr_interface(dut1, dut1_to_dut3_port_1, data.dut1_to_dut3_port_1_ip, data.ip_prefixlen, family="ipv4")
	ipfeature.config_ip_addr_interface(dut2, dut2_to_dut1_port_1, data.dut2_to_dut1_port_1_ip, data.ip_prefixlen, family="ipv4")
	ipfeature.config_ip_addr_interface(dut2, dut2_to_dut4_port_1, data.dut2_to_dut4_port_1_ip, data.ip_prefixlen, family="ipv4")
	ipfeature.config_ip_addr_interface(dut3, dut3_to_dut1_port_1, data.dut3_to_dut1_port_1_ip, data.ip_prefixlen, family="ipv4")
	ipfeature.config_ip_addr_interface(dut3, dut3_to_dut4_port_1, data.dut3_to_dut4_port_1_ip, data.ip_prefixlen, family="ipv4")
	ipfeature.config_ip_addr_interface(dut4, dut4_to_dut2_port_1, data.dut4_to_dut2_port_1_ip, data.ip_prefixlen, family="ipv4")
	ipfeature.config_ip_addr_interface(dut4, dut4_to_dut3_port_1, data.dut4_to_dut3_port_1_ip, data.ip_prefixlen, family="ipv4")
	ipfeature.config_ip_addr_interface(dut4, dut4_to_tg_port_1, data.dut4_to_tg_port_1_ip, data.ip_prefixlen, family="ipv4")

	st.log("Configuring IPv6 routing interfaces.")
	ipfeature.config_ipv6(dut1, action='enable')
	ipfeature.config_ip_addr_interface(dut1, dut1_to_tg_port_1, data.dut1_to_tg_port_1_ip6, data.ipv6_prefixlen, family="ipv6")
	ipfeature.config_ip_addr_interface(dut1, dut1_to_dut2_port_1, data.dut1_to_dut2_port_1_ip6, data.ipv6_prefixlen, family="ipv6")
	ipfeature.config_ip_addr_interface(dut1, dut1_to_dut3_port_1, data.dut1_to_dut3_port_1_ip6, data.ipv6_prefixlen, family="ipv6")
	ipfeature.config_ipv6(dut2, action='enable')
	ipfeature.config_ip_addr_interface(dut2, dut2_to_dut1_port_1, data.dut2_to_dut1_port_1_ip6, data.ipv6_prefixlen, family="ipv6")
	ipfeature.config_ip_addr_interface(dut2, dut2_to_dut4_port_1, data.dut2_to_dut4_port_1_ip6, data.ipv6_prefixlen, family="ipv6")
	ipfeature.config_ipv6(dut3, action='enable')
	ipfeature.config_ip_addr_interface(dut3, dut3_to_dut1_port_1, data.dut3_to_dut1_port_1_ip6, data.ipv6_prefixlen, family="ipv6")
	ipfeature.config_ip_addr_interface(dut3, dut3_to_dut4_port_1, data.dut3_to_dut4_port_1_ip6, data.ipv6_prefixlen, family="ipv6")
	ipfeature.config_ipv6(dut4, action='enable')
	ipfeature.config_ip_addr_interface(dut4, dut4_to_dut2_port_1, data.dut4_to_dut2_port_1_ip6, data.ipv6_prefixlen, family="ipv6")
	ipfeature.config_ip_addr_interface(dut4, dut4_to_dut3_port_1, data.dut4_to_dut3_port_1_ip6, data.ipv6_prefixlen, family="ipv6")
	ipfeature.config_ip_addr_interface(dut4, dut4_to_tg_port_1, data.dut4_to_tg_port_1_ip6, data.ipv6_prefixlen, family="ipv6")

	# Configuring BGP router and v4/v6 neighbors on the DUT.
	st.log("Configuring BGP routers.")
	bgpfeature.create_bgp_router(dut1, data.as_num_1, '')
	bgpfeature.create_bgp_router(dut2, data.as_num_2, '')
	bgpfeature.create_bgp_router(dut3, data.as_num_3, '')
	bgpfeature.create_bgp_router(dut4, data.as_num_4, '')

	st.log("Configuring BGP IPv4 neighbors.")
	bgpfeature.create_bgp_neighbor(dut1, data.as_num_1, data.tg_to_dut1_port_1_ip, data.remote_as_num1)
	bgpfeature.create_bgp_neighbor(dut1, data.as_num_1, data.dut2_to_dut1_port_1_ip, data.as_num_2)
	bgpfeature.create_bgp_neighbor(dut1, data.as_num_1, data.dut3_to_dut1_port_1_ip, data.as_num_3)
	bgpfeature.create_bgp_neighbor(dut2, data.as_num_2, data.dut1_to_dut2_port_1_ip, data.as_num_1)
	bgpfeature.create_bgp_neighbor(dut2, data.as_num_2, data.dut4_to_dut2_port_1_ip, data.as_num_4)
	bgpfeature.create_bgp_neighbor(dut3, data.as_num_3, data.dut1_to_dut3_port_1_ip, data.as_num_1)
	bgpfeature.create_bgp_neighbor(dut3, data.as_num_3, data.dut4_to_dut3_port_1_ip, data.as_num_4)
	bgpfeature.create_bgp_neighbor(dut4, data.as_num_4, data.dut2_to_dut4_port_1_ip, data.as_num_2)
	bgpfeature.create_bgp_neighbor(dut4, data.as_num_4, data.dut3_to_dut4_port_1_ip, data.as_num_3)

	st.log("Configuring BGP IPv6 neighbors.")
	bgpfeature.create_bgp_neighbor(dut1, data.as_num_1, data.tg_to_dut1_port_1_ip6, data.remote_as_num1, family="ipv6")
	bgpfeature.create_bgp_neighbor(dut1, data.as_num_1, data.dut2_to_dut1_port_1_ip6, data.as_num_2, family="ipv6")
	bgpfeature.create_bgp_neighbor(dut1, data.as_num_1, data.dut3_to_dut1_port_1_ip6, data.as_num_3, family="ipv6")
	bgpfeature.create_bgp_neighbor(dut2, data.as_num_2, data.dut1_to_dut2_port_1_ip6, data.as_num_1, family="ipv6")
	bgpfeature.create_bgp_neighbor(dut2, data.as_num_2, data.dut4_to_dut2_port_1_ip6, data.as_num_4, family="ipv6")
	bgpfeature.create_bgp_neighbor(dut3, data.as_num_3, data.dut1_to_dut3_port_1_ip6, data.as_num_1, family="ipv6")
	bgpfeature.create_bgp_neighbor(dut3, data.as_num_3, data.dut4_to_dut3_port_1_ip6, data.as_num_4, family="ipv6")
	bgpfeature.create_bgp_neighbor(dut4, data.as_num_4, data.dut2_to_dut4_port_1_ip6, data.as_num_2, family="ipv6")
	bgpfeature.create_bgp_neighbor(dut4, data.as_num_4, data.dut3_to_dut4_port_1_ip6, data.as_num_3, family="ipv6")

	# st.log("Configuring BGP as-path multipath-relax.")
	bgpfeature.create_bgp_best_path(dut1, data.as_num_1, "as-path multipath-relax")
	bgpfeature.create_bgp_best_path(dut2, data.as_num_2, "as-path multipath-relax")
	bgpfeature.create_bgp_best_path(dut3, data.as_num_3, "as-path multipath-relax")
	bgpfeature.create_bgp_best_path(dut4, data.as_num_4, "as-path multipath-relax")

	# Get the default route count from DUT
	def_v4_route_count_d1 = asicapi.bcmcmd_route_count_hardware(dut1)
	def_v4_route_count_d4 = asicapi.bcmcmd_route_count_hardware(dut4)
	def_v6_route_count_d1 = asicapi.bcmcmd_ipv6_route_count_hardware(dut1)
	def_v6_route_count_d4 = asicapi.bcmcmd_ipv6_route_count_hardware(dut4)

	# Verifying the BGP neighborship
	st.wait(20)
	st.log("Verifying the BGP IPv4 neighborships.")
	if not poll_wait(bgpfeature.verify_bgp_summary, 120, dut1, neighbor=data.dut2_to_dut1_port_1_ip,state='Established'):
		st.report_fail("bgp_ip_peer_establish_fail", data.dut2_to_dut1_port_1_ip)
	if not poll_wait(bgpfeature.verify_bgp_summary, 120, dut1, neighbor=data.dut3_to_dut1_port_1_ip,state='Established'):
		st.report_fail("bgp_ip_peer_establish_fail", data.dut3_to_dut1_port_1_ip)
	if not poll_wait(bgpfeature.verify_bgp_summary, 120, dut2, neighbor=data.dut1_to_dut2_port_1_ip,state='Established'):
		st.report_fail("bgp_ip_peer_establish_fail", data.dut1_to_dut2_port_1_ip)
	if not poll_wait(bgpfeature.verify_bgp_summary, 120, dut2, neighbor=data.dut4_to_dut2_port_1_ip,state='Established'):
		st.report_fail("bgp_ip_peer_establish_fail", data.dut4_to_dut2_port_1_ip)
	# if not bgpfeature.verify_bgp_summary(dut1, neighbor=data.dut2_to_dut1_port_1_ip, state='Established'):
	# 	st.report_fail("bgp_ip_peer_establish_fail", data.dut2_to_dut1_port_1_ip)
	# if not bgpfeature.verify_bgp_summary(dut1, neighbor=data.dut3_to_dut1_port_1_ip, state='Established'):
	# 	st.report_fail("bgp_ip_peer_establish_fail", data.dut3_to_dut1_port_1_ip)
	# if not bgpfeature.verify_bgp_summary(dut2, neighbor=data.dut1_to_dut2_port_1_ip, state='Established'):
	# 	st.report_fail("bgp_ip_peer_establish_fail", data.dut1_to_dut2_port_1_ip)
	# if not bgpfeature.verify_bgp_summary(dut2, neighbor=data.dut4_to_dut2_port_1_ip, state='Established'):
	# 	st.report_fail("bgp_ip_peer_establish_fail", data.dut4_to_dut2_port_1_ip)
	if not bgpfeature.verify_bgp_summary(dut3, neighbor=data.dut1_to_dut3_port_1_ip, state='Established'):
		st.report_fail("bgp_ip_peer_establish_fail", data.dut1_to_dut3_port_1_ip)
	if not bgpfeature.verify_bgp_summary(dut3, neighbor=data.dut4_to_dut3_port_1_ip, state='Established'):
		st.report_fail("bgp_ip_peer_establish_fail", data.dut4_to_dut3_port_1_ip)
	if not bgpfeature.verify_bgp_summary(dut4, neighbor=data.dut2_to_dut4_port_1_ip, state='Established'):
		st.report_fail("bgp_ip_peer_establish_fail", data.dut2_to_dut4_port_1_ip)
	if not bgpfeature.verify_bgp_summary(dut4, neighbor=data.dut3_to_dut4_port_1_ip, state='Established'):
		st.report_fail("bgp_ip_peer_establish_fail", data.dut3_to_dut4_port_1_ip)

	st.log("Verifying the BGP IPv6 neighborships.")
	if not bgpfeature.verify_bgp_summary(dut1, family='ipv6', neighbor=data.dut2_to_dut1_port_1_ip6, state='Established'):
		st.report_fail("bgp_ip_peer_establish_fail", data.dut2_to_dut1_port_1_ip6)
	if not bgpfeature.verify_bgp_summary(dut1, family='ipv6', neighbor=data.dut3_to_dut1_port_1_ip6, state='Established'):
		st.report_fail("bgp_ip_peer_establish_fail", data.dut3_to_dut1_port_1_ip6)
	if not bgpfeature.verify_bgp_summary(dut2, family='ipv6', neighbor=data.dut1_to_dut2_port_1_ip6, state='Established'):
		st.report_fail("bgp_ip_peer_establish_fail", data.dut1_to_dut2_port_1_ip6)
	if not bgpfeature.verify_bgp_summary(dut2, family='ipv6', neighbor=data.dut4_to_dut2_port_1_ip6, state='Established'):
		st.report_fail("bgp_ip_peer_establish_fail", data.dut4_to_dut2_port_1_ip6)
	if not bgpfeature.verify_bgp_summary(dut3, family='ipv6', neighbor=data.dut1_to_dut3_port_1_ip6, state='Established'):
		st.report_fail("bgp_ip_peer_establish_fail", data.dut1_to_dut3_port_1_ip6)
	if not bgpfeature.verify_bgp_summary(dut3, family='ipv6', neighbor=data.dut4_to_dut3_port_1_ip6, state='Established'):
		st.report_fail("bgp_ip_peer_establish_fail", data.dut4_to_dut3_port_1_ip6)
	if not bgpfeature.verify_bgp_summary(dut4, family='ipv6', neighbor=data.dut2_to_dut4_port_1_ip6, state='Established'):
		st.report_fail("bgp_ip_peer_establish_fail", data.dut2_to_dut4_port_1_ip6)
	if not bgpfeature.verify_bgp_summary(dut4, family='ipv6', neighbor=data.dut3_to_dut4_port_1_ip6, state='Established'):
		st.report_fail("bgp_ip_peer_establish_fail", data.dut3_to_dut4_port_1_ip6)

	yield
	# Module Cleanup
	st.log("L3 Performance Enhancements Module Cleanup.")
	st.log("Unconfiguring IPv4 routing interfaces.")
	ipfeature.delete_ip_interface(dut1, dut1_to_tg_port_1, data.dut1_to_tg_port_1_ip, data.ip_prefixlen, family="ipv4")
	ipfeature.delete_ip_interface(dut1, dut1_to_dut2_port_1, data.dut1_to_dut2_port_1_ip, data.ip_prefixlen, family="ipv4")
	ipfeature.delete_ip_interface(dut1, dut1_to_dut3_port_1, data.dut1_to_dut3_port_1_ip, data.ip_prefixlen, family="ipv4")
	ipfeature.delete_ip_interface(dut2, dut2_to_dut1_port_1, data.dut2_to_dut1_port_1_ip, data.ip_prefixlen, family="ipv4")
	ipfeature.delete_ip_interface(dut2, dut2_to_dut4_port_1, data.dut2_to_dut4_port_1_ip, data.ip_prefixlen, family="ipv4")
	ipfeature.delete_ip_interface(dut3, dut3_to_dut1_port_1, data.dut3_to_dut1_port_1_ip, data.ip_prefixlen, family="ipv4")
	ipfeature.delete_ip_interface(dut3, dut3_to_dut4_port_1, data.dut3_to_dut4_port_1_ip, data.ip_prefixlen, family="ipv4")
	ipfeature.delete_ip_interface(dut4, dut4_to_dut2_port_1, data.dut4_to_dut2_port_1_ip, data.ip_prefixlen, family="ipv4")
	ipfeature.delete_ip_interface(dut4, dut4_to_dut3_port_1, data.dut4_to_dut3_port_1_ip, data.ip_prefixlen, family="ipv4")
	ipfeature.delete_ip_interface(dut4, dut4_to_tg_port_1, data.dut4_to_tg_port_1_ip, data.ip_prefixlen, family="ipv4")

	st.log("Unconfiguring IPv6 routing interfaces.")
	ipfeature.delete_ip_interface(dut1, dut1_to_tg_port_1, data.dut1_to_tg_port_1_ip6, data.ipv6_prefixlen, family="ipv6")
	ipfeature.delete_ip_interface(dut1, dut1_to_dut2_port_1, data.dut1_to_dut2_port_1_ip6, data.ipv6_prefixlen, family="ipv6")
	ipfeature.delete_ip_interface(dut1, dut1_to_dut3_port_1, data.dut1_to_dut3_port_1_ip6, data.ipv6_prefixlen, family="ipv6")
	ipfeature.delete_ip_interface(dut2, dut2_to_dut1_port_1, data.dut2_to_dut1_port_1_ip6, data.ipv6_prefixlen, family="ipv6")
	ipfeature.delete_ip_interface(dut2, dut2_to_dut4_port_1, data.dut2_to_dut4_port_1_ip6, data.ipv6_prefixlen, family="ipv6")
	ipfeature.delete_ip_interface(dut3, dut3_to_dut1_port_1, data.dut3_to_dut1_port_1_ip6, data.ipv6_prefixlen, family="ipv6")
	ipfeature.delete_ip_interface(dut3, dut3_to_dut4_port_1, data.dut3_to_dut4_port_1_ip6, data.ipv6_prefixlen, family="ipv6")
	ipfeature.delete_ip_interface(dut4, dut4_to_dut2_port_1, data.dut4_to_dut2_port_1_ip6, data.ipv6_prefixlen, family="ipv6")
	ipfeature.delete_ip_interface(dut4, dut4_to_dut3_port_1, data.dut4_to_dut3_port_1_ip6, data.ipv6_prefixlen, family="ipv6")
	ipfeature.delete_ip_interface(dut4, dut4_to_tg_port_1, data.dut4_to_tg_port_1_ip6, data.ipv6_prefixlen, family="ipv6")

	st.log("Unconfiguring BGP IPv4 neighbors.")
	bgpfeature.delete_bgp_neighbor(dut1, data.as_num_1, data.tg_to_dut1_port_1_ip, data.remote_as_num1)
	bgpfeature.delete_bgp_neighbor(dut1, data.as_num_1, data.dut2_to_dut1_port_1_ip, data.as_num_2)
	bgpfeature.delete_bgp_neighbor(dut1, data.as_num_1, data.dut3_to_dut1_port_1_ip, data.as_num_3)
	bgpfeature.delete_bgp_neighbor(dut2, data.as_num_2, data.dut1_to_dut2_port_1_ip, data.as_num_1)
	bgpfeature.delete_bgp_neighbor(dut2, data.as_num_2, data.dut4_to_dut2_port_1_ip, data.as_num_4)
	bgpfeature.delete_bgp_neighbor(dut3, data.as_num_3, data.dut1_to_dut3_port_1_ip, data.as_num_1)
	bgpfeature.delete_bgp_neighbor(dut3, data.as_num_3, data.dut4_to_dut3_port_1_ip, data.as_num_4)
	bgpfeature.delete_bgp_neighbor(dut4, data.as_num_4, data.dut2_to_dut4_port_1_ip, data.as_num_2)
	bgpfeature.delete_bgp_neighbor(dut4, data.as_num_4, data.dut3_to_dut4_port_1_ip, data.as_num_3)

	st.log("Unconfiguring BGP IPv6 neighbors.")
	bgpfeature.delete_bgp_neighbor(dut1, data.as_num_1, data.tg_to_dut1_port_1_ip6, data.remote_as_num1)
	bgpfeature.delete_bgp_neighbor(dut1, data.as_num_1, data.dut2_to_dut1_port_1_ip6, data.as_num_2)
	bgpfeature.delete_bgp_neighbor(dut1, data.as_num_1, data.dut3_to_dut1_port_1_ip6, data.as_num_3)
	bgpfeature.delete_bgp_neighbor(dut2, data.as_num_2, data.dut1_to_dut2_port_1_ip6, data.as_num_1)
	bgpfeature.delete_bgp_neighbor(dut2, data.as_num_2, data.dut4_to_dut2_port_1_ip6, data.as_num_4)
	bgpfeature.delete_bgp_neighbor(dut3, data.as_num_3, data.dut1_to_dut3_port_1_ip6, data.as_num_1)
	bgpfeature.delete_bgp_neighbor(dut3, data.as_num_3, data.dut4_to_dut3_port_1_ip6, data.as_num_4)
	bgpfeature.delete_bgp_neighbor(dut4, data.as_num_4, data.dut2_to_dut4_port_1_ip6, data.as_num_2)
	bgpfeature.delete_bgp_neighbor(dut4, data.as_num_4, data.dut3_to_dut4_port_1_ip6, data.as_num_3)

	st.log("Unconfiguring BGP routers.")
	bgpfeature.cleanup_router_bgp(dut1)
	bgpfeature.cleanup_router_bgp(dut2)
	bgpfeature.cleanup_router_bgp(dut3)
	bgpfeature.cleanup_router_bgp(dut4)