3.9. overlay

3.9.1. gre suite

3.9.1.1. Create GRE tunnel interface and set it up

Create GRE tunnel interface and set it up on defined VPP node and put the interface to UP state.

Arguments: - dut_node - DUT node where to create GRE tunnel. Type: dictionary - source_ip_address - GRE tunnel source IP address. Type: string - destination_ip_address - GRE tunnel destination IP address. Type: string

Return: - name - Name of created GRE tunnel interface. Type: string - index - SW interface index of created GRE tunnel interface. Type: integer

Example:

| ${gre_name} | ${gre_index}= | Create GRE tunnel interface and set it up | ${dut} | 192.0.1.1 | 192.0.1.2 |


${name}  ${index}=  Create GRE tunnel interface  ${dut_node}  ${source_ip_address}  ${destination_ip_address}
Set Interface State  ${dut_node}  ${index}  up

3.9.1.2. Send ICMPv4 and check received GRE header

Send ICMPv4 packet and check if received packed contains correct GRE, IP, MAC headers.

Arguments: - tg_node - Node where to run traffic script. Type: dictionary - tx_if - Interface from where send ICPMv4 packet. Type: string - rx_if - Interface where to receive GRE packet. Type: string - tx_dst_mac - Destination MAC address of ICMP packet. Type: string - rx_dst_mac - Expected destination MAC address of GRE packet. Type: string - inner_src_ip - Source IP address of ICMP packet. Type: string - inner_dst_ip - Destination IP address of ICMP packet. Type: string - outer_src_ip - Source IP address of GRE packet. Type: string - outer_dst_ip - Destination IP address of GRE packet. Type: string

Return: - No value returned

Example:

| Send ICMPv4 and check received GRE header | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} | ${tx_dst_mac} | ${rx_dst_mac} | ${net1_host_address} | ${net2_host_address} | ${dut1_ip_address} | ${dut2_ip_address} |


${tx_if_name}=  Get interface name  ${tg_node}  ${tx_if}
${rx_if_name}=  Get interface name  ${tg_node}  ${rx_if}
${args}=  Catenate  --tx_if  ${tx_if_name}  --rx_if  ${rx_if_name}  --tx_dst_mac  ${tx_dst_mac}  --rx_dst_mac  ${rx_dst_mac}  --inner_src_ip  ${inner_src_ip}  --inner_dst_ip  ${inner_dst_ip}  --outer_src_ip  ${outer_src_ip}  --outer_dst_ip  ${outer_dst_ip}
Run Traffic Script On Node  send_icmp_check_gre_headers.py  ${tg_node}  ${args}

3.9.1.3. Send GRE and check received ICMPv4 header

Send IPv4 ICMPv4 packet encapsulated into GRE and check IP, MAC headers on received packed.

Arguments: - tg_node - Node where to run traffic script. Type: dictionary - tx_if - Interface from where send ICPMv4 packet. Type: string - rx_if - Interface where receive GRE packet. Type: string - tx_dst_mac - Destination MAC address of GRE packet. Type: string - rx_dst_mac - Expected destination MAC address of ICMP packet. Type: string - inner_src_ip - Source IP address of ICMP packet. Type: string - inner_dst_ip - Destination IP address of ICMP packet. Type: string - outer_src_ip - Source IP address of GRE packet. Type: string - outer_dst_ip - Destination IP address of GRE packet. Type: string

Return: - No value returned

Example:

| Send GRE and check received ICMPv4 header | ${tg_node} | ${tg_to_dut_if2} | ${tg_to_dut_if1} | ${tx_dst_mac} | ${rx_dst_mac} | ${net2_host_address} | ${net1_host_address} | ${dut2_ip_address} | ${dut1_ip_address} |


${tx_if_name}=  Get interface name  ${tg_node}  ${tx_if}
${rx_if_name}=  Get interface name  ${tg_node}  ${rx_if}
${args}=  Catenate  --tx_if  ${tx_if_name}  --rx_if  ${rx_if_name}  --tx_dst_mac  ${tx_dst_mac}  --rx_dst_mac  ${rx_dst_mac}  --inner_src_ip  ${inner_src_ip}  --inner_dst_ip  ${inner_dst_ip}  --outer_src_ip  ${outer_src_ip}  --outer_dst_ip  ${outer_dst_ip}
Run Traffic Script On Node  send_gre_check_icmp_headers.py  ${tg_node}  ${args}

3.9.1.4. Send GRE and check received GRE header

Send IPv4 UDP packet encapsulated into GRE and check if received packed contains correct MAC GRE, IP, UDP headers.

Arguments: - tg_node - Node where to run traffic script. Type: dictionary - tx_if - Interface from where send GRE packet. Type: string - rx_if - Interface where to receive GRE packet. Type: string - tx_dst_mac - Destination MAC address of transferred packet. Type: string - tx_src_mac - Source MAC address of transferred packet. Type: string - tx_outer_dst_ip - Destination IP address of GRE packet. Type: string - tx_outer_src_ip - Source IP address of GRE packet. Type: string - tx_inner_dst_ip - Destination IP address of UDP packet. Type: string - tx_inner_src_ip - Source IP address of UDP packet. Type: string - rx_dst_mac - Expected destination MAC address. Type: string - rx_src_mac - Expected source MAC address. Type: string - rx_outer_dst_ip - Expected destination IP address of received GRE packet. Type: string - rx_outer_src_ip - Expected source IP address of received GRE packet. Type: string

__Note:__ rx_inner_dst_ip and rx_inner_src_ip should be same as transferred

