aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2019-11-13 14:37:51 +0000
committerPeter Mikus <pmikus@cisco.com>2019-11-14 14:36:09 +0000
commitf23b0e351a7a55576031c78b3ec618f6284e7712 (patch)
tree97bded60522da28ce7952014e9dad5e767cc5817
parentf7fe40f296c0ed9d600dc219a24f5f4c4e98a7b4 (diff)
FIX: Ipsec perf
Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: I6e3ce086978c383303724d989702b1c1273c50c0
-rw-r--r--resources/libraries/python/IPsecUtil.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/resources/libraries/python/IPsecUtil.py b/resources/libraries/python/IPsecUtil.py
index c109f417e5..4578b43987 100644
--- a/resources/libraries/python/IPsecUtil.py
+++ b/resources/libraries/python/IPsecUtil.py
@@ -821,10 +821,14 @@ class IPsecUtil(object):
'exec create loopback interface\n'
'exec set interface state loop0 up\n'
'exec set interface ip address {uifc} {iaddr}/{mask}\n'
+ 'exec set ip arp {uifc} {raddr}/32 {rmac} static\n'
.format(
iaddr=if2_ip - 1,
+ raddr=if2_ip,
uifc=Topology.get_interface_name(
nodes['DUT1'], if1_key),
+ rmac=Topology.get_interface_mac(
+ nodes['DUT2'], if2_key),
mask=96 if if2_ip.version == 6 else 24))
tmp_f2.write(
'exec set interface ip address {uifc} {iaddr}/{mask}\n'
@@ -968,6 +972,21 @@ class IPsecUtil(object):
err_msg = 'Failed to set IP address on interface {ifc} on host ' \
'{host}'.format(ifc=if1_key, host=nodes['DUT1']['host'])
papi_exec.add(cmd1, **args1).get_reply(err_msg)
+ cmd4 = 'ip_neighbor_add_del'
+ args4 = dict(
+ is_add=1,
+ neighbor=dict(
+ sw_if_index=Topology.get_interface_sw_index(
+ nodes['DUT1'], if1_key),
+ flags=1,
+ mac_address=str(
+ Topology.get_interface_mac(nodes['DUT2'], if2_key)),
+ ip_address=str(ip_address(unicode(if2_ip_addr)))
+ )
+ )
+ err_msg = 'Failed to add IP neighbor on interface {ifc}'.format(
+ ifc=if1_key)
+ papi_exec.add(cmd4, **args4).get_reply(err_msg)
# Configure IPsec tunnel interfaces
args1 = dict(
sw_if_index=loop_sw_if_idx,