ip4

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 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=2,flags=1)
sw_interface_set_flags(sw_if_index=1,flags=1)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
hw_interface_set_mtu(sw_if_index=1,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_flags(sw_if_index=2,flags=1)
sw_interface_set_flags(sw_if_index=1,flags=1)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
ip_neighbor_add_del(is_add=True,neighbor={‘sw_if_index’: 2, ‘flags’: 0, ‘mac_address’: ‘fa:ce:00:00:02:05’, ‘ip_address’: ‘10.10.10.2’})
ip_neighbor_add_del(is_add=True,neighbor={‘sw_if_index’: 1, ‘flags’: 0, ‘mac_address’: ‘fa:ce:00:00:02:04’, ‘ip_address’: ‘20.20.20.2’})
sw_interface_add_del_address(sw_if_index=2,is_add=True,del_all=False,prefix={‘len’: 24, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’nnnx01’}}})
sw_interface_add_del_address(sw_if_index=1,is_add=True,del_all=False,prefix={‘len’: 24, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’x14x14x14x01’}}})
ip_table_add_del(table={‘table_id’: 1, ‘is_ip6’: False},is_add=True)
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’: 4294967295, ‘table_id’: 0, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘preference’: 1, ‘type’: 1, ‘flags’: 0, ‘proto’: 0, ‘nh’: {‘address’: 0, ‘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]}]})
cop_whitelist_enable_disable(sw_if_index=2,fib_id=1,ip4=True,ip6=False,default_cop=0)
cop_interface_enable_disable(sw_if_index=2,enable_disable=True)

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 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=2,flags=1)
sw_interface_set_flags(sw_if_index=1,flags=1)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
hw_interface_set_mtu(sw_if_index=1,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_flags(sw_if_index=2,flags=1)
sw_interface_set_flags(sw_if_index=1,flags=1)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
ip_neighbor_add_del(is_add=True,neighbor={‘sw_if_index’: 2, ‘flags’: 0, ‘mac_address’: ‘fa:ce:00:00:02:05’, ‘ip_address’: ‘10.10.10.2’})
ip_neighbor_add_del(is_add=True,neighbor={‘sw_if_index’: 1, ‘flags’: 0, ‘mac_address’: ‘fa:ce:00:00:02:04’, ‘ip_address’: ‘20.20.20.2’})
sw_interface_add_del_address(sw_if_index=2,is_add=True,del_all=False,prefix={‘len’: 24, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’nnnx01’}}})
sw_interface_add_del_address(sw_if_index=1,is_add=True,del_all=False,prefix={‘len’: 24, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’x14x14x14x01’}}})
ip_table_add_del(table={‘table_id’: 1, ‘is_ip6’: False},is_add=True)
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’: 4294967295, ‘table_id’: 0, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘preference’: 1, ‘type’: 1, ‘flags’: 0, ‘proto’: 0, ‘nh’: {‘address’: 0, ‘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]}]})
cop_whitelist_enable_disable(sw_if_index=2,fib_id=1,ip4=True,ip6=False,default_cop=0)
cop_interface_enable_disable(sw_if_index=2,enable_disable=True)

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 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=2,flags=1)
sw_interface_set_flags(sw_if_index=1,flags=1)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
hw_interface_set_mtu(sw_if_index=1,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_flags(sw_if_index=2,flags=1)
sw_interface_set_flags(sw_if_index=1,flags=1)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
ip_neighbor_add_del(is_add=True,neighbor={‘sw_if_index’: 2, ‘flags’: 0, ‘mac_address’: ‘fa:ce:00:00:02:05’, ‘ip_address’: ‘10.10.10.2’})
ip_neighbor_add_del(is_add=True,neighbor={‘sw_if_index’: 1, ‘flags’: 0, ‘mac_address’: ‘fa:ce:00:00:02:04’, ‘ip_address’: ‘20.20.20.2’})
sw_interface_add_del_address(sw_if_index=2,is_add=True,del_all=False,prefix={‘len’: 24, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’nnnx01’}}})
sw_interface_add_del_address(sw_if_index=1,is_add=True,del_all=False,prefix={‘len’: 24, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’x14x14x14x01’}}})
classify_add_del_table(is_add=True,del_chain=False,table_index=4294967295,nbuckets=2,memory_size=2097152,skip_n_vectors=1,match_n_vectors=2,next_table_index=4294967295,miss_next_index=4294967295,current_data_flag=0,current_data_offset=0,mask_len=32,mask=b’x00x00x00x00x00x00x00x00x00x00x00x00x00x00xffxffxffxffx00x00x00x00x00x00x00x00x00x00x00x00x00x00’)
classify_add_del_session(is_add=True,table_index=0,hit_next_index=4294967295,opaque_index=4294967295,advance=0,action=0,metadata=0,match_len=48,match=b’x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x14x14x14x02x00x00x00x00x00x00x00x00x00x00x00x00x00x00’)
input_acl_set_interface(sw_if_index=2,ip4_table_index=0,ip6_table_index=4294967295,l2_table_index=4294967295,is_add=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 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=2,flags=1)
sw_interface_set_flags(sw_if_index=1,flags=1)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
hw_interface_set_mtu(sw_if_index=1,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_flags(sw_if_index=2,flags=1)
sw_interface_set_flags(sw_if_index=1,flags=1)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
ip_neighbor_add_del(is_add=True,neighbor={‘sw_if_index’: 2, ‘flags’: 0, ‘mac_address’: ‘fa:ce:00:00:02:05’, ‘ip_address’: ‘10.10.10.2’})
ip_neighbor_add_del(is_add=True,neighbor={‘sw_if_index’: 1, ‘flags’: 0, ‘mac_address’: ‘fa:ce:00:00:02:04’, ‘ip_address’: ‘20.20.20.2’})
sw_interface_add_del_address(sw_if_index=2,is_add=True,del_all=False,prefix={‘len’: 24, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’nnnx01’}}})
sw_interface_add_del_address(sw_if_index=1,is_add=True,del_all=False,prefix={‘len’: 24, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’x14x14x14x01’}}})
policer_add_del(is_add=1,name=b’policer1’,cir=100,eir=150,cb=64,eb=64,rate_type=1,round_type=0,type=2,conform_action_type=1,conform_dscp=0,exceed_action_type=2,exceed_dscp=20,violate_action_type=1,violate_dscp=0,color_aware=1)
classify_add_del_table(is_add=True,del_chain=False,table_index=4294967295,nbuckets=2,memory_size=2097152,skip_n_vectors=1,match_n_vectors=2,next_table_index=4294967295,miss_next_index=4294967295,current_data_flag=0,current_data_offset=0,mask_len=32,mask=b’x00x00x00x00x00x00x00x00x00x00x00x00x00x00xffxffxffxffx00x00x00x00x00x00x00x00x00x00x00x00x00x00’)
classify_add_del_session(is_add=True,table_index=0,hit_next_index=0,opaque_index=1,advance=0,action=0,metadata=0,match_len=48,match=b’x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x14x14x14x02x00x00x00x00x00x00x00x00x00x00x00x00x00x00’)
policer_classify_set_interface(is_add=True,sw_if_index=2,ip4_table_index=0,ip6_table_index=4294967295,l2_table_index=4294967295)
classify_add_del_session(is_add=True,table_index=0,hit_next_index=0,opaque_index=1,advance=0,action=0,metadata=0,match_len=48,match=b’x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00nnnx02x00x00x00x00x00x00x00x00x00x00x00x00x00x00’)
policer_classify_set_interface(is_add=True,sw_if_index=1,ip4_table_index=0,ip6_table_index=4294967295,l2_table_index=4294967295)

