8.2.8. L2BD Ethernet Switching

8.2.8.1. eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-func

L2 bridge-domain 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 two L2 bridge-domains (L2BD) switching combined with MAC learning enabled.
  • [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 L2BDs (MAC learn) switches ICMPv4 between TG and 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
bridge_domain_add_del bd_id 1 flood 1 uu-flood 1 forward 1 learn 1 arp-term 0
sw_interface_set_flags sw_if_index 2 admin-up
sw_interface_set_l2_bridge sw_if_index 2 bd_id 1 shg 0 enable
sw_interface_set_flags sw_if_index 5 admin-up
sw_interface_set_l2_bridge sw_if_index 5 bd_id 1 shg 0 enable
bridge_domain_add_del bd_id 2 flood 1 uu-flood 1 forward 1 learn 1 arp-term 0
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_l2_bridge sw_if_index 1 bd_id 2 shg 0 enable
sw_interface_set_flags sw_if_index 6 admin-up
sw_interface_set_l2_bridge sw_if_index 6 bd_id 2 shg 0 enable

DUT2:
no VAT command executed
TC02: DUT with two L2BDs (MAC learn) switches ICMPv6 between TG and 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
bridge_domain_add_del bd_id 1 flood 1 uu-flood 1 forward 1 learn 1 arp-term 0
sw_interface_set_flags sw_if_index 2 admin-up
sw_interface_set_l2_bridge sw_if_index 2 bd_id 1 shg 0 enable
sw_interface_set_flags sw_if_index 5 admin-up
sw_interface_set_l2_bridge sw_if_index 5 bd_id 1 shg 0 enable
bridge_domain_add_del bd_id 2 flood 1 uu-flood 1 forward 1 learn 1 arp-term 0
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_l2_bridge sw_if_index 1 bd_id 2 shg 0 enable
sw_interface_set_flags sw_if_index 6 admin-up
sw_interface_set_l2_bridge sw_if_index 6 bd_id 2 shg 0 enable

DUT2:
no VAT command executed

8.2.8.2. eth2p-eth-l2bdbasemaclrn-func

L2 bridge-domain test cases

  • [Top] Network Topologies: TG=DUT1 2-node topology with two links between nodes; 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 bridge-domain (L2BD) switching combined with MAC learning enabled.
  • [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: DUT reports active interfaces
 DUT1: 
no VAT command executed

DUT2:
no VAT command executed
TC02: DUT with L2BD (MAC learning) switch ICMPv4 between two TG 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
bridge_domain_add_del bd_id 1 flood 1 uu-flood 1 forward 1 learn 1 arp-term 0
sw_interface_set_flags sw_if_index 2 admin-up
sw_interface_set_l2_bridge sw_if_index 2 bd_id 1 shg 0 enable
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_l2_bridge sw_if_index 1 bd_id 1 shg 0 enable

DUT2:
no VAT command executed
TC03: DUT1 and DUT2 with L2BD (MAC learning) switch 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
bridge_domain_add_del bd_id 1 flood 1 uu-flood 1 forward 1 learn 1 arp-term 0
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_l2_bridge sw_if_index 1 bd_id 1 shg 0 enable
sw_interface_set_flags sw_if_index 3 admin-up
sw_interface_set_l2_bridge sw_if_index 3 bd_id 1 shg 0 enable

DUT2:
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_flags sw_if_index 3 admin-up
sw_interface_dump
bridge_domain_add_del bd_id 2 flood 1 uu-flood 1 forward 1 learn 1 arp-term 0
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_l2_bridge sw_if_index 1 bd_id 2 shg 0 enable
sw_interface_set_flags sw_if_index 3 admin-up
sw_interface_set_l2_bridge sw_if_index 3 bd_id 2 shg 0 enable

8.2.8.3. eth2p-eth-l2bdbasemacstc-eth-2vhost-1vm-func

L2 bridge-domain 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 two L2 bridge-domains (L2BD) switching combined with static MACs.
  • [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 L2BDs (static MACs) switches ICMPv4 between TG and 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
bridge_domain_add_del bd_id 1 flood 1 uu-flood 1 forward 1 learn 0 arp-term 0
sw_interface_set_flags sw_if_index 2 admin-up
sw_interface_set_l2_bridge sw_if_index 2 bd_id 1 shg 0 enable
sw_interface_set_flags sw_if_index 5 admin-up
sw_interface_set_l2_bridge sw_if_index 5 bd_id 1 shg 0 enable
l2fib_add_del mac fa:16:3e:11:f1:2f bd_id 1 sw_if_index 2
l2fib_add_del mac fa:16:3e:8c:0b:8f bd_id 1 sw_if_index 5
bridge_domain_add_del bd_id 2 flood 1 uu-flood 1 forward 1 learn 0 arp-term 0
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_l2_bridge sw_if_index 1 bd_id 2 shg 0 enable
sw_interface_set_flags sw_if_index 6 admin-up
sw_interface_set_l2_bridge sw_if_index 6 bd_id 2 shg 0 enable
l2fib_add_del mac fa:16:3e:8c:0b:8f bd_id 2 sw_if_index 1
l2fib_add_del mac fa:16:3e:11:f1:2f bd_id 2 sw_if_index 6

DUT2:
no VAT command executed
TC02: DUT with two L2BDs (static MACs) switches ICMPv6 between TG and 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
bridge_domain_add_del bd_id 1 flood 1 uu-flood 1 forward 1 learn 0 arp-term 0
sw_interface_set_flags sw_if_index 2 admin-up
sw_interface_set_l2_bridge sw_if_index 2 bd_id 1 shg 0 enable
sw_interface_set_flags sw_if_index 5 admin-up
sw_interface_set_l2_bridge sw_if_index 5 bd_id 1 shg 0 enable
l2fib_add_del mac fa:16:3e:11:f1:2f bd_id 1 sw_if_index 2
l2fib_add_del mac fa:16:3e:8c:0b:8f bd_id 1 sw_if_index 5
bridge_domain_add_del bd_id 2 flood 1 uu-flood 1 forward 1 learn 0 arp-term 0
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_l2_bridge sw_if_index 1 bd_id 2 shg 0 enable
sw_interface_set_flags sw_if_index 6 admin-up
sw_interface_set_l2_bridge sw_if_index 6 bd_id 2 shg 0 enable
l2fib_add_del mac fa:16:3e:8c:0b:8f bd_id 2 sw_if_index 1
l2fib_add_del mac fa:16:3e:11:f1:2f bd_id 2 sw_if_index 6

DUT2:
no VAT command executed

8.2.8.4. eth2p-eth-l2bdbasemacstc-func

L2 bridge-domain 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 bridge-domain (L2BD) switching combined with static MACs.
  • [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 L2BD (static MACs) switch 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
bridge_domain_add_del bd_id 1 flood 1 uu-flood 1 forward 1 learn 0 arp-term 0
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_l2_bridge sw_if_index 1 bd_id 1 shg 0 enable
sw_interface_set_flags sw_if_index 3 admin-up
sw_interface_set_l2_bridge sw_if_index 3 bd_id 1 shg 0 enable
l2fib_add_del mac fa:16:3e:8c:0b:8f bd_id 1 sw_if_index 1
l2fib_add_del mac fa:16:3e:f7:92:c8 bd_id 1 sw_if_index 3

DUT2:
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_flags sw_if_index 3 admin-up
sw_interface_dump
bridge_domain_add_del bd_id 2 flood 1 uu-flood 1 forward 1 learn 0 arp-term 0
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_l2_bridge sw_if_index 1 bd_id 2 shg 0 enable
sw_interface_set_flags sw_if_index 3 admin-up
sw_interface_set_l2_bridge sw_if_index 3 bd_id 2 shg 0 enable
l2fib_add_del mac fa:16:3e:8c:0b:8f bd_id 2 sw_if_index 3
l2fib_add_del mac fa:16:3e:f7:92:c8 bd_id 2 sw_if_index 1

8.2.8.5. eth4p-eth-l2bdbasemaclrn-l2shg-func

L2 bridge-domain test cases

  • [Top] Network Topologies: TG=DUT1=DUT2=TG 3-node circular topology with 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 and DUT2 are configured with L2 bridge-domain (L2BD) switching combined with MAC learning enabled and Split Horizon Groups (SHG).
  • [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 L2BD (MAC learn) and SHG switch between four TG links
 DUT1: 
sw_interface_set_flags sw_if_index 2 admin-up
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_flags sw_if_index 3 admin-up
sw_interface_dump
bridge_domain_add_del bd_id 1 flood 1 uu-flood 1 forward 1 learn 1 arp-term 0
sw_interface_set_flags sw_if_index 2 admin-up
sw_interface_set_l2_bridge sw_if_index 2 bd_id 1 shg 3 enable
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_l2_bridge sw_if_index 1 bd_id 1 shg 3 enable
sw_interface_set_flags sw_if_index 3 admin-up
sw_interface_set_l2_bridge sw_if_index 3 bd_id 1 shg 0 enable

DUT2:
sw_interface_set_flags sw_if_index 2 admin-up
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_flags sw_if_index 3 admin-up
sw_interface_dump
bridge_domain_add_del bd_id 2 flood 1 uu-flood 1 forward 1 learn 1 arp-term 0
sw_interface_set_flags sw_if_index 2 admin-up
sw_interface_set_l2_bridge sw_if_index 2 bd_id 2 shg 4 enable
sw_interface_set_flags sw_if_index 1 admin-up
sw_interface_set_l2_bridge sw_if_index 1 bd_id 2 shg 4 enable
sw_interface_set_flags sw_if_index 3 admin-up
sw_interface_set_l2_bridge sw_if_index 3 bd_id 2 shg 0 enable