Return: - No value returned

Example: | Send GRE and check received GRE header | ${tg_node} | port3 | port3 | 08:00:27:f3:be:f0 | 08:00:27:46:2b:4c | 10.0.0.1 | 10.0.0.2 | 192.168.3.100 | 192.168.2.100 | 08:00:27:46:2b:4c | 08:00:27:f3:be:f0 | 10.0.0.3 | 10.0.0.1 |


${tx_if_name}=  Get interface name  ${tg_node}  ${tx_if}
${rx_if_name}=  Get interface name  ${tg_node}  ${rx_if}
${args}=  Catenate  --tx_if  ${tx_if_name}  --rx_if  ${rx_if_name}  --tx_dst_mac  ${tx_dst_mac}  --tx_src_mac  ${tx_src_mac}  --tx_outer_dst_ip  ${tx_outer_dst_ip}  --tx_outer_src_ip  ${tx_outer_src_ip}  --tx_inner_dst_ip  ${tx_inner_dst_ip}  --tx_inner_src_ip  ${tx_inner_src_ip}  --rx_dst_mac  ${rx_dst_mac}  --rx_src_mac  ${rx_src_mac}  --rx_outer_dst_ip  ${rx_outer_dst_ip}  --rx_outer_src_ip  ${rx_outer_src_ip}
Run Traffic Script On Node  send_gre_check_gre_headers.py  ${tg_node}  ${args}

3.9.2. l2lisp suite

3.9.2.1. Configure L2 LISP on DUT

Set up LISP L2 topology.

Arguments: - dut_node - DUT node. Type: dictionary - adjacency - DUT static adjacency settings. Type: dict - settings - DUT other LISP related settings. Type: dict

Return: - No value returned

Example: | Configure L2 LISP on DUT | ${dut_node} | ${adjacency} | ${settings} |


${int_idx}=  Get Interface Sw Index  ${dut_node}  ${${adjacency['int']}}
Enable Lisp  ${dut_node}
Vpp Add Lisp Locator Set  ${dut_node}  ${settings['locator_name']}
Vpp Add Lisp Locator  ${dut_node}  ${settings['locator_name']}  ${int_idx}  ${settings['priority']}  ${settings['weight']}
Vpp Lisp Eid Table Mapping  ${dut_node}  ${settings['vni']}  bd_id=${settings['bd']}
Vpp Add Lisp Local Eid  ${dut_node}  ${settings['locator_name']}  ${settings['vni']}  ${adjacency['seid']}
Vpp Add Map Resolver  ${dut_node}  ${adjacency['map_res']}
Vpp Add Lisp Remote Mapping  ${dut_node}  ${settings['vni']}  ${adjacency['eid']}  0  ${adjacency['seid']}  0  ${adjacency['rloc']}  is_mac=${TRUE}
Vpp Add Lisp Adjacency  ${dut_node}  ${settings['vni']}  ${adjacency['eid']}  0  ${adjacency['seid']}  0  is_mac=${TRUE}

3.9.3. lisp_api suite

3.9.3.1. Generate LISP locator_set data

Generate lisp locator_set data for test the lisp locator_set and locator API.

Arguments: - dut_node - DUT node. Type: dictionary - locator_set_number - Number how many locator_set data will be generated. Type: integer

Return: - No value returned

_NOTE:_ This KW sets following test case variables: - locator_set_values - New generated locator_set data. - locator_set_values_vat - New generated locator_set data expectedfrom VAT.

Example: | Given Generate LISP locator_set data | ${nodes[‘DUT1’]} | ${locator_set_number} |


${locator_set_values}  ${locator_set_values_vat}=  Generate Unique Lisp Locator Set Data  ${dut_node}  ${locator_set_number}
Set Test Variable  ${locator_set_values}
Set Test Variable  ${locator_set_values_vat}

3.9.3.2. Configure LISP locator_set data

Set the lisp locator_set and locator on the VPP node.

Arguments: - dut_node - DUT node. Type: dictionary

Return: - No value returned

_NOTE:_ This KW requires following test case variables: - locator_set_values - Generated locator_set data from KW locator_set data is prepared, which will be set on the VPP node.

Example: | When Configure LISP locator_set data | ${nodes[‘DUT1’]} |


Vpp Set Lisp Locator Set  ${dut_node}  ${locator_set_values}

3.9.3.3. LISP locator_set shpuld be configured correctly

Test if the locator_set is set correctly on the VPP node.

Arguments: - dut_node - DUT node. Type: dictionary

Return: - No value returned

_NOTE:_ This KW requires following test case variables: - locator_set_values_vat - Generated locator_set data from KW locator_set data is prepared, which are expected from VPP via VAT.

Example: | Then LISP locator_set should be configured correctly | ${nodes[‘DUT1’]} |


${show_locator_set}=  Vpp Show Lisp Locator Set  ${dut_node}  local
Lisp Locator S Should Be Equal  ${locator_set_values_vat}  ${show_locator_set}

3.9.3.4. Delete all LISP locator_set from VPP

Delete all lisp locator_set on the VPP node.

Arguments: - dut_node - DUT node. Type: dictionary

Return: - No value returned

_NOTE:_ This KW requires following test case variables: - locator_set_values - Generated locator_set data from KW locator_set data is prepared, which was set on the VPP node.

Example: | When Delete all LISP locator_set from VPP | ${nodes[‘DUT1’]} |


Vpp Unset Lisp Locator Set  ${dut_node}  ${locator_set_values}

3.9.3.5. LISP locator_set should be unset

