aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/api/vpp/supported_crcs.yaml40
-rw-r--r--resources/libraries/robot/ip/ip4.robot2
-rw-r--r--resources/libraries/robot/shared/traffic.robot53
3 files changed, 74 insertions, 21 deletions
diff --git a/resources/api/vpp/supported_crcs.yaml b/resources/api/vpp/supported_crcs.yaml
index e8eb379aa8..c4bc243aae 100644
--- a/resources/api/vpp/supported_crcs.yaml
+++ b/resources/api/vpp/supported_crcs.yaml
@@ -186,26 +186,26 @@
memif_dump: '0x51077d14' # dev
memif_socket_filename_add_del: '0xa2ce1a10' # dev
memif_socket_filename_add_del_reply: '0xe8d4e804' # dev
- nat44_add_del_address_range: '0xd4c7568c' # perf
- nat44_add_del_address_range_reply: '0xe8d4e804' # perf
- nat44_address_details: '0x45410ac4' # perf teardown
- nat44_address_dump: '0x51077d14' # perf teardown
- nat44_interface_add_del_feature: '0xf3699b83' # perf
- nat44_interface_add_del_feature_reply: '0xe8d4e804' # perf
- nat44_interface_addr_details: '0x3e687514' # perf teardown
- nat44_interface_addr_dump: '0x51077d14' # perf teardown
- nat44_interface_details: '0x5d286289' # perf teardown
- nat44_interface_dump: '0x51077d14' # perf teardown
- nat44_static_mapping_details: '0x1a433ef7' # perf teardown
- nat44_static_mapping_dump: '0x51077d14' # perf teardown
- nat44_user_details: '0x355896c2' # perf teardown
- nat44_user_dump: '0x51077d14' # perf teardown
- nat44_user_session_details: '0x1965fd69' # perf teardown
- nat44_user_session_dump: '0xe1899c98' # perf teardown
- nat_show_config: '0x51077d14' # perf teardown
- nat_show_config_reply: '0x7903ef06' # perf teardown
- nat_worker_details: '0x84bf06fc' # perf teardown
- nat_worker_dump: '0x51077d14' # perf teardown
+ nat44_add_del_address_range: '0xd4c7568c' # dev
+ nat44_add_del_address_range_reply: '0xe8d4e804' # dev
+ nat44_address_details: '0x45410ac4' # dev teardown
+ nat44_address_dump: '0x51077d14' # dev teardown
+ nat44_interface_add_del_feature: '0xf3699b83' # dev
+ nat44_interface_add_del_feature_reply: '0xe8d4e804' # dev
+ nat44_interface_addr_details: '0x3e687514' # dev teardown
+ nat44_interface_addr_dump: '0x51077d14' # dev teardown
+ nat44_interface_details: '0x5d286289' # dev teardown
+ nat44_interface_dump: '0x51077d14' # dev teardown
+ nat44_static_mapping_details: '0x1a433ef7' # dev teardown
+ nat44_static_mapping_dump: '0x51077d14' # dev teardown
+ nat44_user_details: '0x355896c2' # dev teardown
+ nat44_user_dump: '0x51077d14' # dev teardown
+ nat44_user_session_details: '0x1965fd69' # dev teardown
+ nat44_user_session_dump: '0xe1899c98' # dev teardown
+ nat_show_config: '0x51077d14' # dev teardown
+ nat_show_config_reply: '0x7903ef06' # dev teardown
+ nat_worker_details: '0x84bf06fc' # dev teardown
+ nat_worker_dump: '0x51077d14' # dev teardown
# 6x^ tc01-64B-1c-ethip4udp-snat44det-h1-p1-s1-mrr
# ^ nat44NOTscaleNOTsrc_user_1
nsim_configure: '0x16ed400f' # perf
diff --git a/resources/libraries/robot/ip/ip4.robot b/resources/libraries/robot/ip/ip4.robot
index 9855e129a4..f61466bf4e 100644
--- a/resources/libraries/robot/ip/ip4.robot
+++ b/resources/libraries/robot/ip/ip4.robot
@@ -599,7 +599,7 @@
| | ... | VPP Interface Set IP Address | ${dut2} | ${subif_index_2}
| | ... | 2.2.2.2 | 30
| | VPP Interface Set IP Address
-| | ... | ${dut} | ${dut_if2} | 3.3.3.2 | 30
+| | ... | ${dut} | ${dut_if2} | 3.3.3.2 | 30
| | Vpp Route Add | ${dut1} | ${tg_if1_net} | 30 | gateway=1.1.1.1
| | ... | interface=${DUT1_${int}1}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
diff --git a/resources/libraries/robot/shared/traffic.robot b/resources/libraries/robot/shared/traffic.robot
index 0b65c8d892..1f10787bc1 100644
--- a/resources/libraries/robot/shared/traffic.robot
+++ b/resources/libraries/robot/shared/traffic.robot
@@ -556,3 +556,56 @@
| | ... | --dir0_dstsid3 ${tg_dstsid3} | --dir1_dstsid3 ${dut_dstsid3}
| | ... | --static_proxy ${static_proxy}
| | Run Traffic Script On Node | srv6_encap.py | ${node} | ${args}
+
+| Send TCP or UDP packet and verify network address translations
+| | [Documentation] | Send TCP or UDP packet from TG-if1 to TG-if2 and response\
+| | ... | in opposite direction via DUT with configured NAT. Check packet\
+| | ... | headers on both sides.
+| |
+| | ... | *Arguments:*
+| |
+| | ... | _NOTE:_ Arguments are based on topology:
+| | ... | TG(if1)->(if1)DUT(if2)->TG(if2)
+| |
+| | ... | - tg_node - Node where to run traffic script. 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_in - Internal source IP address. Type: string
+| | ... | - src_ip_out - External source IP address. Type: string
+| | ... | - dst_ip - Destination IP address. Type: string
+| | ... | - protocol - TCP or UDP protocol. Type: string
+| | ... | - src_port_in - Internal source TCP/UDP port. Type: string or integer
+| | ... | - src_port_out - External source TCP/UDP port; default value: unknown.
+| | ... | Type: string or integer
+| | ... | - dst_port - Destination TCP/UDP port. Type: string or integer
+| |
+| | ... | *Return:*
+| | ... | - No value returned
+| |
+| | ... | *Example:*
+| |
+| | ... | \| Send TCP or UDP packet and verify network address translations \
+| | ... | \| ${nodes['TG']} \| port1 \| port2 \| 08:00:27:cc:4f:54 \
+| | ... | \| 08:00:27:c9:6a:d5 \| 192.168.0.0 \| 68.142.68.0 \| 20.0.0.0 \
+| | ... | \| TCP \| 1024 \| 8080 \|
+| |
+| | [Arguments] | ${tg_node} | ${tx_interface} | ${rx_interface} | ${tx_dst_mac}
+| | ... | ${rx_src_mac} | ${src_ip_in} | ${src_ip_out} | ${dst_ip}
+| | ... | ${protocol} | ${src_port_in} | ${dst_port} | ${src_port_out}=unknown
+| |
+| | ${tx_src_mac}= | Get Interface Mac | ${tg_node} | ${tx_interface}
+| | ${tx_if_name}= | Get Interface Name | ${tg_node} | ${tx_interface}
+| | ${rx_dst_mac}= | Get Interface Mac | ${tg_node} | ${rx_interface}
+| | ${rx_if_name}= | Get Interface Name | ${tg_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_in ${src_ip_in} | --src_ip_out ${src_ip_out}
+| | ... | --dst_ip ${dst_ip} | --protocol ${protocol}
+| | ... | --src_port_in ${src_port_in} | --src_port_out ${src_port_out}
+| | ... | --dst_port ${dst_port}
+| | Run Traffic Script On Node | nat.py | ${tg_node} | ${args}