2.66. test_ipsec_tun_if_esp module

class test_ipsec_tun_if_esp.TemplateIpsec4TunIfEsp(methodName='runTest')

Bases: template_ipsec.TemplateIpsec

IPsec tunnel interface tests

encryption_type
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

tearDown()

Show various debug prints after each test

classmethod tearDownClass()

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

class test_ipsec_tun_if_esp.TemplateIpsec4TunIfEspUdp(methodName='runTest')

Bases: template_ipsec.TemplateIpsec

IPsec UDP tunnel interface tests

config_network()
encryption_type
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

tearDown()

Show various debug prints after each test

classmethod tearDownClass()

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

tun4_decrypt_node_name = 'esp4-decrypt-tun'
tun4_encrypt_node_name = 'esp4-encrypt-tun'
verify_encrypted(p, sa, rxs)
class test_ipsec_tun_if_esp.TemplateIpsec4TunProtect

Bases: object

IPsec IPv4 Tunnel protect

config_network(p)
config_protect(p)
config_sa_tra(p)
config_sa_tun(p)
encryption_type
tun4_decrypt_node_name = 'esp4-decrypt-tun'
tun4_encrypt_node_name = 'esp4-encrypt-tun'
tun4_input_node = 'ipsec4-tun-input'
unconfig_network(p)
unconfig_protect(p)
unconfig_sa(p)
class test_ipsec_tun_if_esp.TemplateIpsec6TunIfEsp(methodName='runTest')

Bases: template_ipsec.TemplateIpsec

IPsec tunnel interface tests

encryption_type
setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

class test_ipsec_tun_if_esp.TemplateIpsec6TunProtect

Bases: object

IPsec IPv6 Tunnel protect

config_network(p)
config_protect(p)
config_sa_tra(p)
config_sa_tun(p)
unconfig_network(p)
unconfig_protect(p)
unconfig_sa(p)
class test_ipsec_tun_if_esp.TemplateIpsecItf4

Bases: object

IPsec Interface IPv4

config_network(p, instance=4294967295)
config_protect(p)
config_sa_tun(p, src, dst)
encryption_type
tun4_decrypt_node_name = 'esp4-decrypt-tun'
tun4_encrypt_node_name = 'esp4-encrypt-tun'
tun4_input_node = 'ipsec4-tun-input'
unconfig_network(p)
unconfig_protect(p)
unconfig_sa(p)
class test_ipsec_tun_if_esp.TemplateIpsecItf6

Bases: object

IPsec Interface IPv6

