ipv4 package

eth2p-ethip4-ip4base-func module

TC01: DUT replies to ICMPv4 Echo Req to its ingress interface

Make TG send ICMPv4 Echo Req to DUT ingress interface. Make TGverify ICMP Echo Reply is correct.


Append Nodes  ${nodes['TG']}  ${nodes['DUT1']}
Compute Path
${src_port}  ${src_node}=  First Interface
${dst_port}  ${dst_node}=  Last Interface
${hops}=  Set Variable  ${0}
Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4

TC02: DUT routes IPv4 to its egress interface

Make TG send ICMPv4 Echo Req towards DUT1 egress interfaceconnected to DUT2. Make TG verify ICMPv4 Echo Reply is correct.


Append Nodes  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['DUT2']}
Compute Path
${src_port}  ${src_node}=  First Interface
${dst_port}  ${dst_node}=  Last Egress Interface
${hops}=  Set Variable  ${0}
Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4

TC03: DUT1 routes IPv4 to DUT2 ingress interface

Make TG send ICMPv4 Echo Req towards DUT2 ingress interfaceconnected to DUT1. Make TG verify ICMPv4 Echo Reply is correct.


Append Nodes  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['DUT2']}
Compute Path
${src_port}  ${src_node}=  First Interface
${dst_port}  ${dst_node}=  Last Interface
${hops}=  Set Variable  ${1}
Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4

TC04: DUT1 routes IPv4 to DUT2 egress interface

Make TG send ICMPv4 Echo Req towards DUT2 egress interfaceconnected to TG. Make TG verify ICMPv4 Echo Reply is correct.


Append Nodes  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['DUT2']}  ${nodes['TG']}
Compute Path
${src_port}  ${src_node}=  First Interface
${dst_port}  ${dst_node}=  Last Egress Interface
${hops}=  Set Variable  ${1}
Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4

TC05: DUT1 and DUT2 route IPv4 between TG interfaces

Make TG send ICMPv4 Echo Req between its interfaces across DUT1and DUT2. Make TG verify ICMPv4 Echo Replies are correct.


Append Nodes  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['DUT2']}  ${nodes['TG']}
Compute Path
${src_port}  ${src_node}=  First Interface
${dst_port}  ${dst_node}=  Last Interface
${hops}=  Set Variable  ${2}
Node "${src_node}" interface "${src_port}" can route to node "${dst_node}" interface "${dst_port}" ${hops} hops away using IPv4

TC06: DUT replies to ICMPv4 Echo Reqs with size 64B-to-1500B-incr-1B

Make TG send ICMPv4 Echo Reqs to DUT ingress interface,incrementating frame size from 64B to 1500B with increment step of 1Byte. Make TG verify ICMP Echo Replies are correct.


Ipv4 icmp echo sweep  ${nodes['TG']}  ${nodes['DUT1']}  0  1452  1

TC07: DUT replies to ICMPv4 Echo Reqs with size 1500B-to-9000B-incr-10B

Make TG send ICMPv4 Echo Reqs to DUT ingress interface,incrementating frame size from 1500B to 9000B with increment step of 10Bytes. Make TG verify ICMPv4 Echo Replies are correct.


Append Nodes  ${nodes['TG']}  ${nodes['DUT1']}
Compute Path
${dut_port}  ${dut_node}=  Last Interface
${mtu}=  Get Interface MTU  ${dut_node}  ${dut_port}
${end_size}=  Evaluate  ${mtu} - 14 - 4 - 20 - 8
Run Keyword If  ${mtu} > 1518  Ipv4 icmp echo sweep  ${nodes['TG']}  ${nodes['DUT1']}  1452  ${end_size}  10

TC08: DUT replies to ARP request

Make TG send ARP Request to DUT and verify ARP Reply is correct.


Send ARP request and validate response  ${nodes['TG']}  ${nodes['DUT1']}

eth2p-ethip4-ip4base-ip4arp-func module

TC01: DUT sends ARP Request for unresolved locally connected IPv4 address

Make TG send test packet destined to IPv4 address of its otherinterface connected to DUT2. Make TG verify DUT2 sends ARP Request for locally connected TG IPv4 address.


Given Path for 3-node testing is set  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['DUT2']}  ${nodes['TG']}
  And Interfaces in 3-node path are up
  And L2 setup xconnect on DUT  ${dut2_node}  ${dut2_to_dut1}  ${dut2_to_tg}
 When Set Interface Address  ${dut1_node}  ${dut1_to_tg}  ${dut1_to_tg_ip}  ${prefix_length}
  And Set Interface Address  ${dut1_node}  ${dut1_to_dut2}  ${dut1_to_dut2_ip}  ${prefix_length}
 Then Send Packet And Check ARP Request  ${tg_node}  ${test_src_ip}  ${dut1_to_dut2_ip_GW}  ${tg_to_dut1}  ${dut1_to_tg_mac}  ${tg_to_dut2}  ${dut1_to_dut2_mac}  ${dut1_to_dut2_ip}  ${dut1_to_dut2_ip_GW}

