ip4

eth2p-ethicmpv4-ip4base-dev

IPv4 routing test cases

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

  • [Enc] Packet Encapsulations: Eth-IPv4-ICMPv4 for IPv4 routing on both links.

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

  • [Ver] TG verification: Test ICMPv4 Echo Request packets are sent in one direction 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: RFC791, RFC826, RFC792

 Test Name 

 VPP API Test Commands History - Commands Used Per Test Case 

 64b-ethicmpv4-ip4base-dev 

 DUT1:  
cli_inband(cmd=’show log’)
show_version()
sw_interface_dump(name_filter=’’,name_filter_valid=0)
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,admin_up_down=1)
sw_interface_set_flags(sw_if_index=2,admin_up_down=1)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
ip_neighbor_add_del(is_add=1,neighbor={‘ip_address’: ‘10.10.10.2’, ‘flags’: 0, ‘sw_if_index’: 1, ‘mac_address’: ‘fa:ce:00:00:02:00’})
ip_neighbor_add_del(is_add=1,neighbor={‘ip_address’: ‘20.20.20.2’, ‘flags’: 0, ‘sw_if_index’: 2, ‘mac_address’: ‘fa:ce:00:00:02:01’})
sw_interface_add_del_address(address_length=24,del_all=0,is_add=1,sw_if_index=1,address=’nnnx01’,is_ipv6=0)
sw_interface_add_del_address(address_length=24,del_all=0,is_add=1,sw_if_index=2,address=’x14x14x14x01’,is_ipv6=0)
ip_route_add_del(route={‘paths’: [{‘nh’: {‘obj_id’: 4294967295, ‘via_label’: 1048576, ‘address’: {‘ip4’: ‘nnnx02’}}, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘proto’: 0, ‘n_labels’: 0, ‘label_stack’: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ‘sw_if_index’: 1, ‘flags’: 0, ‘preference’: 1, ‘table_id’: 0, ‘type’: 0}], ‘prefix’: {‘len’: 32, ‘address’: {‘un’: {‘ip4’: ‘xc0xa8x00x01’}, ‘af’: 0}}, ‘n_paths’: 1, ‘table_id’: 0},is_add=1,is_multipath=0)
ip_route_add_del(route={‘paths’: [{‘nh’: {‘obj_id’: 4294967295, ‘via_label’: 1048576, ‘address’: {‘ip4’: ‘x14x14x14x02’}}, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘proto’: 0, ‘n_labels’: 0, ‘label_stack’: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ‘sw_if_index’: 2, ‘flags’: 0, ‘preference’: 1, ‘table_id’: 0, ‘type’: 0}], ‘prefix’: {‘len’: 32, ‘address’: {‘un’: {‘ip4’: ‘xc0xa8x00x02’}, ‘af’: 0}}, ‘n_paths’: 1, ‘table_id’: 0},is_add=1,is_multipath=0)

eth2p-ethip4-ip4base-copblklistbase-dev

COP Security IPv4 whitelist test cases

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

  • [Enc] Packet Encapsulations: Eth-IPv4 on all links.

  • [Cfg] DUT configuration: DUT1 is configured with IPv4 routing and static routes. COP security white-lists is applied on DUT1 ingress interface from TG.

  • [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:

 Test Name 

 VPP API Test Commands History - Commands Used Per Test Case 

 64b-ethip4- 
ip4base-copblklistbase-dev

 DUT1:  
cli_inband(cmd=’show log’)
show_version()
sw_interface_dump(name_filter=’’,name_filter_valid=0)
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,admin_up_down=1)
sw_interface_set_flags(sw_if_index=2,admin_up_down=1)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
ip_neighbor_add_del(is_add=1,neighbor={‘ip_address’: ‘10.10.10.2’, ‘flags’: 0, ‘sw_if_index’: 1, ‘mac_address’: ‘fa:ce:00:00:02:00’})
ip_neighbor_add_del(is_add=1,neighbor={‘ip_address’: ‘20.20.20.2’, ‘flags’: 0, ‘sw_if_index’: 2, ‘mac_address’: ‘fa:ce:00:00:02:01’})
sw_interface_add_del_address(address_length=24,del_all=0,is_add=1,sw_if_index=1,address=’nnnx01’,is_ipv6=0)
sw_interface_add_del_address(address_length=24,del_all=0,is_add=1,sw_if_index=2,address=’x14x14x14x01’,is_ipv6=0)
ip_table_add_del(table={‘is_ip6’: 0, ‘table_id’: 1},is_add=1)
ip_route_add_del(route={‘paths’: [{‘nh’: {‘obj_id’: 4294967295, ‘via_label’: 1048576, ‘address’: 0}, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘proto’: 0, ‘n_labels’: 0, ‘label_stack’: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ‘sw_if_index’: 4294967295, ‘flags’: 0, ‘preference’: 1, ‘table_id’: 0, ‘type’: 1}], ‘prefix’: {‘len’: 24, ‘address’: {‘un’: {‘ip4’: ‘nnnx00’}, ‘af’: 0}}, ‘n_paths’: 1, ‘table_id’: 1},is_add=1,is_multipath=0)
cop_whitelist_enable_disable(fib_id=1,default_cop=0,ip6=0,ip4=1,sw_if_index=1)
cop_interface_enable_disable(enable_disable=1,sw_if_index=1)

