softwire package

eth2p-ethip4–ethip6ip4-ip4base–ip6base-swirelw46-func module

TC01: Encapsulate IPv4 into IPv6. IPv6 dst depends on IPv4 and UDP destination

[Top] TG=DUT1. [Enc] Eth-IPv4-UDP on TG_if1-DUT, Eth-IPv6-IPv4-UDP on TG_if2_DUT. [Cfg] On DUT1 configure Map domain and Map rule. [Ver] Make TG send non-encapsulated UDP to DUT; verify TG received IPv4oIPv6 encapsulated packet is correct. [Ref] RFC7596 RFC7597


Given Path for 2-node testing is set  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['TG']}
  And Interfaces in 2-node path are up
  And IP addresses are set on interfaces  ${dut_node}  ${dut_to_tg_if1}  ${dut_ip4}  ${ipv4_prefix_len}  ${dut_node}  ${dut_to_tg_if2}  ${dut_ip6}  ${ipv6_prefix_len}
  And Add IP Neighbor  ${dut_node}  ${dut_to_tg_if2}  ${tg_ip6}  ${tg_to_dut_if2_mac}
  And Vpp Route Add  ${dut_node}  ${lw_rule_ipv6_dst}  128  ${tg_ip6}  ${dut_to_tg_if2}  resolve_attempts=${NONE}
${domain_index}=  When Map Add Domain  ${dut_node}  ${lw_ipv4_pfx}  ${lw_ipv6_pfx}  ${lw_ipv6_src}  0  ${lw_psid_offset}  ${lw_psid_length}
  And Map Add Rule  ${dut_node}  ${domain_index}  ${lw_rule_psid}  ${lw_rule_ipv6_dst}
 Then Send IPv4 UDP and check headers for lightweight 4over6  ${tg_node}  ${tg_to_dut_if1}  ${tg_to_dut_if2}  ${dut_to_tg_if1_mac}  ${test_ipv4_inside}  ${test_ipv4_outside}  ${test_port}  ${tg_to_dut_if2_mac}  ${dut_to_tg_if2_mac}  ${lw_rule_ipv6_dst}  ${lw_ipv6_src}

TC02: Encapsulate IPv4 ICMP into IPv6. IPv6 dst depends on IPv4 addr and ICMP ID

[Top] TG=DUT1. [Enc] Eth-IPv4-ICMP(type 0 and 8) on TG_if1-DUT, Eth-IPv6-IPv4-ICMP on TG_if2_DUT. [Cfg] On DUT1 configure Map domain and Map rule. [Ver] Make TG send non-encapsulated ICMP to DUT; verify TG received IPv4oIPv6 encapsulated packet is correct. Checks IPv6 destination based on ICMP Identifier field. [Ref] RFC7596 section 8.1


Given Path for 2-node testing is set  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['TG']}
  And Interfaces in 2-node path are up
  And IP addresses are set on interfaces  ${dut_node}  ${dut_to_tg_if1}  ${dut_ip4}  ${ipv4_prefix_len}  ${dut_node}  ${dut_to_tg_if2}  ${dut_ip6}  ${ipv6_prefix_len}
  And Add IP Neighbor  ${dut_node}  ${dut_to_tg_if2}  ${tg_ip6}  ${tg_to_dut_if2_mac}
  And Vpp Route Add  ${dut_node}  ${lw_rule_ipv6_dst}  128  ${tg_ip6}  ${dut_to_tg_if2}  resolve_attempts=${NONE}
${domain_index}=  When Map Add Domain  ${dut_node}  ${lw_ipv4_pfx}  ${lw_ipv6_pfx}  ${lw_ipv6_src}  0  ${lw_psid_offset}  ${lw_psid_length}
  And Map Add Rule  ${dut_node}  ${domain_index}  ${lw_rule_psid}  ${lw_rule_ipv6_dst}
 Then Send IPv4 ICMP and check headers for lightweight 4over6  ${tg_node}  ${tg_to_dut_if1}  ${tg_to_dut_if2}  ${dut_to_tg_if1_mac}  ${test_ipv4_inside}  ${test_ipv4_outside}  ${test_icmp_id}  ${tg_to_dut_if2_mac}  ${dut_to_tg_if2_mac}  ${lw_rule_ipv6_dst}  ${lw_ipv6_src}

TC03: Decapsulate IPv4 UDP from IPv6.

[Top] TG=DUT1. [Enc] Eth-IPv6-IPv4-UDP on TG_if2_DUT, Eth-IPv4-UDP on TG_if1-DUT. [Cfg] On DUT1 configure Map domain and Map rule. [Ver] Make TG send encapsulated UDP to DUT; verify TG received IPv4 non-encapsulated packet is correct. [Ref] RFC7596 RFC7597