TC02: DUT sends ARP Request for route next hop IPv4 address

Make TG send test packet destined to IPv4 address matchingstatic route on DUT2. Make TG verify DUT2 sends ARP Request for next hop of the static route.


Given Path for 3-node testing is set  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['DUT2']}  ${nodes['TG']}
  And Interfaces in 3-node path are up
  And L2 setup xconnect on DUT  ${dut2_node}  ${dut2_to_dut1}  ${dut2_to_tg}
 When Set Interface Address  ${dut1_node}  ${dut1_to_tg}  ${dut1_to_tg_ip}  ${prefix_length}
  And Set Interface Address  ${dut1_node}  ${dut1_to_dut2}  ${dut1_to_dut2_ip}  ${prefix_length}
  And Vpp Route Add  ${dut1_node}  ${test_dst_ip}  ${prefix_length}  ${dut1_to_dut2_ip_GW}  ${dut1_to_dut2}  resolve_attempts=${NONE}
 Then Send Packet And Check ARP Request  ${tg_node}  ${test_src_ip}  ${test_dst_ip}  ${tg_to_dut1}  ${dut1_to_tg_mac}  ${tg_to_dut2}  ${dut1_to_dut2_mac}  ${dut1_to_dut2_ip}  ${dut1_to_dut2_ip_GW}

eth2p-ethip4-ip4base-ip4ecmp-func module

TC01: IPv4 Equal-cost multipath routing

[Top] TG=DUT [Cfg] On DUT configure multipath routing wiht two equal-cost paths. [Ver] TG sends 100 IPv4 ICMP packets traffic on the first link toDUT. On second link to TG verify if traffic is divided into two paths.


Given Path for 2-node testing is set  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['TG']}
  And Interfaces in 2-node path are UP
  And Set Interface Address  ${dut_node}  ${dut_to_tg_if2}  ${ip_1}  ${prefix_length}
  And Set Interface Address  ${dut_node}  ${dut_to_tg_if1}  ${ip_2}  ${prefix_length}
  And Add Arp On Dut  ${dut_node}  ${dut_to_tg_if1}  ${neighbor_1_ip}  ${neighbor_1_mac}
  And Add Arp On Dut  ${dut_node}  ${dut_to_tg_if1}  ${neighbor_2_ip}  ${neighbor_2_mac}
 When Vpp Route Add  ${dut_node}  ${test_dst_ip}  ${prefix_length}  ${neighbor_1_ip}  ${dut_to_tg_if1}  resolve_attempts=${NONE}  multipath=${TRUE}
  And Vpp Route Add  ${dut_node}  ${test_dst_ip}  ${prefix_length}  ${neighbor_2_ip}  ${dut_to_tg_if1}  resolve_attempts=${NONE}  multipath=${TRUE}
 Then Send Packets And Check Multipath Routing  ${tg_node}  ${tg_to_dut_if2}  ${tg_to_dut_if1}  ${test_src_ip}  ${test_dst_ip}  ${tg_to_dut_if2_mac}  ${dut_to_tg_if2_mac}  ${dut_to_tg_if1_mac}  ${neighbor_1_mac}  ${neighbor_2_mac}

eth2p-ethip4-ip4base-ip4proxyarp-func module

TC01: DUT sends ARP reply on behalf of another machine from the IP range

[Top] TG-DUT1. [Ref] RFC1027. [Cfg] On DUT1 configure interface IPv4 address and proxy ARP for IP range. [Ver] Make TG send ARP request to DUT1 interface, verify if DUT1 sends correct ARP reply on behalf of machine which IP is in range.


Given Path for 3-node testing is set  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['DUT2']}  ${nodes['TG']}
  And Interfaces in 3-node path are up
${dut1_to_tg_name}=  Get interface name  ${dut1_node}  ${dut1_to_tg}
${tg_to_dut1_name}=  Get interface name  ${tg_node}  ${tg_to_dut1}
 When Set Interface Address  ${dut1_node}  ${dut1_to_tg}  ${dut1_to_tg_ip}  ${prefix_length}
  And Vpp Add Proxy ARP  ${dut1_node}  ${lo_ip4_addr}  ${hi_ip4_addr}
  And Vpp Proxy ARP Interface Enable  ${dut1_node}  ${dut1_to_tg_name}
 Then Send ARP Request  ${tg_node}  ${tg_to_dut1_name}  ${tg_to_dut1_mac}  ${dut1_to_tg_mac}  ${tg_to_dut1_ip}  ${pass_test_ip}

TC02: DUT sends ARP reply on behalf of another machine from beginning of the IP range

[Top] TG-DUT1. [Ref] RFC1027. [Cfg] On DUT1 configure interface IPv4 address and proxy ARP for IP range. [Ver] Make TG send ARP request to DUT1 interface, verify if DUT1 sends correct ARP reply on behalf of machine which IP is from beginning of the IP range.