eth2p-ethip4-ip4base-copwhtlistbase-dev

COP Security IPv4 whitelist test cases

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

  • [Enc] Packet Encapsulations: Eth-IPv4 on all links.

  • [Cfg] DUT configuration: DUT1 is configured with IPv4 routing and static routes. COP security white-lists is applied on DUT1 ingress interface from TG.

  • [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:

 Test Name 

 VPP API Test Commands History - Commands Used Per Test Case 

 64b-ethip4- 
ip4base-copwhtlistbase-dev

 DUT1:  
cli_inband(cmd=’show log’)
show_version()
sw_interface_dump(name_filter=’’,name_filter_valid=0)
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,admin_up_down=1)
sw_interface_set_flags(sw_if_index=2,admin_up_down=1)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
ip_neighbor_add_del(is_add=1,neighbor={‘ip_address’: ‘10.10.10.2’, ‘flags’: 0, ‘sw_if_index’: 1, ‘mac_address’: ‘fa:ce:00:00:02:00’})
ip_neighbor_add_del(is_add=1,neighbor={‘ip_address’: ‘20.20.20.2’, ‘flags’: 0, ‘sw_if_index’: 2, ‘mac_address’: ‘fa:ce:00:00:02:01’})
sw_interface_add_del_address(address_length=24,del_all=0,is_add=1,sw_if_index=1,address=’nnnx01’,is_ipv6=0)
sw_interface_add_del_address(address_length=24,del_all=0,is_add=1,sw_if_index=2,address=’x14x14x14x01’,is_ipv6=0)
ip_table_add_del(table={‘is_ip6’: 0, ‘table_id’: 1},is_add=1)
ip_route_add_del(route={‘paths’: [{‘nh’: {‘obj_id’: 4294967295, ‘via_label’: 1048576, ‘address’: 0}, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘proto’: 0, ‘n_labels’: 0, ‘label_stack’: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ‘sw_if_index’: 4294967295, ‘flags’: 0, ‘preference’: 1, ‘table_id’: 0, ‘type’: 1}], ‘prefix’: {‘len’: 24, ‘address’: {‘un’: {‘ip4’: ‘nnnx00’}, ‘af’: 0}}, ‘n_paths’: 1, ‘table_id’: 1},is_add=1,is_multipath=0)
cop_whitelist_enable_disable(fib_id=1,default_cop=0,ip6=0,ip4=1,sw_if_index=1)
cop_interface_enable_disable(enable_disable=1,sw_if_index=1)

eth2p-ethip4-ip4base-iacldstbase-dev

