2.41. test_l2bd_arp_term module

L2BD ARP term Test

class test_l2bd_arp_term.TestL2bdArpTerm(methodName='runTest')

Bases: framework.VppTestCase

L2BD arp termination Test Case

add_del_arp_term_hosts(entries, bd_id=1, is_add=1, is_ipv6=0)
arp_event_host(e)
arp_event_hosts(evs)
classmethod arp_req(src_host, host)
classmethod arp_reqs(src_host, entries)
arp_resp_host(src_host, arp_resp)
arp_resp_hosts(src_host, pkts)
bd_add_del(bd_id=1, is_add=1)
classmethod bd_swifs(b)
classmethod garp_req(host)
classmethod garp_reqs(entries)
inttoip4(ip)
classmethod ip4_host(subnet, host, mac)
classmethod ip4_hosts(subnet, start, mac_list)
classmethod ip6_host(subnet, host, mac)
classmethod ip6_hosts(subnet, start, mac_list)
classmethod mac_list(b6_range)
na_resp_host(src_host, rx)
na_resp_hosts(src_host, pkts)
nd_event_host(e)
nd_event_hosts(evs)
classmethod ns_req(src_host, host)
classmethod ns_reqs_dst(entries, dst_host)
classmethod ns_reqs_src(src_host, entries)
setUp()

Clear trace and packet infos before running each test.

classmethod setUpClass()

Perform standard class setup (defined by class method setUpClass in class VppTestCase) before running the test case, set test case related variables and configure VPP.

set_bd_flags(bd_id, **args)

Enable/disable defined feature(s) of the bridge domain.

Parameters:
  • bd_id (int) – Bridge domain ID.
  • args (list) – List of feature/status pairs. Allowed features: learn, forward, flood, uu_flood and arp_term. Status False means disable, status True means enable the feature.
Raise:

ValueError in case of unknown feature in the input.

tearDown()

Show various debug prints after each test.

test_l2bd_arp_term_01()

L2BD arp term - add 5 hosts, verify arp responses

test_l2bd_arp_term_02()

L2BD arp term - delete 3 hosts, verify arp responses

test_l2bd_arp_term_03()

L2BD arp term - recreate BD1, readd 3 hosts, verify arp responses

test_l2bd_arp_term_04()

L2BD arp term - 2 IP4 addrs per host

test_l2bd_arp_term_05()

L2BD arp term - create and update 10 IP4-mac pairs

test_l2bd_arp_term_06()

L2BD arp/ND term - hosts with both ip4/ip6

test_l2bd_arp_term_07()

L2BD ND term - Add and Del hosts, verify ND replies

test_l2bd_arp_term_08()

L2BD ND term - Add and update IP+mac, verify ND replies

test_l2bd_arp_term_09()

L2BD arp term - send garps, verify arp event reports

test_l2bd_arp_term_10()

L2BD arp term - send duplicate garps, verify suppression

test_l2bd_arp_term_11()

L2BD arp term - disable ip4 arp events,send garps, verify no events

test_l2bd_arp_term_12()

L2BD ND term - send NS packets verify reports

test_l2bd_arp_term_13()

L2BD ND term - send duplicate ns, verify suppression

test_l2bd_arp_term_14()

L2BD ND term - disable ip4 arp events,send ns, verify no events

verify_arp(src_host, req_hosts, resp_hosts, bd_id=1)
verify_nd(src_host, req_hosts, resp_hosts, bd_id=1)