l2bd

eth2p-avf-dot1q-l2bdbasemaclrn-gbp-dev

L2BD with IEEE 802.1Q and GBP test cases

  • [Top] Network Topologies: TG-DUT1-TG 2-node circular topology with single links between nodes.

  • [Enc] Packet Encapsulations: Dot1q-IPv4 for L2 switching of IPv4. IEEE 802.1Q tagging is applied on both links TG-DUT1 .

  • [Cfg] DUT configuration: DUT1 is configured with: 2 VLAN subinterfaces (VID 200 and 300), 1 L2 BD with the 2 VLAN subinterfaces and a BVI, 1 GBP L3 RD, 1 GBP L2 BD with the L2 BD, 1 GBP EPG EPG-1 with sclass 100, the GBP L2 BD and L3 RD, 2 GBP external EP in EPG-1, 2 external subnets with sclass 200 and 300, Contracts allowing full communications between the 2 external subnets. DUT1 tested with virtual with VF enabled.

  • [Ver] TG verification: Test IPv4 packets are sent in one direction by TG on link to DUT1; on receive TG verifies packets for correctness and drops as applicable.

  • [Ref] Applicable standard specifications: IEEE 802.1q.

 Test Name 

 VPP API Test Commands History - Commands Used Per Test Case 

 64b-avf-dot1q- 
l2bdbasemaclrn-gbp-dev

 DUT1:  