eth2p-ethipv4-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 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 IPv4 packet with IP protocol=61 is sent in one direction by TG on links to DUT1; on receive TG verifies packet 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-ethipv4-ip4base-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=2,flags=1)
sw_interface_set_flags(sw_if_index=1,flags=1)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
hw_interface_set_mtu(sw_if_index=1,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_flags(sw_if_index=2,flags=1)
sw_interface_set_flags(sw_if_index=1,flags=1)
hw_interface_set_mtu(sw_if_index=2,mtu=9200)
hw_interface_set_mtu(sw_if_index=1,mtu=9200)
sw_interface_dump(name_filter_valid=False,name_filter=’’)
ip_neighbor_add_del(is_add=True,neighbor={‘sw_if_index’: 2, ‘flags’: 0, ‘mac_address’: ‘fa:ce:00:00:02:05’, ‘ip_address’: ‘10.10.10.2’})
ip_neighbor_add_del(is_add=True,neighbor={‘sw_if_index’: 1, ‘flags’: 0, ‘mac_address’: ‘fa:ce:00:00:02:04’, ‘ip_address’: ‘20.20.20.2’})
sw_interface_add_del_address(sw_if_index=2,is_add=True,del_all=False,prefix={‘len’: 24, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’nnnx01’}}})
sw_interface_add_del_address(sw_if_index=1,is_add=True,del_all=False,prefix={‘len’: 24, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’x14x14x14x01’}}})
ip_route_add_del(is_add=True,is_multipath=False,route={‘table_id’: 0, ‘prefix’: {‘len’: 32, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’xc0xa8x00x01’}}}, ‘n_paths’: 1, ‘paths’: [{‘sw_if_index’: 2, ‘table_id’: 0, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘preference’: 1, ‘type’: 0, ‘flags’: 0, ‘proto’: 0, ‘nh’: {‘address’: {‘ip4’: b’nnnx02’}, ‘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’: 0, ‘prefix’: {‘len’: 32, ‘address’: {‘af’: 0, ‘un’: {‘ip4’: b’xc0xa8x00x02’}}}, ‘n_paths’: 1, ‘paths’: [{‘sw_if_index’: 1, ‘table_id’: 0, ‘rpf_id’: 4294967295, ‘weight’: 1, ‘preference’: 1, ‘type’: 0, ‘flags’: 0, ‘proto’: 0, ‘nh’: {‘address’: {‘ip4’: b’x14x14x14x02’}, ‘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]}]})