config_network(p)
config_protect(p)
config_sa_tun(p, src, dst)
encryption_type
tun6_decrypt_node_name = 'esp6-decrypt-tun'
tun6_encrypt_node_name = 'esp6-encrypt-tun'
tun6_input_node = 'ipsec6-tun-input'
unconfig_network(p)
unconfig_protect(p)
unconfig_sa(p)
class test_ipsec_tun_if_esp.TestIpsec4MultiTunIfEsp(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, template_ipsec.IpsecTun4

IPsec IPv4 Multi Tunnel interface

encryption_type
setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

test_tun_44()

Multiple IPSEC tunnel interfaces

test_tun_rr_44()

Round-robin packets acrros multiple interface

tun4_decrypt_node_name = 'esp4-decrypt-tun'
tun4_encrypt_node_name = 'esp4-encrypt-tun'
class test_ipsec_tun_if_esp.TestIpsec4TunIfEsp1(methodName='runTest')

Bases: test_ipsec_tun_if_esp.TemplateIpsec4TunIfEsp, template_ipsec.IpsecTun4Tests

Ipsec ESP - TUN tests

test_tun_basic64()

ipsec 6o4 tunnel basic test

test_tun_basic_frag44()

ipsec 4o4 tunnel frag basic test

test_tun_burst64()

ipsec 6o4 tunnel basic test

tun4_decrypt_node_name = 'esp4-decrypt-tun'
tun4_encrypt_node_name = 'esp4-encrypt-tun'
class test_ipsec_tun_if_esp.TestIpsec4TunIfEsp2(methodName='runTest')

Bases: test_ipsec_tun_if_esp.TemplateIpsec4TunIfEsp, template_ipsec.IpsecTcpTests

Ipsec ESP - TCP tests

class test_ipsec_tun_if_esp.TestIpsec4TunIfEspAll(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, template_ipsec.IpsecTun4

IPsec IPv4 Tunnel interface all Algos

config_network(p)
encryption_type
rekey(p)
setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

test_tun_44()

IPSEC tunnel all algos

tun4_decrypt_node_name = 'esp4-decrypt-tun'
tun4_encrypt_node_name = 'esp4-encrypt-tun'
unconfig_network(p)
class test_ipsec_tun_if_esp.TestIpsec4TunIfEspHandoff(methodName='runTest')

Bases: test_ipsec_tun_if_esp.TemplateIpsec4TunIfEsp, template_ipsec.IpsecTun4HandoffTests

Ipsec ESP 4 Handoff tests

tun4_decrypt_node_name = 'esp4-decrypt-tun'
tun4_encrypt_node_name = 'esp4-encrypt-tun'
class test_ipsec_tun_if_esp.TestIpsec4TunIfEspNoAlgo(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, template_ipsec.IpsecTun4

IPsec IPv4 Tunnel interface no Algos

config_network(p)
encryption_type
setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

test_tun_44()

IPSec SA with NULL algos

tun4_decrypt_node_name = 'esp4-decrypt-tun'
tun4_encrypt_node_name = 'esp4-encrypt-tun'
unconfig_network(p)
class test_ipsec_tun_if_esp.TestIpsec4TunIfEspUdp(methodName='runTest')

Bases: test_ipsec_tun_if_esp.TemplateIpsec4TunIfEspUdp, template_ipsec.IpsecTun4Tests

Ipsec ESP UDP tests

setUp()

Clear trace before running each test

test_keepalive()

IPSEC NAT Keepalive

tun4_input_node = 'ipsec4-tun-input'
class test_ipsec_tun_if_esp.TestIpsec4TunIfEspUdpGCM(methodName='runTest')

Bases: test_ipsec_tun_if_esp.TemplateIpsec4TunIfEspUdp, template_ipsec.IpsecTun4Tests

Ipsec ESP UDP GCM tests

setUp()

Clear trace before running each test

tun4_input_node = 'ipsec4-tun-input'
class test_ipsec_tun_if_esp.TestIpsec4TunProtect(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, test_ipsec_tun_if_esp.TemplateIpsec4TunProtect, template_ipsec.IpsecTun4

IPsec IPv4 Tunnel protect - transport mode

setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

test_tun_44()

IPSEC tunnel protect

class test_ipsec_tun_if_esp.TestIpsec4TunProtectTun(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, test_ipsec_tun_if_esp.TemplateIpsec4TunProtect, template_ipsec.IpsecTun4

IPsec IPv4 Tunnel protect - tunnel mode

encryption_type
gen_encrypt_pkts(p, sa, sw_intf, src, dst, count=1, payload_size=100)
gen_pkts(sw_intf, src, dst, count=1, payload_size=100)
setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

test_tun_44()

IPSEC tunnel protect

tun4_decrypt_node_name = 'esp4-decrypt-tun'
tun4_encrypt_node_name = 'esp4-encrypt-tun'
verify_decrypted(p, rxs)
verify_encrypted(p, sa, rxs)
class test_ipsec_tun_if_esp.TestIpsec4TunProtectTunDrop(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, test_ipsec_tun_if_esp.TemplateIpsec4TunProtect, template_ipsec.IpsecTun4

IPsec IPv4 Tunnel protect - tunnel mode - drop

encryption_type
gen_encrypt_pkts(p, sa, sw_intf, src, dst, count=1, payload_size=100)
setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

test_tun_drop_44()

IPSEC tunnel protect bogus tunnel header

tun4_decrypt_node_name = 'esp4-decrypt-tun'
tun4_encrypt_node_name = 'esp4-encrypt-tun'
class test_ipsec_tun_if_esp.TestIpsec4TunProtectUdp(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, test_ipsec_tun_if_esp.TemplateIpsec4TunProtect, template_ipsec.IpsecTun4

IPsec IPv4 Tunnel protect - transport mode

setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

test_keepalive()

IPSEC NAT Keepalive

test_tun_44()

IPSEC UDP tunnel protect

verify_encrypted(p, sa, rxs)
class test_ipsec_tun_if_esp.TestIpsec6MultiTunIfEsp(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, template_ipsec.IpsecTun6

IPsec IPv6 Multi Tunnel interface

encryption_type
setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

test_tun_66()

Multiple IPSEC tunnel interfaces

tun6_decrypt_node_name = 'esp6-decrypt-tun'
tun6_encrypt_node_name = 'esp6-encrypt-tun'
class test_ipsec_tun_if_esp.TestIpsec6TunIfEsp1(methodName='runTest')

Bases: test_ipsec_tun_if_esp.TemplateIpsec6TunIfEsp, template_ipsec.IpsecTun6Tests

Ipsec ESP - TUN tests

test_tun_basic46()

ipsec 4o6 tunnel basic test

test_tun_burst46()

ipsec 4o6 tunnel burst test

tun6_decrypt_node_name = 'esp6-decrypt-tun'
tun6_encrypt_node_name = 'esp6-encrypt-tun'
class test_ipsec_tun_if_esp.TestIpsec6TunIfEspHandoff(methodName='runTest')

Bases: test_ipsec_tun_if_esp.TemplateIpsec6TunIfEsp, template_ipsec.IpsecTun6HandoffTests

Ipsec ESP 6 Handoff tests

tun6_decrypt_node_name = 'esp6-decrypt-tun'
tun6_encrypt_node_name = 'esp6-encrypt-tun'
class test_ipsec_tun_if_esp.TestIpsec6TunProtect(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, test_ipsec_tun_if_esp.TemplateIpsec6TunProtect, template_ipsec.IpsecTun6

IPsec IPv6 Tunnel protect - transport mode

encryption_type
setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

test_tun_46()

IPSEC tunnel protect 4o6

test_tun_66()

IPSEC tunnel protect 6o6

tun6_decrypt_node_name = 'esp6-decrypt-tun'
tun6_encrypt_node_name = 'esp6-encrypt-tun'
class test_ipsec_tun_if_esp.TestIpsec6TunProtectTun(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, test_ipsec_tun_if_esp.TemplateIpsec6TunProtect, template_ipsec.IpsecTun6

IPsec IPv6 Tunnel protect - tunnel mode

encryption_type
gen_encrypt_pkts6(p, sa, sw_intf, src, dst, count=1, payload_size=100)
gen_pkts6(sw_intf, src, dst, count=1, payload_size=100)
setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

test_tun_66()

IPSEC tunnel protect

tun6_decrypt_node_name = 'esp6-decrypt-tun'
tun6_encrypt_node_name = 'esp6-encrypt-tun'
verify_decrypted6(p, rxs)
verify_encrypted6(p, sa, rxs)
class test_ipsec_tun_if_esp.TestIpsec6TunProtectTunDrop(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, test_ipsec_tun_if_esp.TemplateIpsec6TunProtect, template_ipsec.IpsecTun6

IPsec IPv6 Tunnel protect - tunnel mode - drop

encryption_type
gen_encrypt_pkts6(p, sa, sw_intf, src, dst, count=1, payload_size=100)
setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

test_tun_drop_66()

IPSEC 6 tunnel protect bogus tunnel header

tun6_decrypt_node_name = 'esp6-decrypt-tun'
tun6_encrypt_node_name = 'esp6-encrypt-tun'
class test_ipsec_tun_if_esp.TestIpsecGre6IfEspTra(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, template_ipsec.IpsecTun6Tests

Ipsec GRE ESP - TRA tests

encryption_type
gen_encrypt_pkts6(p, sa, sw_intf, src, dst, count=1, payload_size=100)
gen_pkts6(sw_intf, src, dst, count=1, payload_size=100)
setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

tun6_decrypt_node_name = 'esp6-decrypt-tun'
tun6_encrypt_node_name = 'esp6-encrypt-tun'
verify_decrypted6(p, rxs)
verify_encrypted6(p, sa, rxs)
class test_ipsec_tun_if_esp.TestIpsecGreIfEsp(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, template_ipsec.IpsecTun4Tests

Ipsec GRE ESP - TUN tests

encryption_type
gen_encrypt_pkts(p, sa, sw_intf, src, dst, count=1, payload_size=100)
gen_pkts(sw_intf, src, dst, count=1, payload_size=100)
setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

tun4_decrypt_node_name = 'esp4-decrypt-tun'
tun4_encrypt_node_name = 'esp4-encrypt-tun'
verify_decrypted(p, rxs)
verify_encrypted(p, sa, rxs)
class test_ipsec_tun_if_esp.TestIpsecGreIfEspTra(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, template_ipsec.IpsecTun4Tests

Ipsec GRE ESP - TRA tests

encryption_type
gen_encrypt_non_ip_pkts(sa, sw_intf, src, dst, count=1, payload_size=100)
gen_encrypt_pkts(p, sa, sw_intf, src, dst, count=1, payload_size=100)
gen_pkts(sw_intf, src, dst, count=1, payload_size=100)
setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

test_gre_non_ip()
tun4_decrypt_node_name = 'esp4-decrypt-tun'
tun4_encrypt_node_name = 'esp4-encrypt-tun'
verify_decrypted(p, rxs)
verify_encrypted(p, sa, rxs)
class test_ipsec_tun_if_esp.TestIpsecGreTebIfEsp(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, template_ipsec.IpsecTun4Tests

Ipsec GRE TEB ESP - TUN tests

encryption_type
gen_encrypt_pkts(p, sa, sw_intf, src, dst, count=1, payload_size=100)
gen_pkts(sw_intf, src, dst, count=1, payload_size=100)
omac = '00:11:22:33:44:55'
setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

tun4_decrypt_node_name = 'esp4-decrypt-tun'
tun4_encrypt_node_name = 'esp4-encrypt-tun'
verify_decrypted(p, rxs)
verify_encrypted(p, sa, rxs)
class test_ipsec_tun_if_esp.TestIpsecGreTebIfEspTra(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, template_ipsec.IpsecTun4Tests

Ipsec GRE TEB ESP - Tra tests

encryption_type
gen_encrypt_pkts(p, sa, sw_intf, src, dst, count=1, payload_size=100)
gen_pkts(sw_intf, src, dst, count=1, payload_size=100)
omac = '00:11:22:33:44:55'
setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

tun4_decrypt_node_name = 'esp4-decrypt-tun'
tun4_encrypt_node_name = 'esp4-encrypt-tun'
verify_decrypted(p, rxs)
verify_encrypted(p, sa, rxs)
class test_ipsec_tun_if_esp.TestIpsecGreTebUdpIfEspTra(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, template_ipsec.IpsecTun4Tests

Ipsec GRE TEB UDP ESP - Tra tests

encryption_type
gen_encrypt_pkts(p, sa, sw_intf, src, dst, count=1, payload_size=100)
gen_pkts(sw_intf, src, dst, count=1, payload_size=100)
omac = '00:11:22:33:44:55'
setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

tun4_decrypt_node_name = 'esp4-decrypt-tun'
tun4_encrypt_node_name = 'esp4-encrypt-tun'
verify_decrypted(p, rxs)
verify_encrypted(p, sa, rxs)
class test_ipsec_tun_if_esp.TestIpsecGreTebVlanIfEsp(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, template_ipsec.IpsecTun4Tests

Ipsec GRE TEB ESP - TUN tests

encryption_type
gen_encrypt_pkts(p, sa, sw_intf, src, dst, count=1, payload_size=100)
gen_pkts(sw_intf, src, dst, count=1, payload_size=100)
omac = '00:11:22:33:44:55'
setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

tun4_decrypt_node_name = 'esp4-decrypt-tun'
tun4_encrypt_node_name = 'esp4-encrypt-tun'
verify_decrypted(p, rxs)
verify_encrypted(p, sa, rxs)
class test_ipsec_tun_if_esp.TestIpsecItf4(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, test_ipsec_tun_if_esp.TemplateIpsecItf4, template_ipsec.IpsecTun4

IPsec Interface IPv4

setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

test_tun_44()

IPSEC interface IPv4

test_tun_44_null()

IPSEC interface IPv4 NULL auth/crypto

test_tun_instance_44()
class test_ipsec_tun_if_esp.TestIpsecItf6(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, test_ipsec_tun_if_esp.TemplateIpsecItf6, template_ipsec.IpsecTun6

IPsec Interface IPv6

setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

test_tun_44()

IPSEC interface IPv6

class test_ipsec_tun_if_esp.TestIpsecMGreIfEspTra4(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, template_ipsec.IpsecTun4

Ipsec mGRE ESP v4 TRA tests

encryption_type
gen_encrypt_pkts(p, sa, sw_intf, src, dst, count=1, payload_size=100)
gen_pkts(sw_intf, src, dst, count=1, payload_size=100)
setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

test_tun_44()

mGRE IPSEC 44

tun4_decrypt_node_name = 'esp4-decrypt-tun'
tun4_encrypt_node_name = 'esp4-encrypt-tun'
verify_decrypted(p, rxs)
verify_encrypted(p, sa, rxs)
class test_ipsec_tun_if_esp.TestIpsecMGreIfEspTra6(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, template_ipsec.IpsecTun6

Ipsec mGRE ESP v6 TRA tests

encryption_type
gen_encrypt_pkts6(p, sa, sw_intf, src, dst, count=1, payload_size=100)
gen_pkts6(sw_intf, src, dst, count=1, payload_size=100)
setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

test_tun_66()

mGRE IPSec 66

tun6_decrypt_node_name = 'esp6-decrypt-tun'
tun6_encrypt_node_name = 'esp6-encrypt-tun'
verify_decrypted6(p, rxs)
verify_encrypted6(p, sa, rxs)
class test_ipsec_tun_if_esp.TestIpsecMIfEsp4(methodName='runTest')

Bases: template_ipsec.TemplateIpsec, template_ipsec.IpsecTun4

Ipsec P2MP ESP v4 tests

encryption_type
gen_encrypt_pkts(p, sa, sw_intf, src, dst, count=1, payload_size=100)
gen_pkts(sw_intf, src, dst, count=1, payload_size=100)
setUp()

Clear trace before running each test

tearDown()

Show various debug prints after each test

test_tun_44()

P2MP IPSEC 44

tun4_decrypt_node_name = 'esp4-decrypt-tun'
tun4_encrypt_node_name = 'esp4-encrypt-tun'
verify_decrypted(p, rxs)
verify_encrypted(p, sa, rxs)
test_ipsec_tun_if_esp.config_tra_params(p, encryption_type, tun_if)
test_ipsec_tun_if_esp.config_tun_params(p, encryption_type, tun_if, src=None, dst=None)