cli_inband(cmd=’show logging’)
show_version()
sw_interface_dump(name_filter_valid=False,name_filter=’’)
cli_inband(cmd=’trace add dpdk-input 50’)
cli_inband(cmd=’trace add vhost-user-input 50’)
cli_inband(cmd=’trace add memif-input 50’)
cli_inband(cmd=’trace add avf-input 50’)
cli_inband(cmd=’set logging class avf level debug’)
avf_create(pci_addr=1295712256,enable_elog=0,rxq_num=1,rxq_size=0,txq_size=0)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
cli_inband(cmd=’set logging class avf level debug’)
avf_create(pci_addr=1832583168,enable_elog=0,rxq_num=1,rxq_size=0,txq_size=0)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_set_flags(sw_if_index=1,flags=1)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
sw_interface_set_flags(sw_if_index=2,flags=1)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
create_vlan_subif(sw_if_index=1,vlan_id=1326)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_set_flags(sw_if_index=3,flags=1)
l2_interface_vlan_tag_rewrite(sw_if_index=3,vtr_op=3,push_dot1q=1,tag1=0,tag2=0)
create_vlan_subif(sw_if_index=2,vlan_id=1327)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_set_flags(sw_if_index=4,flags=1)
l2_interface_vlan_tag_rewrite(sw_if_index=4,vtr_op=3,push_dot1q=1,tag1=0,tag2=0)
create_loopback(mac_address=b’xbaxdcx00xffxeex01’)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_set_flags(sw_if_index=5,flags=1)
ip_table_add_del(table={‘table_id’: 1, ‘is_ip6’: False},is_add=True)
gbp_route_domain_add(rd={‘rd_id’: 1, ‘ip4_table_id’: 1, ‘ip6_table_id’: 0, ‘ip4_uu_sw_if_index’: 4294967295, ‘ip6_uu_sw_if_index’: 4294967295})
sw_interface_set_table(sw_if_index=5,is_ipv6=False,vrf_id=1)
bridge_domain_add_del(bd_id=1,flood=True,uu_flood=True,forward=True,learn=True,arp_term=1,is_add=True)
gbp_bridge_domain_add(bd={‘flags’: 0, ‘bvi_sw_if_index’: 5, ‘uu_fwd_sw_if_index’: 4294967295, ‘bm_flood_sw_if_index’: 4294967295, ‘bd_id’: 1, ‘rd_id’: 1})
gbp_endpoint_group_add(epg={‘uplink_sw_if_index’: 4294967295, ‘bd_id’: 1, ‘rd_id’: 1, ‘vnid’: 1, ‘sclass’: 100, ‘retention’: {‘remote_ep_timeout’: 4294967295}})
sw_interface_add_del_address(sw_if_index=5,is_add=True,del_all=False,prefix={‘len’: 24, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’x01x01x01x01’}}})
gbp_subnet_add_del(is_add=True,subnet={‘type’: 4, ‘sw_if_index’: 4294967295, ‘sclass’: 100, ‘prefix’: {‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’x01x01x01x00’}}, ‘len’: 24}, ‘rd_id’: 1})
gbp_ext_itf_add_del(is_add=True,ext_itf={‘sw_if_index’: 5, ‘bd_id’: 1, ‘rd_id’: 1, ‘flags’: 0})
gbp_endpoint_add(endpoint={‘sw_if_index’: 3, ‘ips’: [{‘af’: 0, ‘un’: {‘ip4’: b’x01x01x01d’}}], ‘n_ips’: 1, ‘mac’: b’xfaxcex00x00x02x1a’, ‘sclass’: 100, ‘flags’: 8, ‘tun’: {‘src’: {‘af’: 0, ‘un’: {‘ip4’: b’x00x00x00x00’}}, ‘dst’: {‘af’: 0, ‘un’: {‘ip4’: b’x00x00x00x00’}}}})
gbp_endpoint_add(endpoint={‘sw_if_index’: 4, ‘ips’: [{‘af’: 0, ‘un’: {‘ip4’: b’x01x01x01xc8’}}], ‘n_ips’: 1, ‘mac’: b’xfaxcex00x00x02x1b’, ‘sclass’: 100, ‘flags’: 8, ‘tun’: {‘src’: {‘af’: 0, ‘un’: {‘ip4’: b’x00x00x00x00’}}, ‘dst’: {‘af’: 0, ‘un’: {‘ip4’: b’x00x00x00x00’}}}})
ip_route_add_del(is_add=True,is_multipath=False,route={‘table_id’: 1, ‘prefix’: {‘len’: 24, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’nnnx00’}}}, ‘n_paths’: 1, ‘paths’: [{‘sw_if_index’: 5, ‘table_id’: 0, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘preference’: 1, ‘type’: 0, ‘flags’: 0, ‘proto’: 0, ‘nh’: {‘address’: {‘ip4’: b’x01x01x01d’}, ‘via_label’: 1048576, ‘obj_id’: 4294967295}, ‘n_labels’: 0, ‘label_stack’: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}]})
ip_route_add_del(is_add=True,is_multipath=False,route={‘table_id’: 1, ‘prefix’: {‘len’: 24, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’x14x14x14x00’}}}, ‘n_paths’: 1, ‘paths’: [{‘sw_if_index’: 5, ‘table_id’: 0, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘preference’: 1, ‘type’: 0, ‘flags’: 0, ‘proto’: 0, ‘nh’: {‘address’: {‘ip4’: b’x01x01x01xc8’}, ‘via_label’: 1048576, ‘obj_id’: 4294967295}, ‘n_labels’: 0, ‘label_stack’: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}]})
gbp_subnet_add_del(is_add=True,subnet={‘type’: 4, ‘sw_if_index’: 4294967295, ‘sclass’: 200, ‘prefix’: {‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’nnnx00’}}, ‘len’: 24}, ‘rd_id’: 1})
gbp_subnet_add_del(is_add=True,subnet={‘type’: 4, ‘sw_if_index’: 4294967295, ‘sclass’: 300, ‘prefix’: {‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’x14x14x14x00’}}, ‘len’: 24}, ‘rd_id’: 1})
acl_add_replace(tag=’’gbp-permit-200-300’’,acl_index=4294967295,count=1,r=[{‘is_permit’: 1, ‘src_prefix’: {‘len’: 0, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’x00x00x00x00’}}}, ‘dst_prefix’: {‘len’: 0, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’x00x00x00x00’}}}, ‘proto’: 61, ‘srcport_or_icmptype_first’: 0, ‘srcport_or_icmptype_last’: 65535, ‘dstport_or_icmpcode_first’: 0, ‘dstport_or_icmpcode_last’: 65535, ‘tcp_flags_mask’: 0, ‘tcp_flags_value’: 0}])
gbp_contract_add_del(is_add=True,contract={‘acl_index’: 0, ‘sclass’: 200, ‘dclass’: 300, ‘n_rules’: 2, ‘rules’: [{‘action’: 1, ‘nh_set’: {‘hash_mode’: 1, ‘n_nhs’: 8, ‘nhs’: [{}, {}, {}, {}, {}, {}, {}, {}]}}, {‘action’: 1, ‘nh_set’: {‘hash_mode’: 1, ‘n_nhs’: 8, ‘nhs’: [{}, {}, {}, {}, {}, {}, {}, {}]}}], ‘n_ether_types’: 16, ‘allowed_ethertypes’: [2048, 34525, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]})
gbp_contract_add_del(is_add=True,contract={‘acl_index’: 0, ‘sclass’: 300, ‘dclass’: 200, ‘n_rules’: 2, ‘rules’: [{‘action’: 1, ‘nh_set’: {‘hash_mode’: 1, ‘n_nhs’: 8, ‘nhs’: [{}, {}, {}, {}, {}, {}, {}, {}]}}, {‘action’: 1, ‘nh_set’: {‘hash_mode’: 1, ‘n_nhs’: 8, ‘nhs’: [{}, {}, {}, {}, {}, {}, {}, {}]}}], ‘n_ether_types’: 16, ‘allowed_ethertypes’: [2048, 34525, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]})
sw_interface_set_flags(sw_if_index=3,flags=1)
hw_interface_set_mtu(sw_if_index=3,mtu=9200)
sw_interface_set_flags(sw_if_index=4,flags=1)
hw_interface_set_mtu(sw_if_index=4,mtu=9200)
sw_interface_dump(name_filter_valid=False,name_filter=’’)