Test if all locator_set are unset from VPP node.

Arguments: - dut_node - DUT node. Type: dictionary

Return: - No value returned

Example: | Then LISP locator_set should be unset | ${nodes[‘DUT1’]} |


${show_locator_set}=  Vpp Show Lisp Locator Set  ${dut_node}  ${EMPTY}
Lisp Is Empty  ${show_locator_set}

3.9.3.6. Lisp locator_set data use for test reset locator_set are prepared

Generate lisp special type of locator_set data. This data will be use for test reset locator_set.

Arguments: - dut_node - DUT node. Type: dictionary - locator_set_number - Number how many locator_set data it will generate. Type: integer

Return: - No value returned

_NOTE:_ This KW sets following test case variables: - locator_set_values - New generate locator_set data. - locator_set_values_vat - New generated locator_set data expectedfrom VAT.

Example: | Given Lisp locator_set data use for test reset locator_set are prepared | ${nodes[‘DUT1’]} | ${locator_set_number} |


${locator_set_values}  ${locator_set_values_vat}=  Generate Duplicate Lisp Locator Set Data  ${dut_node}  ${locator_set_number}
Set Test Variable  ${locator_set_values}
Set Test Variable  ${locator_set_values_vat}

3.9.3.7. Configure LISP eid address

Set the lisp eid address on the VPP node.

Arguments: - dut_node - DUT node. Type: dictionary - set_eid - Test eid data. Type: list

Return: - No value returned

Example: | When Configure LISP eid address | ${nodes[‘DUT1’]} | ${eid_table} |


Vpp Set Lisp Eid Table  ${dut_node}  ${set_eid}

3.9.3.8. LISP eid address should be set correctly to eid table

Test if the locator_set is set correctly on the VPP node.

Arguments: - dut_node - DUT node. Type: dictionary - set_eid - Example eid data, which was set to the VPP node. Type: list

Return: - No value returned

_NOTE:_ This KW requires following test case variables: - set_eid - Generated eid data, which will be set to the VPP node.

Example: | Then LISP eid address should be set correctly to eid table | ${nodes[‘DUT1’]} | ${eid_table} |


${show_eid}=  Vpp Show Lisp Eid Table  ${dut_node}
Lisp Should Be Equal  ${set_eid}  ${show_eid}

3.9.3.9. Delete all LISP eid address from VPP

Delete all lisp eid address from the VPP node.

Arguments: - dut_node - DUT node. Type: dictionary - set_eid - Eid data which will be removed from the VPP node. Type: list

Return: - No value returned

Example: | When Delete all LISP eid address from VPP | ${nodes[‘DUT1’]} | ${eid_table} |


Vpp Unset Lisp Eid Table  ${dut_node}  ${set_eid}

3.9.3.10. LISP eid table should be empty

Test if the eid table is empty.

Arguments: - dut_node - DUT node. Type: dictionary

Return: - No value returned

Example: | Then LISP eid table should be empty | ${nodes[‘DUT1’]} |


${show_eid}=  Vpp Show Lisp Eid Table  ${dut_node}
Lisp Is Empty  ${show_eid}

3.9.3.11. Configure LISP map resolver address

Set the lisp map resolver address in the VPP node.

Arguments: - dut_node - DUT node. Type: dictionary - set_map_resolver - Map resolver data, which will be set on the VPP node. Type: list

Return: - No value returned

Example: | When Configure LISP map resolver address | ${nodes[‘DUT1’]} | ${map_resolver} |


Vpp Set Lisp Map Resolver  ${dut_node}  ${set_map_resolver}

3.9.3.12. LISP map resolver address should be configured correctly

Test if the map resolver address is set correctly on the VPP node.

Arguments: - dut_node - DUT node. Type: dictionary - set_map_resolver - Map resolver data, which was set on the VPP node. Type: list

Return: - No value returned

Example: | Then LISP map resolver address should be configured correctly | ${nodes[‘DUT1’]} | ${map_resolver} |


${show_map_resolver}=  Vpp Show Lisp Map Resolver  ${dut_node}
Lisp Should Be Equal  ${set_map_resolver}  ${show_map_resolver}

3.9.3.13. Delete all LISP map resolver address from VPP

Delete all lisp map resolver address on the VPP node.

Arguments: - dut_node - DUT node. Type: dictionary - map_resolver - Map resolver data, which will be remove from the VPP. Type: list

Return: - No value returned

Example: | When Delete all LISP map resolver address from VPP | ${nodes[‘DUT1’]} | ${map_resolver} |


Vpp Unset Lisp Map Resolver  ${dut_node}  ${set_map_resolver}

3.9.3.14. LISP map resolver address should be empty

Test if the map resolver are empty.

Arguments: - dut_node - DUT node. Type: dictionary

Return: - No value returned

Example: | Then LISP map resolver address should be empty | ${nodes[‘DUT1’]} |


${show_map_resolver}=  Vpp Show Lisp Map Resolver  ${dut_node}
Lisp Is Empty  ${show_map_resolver}

3.9.3.15. Enable LISP

Enable LISP on VPP node.

Arguments: - dut_node - DUT node. Type: dictionary

Return: - No value returned

Example: | Enable LISP | ${nodes[‘DUT1’]} |


Vpp Lisp Enable Disable  ${dut_node}  enable

3.9.3.16. LISP should be enabled

Check if the lisp is enabled.

Arguments: - dut_node - DUT node. Type: dictionary - lisp_status_data - Lisp status data, which was set on the VPP node. Type: list

Return: - No value returned

