2.61. test_ip6 module¶
- class test_ip6.IP6PuntSetup¶
Bases:
objectSetup for IPv6 Punt Police/Redirect
- punt_setup()¶
- punt_teardown()¶
- class test_ip6.IPv6NDProxyTest(methodName='runTest')¶
Bases:
test_ip6.TestIPv6NDIPv6 ND ProxyTest Case
- setUp()¶
Clear trace before running each test
- classmethod setUpClass()¶
Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api
- tearDown()¶
Show various debug prints after each test
- classmethod tearDownClass()¶
Perform final cleanup after running all tests in this test-case
- test_nd_proxy()¶
IPv6 Proxy ND
- class test_ip6.TestICMPv6Echo(methodName='runTest')¶
Bases:
framework.VppTestCaseICMPv6 Echo Test Case
- setUp()¶
Clear trace before running each test
- classmethod setUpClass()¶
Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api
- tearDown()¶
Show various debug prints after each test
- classmethod tearDownClass()¶
Perform final cleanup after running all tests in this test-case
- test_icmpv6_echo()¶
VPP replies to ICMPv6 Echo Request
Test scenario:
Receive ICMPv6 Echo Request message on pg0 interface.
Check outgoing ICMPv6 Echo Reply message on pg0 interface.
- class test_ip6.TestIP6Input(methodName='runTest')¶
Bases:
framework.VppTestCaseIPv6 Input Exception Test Cases
- all_0s = '::'¶
- all_1s = 'FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF'¶
- icmpv6_data = '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n'¶
- setUp()¶
Clear trace before running each test
- classmethod setUpClass()¶
Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api
- tearDown()¶
Show various debug prints after each test
- classmethod tearDownClass()¶
Perform final cleanup after running all tests in this test-case
- test_hop_by_hop()¶
Hop-by-hop header test
- test_ip_input_icmp_reply()¶
IP6 Input Exception - Return ICMP (3,0)
- test_ip_input_no_replies¶
- class test_ip6.TestIP6LinkLocal(methodName='runTest')¶
Bases:
framework.VppTestCaseIPv6 Link Local
- setUp()¶
Clear trace before running each test
- classmethod setUpClass()¶
Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api
- tearDown()¶
Show various debug prints after each test
- classmethod tearDownClass()¶
Perform final cleanup after running all tests in this test-case
- test_ip6_ll()¶
IPv6 Link Local
- test_ip6_ll_p2mp()¶
IPv6 Link Local P2MP (GRE)
- test_ip6_ll_p2p()¶
IPv6 Link Local P2P (GRE)
- class test_ip6.TestIP6LoadBalance(methodName='runTest')¶
Bases:
framework.VppTestCaseIPv6 Load-Balancing
- pg_send(input, pkts)¶
- send_and_expect_load_balancing(input, pkts, outputs)¶
- send_and_expect_one_itf(input, pkts, itf)¶
- setUp()¶
Clear trace before running each test
- classmethod setUpClass()¶
Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api
- tearDown()¶
Show various debug prints after each test
- classmethod tearDownClass()¶
Perform final cleanup after running all tests in this test-case
- test_ip6_load_balance()¶
IPv6 Load-Balancing
- class test_ip6.TestIP6Punt(methodName='runTest')¶
Bases:
test_ip6.IP6PuntSetup,framework.VppTestCaseIPv6 Punt Police/Redirect
- setUp()¶
Clear trace before running each test
- tearDown()¶
Show various debug prints after each test
- test_ip_punt()¶
IP6 punt police and redirect
- test_ip_punt_dump()¶
IP6 punt redirect dump
- class test_ip6.TestIP6PuntHandoff(methodName='runTest')¶
Bases:
test_ip6.IP6PuntSetup,framework.VppTestCaseIPv6 Punt Police/Redirect
- setUp()¶
Clear trace before running each test
- tearDown()¶
Show various debug prints after each test
- test_ip_punt()¶
IP6 punt policer thread handoff
- vpp_worker_count = 2¶
- class test_ip6.TestIP6Replace(methodName='runTest')¶
Bases:
framework.VppTestCaseIPv4 Interface Address Replace
- get_n_pfxs(intf)¶
- setUp()¶
Clear trace before running each test
- classmethod setUpClass()¶
Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api
- tearDown()¶
Show various debug prints after each test
- classmethod tearDownClass()¶
Perform final cleanup after running all tests in this test-case
- test_replace()¶
IP interface address replace
- class test_ip6.TestIPDeag(methodName='runTest')¶
Bases:
framework.VppTestCaseIPv6 Deaggregate Routes
- setUp()¶
Clear trace before running each test
- classmethod setUpClass()¶
Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api
- tearDown()¶
Show various debug prints after each test
- classmethod tearDownClass()¶
Perform final cleanup after running all tests in this test-case
- test_ip_deag()¶
IP Deag Routes
- class test_ip6.TestIPDisabled(methodName='runTest')¶
Bases:
framework.VppTestCaseIPv6 disabled
- setUp()¶
Clear trace before running each test
- classmethod setUpClass()¶
Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api
- tearDown()¶
Show various debug prints after each test
- classmethod tearDownClass()¶
Perform final cleanup after running all tests in this test-case
- test_ip_disabled()¶
IP Disabled
- class test_ip6.TestIPFibSource(methodName='runTest')¶
Bases:
framework.VppTestCaseIPv6 Table FibSource
- setUp()¶
Clear trace before running each test
- classmethod setUpClass()¶
Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api
- tearDown()¶
Show various debug prints after each test
- classmethod tearDownClass()¶
Perform final cleanup after running all tests in this test-case
- test_fib_source()¶
IP Table FibSource
- class test_ip6.TestIPNull(methodName='runTest')¶
Bases:
framework.VppTestCaseIPv6 routes via NULL
- setUp()¶
Clear trace before running each test
- classmethod setUpClass()¶
Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api
- tearDown()¶
Show various debug prints after each test
- classmethod tearDownClass()¶
Perform final cleanup after running all tests in this test-case
- test_ip_null()¶
IP NULL route
- class test_ip6.TestIPReplace(methodName='runTest')¶
Bases:
framework.VppTestCaseIPv6 Table Replace
- setUp()¶
Clear trace before running each test
- classmethod setUpClass()¶
Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api
- tearDown()¶
Show various debug prints after each test
- classmethod tearDownClass()¶
Perform final cleanup after running all tests in this test-case
- test_replace()¶
IP Table Replace
- class test_ip6.TestIPv6(methodName='runTest')¶
Bases:
test_ip6.TestIPv6NDIPv6 Test Case
- create_stream(src_if)¶
Create input packet stream for defined interface.
- Parameters
src_if (VppInterface) – Interface to create packet stream for.
- modify_packet(src_if, packet_size, pkt)¶
Add load, set destination IP and extend packet to required packet size for defined interface.
- Parameters
src_if (VppInterface) – Interface to create packet for.
packet_size (int) – Required packet size.
pkt (Scapy) – Packet to be modified.
- send_and_expect_ra(intf, pkts, remark, dst_ip=None, filter_out_fn=<function is_ipv6_misc>, opt=None, src_ip=None)¶
- setUp()¶
Perform test setup before test case.
- Config:
- create 3 pg interfaces
untagged pg0 interface
Dot1Q subinterface on pg1
Dot1AD subinterface on pg2
- setup interfaces:
put it into UP state
set IPv6 addresses
resolve neighbor address using NDP
configure 200 fib entries
- Variables
interfaces (list) – pg interfaces and subinterfaces.
flows (dict) – IPv4 packet flows in test.
TODO: Create AD sub interface
- classmethod setUpClass()¶
Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api
- tearDown()¶
Run standard test teardown and log
show ip6 neighbors.
- classmethod tearDownClass()¶
Perform final cleanup after running all tests in this test-case
- test_fib()¶
IPv6 FIB test
- Test scenario:
Create IPv6 stream for pg0 interface
Create IPv6 tagged streams for pg1’s and pg2’s subinterface.
Send and verify received packets on each interface.
- test_mld()¶
MLD Report
- test_next_header_anomaly()¶
IPv6 next header anomaly test
- Test scenario:
ipv6 next header field = Fragment Header (44)
next header is ICMPv6 Echo Request
wait for reassembly
- test_ns()¶
IPv6 Neighbour Solicitation Exceptions
- Test scenario:
Send an NS Sourced from an address not covered by the link sub-net
Send an NS to an mcast address the router has not joined
Send NS for a target address the router does not onn.
- test_ns_duplicates()¶
ND Duplicates
- test_rs()¶
IPv6 Router Solicitation Exceptions
Test scenario:
- test_tags = [<TestCaseTag.RUN_SOLO: 1>]¶
- validate_ra(intf, rx, dst_ip=None, src_ip=None, mtu=9000, pi_opt=None)¶
- verify_capture(dst_if, capture)¶
Verify captured input packet stream for defined interface.
- Parameters
dst_if (VppInterface) – Interface to verify captured packet stream for.
capture (list) – Captured packet stream.
- class test_ip6.TestIPv6IfAddrRoute(methodName='runTest')¶
Bases:
framework.VppTestCaseIPv6 Interface Addr Route Test Case
- setUp()¶
Clear trace before running each test
- classmethod setUpClass()¶
Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api
- tearDown()¶
Show various debug prints after each test
- classmethod tearDownClass()¶
Perform final cleanup after running all tests in this test-case
- test_ipv6_ifaddr_del()¶
Delete an interface address that does not exist
- test_ipv6_ifaddrs_same_prefix()¶
IPv6 Interface Addresses Same Prefix test
Test scenario:
Verify no route in FIB for prefix 2001:10::/64
Configure IPv4 address 2001:10::10/64 on an interface
Verify route in FIB for prefix 2001:10::/64
Configure IPv4 address 2001:10::20/64 on an interface
Delete 2001:10::10/64 from interface
Verify route in FIB for prefix 2001:10::/64
Delete 2001:10::20/64 from interface
Verify no route in FIB for prefix 2001:10::/64
- class test_ip6.TestIPv6ND(methodName='runTest')¶
Bases:
framework.VppTestCase- send_and_expect_na(intf, pkts, remark, dst_ip=None, tgt_ip=None, filter_out_fn=<function is_ipv6_misc>)¶
- send_and_expect_ns(tx_intf, rx_intf, pkts, tgt_ip, filter_out_fn=<function is_ipv6_misc>)¶
- send_and_expect_ra(intf, pkts, remark, dst_ip=None, filter_out_fn=<function is_ipv6_misc>)¶
- validate_na(intf, rx, dst_ip=None, tgt_ip=None)¶
- validate_ns(intf, rx, tgt_ip)¶
- validate_ra(intf, rx, dst_ip=None)¶
- verify_ip(rx, smac, dmac, sip, dip)¶
- class test_ip6.TestIPv6PathMTU(methodName='runTest')¶
Bases:
framework.VppTestCaseIPv6 Path MTU
- setUp()¶
Clear trace before running each test
- tearDown()¶
Show various debug prints after each test
- test_path_mtu_local()¶
Path MTU for attached neighbour
- test_path_mtu_remote()¶
Path MTU for remote neighbour
- class test_ip6.TestIPv6RD(methodName='runTest')¶
Bases:
test_ip6.TestIPv6NDIPv6 Router Discovery Test Case
- setUp()¶
Clear trace before running each test
- classmethod setUpClass()¶
Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api
- tearDown()¶
Show various debug prints after each test
- classmethod tearDownClass()¶
Perform final cleanup after running all tests in this test-case
- test_rd_receive_router_advertisement()¶
Verify events triggered by received RA packets
- test_rd_send_router_solicitation()¶
Verify router solicitation packets
- verify_prefix_info(reported_prefix, prefix_option)¶
- class test_ip6.TestIPv6RDControlPlane(methodName='runTest')¶
Bases:
test_ip6.TestIPv6NDIPv6 Router Discovery Control Plane Test Case
- static create_ra_packet(pg, routerlifetime=None)¶
- static get_default_routes(fib)¶
- static get_interface_addresses(fib, pg)¶
- setUp()¶
Clear trace before running each test
- classmethod setUpClass()¶
Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api
- tearDown()¶
Show various debug prints after each test
- classmethod tearDownClass()¶
Perform final cleanup after running all tests in this test-case
- test_all()¶
Test handling of SLAAC addresses and default routes
- wait_for_no_default_route(n_tries=50, s_time=1)¶
- class test_ip6.TestIPv6RouteLookup(methodName='runTest')¶
Bases:
framework.VppTestCaseIPv6 Route Lookup Test Case
- route_lookup(prefix, exact)¶
- routes = []¶
- setUp()¶
Clear trace before running each test
- classmethod setUpClass()¶
Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api
- tearDown()¶
Show various debug prints after each test
- classmethod tearDownClass()¶
Perform final cleanup after running all tests in this test-case
- test_exact_match()¶
- test_longest_prefix_match()¶
- class test_ip6.TestIPxAF(methodName='runTest')¶
Bases:
framework.VppTestCaseIP cross AF
- setUp()¶
Clear trace before running each test
- classmethod setUpClass()¶
Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api
- tearDown()¶
Show various debug prints after each test
- classmethod tearDownClass()¶
Perform final cleanup after running all tests in this test-case
- test_x_af()¶
Cross AF routing