8.2.9. L2XC Ethernet Switching

8.2.9.1. eth2p-eth-l2xcbase-eth-2vhost-1vm-func

L2 cross-connect test cases

  • [Top] Network Topologies: TG=DUT=VM 3-node topology with VM and double parallel links.
  • [Enc] Packet Encapsulations: Eth-IPv4-ICMPv4 for L2 switching of IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply to all links.
  • [Cfg] DUT configuration: DUT1 is configured with L2 cross-connect (L2XC) switching.
  • [Ver] TG verification: Test ICMPv4 (or ICMPv6) Echo Request packets are sent in both directions by TG on links to DUT1 via VM; on receive TG verifies packets for correctness and their IPv4 (IPv6) src-addr, dst-addr and MAC addresses.
  • [Ref] Applicable standard specifications:
Name VPP API Test (VAT) Commands History - Commands Used Per Test Case
TC01: DUT with two L2XCs switches ICMPv4 between TG and local VM links
 DUT1: 
sw_interface_set_flags sw_if_index 2 admin-up
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_dump
create_vhost_user_if socket /tmp/sock1
create_vhost_user_if socket /tmp/sock2
sw_interface_set_flags sw_if_index 5 admin-up
sw_interface_set_flags sw_if_index 6 admin-up
sw_interface_set_flags sw_if_index 2 admin-up
sw_interface_set_flags sw_if_index 5 admin-up
sw_interface_set_l2_xconnect rx_sw_if_index 2 tx_sw_if_index 5
sw_interface_set_l2_xconnect rx_sw_if_index 5 tx_sw_if_index 2
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_flags sw_if_index 6 admin-up
sw_interface_set_l2_xconnect rx_sw_if_index 1 tx_sw_if_index 6
sw_interface_set_l2_xconnect rx_sw_if_index 6 tx_sw_if_index 1

DUT2:
no VAT command executed
TC02: DUT with two L2XCs switches ICMPv6 between TG and local VM links
 DUT1: 
sw_interface_set_flags sw_if_index 2 admin-up
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_dump
create_vhost_user_if socket /tmp/sock1
create_vhost_user_if socket /tmp/sock2
sw_interface_set_flags sw_if_index 5 admin-up
sw_interface_set_flags sw_if_index 6 admin-up
sw_interface_set_flags sw_if_index 2 admin-up
sw_interface_set_flags sw_if_index 5 admin-up
sw_interface_set_l2_xconnect rx_sw_if_index 2 tx_sw_if_index 5
sw_interface_set_l2_xconnect rx_sw_if_index 5 tx_sw_if_index 2
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_flags sw_if_index 6 admin-up
sw_interface_set_l2_xconnect rx_sw_if_index 1 tx_sw_if_index 6
sw_interface_set_l2_xconnect rx_sw_if_index 6 tx_sw_if_index 1

DUT2:
no VAT command executed

8.2.9.2. eth2p-eth-l2xcbase-func

L2 cross-connect test cases

  • [Top] Network Topologies: TG-DUT1-DUT2-TG 3-node circular topology with single links between nodes.
  • [Enc] Packet Encapsulations: Eth-IPv4-ICMPv4 for L2 switching of IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply to all links.
  • [Cfg] DUT configuration: DUT1 and DUT2 are configured with L2 cross-connect (L2XC) switching.
  • [Ver] TG verification: Test ICMPv4 (or ICMPv6) Echo Request packets are sent in both directions by TG on links to DUT1 and DUT2; on receive TG verifies packets for correctness and their IPv4 (IPv6) src-addr, dst-addr and MAC addresses.
  • [Ref] Applicable standard specifications:
Name VPP API Test (VAT) Commands History - Commands Used Per Test Case
TC01: DUT1 and DUT2 with L2XC switch ICMPv4 between two TG links
 DUT1: 
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_flags sw_if_index 3 admin-up
sw_interface_dump
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_flags sw_if_index 3 admin-up
sw_interface_set_l2_xconnect rx_sw_if_index 1 tx_sw_if_index 3
sw_interface_set_l2_xconnect rx_sw_if_index 3 tx_sw_if_index 1
sw_interface_dump

DUT2:
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_flags sw_if_index 3 admin-up
sw_interface_dump
sw_interface_set_flags sw_if_index 3 admin-up
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_l2_xconnect rx_sw_if_index 3 tx_sw_if_index 1
sw_interface_set_l2_xconnect rx_sw_if_index 1 tx_sw_if_index 3
sw_interface_dump
TC02: DUT1 and DUT2 with L2XC switch ICMPv6 between two TG links
 DUT1: 
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_flags sw_if_index 3 admin-up
sw_interface_dump
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_flags sw_if_index 3 admin-up
sw_interface_set_l2_xconnect rx_sw_if_index 1 tx_sw_if_index 3
sw_interface_set_l2_xconnect rx_sw_if_index 3 tx_sw_if_index 1
sw_interface_dump

DUT2:
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_flags sw_if_index 3 admin-up
sw_interface_dump
sw_interface_set_flags sw_if_index 3 admin-up
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_l2_xconnect rx_sw_if_index 3 tx_sw_if_index 1
sw_interface_set_l2_xconnect rx_sw_if_index 1 tx_sw_if_index 3
sw_interface_dump