aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/robot')
-rw-r--r--resources/libraries/robot/overlay/srv6.robot214
-rw-r--r--resources/libraries/robot/shared/traffic.robot61
2 files changed, 198 insertions, 77 deletions
diff --git a/resources/libraries/robot/overlay/srv6.robot b/resources/libraries/robot/overlay/srv6.robot
index 6c73ad4bdf..806cab2f4d 100644
--- a/resources/libraries/robot/overlay/srv6.robot
+++ b/resources/libraries/robot/overlay/srv6.robot
@@ -225,105 +225,142 @@
| | | Show SR LocalSIDs | ${nodes['${dut}']}
| | END
-| Initialize IPv6 forwarding over SRv6 with encapsulation with '${n}' x SID '${prepos}' decapsulation in 3-node circular topology
+| Initialize SRv6 encapsulation with '${n}' x SID '${prepos}' decapsulation
| | [Documentation]
-| | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
+| | ... | Set UP state on VPP interfaces in path on node(s) in circular
| | ... | topology. Get the interface MAC addresses and setup neighbours on all
| | ... | VPP interfaces. Setup IPv6 addresses on all interfaces. Set segment
| | ... | routing for IPv6 for required number of SIDs and configure IPv6 routes
-| | ... | on both DUT nodes.
+| | ... | on DUT node(s).
+| |
+| | ${status} | ${value}= | Run Keyword And Ignore Error
+| | ... | Variable Should Exist | ${dut2}
+| | ${dut2_status}= | Set Variable If | '${status}' == 'PASS' | ${True}
+| | ... | ${False}
| |
| | VPP Interface Set IP Address
| | ... | ${dut1} | ${DUT1_${int}1}[0] | ${dut1_if1_ip6} | ${prefix}
| | VPP Interface Set IP Address
| | ... | ${dut1} | ${DUT1_${int}2}[0] | ${dut1_if2_ip6} | ${prefix}
-| | VPP Interface Set IP Address
+| | Run Keyword If | ${dut2_status}
+| | ... | VPP Interface Set IP Address
| | ... | ${dut2} | ${DUT2_${int}1}[0] | ${dut2_if1_ip6} | ${prefix}
-| | VPP Interface Set IP Address
+| | Run Keyword If | ${dut2_status}
+| | ... | VPP Interface Set IP Address
| | ... | ${dut2} | ${DUT2_${int}2}[0] | ${dut2_if2_ip6} | ${prefix}
| | Vpp All Ra Suppress Link Layer | ${nodes}
| | FOR | ${number} | IN RANGE | 2 | ${dst_addr_nr}+2
| | | ${hexa_nr}= | Convert To Hex | ${number}
-| | | VPP Add IP Neighbor | ${dut1}
-| | | ... | ${DUT1_${int}1}[0] | ${tg_if1_ip6_subnet}${hexa_nr}
+| | | VPP Add IP Neighbor
+| | | ... | ${dut1} | ${DUT1_${int}1}[0] | ${tg_if1_ip6_subnet}${hexa_nr}
| | | ... | ${TG_pf1_mac}[0]
-| | | VPP Add IP Neighbor | ${dut2}
-| | | ... | ${DUT2_${int}2}[0] | ${tg_if2_ip6_subnet}${hexa_nr}
+| | | Run Keyword If | ${dut2_status}
+| | | ... | VPP Add IP Neighbor
+| | | ... | ${dut2} | ${DUT2_${int}2}[0] | ${tg_if2_ip6_subnet}${hexa_nr}
| | | ... | ${TG_pf2_mac}[0]
| | END
-| | VPP Add IP Neighbor
+| | Run Keyword If | ${dut2_status}
+| | ... | VPP Add IP Neighbor
| | ... | ${dut1} | ${DUT1_${int}2}[0] | ${dut2_if1_ip6}
| | ... | ${DUT2_${int}1_mac}[0]
-| | VPP Add IP Neighbor
-| | ... | ${dut2} | ${DUT2_${int}1}[0] | ${dut1_if2_ip6}
-| | ... | ${DUT1_${int}2_mac}[0]
+| | Run Keyword Unless | ${dut2_status}
+| | ... | VPP Add IP Neighbor
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | ${dut2_if1_ip6} | ${TG_pf2_mac}[0]
+| | Run Keyword If | ${dut2_status}
+| | ... | VPP Add IP Neighbor
+| | ... | ${dut2} | ${DUT2_${int}1}[0] | ${dut1_if2_ip6}| ${DUT1_${int}2_mac}[0]
| | ${sid1}= | Set Variable If
| | ... | "${n}" == "1" | ${dut2_sid1}
| | ... | "${n}" == "2" | ${dut2_sid1_1}
| | ${sid2}= | Set Variable If
| | ... | "${n}" == "1" | ${dut1_sid2}
| | ... | "${n}" == "2" | ${dut1_sid2_1}
-| | Vpp Route Add | ${dut1} | ${sid1} | ${sid_prefix} | gateway=${dut2_if1_ip6}
+| | Vpp Route Add
+| | ... | ${dut1} | ${sid1} | ${sid_prefix} | gateway=${dut2_if1_ip6}
| | ... | interface=${DUT1_${int}2}[0]
-| | Vpp Route Add | ${dut2} | ${sid2} | ${sid_prefix} | gateway=${dut1_if2_ip6}
+| | Run Keyword If | ${dut2_status}
+| | ... | Vpp Route Add
+| | ... | ${dut2} | ${sid2} | ${sid_prefix} | gateway=${dut1_if2_ip6}
| | ... | interface=${DUT2_${int}1}[0]
# Configure SRv6 for direction0
-| | Set SR Encaps Source Address on DUT | ${dut1} | ${dut1_sid1}
-| | @{sid_list_dir0}= | Run Keyword If | "${n}" == "1"
+| | Set SR Encaps Source Address on DUT
+| | ... | ${dut1} | ${dut1_sid1}
+| | @{sid_list_dir0}= | Run Keyword If | '${n}' == '1'
| | ... | Create List | ${dut2_sid1}
-| | ... | ELSE IF | "${n}" == "2"
+| | ... | ELSE IF | '${n}' == '2'
| | ... | Create List | ${dut2_sid1_1} | ${dut2_sid1_2}
-| | Configure SR Policy on DUT | ${dut1} | ${dut1_bsid} | encap
-| | ... | @{sid_list_dir0}
-| | Configure SR Steer on DUT | ${dut1} | L3 | ${dut1_bsid}
-| | ... | ip_addr=${tg_if2_ip6_subnet} | prefix=${sid_prefix}
-| | Run Keyword If | "${n}" == "1"
-| | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.dx6
-| | ... | interface=${DUT2_${int}2}[0] | next_hop=${tg_if2_ip6_subnet}2
-| | Run Keyword If | "${n}" == "2"
-| | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1_1} | end
-| | Run Keyword If | "${n}" == "2" and "${prepos}" != "without"
-| | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1_2} | end.dx6
+| | Configure SR Policy on DUT
+| | ... | ${dut1} | ${dut1_bsid} | encap | @{sid_list_dir0}
+| | Configure SR Steer on DUT
+| | ... | ${dut1} | L3 | ${dut1_bsid} | ip_addr=${tg_if2_ip6_subnet}
+| | ... | prefix=${sid_prefix}
+| | Run Keyword If | ${dut2_status} and '${n}' == '1'
+| | ... | Configure SR LocalSID on DUT
+| | ... | ${dut2} | ${dut2_sid1} | end.dx6 | interface=${DUT2_${int}2}[0]
+| | ... | next_hop=${tg_if2_ip6_subnet}2
+| | Run Keyword If | ${dut2_status} and '${n}' == '2'
+| | ... | Configure SR LocalSID on DUT
+| | ... | ${dut2} | ${dut2_sid1_1} | end
+| | Run Keyword If
+| | ... | ${dut2_status} and '${n}' == '2' and '${prepos}' != 'without'
+| | ... | Configure SR LocalSID on DUT
+| | ... | ${dut2} | ${dut2_sid1_2} | end.dx6
| | ... | interface=${DUT2_${int}2}[0] | next_hop=${tg_if2_ip6_subnet}2
-| | Run Keyword If | "${n}" == "2" and "${prepos}" == "without"
-| | ... | Vpp Route Add | ${dut2} | ${dut2_sid1_2} | ${sid_prefix}
+| | Run Keyword If
+| | ... | ${dut2_status} and '${n}' == '2' and '${prepos}' == 'without'
+| | ... | Vpp Route Add
+| | ... | ${dut2} | ${dut2_sid1_2} | ${sid_prefix}
| | ... | gateway=${tg_if2_ip6_subnet}2 | interface=${DUT2_${int}2}[0]
# Configure SRv6 for direction1
-| | Set SR Encaps Source Address on DUT | ${dut2} | ${dut2_sid2}
-| | @{sid_list_dir1}= | Run Keyword If | "${n}" == "1"
+| | Run Keyword If | ${dut2_status}
+| | ... | Set SR Encaps Source Address on DUT
+| | ... | ${dut2} | ${dut2_sid2}
+| | @{sid_list_dir1}= | Run Keyword If | '${n}' == '1'
| | ... | Create List | ${dut1_sid2}
-| | ... | ELSE IF | "${n}" == "2"
+| | ... | ELSE IF | '${n}' == '2'
| | ... | Create List | ${dut1_sid2_1} | ${dut1_sid2_2}
-| | Configure SR Policy on DUT | ${dut2} | ${dut2_bsid} | encap
-| | ... | @{sid_list_dir1}
-| | Configure SR Steer on DUT | ${dut2} | L3 | ${dut2_bsid}
-| | ... | ip_addr=${tg_if1_ip6_subnet} | prefix=${sid_prefix}
-| | Run Keyword If | "${n}" == "1"
-| | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.dx6
-| | ... | interface=${DUT1_${int}1}[0] | next_hop=${tg_if1_ip6_subnet}2
-| | Run Keyword If | "${n}" == "2"
-| | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2_1} | end
-| | Run Keyword If | "${n}" == "2" and "${prepos}" != "without"
-| | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2_2} | end.dx6
-| | ... | interface=${DUT1_${int}1}[0] | next_hop=${tg_if1_ip6_subnet}2
-| | Run Keyword If | "${n}" == "2" and "${prepos}" == "without"
-| | ... | Vpp Route Add | ${dut1} | ${dut1_sid2_2} | ${sid_prefix}
+| | Run Keyword If | ${dut2_status}
+| | ... | Configure SR Policy on DUT
+| | ... | ${dut2} | ${dut2_bsid} | encap | @{sid_list_dir1}
+| | Run Keyword If | ${dut2_status}
+| | ... | Configure SR Steer on DUT
+| | ... | ${dut2} | L3 | ${dut2_bsid} | ip_addr=${tg_if1_ip6_subnet}
+| | ... | prefix=${sid_prefix}
+| | Run Keyword If | '${n}' == '1'
+| | ... | Configure SR LocalSID on DUT
+| | ... | ${dut1} | ${dut1_sid2} | end.dx6 | interface=${DUT1_${int}1}[0]
+| | ... | next_hop=${tg_if1_ip6_subnet}2
+| | Run Keyword If | '${n}' == '2'
+| | ... | Configure SR LocalSID on DUT
+| | ... | ${dut1} | ${dut1_sid2_1} | end
+| | Run Keyword If | '${n}' == '2' and '${prepos}' != 'without'
+| | ... | Configure SR LocalSID on DUT
+| | ... | ${dut1} | ${dut1_sid2_2} | end.dx6 | interface=${DUT1_${int}1}[0]
+| | ... | next_hop=${tg_if1_ip6_subnet}2
+| | Run Keyword If | '${n}' == '2' and '${prepos}' == 'without'
+| | ... | Vpp Route Add
+| | ... | ${dut1} | ${dut1_sid2_2} | ${sid_prefix}
| | ... | gateway=${tg_if1_ip6_subnet}2 | interface=${DUT1_${int}1}[0]
| | Set interfaces in path up
-| Initialize IPv6 forwarding over SRv6 with endpoint to SR-unaware Service Function via '${behavior}' behaviour in 3-node circular topology
+| Initialize SRv6 with '${behavior}' SR-unaware Service Function
| | [Documentation]
| | ... | Create pair of Memif interfaces on all defined VPP nodes. Set UP
-| | ... | state on VPP interfaces in path on nodes in 3-node circular topology.
+| | ... | state on VPP interfaces in path on node(s) in circular topology.
| | ... | Get the interface MAC addresses and setup neighbours on all VPP
| | ... | interfaces. Setup IPv6 addresses on all interfaces. Set segment
| | ... | routing for IPv6 with defined behaviour function and configure IPv6
-| | ... | routes on both DUT nodes.
+| | ... | routes on DUT node(s).
| |
| | ... | *Note:*
| | ... | KW uses test variable rxq_count_int set by KW Add worker threads
| | ... | and rxqueues to all DUTs
| |
+| | ${status} | ${value}= | Run Keyword And Ignore Error
+| | ... | Variable Should Exist | ${dut2}
+| | ${dut2_status}= | Set Variable If | '${status}' == 'PASS' | ${True}
+| | ... | ${False}
+| |
| | ${sock1}= | Set Variable | memif-DUT1_CNF
| | ${sock2}= | Set Variable | memif-DUT2_CNF
| | Set up memif interfaces on DUT node | ${dut1} | ${sock1} | ${sock1}
@@ -331,11 +368,14 @@
| | ... | ${rxq_count_int}
| | VPP Set interface MTU | ${dut1} | ${dut1-memif-1-if1}
| | VPP Set interface MTU | ${dut1} | ${dut1-memif-1-if2}
-| | Set up memif interfaces on DUT node | ${dut2} | ${sock2} | ${sock2}
+| | Run Keyword If | ${dut2_status}
+| | ... | Set up memif interfaces on DUT node | ${dut2} | ${sock2} | ${sock2}
| | ... | ${1} | dut2-memif-1-if1 | dut2-memif-1-if2 | ${rxq_count_int}
| | ... | ${rxq_count_int}
-| | VPP Set interface MTU | ${dut2} | ${dut2-memif-1-if1}
-| | VPP Set interface MTU | ${dut2} | ${dut2-memif-1-if2}
+| | Run Keyword If | ${dut2_status}
+| | ... | VPP Set interface MTU | ${dut2} | ${dut2-memif-1-if1}
+| | Run Keyword If | ${dut2_status}
+| | ... | VPP Set interface MTU | ${dut2} | ${dut2-memif-1-if2}
| | FOR | ${dut} | IN | @{duts}
| | | Show Memif | ${nodes['${dut}']}
| | END
@@ -347,40 +387,54 @@
| | ... | ${dut1-memif-1-if1_ip6} | ${mem_prefix}
| | VPP Interface Set IP Address | ${dut1} | ${dut1-memif-1-if2}
| | ... | ${dut1-memif-1-if2_ip6} | ${mem_prefix}
-| | VPP Interface Set IP Address
+| | Run Keyword If | ${dut2_status}
+| | ... | VPP Interface Set IP Address
| | ... | ${dut2} | ${DUT2_${int}1}[0] | ${dut2_if1_ip6} | ${prefix}
-| | VPP Interface Set IP Address
+| | Run Keyword If | ${dut2_status}
+| | ... | VPP Interface Set IP Address
| | ... | ${dut2} | ${DUT2_${int}2}[0] | ${dut2_if2_ip6} | ${prefix}
-| | VPP Interface Set IP Address | ${dut2} | ${dut2-memif-1-if1}
+| | Run Keyword If | ${dut2_status}
+| | ... | VPP Interface Set IP Address | ${dut2} | ${dut2-memif-1-if1}
| | ... | ${dut2-memif-1-if1_ip6} | ${mem_prefix}
-| | VPP Interface Set IP Address | ${dut2} | ${dut2-memif-1-if2}
+| | Run Keyword If | ${dut2_status}
+| | ... | VPP Interface Set IP Address | ${dut2} | ${dut2-memif-1-if2}
| | ... | ${dut2-memif-1-if2_ip6} | ${mem_prefix}
| | Vpp All Ra Suppress Link Layer | ${nodes}
-| | VPP Add IP Neighbor
+| | Run Keyword If | ${dut2_status}
+| | ... | VPP Add IP Neighbor
| | ... | ${dut1} | ${DUT1_${int}2}[0] | ${dut2_if1_ip6}
| | ... | ${DUT2_${int}1_mac}[0]
-| | VPP Add IP Neighbor
+| | Run Keyword Unless | ${dut2_status}
+| | ... | VPP Add IP Neighbor
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | ${dut2_if1_ip6} | ${TG_pf2_mac}[0]
+| | Run Keyword If | ${dut2_status}
+| | ... | VPP Add IP Neighbor
| | ... | ${dut2} | ${DUT2_${int}1}[0] | ${dut1_if2_ip6}
| | ... | ${DUT1_${int}2_mac}[0]
| | VPP Add IP Neighbor
| | ... | ${dut1} | ${DUT1_${int}1}[0] | ${tg_if1_ip6_subnet}2
| | ... | ${TG_pf1_mac}[0]
-| | VPP Add IP Neighbor
+| | Run Keyword If | ${dut2_status}
+| | ... | VPP Add IP Neighbor
| | ... | ${dut2} | ${DUT2_${int}2}[0] | ${tg_if2_ip6_subnet}2
| | ... | ${TG_pf2_mac}[0]
| | ${dut1-memif-1-if2_mac}= | Get Interface MAC | ${dut1} | memif2
-| | ${dut2-memif-1-if2_mac}= | Get Interface MAC | ${dut2} | memif2
+| | ${dut2-memif-1-if2_mac}= | Run Keyword If | ${dut2_status}
+| | ... | Get Interface MAC | ${dut2} | memif2
| | VPP Add IP Neighbor | ${dut1}
| | ... | ${dut1-memif-1-if1} | ${dut1_nh} | ${dut1-memif-1-if2_mac}
-| | VPP Add IP Neighbor | ${dut2}
+| | Run Keyword If | ${dut2_status}
+| | ... | VPP Add IP Neighbor | ${dut2}
| | ... | ${dut2-memif-1-if1} | ${dut2_nh} | ${dut2-memif-1-if2_mac}
| | Vpp Route Add | ${dut1} | ${dut2_sid1} | ${sid_prefix}
| | ... | gateway=${dut2_if1_ip6} | interface=${dut1_if2}
| | Vpp Route Add | ${dut1} | ${out_sid2_1} | ${sid_prefix}
| | ... | gateway=${tg_if1_ip6_subnet}2 | interface=${dut1_if1}
-| | Vpp Route Add | ${dut2} | ${dut1_sid2} | ${sid_prefix}
+| | Run Keyword If | ${dut2_status}
+| | ... | Vpp Route Add | ${dut2} | ${dut1_sid2} | ${sid_prefix}
| | ... | gateway=${dut1_if2_ip6} | interface=${dut2_if1}
-| | Vpp Route Add | ${dut2} | ${out_sid1_1} | ${sid_prefix}
+| | Run Keyword If | ${dut2_status}
+| | ... | Vpp Route Add | ${dut2} | ${out_sid1_1} | ${sid_prefix}
| | ... | gateway=${tg_if2_ip6_subnet}2 | interface=${dut2_if2}
# Configure SRv6 for direction0 on DUT1
| | Set SR Encaps Source Address on DUT | ${dut1} | ${dut1_sid1}
@@ -391,40 +445,46 @@
| | Configure SR Steer on DUT | ${dut1} | L3 | ${dut1_bsid}
| | ... | ip_addr=${tg_if2_ip6_subnet} | prefix=${sid_prefix}
# Configure SRv6 for direction1 on DUT2
-| | Set SR Encaps Source Address on DUT | ${dut2} | ${dut2_sid2}
+| | Run Keyword If | ${dut2_status}
+| | ... | Set SR Encaps Source Address on DUT | ${dut2} | ${dut2_sid2}
| | @{sid_list_dir1}= | Create List | ${dut1_sid2} | ${out_sid2_1}
| | ... | ${out_sid2_2}
-| | Configure SR Policy on DUT | ${dut2} | ${dut2_bsid} | encap
+| | Run Keyword If | ${dut2_status}
+| | ... | Configure SR Policy on DUT | ${dut2} | ${dut2_bsid} | encap
| | ... | @{sid_list_dir1}
-| | Configure SR Steer on DUT | ${dut2} | L3 | ${dut2_bsid}
+| | Run Keyword If | ${dut2_status}
+| | ... | Configure SR Steer on DUT | ${dut2} | L3 | ${dut2_bsid}
| | ... | ip_addr=${tg_if1_ip6_subnet} | prefix=${sid_prefix}
# Configure SRv6 for direction0 on DUT2
-| | ${dut2_out_if}= | Get Interface Name | ${dut2} | memif1
-| | ${dut2_in_if}= | Get Interface Name | ${dut2} | memif2
+| | ${dut2_out_if}= | Run Keyword If | ${dut2_status}
+| | ... | Get Interface Name | ${dut2} | memif1
+| | ${dut2_in_if}= | Run Keyword If | ${dut2_status}
+| | ... | Get Interface Name | ${dut2} | memif2
| | Remove Values From List | ${sid_list_dir0} | ${dut2_sid1}
-| | Run Keyword If | "${behavior}" == "static_proxy"
+| | Run Keyword If | ${dut2_status} and '${behavior}' == 'static_proxy'
| | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.as
| | ... | ${NONE} | ${dut2_nh} | ${NONE} | ${dut2_out_if} | ${dut2_in_if}
| | ... | ${dut1_sid1} | @{sid_list_dir0}
-| | ... | ELSE IF | "${behavior}" == "dynamic_proxy"
+| | ... | ELSE IF | ${dut2_status} and '${behavior}' == 'dynamic_proxy'
| | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.ad
| | ... | next_hop=${dut2_nh} | out_if=${dut2_out_if} | in_if=${dut2_in_if}
-| | ... | ELSE IF | "${behavior}" == "masquerading"
+| | ... | ELSE IF | ${dut2_status} and '${behavior}' == 'masquerading'
| | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.am
| | ... | next_hop=${dut2_nh} | out_if=${dut2_out_if} | in_if=${dut2_in_if}
-| | ... | ELSE | Fail | Unsupported behaviour: ${behavior}
+| | ... | ELSE IF | ${dut2_status}
+| | ... | Fail | Unsupported behaviour: ${behavior}
# Configure SRv6 for direction1 on DUT1
| | ${dut1_out_if}= | Get Interface Name | ${dut1} | memif1
| | ${dut1_in_if}= | Get Interface Name | ${dut1} | memif2
| | Remove Values From List | ${sid_list_dir1} | ${dut1_sid2}
-| | Run Keyword If | "${behavior}" == "static_proxy"
+| | Run Keyword If | '${behavior}' == 'static_proxy'
| | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.as
| | ... | ${NONE} | ${dut1_nh} | ${NONE} | ${dut1_out_if} | ${dut1_in_if}
| | ... | ${dut2_sid2} | @{sid_list_dir1}
-| | ... | ELSE IF | "${behavior}" == "dynamic_proxy"
+| | ... | ELSE IF | '${behavior}' == 'dynamic_proxy'
| | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.ad
| | ... | next_hop=${dut1_nh} | out_if=${dut1_out_if} | in_if=${dut1_in_if}
-| | ... | ELSE IF | "${behavior}" == "masquerading"
+| | ... | ELSE IF | '${behavior}' == 'masquerading'
| | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.am
| | ... | next_hop=${dut1_nh} | out_if=${dut1_out_if} | in_if=${dut1_in_if}
| | ... | ELSE | Fail | Unsupported behaviour: ${behavior}
diff --git a/resources/libraries/robot/shared/traffic.robot b/resources/libraries/robot/shared/traffic.robot
index cc33969540..0b65c8d892 100644
--- a/resources/libraries/robot/shared/traffic.robot
+++ b/resources/libraries/robot/shared/traffic.robot
@@ -495,3 +495,64 @@
| | ... | --ot_mode | ${ot_mode}
| | Run Traffic Script On Node | lisp/lispgpe_check.py | ${tg_node}
| | ... | ${args}
+
+| Send IPv6 Packet and verify SRv6 encapsulation in received packet
+| | [Documentation] | Send IP packet from TG to DUT. Receive IPv6 packet with\
+| | ... | SRv6 extension header from DUT on TG and verify SRv6 encapsulation.\
+| | ... | Send IPv6 packet with SRv6 extension header in opposite direction and\
+| | ... | verify received IP packet.
+| |
+| | ... | *Arguments:*
+| | ... | - node - TG node. Type: dictionary
+| | ... | - tx_interface - TG Interface 1. Type: string
+| | ... | - rx_interface - TG Interface 2. Type: string
+| | ... | - tx_dst_mac - Destination MAC for TX interface / DUT interface 1 MAC.
+| | ... | Type: string
+| | ... | - rx_src_mac - Source MAC for RX interface / DUT interface 2 MAC.
+| | ... | Type: string
+| | ... | - src_ip - Source IP address. Type: string
+| | ... | - dst_ip - Destination IP address. Type: string
+| | ... | - dut_srcsid - Source SID on DUT (dir0). Type: string
+| | ... | - dut_dstsid1 - The first destination SID on DUT (dir1). Type: string
+| | ... | - tg_srcsid - Source SID on TG (dir1). Type: string
+| | ... | - tg_dstsid1 - The first destination SID on TG (dir0). Type: string
+| | ... | - dut_dstsid2 - The second destination SID on DUT (dir1). Type: string
+| | ... | - tg_dstsid2 - The second destination SID on TG (dir0). Type: string
+| | ... | - decap - True if decapsulation expected, false if encapsulated packet
+| | ... | expected on receiving interface (Optional). Type: boolean
+| | ... | - tg_dstsid3 - The third destination SID on TG (dir0) (Optional).
+| | ... | Type: string
+| | ... | - dut_dstsid3 - The third destination SID on DUT (dir1) (Optional).
+| | ... | Type: string
+| | ... | - static_proxy - Switch for SRv6 with endpoint to SR-unaware Service
+| | ... | Function via static proxy (Optional). Type: boolean
+| |
+| | ... | *Example:*
+| | ... | \| Send IPv6 Packet and verify SRv6 encapsulation in received packet\
+| | ... | \| ${nodes['TG']} \| eth1 \| eth2 \
+| | ... | \| 52:54:00:d4:d8:22 \| 52:54:00:d4:d8:3e \| 2002:1:: \
+| | ... | \| 2003:2:: \| 2003:1:: \| 2002:2:: \| decap=${False} \
+| | ... | \| tg_dstsid3=2002:4:: \| dut_dstsid3=2003:4:: \
+| | ... | \| static_proxy=${True} \|
+| |
+| | [Arguments] | ${node} | ${tx_interface} | ${rx_interface} | ${tx_dst_mac}
+| | ... | ${rx_src_mac} | ${src_ip} | ${dst_ip} | ${dut_srcsid}
+| | ... | ${dut_dstsid1} | ${tg_srcsid} | ${tg_dstsid1}
+| | ... | ${dut_dstsid2}=${None} | ${tg_dstsid2}=${None} | ${decap}=${True}
+| | ... | ${tg_dstsid3}=${None} | ${dut_dstsid3}=${None}
+| | ... | ${static_proxy}=${False}
+| |
+| | ${tx_src_mac}= | Get Interface Mac | ${node} | ${tx_interface}
+| | ${tx_if_name}= | Get Interface Name | ${node} | ${tx_interface}
+| | ${rx_dst_mac}= | Get Interface Mac | ${node} | ${rx_interface}
+| | ${rx_if_name}= | Get Interface Name | ${node} | ${rx_interface}
+| | ${args}= | Catenate | --rx_if ${rx_if_name} | --tx_if ${tx_if_name}
+| | ... | --tx_src_mac ${tx_src_mac} | --tx_dst_mac ${tx_dst_mac}
+| | ... | --rx_src_mac ${rx_src_mac} | --rx_dst_mac ${rx_dst_mac}
+| | ... | --src_ip ${src_ip} | --dst_ip ${dst_ip} | --dir0_srcsid ${dut_srcsid}
+| | ... | --dir0_dstsid1 ${tg_dstsid1} | --dir0_dstsid2 ${tg_dstsid2}
+| | ... | --dir1_srcsid ${tg_srcsid} | --dir1_dstsid1 ${dut_dstsid1}
+| | ... | --dir1_dstsid2 ${dut_dstsid2} | --decap ${decap}
+| | ... | --dir0_dstsid3 ${tg_dstsid3} | --dir1_dstsid3 ${dut_dstsid3}
+| | ... | --static_proxy ${static_proxy}
+| | Run Traffic Script On Node | srv6_encap.py | ${node} | ${args}