Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 1 | import socket |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 2 | |
Paul Vinciguerra | a7427ec | 2019-03-10 10:04:23 -0700 | [diff] [blame] | 3 | import scapy.compat |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 4 | from scapy.layers.inet import IP, UDP |
Klement Sekera | 65cc8c0 | 2016-12-18 15:49:54 +0100 | [diff] [blame] | 5 | from scapy.layers.inet6 import IPv6 |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 6 | from scapy.layers.l2 import Ether, GRE |
| 7 | from scapy.packet import Raw |
Hongjun Ni | 6fb0d9b | 2018-06-08 07:12:05 +0800 | [diff] [blame] | 8 | from scapy.data import IP_PROTOS |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 9 | |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 10 | from framework import VppTestCase |
Klement Sekera | 7bb873a | 2016-11-18 07:38:42 +0100 | [diff] [blame] | 11 | from util import ppp |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 12 | from vpp_ip_route import VppIpRoute, VppRoutePath |
| 13 | from vpp_ip import INVALID_INDEX |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 14 | |
| 15 | """ TestLB is a subclass of VPPTestCase classes. |
| 16 | |
| 17 | TestLB class defines Load Balancer test cases for: |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 18 | - IP4 to GRE4 encap on per-port vip case |
| 19 | - IP4 to GRE6 encap on per-port vip case |
| 20 | - IP6 to GRE4 encap on per-port vip case |
| 21 | - IP6 to GRE6 encap on per-port vip case |
| 22 | - IP4 to L3DSR encap on vip case |
| 23 | - IP4 to L3DSR encap on per-port vip case |
| 24 | - IP4 to NAT4 encap on per-port vip case |
| 25 | - IP6 to NAT6 encap on per-port vip case |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 26 | |
| 27 | As stated in comments below, GRE has issues with IPv6. |
| 28 | All test cases involving IPv6 are executed, but |
| 29 | received packets are not parsed and checked. |
| 30 | |
| 31 | """ |
| 32 | |
| 33 | |
| 34 | class TestLB(VppTestCase): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 35 | """Load Balancer Test Case""" |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 36 | |
| 37 | @classmethod |
| 38 | def setUpClass(cls): |
| 39 | super(TestLB, cls).setUpClass() |
| 40 | |
| 41 | cls.ass = range(5) |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 42 | cls.packets = range(1) |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 43 | |
| 44 | try: |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 45 | cls.create_pg_interfaces(range(2)) |
| 46 | cls.interfaces = list(cls.pg_interfaces) |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 47 | |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 48 | for i in cls.interfaces: |
| 49 | i.admin_up() |
| 50 | i.config_ip4() |
| 51 | i.config_ip6() |
| 52 | i.disable_ipv6_ra() |
| 53 | i.resolve_arp() |
| 54 | i.resolve_ndp() |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 55 | |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 56 | dst4 = VppIpRoute( |
| 57 | cls, |
| 58 | "10.0.0.0", |
| 59 | 24, |
| 60 | [VppRoutePath(cls.pg1.remote_ip4, INVALID_INDEX)], |
| 61 | register=False, |
| 62 | ) |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 63 | dst4.add_vpp_config() |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 64 | dst6 = VppIpRoute( |
| 65 | cls, |
| 66 | "2002::", |
| 67 | 16, |
| 68 | [VppRoutePath(cls.pg1.remote_ip6, INVALID_INDEX)], |
| 69 | register=False, |
| 70 | ) |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 71 | dst6.add_vpp_config() |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 72 | cls.vapi.lb_conf(ip4_src_address="39.40.41.42", ip6_src_address="2004::1") |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 73 | except Exception: |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 74 | super(TestLB, cls).tearDownClass() |
| 75 | raise |
| 76 | |
Paul Vinciguerra | 7f9b7f9 | 2019-03-12 19:23:27 -0700 | [diff] [blame] | 77 | @classmethod |
| 78 | def tearDownClass(cls): |
| 79 | super(TestLB, cls).tearDownClass() |
| 80 | |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 81 | def tearDown(self): |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 82 | super(TestLB, self).tearDown() |
Paul Vinciguerra | 90cf21b | 2019-03-13 09:23:05 -0700 | [diff] [blame] | 83 | |
| 84 | def show_commands_at_teardown(self): |
| 85 | self.logger.info(self.vapi.cli("show lb vip verbose")) |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 86 | |
| 87 | def getIPv4Flow(self, id): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 88 | return IP( |
| 89 | dst="90.0.%u.%u" % (id / 255, id % 255), |
| 90 | src="40.0.%u.%u" % (id / 255, id % 255), |
| 91 | ) / UDP(sport=10000 + id, dport=20000) |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 92 | |
| 93 | def getIPv6Flow(self, id): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 94 | return IPv6(dst="2001::%u" % (id), src="fd00:f00d:ffff::%u" % (id)) / UDP( |
| 95 | sport=10000 + id, dport=20000 |
| 96 | ) |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 97 | |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 98 | def generatePackets(self, src_if, isv4): |
Klement Sekera | dab231a | 2016-12-21 08:50:14 +0100 | [diff] [blame] | 99 | self.reset_packet_infos() |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 100 | pkts = [] |
| 101 | for pktid in self.packets: |
Klement Sekera | dab231a | 2016-12-21 08:50:14 +0100 | [diff] [blame] | 102 | info = self.create_packet_info(src_if, self.pg1) |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 103 | payload = self.info_to_payload(info) |
| 104 | ip = self.getIPv4Flow(pktid) if isv4 else self.getIPv6Flow(pktid) |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 105 | packet = ( |
| 106 | Ether(dst=src_if.local_mac, src=src_if.remote_mac) / ip / Raw(payload) |
| 107 | ) |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 108 | self.extend_packet(packet, 128) |
| 109 | info.data = packet.copy() |
| 110 | pkts.append(packet) |
| 111 | return pkts |
| 112 | |
| 113 | def checkInner(self, gre, isv4): |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 114 | IPver = IP if isv4 else IPv6 |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 115 | self.assertEqual(gre.proto, 0x0800 if isv4 else 0x86DD) |
| 116 | self.assertEqual(gre.flags, 0) |
| 117 | self.assertEqual(gre.version, 0) |
Paul Vinciguerra | a7427ec | 2019-03-10 10:04:23 -0700 | [diff] [blame] | 118 | inner = IPver(scapy.compat.raw(gre.payload)) |
Paul Vinciguerra | eaea421 | 2019-03-06 11:58:06 -0800 | [diff] [blame] | 119 | payload_info = self.payload_to_info(inner[Raw]) |
Klement Sekera | dab231a | 2016-12-21 08:50:14 +0100 | [diff] [blame] | 120 | self.info = self.packet_infos[payload_info.index] |
| 121 | self.assertEqual(payload_info.src, self.pg0.sw_if_index) |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 122 | self.assertEqual( |
| 123 | scapy.compat.raw(inner), scapy.compat.raw(self.info.data[IPver]) |
| 124 | ) |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 125 | |
Hongjun Ni | 647f609 | 2018-01-23 19:17:23 +0800 | [diff] [blame] | 126 | def checkCapture(self, encap, isv4): |
Klement Sekera | 65cc8c0 | 2016-12-18 15:49:54 +0100 | [diff] [blame] | 127 | self.pg0.assert_nothing_captured() |
Klement Sekera | dab231a | 2016-12-21 08:50:14 +0100 | [diff] [blame] | 128 | out = self.pg1.get_capture(len(self.packets)) |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 129 | |
| 130 | load = [0] * len(self.ass) |
| 131 | self.info = None |
| 132 | for p in out: |
| 133 | try: |
| 134 | asid = 0 |
| 135 | gre = None |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 136 | if encap == "gre4": |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 137 | ip = p[IP] |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 138 | asid = int(ip.dst.split(".")[3]) |
| 139 | self.assertEqual(ip.version, 4) |
| 140 | self.assertEqual(ip.flags, 0) |
| 141 | self.assertEqual(ip.src, "39.40.41.42") |
| 142 | self.assertEqual(ip.dst, "10.0.0.%u" % asid) |
| 143 | self.assertEqual(ip.proto, 47) |
| 144 | self.assertEqual(len(ip.options), 0) |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 145 | gre = p[GRE] |
Hongjun Ni | 647f609 | 2018-01-23 19:17:23 +0800 | [diff] [blame] | 146 | self.checkInner(gre, isv4) |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 147 | elif encap == "gre6": |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 148 | ip = p[IPv6] |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 149 | asid = ip.dst.split(":") |
| 150 | asid = asid[len(asid) - 1] |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 151 | asid = 0 if asid == "" else int(asid) |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 152 | self.assertEqual(ip.version, 6) |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 153 | self.assertEqual(ip.tc, 0) |
| 154 | self.assertEqual(ip.fl, 0) |
| 155 | self.assertEqual(ip.src, "2004::1") |
| 156 | self.assertEqual( |
| 157 | socket.inet_pton(socket.AF_INET6, ip.dst), |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 158 | socket.inet_pton(socket.AF_INET6, "2002::%u" % asid), |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 159 | ) |
| 160 | self.assertEqual(ip.nh, 47) |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 161 | # self.assertEqual(len(ip.options), 0) |
Paul Vinciguerra | a7427ec | 2019-03-10 10:04:23 -0700 | [diff] [blame] | 162 | gre = GRE(scapy.compat.raw(p[IPv6].payload)) |
Hongjun Ni | 647f609 | 2018-01-23 19:17:23 +0800 | [diff] [blame] | 163 | self.checkInner(gre, isv4) |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 164 | elif encap == "l3dsr": |
Hongjun Ni | 647f609 | 2018-01-23 19:17:23 +0800 | [diff] [blame] | 165 | ip = p[IP] |
| 166 | asid = int(ip.dst.split(".")[3]) |
| 167 | self.assertEqual(ip.version, 4) |
| 168 | self.assertEqual(ip.flags, 0) |
| 169 | self.assertEqual(ip.dst, "10.0.0.%u" % asid) |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 170 | self.assertEqual(ip.tos, 0x1C) |
Hongjun Ni | 647f609 | 2018-01-23 19:17:23 +0800 | [diff] [blame] | 171 | self.assertEqual(len(ip.options), 0) |
Hongjun Ni | 6fb0d9b | 2018-06-08 07:12:05 +0800 | [diff] [blame] | 172 | self.assert_ip_checksum_valid(p) |
| 173 | if ip.proto == IP_PROTOS.tcp: |
| 174 | self.assert_tcp_checksum_valid(p) |
| 175 | elif ip.proto == IP_PROTOS.udp: |
| 176 | self.assert_udp_checksum_valid(p) |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 177 | elif encap == "nat4": |
Hongjun Ni | d92a0b5 | 2018-02-06 23:00:22 +0800 | [diff] [blame] | 178 | ip = p[IP] |
| 179 | asid = int(ip.dst.split(".")[3]) |
| 180 | self.assertEqual(ip.version, 4) |
| 181 | self.assertEqual(ip.flags, 0) |
| 182 | self.assertEqual(ip.dst, "10.0.0.%u" % asid) |
| 183 | self.assertEqual(ip.proto, 17) |
| 184 | self.assertEqual(len(ip.options), 0) |
Hongjun Ni | d92a0b5 | 2018-02-06 23:00:22 +0800 | [diff] [blame] | 185 | udp = p[UDP] |
| 186 | self.assertEqual(udp.dport, 3307) |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 187 | elif encap == "nat6": |
Hongjun Ni | d92a0b5 | 2018-02-06 23:00:22 +0800 | [diff] [blame] | 188 | ip = p[IPv6] |
| 189 | asid = ip.dst.split(":") |
| 190 | asid = asid[len(asid) - 1] |
| 191 | asid = 0 if asid == "" else int(asid) |
| 192 | self.assertEqual(ip.version, 6) |
| 193 | self.assertEqual(ip.tc, 0) |
| 194 | self.assertEqual(ip.fl, 0) |
| 195 | self.assertEqual( |
| 196 | socket.inet_pton(socket.AF_INET6, ip.dst), |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 197 | socket.inet_pton(socket.AF_INET6, "2002::%u" % asid), |
Hongjun Ni | d92a0b5 | 2018-02-06 23:00:22 +0800 | [diff] [blame] | 198 | ) |
| 199 | self.assertEqual(ip.nh, 17) |
| 200 | self.assertGreaterEqual(ip.hlim, 63) |
Paul Vinciguerra | a7427ec | 2019-03-10 10:04:23 -0700 | [diff] [blame] | 201 | udp = UDP(scapy.compat.raw(p[IPv6].payload)) |
Hongjun Ni | d92a0b5 | 2018-02-06 23:00:22 +0800 | [diff] [blame] | 202 | self.assertEqual(udp.dport, 3307) |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 203 | load[asid] += 1 |
| 204 | except: |
Klement Sekera | 7bb873a | 2016-11-18 07:38:42 +0100 | [diff] [blame] | 205 | self.logger.error(ppp("Unexpected or invalid packet:", p)) |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 206 | raise |
| 207 | |
Paul Vinciguerra | f7f1334 | 2019-03-19 11:54:39 -0700 | [diff] [blame] | 208 | # This is just to roughly check that the balancing algorithm |
| 209 | # is not completely biased. |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 210 | for asid in self.ass: |
snaramre | ec44e26 | 2019-10-16 22:36:47 +0000 | [diff] [blame] | 211 | if load[asid] < int(len(self.packets) / (len(self.ass) * 2)): |
Gabriel Ganne | 8e66b9b | 2017-12-14 16:20:37 +0100 | [diff] [blame] | 212 | self.logger.error( |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 213 | "ASS is not balanced: load[%d] = %d" % (asid, load[asid]) |
| 214 | ) |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 215 | raise Exception("Load Balancer algorithm is biased") |
| 216 | |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 217 | def test_lb_ip4_gre4(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 218 | """Load Balancer IP4 GRE4 on vip case""" |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 219 | try: |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 220 | self.vapi.cli("lb vip 90.0.0.0/8 encap gre4") |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 221 | for asid in self.ass: |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 222 | self.vapi.cli("lb as 90.0.0.0/8 10.0.0.%u" % (asid)) |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 223 | |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 224 | self.pg0.add_stream(self.generatePackets(self.pg0, isv4=True)) |
| 225 | self.pg_enable_capture(self.pg_interfaces) |
| 226 | self.pg_start() |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 227 | self.checkCapture(encap="gre4", isv4=True) |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 228 | |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 229 | finally: |
| 230 | for asid in self.ass: |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 231 | self.vapi.cli("lb as 90.0.0.0/8 10.0.0.%u del" % (asid)) |
| 232 | self.vapi.cli("lb vip 90.0.0.0/8 encap gre4 del") |
Gabriel Ganne | b3d1b20 | 2017-10-30 15:44:31 +0100 | [diff] [blame] | 233 | self.vapi.cli("test lb flowtable flush") |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 234 | |
| 235 | def test_lb_ip6_gre4(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 236 | """Load Balancer IP6 GRE4 on vip case""" |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 237 | |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 238 | try: |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 239 | self.vapi.cli("lb vip 2001::/16 encap gre4") |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 240 | for asid in self.ass: |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 241 | self.vapi.cli("lb as 2001::/16 10.0.0.%u" % (asid)) |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 242 | |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 243 | self.pg0.add_stream(self.generatePackets(self.pg0, isv4=False)) |
| 244 | self.pg_enable_capture(self.pg_interfaces) |
| 245 | self.pg_start() |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 246 | |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 247 | self.checkCapture(encap="gre4", isv4=False) |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 248 | finally: |
| 249 | for asid in self.ass: |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 250 | self.vapi.cli("lb as 2001::/16 10.0.0.%u del" % (asid)) |
| 251 | self.vapi.cli("lb vip 2001::/16 encap gre4 del") |
Gabriel Ganne | b3d1b20 | 2017-10-30 15:44:31 +0100 | [diff] [blame] | 252 | self.vapi.cli("test lb flowtable flush") |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 253 | |
| 254 | def test_lb_ip4_gre6(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 255 | """Load Balancer IP4 GRE6 on vip case""" |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 256 | try: |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 257 | self.vapi.cli("lb vip 90.0.0.0/8 encap gre6") |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 258 | for asid in self.ass: |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 259 | self.vapi.cli("lb as 90.0.0.0/8 2002::%u" % (asid)) |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 260 | |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 261 | self.pg0.add_stream(self.generatePackets(self.pg0, isv4=True)) |
| 262 | self.pg_enable_capture(self.pg_interfaces) |
| 263 | self.pg_start() |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 264 | |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 265 | self.checkCapture(encap="gre6", isv4=True) |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 266 | finally: |
| 267 | for asid in self.ass: |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 268 | self.vapi.cli("lb as 90.0.0.0/8 2002::%u del" % (asid)) |
| 269 | self.vapi.cli("lb vip 90.0.0.0/8 encap gre6 del") |
Gabriel Ganne | b3d1b20 | 2017-10-30 15:44:31 +0100 | [diff] [blame] | 270 | self.vapi.cli("test lb flowtable flush") |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 271 | |
| 272 | def test_lb_ip6_gre6(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 273 | """Load Balancer IP6 GRE6 on vip case""" |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 274 | try: |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 275 | self.vapi.cli("lb vip 2001::/16 encap gre6") |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 276 | for asid in self.ass: |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 277 | self.vapi.cli("lb as 2001::/16 2002::%u" % (asid)) |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 278 | |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 279 | self.pg0.add_stream(self.generatePackets(self.pg0, isv4=False)) |
| 280 | self.pg_enable_capture(self.pg_interfaces) |
| 281 | self.pg_start() |
Pierre Pfister | f588f35 | 2016-10-07 16:31:57 +0100 | [diff] [blame] | 282 | |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 283 | self.checkCapture(encap="gre6", isv4=False) |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 284 | finally: |
| 285 | for asid in self.ass: |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 286 | self.vapi.cli("lb as 2001::/16 2002::%u del" % (asid)) |
| 287 | self.vapi.cli("lb vip 2001::/16 encap gre6 del") |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 288 | self.vapi.cli("test lb flowtable flush") |
| 289 | |
| 290 | def test_lb_ip4_gre4_port(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 291 | """Load Balancer IP4 GRE4 on per-port-vip case""" |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 292 | try: |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 293 | self.vapi.cli("lb vip 90.0.0.0/8 protocol udp port 20000 encap gre4") |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 294 | for asid in self.ass: |
| 295 | self.vapi.cli( |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 296 | "lb as 90.0.0.0/8 protocol udp port 20000 10.0.0.%u" % (asid) |
| 297 | ) |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 298 | |
| 299 | self.pg0.add_stream(self.generatePackets(self.pg0, isv4=True)) |
| 300 | self.pg_enable_capture(self.pg_interfaces) |
| 301 | self.pg_start() |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 302 | self.checkCapture(encap="gre4", isv4=True) |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 303 | |
| 304 | finally: |
| 305 | for asid in self.ass: |
| 306 | self.vapi.cli( |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 307 | "lb as 90.0.0.0/8 protocol udp port 20000 10.0.0.%u del" % (asid) |
| 308 | ) |
| 309 | self.vapi.cli("lb vip 90.0.0.0/8 protocol udp port 20000 encap gre4 del") |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 310 | self.vapi.cli("test lb flowtable flush") |
| 311 | |
| 312 | def test_lb_ip6_gre4_port(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 313 | """Load Balancer IP6 GRE4 on per-port-vip case""" |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 314 | |
| 315 | try: |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 316 | self.vapi.cli("lb vip 2001::/16 protocol udp port 20000 encap gre4") |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 317 | for asid in self.ass: |
| 318 | self.vapi.cli( |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 319 | "lb as 2001::/16 protocol udp port 20000 10.0.0.%u" % (asid) |
| 320 | ) |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 321 | |
| 322 | self.pg0.add_stream(self.generatePackets(self.pg0, isv4=False)) |
| 323 | self.pg_enable_capture(self.pg_interfaces) |
| 324 | self.pg_start() |
| 325 | |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 326 | self.checkCapture(encap="gre4", isv4=False) |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 327 | finally: |
| 328 | for asid in self.ass: |
| 329 | self.vapi.cli( |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 330 | "lb as 2001::/16 protocol udp port 20000 10.0.0.%u del" % (asid) |
| 331 | ) |
| 332 | self.vapi.cli("lb vip 2001::/16 protocol udp port 20000 encap gre4 del") |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 333 | self.vapi.cli("test lb flowtable flush") |
| 334 | |
| 335 | def test_lb_ip4_gre6_port(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 336 | """Load Balancer IP4 GRE6 on per-port-vip case""" |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 337 | try: |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 338 | self.vapi.cli("lb vip 90.0.0.0/8 protocol udp port 20000 encap gre6") |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 339 | for asid in self.ass: |
| 340 | self.vapi.cli( |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 341 | "lb as 90.0.0.0/8 protocol udp port 20000 2002::%u" % (asid) |
| 342 | ) |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 343 | |
| 344 | self.pg0.add_stream(self.generatePackets(self.pg0, isv4=True)) |
| 345 | self.pg_enable_capture(self.pg_interfaces) |
| 346 | self.pg_start() |
| 347 | |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 348 | self.checkCapture(encap="gre6", isv4=True) |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 349 | finally: |
| 350 | for asid in self.ass: |
| 351 | self.vapi.cli( |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 352 | "lb as 90.0.0.0/8 protocol udp port 20000 2002::%u del" % (asid) |
| 353 | ) |
| 354 | self.vapi.cli("lb vip 90.0.0.0/8 protocol udp port 20000 encap gre6 del") |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 355 | self.vapi.cli("test lb flowtable flush") |
| 356 | |
| 357 | def test_lb_ip6_gre6_port(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 358 | """Load Balancer IP6 GRE6 on per-port-vip case""" |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 359 | try: |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 360 | self.vapi.cli("lb vip 2001::/16 protocol udp port 20000 encap gre6") |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 361 | for asid in self.ass: |
| 362 | self.vapi.cli( |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 363 | "lb as 2001::/16 protocol udp port 20000 2002::%u" % (asid) |
| 364 | ) |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 365 | |
| 366 | self.pg0.add_stream(self.generatePackets(self.pg0, isv4=False)) |
| 367 | self.pg_enable_capture(self.pg_interfaces) |
| 368 | self.pg_start() |
| 369 | |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 370 | self.checkCapture(encap="gre6", isv4=False) |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 371 | finally: |
| 372 | for asid in self.ass: |
| 373 | self.vapi.cli( |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 374 | "lb as 2001::/16 protocol udp port 20000 2002::%u del" % (asid) |
| 375 | ) |
| 376 | self.vapi.cli("lb vip 2001::/16 protocol udp port 20000 encap gre6 del") |
Gabriel Ganne | b3d1b20 | 2017-10-30 15:44:31 +0100 | [diff] [blame] | 377 | self.vapi.cli("test lb flowtable flush") |
Hongjun Ni | 647f609 | 2018-01-23 19:17:23 +0800 | [diff] [blame] | 378 | |
| 379 | def test_lb_ip4_l3dsr(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 380 | """Load Balancer IP4 L3DSR on vip case""" |
Hongjun Ni | 647f609 | 2018-01-23 19:17:23 +0800 | [diff] [blame] | 381 | try: |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 382 | self.vapi.cli("lb vip 90.0.0.0/8 encap l3dsr dscp 7") |
Hongjun Ni | 647f609 | 2018-01-23 19:17:23 +0800 | [diff] [blame] | 383 | for asid in self.ass: |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 384 | self.vapi.cli("lb as 90.0.0.0/8 10.0.0.%u" % (asid)) |
Hongjun Ni | 647f609 | 2018-01-23 19:17:23 +0800 | [diff] [blame] | 385 | |
| 386 | self.pg0.add_stream(self.generatePackets(self.pg0, isv4=True)) |
| 387 | self.pg_enable_capture(self.pg_interfaces) |
| 388 | self.pg_start() |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 389 | self.checkCapture(encap="l3dsr", isv4=True) |
Hongjun Ni | 647f609 | 2018-01-23 19:17:23 +0800 | [diff] [blame] | 390 | |
| 391 | finally: |
| 392 | for asid in self.ass: |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 393 | self.vapi.cli("lb as 90.0.0.0/8 10.0.0.%u del" % (asid)) |
| 394 | self.vapi.cli("lb vip 90.0.0.0/8 encap l3dsr dscp 7 del") |
Hongjun Ni | 647f609 | 2018-01-23 19:17:23 +0800 | [diff] [blame] | 395 | self.vapi.cli("test lb flowtable flush") |
Hongjun Ni | d92a0b5 | 2018-02-06 23:00:22 +0800 | [diff] [blame] | 396 | |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 397 | def test_lb_ip4_l3dsr_port(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 398 | """Load Balancer IP4 L3DSR on per-port-vip case""" |
Hongjun Ni | d92a0b5 | 2018-02-06 23:00:22 +0800 | [diff] [blame] | 399 | try: |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 400 | self.vapi.cli( |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 401 | "lb vip 90.0.0.0/8 protocol udp port 20000 encap l3dsr dscp 7" |
| 402 | ) |
Hongjun Ni | d92a0b5 | 2018-02-06 23:00:22 +0800 | [diff] [blame] | 403 | for asid in self.ass: |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 404 | self.vapi.cli( |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 405 | "lb as 90.0.0.0/8 protocol udp port 20000 10.0.0.%u" % (asid) |
| 406 | ) |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 407 | |
| 408 | self.pg0.add_stream(self.generatePackets(self.pg0, isv4=True)) |
| 409 | self.pg_enable_capture(self.pg_interfaces) |
| 410 | self.pg_start() |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 411 | self.checkCapture(encap="l3dsr", isv4=True) |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 412 | |
| 413 | finally: |
| 414 | for asid in self.ass: |
| 415 | self.vapi.cli( |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 416 | "lb as 90.0.0.0/8 protocol udp port 20000 10.0.0.%u del" % (asid) |
| 417 | ) |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 418 | self.vapi.cli( |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 419 | "lb vip 90.0.0.0/8 protocol udp port 20000 encap l3dsr dscp 7 del" |
| 420 | ) |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 421 | self.vapi.cli("test lb flowtable flush") |
| 422 | |
| 423 | def test_lb_ip4_nat4_port(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 424 | """Load Balancer IP4 NAT4 on per-port-vip case""" |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 425 | try: |
| 426 | self.vapi.cli( |
| 427 | "lb vip 90.0.0.0/8 protocol udp port 20000 encap nat4" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 428 | " type clusterip target_port 3307" |
| 429 | ) |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 430 | for asid in self.ass: |
| 431 | self.vapi.cli( |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 432 | "lb as 90.0.0.0/8 protocol udp port 20000 10.0.0.%u" % (asid) |
| 433 | ) |
Hongjun Ni | d92a0b5 | 2018-02-06 23:00:22 +0800 | [diff] [blame] | 434 | |
| 435 | self.pg0.add_stream(self.generatePackets(self.pg0, isv4=True)) |
| 436 | self.pg_enable_capture(self.pg_interfaces) |
| 437 | self.pg_start() |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 438 | self.checkCapture(encap="nat4", isv4=True) |
Hongjun Ni | d92a0b5 | 2018-02-06 23:00:22 +0800 | [diff] [blame] | 439 | |
| 440 | finally: |
| 441 | for asid in self.ass: |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 442 | self.vapi.cli( |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 443 | "lb as 90.0.0.0/8 protocol udp port 20000 10.0.0.%u del" % (asid) |
| 444 | ) |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 445 | self.vapi.cli( |
| 446 | "lb vip 90.0.0.0/8 protocol udp port 20000 encap nat4" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 447 | " type clusterip target_port 3307 del" |
| 448 | ) |
Hongjun Ni | d92a0b5 | 2018-02-06 23:00:22 +0800 | [diff] [blame] | 449 | self.vapi.cli("test lb flowtable flush") |
| 450 | |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 451 | def test_lb_ip6_nat6_port(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 452 | """Load Balancer IP6 NAT6 on per-port-vip case""" |
Hongjun Ni | d92a0b5 | 2018-02-06 23:00:22 +0800 | [diff] [blame] | 453 | try: |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 454 | self.vapi.cli( |
| 455 | "lb vip 2001::/16 protocol udp port 20000 encap nat6" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 456 | " type clusterip target_port 3307" |
| 457 | ) |
Hongjun Ni | d92a0b5 | 2018-02-06 23:00:22 +0800 | [diff] [blame] | 458 | for asid in self.ass: |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 459 | self.vapi.cli( |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 460 | "lb as 2001::/16 protocol udp port 20000 2002::%u" % (asid) |
| 461 | ) |
Hongjun Ni | d92a0b5 | 2018-02-06 23:00:22 +0800 | [diff] [blame] | 462 | |
| 463 | self.pg0.add_stream(self.generatePackets(self.pg0, isv4=False)) |
| 464 | self.pg_enable_capture(self.pg_interfaces) |
| 465 | self.pg_start() |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 466 | self.checkCapture(encap="nat6", isv4=False) |
Hongjun Ni | d92a0b5 | 2018-02-06 23:00:22 +0800 | [diff] [blame] | 467 | |
| 468 | finally: |
| 469 | for asid in self.ass: |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 470 | self.vapi.cli( |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 471 | "lb as 2001::/16 protocol udp port 20000 2002::%u del" % (asid) |
| 472 | ) |
Hongjun Ni | 219cc90 | 2018-06-28 20:14:19 +0800 | [diff] [blame] | 473 | self.vapi.cli( |
| 474 | "lb vip 2001::/16 protocol udp port 20000 encap nat6" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame^] | 475 | " type clusterip target_port 3307 del" |
| 476 | ) |
Hongjun Ni | d92a0b5 | 2018-02-06 23:00:22 +0800 | [diff] [blame] | 477 | self.vapi.cli("test lb flowtable flush") |