Given Path for 2-node testing is set  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['TG']}
  And Interfaces in 2-node path are up
  And IP addresses are set on interfaces  ${dut_node}  ${dut_to_tg_if1}  ${dut_ip4}  ${ipv4_prefix_len}  ${dut_node}  ${dut_to_tg_if2}  ${dut_ip6}  ${ipv6_prefix_len}
  And Add Arp on DUT  ${dut_node}  ${dut_to_tg_if1}  ${test_ipv4_outside}  ${tg_to_dut_if1_mac}
${domain_index}=  When Map Add Domain  ${dut_node}  ${lw_ipv4_pfx}  ${lw_ipv6_pfx}  ${lw_ipv6_src}  0  ${lw_psid_offset}  ${lw_psid_length}
  And Map Add Rule  ${dut_node}  ${domain_index}  ${lw_rule_psid}  ${lw_rule_ipv6_dst}
 Then Send IPv4 UDP in IPv6 and check headers for lightweight 4over6  ${tg_node}  ${tg_to_dut_if2}  ${tg_to_dut_if1}  ${dut_to_tg_if2_mac}  ${tg_to_dut_if2_mac}  ${lw_ipv6_src}  ${lw_rule_ipv6_dst}  ${test_ipv4_outside}  ${test_ipv4_inside}  ${test_port}  ${tg_to_dut_if1_mac}  ${dut_to_tg_if1_mac}

TC04: Hairpinning of traffic between two lwB4

[Top] DUT1-TG. [Enc] Eth-IPv6-IPv4-UDP on TG_if2_DUT, Eth-IPv6-IPv4-UDP on TG_if2_DUT. [Cfg] On DUT1 configure Map domain and two Map rules. [Ver] Make TG send encapsulated UDP to DUT; verify TG received encapsulated packet is correct. [Ref] RFC7596 RFC7597


Given Path for 2-node testing is set  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['TG']}
  And Interfaces in 2-node path are up
  And IP addresses are set on interfaces  ${dut_node}  ${dut_to_tg_if1}  ${dut_ip4}  ${ipv4_prefix_len}  ${dut_node}  ${dut_to_tg_if2}  ${dut_ip6}  ${ipv6_prefix_len}
  And Add IP Neighbor  ${dut_node}  ${dut_to_tg_if2}  ${tg_ip6}  ${tg_to_dut_if2_mac}
  And Vpp Route Add  ${dut_node}  ${lw_rule_2_ipv6_dst}  128  ${tg_ip6}  ${dut_to_tg_if2}  resolve_attempts=${NONE}
${domain_index}=  When Map Add Domain  ${dut_node}  ${lw_ipv4_pfx}  ${lw_ipv6_pfx}  ${lw_ipv6_src}  0  ${lw_psid_offset}  ${lw_psid_length}
  And Map Add Rule  ${dut_node}  ${domain_index}  ${lw_rule_psid}  ${lw_rule_ipv6_dst}
  And Map Add Rule  ${dut_node}  ${domain_index}  ${lw_rule_2_psid}  ${lw_rule_2_ipv6_dst}
 Then Send IPv4 UDP in IPv6 and check headers for lightweight hairpinning  ${tg_node}  ${tg_to_dut_if2}  ${tg_to_dut_if2}  ${dut_to_tg_if2_mac}  ${lw_ipv6_src}  ${lw_rule_ipv6_dst}  ${test_ipv4_inside}  ${test_ipv4_inside}  ${test_2_port}  ${test_port}  ${tg_to_dut_if2_mac}  ${dut_to_tg_if2_mac}  ${lw_rule_2_ipv6_dst}  ${lw_ipv6_src}

eth2p-ethip4–ethip6ip4-ip4base–ip6base-swiremape-func module

TC01: BMR, then an IPv4 prefix is assigned

Basic Mapping Rule https://tools.ietf.org/html/rfc7597#section-5.2IPv4 prefix length + ea bits length < 32 (o + r < 32) psid_length = 0, ip6_prefix < 64, ip4_prefix <= 32


20.0.0.0/8  2001:db8::/32  ${ipv6_br_src}  ${4}  ${0}  ${0}  20.169.201.219  ${1232}  2001:db8:a000::14a0:0:0
20.0.0.0/8  2001:db8::/32  ${ipv6_br_src}  ${8}  ${0}  ${0}  20.169.201.219  ${1232}  2001:db8:a900::14a9:0:0
20.0.0.0/8  2001:db8::/32  ${ipv6_br_src}  ${10}  ${0}  ${0}  20.169.201.219  ${1232}  2001:db8:a9c0::14a9:c000:0
20.0.0.0/8  2001:db8::/32  ${ipv6_br_src}  ${16}  ${0}  ${0}  20.169.201.219  ${1232}  2001:db8:a9c9::14a9:c900:0
20.0.0.0/8  2001:db8::/32  ${ipv6_br_src}  ${20}  ${0}  ${0}  20.169.201.219  ${1232}  2001:db8:a9c9:d000:0:14a9:c9d0:0
20.0.0.0/8  2001:db8::/32  ${ipv6_br_src}  ${23}  ${0}  ${0}  20.169.201.219  ${1232}  2001:db8:a9c9:da00:0:14a9:c9da:0
20.169.201.0/24  2001:db8::/32  ${ipv6_br_src}  ${4}  ${0}  ${0}  20.169.201.219  ${1232}  2001:db8:d000::14a9:c9d0:0
20.169.201.0/24  2001:db8::/32  ${ipv6_br_src}  ${7}  ${0}  ${0}  20.169.201.219  ${1232}  2001:db8:da00::14a9:c9da:0