Example: | LISP should be enabled | ${nodes[‘DUT1’]} | ${lisp_status_data} |


${show_lisp_stat}=  Vpp Show Lisp State  ${dut_node}
Lisp Should Be Equal  ${show_lisp_stat}  ${lisp_status_data[1]}

3.9.3.17. Disable LISP

Disable LISP on VPP node.

Arguments: - dut_node - DUT node. Type: dictionary

Return: - No value returned

Example: | Disable LISP | ${nodes[‘DUT1’]} |


Vpp Lisp Enable Disable  ${dut_node}  disable

3.9.3.18. LISP Should be disabled

LISP Should be disabled.

Arguments: - dut_node - DUT node. Type: dictionary - lisp_status_data - Lisp status data, which was set on the VPP node. Type: list

Return: - No value returned

Example: | LISP Should be disabled | ${nodes[‘DUT1’]} | ${lisp_status_data} |


${show_lisp_stat}=  Vpp Show Lisp State  ${dut_node}
Lisp Should Be Equal  ${show_lisp_stat}  ${lisp_status_data[0]}

3.9.3.19. Enable Lisp Gpe

Enable Lisp Gpe on VPP node.

Arguments: - dut_node - DUT node. Type: dictionary

Return: - No value returned

Example: | Enable Lisp Gpe | ${nodes[‘DUT1’]} |


Vpp Lisp Gpe Enable Disable  ${dut_node}  enable

3.9.3.20. Disable Lisp Gpe

Disable Lisp Gpe on VPP node.

Arguments: - dut_node - DUT node. Type: dictionary

Return: - No value returned

Example: | Disable Lisp Gpe | ${nodes[‘DUT1’]} |


Vpp Lisp Gpe Enable Disable  ${dut_node}  disable

3.9.4. lisp_static_adjacency suite

3.9.4.1. Configure LISP topology in 3-node circular topology

Set up Lisp static adjacency topology.

Arguments: - dut1_node - DUT1 node. Type: dictionary - dut1_int_name - DUT1 node interface name. Type: string - dut1_int_index - DUT1 node interface index. Type: integer - dut2_node - DUT2 node. Type: dictionary - dut2_int_name - DUT2 node interface name. Type: string - dut2_int_index - DUT2 node interface index. Type: integer - locator_set - Locator set values. Type: dictionary - dut1_eid - Dut1 node eid address. Type: dictionary - dut2_eid - Dut2 node eid address. Type: dictionary - dut1_static_adjacency - Dut1 static adjacency. Type: dictionary - dut2_static_adjacency - Dut2 static address. Type: dictionary

Return: - No value returned

Example: | Configure LISP topology in 3-node circular topology | ${dut1_node} | ${interface_name} | None | ${dut2_node} | ${interface_name} | None | ${locator_set} | ${dut1_eid} | ${dut2_eid} | ${dut1_static_adjacency} | ${dut2_static_adjacency} |


${dut1_int_index}=  Run Keyword If  ${dut1_int_index} is None  Get Interface Sw Index  ${dut1_node}  ${dut1_int_name}  ELSE  Set Variable  ${dut1_int_index}
${dut2_int_index}=  Run Keyword If  ${dut2_int_index} is None  Get Interface Sw Index  ${dut2_node}  ${dut2_int_name}  ELSE  Set Variable  ${dut2_int_index}
Enable Lisp  ${dut1_node}
Vpp Add Lisp Locator Set  ${dut1_node}  ${locator_set['locator_name']}
Vpp Add Lisp Locator  ${dut1_node}  ${locator_set['locator_name']}  ${dut1_int_index}  ${locator_set['priority']}  ${locator_set['weight']}
Vpp Add Lisp Local Eid  ${dut1_node}  ${dut1_eid['locator_name']}  ${dut1_eid['vni']}  ${dut1_eid['eid']}  ${dut1_eid['prefix']}
Vpp Add Lisp Remote Mapping  ${dut1_node}  ${dut1_static_adjacency['vni']}  ${dut1_static_adjacency['deid']}  ${dut1_static_adjacency['prefix']}  ${dut1_static_adjacency['seid']}  ${dut1_static_adjacency['prefix']}  ${dut1_static_adjacency['rloc']}
Vpp Add Lisp Adjacency  ${dut1_node}  ${dut1_static_adjacency['vni']}  ${dut1_static_adjacency['deid']}  ${dut1_static_adjacency['prefix']}  ${dut1_static_adjacency['seid']}  ${dut1_static_adjacency['prefix']}
Enable Lisp  ${dut2_node}
Vpp Add Lisp Locator Set  ${dut2_node}  ${locator_set['locator_name']}
Vpp Add Lisp Locator  ${dut2_node}  ${locator_set['locator_name']}  ${dut2_int_index}  ${locator_set['priority']}  ${locator_set['weight']}
Vpp Add Lisp Local Eid  ${dut2_node}  ${dut2_eid['locator_name']}  ${dut2_eid['vni']}  ${dut2_eid['eid']}  ${dut2_eid['prefix']}
Vpp Add Lisp Remote Mapping  ${dut2_node}  ${dut2_static_adjacency['vni']}  ${dut2_static_adjacency['deid']}  ${dut2_static_adjacency['prefix']}  ${dut2_static_adjacency['seid']}  ${dut2_static_adjacency['prefix']}  ${dut2_static_adjacency['rloc']}
Vpp Add Lisp Adjacency  ${dut2_node}  ${dut2_static_adjacency['vni']}  ${dut2_static_adjacency['deid']}  ${dut2_static_adjacency['prefix']}  ${dut2_static_adjacency['seid']}  ${dut2_static_adjacency['prefix']}

