test_ip6 module

class test_ip6.TestIPv6(methodName='runTest')

Bases: framework.VppTestCase

IPv6 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, packet_sizes)

Create input packet stream for defined interface.

Parameters:
  • src_if (VppInterface) – Interface to create packet stream for.
  • packet_sizes (list) – Required packet sizes.
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.
  • pg_if_packet_sizes (list) – packet sizes in test.

TODO: Create AD sub interface

classmethod setUpClass()
tearDown()

Run standard test teardown and log show ip6 neighbors.

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.
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.