TC02: BMR, full IPv4 address is to be assigned

Basic Mapping Rule https://tools.ietf.org/html/rfc7597#section-5.2IPv4 prefix length + ea bits length == 32 (o + r == 32) psid_length = 0, ip6_prefix < 64, ip4_prefix <= 32


20.0.0.0/8  2001:db8::/32  ${ipv6_br_src}  ${24}  ${0}  ${0}  20.169.201.219  ${1232}  2001:db8:a9c9:db00:0:14a9:c9db:0
20.160.0.0/12  2001:db8::/32  ${ipv6_br_src}  ${20}  ${0}  ${0}  20.169.201.219  ${1232}  2001:db8:9c9d:b000:0:14a9:c9db:0
20.169.0.0/16  2001:db8::/32  ${ipv6_br_src}  ${16}  ${0}  ${0}  20.169.201.219  ${1232}  2001:db8:c9db::14a9:c9db:0
20.169.200.0/22  2001:db8::/32  ${ipv6_br_src}  ${10}  ${0}  ${0}  20.169.201.219  ${1232}  2001:db8:76c0::14a9:c9db:0
20.169.201.0/24  2001:db8::/32  ${ipv6_br_src}  ${8}  ${0}  ${0}  20.169.201.219  ${1232}  2001:db8:db00::14a9:c9db:0
20.169.201.208/28  2001:db8::/32  ${ipv6_br_src}  ${4}  ${0}  ${0}  20.169.201.219  ${1232}  2001:db8:b000::14a9:c9db:0
20.169.201.219/32  2001:db8::/32  ${ipv6_br_src}  ${0}  ${0}  ${0}  20.169.201.219  ${1232}  2001:db8::14a9:c9db:0
20.0.0.0/8  2001:db8::/40  ${ipv6_br_src}  ${24}  ${0}  ${0}  20.169.201.219  ${1232}  2001:db8:a9:c9db:0:14a9:c9db:0
20.160.0.0/12  2001:db8::/44  ${ipv6_br_src}  ${20}  ${0}  ${0}  20.169.201.219  ${1232}  2001:db8:9:c9db:0:14a9:c9db:0
20.169.0.0/16  2001:db8::/48  ${ipv6_br_src}  ${16}  ${0}  ${0}  20.169.201.219  ${1232}  2001:db8:0:c9db:0:14a9:c9db:0
20.169.200.0/22  2001:db8::/54  ${ipv6_br_src}  ${10}  ${0}  ${0}  20.169.201.219  ${1232}  2001:db8:0:1db:0:14a9:c9db:0

TC03: BMR, shared IPv4 address is to be assigned

Basic Mapping Rule https://tools.ietf.org/html/rfc7597#section-5.2IPv4 prefix length + ea bits length > 32 (o + r > 32) ip6_prefix < 64, ip4_prefix <= 32