3.9.4.2. Change LISP Configuration

Change configuration of the Lisp protocol.

Arguments: - dut1_node - DUT1 node. Type: dictionary - dut2_node - DUT2 node. Type: dictionary - dut1_to_dut2 - DUT1 towards DUT2 interface name. Type: string - dut2_to_dut1 - DUT2 towards DUT1 interface name. Type: string - dut1_to_dut2_mac - DUT1 towards DUT2 interface mac address. Type: string - dut2_to_dut1_mac - DUT2 towards DUT1 interface mac address. Type: string - new_dut1_ip - New DUT1 towards DUT2 interface IP address. Type: string - new_dut2_ip - New DUT2 towards DUT1 interface IP address. Type: string - prefix - Prefix of the DUT nodes. Type: integer - old_dut1_static_adjacency - Old DUT1 static adjacency. Type: dictionary - new_dut1_static_adjacency - New DUT1 static adjacency. Type: dictionary

Return: - No value returned

Example: | Change LISP Configuration | ${dut1_node} | ${dut2_node} | ${dut1_to_dut2} | ${dut2_to_dut1} “08:00:27:20:e0:0d” | “08:00:27:b1:94:b1” | “6.3.0.1” | “6.3.0.20” | “24” | ${old_dut1_static_adjacency} | ${new_dut1_static_adjacency} |


Flush IPv4 Addresses "${dut2_to_dut1}" "${dut2_node}"
Vpp Del Lisp Remote Mapping  ${dut1_node}  ${old_dut1_static_adjacency['vni']}  ${old_dut1_static_adjacency['deid']}  ${old_dut1_static_adjacency['prefix']}  ${old_dut1_static_adjacency['seid']}  ${old_dut1_static_adjacency['prefix']}  ${old_dut1_static_adjacency['rloc']}
Vpp Del Lisp Adjacency  ${dut1_node}  ${old_dut1_static_adjacency['vni']}  ${old_dut1_static_adjacency['deid']}  ${old_dut1_static_adjacency['prefix']}  ${old_dut1_static_adjacency['seid']}  ${old_dut1_static_adjacency['prefix']}
Set Interface Address  ${dut2_node}  ${dut2_to_dut1}  ${new_dut2_ip}  ${prefix}
Add Arp On Dut  ${dut1_node}  ${dut1_to_dut2}  ${new_dut2_ip}  ${dut2_to_dut1_mac}
Add Arp On Dut  ${dut2_node}  ${dut2_to_dut1}  ${new_dut1_ip}  ${dut1_to_dut2_mac}
Vpp Add Lisp Remote Mapping  ${dut1_node}  ${new_dut1_static_adjacency['vni']}  ${new_dut1_static_adjacency['deid']}  ${new_dut1_static_adjacency['prefix']}  ${new_dut1_static_adjacency['seid']}  ${new_dut1_static_adjacency['prefix']}  ${new_dut1_static_adjacency['rloc']}
Vpp Add Lisp Adjacency  ${dut1_node}  ${new_dut1_static_adjacency['vni']}  ${new_dut1_static_adjacency['deid']}  ${new_dut1_static_adjacency['prefix']}  ${new_dut1_static_adjacency['seid']}  ${new_dut1_static_adjacency['prefix']}

3.9.5. lispgpe suite

3.9.5.1. Configure LISP GPE topology in 3-node circular topology

Configure LISP GPE topology in 3-node circular topology.

Arguments: - dut1_node - DUT1 node. Type: dictionary - dut1_if - DUT1 node interface. Type: string - dut1_int_index - DUT1 node interface index. Type: integer - dut2_node - DUT2 node. Type: dictionary - dut2_if - DUT2 node interface. Type: string - dut2_int_index - DUT2 node interface index. Type: integer - locator_set - Locator set values. Type: dictionary - dut1_eid - DUT1 node eid address. Type: dictionary - dut2_eid - DUT2 node eid address. Type: dictionary - dut1_static_adjacency - DUT1 static adjacency. Type: dictionary - dut2_static_adjacency - DUT2 static adjacency. Type: dictionary

Return: - No value returned

Example: | Configure LISP GPE topology in 3-node circular topology | ${dut1_node} | ${interface_name} | None | ${dut2_node} | ${interface_name} | None | ${locator_set} | ${dut1_eid} | ${dut2_eid} | ${dut1_static_adjacency} | ${dut2_static_adjacency} |


