aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuraj Linkeš <juraj.linkes@pantheon.tech>2020-10-16 12:57:08 +0200
committerPeter Mikus <pmikus@cisco.com>2020-10-19 09:20:08 +0000
commit94e9a913b562f9f0ebe3ed75ce519b51ee75bde7 (patch)
tree83a879791999827d7d2db0ee3d0ac2151e2a384b
parent1c14952a05b77e96eff4bba9d63f17947440294a (diff)
FIX: disable sending IPv6 RA messages from VMs
There were occasional Router Advertisement packets received in a Traffic Generator in VM testcases. Fix by adding config that disables sending IPv6 RA messages on interfaces in VM VPP config before enabling them. Also rename related keywords and change descriptions based on https://docs.fd.io/vpp/21.01/db/d4c/clicmd_src_vnet_ip6-nd.html#clicmd_ip6_nd Change-Id: I1c2a33337ac91f6039d287b4c2aac388e3a52383 Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
-rw-r--r--resources/libraries/python/IPv6Util.py19
-rw-r--r--resources/libraries/robot/crypto/ipsec.robot2
-rw-r--r--resources/libraries/robot/ip/ip6.robot8
-rw-r--r--resources/libraries/robot/overlay/lisp.robot6
-rw-r--r--resources/libraries/robot/overlay/srv6.robot4
-rw-r--r--resources/templates/vm/vppip6_2vhostvr1024.exec2
-rw-r--r--resources/templates/vm/vppip6_2virtiovr1024.exec3
-rw-r--r--tests/vpp/device/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip6base-dev.robot2
-rw-r--r--tests/vpp/device/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip4base-dev.robot2
9 files changed, 27 insertions, 21 deletions
diff --git a/resources/libraries/python/IPv6Util.py b/resources/libraries/python/IPv6Util.py
index 683f892f62..883304487d 100644
--- a/resources/libraries/python/IPv6Util.py
+++ b/resources/libraries/python/IPv6Util.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2019 Cisco and/or its affiliates.
+# Copyright (c) 2020 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -23,8 +23,9 @@ class IPv6Util:
"""IPv6 utilities"""
@staticmethod
- def vpp_ra_suppress_link_layer(node, interface):
- """Suppress ICMPv6 router advertisement message for link scope address.
+ def vpp_interface_ra_suppress(node, interface):
+ """Disable sending ICMPv6 router-advertisement messages on
+ an interface on a VPP node.
:param node: VPP node.
:param interface: Interface name.
@@ -36,8 +37,8 @@ class IPv6Util:
sw_if_index=InterfaceUtil.get_interface_index(node, interface),
suppress=1
)
- err_msg = f"Failed to suppress ICMPv6 router advertisement message " \
- f"on interface {interface}"
+ err_msg = f"Failed to disable sending ICMPv6 router-advertisement " \
+ f"messages on interface {interface}"
with PapiSocketExecutor(node) as papi_exec:
papi_exec.add(cmd, **args).get_reply(err_msg)
@@ -66,9 +67,9 @@ class IPv6Util:
papi_exec.add(cmd, **args).get_reply(err_msg)
@staticmethod
- def vpp_all_ra_suppress_link_layer(nodes):
- """Suppress ICMPv6 router advertisement message for link scope address
- on all VPP nodes in the topology.
+ def vpp_interfaces_ra_suppress_on_all_nodes(nodes):
+ """Disable sending ICMPv6 router-advertisement messages on all
+ IPv6 enabled interfaces on all VPP nodes in the topology.
:param nodes: Nodes of the test topology.
:type nodes: dict
@@ -81,4 +82,4 @@ class IPv6Util:
node, port_k, u"ipv6"
)
if ip6_addr_list:
- IPv6Util.vpp_ra_suppress_link_layer(node, port_k)
+ IPv6Util.vpp_interface_ra_suppress(node, port_k)
diff --git a/resources/libraries/robot/crypto/ipsec.robot b/resources/libraries/robot/crypto/ipsec.robot
index ec5884daa6..666b36277a 100644
--- a/resources/libraries/robot/crypto/ipsec.robot
+++ b/resources/libraries/robot/crypto/ipsec.robot
@@ -96,7 +96,7 @@
| | ... | ${dut1} | ${DUT1_${int}1}[0] | ${tg_if1_ip6} | ${TG_pf1_mac}[0]
| | VPP Add IP Neighbor
| | ... | ${dut1} | ${DUT1_${int}2}[0] | ${tg_if2_ip6} | ${TG_pf2_mac}[0]
-| | Vpp All RA Suppress Link Layer | ${nodes}
+| | Vpp Interfaces RA Suppress On All Nodes | ${nodes}
| | Vpp Route Add
| | ... | ${dut1} | ${tg_host_ip6} | ${ip6_plen_rt} | gateway=${tg_if1_ip6}
| | ... | interface=${DUT1_${int}1}[0]
diff --git a/resources/libraries/robot/ip/ip6.robot b/resources/libraries/robot/ip/ip6.robot
index ea004e5278..8ba0689dc9 100644
--- a/resources/libraries/robot/ip/ip6.robot
+++ b/resources/libraries/robot/ip/ip6.robot
@@ -75,7 +75,7 @@
| | VPP Interface Set IP Address
| | ... | ${dut} | ${dut_if2} | 2001:2::1 | 64
| |
-| | Vpp All Ra Suppress Link Layer | ${nodes}
+| | Vpp Interfaces RA Suppress On All Nodes | ${nodes}
| |
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Vpp Route Add | ${dut1} | 2001:2::0 | 64 | gateway=2001:3::2
@@ -140,7 +140,7 @@
| | ... | ELSE | Set Variable | ${DUT1_${int}2}[0]
| | VPP Interface Set IP Address
| | ... | ${dut} | ${dut_if2} | 2001:5::1 | ${prefix}
-| | Vpp All Ra Suppress Link Layer | ${nodes}
+| | Vpp Interfaces RA Suppress On All Nodes | ${nodes}
| | VPP Add IP Neighbor
| | ... | ${dut1} | ${DUT1_${int}1}[0] | 2001:3::2 | ${TG_pf1_mac}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
@@ -188,7 +188,7 @@
| |
| | [Arguments] | ${nf_nodes}=${1}
| |
-| | Vpp All Ra Suppress Link Layer | ${nodes}
+| | Vpp Interfaces RA Suppress On All Nodes | ${nodes}
| | Set interfaces in path up
| | ${prefix}= | Set Variable | 64
| | ${fib_table_1}= | Set Variable | ${101}
@@ -317,7 +317,7 @@
| | ... | VPP Interface Set IP Address | ${dut2} | ${subif_index_2} | 2002:2::2
| | ... | ${prefix}
| | VPP Interface Set IP Address | ${dut} | ${dut_if2} | 2002:3::2 | ${prefix}
-| | Vpp All Ra Suppress Link Layer | ${nodes}
+| | Vpp Interfaces RA Suppress On All Nodes | ${nodes}
| | Vpp Route Add | ${dut1} | ${tg_if1_net} | ${host_prefix}
| | ... | gateway=2002:1::1 | interface=${DUT1_${int}1}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
diff --git a/resources/libraries/robot/overlay/lisp.robot b/resources/libraries/robot/overlay/lisp.robot
index 6ca75b4570..21036dc0c0 100644
--- a/resources/libraries/robot/overlay/lisp.robot
+++ b/resources/libraries/robot/overlay/lisp.robot
@@ -335,7 +335,7 @@
| | ... | ${dut2} | ${DUT2_${int}1}[0] | ${dut2_dut1_address} | ${prefix}
| | VPP Interface Set IP Address
| | ... | ${dut2} | ${DUT2_${int}2}[0] | ${dut2_tg_address} | ${prefix}
-| | Vpp All Ra Suppress Link Layer | ${nodes}
+| | Vpp Interfaces RA Suppress On All Nodes | ${nodes}
| | VPP Add IP Neighbor
| | ... | ${dut1} | ${DUT1_${int}1}[0] | 2001:1::2 | ${TG_pf1_mac}[0]
| | VPP Add IP Neighbor
@@ -383,7 +383,7 @@
| | ... | ${dut2} | ${DUT2_${int}1}[0] | ${dut2_dut1_ip6_address} | ${prefix6}
| | VPP Interface Set IP Address
| | ... | ${dut2} | ${DUT2_${int}2}[0] | ${dut2_tg_ip4_address} | ${prefix4}
-| | Vpp All Ra Suppress Link Layer | ${nodes}
+| | Vpp Interfaces RA Suppress On All Nodes | ${nodes}
| | VPP Add IP Neighbor
| | ... | ${dut1} | ${DUT1_${int}1}[0] | 10.10.10.2 | ${TG_pf1_mac}[0]
| | VPP Add IP Neighbor
@@ -431,7 +431,7 @@
| | ... | ${dut2} | ${DUT2_${int}1}[0] | ${dut2_dut1_ip4_address} | ${prefix4}
| | VPP Interface Set IP Address
| | ... | ${dut2} | ${DUT2_${int}2}[0] | ${dut2_tg_ip6_address} | ${prefix6}
-| | Vpp All Ra Suppress Link Layer | ${nodes}
+| | Vpp Interfaces RA Suppress On All Nodes | ${nodes}
| | VPP Add IP Neighbor
| | ... | ${dut1} | ${DUT1_${int}1}[0] | 2001:1::2 | ${TG_pf1_mac}[0]
| | VPP Add IP Neighbor
diff --git a/resources/libraries/robot/overlay/srv6.robot b/resources/libraries/robot/overlay/srv6.robot
index 11a625d65f..92c8220cb7 100644
--- a/resources/libraries/robot/overlay/srv6.robot
+++ b/resources/libraries/robot/overlay/srv6.robot
@@ -248,7 +248,7 @@
| | Run Keyword If | ${dut2_status}
| | ... | VPP Interface Set IP Address
| | ... | ${dut2} | ${DUT2_${int}2}[0] | ${dut2_if2_ip6} | ${prefix}
-| | Vpp All Ra Suppress Link Layer | ${nodes}
+| | Vpp Interfaces RA Suppress On All Nodes | ${nodes}
| | FOR | ${number} | IN RANGE | 2 | ${dst_addr_nr}+2
| | | ${hexa_nr}= | Convert To Hex | ${number}
| | | VPP Add IP Neighbor
@@ -400,7 +400,7 @@
| | Run Keyword If | ${dut2_status}
| | ... | VPP Interface Set IP Address | ${dut2} | ${dut2-memif-1-if2}
| | ... | ${dut2-memif-1-if2_ip6} | ${mem_prefix}
-| | Vpp All Ra Suppress Link Layer | ${nodes}
+| | Vpp Interfaces RA Suppress On All Nodes | ${nodes}
| | Run Keyword If | ${dut2_status}
| | ... | VPP Add IP Neighbor
| | ... | ${dut1} | ${DUT1_${int}2}[0] | ${dut2_if1_ip6}
diff --git a/resources/templates/vm/vppip6_2vhostvr1024.exec b/resources/templates/vm/vppip6_2vhostvr1024.exec
index 8545d77761..3ceefbb58f 100644
--- a/resources/templates/vm/vppip6_2vhostvr1024.exec
+++ b/resources/templates/vm/vppip6_2vhostvr1024.exec
@@ -1,7 +1,9 @@
set interface ip address GigabitEthernet0/6/0 1:1::1/64
+ip6 nd GigabitEthernet0/6/0 ra-suppress
set interface state GigabitEthernet0/6/0 up
set interface ip address GigabitEthernet0/7/0 1:2::1/64
+ip6 nd GigabitEthernet0/7/0 ra-suppress
set interface state GigabitEthernet0/7/0 up
ip route add 2001:1::/64 via 1:1::2 GigabitEthernet0/6/0
diff --git a/resources/templates/vm/vppip6_2virtiovr1024.exec b/resources/templates/vm/vppip6_2virtiovr1024.exec
index fd31d40f56..71f2e3db7f 100644
--- a/resources/templates/vm/vppip6_2virtiovr1024.exec
+++ b/resources/templates/vm/vppip6_2virtiovr1024.exec
@@ -3,6 +3,9 @@ set logging class virtio level debug
create interface virtio 0000:00:06.0
create interface virtio 0000:00:07.0
+ip6 nd virtio-0/0/6/0 ra-suppress
+ip6 nd virtio-0/0/7/0 ra-suppress
+
set interface state virtio-0/0/6/0 up
set interface state virtio-0/0/7/0 up
diff --git a/tests/vpp/device/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip6base-dev.robot b/tests/vpp/device/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip6base-dev.robot
index ba94f84134..263b74890f 100644
--- a/tests/vpp/device/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip6base-dev.robot
+++ b/tests/vpp/device/ip4_tunnels/lisp/eth2p-ethip4lispgpe-ip6base-dev.robot
@@ -77,7 +77,7 @@
| | When Initialize layer driver | ${nic_driver}
| | And Initialize layer interface
| | And Configure topology for IPv6 LISPoIP4 testing
-| | And Vpp All RA Suppress Link Layer | ${nodes}
+| | And Vpp Interfaces RA Suppress On All Nodes | ${nodes}
| | And Configure LISP in 2-node circular topology
| | ... | ${dut1} | ${DUT1_${int}2}[0] | ${NONE}
| | ... | ${duts_locator_set} | ${dut1_ip6o4_eid}
diff --git a/tests/vpp/device/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip4base-dev.robot b/tests/vpp/device/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip4base-dev.robot
index c3a222476c..fe9ea06e05 100644
--- a/tests/vpp/device/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip4base-dev.robot
+++ b/tests/vpp/device/ip6_tunnels/lisp/eth2p-ethip6lispgpe-ip4base-dev.robot
@@ -76,7 +76,7 @@
| | When Initialize layer driver | ${nic_driver}
| | And Initialize layer interface
| | And Configure topology for IPv4 LISPoIP6 testing
-| | And Vpp All RA Suppress Link Layer | ${nodes}
+| | And Vpp Interfaces RA Suppress On All Nodes | ${nodes}
| | And Configure LISP in 2-node circular topology
| | ... | ${dut1} | ${DUT1_${int}2}[0] | ${NONE}
| | ... | ${duts_locator_set} | ${dut1_ip4o6_eid}