eth2p-avf-dot1qip4-l2bdbasemaclrn-dev

IPv4 routing with IEEE 802.1Q test cases

  • [Top] Network Topologies: TG-DUT1-TG 2-node circular topology with single links between nodes.

  • [Enc] Packet Encapsulations: Eth-IPv4 for IPv4 routing. IEEE 802.1Q tagging is applied on links between TG-DUT1.

  • [Cfg] DUT configuration: DUT1 is configured with IPv4 routing and two static IPv4 /30 route entries. DUT1 is tested with virtual.

  • [Ver] TG verification: Test IPv4 packets are sent in one direction by TG on link to DUT1; on receive TG verifies packets for correctness and drops as applicable.

  • [Ref] Applicable standard specifications: IEEE 802.1q.

 Test Name 

 VPP API Test Commands History - Commands Used Per Test Case 

 68b-avf- 
dot1qip4-l2bdbasemaclrn-dev

 DUT1:  
cli_inband(cmd=’show logging’)
show_version()
sw_interface_dump(name_filter_valid=False,name_filter=’’)
cli_inband(cmd=’trace add dpdk-input 50’)
cli_inband(cmd=’trace add vhost-user-input 50’)
cli_inband(cmd=’trace add memif-input 50’)
cli_inband(cmd=’trace add avf-input 50’)
cli_inband(cmd=’set logging class avf level debug’)
avf_create(pci_addr=1295712256,enable_elog=0,rxq_num=1,rxq_size=0,txq_size=0)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
cli_inband(cmd=’set logging class avf level debug’)
avf_create(pci_addr=1832583168,enable_elog=0,rxq_num=1,rxq_size=0,txq_size=0)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_set_flags(sw_if_index=1,flags=1)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
sw_interface_set_flags(sw_if_index=2,flags=1)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
create_vlan_subif(sw_if_index=1,vlan_id=1326)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_set_flags(sw_if_index=3,flags=1)
l2_interface_vlan_tag_rewrite(sw_if_index=3,vtr_op=3,push_dot1q=1,tag1=0,tag2=0)
create_vlan_subif(sw_if_index=2,vlan_id=1327)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_set_flags(sw_if_index=4,flags=1)
l2_interface_vlan_tag_rewrite(sw_if_index=4,vtr_op=3,push_dot1q=1,tag1=0,tag2=0)
sw_interface_set_l2_bridge(rx_sw_if_index=3,bd_id=1,shg=0,port_type=0,enable=True)
sw_interface_set_l2_bridge(rx_sw_if_index=4,bd_id=1,shg=0,port_type=0,enable=True)

eth2p-ethipv4-l2bdbasemaclrn-dev

L2 bridge-domain test cases

  • [Top] Network Topologies: TG-DUT1-TG 2-node circular topology with single links between nodes.

  • [Enc] Packet Encapsulations: Eth-IPv4 for L2 switching of IPv4. Both apply to all links.

  • [Cfg] DUT configuration: DUT1 is configured with L2 bridge-domain switching.

  • [Ver] TG verification: Test IPv4 packets with IP protocol=61 are sent in both directions by TG on links to DUT1; on receive TG verifies packets for correctness and their IPv4 src-addr, dst-addr and MAC addresses.

  • [Ref] Applicable standard specifications: RFC792

 Test Name 

 VPP API Test Commands History - Commands Used Per Test Case 

 64b-ethipv4-l2bdbasemaclrn-dev 

 DUT1:  
cli_inband(cmd=’show logging’)
show_version()
sw_interface_dump(name_filter_valid=False,name_filter=’’)
cli_inband(cmd=’trace add dpdk-input 50’)
cli_inband(cmd=’trace add vhost-user-input 50’)
cli_inband(cmd=’trace add memif-input 50’)
cli_inband(cmd=’trace add avf-input 50’)
sw_interface_set_flags(sw_if_index=1,flags=1)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
sw_interface_set_flags(sw_if_index=2,flags=1)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
sw_interface_set_l2_bridge(rx_sw_if_index=1,bd_id=1,shg=0,port_type=0,enable=True)
sw_interface_set_l2_bridge(rx_sw_if_index=2,bd_id=1,shg=0,port_type=0,enable=True)