${dut1_int_index}=  Run Keyword If  ${dut1_int_index} is None  Get Interface Sw Index  ${dut1_node}  ${dut1_if}  ELSE  Set Variable  ${dut1_int_index}
Enable Lisp  ${dut1_node}
Enable Lisp GPE  ${dut1_node}
Vpp Add Lisp Locator Set  ${dut1_node}  ${locator_set['locator_name']}
Vpp Add Lisp Locator  ${dut1_node}  ${locator_set['locator_name']}  ${dut1_int_index}  ${locator_set['priority']}  ${locator_set['weight']}
Vpp Lisp Eid Table Mapping  ${dut1_node}  ${vni_table}  vrf=${vrf_table}
Vpp Add Lisp Local Eid  ${dut1_node}  ${dut1_eid['locator_name']}  ${vni_table}  ${dut1_eid['eid']}  ${dut1_eid['prefix']}
Vpp Add Lisp Remote Mapping  ${dut1_node}  ${vni_table}  ${dut1_static_adjacency['deid']}  ${dut1_static_adjacency['prefix']}  ${dut1_static_adjacency['seid']}  ${dut1_static_adjacency['prefix']}  ${dut1_static_adjacency['rloc']}
Vpp Add Lisp Adjacency  ${dut1_node}  ${vni_table}  ${dut1_static_adjacency['deid']}  ${dut1_static_adjacency['prefix']}  ${dut1_static_adjacency['seid']}  ${dut1_static_adjacency['prefix']}
${dut2_int_index}=  Run Keyword If  ${dut2_int_index} is None  Get Interface Sw Index  ${dut2_node}  ${dut2_if}  ELSE  Set Variable  ${dut2_int_index}
Enable Lisp  ${dut2_node}
Enable Lisp GPE  ${dut2_node}
Vpp Add Lisp Locator Set  ${dut2_node}  ${locator_set['locator_name']}
Vpp Add Lisp Locator  ${dut2_node}  ${locator_set['locator_name']}  ${dut2_int_index}  ${locator_set['priority']}  ${locator_set['weight']}
Vpp Lisp Eid Table Mapping  ${dut2_node}  ${vni_table}  vrf=${vrf_table}
Vpp Add Lisp Local Eid  ${dut2_node}  ${dut2_eid['locator_name']}  ${vni_table}  ${dut2_eid['eid']}  ${dut2_eid['prefix']}
Vpp Add Lisp Remote Mapping  ${dut2_node}  ${vni_table}  ${dut2_static_adjacency['deid']}  ${dut2_static_adjacency['prefix']}  ${dut2_static_adjacency['seid']}  ${dut2_static_adjacency['prefix']}  ${dut2_static_adjacency['rloc']}
Vpp Add Lisp Adjacency  ${dut2_node}  ${vni_table}  ${dut2_static_adjacency['deid']}  ${dut2_static_adjacency['prefix']}  ${dut2_static_adjacency['seid']}  ${dut2_static_adjacency['prefix']}

3.9.6. srv6 suite

3.9.6.1. Configure SR LocalSID on DUT

Create SRv6 LocalSID and binds it to a particularbehavior on the given DUT node.

Arguments: - dut_node - DUT node where to create localSID on. Type: dictionary - local_sid - LocalSID IPv6 address. Type: string - behavior - SRv6 LocalSID function. Type: string - interface - Interface name (Optional, default value: None; required for L2/L3 xconnects). Type: string - next_hop - Next hop IPv4/IPv6 address (Optional, default value: None; required for L3 xconnects). Type: string - fib_table - FIB table for IPv4/IPv6 lookup (Optional, default value: None; required for L3 routing). Type: string - out_if - Interface name of local interface for sending traffic towards the Service Function (Optional, default value: None; required for SRv6 endpoint to SR-unaware appliance). Type: string - in_if - Interface name of local interface receiving the traffic coming back from the Service Function (Optional, default value: None; required for SRv6 endpoint to SR-unaware appliance). Type: string - src_addr - Source address on the packets coming back on in_if interface (Optional, default value: None; required for SRv6 endpoint to SR-unaware appliance via static proxy). Type: string - sid_list - SID list (Optional, default value: []; required for SRv6 endpoint to SR-unaware appliance via static proxy). Type: list

Example:

| Configure SR LocalSID on DUT | ${nodes[‘DUT1’]} | B:: | end | | Configure SR LocalSID on DUT | ${nodes[‘DUT1’]} | C:: | end.dx2 | interface=GigabitEthernet0/10/0 | | Configure SR LocalSID on DUT | ${nodes[‘DUT1’]} | D:: | end.dx4 | interface=GigabitEthernet0/8/0 | next_hop=10.0.0.1 | | Configure SR LocalSID on DUT | ${nodes[‘DUT2’]} | E:: | end.dt6 | fib_table=2 | | Configure SR LocalSID on DUT | ${nodes[‘DUT2’]} | E:: | end.ad | next_hop=10.0.0.1 | out_if=DUT2_VHOST1 | in_if=DUT2_VHOST2 | | Configure SR LocalSID on DUT | ${nodes[‘DUT2’]} | E:: | end.as | next_hop=10.0.0.1 | out_if=DUT2_VHOST1 | in_if=DUT2_VHOST2 | src_addr=B:: | sid_list=[‘C::’, ‘D::’] |


Configure SR LocalSID  ${dut_node}  ${local_sid}  ${behavior}  interface=${interface}  next_hop=${next_hop}  fib_table=${fib_table}  out_if=${out_if}  in_if=${in_if}  src_addr=${src_addr}  sid_list=${sid_list}

3.9.6.2. Delete SR LocalSID on DUT

Delete SRv6 LocalSID on the given DUT node.

Arguments: - dut_node - DUT node where to delete localSID on. Type: dictionary - local_sid - LocalSID IPv6 address. Type: string

Example:

| Delete SR LocalSID on DUT | ${nodes[‘DUT1’]} | B:: |


Delete SR LocalSID  ${dut_node}  ${local_sid}

3.9.6.3. Show SR LocalSIDs on DUT

Show SRv6 LocalSIDs on the given DUT node.

Arguments: - dut_node - DUT node where to show SR localSIDs on. Type: dictionary

Example:

| Show SR LocalSIDs on DUT | ${nodes[‘DUT1’]} |


Show SR LocalSIDs  ${dut_node}

3.9.6.4. Configure SR Policy on DUT

Create SRv6 policy on the given DUT node.

Arguments: - dut_node - DUT node where to create SRv6 policy on. Type: dictionary - bsid - BindingSID - local SID IPv6 address. Type: string - mode - Encapsulation / insertion mode. Type: string - sid_list - SID list. Type: list

