2.50. test_ip4_irb module¶
IRB Test Case HLD:
- config
L2 MAC learning enabled in l2bd
2 routed interfaces untagged, bvi (Bridge Virtual Interface)
2 bridged interfaces in l2bd with bvi
- test
- sending ip4 eth pkts between routed interfaces
2 routed interfaces
2 bridged interfaces
64B, 512B, 1518B, 9200B (ether_size)
- burst of pkts per interface
257pkts per burst
routed pkts hitting different FIB entries
bridged pkts hitting different MAC entries
- verify
all packets received correctly
-
class
test_ip4_irb.
TestIpIrb
(methodName='runTest')¶ Bases:
framework.VppTestCase
IRB Test Case
-
create_stream
(src_ip_if, dst_ip_if, packet_sizes)¶
-
create_stream_l2_to_ip
(src_l2_if, src_ip_if, dst_ip_if, packet_sizes)¶
-
send_and_verify_l2_to_ip
()¶
-
classmethod
setUpClass
()¶ Create BD with MAC learning enabled and put interfaces to this BD.
Configure IPv4 addresses on BVI interface and routed interface.
Configure MAC address binding to IPv4 neighbors on bvi0.
Configure MAC address on pg2.
BVI interface has remote hosts, one half of hosts are behind pg0 second behind pg1.
-
show_commands_at_teardown
()¶ Allow subclass specific teardown logging additions.
-
tearDown
()¶ Run standard test teardown and log
show l2patch
,show l2fib verbose
,``show bridge-domain <bd_id> detail``,show ip neighbors
.
-
classmethod
tearDownClass
()¶ Perform final cleanup after running all tests in this test-case
-
test_ip4_irb_1
()¶ IPv4 IRB test 1
- Test scenario:
ip traffic from pg2 interface must ends in both pg0 and pg1
arp entry present in bvi0 interface for destination IP
no l2 entry configured, pg0 and pg1 are same
-
test_ip4_irb_2
()¶ IPv4 IRB test 2
- Test scenario:
ip traffic from pg0 and pg1 ends on pg2
-
verify_capture
(dst_ip_if, src_ip_if, capture)¶
-
verify_capture_l2_to_ip
(dst_ip_if, src_ip_if, capture)¶
-