20.0.0.0/8  2001::/16  ${ipv6_br_src}  ${48}  ${6}  ${8}  20.169.201.219  ${1232}  2001:a9c9:db34::14a9:c9db:34
20.169.0.0/16  2001::/16  ${ipv6_br_src}  ${48}  ${6}  ${8}  20.169.201.219  ${1232}  2001:c9db:3400::14a9:c9db:34
20.169.201.0/24  2001::/16  ${ipv6_br_src}  ${48}  ${6}  ${8}  20.169.201.219  ${1232}  2001:db34::14a9:c9db:34
20.169.201.219/32  2001::/16  ${ipv6_br_src}  ${48}  ${6}  ${8}  20.169.201.219  ${1232}  2001:3400::14a9:c9db:34
20.0.0.0/8  2001::/24  ${ipv6_br_src}  ${40}  ${6}  ${8}  20.169.201.219  ${1232}  2001:a9:c9db:3400:0:14a9:c9db:34
20.169.0.0/16  2001::/24  ${ipv6_br_src}  ${40}  ${6}  ${8}  20.169.201.219  ${1232}  2001:c9:db34::14a9:c9db:34
20.169.201.0/24  2001::/24  ${ipv6_br_src}  ${40}  ${6}  ${8}  20.169.201.219  ${1232}  2001:db:3400::14a9:c9db:34
20.169.201.219/32  2001::/24  ${ipv6_br_src}  ${40}  ${6}  ${8}  20.169.201.219  ${1232}  2001:34::14a9:c9db:34
20.169.0.0/16  2001::/16  ${ipv6_br_src}  ${40}  ${6}  ${8}  20.169.201.219  ${1232}  2001:c9db:3400::14a9:c9db:34
20.169.201.219/32  2001::/16  ${ipv6_br_src}  ${40}  ${6}  ${8}  20.169.201.219  ${1232}  2001:3400::14a9:c9db:34
20.0.0.0/8  2001:db8::/32  ${ipv6_br_src}  ${32}  ${6}  ${8}  20.169.201.219  ${1232}  2001:db8:a9c9:db34:0:14a9:c9db:34
20.169.0.0/16  2001:db8::/32  ${ipv6_br_src}  ${32}  ${6}  ${8}  20.169.201.219  ${1232}  2001:db8:c9db:3400:0:14a9:c9db:34
20.169.201.0/24  2001:db8::/32  ${ipv6_br_src}  ${32}  ${6}  ${8}  20.169.201.219  ${1232}  2001:db8:db34::14a9:c9db:34
20.169.201.219/32  2001:db8::/32  ${ipv6_br_src}  ${32}  ${6}  ${8}  20.169.201.219  ${1232}  2001:db8:3400::14a9:c9db:34
20.169.0.0/16  2001::/24  ${ipv6_br_src}  ${32}  ${6}  ${8}  20.169.201.219  ${1232}  2001:c9:db34::14a9:c9db:34
20.169.201.0/24  2001::/24  ${ipv6_br_src}  ${32}  ${6}  ${8}  20.169.201.219  ${1232}  2001:db:3400::14a9:c9db:34
20.169.0.0/16  2001::/16  ${ipv6_br_src}  ${32}  ${6}  ${8}  20.169.201.219  ${1232}  2001:c9db:3400::14a9:c9db:34
20.169.201.0/24  2001::/16  ${ipv6_br_src}  ${32}  ${6}  ${8}  20.169.201.219  ${1232}  2001:db34::14a9:c9db:34
20.160.0.0/12  2001:db8::/32  ${ipv6_br_src}  ${25}  ${6}  ${5}  20.169.201.219  ${1232}  2001:db8:9c9d:b300:0:14a9:c9db:6
20.169.0.0/16  2001:db8::/32  ${ipv6_br_src}  ${25}  ${6}  ${8}  20.169.201.219  ${1232}  2001:db8:c9db:3400:0:14a9:c9db:34
20.169.201.0/24  2001:db8::/32  ${ipv6_br_src}  ${25}  ${6}  ${8}  20.169.201.219  ${1232}  2001:db8:db34::14a9:c9db:34
20.169.201.219/32  2001:db8::/32  ${ipv6_br_src}  ${25}  ${6}  ${8}  20.169.201.219  ${1232}  2001:db8:3400::14a9:c9db:34
20.169.192.0/20  2001:db8::/32  ${ipv6_br_src}  ${17}  ${6}  ${5}  20.169.201.219  ${1232}  2001:db8:9db3::14a9:c9db:6
20.169.201.0/24  2001:db8::/32  ${ipv6_br_src}  ${17}  ${6}  ${8}  20.169.201.219  ${1232}  2001:db8:db34::14a9:c9db:34
20.169.201.219/32  2001:db8::/32  ${ipv6_br_src}  ${17}  ${6}  ${8}  20.169.201.219  ${1232}  2001:db8:3400::14a9:c9db:34
20.169.201.0/24  2001:db8::/32  ${ipv6_br_src}  ${12}  ${6}  ${4}  20.169.201.219  ${1232}  2001:db8:db30::14a9:c9db:3
20.169.201.219/32  2001:db8::/32  ${ipv6_br_src}  ${12}  ${6}  ${8}  20.169.201.219  ${1232}  2001:db8:3400::14a9:c9db:34

TC04: End user IPv6 prefix is 64

Supported End-User IPv6 prefix length is 64 bit.


20.0.0.0/8  2001:db8:0012:3400::/56  ${ipv6_br_src}  ${8}  ${0}  ${0}  20.169.201.219  ${1232}
20.169.201.208/28  2001:db8:0012:3400::/56  ${ipv6_br_src}  ${8}  ${5}  ${4}  20.169.201.219  ${3280}
20.0.0.0/8  2001:db8:0012:3400::/64  ${ipv6_br_src}  ${0}  ${0}  ${0}  20.169.201.219  ${1232}
20.169.201.219/32  2001:db8:0012:3400::/64  ${ipv6_br_src}  ${0}  ${0}  ${0}  20.169.201.219  ${1232}

TC05: IPv4 prefix is 0