Example:

| Configure SR Policy on DUT | ${nodes[‘DUT2’]} | A:: | encap | B::| C:: | | Configure SR Policy on DUT | ${nodes[‘DUT2’]} | D:: | insert | E::| F:: |


Configure SR Policy  ${dut_node}  ${bsid}  ${sid_list}  mode=${mode}

3.9.6.5. Delete SR Policy on DUT

Delete SRv6 policy on the given DUT node.

Arguments: - dut_node - DUT node where to delete SRv6 policy on. Type: dictionary - bsid - BindingSID - local SID IPv6 address. Type: string

Example:

| Delete SR Policy on DUT | ${nodes[‘DUT1’]} | A:: |


Delete SR Policy  ${dut_node}  ${bsid}

3.9.6.6. Show SR Policies on DUT

Show SRv6 policies on the given DUT node.

Arguments: - dut_node - DUT node where to show SR policies on. Type: dictionary

Example:

| Show SR Policies on DUT | ${nodes[‘DUT1’]} |


Show SR Policies  ${dut_node}

3.9.6.7. Configure SR Steer on DUT

Create SRv6 steering policy on the given DUT node.

Arguments: - dut_node - DUT node where to create SR steering policy on. Type: dictionary - mode - Mode of operation - L2 or L3. Type: string - bsid - BindingSID - local SID IPv6 address. Type: string - interface - Interface name (Optional, default value: None; required in case of L2 mode). Type: string - ip_addr - IPv4/IPv6 address (Optional, default value: None; required in case of L3 mode). Type: string - prefix - IP address prefix (Optional, default value: None; required for L3 mode). Type: integer

Example:

| Configure SR Steer on DUT | ${nodes[‘DUT1’]} | L2 | B:: | interface=GigabitEthernet0/10/0 | | Configure SR Steer on DUT | ${nodes[‘DUT1’]} | L3 | C:: | ip_address=2001::1 | prefix=64 |


Configure SR Steer  ${dut_node}  ${mode}  ${bsid}  interface=${interface}  ip_addr=${ip_addr}  prefix=${prefix}

3.9.6.8. Delete SR Steer on DUT

Delete SRv6 steering policy on the given DUT node.

Arguments: - dut_node - DUT node where to delete SR steering policy on. Type: dictionary - mode - Mode of operation - L2 or L3. Type: string - bsid - BindingSID - local SID IPv6 address. Type: string - interface - Interface name (Optional, default value: None; required in case of L2 mode). Type: string - ip_addr - IPv4/IPv6 address (Optional, default value: None; required in case of L3 mode). Type: string - prefix - IP address prefix (Optional, default value: None; required for L3 mode). Type: integer

Example:

| Delete SR Steer on DUT | ${nodes[‘DUT1’]} | L2 | B:: | interface=GigabitEthernet0/10/0 | | Delete SR Steer on DUT | ${nodes[‘DUT1’]} | L3 | C:: | ip_address=2001::1 | prefix=64 |


Delete SR Steer  ${dut_node}  ${mode}  ${bsid}  interface=${interface}  ip_addr=${ip_addr}  prefix=${prefix}

3.9.6.9. Show SR Steering Policies on DUT

Show SRv6 steering policies on the given DUT node.

Arguments: - dut_node - DUT node where to show SR steering policies on. Type: dictionary

Example:

| Show SR Steering Policies on DUT | ${nodes[‘DUT1’]} |


Show SR Steering Policies  ${dut_node}

3.9.6.10. Set SR Encaps Source Address on DUT

Set SRv6 encapsulation source address on the given DUT node.

Arguments: - dut_node - DUT node where to set SRv6 encapsulation source address on. Type: dictionary - ip6_addr - Local SID IPv6 address. Type: string

Example:

| Set SR Encaps Source Address on DUT | ${nodes[‘DUT1’]} | B:: |


Set SR Encaps Source Address  ${dut_node}  ip6_addr=${ip6_addr}

3.9.6.11. Show SR Policies on all DUTs

Show SRv6 policies on all DUT nodes in topology.

Arguments: - nodes - Topology. Type: dictionary

Example:

| Show SR Policies on all DUTs | ${nodes} |


${duts}=  Get Matches  ${nodes}  DUT*
: FOR  ${dut}  IN  @{duts}
\    Show SR Policies  ${nodes['${dut}']}

3.9.6.12. Show SR Steering Policies on all DUTs

Show SRv6 steering policies on all DUT nodes in topology.

Arguments: - nodes - Topology. Type: dictionary

Example:

| Show SR Steering Policies on all DUTs | ${nodes} |


${duts}=  Get Matches  ${nodes}  DUT*
: FOR  ${dut}  IN  @{duts}
\    Show SR Steering Policies  ${nodes['${dut}']}

3.9.6.13. Show SR LocalSIDs on all DUTs

Show SRv6 LocalSIDs on all DUT nodes in topology.

Arguments: - nodes - Topology. Type: dictionary

Example:

| Show SR LocalSIDs on all DUTs | ${nodes} |


${duts}=  Get Matches  ${nodes}  DUT*
: FOR  ${dut}  IN  @{duts}
\    Show SR LocalSIDs  ${nodes['${dut}']}

3.9.7. vxlan suite

3.9.7.1. Configure IP addresses and neighbors on interfaces

Set IPv4 addresses on interfaces on DUTs. If interface index is None then is determines with Get Interface Sw Index in this case it is required the interface to be present in topology dict. It also executes VPP IP Probe to determine MACs to IPs on DUTs

