VXLAN OVSDB Functions¶
emulation vxlan ovsdb port config¶
Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>
- Purpose:
Spirent Extension (for Spirent HLTAPI only).
Configures VXLAN OVSDB ports and interfaces.
Synopsis:
Note: M indicates the argument is `Mandatory`.
emulation vxlan ovsdb port config
port_handle= <port_handle>
handle= <handle>
mode= {create | delete}
vlan_enable= {true | false}
gw_ip_addr= <a.b.c.d>
gw_ip_addr_step= <a.b.c.d>
mac_addr= <aa:bb:cc:dd:ee:ff>
mac_addr_step= <aa:bb:cc:dd:ee:ff>
prefix_len= <0-32>
router_id= <a.b.c.d>
router_id_step= <a.b.c.d>
tunnel_ip_mode= {interface_ip | router_id}
vtep_ip_addr= <a.b.c.d>
vtep_ip_addr_step= <a.b.c.d>
vlan_id= <0-4095>
vlan_id_step= <0-4095>
vlan_count= <1-65535>
Arguments:
port_handle
Specifies the port on which VXLAN Tunnel End Point (VTEP) and
Virtual Machine (VM) devices will be emulated. This argument is
`Mandatory` for mode create.
handle
Specifies the configured VXLAN Tunnel End Point (VTEP) and
Virtual Machine (VM) device parameter handle. This argument
is required for mode delete.
mode
Specifies the action to perform.
Values::
create Configures VTEPs or VMs on the port specified by port_handle
delete Deletes the configured VTEP or VM devices parameter handle
specified by handle.
router_id
Specifies the router ID of the emulated device.
The default is 10.1.1.1.
router_id_step
Specifies the step value by which to create subsequent router
IDs. The default is 0.0.0.1.
tunnel_ip_mode
Specifies the source of the tunnel IP address. Possible values
are interface_ip and router_id. The default is interface_ip.
vtep_ip_addr
Specifies the IP address of the emulated VTEP device.
The default is 192.168.100.2.
vtep_ip_addr_step
Specifies the step value by which to generate subsequent IP
addresses for VTEPs. The default is 0.0.0.1.
prefix_len
Specifies the prefix length on the provider subnet.
Possible values range from 0 to 32.
The default is 24.
gw_ip_addr
Specifies the IP address of the first gateway.
The default is 192.168.100.1.
gw_ip_addr_step
Specifies the step value by which to generate subsequent
gateway IP addresses. The default is 0.0.0.1.
mac_addr
Specifies the first MAC address of the emulated device.
The default is 10:00:00:10:00:01.
mac_addr_step
Specifies the step value by which to generate subsequent
MAC addresses. The default is 00:00:00:00:00:01.
vlan_enable
Enables or disables VLAN. Possible values are
true (enable) and false (disable). The default is false.
vlan_id
Specifies the ID for the first VLAN in a block. Possible
values range from 0 to 4095. The default is 1.
vlan_id_step
Specifies the step value by which to generate subsequent VLAN
IDs. Possible values range from 0 to 4095. The default is 1.
vlan_count
Specifies the VLAN count. Possible values range from 1 to 65535.
The default is 1.
- 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 VXLAN OVSDB port handle created by the function status Success (1) or failure (0) of the operation log An error message (if the operation failed)
- Description:
The
emulation vxlan ovsdb port config
function configures VXLAN OVSDB ports and interfaces, mapping the operation of the VXLAN OVSDB wizard on the Spirent TestCenter GUI.If the operation fails, Spirent HLTAPI returns an error message.
Examples:
The following example configures VXLAN OVSDB ports and interfaces:
set vxlan_ovsdb_port_config [emulation vxlan ovsdb port config mode= create port_handle= port1 vlan_enable= true gw_ip_addr= 5.5.5.50 gw_ip_addr_step= 0.0.0.2 mac_addr= 10:06:07:10:08:05 mac_addr_step= 00:00:00:00:02:05 prefix_len= 24 vlan_id= 567 vlan_id_step= 2 vlan_count= 1 vtep_ip_addr= 5.5.5.5 vtep_ip_addr_step= 0.0.0.2 router_id= 5.5.5.1 router_id_step= 0.0.0.2 tunnel_ip_mode= router_id
]
Sample Output:
{handle vxlanovsdbvtepportgenparams1} {status 1}
emulation nonvxlan ovsdb port config¶
Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>
- Purpose:
Spirent Extension (for Spirent HLTAPI only).
Configures nonVXLAN OVSDB ports and interfaces.
Synopsis:
Note: M indicates the argument is `Mandatory`.
emulation nonvxlan ovsdb port config
port_handle= <port_handle>
handle= <handle>
mode= {create | delete}
vlan_enable= {true | false}
gw_ip_addr= <a.b.c.d>
ip_addr= <a.b.c.d>
gw_ip_addr_step= <a.b.c.d>
ip_addr_step= <a.b.c.d>
gw_ip_addr_step_per_seg_block= <a.b.c.d>
ip_addr_step_per_seg_block= <a.b.c.d>
mac_addr= <aa:bb:cc:dd:ee:ff>
mac_addr_step= <aa:bb:cc:dd:ee:ff>
mac_addr_step_per_seg= <aa:bb:cc:dd:ee:ff>
prefix_len= <0-32>
host_per_seg= <0-65535>
vlan_id= <0-4095>
vlan_id_step= <0-4095>
host_address_mode= {mac | ipv4}
Arguments:
port_handle
Specifies the port on which nonVXLAN hosts will be emulated.
This argument is `Mandatory` for mode create.
mode
Specifies the action to perform.
Values::
create Creates nonVXLAN hosts on the port specified by -port_handle
delete Deletes created nonVXLAN host parameters specified by -handle
handle
Specifies the configured nonVXLAN host parameter handle.
This argument is required for mode delete.
vlan_enable
Enables or disables VLAN. Possible values are
true (enable) and false (disable). The default is false.
gw_ip_addr
Specifies the first gateway IP address of nonVXLAN hosts.
The default is 192.85.100.1.
gw_ip_addr_step
Specifies the step value by which to generate subsequent
gateway IP addresses of nonVXLAN hosts.
The default is 0.0.0.1.
ip_addr
Specifies the first IP address of nonVXLAN hosts.
The default is 192.85.100.2.
ip_addr_step
Specifies the step value by which to generate subsequent
IP addresses of nonVXLAN hosts.
The default is 0.0.0.1.
gw_ip_addr_step_per_seg_block
Specifies the gateway IP address increment per segment block.
The default is 0.1.0.0.
ip_addr_step_per_seg_block
Specifies the IP address increment per segment block.
The default is 0.1.0.0.
mac_addr
Specifies the first MAC address of the nonVXLAN hosts.
The default is 10:00:00:10:00:01.
mac_addr_step
Specifies the step value by which to generate subsequent
MAC addresses. The default is 00:00:00:00:00:01.
mac_addr_step_per_seg
Specifies the step value by which to generate subsequent
MAC addresses per segment block. The default is
00:00:00:00:00:01..
prefix_len
Specifies the prefix length of the configured nonVXLAN hosts.
Possible values range from 1 to 32. The default value is 24.
host_per_seg
Specifies the number of hosts to be configured per segment.
Possible values range from 1 to 65535. The default value is 1.
vlan_id
Specifies the VLAN ID of the first VLAN subinterface. Possible
values range from 0 to 4095. The default is 1.
vlan_id_step
Specifies the value that used to increment the VLAN ID.
Possible step values range from 0 to 4095. The default
value is 1.
host_address_mode
Specifies the IP type of nonVXLAN hosts. Possible values
are MAC and IPV4. The default is IPV4.
- 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
- All nonVXLAN OVSDB port handles created by the function
- status
- Success (1) or failure (0) of the operation
- log
- An error message (if the operation failed)
- Description:
The
emulation nonvxlan ovsdb port config
function configures nonVXLAN OVSDB hosts, mapping the operation of the VXLAN OVSDB wizard on the Spirent TestCenter GUI.If the operation fails, Spirent HLTAPI returns an error message.
Examples:
The following example configures nonVXLAN= OVSDB hosts:
set nonvxlan_ovsdb_port_config [emulation nonvxlan ovsdb port config mode= create port_handle= port2 vlan_enable= false gw_ip_addr= 6.6.6.6 ip_addr= 6.6.6.60 gw_ip_addr_step= 0.0.0.3 ip_addr_step= 0.0.0.4 gw_ip_addr_step_per_seg_block= 7.7.7.7 ip_addr_step_per_seg_block= 7.7.7.70 mac_addr= 20:06:07:10:08:05 mac_addr_step= 01:00:00:00:02:05 mac_addr_step_per_seg= 02:00:00:00:02:05 prefix_len= 24 host_per_seg= 4 vlan_id= 44 vlan_id_step= 4 host_address_mode= mac
]
Sample Output:
{handle vxlanovsdbhostportgenparams1} {status 1}
emulation vxlan ovsdb wizard config¶
Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>
- Purpose:
Spirent Extension (for Spirent HLTAPI only).
Creates or deletes the VXLAN OVSDB topology..
Synopsis:
Note: M indicates the argument is `Mandatory`.
emulation vxlan ovsdb wizard config
handle= <vxlan_evpn_overlay_wizard_parameters_handle>
mode= {create | delete}
OVSDB Server parameters
controller_port= <1-65535>
controller_port_step= <integer>
controller_ip_mode= {ip_list | single_ip}
controller_ip_addr= <a.b.c.d>
controller_ip_addr_step= <a.b.c.d>
same_config_across_ports= {true | false}
OVSDB VTEP parameters
auto_select_udp_src_port= {true | false}
use_gateway_as_dut= {true | false}
enable_udp_checksum= {true | false}
round_robin_allocation= {true | false}
connected_dut_ip_addr= <IP>
udp_src_port= <1-65535
udp_src_port_step= <0-32767
vtep_count_per_vlan= <integer>
OVSDB Segment parameters
same_vnis_across_ports= {true | false}
same_vnis_across_vteps= {true | false}
seg_per_block= <1-65535>
vni= <0-16777215>
vni_step= <0-100000>
vxlan_seg_per_vtep= <1-65535>
OVSDB VM parameters
vlan_enable= {true | false}
vm_ip_addr= <a.b.c.d>
gw_ip_addr= <a.b.c.d>
gw_addr_step_per_port= <a.b.c.d>
gw_addr_step_per_seg= <a.b.c.d>
gw_addr_step_per_vtep= <a.b.c.d>
gw_ip_addr_step= <a.b.c.d>
ip_addr_step= <a.b.c.d>
ip_addr_step_per_port= <a.b.c.d>
ip_addr_step_per_seg= <a.b.c.d>
mac_addr= <aa:bb:cc:dd:ee:ff>
mac_addr_step= <aa:bb:cc:dd:ee:ff>
mac_addr_step_per_seg_block= <aa:bb:cc:dd:ee:ff>
prefix_len= <0-32>
vms_per_seg= <1-65535>
vlan_id= <0-4095>
vlan_id_step= <0-4095>
vm_addr_mode= {mac|ipv4}
delete_existing= {yes|no}
Arguments:
handle
The VXLAN OVSDB wizard configuration handle returned by
this API. You must specify this argument for mode delete.
mode
Specifies the action to perform.
Values::
create
Creates the VXLAN OVSDB test topology
delete
Delete all handles created by this function. You must
use this before you recreate a VXLAN OVSDB
wizard configuration
controller_port
Specifies the OVSDB server connection port's port number
value. Possible values are range from 1 to 65535.
The default value is 6640.
controller_port_step
Specifies the step value by which to generate subsequent
port numbers. The default is 1.
controller_ip_mode
Specifies the OVSDB server controller IP mode.
The default value is ip_list. Possible values
are described below::
Value Description
ip_list Configure IP List with comma separated values
single_ip Configure Single IP
controller_ip_addr
Specifies the OVSDB server controller IP address.
The default value is 192.85.1.1.
controller_ip_addr_step
Specifies the step value by which to generate subsequent
controller IP addresses. The default is 0.0.0.1.
same_config_across_ports
Specifies whether to use same controller IP parameters
across ports. Possible values are true and false.
The default value is true.
auto_select_udp_src_port
Specifies whether to auto select UDP source port
for VXLAN VTEP devices. Possible values are true
and false. The default value is true.
use_gateway_as_dut
Specifies whether to configure gateway address as
DUT address. Possible values are true and false.
The default value is true.
enable_udp_checksum
Specifies whether to enable UDP checksum. Possible
values are true and false. The default value is false.
round_robin_allocation
Specifies whether to configure the connected DUT IP
allocation in round robin order. Possible values
are true and false. The default value is false.
connected_dut_ip_addr
Specifies the IP address of connected DUT. The default
value is 192.85.1.1.
udp_src_port
Specifies the UDP source port value. Possible values
are range from 1 to 65535. The default value is 1025.
udp_src_port_step
Specifies the step value by which to generate subsequent
UDP source port values. Possible values are range from
0 to 32767. The default value is 1.
same_vnis_across_ports
Specifies whether to use same VNIs across ports.
Possible values are true and false. The default value
is true.
same_vnis_across_vteps
Specifies whether to use same VNIs across VTEPs.
Possible values are true and false. The default value
is true.
seg_per_block
Specifies the VXLAN OVSDB segment value per block.
Possible values are range from 1 to 65535. The default
value is 1.
vni
Specifies the first VNI value of VXLAN OVSDB segments.
Possible values are range from 1 to 16777215. The default
value is 1.
vni_step
Specifies the step value by which to generate subsequent
VNI values. Possible values are range from 0 to 100000.
The default value is 1.
vxlan_seg_per_vtep
Specifies the VXLAN segment value to configure per VTEP
device. Possible values are range from 1 to 65535.
The default value is 1.
vlan_enable
Enables or disables VLAN. Possible values are
true (enable) and false (disable). The default is false.
vm_ip_addr
Specifies the IP address of VXLAN OVSDB VMs.
The default value is 100.0.0.2.
gw_ip_addr
Specifies the gateway IP address of VXLAN OVSDB VMs.
The default value is 100.0.0.1.
gw_addr_step_per_port
Specifies whether to use same controller IP parameters
across ports. Possible values are true and false.
The default value is true.
gw_addr_step_per_seg
Specifies the step value by which to increment gateway
IP address per segment. The default is 0.0.1.0.
gw_addr_step_per_vtep
Specifies the step value by which to increment gateway
IP address per VTEP. The default is 0.0.0.0.
gw_ip_addr_step
Specifies the step value by which to generate subsequent
gateway IP addresses. The default is 0.0.0.1.
ip_addr_step
Specifies the step value by which to generate subsequent
VM IP addresses. The default is 0.0.0.1.
ip_addr_step_per_port
Specifies the step value by which to increment VM
IP address per port. The default is 0.0.0.0.
ip_addr_step_per_seg
Specifies the step value by which to increment VM
IP address per segment. The default is 0.0.1.0.
mac_addr
Specifies the first MAC address of the VXLAN OVSDB VM
devices. The default is 00:00:10:01:00:00.
mac_addr_step
Specifies the step value by which to generate subsequent
VM MAC addresses. The default is 00:00:00:00:00:01.
mac_addr_step_per_seg_block
Specifies the step value by which to generate subsequent
VM MAC addresses per segment block. The default is
00:00:00:01:00:00.
prefix_len
Specifies the prefix length on the provider subnet.
Possible values range from 0 to 32.
The default is 24.
vms_per_seg
Specifies the number of VMs per segment. Possible values
range from 1 to 65535. The default value is 1.
vlan_id
Specifies the ID for the first VLAN in VXLAN OVSDB VM devices.
Possible values range from 0 to 4095. The default is 1.
vlan_id_step
Specifies the step value by which to generate subsequent VLAN
IDs. Possible values range from 0 to 4095. The default is 1.
vm_addr_mode
Specifies the address mode VXLAN OVSDB VM devices. Possible
values are mac and ipv4. The default value is ipv4.
delete_existing
Specifies whether to delete existing VXLAN OVSDB configurations
when OVSDB topology parameters are applied. Possible values are
yes and no. The default value is no.
- 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
- The VXLAN OVSDB wizard configuration handle
- vtep_handle
- A list of handles, separated by port handles
- vm_handle
- A list of VM device handles under this VTEP device
- host_handle
- A list of host handles
- vxlan_segment_handle
- A list of VXLAN segment handles
- status
- Success (1) or failure (0) of the operation
- log
- An error message (if the operation failed)
- Description:
The
emulation vxlan ovsdb wizard config
function configures or deletes a VXLAN OVSDB topology, mapping the operations of VXLAN OVSDB wizard on the Spirent TestCenter GUI.Use the mode argument to specify the operation to perform. See the mode argument for a description of the actions.
Examples:
The following example configures a VXLAN OVSDB topology:
set vxlan_ovsdb_wizard_config [emulation vxlan ovsdb wizard config mode= create controller_port= 7777 controller_port_step= 1 controller_ip_mode= ip_list controller_ip_addr= "5.5.5.5,56.6.6.6" controller_ip_addr_step= 0.0.0.3 same_config_across_ports= false auto_select_udp_src_port= false use_gateway_as_dut= false enable_udp_checksum= true round_robin_allocation= true connected_dut_ip_addr= "4.5.6.7,8.9.10.11,12.13.141.5" vtep_count_per_vlan= 1 same_vnis_across_ports= false same_vnis_across_vteps= true seg_per_block= 1 vni= 2345 vni_step= 1 vxlan_seg_per_vtep= 1 vlan_enable= false vm_ip_addr= 99.1.1.1 gw_ip_addr= 99.2.2.2 gw_addr_step_per_port= 0.2.0.0 gw_addr_step_per_seg= 0.0.0.2 gw_addr_step_per_vtep= 0.0.2.0 gw_ip_addr_step= 0.0.0.3 ip_addr_step= 0.0.0.2 ip_addr_step_per_port= 0.4.0.0 ip_addr_step_per_seg= 0.0.4.0 mac_addr= 00:20:20:01:00:02 mac_addr_step= 00:00:00:00:00:02 mac_addr_step_per_seg_block= 00:30:10:01:00:00 prefix_len= 27 vms_per_seg= 1 vlan_id= 666 vlan_id_step= 1 vm_addr_mode= mac delete_existing= no
]
Sample Output:
{vtep_handle emulateddevice1} {vm_handle emulateddevice2} {host_handle {host_handle emulateddevice3} {vxlan_segment_handle vxlansegmentconfig1} {handle vxlanovsdbconfiggenparams1} {status 1}The following example deletes the created VXLAN OVSDB topology:
set VxDel [emulation vxlan ovsdb wizard config mode= delete handle= $VxWizard_Handle ]
emulation vxlan ovsdb control¶
Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>
- Purpose:
Spirent Extension (for Spirent HLTAPI only).
Starts or stops the created VTEP devices
Synopsis:
Note: M indicates the argument is `Mandatory`.
emulation vxlan ovsdb control
action= {start | stop} M
port_handle= <port_handle>
handle= <device handle>
Arguments:
action
Specifies the action to perform. This argument is `Mandatory`.
Values::
start Starts the VTEP device
stop Stops the VTEP device
port_handle
Specifies the port on which the action will be performed. You
must specify either port_handle or -handle, but not both.
handle
Specifies the VTEP device handles on which to perform the action.
You must specify either port_handle or -handle, but not both.
- 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):
- status
- Success (1) or failure (0) of the operation
- log
- Error message if command returns {status 0}
- Description:
- The
emulation vxlan ovsdb control
function controls the configured VTEP devices.
Examples:
To start the specified VTEP device:
set status [::emulation vxlan ovsdb control port_handle= "$port1 $port2" action= start]Sample Output:
{status 1}To stop the specified VTEP device:
set status [::emulation vxlan ovsdb control port_handle= "$port1 $port2" action= stop]Sample Output:
{status 1}
emulation vxlan ovsdb stats¶
Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>
- Purpose:
Spirent Extension (for Spirent HLTAPI only).
Retrieves VTEP configuration results and OVSDB Server results for the VTEP devices configured on the specified test port.
Synopsis:
Note: M indicates the argument is `Mandatory`.
emulation vxlan ovsdb stats
port_handle= <port_handle>
handle= <device handle>
Arguments:
port_handle
Specifies the port handles from which to retrieve the statistics.
You must specify either port_handle or handle, but not both.
handle
Specifies the VXLAN device handles from which to retrieve the
statistics. You must specify either port_handle or handle, but
not both.
- 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):
- status
- Success (1) or failure (0) of the operation
- log
- Error message if command returns {status 0}
- state
The state of the VTEP device.
STOPPED Stopped and left multicasts groups
STARTED Joined multicast groups (if necessary) and sent out ARPs
- learned_binding_count
- Number of binding VM devices learned
- load_profile_run_state
- State of the load profile
- resolved_vm_macs_count
- Number of resolved VM MAC addresses
- unresolved_vm_macs_count
- Number of unresolved VM MAC addresses
- ovsdb_write_count
- Number of write count
- ovsdb_read_count
- Number of read count
- ovsdb_state
- State of the OVSDB server
- Description:
- The
emulation vxlan ovsdb stats
function retrieves VTEP configuration results and OVSDB Server results for a specified VTEP device. - Examples:
To get statistics from VTEP devices under the specified ports:
set results [emulation vxlan ovsdb stats port_handle= "$port1 $port2" ]
Sample Output:
{emulateddevice3 {{unresolved_vm_macs_count 0} {load_profile_run_state false} {resolved_vm_macs_count 0} {learned_binding_count 0} {state STOPPED} {{ovsdb_write_count 0} {ovsdb_read_count 0} {ovsdb_state STOPPED}}}} {emulateddevice1 {{unresolved_vm_macs_count 0} {load_profile_run_state false} {resolved_vm_macs_count 0} {learned_binding_count 0} {state STOPPED} {{ovsdb_write_count 0} {ovsdb_read_count 0} {ovsdb_state STOPPED}}}} {status 1}
To get the statistics from the specified VTEP device:
set results [emulation vxlan ovsdb stats handle= $vtep1 ]
Sample Output:
{emulateddevice1 {{unresolved_vm_macs_count 0} {load_profile_run_state false} {resolved_vm_macs_count 0} {learned_binding_count 0} {state STOPPED} {{ovsdb_write_count 0} {ovsdb_read_count 0} {ovsdb_state STOPPED}}}} {status 1}