Given Path for 3-node testing is set  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['DUT2']}  ${nodes['TG']}
  And Interfaces in 3-node path are up
${dut1_to_tg_name}=  Get interface name  ${dut1_node}  ${dut1_to_tg}
${tg_to_dut1_name}=  Get interface name  ${tg_node}  ${tg_to_dut1}
 When Set Interface Address  ${dut1_node}  ${dut1_to_tg}  ${dut1_to_tg_ip}  ${prefix_length}
  And Vpp Add Proxy ARP  ${dut1_node}  ${lo_ip4_addr}  ${hi_ip4_addr}
  And Vpp Proxy ARP Interface Enable  ${dut1_node}  ${dut1_to_tg_name}
 Then Send ARP Request  ${tg_node}  ${tg_to_dut1_name}  ${tg_to_dut1_mac}  ${dut1_to_tg_mac}  ${tg_to_dut1_ip}  ${pass_test_lo_ip}

TC03: DUT sends ARP reply on behalf of another machine from end of the IP range

[Top] TG-DUT1. [Ref] RFC1027. [Cfg] On DUT1 configure interface IPv4 address and proxy ARP for IP range. [Ver] Make TG send ARP request to DUT1 interface, verify if DUT1 sends correct ARP reply on behalf of machine which IP is from end of the IP range.


Given Path for 3-node testing is set  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['DUT2']}  ${nodes['TG']}
  And Interfaces in 3-node path are up
${dut1_to_tg_name}=  Get interface name  ${dut1_node}  ${dut1_to_tg}
${tg_to_dut1_name}=  Get interface name  ${tg_node}  ${tg_to_dut1}
 When Set Interface Address  ${dut1_node}  ${dut1_to_tg}  ${dut1_to_tg_ip}  ${prefix_length}
  And Vpp Add Proxy ARP  ${dut1_node}  ${lo_ip4_addr}  ${hi_ip4_addr}
  And Vpp Proxy ARP Interface Enable  ${dut1_node}  ${dut1_to_tg_name}
 Then Send ARP Request  ${tg_node}  ${tg_to_dut1_name}  ${tg_to_dut1_mac}  ${dut1_to_tg_mac}  ${tg_to_dut1_ip}  ${pass_test_hi_ip}

TC04: DUT does not send ARP reply on behalf of another machine from below of the IP range

[Top] TG-DUT1. [Ref] RFC1027. [Cfg] On DUT1 configure interface IPv4 address and proxy ARP for IP range. [Ver] Make TG send ARP request to DUT1 interface, verify if DUT1 does not send ARP reply on behalf of machine which IP is from below of the IP range.


Given Path for 3-node testing is set  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['DUT2']}  ${nodes['TG']}
  And Interfaces in 3-node path are up
${dut1_to_tg_name}=  Get interface name  ${dut1_node}  ${dut1_to_tg}
${tg_to_dut1_name}=  Get interface name  ${tg_node}  ${tg_to_dut1}
 When Set Interface Address  ${dut1_node}  ${dut1_to_tg}  ${dut1_to_tg_ip}  ${prefix_length}
  And Vpp Add Proxy ARP  ${dut1_node}  ${lo_ip4_addr}  ${hi_ip4_addr}
  And Vpp Proxy ARP Interface Enable  ${dut1_node}  ${dut1_to_tg_name}
 Then Send ARP Request should failed  ${tg_node}  ${tg_to_dut1_name}  ${tg_to_dut1_mac}  ${dut1_to_tg_mac}  ${tg_to_dut1_ip}  ${fail_test_lo_ip}

TC05: DUT does not send ARP reply on behalf of another machine from above of the IP range

[Top] TG-DUT1. [Ref] RFC1027. [Cfg] On DUT1 configure interface IPv4 address and proxy ARP for IP range. [Ver] Make TG send ARP request to DUT1 interface, verify if DUT1 does not send ARP reply on behalf of machine which IP is from above of the IP range.


Given Path for 3-node testing is set  ${nodes['TG']}  ${nodes['DUT1']}  ${nodes['DUT2']}  ${nodes['TG']}
  And Interfaces in 3-node path are up
${dut1_to_tg_name}=  Get interface name  ${dut1_node}  ${dut1_to_tg}
${tg_to_dut1_name}=  Get interface name  ${tg_node}  ${tg_to_dut1}
 When Set Interface Address  ${dut1_node}  ${dut1_to_tg}  ${dut1_to_tg_ip}  ${prefix_length}
  And Vpp Add Proxy ARP  ${dut1_node}  ${lo_ip4_addr}  ${hi_ip4_addr}
  And Vpp Proxy ARP Interface Enable  ${dut1_node}  ${dut1_to_tg_name}
 Then Send ARP Request should failed  ${tg_node}  ${tg_to_dut1_name}  ${tg_to_dut1_mac}  ${dut1_to_tg_mac}  ${tg_to_dut1_ip}  ${fail_test_hi_ip}