_Set testcase variables with IP addresses and prefix length:_ - ${dut1s_ip_address} - ${dut2s_ip_address} - ${duts_ip_address_prefix}


Set Test Variable  ${dut1s_ip_address}  172.16.0.1
Set Test Variable  ${dut2s_ip_address}  172.16.0.2
Set Test Variable  ${duts_ip_address_prefix}  24
${DUT1_INT_KEY}=  Run Keyword If  ${DUT1_INT_INDEX} is None  Get Interface by name  ${DUT1}  ${DUT1_INT_NAME}
${DUT2_INT_KEY}=  Run Keyword If  ${DUT2_INT_INDEX} is None  Get Interface by name  ${DUT2}  ${DUT2_INT_NAME}
${DUT1_INT_INDEX}=  Run Keyword If  ${DUT1_INT_INDEX} is None  Get Interface Sw Index  ${DUT1}  ${DUT1_INT_KEY}  ELSE  Set Variable  ${DUT1_INT_INDEX}
${DUT2_INT_INDEX}=  Run Keyword If  ${DUT2_INT_INDEX} is None  Get Interface Sw Index  ${DUT2}  ${DUT2_INT_KEY}  ELSE  Set Variable  ${DUT2_INT_INDEX}
${DUT1_INT_MAC}=  Vpp Get Interface Mac  ${DUT1}  ${DUT1_INT_INDEX}
${DUT2_INT_MAC}=  Vpp Get Interface Mac  ${DUT2}  ${DUT2_INT_INDEX}
Set Interface Address  ${DUT1}  ${DUT1_INT_INDEX}  ${dut1s_ip_address}  ${duts_ip_address_prefix}
Set Interface Address  ${DUT2}  ${DUT2_INT_INDEX}  ${dut2s_ip_address}  ${duts_ip_address_prefix}
Add IP Neighbor  ${DUT1}  ${DUT1_INT_INDEX}  ${dut2s_ip_address}  ${DUT2_INT_MAC}
Add IP Neighbor  ${DUT2}  ${DUT2_INT_INDEX}  ${dut1s_ip_address}  ${DUT1_INT_MAC}

3.9.7.2. Add interfaces to L2BD


Vpp Add L2 Bridge Domain  ${DUT}  ${BID}  ${INTERFACE_1}  ${INTERFACE_2}

3.9.7.3. Create vlan interfaces for VXLAN

Create VLAN subinterface on interfaces on DUTs with given VLAN ID.

_Set testcase variables with name and index of created interfaces:_ - ${dut1s_vlan_name} - ${dut1s_vlan_index} - ${dut2s_vlan_name} - ${dut2s_vlan_index}


${INT1_NAME}=  Get interface name  ${DUT1}  ${INT1}
${INT2_NAME}=  Get interface name  ${DUT2}  ${INT2}
${dut1s_vlan_name}  ${dut1s_vlan_index}=  Create Vlan Subinterface  ${DUT1}  ${INT1_NAME}  ${VLAN}
${dut2s_vlan_name}  ${dut2s_vlan_index}=  Create Vlan Subinterface  ${DUT2}  ${INT2_NAME}  ${VLAN}
Set Interface State  ${DUT1}  ${dut1s_vlan_index}  up
Set Interface State  ${DUT2}  ${dut2s_vlan_index}  up
Set Test Variable  ${dut1s_vlan_name}
Set Test Variable  ${dut1s_vlan_index}
Set Test Variable  ${dut2s_vlan_name}
Set Test Variable  ${dut2s_vlan_index}

3.9.7.4. Send VXLAN encapsulated packet and verify received packet

Send VXLAN encapsulated Ethernet frame and check received one.

Arguments: - tg_node - Node where to run traffic script. Type: dictionary - tx_if - Interface from where send VXLAN packet. Type: string - rx_if - Interface where receive VXLAN packet. Type: string - tx_src_mac - Source MAC address of sent packet. Type: string - tx_dst_mac - Destination MAC address of sent packet. Type: string - tx_src_ip - Source IP address of sent VXLAN packet. Type: string - tx_dst_ip - Destination IP address of sent VXLAN packet. Type: string - tx_vni - VNI of sent VXLAN packet. Type: string - rx_src_ip - Source IP address of received VXLAN packet. Type: string - rx_dst_ip - Destination IP address of received VXLAN packet. Type: string - rx_vni - VNI of received VXLAN packet. Type: string

Return: - No value returned

Example:

| Send VXLAN encapsulated packet and verify received packet | ${tg_node} | port4 | port4 | fa:16:3e:6d:f9:c5 | fa:16:3e:e6:6d:9a | 192.168.0.1 | 192.168.0.2 | ${101} | 192.168.0.2 | 192.168.0.1 | ${102} |


${tx_if_name}=  Get interface name  ${tg_node}  ${tx_if}
${rx_if_name}=  Get interface name  ${tg_node}  ${rx_if}
${args}=  Catenate  --tx_if ${tx_if_name}  --rx_if ${rx_if_name}  --tx_src_mac ${tx_src_mac}  --tx_dst_mac ${tx_dst_mac}  --tx_src_ip ${tx_src_ip}  --tx_dst_ip ${tx_dst_ip}  --tx_vni ${tx_vni}  --rx_src_ip ${rx_src_ip}  --rx_dst_ip ${rx_dst_ip}  --rx_vni ${rx_vni}
Run Traffic Script On Node  send_vxlan_check_vxlan.py  ${tg_node}  ${args}