Renato Botelho do Couto | ead1e53 | 2019-10-31 13:31:07 -0500 | [diff] [blame] | 1 | #!/usr/bin/env python3 |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 2 | |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 3 | import unittest |
Dave Wallace | 8800f73 | 2023-08-31 00:47:44 -0400 | [diff] [blame] | 4 | from framework import VppTestCase |
| 5 | from asfframework import VppTestRunner |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 6 | from template_bd import BridgeDomain |
| 7 | |
| 8 | from scapy.layers.l2 import Ether |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 9 | from scapy.packet import Raw, bind_layers |
Vladimir Isaev | 698eb87 | 2020-05-21 16:34:17 +0300 | [diff] [blame] | 10 | from scapy.layers.inet6 import IP, IPv6, UDP |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 11 | from scapy.layers.vxlan import VXLAN |
Paul Vinciguerra | 2f15631 | 2020-05-02 22:34:40 -0400 | [diff] [blame] | 12 | |
| 13 | import util |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 14 | from vpp_ip_route import VppIpRoute, VppRoutePath |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 15 | from vpp_vxlan_tunnel import VppVxlanTunnel |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 16 | from vpp_ip import INVALID_INDEX |
Dmitry Valter | 34fa0ce | 2024-03-11 10:38:46 +0000 | [diff] [blame] | 17 | from config import config |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 18 | |
| 19 | |
Dmitry Valter | 34fa0ce | 2024-03-11 10:38:46 +0000 | [diff] [blame] | 20 | @unittest.skipIf("vxlan" in config.excluded_plugins, "Exclude VXLAN plugin tests") |
Eyal Bari | dd47eca | 2018-07-08 08:15:56 +0300 | [diff] [blame] | 21 | class TestVxlan6(BridgeDomain, VppTestCase): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 22 | """VXLAN over IPv6 Test Case""" |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 23 | |
| 24 | def __init__(self, *args): |
| 25 | BridgeDomain.__init__(self) |
| 26 | VppTestCase.__init__(self, *args) |
| 27 | |
| 28 | def encapsulate(self, pkt, vni): |
| 29 | """ |
| 30 | Encapsulate the original payload frame by adding VXLAN header with its |
| 31 | UDP, IP and Ethernet fields |
| 32 | """ |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 33 | return ( |
| 34 | Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) |
| 35 | / IPv6(src=self.pg0.remote_ip6, dst=self.pg0.local_ip6) |
| 36 | / UDP(sport=self.dport, dport=self.dport, chksum=0) |
| 37 | / VXLAN(vni=vni, flags=self.flags) |
| 38 | / pkt |
| 39 | ) |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 40 | |
| 41 | @classmethod |
| 42 | def ip_range(cls, s, e): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 43 | """range of remote ip's""" |
| 44 | tmp = cls.pg0.remote_ip6.rsplit(":", 1)[0] |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 45 | return ("%s:%x" % (tmp, i) for i in range(s, e)) |
| 46 | |
| 47 | def encap_mcast(self, pkt, src_ip, src_mac, vni): |
| 48 | """ |
| 49 | Encapsulate the original payload frame by adding VXLAN header with its |
| 50 | UDP, IP and Ethernet fields |
| 51 | """ |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 52 | return ( |
| 53 | Ether(src=src_mac, dst=self.mcast_mac) |
| 54 | / IPv6(src=src_ip, dst=self.mcast_ip6) |
| 55 | / UDP(sport=self.dport, dport=self.dport, chksum=0) |
| 56 | / VXLAN(vni=vni, flags=self.flags) |
| 57 | / pkt |
| 58 | ) |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 59 | |
| 60 | def decapsulate(self, pkt): |
| 61 | """ |
| 62 | Decapsulate the original payload frame by removing VXLAN header |
| 63 | """ |
| 64 | # check if is set I flag |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 65 | self.assertEqual(pkt[VXLAN].flags, int("0x8", 16)) |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 66 | return pkt[VXLAN].payload |
| 67 | |
| 68 | # Method for checking VXLAN encapsulation. |
| 69 | # |
| 70 | def check_encapsulation(self, pkt, vni, local_only=False, mcast_pkt=False): |
| 71 | # TODO: add error messages |
| 72 | # Verify source MAC is VPP_MAC and destination MAC is MY_MAC resolved |
| 73 | # by VPP using ARP. |
| 74 | self.assertEqual(pkt[Ether].src, self.pg0.local_mac) |
| 75 | if not local_only: |
| 76 | if not mcast_pkt: |
| 77 | self.assertEqual(pkt[Ether].dst, self.pg0.remote_mac) |
| 78 | else: |
| 79 | self.assertEqual(pkt[Ether].dst, type(self).mcast_mac) |
| 80 | # Verify VXLAN tunnel source IP is VPP_IP and destination IP is MY_IP. |
| 81 | self.assertEqual(pkt[IPv6].src, self.pg0.local_ip6) |
| 82 | if not local_only: |
| 83 | if not mcast_pkt: |
| 84 | self.assertEqual(pkt[IPv6].dst, self.pg0.remote_ip6) |
| 85 | else: |
| 86 | self.assertEqual(pkt[IPv6].dst, type(self).mcast_ip6) |
| 87 | # Verify UDP destination port is VXLAN 4789, source UDP port could be |
| 88 | # arbitrary. |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 89 | self.assertEqual(pkt[UDP].dport, self.dport) |
Vladimir Isaev | 698eb87 | 2020-05-21 16:34:17 +0300 | [diff] [blame] | 90 | # Verify UDP checksum |
| 91 | self.assert_udp_checksum_valid(pkt, ignore_zero_checksum=False) |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 92 | # Verify VNI |
| 93 | self.assertEqual(pkt[VXLAN].vni, vni) |
| 94 | |
| 95 | @classmethod |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 96 | def create_vxlan_flood_test_bd(cls, vni, n_ucast_tunnels, port): |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 97 | # Create 10 ucast vxlan tunnels under bd |
| 98 | start = 10 |
| 99 | end = start + n_ucast_tunnels |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 100 | for dest_ip6 in cls.ip_range(start, end): |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 101 | # add host route so dest ip will not be resolved |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 102 | rip = VppIpRoute( |
| 103 | cls, |
| 104 | dest_ip6, |
| 105 | 128, |
| 106 | [VppRoutePath(cls.pg0.remote_ip6, INVALID_INDEX)], |
| 107 | register=False, |
| 108 | ) |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 109 | rip.add_vpp_config() |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 110 | r = VppVxlanTunnel( |
| 111 | cls, |
| 112 | src=cls.pg0.local_ip6, |
| 113 | src_port=port, |
| 114 | dst_port=port, |
| 115 | dst=dest_ip6, |
| 116 | vni=vni, |
| 117 | ) |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 118 | r.add_vpp_config() |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 119 | cls.vapi.sw_interface_set_l2_bridge(r.sw_if_index, bd_id=vni) |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 120 | |
| 121 | @classmethod |
| 122 | def add_mcast_tunnels_load(cls): |
| 123 | cls.add_del_mcast_tunnels_load(is_add=1) |
| 124 | |
| 125 | @classmethod |
| 126 | def del_mcast_tunnels_load(cls): |
| 127 | cls.add_del_mcast_tunnels_load(is_add=0) |
| 128 | |
| 129 | # Class method to start the VXLAN test case. |
| 130 | # Overrides setUpClass method in VppTestCase class. |
| 131 | # Python try..except statement is used to ensure that the tear down of |
| 132 | # the class will be executed even if exception is raised. |
| 133 | # @param cls The class pointer. |
| 134 | @classmethod |
| 135 | def setUpClass(cls): |
Eyal Bari | dd47eca | 2018-07-08 08:15:56 +0300 | [diff] [blame] | 136 | super(TestVxlan6, cls).setUpClass() |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 137 | |
| 138 | try: |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 139 | cls.flags = 0x8 |
| 140 | |
| 141 | # Create 2 pg interfaces. |
| 142 | cls.create_pg_interfaces(range(4)) |
| 143 | for pg in cls.pg_interfaces: |
| 144 | pg.admin_up() |
| 145 | |
Paul Vinciguerra | 2f15631 | 2020-05-02 22:34:40 -0400 | [diff] [blame] | 146 | # Configure IPv6 addresses on VPP pg0. |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 147 | cls.pg0.config_ip6() |
| 148 | |
| 149 | # Resolve MAC address for VPP's IP address on pg0. |
| 150 | cls.pg0.resolve_ndp() |
| 151 | |
Paul Vinciguerra | 2f15631 | 2020-05-02 22:34:40 -0400 | [diff] [blame] | 152 | # Our Multicast address |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 153 | cls.mcast_ip6 = "ff0e::1" |
Paul Vinciguerra | 2f15631 | 2020-05-02 22:34:40 -0400 | [diff] [blame] | 154 | cls.mcast_mac = util.mcast_ip_to_mac(cls.mcast_ip6) |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 155 | except Exception: |
Eyal Bari | dd47eca | 2018-07-08 08:15:56 +0300 | [diff] [blame] | 156 | super(TestVxlan6, cls).tearDownClass() |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 157 | raise |
| 158 | |
Paul Vinciguerra | 8d991d9 | 2019-01-25 14:05:48 -0800 | [diff] [blame] | 159 | @classmethod |
| 160 | def tearDownClass(cls): |
| 161 | super(TestVxlan6, cls).tearDownClass() |
| 162 | |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 163 | def setUp(self): |
| 164 | super(TestVxlan6, self).setUp() |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 165 | |
| 166 | def createVxLANInterfaces(self, port=4789): |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 167 | # Create VXLAN VTEP on VPP pg0, and put vxlan_tunnel0 and pg1 |
| 168 | # into BD. |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 169 | self.dport = port |
| 170 | |
Neale Ranns | 91fd910 | 2020-04-03 07:46:28 +0000 | [diff] [blame] | 171 | self.single_tunnel_vni = 0x12345 |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 172 | self.single_tunnel_bd = 1 |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 173 | r = VppVxlanTunnel( |
| 174 | self, |
| 175 | src=self.pg0.local_ip6, |
| 176 | dst=self.pg0.remote_ip6, |
| 177 | src_port=self.dport, |
| 178 | dst_port=self.dport, |
| 179 | vni=self.single_tunnel_vni, |
| 180 | ) |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 181 | r.add_vpp_config() |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 182 | self.vapi.sw_interface_set_l2_bridge( |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 183 | rx_sw_if_index=r.sw_if_index, bd_id=self.single_tunnel_bd |
| 184 | ) |
| 185 | self.vapi.sw_interface_set_l2_bridge( |
| 186 | rx_sw_if_index=self.pg1.sw_if_index, bd_id=self.single_tunnel_bd |
| 187 | ) |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 188 | |
| 189 | # Setup vni 2 to test multicast flooding |
| 190 | self.n_ucast_tunnels = 10 |
| 191 | self.mcast_flood_bd = 2 |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 192 | self.create_vxlan_flood_test_bd( |
| 193 | self.mcast_flood_bd, self.n_ucast_tunnels, self.dport |
| 194 | ) |
| 195 | r = VppVxlanTunnel( |
| 196 | self, |
| 197 | src=self.pg0.local_ip6, |
| 198 | dst=self.mcast_ip6, |
| 199 | src_port=self.dport, |
| 200 | dst_port=self.dport, |
| 201 | mcast_sw_if_index=1, |
| 202 | vni=self.mcast_flood_bd, |
| 203 | ) |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 204 | r.add_vpp_config() |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 205 | self.vapi.sw_interface_set_l2_bridge( |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 206 | rx_sw_if_index=r.sw_if_index, bd_id=self.mcast_flood_bd |
| 207 | ) |
| 208 | self.vapi.sw_interface_set_l2_bridge( |
| 209 | rx_sw_if_index=self.pg2.sw_if_index, bd_id=self.mcast_flood_bd |
| 210 | ) |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 211 | |
| 212 | # Setup vni 3 to test unicast flooding |
| 213 | self.ucast_flood_bd = 3 |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 214 | self.create_vxlan_flood_test_bd( |
| 215 | self.ucast_flood_bd, self.n_ucast_tunnels, self.dport |
| 216 | ) |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 217 | self.vapi.sw_interface_set_l2_bridge( |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 218 | rx_sw_if_index=self.pg3.sw_if_index, bd_id=self.ucast_flood_bd |
| 219 | ) |
Jakub Grajciar | 7c0eb56 | 2020-03-02 13:55:31 +0100 | [diff] [blame] | 220 | |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 221 | # Set scapy listen custom port for VxLAN |
| 222 | bind_layers(UDP, VXLAN, dport=self.dport) |
| 223 | |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 224 | # Method to define VPP actions before tear down of the test case. |
| 225 | # Overrides tearDown method in VppTestCase class. |
| 226 | # @param self The object pointer. |
| 227 | def tearDown(self): |
Eyal Bari | dd47eca | 2018-07-08 08:15:56 +0300 | [diff] [blame] | 228 | super(TestVxlan6, self).tearDown() |
Paul Vinciguerra | 90cf21b | 2019-03-13 09:23:05 -0700 | [diff] [blame] | 229 | |
| 230 | def show_commands_at_teardown(self): |
| 231 | self.logger.info(self.vapi.cli("show bridge-domain 1 detail")) |
| 232 | self.logger.info(self.vapi.cli("show bridge-domain 2 detail")) |
| 233 | self.logger.info(self.vapi.cli("show bridge-domain 3 detail")) |
| 234 | self.logger.info(self.vapi.cli("show vxlan tunnel")) |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 235 | |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 236 | def encap_fragmented_packet(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 237 | frame = ( |
| 238 | Ether(src="00:00:00:00:00:02", dst="00:00:00:00:00:01") |
| 239 | / IP(src="4.3.2.1", dst="1.2.3.4") |
| 240 | / UDP(sport=20000, dport=10000) |
| 241 | / Raw(b"\xa5" * 1000) |
| 242 | ) |
Vladimir Isaev | 698eb87 | 2020-05-21 16:34:17 +0300 | [diff] [blame] | 243 | |
| 244 | frags = util.fragment_rfc791(frame, 400) |
| 245 | |
| 246 | self.pg1.add_stream(frags) |
| 247 | |
| 248 | self.pg0.enable_capture() |
| 249 | |
| 250 | self.pg_start() |
| 251 | |
| 252 | out = self.pg0.get_capture(3) |
| 253 | |
| 254 | payload = [] |
| 255 | for pkt in out: |
| 256 | payload.append(self.decapsulate(pkt)) |
| 257 | self.check_encapsulation(pkt, self.single_tunnel_vni) |
| 258 | |
| 259 | reassembled = util.reassemble4(payload) |
| 260 | |
Dave Wallace | cf9356d | 2024-07-23 01:28:19 -0400 | [diff] [blame] | 261 | self.assertEqual(Ether(bytes(frame))[IP], reassembled[IP]) |
Vladimir Isaev | 698eb87 | 2020-05-21 16:34:17 +0300 | [diff] [blame] | 262 | |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 263 | """ |
| 264 | Tests with default port (4789) |
| 265 | """ |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 266 | |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 267 | def test_decap(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 268 | """Decapsulation test |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 269 | from BridgeDoman |
| 270 | """ |
| 271 | self.createVxLANInterfaces() |
| 272 | super(TestVxlan6, self).test_decap() |
| 273 | |
| 274 | def test_encap(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 275 | """Encapsulation test |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 276 | from BridgeDoman |
| 277 | """ |
| 278 | self.createVxLANInterfaces() |
| 279 | super(TestVxlan6, self).test_encap() |
| 280 | |
| 281 | def test_encap_fragmented_packet(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 282 | """Encapsulation test send fragments from pg1 |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 283 | Verify receipt of encapsulated frames on pg0 |
| 284 | """ |
| 285 | self.createVxLANInterfaces() |
| 286 | self.encap_fragmented_packet() |
| 287 | |
| 288 | def test_ucast_flood(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 289 | """Unicast flood test |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 290 | from BridgeDoman |
| 291 | """ |
| 292 | self.createVxLANInterfaces() |
| 293 | super(TestVxlan6, self).test_ucast_flood() |
| 294 | |
| 295 | def test_mcast_flood(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 296 | """Multicast flood test |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 297 | from BridgeDoman |
| 298 | """ |
| 299 | self.createVxLANInterfaces() |
| 300 | super(TestVxlan6, self).test_mcast_flood() |
| 301 | |
| 302 | def test_mcast_rcv(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 303 | """Multicast receive test |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 304 | from BridgeDoman |
| 305 | """ |
| 306 | self.createVxLANInterfaces() |
| 307 | super(TestVxlan6, self).test_mcast_rcv() |
| 308 | |
| 309 | """ |
| 310 | Tests with custom port |
| 311 | """ |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 312 | |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 313 | def test_decap_custom_port(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 314 | """Decapsulation test custom port |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 315 | from BridgeDoman |
| 316 | """ |
| 317 | self.createVxLANInterfaces(1111) |
| 318 | super(TestVxlan6, self).test_decap() |
| 319 | |
| 320 | def test_encap_custom_port(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 321 | """Encapsulation test custom port |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 322 | from BridgeDoman |
| 323 | """ |
| 324 | self.createVxLANInterfaces(1111) |
| 325 | super(TestVxlan6, self).test_encap() |
| 326 | |
| 327 | def test_ucast_flood_custom_port(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 328 | """Unicast flood test custom port |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 329 | from BridgeDoman |
| 330 | """ |
| 331 | self.createVxLANInterfaces(1111) |
| 332 | super(TestVxlan6, self).test_ucast_flood() |
| 333 | |
| 334 | def test_mcast_flood_custom_port(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 335 | """Multicast flood test custom port |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 336 | from BridgeDoman |
| 337 | """ |
| 338 | self.createVxLANInterfaces(1111) |
| 339 | super(TestVxlan6, self).test_mcast_flood() |
| 340 | |
| 341 | def test_mcast_rcv_custom_port(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 342 | """Multicast receive test custom port |
Artem Glazychev | 839dcc0 | 2020-12-01 02:39:21 +0700 | [diff] [blame] | 343 | from BridgeDoman |
| 344 | """ |
| 345 | self.createVxLANInterfaces(1111) |
| 346 | super(TestVxlan6, self).test_mcast_rcv() |
| 347 | |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 348 | |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 349 | if __name__ == "__main__": |
Eyal Bari | cef1e2a | 2018-06-18 13:01:59 +0300 | [diff] [blame] | 350 | unittest.main(testRunner=VppTestRunner) |