0.0.0.0/0  2001:db8:0000::/40  ${ipv6_br_src}  ${8}  ${0}  ${0}  20.169.201.219  ${1232}
0.0.0.0/0  2001:db8:0000::/40  ${ipv6_br_src}  ${16}  ${0}  ${0}  20.169.201.219  ${1232}
0.0.0.0/0  2001:db8::/32  ${ipv6_br_src}  ${32}  ${0}  ${0}  20.169.201.219  ${1232}
0.0.0.0/0  2001:d00::/24  ${ipv6_br_src}  ${40}  ${6}  ${8}  20.169.201.219  ${1232}
0.0.0.0/0  2001::/16  ${ipv6_br_src}  ${40}  ${6}  ${8}  20.169.201.219  ${1232}

TC06: Multiple domain and check with traffic script IPv4 source IPv6 destination

[Top] TG=DUT1. [Cfg] Multiple MAP-E domains are configured, values from variablefile. [Ver] Send IPv4 to destination in configured domain and receive IPv6packet. [Ref] RFC7597.


Given Path For 2-node Testing Is Set  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['TG']}
  And Interfaces In 2-node Path Are Up
  And IP Addresses Are Set On Interfaces  ${dut_node}  ${dut_to_tg_if1}  ${dut_ip4}  ${ipv4_prefix_len}  ${dut_node}  ${dut_to_tg_if2}  ${dut_ip6}  ${ipv6_prefix_len}
  And Vpp Route Add  ${dut_node}  ::  0  ${dut_ip6_gw}  ${dut_to_tg_if2}  resolve_attempts=${NONE}  count=${NONE}
  And Add IP Neighbor  ${dut_node}  ${dut_to_tg_if2}  ${dut_ip6_gw}  ${tg_to_dut_if2_mac}
  And Vpp Route Add  ${dut_node}  0.0.0.0  0  ${dut_ip4_gw}  ${dut_to_tg_if1}  resolve_attempts=${NONE}  count=${NONE}
  And Add IP Neighbor  ${dut_node}  ${dut_to_tg_if1}  ${dut_ip4_gw}  ${tg_to_dut_if1_mac}
: FOR  ${domain_set}  IN  @{domain_sets}
 \    When Map Add Domain  ${dut_node}  @{domain_set}
: FOR  ${ip_set}  IN  @{ip_sets}
\    ${ipv4}=  Get From List  ${ip_set}  0
\    ${ipv6}=  Get From List  ${ip_set}  1
\    ${port}=  Get From List  ${ip_set}  2
\    ${ipv6_br}=  Get From List  ${ip_set}  3
 \    Then Send IPv4 UDP And Check Headers For Lightweight 4over6  ${tg_node}  ${tg_to_dut_if1}  ${tg_to_dut_if2}  ${dut_to_tg_if1_mac}  ${ipv4}  ${ipv4_outside}  ${port}  ${tg_to_dut_if2_mac}  ${dut_to_tg_if2_mac}  ${ipv6}  ${ipv6_br}
  \    And Send IPv4 UDP In IPv6 And Check Headers For Lightweight 4over6  ${tg_node}  ${tg_to_dut_if2}  ${tg_to_dut_if1}  ${dut_to_tg_if2_mac}  ${tg_to_dut_if2_mac}  ${ipv6_br}  ${ipv6}  ${ipv4_outside}  ${ipv4}  ${port}  ${tg_to_dut_if1_mac}  ${dut_to_tg_if1_mac}

TC07: Multiple domain and check with traffic script IPv6 source IPv6 destination

[Top] TG=DUT1. [Cfg] Multiple MAP-E domains are configured, values from variablefile. [Ver] Send IPv4 encapsulated in IPv6. Source and destination are fromconfigured domains. Check if VPP translate IPv6 addresses. [Ref] RFC7597.


Given Path For 2-node Testing Is Set  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['TG']}
  And Interfaces In 2-node Path Are Up
  And IP Addresses Are Set On Interfaces  ${dut_node}  ${dut_to_tg_if1}  ${dut_ip4}  ${ipv4_prefix_len}  ${dut_node}  ${dut_to_tg_if2}  ${dut_ip6}  ${ipv6_prefix_len}
  And Vpp Route Add  ${dut_node}  ::  0  ${dut_ip6_gw}  ${dut_to_tg_if2}  resolve_attempts=${NONE}  count=${NONE}
  And Add IP Neighbor  ${dut_node}  ${dut_to_tg_if2}  ${dut_ip6_gw}  ${tg_to_dut_if2_mac}
  And Vpp Route Add  ${dut_node}  0.0.0.0  0  ${dut_ip4_gw}  ${dut_to_tg_if1}  resolve_attempts=${NONE}  count=${NONE}
  And Add IP Neighbor  ${dut_node}  ${dut_to_tg_if1}  ${dut_ip4_gw}  ${tg_to_dut_if1_mac}