IPv4 iAcl whitelist test cases

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

  • [Enc] Packet Encapsulations: Eth-IPv4 on all links.

  • [Cfg] DUT configuration: DUT1 is configured with IPv4 routing and static routes. IPv4 iAcl security whitelist is applied on DUT1 ingress interface from TG.

  • [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:

 Test Name 

 VPP API Test Commands History - Commands Used Per Test Case 

 64b-ethip4- 
ip4base-iacldstbase-dev

 DUT1:  
cli_inband(cmd=’show log’)
show_version()
sw_interface_dump(name_filter=’’,name_filter_valid=0)
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,admin_up_down=1)
sw_interface_set_flags(sw_if_index=2,admin_up_down=1)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
ip_neighbor_add_del(is_add=1,neighbor={‘ip_address’: ‘10.10.10.2’, ‘flags’: 0, ‘sw_if_index’: 1, ‘mac_address’: ‘fa:ce:00:00:02:00’})
ip_neighbor_add_del(is_add=1,neighbor={‘ip_address’: ‘20.20.20.2’, ‘flags’: 0, ‘sw_if_index’: 2, ‘mac_address’: ‘fa:ce:00:00:02:01’})
sw_interface_add_del_address(address_length=24,del_all=0,is_add=1,sw_if_index=1,address=’nnnx01’,is_ipv6=0)
sw_interface_add_del_address(address_length=24,del_all=0,is_add=1,sw_if_index=2,address=’x14x14x14x01’,is_ipv6=0)
classify_add_del_table(next_table_index=4294967295,miss_next_index=4294967295,mask_len=32,match_n_vectors=2,mask=’x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x14x14x14x02x00x00x00x00x00x00x00x00x00x00x00x00’,current_data_offset=0,memory_size=2097152,table_index=4294967295,nbuckets=2,skip_n_vectors=0,is_add=1,current_data_flag=0)
classify_add_del_session(advance=0,match_len=32,is_add=1,opaque_index=4294967295,hit_next_index=4294967295,table_index=0,action=0,match=’x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x14x14x14x02x00x00x00x00x00x00x00x00x00x00x00x00’,metadata=0)
input_acl_set_interface(ip6_table_index=4294967295,is_add=1,l2_table_index=4294967295,ip4_table_index=0,sw_if_index=1)

eth2p-ethip4-ip4base-ipolicemarkbase-dev

IPv4 policer test cases

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

  • [Enc] Packet Encapsulations: Eth-IPv4 on all links.

  • [Cfg] DUT configuration: On DUT1 configure interfaces IPv4 adresses, and static ARP record on the second interface. On DUT1 configure 2R3C color-aware policer on the first interface.

  • [Ver] TG verification: Test packet is sent from TG on the first link to DUT1. Packet is received on TG on the second link from DUT1.

  • [Ref] Applicable standard specifications: RFC2474, RFC2697, RFC2698.

 Test Name 

 VPP API Test Commands History - Commands Used Per Test Case 

 64b-ethip4- 
ip4base-ipolicemarkbase-dev

 DUT1:  
cli_inband(cmd=’show log’)
show_version()
sw_interface_dump(name_filter=’’,name_filter_valid=0)
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,admin_up_down=1)
sw_interface_set_flags(sw_if_index=2,admin_up_down=1)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
sw_interface_dump(name_filter=’’,name_filter_valid=0)
ip_neighbor_add_del(is_add=1,neighbor={‘ip_address’: ‘10.10.10.2’, ‘flags’: 0, ‘sw_if_index’: 1, ‘mac_address’: ‘fa:ce:00:00:02:00’})
ip_neighbor_add_del(is_add=1,neighbor={‘ip_address’: ‘20.20.20.2’, ‘flags’: 0, ‘sw_if_index’: 2, ‘mac_address’: ‘fa:ce:00:00:02:01’})
sw_interface_add_del_address(address_length=24,del_all=0,is_add=1,sw_if_index=1,address=’nnnx01’,is_ipv6=0)
sw_interface_add_del_address(address_length=24,del_all=0,is_add=1,sw_if_index=2,address=’x14x14x14x01’,is_ipv6=0)
policer_add_del name policer1 cir 100 eir 150 cb 64 eb 64 rate_type pps round_type closest type 2r3c-2698 conform_action transmit exceed_action mark-and-transmit AF22 violate_action transmit color-aware
classify_add_del_table mask l3 ip4 dst
classify_add_del_session policer-hit-next 0 exceed-color table-index 0 skip_n 1 match_n 2 match l3 ip4 dst 20.20.20.2
policer_classify_set_interface sw_if_index 1 ip4-table 0
policer_add_del name policer2 cir 100 eir 150 cb 64 eb 64 rate_type pps round_type closest type 2r3c-2698 conform_action transmit exceed_action mark-and-transmit AF22 violate_action transmit color-aware
classify_add_del_table mask l3 ip4 dst
classify_add_del_session policer-hit-next 1 exceed-color table-index 1 skip_n 1 match_n 2 match l3 ip4 dst 10.10.10.2
policer_classify_set_interface sw_if_index 2 ip4-table 1