Example #1
0
################################################################################
# Creating  ISIS Stack on top of ethernet stack                                #
# Descrtiption of protocol arguments : discard_lsp: enables learning LSPs      #
#                                      intf_type: sets interface type          #
#                                      system_id: sets system id               #
#                                      protocol_name: sets prtoocol name       #
#                                      active: activates ISIS router           #
#                                      if_active: activates router interface   #
################################################################################
print "Creating ISIS Stack on top of ethernet 1 stack"
_result_ = ixiangpf.emulation_isis_config(
    mode="create",
    discard_lsp="0",
    handle=ethernet_1_handle,
    intf_type="ptop",
    routing_level="L2",
    system_id="64:01:00:01:00:00 ",
    protocol_name="""ISIS-L3 IF 1""",
    active="1",
    if_active="1",
)
if _result_['status'] != IxiaHlt.SUCCESS:
    ErrorHandler('emulation_isis_config', _result_)

isisL3_1_handle = _result_['isis_l3_handle']

# Creating ISIS Network Group in port 1
print "Creating ISIS IPv4 Network group in port 1"
_result_ = ixiangpf.network_group_config(
    protocol_handle=deviceGroup_1_handle,
    protocol_name="""ISIS Network Group 1""",
ipv6_1_handle = ipv6_1_status['ipv6_handle']

#-------------------------------------------------------------------------------
# Add ISIS router1
#-------------------------------------------------------------------------------
print ("Adding ISIS router1")
isis_l3_1_status = ixiangpf.emulation_isis_config(
        mode                                 = "create",
        discard_lsp                          = "0",
        handle                               = ethernet_1_handle,
        intf_type                            = "ptop",
        routing_level                        = "L2",
        area_id                              = "490001",
        system_id                            = "64:01:00:01:00:00 ",
        protocol_name                        = """ISIS-L3 IF 1""",
        active                               = "1",
        if_active                            = "1",
        ipv4_flag                            = "0",
        ipv6_flag                            = "0",
        enable_sr                            = "1",
        interface_enable_adj_sid             = "1",                        
        ipv6_srh_flag_emulated_router        = "1",
        ipv6_node_prefix                     = "7895:0:0:1:0:0:0:1",
        prefix_length_v6                     = "128",
        ipv6_adjacency_sid_value             = "abcd:1:0:1:0:0:0:2",
)
if isis_l3_1_status['status'] != IxiaHlt.SUCCESS:
    ErrorHandler('emulation_isis_config', isis_l3_1_status)

isisL3_1_handle = isis_l3_1_status['isis_l3_handle']

#--------------------------------------------------------------------------------