: FOR  ${domain_set}  IN  @{domain_sets}
 \    When Map Add Domain  ${dut_node}  @{domain_set}
${ip_set_A}=  Get From List  ${ip_sets}  0
${ip_set_B}=  Get From List  ${ip_sets}  1
${ipv6_br}=  Get From List  ${ip_set_A}  3
${port_A}=  Get From List  ${ip_set_A}  2
${port_B}=  Get From List  ${ip_set_B}  2
${ipv6_A}=  Get From List  ${ip_set_A}  1
${ipv6_B}=  Get From List  ${ip_set_B}  1
${ipv4_A}=  Get From List  ${ip_set_A}  0
${ipv4_B}=  Get From List  ${ip_set_B}  0
 Then Send IPv4 UDP In IPv6 And Check Headers For Lightweight Hairpinning  ${tg_node}  ${tg_to_dut_if2}  ${tg_to_dut_if2}  ${dut_to_tg_if2_mac}  ${ipv6_br}  ${ipv6_A}  ${ipv4_B}  ${ipv4_A}  ${port_B}  ${port_A}  ${tg_to_dut_if2_mac}  ${dut_to_tg_if2_mac}  ${ipv6_B}  ${ipv6_br}

TC08: Encapsulate IPv4 ICMP into IPv6

[Top] TG=DUT1. [Enc] Eth-IPv4-ICMP(type 0 and 8) on TG_if1-DUT, Eth-IPv6-IPv4-ICMPon TG_if2_DUT. [Cfg] Multiple MAP-E domains are configured, values from variablefile. [Ver] Make TG send non-encapsulated ICMP to DUT; verify TG receivedIPv4oIPv6 encapsulated packet is correct. Checks IPv6 destinationbased on ICMP Identifier field. [Ref] RFC7597 section 8.2.


Given Path For 2-node Testing Is Set  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['TG']}
  And Interfaces In 2-node Path Are Up
  And IP Addresses Are Set On Interfaces  ${dut_node}  ${dut_to_tg_if1}  ${dut_ip4}  ${ipv4_prefix_len}  ${dut_node}  ${dut_to_tg_if2}  ${dut_ip6}  ${ipv6_prefix_len}
  And Vpp Route Add  ${dut_node}  ::  0  ${dut_ip6_gw}  ${dut_to_tg_if2}  resolve_attempts=${NONE}  count=${NONE}
  And Add IP Neighbor  ${dut_node}  ${dut_to_tg_if2}  ${dut_ip6_gw}  ${tg_to_dut_if2_mac}
  And Vpp Route Add  ${dut_node}  0.0.0.0  0  ${dut_ip4_gw}  ${dut_to_tg_if1}  resolve_attempts=${NONE}  count=${NONE}
  And Add IP Neighbor  ${dut_node}  ${dut_to_tg_if1}  ${dut_ip4_gw}  ${tg_to_dut_if1_mac}
: FOR  ${domain_set}  IN  @{domain_sets}
 \    When Map Add Domain  ${dut_node}  @{domain_set}
${ip_set_A}=  Get From List  ${ip_sets}  0
${ipv4_A}=  Get From List  ${ip_set_A}  0
${ipv6_A}=  Get From List  ${ip_set_A}  1
${icmp_id_A}=  Get From List  ${ip_set_A}  2
${ipv6_br}=  Get From List  ${ip_set_A}  3
 Then Send IPv4 ICMP And Check Headers For Lightweight 4over6  ${tg_node}  ${tg_to_dut_if1}  ${tg_to_dut_if2}  ${dut_to_tg_if1_mac}  ${ipv4_A}  ${ipv4_outside}  ${icmp_id_A}  ${tg_to_dut_if2_mac}  ${dut_to_tg_if2_mac}  ${ipv6_A}  ${ipv6_br}

TC09: Repeated ip neighbor command doesnt put FIB to broken state

Original issue described in https://jira.fd.io/browse/VPP-312. [Top] TG=DUT1. [Cfg] IP address are set on interfaces, ip neighbor multiple times [Ver] FIB is not in broken state. The steps are add route, check with traffic then add same route again and check with traffic script.


