2.45. test_ip6 module¶
-
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_ip_input_icmp_reply()¶ IP6 Input Exception - Return ICMP (3,0)
-
test_ip_input_no_replies(name, src, dst, l4, msg, timeout)¶
-
-
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:
framework.VppTestCaseIPv6 Punt Police/Redirect
-
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_punt()¶ IP6 punt police and redirect
-
test_ip_punt_dump()¶ IP6 punt redirect dump
-
-
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.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.TestIPv6(methodName='runTest')¶ Bases:
test_ip6.TestIPv6NDIPv6 Test Case
-
config_fib_entries(count)¶ For each interface add to the FIB table count routes to “fd02::1/128” destination with interface’s local address as next-hop address.
- Parameters
count (int) – Number of FIB entries.
TODO: check if the next-hop address shouldn’t be remote address instead of local address.
-
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)¶
-
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_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:
-
validate_ra(intf, rx, dst_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.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.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
-
static