print "Creating OSPFv2 on top of IPv4 2 stack\n";
_result_=ixiangpf.emulation_ospf_config (
     handle                                                 =  ipv4_2_handle,
     mode                                                   =  "create",
     network_type                                           =  "ptop",
     protocol_name                                          =  "{OSPFv2-IF 2}",
     router_id                                              =  "194.0.0.1",
)
if _result_['status'] != IxiaHlt.SUCCESS:
    ErrorHandler('interface_config', _result_)
# Configuration of LDP Router and LDP Interface for the first Device Group with label space = 30, hello interval= 10, hold time = 45, keepalive interval = 30, keepalive holdtime =30
print "Creating LDP Router for 1st Device Group"
_result_ = ixiangpf.emulation_ldp_config(
    handle                       = ipv4_1_handle,
    mode                         = "create",
    lsr_id                       = "193.0.0.1",   
    interface_name               = """LDP-IF 1""",
    router_name                  = """LDP 1""",
)
if _result_['status'] != IxiaHlt.SUCCESS:
    ErrorHandler('emulation_ldp_config', _result_)
ldpBasicRouter_1_handle = _result_['ldp_basic_router_handle']

# Configuration of LDP Router and LDP Interface for the second Device Group with label space = 30, hello interval= 10, hold time = 45, keepalive interval = 30, keepalive holdtime =30
print "Creating LDP Router for 2nd Device Group"
_result_ = ixiangpf.emulation_ldp_config(
    handle                       = ipv4_2_handle,
    mode                         = "create",
    lsr_id                       = "194.0.0.1",
    interface_name               = """LDP-IF 2""",
    router_name                  = """LDP 2""",
Esempio n. 2
0
    ErrorHandler('interface_config', _result_)

ipv4_2_handle = _result_['ipv4_handle']

################################################################################
# Configure BGP EVPN Topologies in both ports as described in Description Sec- #
#  tion above.                                                                 #
################################################################################
#Creating LDP Stack on top of ipv4 1 stack
print "Creating LDP Stack on top of ipv4 1 stack\n"
_result_ = ixiangpf.emulation_ldp_config(
        mode                         = "create",
        handle                       = ipv4_1_handle,
        lsr_id                       = "192.0.0.1",
        interface_name               = """LDP-IF 1""",
        interface_multiplier         = "1",
        interface_active             = "1",
        router_name                  = """LDP 1""",
        router_multiplier            = "1",
        router_active                = "1",
)
if _result_['status'] != IxiaHlt.SUCCESS:
    ErrorHandler('emulation_ldp_config', _result_)

ldpBasicRouter_1_handle = _result_['ldp_basic_router_handle']    

_result_ = ixiangpf.emulation_ldp_config(
   handle                    = ipv4_1_handle,
   mode                      = "create",
   interface_name            = """LDP-IF 1""",
   interface_multiplier      = "1",
if _result_['status'] != IxiaHlt.SUCCESS:
    ErrorHandler('interface_config', _result_)

ipv4_2_handle = _result_['ipv4_handle']

################################################################################
# Other protocol configurations                                                #
################################################################################
# Configuration of LDP Router and LDP Interface for the first Device Group with label space = 30, hello interval= 10, hold time = 45, keepalive interval = 30, keepalive holdtime =30
print "Creating LDP Router for 1st Device Group"
_result_ = ixiangpf.emulation_ldp_config(
    handle=ipv4_1_handle,
    mode="create",
    lsr_id="193.0.0.1",
    label_space="30",
    hello_interval="10",
    hello_hold_time="30",
    keepalive_interval="30",
    keepalive_holdtime="45",
    interface_name="""LDP-IF 1""",
    router_name="""LDP 1""",
)
if _result_['status'] != IxiaHlt.SUCCESS:
    ErrorHandler('emulation_ldp_config', _result_)
ldpBasicRouter_1_handle = _result_['ldp_basic_router_handle']
# # Creating LDP Interface for first Device Group with label space = 30, hello interval= 10, hold time = 30
# print "Creating LDP Interface for 1st Device Group\n";
# _result_ = ixiangpf.emulation_ldp_config(
# handle                    = ipv4_1_handle,
# mode                      = "create",
# label_space               = "30",
# hello_interval            = "10",