Given Path For 2-node Testing Is Set  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['TG']}
  And Interfaces In 2-node Path Are Up
 When IP Addresses Are Set On Interfaces  ${dut_node}  ${dut_to_tg_if1}  ${dut_ip4}  ${ipv4_prefix_len}  ${dut_node}  ${dut_to_tg_if2}  ${dut_ip6}  ${ipv6_prefix_len}
  And Vpp Route Add  ${dut_node}  2001::  16  ${dut_ip6_gw}  ${dut_to_tg_if2}  resolve_attempts=${NONE}  count=${NONE}
  And Add IP Neighbor  ${dut_node}  ${dut_to_tg_if2}  ${dut_ip6_gw}  ${tg_to_dut_if2_mac}
  And Vpp Route Add  ${dut_node}  0.0.0.0  0  ${dut_ip4_gw}  ${dut_to_tg_if1}  resolve_attempts=${NONE}  count=${NONE}
  And Add IP Neighbor  ${dut_node}  ${dut_to_tg_if1}  ${dut_ip4_gw}  ${tg_to_dut_if1_mac}
 Then Check MAP Configuration With Traffic Script  20.0.0.0/8  2001::/16  ${ipv6_br_src}  ${48}  ${6}  ${8}  20.169.201.219  ${1232}  2001:a9c9:db34::14a9:c9db:34
 When IP Addresses Are Set On Interfaces  ${dut_node}  ${dut_to_tg_if1}  ${dut_ip4}  ${ipv4_prefix_len}  ${dut_node}  ${dut_to_tg_if2}  ${dut_ip6}  ${ipv6_prefix_len}
  And Vpp Route Add  ${dut_node}  2001::  16  ${dut_ip6_gw}  ${dut_to_tg_if2}  resolve_attempts=${NONE}  count=${NONE}
  And Add IP Neighbor  ${dut_node}  ${dut_to_tg_if2}  ${dut_ip6_gw}  ${tg_to_dut_if2_mac}
  And Vpp Route Add  ${dut_node}  0.0.0.0  0  ${dut_ip4_gw}  ${dut_to_tg_if1}  resolve_attempts=${NONE}  count=${NONE}
  And Add IP Neighbor  ${dut_node}  ${dut_to_tg_if1}  ${dut_ip4_gw}  ${tg_to_dut_if1_mac}
 Then Check MAP Configuration With Traffic Script  20.0.0.0/8  2001::/16  ${ipv6_br_src}  ${48}  ${6}  ${8}  20.169.201.219  ${1232}  2001:a9c9:db34::14a9:c9db:34

Bug: VPP-318

qlen < psid length


Given Path For 2-node Testing Is Set  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['TG']}
  And Interfaces In 2-node Path Are Up
  And IP Addresses Are Set On Interfaces  ${dut_node}  ${dut_to_tg_if1}  ${dut_ip4}  ${ipv4_prefix_len}  ${dut_node}  ${dut_to_tg_if2}  ${dut_ip6}  ${ipv6_prefix_len}
 Then Run Keyword And Expect Error  Unable to add map domain *  Map Add Domain  ${dut_node}  20.169.0.0/16  2001:db8::/32  ${ipv6_br_src}  ${20}  ${6}  ${8}

Set Interfaces IP Addresses And Routes


Path For 2-node Testing Is Set  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['TG']}
Interfaces In 2-node Path Are Up
IP Addresses Are Set On Interfaces  ${dut_node}  ${dut_to_tg_if1}  ${dut_ip4}  ${ipv4_prefix_len}  ${dut_node}  ${dut_to_tg_if2}  ${dut_ip6}  ${ipv6_prefix_len}
Vpp Route Add  ${dut_node}  ::  0  ${dut_ip6_gw}  ${dut_to_tg_if2}  resolve_attempts=${NONE}  count=${NONE}
Add IP Neighbor  ${dut_node}  ${dut_to_tg_if2}  ${dut_ip6_gw}  ${tg_to_dut_if2_mac}
Vpp Route Add  ${dut_node}  ${ipv4_outside}  32  ${dut_ip4_gw}  ${dut_to_tg_if1}  resolve_attempts=${NONE}  count=${NONE}
Add IP Neighbor  ${dut_node}  ${dut_to_tg_if1}  ${dut_ip4_gw}  ${tg_to_dut_if1_mac}

Check MAP Configuration With Traffic Script

Used as a test case template.Configure MAP-E domain with given parameters, with traffic script send UDP in IPv4 packet to given UDP destination port and IP destination address and check if correctly received IPv6 packet. Vice versa send IPv6 packet and check if received IPv4 packet with correct source address. The MAP domain is deleted in teardown. The expected IPv6 address is compared with computed IPv6 address.


${domain_index}=  Map Add Domain  ${dut_node}  ${ipv4_pfx}  ${ipv6_pfx}  ${ipv6_br_src}  ${ea_bit_len}  ${psid_offset}  ${psid_len}
${computed_ipv6_dst}=  Compute IPv6 Map Destination Address  ${ipv4_pfx}  ${ipv6_pfx}  ${ea_bit_len}  ${psid_offset}  ${psid_len}  ${ipv4_dst}  ${dst_port}
${ipv6_dst}=  Run Keyword If  "${expected_ipv6_dst}" == "${EMPTY}"  Set Variable  ${computed_ipv6_dst}  ELSE  Set Variable  ${expected_ipv6_dst}
Run Keyword If  "${expected_ipv6_dst}" != "${EMPTY}"  IP Addresses Should Be Equal  ${computed_ipv6_dst}  ${expected_ipv6_dst}
${ipv6_dst}=  Set Variable  ${computed_ipv6_dst}
Check Encapsulation With Traffic Script  ${ipv4_dst}  ${dst_port}  ${ipv6_dst}
Check Decapsulation With Traffic Script  ${ipv6_dst}  ${ipv4_dst}  ${dst_port}

