VPLS Functions

sth::emulation_l2vpn_pe_config

Purpose

Creates and configures Provider Edge (PE) routers supporting Virtual Private LAN Service (VPLS) on the specified test port of a Spirent TestCenter chassis.

VPLS is a type of Layer 2 VPN that provides Ethernet-based multipoint-to-multipoint communication over Internet Protocol /Multi-Protocol Label Switching (IP/MPLS) network. This service uses MPLS tunnels between participating provider edge (PE) routers.

See RFC 4762, “Virtual Private LAN Service (VPLS) Using Label Distribution Protocol (LDP) Signaling,” and RFC 4665 for more information.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_l2vpn_pe_config
    [-port_handle <port_handle>]
    [-pe_remote_ip_addr <a.b.c.d>]
    [-pe_ip_addr_start <a.b.c.d>]
    [-pe_ip_addr_step <a.b.c.d>
    [-pe_ip_addr_count <1-2056> ]
    [-pe_ip_addr_prefix_length <1-32>]
    [-pe_gateway_ip_addr <a.b.c.d> ]
    [-pe_gateway_ip_addr_step <a.b.c.d> ]

Arguments

-port_handle

Specifies the handle of the port on which to create the PE router. The PE router refers to the edge router in the backbone network and it is connected to the Custom Edge (CE) for the access of VPN services. This argument is Mandatory .

-pe_remote_ip_addr

Specifies the interface address of the remote PE router. The default is 192.1.0.1. You must specify the value in IPv4 format.

-pe_ip_addr_start

Specifies the starting IP address of the emulated PE router. The default is 192.85.1.1. You must specify the value in IPv4 format.

-pe_ip_addr_step

Specifies the step size of the IP address for multiple addresses. The default is 0.0.0.1.

-pe_ip_addr_count

Specifies the number of unique PE routers to emulate. Possible values are from 1 to 2056. The default is 1.

-pe_ip_addr_prefix_length

Spirent Extension (for Spirent HLTAPI only).

Specifies the prefix length of the IP address. Possible values for IPv4 addresses range from 1 to 32. The default is 24.

-pe_gateway_ip_addr

Spirent Extension (for Spirent HLTAPI only).

Configures the IPv4 gateway address of the PE router. The default is 192.85.1.1.

-pe_gateway_ip_addr_step

Spirent Extension (for Spirent HLTAPI only).

Defines the step size of the increment for the IPv4 gateway address (-pe_gateway_ip_addr) for multiple routers. This argument is used with the -pe_gateway_ip_addr argument. The default is 0.0.0.1.

Arguments Unsupported by Save as HLTAPI

The following Spirent HLTAPI arguments are currently not supported by the Save as HLTAPI function:

-pe_gateway_ip_addr_step
-pe_ip_addr_step
-pe_ip_addr_count

Cisco-specific Arguments

The following arguments are specific to the Cisco HLTAPI but are not supported by Spirent HLTAPI:

-traffic_engineering

Return Values

Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):

handle
                 A list of PE handles.

status
                 Success (1) or failure (0) of the operation.

log
                 An error message (if the operation failed).

Description

The sth::emulation_l2vpn_pe_config function creates and configures VPLS on a PE router and returns the handle of the PE router.

When you create an emulated PE router, use the -port_handle argument to specify the Spirent TestCenter port that the emulated router will use. (The port handle value is contained in the keyed list returned by the connect function.)

Examples

#### HLTAPI for Tcl ####

The following example creates and configures a PE router:

sth::emulation_l2vpn_pe_config -port_handle $p1 \
     -pe_remote_ip_addr 192.168.0.3 \
     -pe_ip_addr_start 192.168.0.1 \
     -pe_ip_addr_step 0.0.0.1 \
     -pe_ip_addr_count 1 \
     -pe_gateway_ip_addr 192.168.0.3 \
     -pe_gateway_ip_addr_step 0.0.0.1 \
     -pe_ip_addr_prefix_length 24 \
     -traffic_engineering 1

Sample Output:

{handle router1} {status 1}

#### HLTAPI for Python ####

The following example creates and configures a PE router:

device_ret2 = sth.emulation_l2vpn_pe_config (
             port_handle         = port_handle[1],
             pe_ip_addr_start    = '111.111.111.111',
             pe_gateway_ip_addr  = '9.3.0.1',
             pe_ip_addr_prefix_length= '32',
             pe_remote_ip_addr   = '1.1.1.4');

Sample Output:

{'status': '1', 'handle': 'router1'}

#### HLTAPI for Perl ####

The following example creates and configures a PE router:

my %device_ret2 = sth::emulation_l2vpn_pe_config (
             port_handle         => "$hport[2]",
             pe_ip_addr_start    => '111.111.111.111',
             pe_gateway_ip_addr  => '9.3.0.1',
             pe_ip_addr_prefix_length=> '32',
             pe_remote_ip_addr   => '1.1.1.4');

Sample Output:

$VAR1 = ‘status’; $VAR2 = ‘1’; $VAR3 = ‘handle’; $VAR4 = ‘router1’;

End of Procedure Header

sth::emulation_vpls_site_config

Purpose

Creates the emulated VPLS CE site. In general, it will create CE hosts.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_vpls_site_config
    [-pe_handle <pe_handle_list>]
    [-port_handle <port_handle>]
    [-ip_stack_version {ipv4 | ipv6}]
    [-site_count <integer>]
    [-vc_type {4 | 5 | B } ]
    [-vpn_id <0-65535> ]
    [-vpn_id_step <1-4094>]
    [-vc_id <0-65535> ]
    [-vc_id_step <0-4294967295> ]
    [-ldp_fec_type {FEC_128|FEC_129}]
    [-attachment_group_id <string>]
    [-attachment_group_id_incr <string>]
    [-src_attachment_individual_id <a.b.c.d>]
    [-src_attachment_individual_id_incr <a.b.c.d>]
    [-pw_count <integer>]
    [-vlan <0-4095> ]
    [-vlan_step <1-4094> ]
    [-vlan_count <1-4095>]
    [-mtu <1-65535 >]
    [-mac_addr <aa:bb:cc:dd:ee:ff>]
    [-mac_addr_step <aa:bb:cc:dd:ee:ff>]
    [-mac_count <integer>]
    [-vlan_id <0-4095>]
    [-vlan_id_step <1-4094>]
    [-attached_dut_ip_addr <a.b.c.d>]
    [-attached_dut_ip_prefix <integer>]
    [-router_id <a.b.c.d>]
    [-router_id_ipv6 <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
    [-router_id_step <a.b.c.d>]
    [-router_id_ipv6_step <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
    [-intf_ip_addr <a.b.c.d>]
    [-intf_ip_addr_step <a.b.c.d>]
    [-intf_prefix_len <1-32>]
    [-gateway_ip_addr <a.b.c.d>]
    [-gateway_ip_addr_step <a.b.c.d>]
    [-gateway_mac <aa:bb:cc:dd:ee:ff>]
    [-resolve_gateway_mac {true|false}]
    [-intf_ipv6_addr <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh> ]
    [-intf_ipv6_addr_step <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
    [-intf_ipv6_prefix_len <1-128>]
    [-gateway_ipv6_addr <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
    [-gateway_ipv6_addr_step <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh> ]
    [-ipv6_gateway_mac <aa:bb:cc:dd:ee:ff>]
    [-ipv6_resolve_gateway_mac {true|false}]
    [-link_local_ipv6_addr <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
    [-link_local_ipv6_addr_step <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
    [-link_local_ipv6_prefix_len <0-128>]

Arguments

-port_handle

Specifies the handle of the port on which to create the VPLS site. It is Mandatory that you specify either -port_handle or -pe_handle. You can specify both of these arguments only when the PE routers are created on the port defined by -port_handle.

-ip_stack_version

Specifies the IP version of the CE host. Possible values are ipv4, ipv6.

-pe_handle

Specifies the list of PE handles on which to create VPLS sites. See “-port_handle”.

-site_count

Specifies the number of VPLS sites to create. The default is 1.

-vpn_id

Specifies the VPN ID of the site. Possible values are from 0 to 65535.

-vc_id

The virtual circuit identifier for IP over ATM interfaces. A Virtual Circuit Identifier (VCI) is a unique identifier for a particular virtual circuit on a network. It is a 16-bit field in the header of an ATM cell. The VCI, together with the VPI (Virtual Path Identifier) identifies the next destination of a cell as it passes through a series of ATM switches on its way to its destination. Possible values range from 0 to 65535.

-vc_id_step

Defines the step size in which the VCI value is incremented for the emulation of clients over ATM interfaces. This argument is valid for ATM interfaces only. Possible values are 0 to 4294967295. The default is 1.

-ldp_fec_type

Specifies LDP FEC type. Possible values are FEC_128 and FEC_129. The default is FEC_128.

-attachment_group_id

Specifies the attachment group identifier. This argument is only available when you set -ldp_fec_type to FEC_129. The default is 100:1.

-attachment_group_id_incr

Specifies the attachment group identifier increment. This argument is only available when you set -ldp_fec_type to FEC_129. The default is 0:1.

-src_attachment_individual_id

Specifies the source attachment individual identifier. This argument is only available when you set -ldp_fec_type to FEC_129. The default is 192.0.0.1.

-src_attachment_individual_id_incr

Specifies the attachment group identifier increment. This argument is only available when you set -ldp_fec_type to FEC_129. The default is 0.0.0.1.

-pw_count

Specifies the PW count. This argument is only available when you set -ldp_fec_type to FEC_129. The default is 1.

-vlan

The VLAN ID of the first site. Used to configure refresh reduction capabilities as per RFC 2961. Possible values range from 0 to 4095. The default is 1.

-vlan_step

The step size by which the Site VLAN value is incremented. Possible step values range from 1 to 4094. The default is 1.

-vlan_count

Sets the number of Site VLAN IDs to use when generating VPLS sessions or tunnels. Spirent HLTAPI assigns VLAN membership in round-robin fashion. Possible values range from 1 to 4095. The default is 1.

-mtu

Maximum Transmission Unit, excluding encapsulation overhead, for the egress packet interface transmitting the de- capsulated PDU. Possible values are 1 to 65535. The default is 1500. This is the advertised MTU value in database entries sent to other routers created on the Spirent TestCenter interface.

-mac_addr

Indicates the starting MAC address in the address pool.

-mac_addr_step

Specifies the increment to use when selecting the next MAC address.

-mac_count

Defines the number of MAC addresses in the address pool. The number of MAC addresses determines the number of stations within the VPLS site. If you enable VLAN addresses, type the number of addresses per VLAN ID in the address pool. The default is 1.

-vlan_id

Defines the first VLAN ID for a range of customer VLANs.Possible values range from 0 to 4095. The default is 1.

-vlan_id_step

Defines the step size by which the customer VLAN ID value is incremented. Possible values range from 1 to 4094. The default is 1.

-attached_dut_ip_addr

Spirent Extension (for Spirent HLTAPI only).

Specifies the IP address of the Device Under Test (DUT). When the created site is a PE router and is connected to the DUT directly, you must specify this argument and -attached_dut_ip_prefix. This value must be in IPv4 format.

-attached_dut_ip_prefix

Spirent Extension (for Spirent HLTAPI only).

Specifies the prefix length for the DUT IP address. When the created site is a PE router and is connected to the DUT directly, you must specify this argument and -attached_dut_ip_addr.

-router_id

Specifies the router ID of the CE host. The value must be in IPv4 format.

-router_id_ipv6

Specifies the IPv6 router ID of the CE host. The value must be in IPv6 format.

-router_id_step

Spirent Extension (for Spirent HLTAPI only).

Specifies the difference between consecutive router IDs when multiple hosts are created. The value must be in IPv4 format. The default value is 0.0.0.1.

-router_id_ipv6_step

Spirent Extension (for Spirent HLTAPI only).

Specifies the difference between consecutive IPv6 router IDs when multiple hosts are created. The value must be in IPv6 format. The default value is 0000::1.

-intf_ip_addr

Specifies the IPv4 address of the CE host. The default value is 192.85.1.3.

-intf_ip_addr_step

Specifies the difference between IPv4 interface addresses of consecutive devices when multiple CE hosts are created. The value must be in IPv4 format. The default is 0.0.0.1.

-intf_prefix_len

Specifies the prefix length for the IPv4 address of the CE host. Possible values range from 1 to 32. The default is 24.

-gateway_ip_addr

Specifies the IPv4 gateway address for the CE host.

-gateway_ip_addr_step

Specifies the difference between IPv4 gateway addresses of consecutive devices when multiple CE hosts are created. The default value is 0.0.0.1.

-gateway_mac

Specifies the IPv4 gateway’s MAC address for the CE host. The default value is 00:00:01:00:00:01.

-resolve_gateway_mac

Determines whether to resolve the IPv4 gateway’s MAC address. Possible values are true and false. The default value is true.

-intf_ipv6_addr

Specifies the IPv6 address of the CE host.

-intf_ipv6_addr_step

Specifies the difference between interface IPv6 addresses of consecutive devices when multiple CE hosts are created.

-intf_ipv6_prefix_len

Specifies the prefix length for the IPv6 address of the CE host. Possible values range from 0 to 128. The default is 64.

-gateway_ipv6_addr

Specifies the IPv6 gateway address for the CE host.

-gateway_ipv6_addr_step

Specifies the difference between IPv6 gateway addresses of consecutive devices when multiple CE hosts are created.

Specifies the starting link local IPv6 address for CE hosts. The value must be in IPv6 format. The default is FE80::0.

Specifies the difference between link local IPv6 addresses of consecutive devices when multiple CE hosts are created. The value must be in IPv6 format. The default is ::1.

Specifies the prefix length for the link local IPv6 address of the CE host. Possible values range from 0 to 128. The default is 64.

-ipv6_gateway_mac

Specifies the IPv6 gateway’s MAC address for the CE host. The default value is 00:00:01:00:00:01.

-ipv6_resolve_gateway_mac

Determines whether to resolve the IPv6 gateway’s MAC address. Possible values are true and false. The default value is true.

Arguments Unsupported by Save as HLTAPI

The following Spirent HLTAPI arguments are currently not supported by the Save as HLTAPI function:

-mac_addr_step
-mac_count
-site_count
-vc_id_step
-vlan_id_step
-vlan_step
-vlan_count
-vpls_site_config

Cisco-specific Arguments

The following arguments are specific to the Cisco HLTAPI but are not supported by Spirent HLTAPI:

-vc_type
-vpn_id_step
-control_word
-te_label
-traffic_engineering

Return Values

Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):

handle
                A list of VPLS CE handles

log
                Returns debugging information when the status is $FAILURE.

status
                Success (1) or failure (0) of the operation.

log
                An error message (if the operation failed).

Description

The sth::emulation_vpls_site_config function creates a VPLS CE site. The VPLS site emulates a local area network (LAN).

When you create an emulated VPLS CE site, use the -port_handle argument to specify the Spirent TestCenter port that the emulated VPLS site will use for communication. (The port handle value is contained in the keyed list returned by the connect function.) Use the -pe_handle to create a list of PE handles to use to create VPLS CE sites.

Each VPLS site (that is, each VPN) connects one or more VPN sites to a common virtual LAN. A VPN site can use either 802.1q tagged or untagged (but not both) Ethernet frames to communicate with the other sites of the VPN. In case of tagged frames, each VPN site must use a single VLAN ID for the same VPN, but the VLAN ID may differ at each VPN site.

The interface to which you are connecting the VPLS site may be 802.1Q tagged or untagged (but not both) Ethernet frames to communicate with the other sites on the VPN. If the interface is tagged, you must specify the VLAN ID used to connect the site to the VPN.

With LDP, each PE router must be configured to participate in a given VPLS, and, in addition, be given the addresses of other PEs participating in the same VPLS. LDP sessions are then established between these PE routers.

Examples

#### HLTAPI for Tcl ####

The following example creates a VPLS site:

sth::emulation_vpls_site_config -port_handle $p1 \
     -pe_handle $ vplsPeRouterHandle \
     -site_count 1 \
     -vc_type 5 \
     -vpn_id 10 \
     -vpn_id_step 3\
     -vc_id 20 \
     -vc_id_step 1\
     -vlan 100 \
     -vlan_step 5 \
     -vlan_count 4 \
     -mtu 2000 \
     -mac_addr 00:00:11:00:00:01 \
     -mac_addr_step 00:00:00:00:00:01 \
     -mac_count 3 \

Sample Output:

{handle host1} {status 1}

The following example creates a VPLS site with Ipv6 CE host:

sth::emulation_vpls_site_config \
   -vpn_id                                           100\
   -pe_handle                                        $pe_handle\
   -vc_type                                          B\
   -mtu                                              1500\
   -vc_id                                            2\
   -port_handle                                      $port2\
   -link_local_ipv6_prefix_len                       128 \
   -link_local_ipv6_addr_step                        ::1 \
   -link_local_ipv6_addr                             fe80::1 \
   -intf_ipv6_prefix_len                             64 \
   -gateway_ipv6_addr_step                           :: \
   -ipv6_resolve_gateway_mac                         false \
   -intf_ipv6_addr                                   2001::2 \
   -gateway_ipv6_addr                                2001::1 \
   -intf_ipv6_addr_step                              ::1 \
   -ipv6_gateway_mac                                 f0:78:16:63:11:1a \
   -mac_addr                                         00:00:01:00:00:01 \

Sample Output:

{handle host1} {status 1}

#### HLTAPI for Python ####

The following example creates a VPLS site:

device_ret3 = sth.emulation_vpls_site_config (
             vpn_id              = '100',
             attached_dut_ip_addr= '1.1.1.4',
             attached_dut_ip_prefix= '32',
             vc_id               = '920',
             port_handle         = port_handle[0],
             vlan_id             = '920',
             mac_addr            = '00:00:11:00:00:01');

Sample Output:

{'status': '1', 'handle': 'host3'}

#### HLTAPI for Perl ####

The following example creates a VPLS site:

my %device_ret3 = sth::emulation_vpls_site_config (
             vpn_id              => '100',
             attached_dut_ip_addr=> '1.1.1.4',
             attached_dut_ip_prefix=> '32',
             vc_id               => '920',
             port_handle         => "$hport[1]",
             vlan_id             => '920',
             mac_addr            => '00:00:11:00:00:01');

Sample Output:

$VAR1 = 'handle';
$VAR2 = 'host3';
$VAR3 = 'status';
$VAR4 = '1';

End of Procedure Header