2.36. test_ipsec_esp module

class test_ipsec_esp.TestIpsecEsp(methodName='runTest')

Bases: framework.VppTestCase

Basic test for ipsec esp sanity - tunnel and transport modes.

Below 4 cases are covered as part of this test 1) ipsec esp v4 transport basic test - IPv4 Transport mode

scenario using HMAC-SHA1-96 intergrity algo
  1. ipsec esp v4 transport burst test
    Above test for 257 pkts
  2. ipsec esp 4o4 tunnel basic test - IPv4 Tunnel mode
    scenario using HMAC-SHA1-96 intergrity algo
  3. ipsec esp 4o4 tunnel burst test
    Above test for 257 pkts

TRANSPORT MODE:

— encrypt —
|pg2| <——-> |VPP|
— decrypt —

TUNNEL MODE:

— encrypt — plain —
|pg0| ——-> |VPP| ——> |pg1|

— — —

— decrypt — plain —

|pg0| <——- |VPP| <—— |pg1|
— — —

Note : IPv6 is not covered

classmethod configEspTra()
classmethod configEspTun()
configScapySA(is_tun=False)
gen_encrypt_pkts(sa, sw_intf, src, dst, count=1)
gen_pkts(sw_intf, src, dst, count=1)
remote_pg0_lb_addr = '1.1.1.1'
remote_pg1_lb_addr = '2.2.2.2'
send_and_expect(input, pkts, output, count=1)
classmethod setUpClass()
tearDown()
test_ipsec_esp_tra_basic(count=1)

ipsec esp v4 transport basic test

test_ipsec_esp_tra_burst()

ipsec esp v4 transport burst test

test_ipsec_esp_tun_basic(count=1)

ipsec esp 4o4 tunnel basic test

test_ipsec_esp_tun_burst()

ipsec esp 4o4 tunnel burst test