2.34. test_dhcp module

class test_dhcp.TestDHCP(methodName='runTest')

Bases: framework.VppTestCase

DHCP Test Case


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 various debug prints after each test

classmethod tearDownClass()

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


DHCPv6 Proxy


DHCP Client


DHCP Client w/ VLAN


DHCPv4 Proxy

validate_relay_options(pkt, intf, ip_addr, vpn_id, fib_id, oui)
verify_dhcp6_advert(pkt, intf, peer)
verify_dhcp6_solicit(pkt, intf, peer_ip, peer_mac, vpn_id='', fib_id=0, oui=0, dst_mac=None, dst_ip=None)
verify_dhcp_has_option(pkt, option, value)
verify_dhcp_msg_type(pkt, name)
verify_dhcp_offer(pkt, intf, vpn_id='', fib_id=0, oui=0)
verify_orig_dhcp_discover(pkt, intf, hostname, client_id=None, broadcast=True, dscp=0)
verify_orig_dhcp_pkt(pkt, intf, dscp, l2_bc=True)
verify_orig_dhcp_request(pkt, intf, hostname, ip, broadcast=True, l2_bc=True, dscp=0)
verify_relayed_dhcp_discover(pkt, intf, src_intf=None, fib_id=0, oui=0, vpn_id='', dst_mac=None, dst_ip=None)
wait_for_no_route(address, length, n_tries=50, s_time=1)