2.40. test_det44 module

class test_det44.TestDET44(methodName='runTest')

Bases: framework.VppTestCase

Deterministic NAT Test Cases

create_stream_in(in_if, out_if, ttl=64)

Create packet stream for inside network

Parameters
  • in_if – Inside interface

  • out_if – Outside interface

  • ttl – TTL of generated packets

create_stream_out(out_if, dst_ip=None, ttl=64)

Create packet stream for outside network

Parameters
  • out_if – Outside interface

  • dst_ip – Destination IP address (Default use global NAT address)

  • ttl – TTL of generated packets

initiate_tcp_session(in_if, out_if)

Initiates TCP session 3 WAY HAND SHAKE

Parameters
  • in_if – Inside interface

  • out_if – Outside interface

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

show_commands_at_teardown()

Allow subclass specific teardown logging additions.

tearDown()

Show various debug prints after each test

classmethod tearDownClass()

Perform final cleanup after running all tests in this test-case

test_deterministic_mode()

NAT plugin run deterministic mode

test_in()

DET44 translation test (TCP, UDP, ICMP)

test_multiple_users()

Deterministic NAT multiple users

test_session_limit_per_user()

Deterministic NAT maximum sessions per user limit

test_session_timeout()

Deterministic NAT session timeouts

test_set_timeouts()

Set deterministic NAT timeouts

test_tcp_session_close_detection_in()

DET44 TCP session close from inside network

test_tcp_session_close_detection_out()

Deterministic NAT TCP session close from outside network

verify_capture_in(capture, in_if)

Verify captured packets on inside network

Parameters
  • capture – Captured packets

  • in_if – Inside interface

verify_capture_out(capture, nat_ip=None)

Verify captured packets on outside network

Parameters
  • capture – Captured packets

  • nat_ip – Translated IP address (Default use global NAT address)

  • same_port – Source port number is not translated (Default False)

verify_ipfix_max_entries_per_user(data, limit, src_addr)

Verify IPFIX maximum entries per user exceeded event

Parameters
  • data – Decoded IPFIX data records

  • limit – Number of maximum entries per user

  • src_addr – IPv4 source address