Check Encapsulation With Traffic Script


Send IPv4 UDP And Check Headers For Lightweight 4over6  ${tg_node}  ${tg_to_dut_if1}  ${tg_to_dut_if2}  ${dut_to_tg_if1_mac}  ${ipv4_dst}  ${ipv4_outside}  ${dst_port}  ${tg_to_dut_if2_mac}  ${dut_to_tg_if2_mac}  ${ipv6_dst}  ${ipv6_br_src}

Check Decapsulation With Traffic Script


Send IPv4 UDP In IPv6 And Check Headers For Lightweight 4over6  ${tg_node}  ${tg_to_dut_if2}  ${tg_to_dut_if1}  ${dut_to_tg_if2_mac}  ${tg_to_dut_if2_mac}  ${ipv6_br_src}  ${ipv6_ce_addr}  ${ipv4_outside}  ${ipv4_inside}  ${port}  ${tg_to_dut_if1_mac}  ${dut_to_tg_if1_mac}

eth2p-ethip4–ethip6ip4-ip4base–ip6base-swiremapt-func module

TC01: MAP-T test

Test to check map-t address translation.


20.169.0.0/16  2001::/16  ${ipv6_br_src}  ${40}  ${0}  ${0}  100.0.0.1  20.169.201.219  ${1232}
20.169.201.219/32  2001:db8::/32  ${ipv6_br_src}  ${0}  ${0}  ${0}  100.0.0.1  20.169.201.219  ${1232}
20.0.0.0/8  2001:db8::/40  ${ipv6_br_src}  ${24}  ${0}  ${0}  100.0.0.1  20.169.201.219  ${1232}

Set interfaces IP addresses and routes


Path for 2-node testing is set  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['TG']}
Interfaces in 2-node path are up
IP addresses are set on interfaces  ${dut_node}  ${dut_to_tg_if1}  ${dut_ip4}  ${ipv4_prefix_len}  ${dut_node}  ${dut_to_tg_if2}  ${dut_ip6}  ${ipv6_prefix_len}
Vpp Route Add  ${dut_node}  ::  0  ${dut_ip6_gw}  ${dut_to_tg_if2}  resolve_attempts=${NONE}  count=${NONE}
Add IP neighbor  ${dut_node}  ${dut_to_tg_if2}  ${dut_ip6_gw}  ${tg_to_dut_if2_mac}
Vpp Route Add  ${dut_node}  0.0.0.0  0  ${dut_ip4_gw}  ${dut_to_tg_if1}  resolve_attempts=${NONE}  count=${NONE}
Add IP neighbor  ${dut_node}  ${dut_to_tg_if1}  ${dut_ip4_gw}  ${tg_to_dut_if1_mac}

Check MAP-T configuration with traffic script

Used as a test case template.Configure MAP-T domain with given parameters, with traffic script send UDP in IPv4 packet to given UDP destination port and IP destination address and check if correctly received IPv6 packet with translated source and destination addresses. Vice versa send IPv6 packet and check if received IPv4 packet with correct source and destination addresses. The MAP domain is deleted in teardown.


${domain_index}=  Map Add Domain  ${dut_node}  ${ipv4_pfx}  ${ipv6_dst_pfx}  ${ipv6_src_pfx}  ${ea_bit_len}  ${psid_offset}  ${psid_len}  ${TRUE}
${ipv6_ce_addr}=  Compute IPv6 map destination address  ${ipv4_pfx}  ${ipv6_dst_pfx}  ${ea_bit_len}  ${psid_offset}  ${psid_len}  ${ipv4_inside}  ${dst_port}
${ipv6_br_addr}=  Compute IPv6 map source address  ${ipv6_src_pfx}  ${ipv4_outside}
Send IPv4 UDP and check IPv6 headers for MAP-T  ${tg_node}  ${tg_to_dut_if1}  ${tg_to_dut_if2}  ${dut_to_tg_if1_mac}  ${ipv4_inside}  ${ipv4_outside}  ${dst_port}  ${tg_to_dut_if2_mac}  ${dut_to_tg_if2_mac}  ${ipv6_ce_addr}  ${ipv6_br_addr}
Send IPv6 UDP and check IPv4 headers for MAP-T  ${tg_node}  ${tg_to_dut_if2}  ${tg_to_dut_if1}  ${dut_to_tg_if2_mac}  ${tg_to_dut_if2_mac}  ${ipv6_br_addr}  ${ipv6_ce_addr}  ${dst_port}  ${tg_to_dut_if1_mac}  ${dut_to_tg_if1_mac}  ${ipv4_outside}  ${ipv4_inside}