blob: cac61c145940ff94ee961edbe2d601405fe62237 [file] [log] [blame]
Flavio Castro05d20bc2015-11-16 15:06:14 -05001"""
2Flow Test
Flavio Castro3aec8902015-11-20 10:51:38 -050031) PacketInSrcMacMiss
42) L2FloodTagged
53) L2Flood Tagged Unknown Src
64) L2 Unicast Tagged
75) L3 Unicast Tagged
86) MTU 1500
97) MTU 4100
108) MTU 4500
Flavio Castro05d20bc2015-11-16 15:06:14 -050011"""
12
Flavio Castro05d20bc2015-11-16 15:06:14 -050013from oftest import config
Flavio Castro167f5bd2015-12-02 19:33:53 -050014import logging
15import oftest.base_tests as base_tests
Flavio Castro05d20bc2015-11-16 15:06:14 -050016import ofp
17from oftest.testutils import *
18from accton_util import *
Flavio Castrod8f8af22015-12-02 18:19:26 -050019
Flavio Castro05d20bc2015-11-16 15:06:14 -050020
Flavio Castroaabb5792015-11-18 19:03:50 -050021class PacketInSrcMacMiss(base_tests.SimpleDataPlane):
22 """
23 Test packet in function on a src-mac miss
24 Send a packet to each dataplane port and verify that a packet
25 in message is received from the controller for each
26 #todo verify you stop receiving after adding rule
27 """
28
Flavio Castro6efe1862015-11-18 16:28:06 -050029 def runTest(self):
30 delete_all_flows(self.controller)
31 delete_all_groups(self.controller)
32
Flavio Castroaabb5792015-11-18 19:03:50 -050033 parsed_vlan_pkt = simple_tcp_packet(pktlen=104,
34 vlan_vid=0x1001, dl_vlan_enable=True)
35 vlan_pkt = str(parsed_vlan_pkt)
Flavio Castro6efe1862015-11-18 16:28:06 -050036
Flavio Castroaabb5792015-11-18 19:03:50 -050037 add_vlan_table_flow(self.controller, config["port_map"].keys(), 1)
Flavio Castro6efe1862015-11-18 16:28:06 -050038
Flavio Castroaabb5792015-11-18 19:03:50 -050039 # group table
40 # set up untag groups for each port
41 add_l2_interface_grouop(self.controller, config["port_map"].keys(), 1, True, 1)
42
43 for of_port in config["port_map"].keys():
44 logging.info("PacketInMiss test, port %d", of_port)
45 self.dataplane.send(of_port, vlan_pkt)
46
47 verify_packet_in(self, vlan_pkt, of_port, ofp.OFPR_NO_MATCH)
48
49 verify_no_other_packets(self)
50
Flavio Castro184cefe2015-11-19 20:52:49 -050051class L2FloodTagged(base_tests.SimpleDataPlane):
52 """
53 Test L2 flood to a vlan
54 Send a packet with unknown dst_mac and check if the packet is flooded to all ports except inport
55 #todo take in account unknown src
56 """
57 def runTest(self):
58 ports = sorted(config["port_map"].keys())
59 delete_all_flows(self.controller)
60 delete_all_groups(self.controller)
61
62 add_vlan_table_flow(self.controller, ports, 1)
63
64 # set up tagged groups for each port
65 add_l2_interface_grouop(self.controller, ports, 1, True, 1)
66
67 msg=add_l2_flood_group(self.controller, ports, 1, 1)
68 add_bridge_flow(self.controller, None, 1, msg.group_id, True)
69 # Installing flows to avoid packet-in
70 for port in ports:
71 group_id = encode_l2_interface_group_id(1, port)
72 add_bridge_flow(self.controller, [0x00, 0x12, 0x34, 0x56, 0x78, port], 1, group_id, True)
73 do_barrier(self.controller)
74
75 #verify flood
76 for ofport in ports:
77 # change dest based on port number
78 mac_src= '00:12:34:56:78:%02X' % ofport
79 parsed_pkt = simple_tcp_packet(dl_vlan_enable=True, vlan_vid=1, eth_dst='00:12:34:56:78:9a', eth_src=mac_src)
80 pkt = str(parsed_pkt)
81 self.dataplane.send(ofport, pkt)
82 #self won't rx packet
83 verify_no_packet(self, pkt, ofport)
84 #others will rx packet
85 tmp_ports=list(ports)
86 tmp_ports.remove(ofport)
87 verify_packets(self, pkt, tmp_ports)
88
89 verify_no_other_packets(self)
90
Flavio Castroaabb5792015-11-18 19:03:50 -050091class L2FloodTaggedUnknownSrc(base_tests.SimpleDataPlane):
92 """
93 Test L2 flood to a vlan
94 Send a packet with unknown dst_mac and check if the packet is flooded to all ports except inport
95 #todo take in account unknown src
96 """
97 def runTest(self):
98 ports = sorted(config["port_map"].keys())
99 delete_all_flows(self.controller)
100 delete_all_groups(self.controller)
101
102 add_vlan_table_flow(self.controller, ports, 1)
103
104 # set up tagged groups for each port
105 add_l2_interface_grouop(self.controller, ports, 1, True, 1)
106
107 msg=add_l2_flood_group(self.controller, ports, 1, 1)
108 add_bridge_flow(self.controller, None, 1, msg.group_id, True)
109
110 parsed_pkt = simple_tcp_packet(dl_vlan_enable=True, vlan_vid=1, eth_dst='00:12:34:56:78:9a')
111 pkt = str(parsed_pkt)
112 #verify flood
113 for ofport in ports:
114 self.dataplane.send(ofport, pkt)
115 #self won't rx packet
116 verify_no_packet(self, pkt, ofport)
117 #others will rx packet
118 tmp_ports=list(ports)
119 tmp_ports.remove(ofport)
120 verify_packets(self, pkt, tmp_ports)
121
122 verify_no_other_packets(self)
123
Flavio Castroaabb5792015-11-18 19:03:50 -0500124class L2UnicastTagged(base_tests.SimpleDataPlane):
125 """
126 Test output function for an exact-match flow
127
128 For each port A, adds a flow directing matching packets to that port.
129 Then, for all other ports B != A, verifies that sending a matching packet
130 to B results in an output to A.
131 """
132 def runTest(self):
133 ports = sorted(config["port_map"].keys())
134
135 delete_all_flows(self.controller)
136 delete_all_groups(self.controller)
137
138 add_vlan_table_flow(self.controller, config["port_map"].keys())
139
140 # set up tag groups for each port
141 add_l2_interface_grouop(self.controller, config["port_map"].keys(), 1, True, 1)
142
143 for port in ports:
144 group_id = encode_l2_interface_group_id(1, port)
145 add_bridge_flow(self.controller, [0x00, 0x12, 0x34, 0x56, 0x78, port], 1, group_id, True)
Flavio Castro6efe1862015-11-18 16:28:06 -0500146 do_barrier(self.controller)
147
Flavio Castroaabb5792015-11-18 19:03:50 -0500148 for out_port in ports:
149 # change dest based on port number
150 mac_dst= '00:12:34:56:78:%02X' % out_port
151 for in_port in ports:
152 if in_port == out_port:
153 continue
154 # change source based on port number to avoid packet-ins from learning
155 mac_src= '00:12:34:56:78:%02X' % in_port
156 parsed_pkt = simple_tcp_packet(dl_vlan_enable=True, vlan_vid=1, eth_dst=mac_dst, eth_src=mac_src)
157 pkt = str(parsed_pkt)
158 self.dataplane.send(in_port, pkt)
159
160 for ofport in ports:
161 if ofport in [out_port]:
162 verify_packet(self, pkt, ofport)
163 else:
164 verify_no_packet(self, pkt, ofport)
165
166 verify_no_other_packets(self)
Flavio Castro6efe1862015-11-18 16:28:06 -0500167
168
Flavio Castrob6773032015-11-19 22:49:24 -0500169class Mtu4500(base_tests.SimpleDataPlane):
170
171 def runTest(self):
172 ports = sorted(config["port_map"].keys())
173
174 delete_all_flows(self.controller)
175 delete_all_groups(self.controller)
176
177 add_vlan_table_flow(self.controller, config["port_map"].keys())
178
179 # set up tag groups for each port
180 add_l2_interface_grouop(self.controller, config["port_map"].keys(), 1, True, 1)
181
182 for port in ports:
183 group_id = encode_l2_interface_group_id(1, port)
184 add_bridge_flow(self.controller, [0x00, 0x12, 0x34, 0x56, 0x78, port], 1, group_id, True)
185 do_barrier(self.controller)
186
187 for out_port in ports:
188 # change dest based on port number
189 mac_dst= '00:12:34:56:78:%02X' % out_port
190 for in_port in ports:
191 if in_port == out_port:
192 continue
193 # change source based on port number to avoid packet-ins from learning
194 mac_src= '00:12:34:56:78:%02X' % in_port
195 parsed_pkt = simple_tcp_packet(pktlen=4500,dl_vlan_enable=True, vlan_vid=1, eth_dst=mac_dst, eth_src=mac_src)
196 pkt = str(parsed_pkt)
197 self.dataplane.send(in_port, pkt)
198
199 for ofport in ports:
200 if ofport in [out_port]:
201 verify_packet(self, pkt, ofport)
202 else:
203 verify_no_packet(self, pkt, ofport)
204
205 verify_no_other_packets(self)
206
207
208class Mtu1500(base_tests.SimpleDataPlane):
209
210 def runTest(self):
211 ports = sorted(config["port_map"].keys())
212
213 delete_all_flows(self.controller)
214 delete_all_groups(self.controller)
215
216 add_vlan_table_flow(self.controller, config["port_map"].keys())
217
218 # set up tag groups for each port
219 add_l2_interface_grouop(self.controller, config["port_map"].keys(), 1, True, 1)
220
221 for port in ports:
222 group_id = encode_l2_interface_group_id(1, port)
223 add_bridge_flow(self.controller, [0x00, 0x12, 0x34, 0x56, 0x78, port], 1, group_id, True)
224 do_barrier(self.controller)
225
226 for out_port in ports:
227 # change dest based on port number
228 mac_dst= '00:12:34:56:78:%02X' % out_port
229 for in_port in ports:
230 if in_port == out_port:
231 continue
232 # change source based on port number to avoid packet-ins from learning
233 mac_src= '00:12:34:56:78:%02X' % in_port
234 parsed_pkt = simple_tcp_packet(pktlen=1500,dl_vlan_enable=True, vlan_vid=1, eth_dst=mac_dst, eth_src=mac_src)
235 pkt = str(parsed_pkt)
236 self.dataplane.send(in_port, pkt)
237
238 for ofport in ports:
239 if ofport in [out_port]:
240 verify_packet(self, pkt, ofport)
241 else:
242 verify_no_packet(self, pkt, ofport)
243
244 verify_no_other_packets(self)
245
246
247class Mtu4000(base_tests.SimpleDataPlane):
248 """
249 Test output function for an exact-match flow
250 For each port A, adds a flow directing matching packets to that port.
251 Then, for all other ports B != A, verifies that sending a matching packet
252 to B results in an output to A.
253 """
254 def runTest(self):
255 ports = sorted(config["port_map"].keys())
256
257 delete_all_flows(self.controller)
258 delete_all_groups(self.controller)
259
260 add_vlan_table_flow(self.controller, config["port_map"].keys())
261
262 # set up tag groups for each port
263 add_l2_interface_grouop(self.controller, config["port_map"].keys(), 1, True, 1)
264
265 for port in ports:
266 group_id = encode_l2_interface_group_id(1, port)
267 add_bridge_flow(self.controller, [0x00, 0x12, 0x34, 0x56, 0x78, port], 1, group_id, True)
268 do_barrier(self.controller)
269
270 for out_port in ports:
271 # change dest based on port number
272 mac_dst= '00:12:34:56:78:%02X' % out_port
273 for in_port in ports:
274 if in_port == out_port:
275 continue
276 # change source based on port number to avoid packet-ins from learning
277 mac_src= '00:12:34:56:78:%02X' % in_port
278 parsed_pkt = simple_tcp_packet(pktlen=4000,dl_vlan_enable=True, vlan_vid=1, eth_dst=mac_dst, eth_src=mac_src)
279 pkt = str(parsed_pkt)
280 self.dataplane.send(in_port, pkt)
281
282 for ofport in ports:
283 if ofport in [out_port]:
284 verify_packet(self, pkt, ofport)
285 else:
286 verify_no_packet(self, pkt, ofport)
287
288 verify_no_other_packets(self)
Flavio Castroaabb5792015-11-18 19:03:50 -0500289
290class L3UcastTagged(base_tests.SimpleDataPlane):
Flavio Castro05d20bc2015-11-16 15:06:14 -0500291 """
Flavio Castro35e64392015-12-02 16:53:14 -0500292 Port1(vid=in_port, src=00:00:00:22:22:in_port, 192.168.outport.1) ,
293 Port2(vid=outport, dst=00:00:00:22:22:outport, 192.168.outport.1)
Flavio Castro05d20bc2015-11-16 15:06:14 -0500294 """
Flavio Castrod8f8af22015-12-02 18:19:26 -0500295 def runTest(self):
Flavio Castro05d20bc2015-11-16 15:06:14 -0500296 delete_all_flows(self.controller)
297 delete_all_groups(self.controller)
298
299 if len(config["port_map"]) <2:
300 logging.info("Port count less than 2, can't run this case")
301 return
Flavio Castrod8f8af22015-12-02 18:19:26 -0500302
Flavio Castro05d20bc2015-11-16 15:06:14 -0500303 intf_src_mac=[0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc]
304 dst_mac=[0x00, 0x00, 0x00, 0x22, 0x22, 0x00]
305 dip=0xc0a80001
Flavio Castroa8233862015-12-02 14:41:11 -0500306 ports = config["port_map"].keys()
307 for port in ports:
Flavio Castro05d20bc2015-11-16 15:06:14 -0500308 #add l2 interface group
Flavio Castroa8233862015-12-02 14:41:11 -0500309 vlan_id=port
Flavio Castro05d20bc2015-11-16 15:06:14 -0500310 add_one_l2_interface_grouop(self.controller, port, vlan_id=vlan_id, is_tagged=True, send_barrier=False)
311 dst_mac[5]=vlan_id
312 l3_msg=add_l3_unicast_group(self.controller, port, vlanid=vlan_id, id=vlan_id, src_mac=intf_src_mac, dst_mac=dst_mac)
313 #add vlan flow table
314 add_one_vlan_table_flow(self.controller, port, vlan_id, flag=VLAN_TABLE_FLAG_ONLY_BOTH)
315 #add termination flow
Flavio Castrod8f8af22015-12-02 18:19:26 -0500316 add_termination_flow(self.controller, port, 0x0800, intf_src_mac, vlan_id)
Flavio Castro05d20bc2015-11-16 15:06:14 -0500317 #add unicast routing flow
Flavio Castrod8f8af22015-12-02 18:19:26 -0500318 dst_ip = dip + (vlan_id<<8)
Flavio Castro6efe1862015-11-18 16:28:06 -0500319 add_unicast_routing_flow(self.controller, 0x0800, dst_ip, 0, l3_msg.group_id)
Flavio Castro6efe1862015-11-18 16:28:06 -0500320 #add entries in the Bridging table to avoid packet-in from mac learning
321 group_id = encode_l2_interface_group_id(vlan_id, port)
322 add_bridge_flow(self.controller, dst_mac, vlan_id, group_id, True)
Flavio Castrod8f8af22015-12-02 18:19:26 -0500323
324 do_barrier(self.controller)
325
Flavio Castro05d20bc2015-11-16 15:06:14 -0500326 switch_mac = ':'.join(['%02X' % x for x in intf_src_mac])
Flavio Castroa8233862015-12-02 14:41:11 -0500327 for in_port in ports:
328 mac_src='00:00:00:22:22:%02X' % in_port
329 ip_src='192.168.%02d.1' % in_port
330 for out_port in ports:
331 if in_port == out_port:
332 continue
333 ip_dst='192.168.%02d.1' % out_port
334 parsed_pkt = simple_tcp_packet(pktlen=100, dl_vlan_enable=True, vlan_vid=in_port,
335 eth_dst=switch_mac, eth_src=mac_src, ip_ttl=64, ip_src=ip_src,
Flavio Castrod8f8af22015-12-02 18:19:26 -0500336 ip_dst=ip_dst)
Flavio Castroa8233862015-12-02 14:41:11 -0500337 pkt=str(parsed_pkt)
338 self.dataplane.send(in_port, pkt)
Flavio Castro72a45d52015-12-02 16:37:05 -0500339 #build expected packet
Flavio Castroa8233862015-12-02 14:41:11 -0500340 mac_dst='00:00:00:22:22:%02X' % out_port
Flavio Castrod8f8af22015-12-02 18:19:26 -0500341 exp_pkt = simple_tcp_packet(pktlen=100, dl_vlan_enable=True, vlan_vid=out_port,
Flavio Castroa8233862015-12-02 14:41:11 -0500342 eth_dst=mac_dst, eth_src=switch_mac, ip_ttl=63,
343 ip_src=ip_src, ip_dst=ip_dst)
344 pkt=str(exp_pkt)
345 verify_packet(self, pkt, out_port)
346 verify_no_other_packets(self)
Flavio Castro05d20bc2015-11-16 15:06:14 -0500347
Flavio Castrod8f8af22015-12-02 18:19:26 -0500348class L3VPNMPLS(base_tests.SimpleDataPlane):
349 """
350 Insert IP packet
351 Receive MPLS packet
352 """
Flavio Castro72a45d52015-12-02 16:37:05 -0500353 def runTest(self):
354 delete_all_flows(self.controller)
355 delete_all_groups(self.controller)
356
357 if len(config["port_map"]) <2:
358 logging.info("Port count less than 2, can't run this case")
359 return
360
361 intf_src_mac=[0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc]
362 dst_mac=[0x00, 0x00, 0x00, 0x22, 0x22, 0x00]
363 dip=0xc0a80001
364 index=1
365 ports = config["port_map"].keys()
366 for port in ports:
367 #add l2 interface group
368 vlan_id=port
369 l2_gid, l2_msg = add_one_l2_interface_grouop(self.controller, port, vlan_id, True, False)
370 dst_mac[5]=vlan_id
Flavio Castro35e64392015-12-02 16:53:14 -0500371 #add MPLS interface group
Flavio Castro72a45d52015-12-02 16:37:05 -0500372 mpls_gid, mpls_msg = add_mpls_intf_group(self.controller, l2_gid, dst_mac, intf_src_mac, vlan_id, port)
Flavio Castro35e64392015-12-02 16:53:14 -0500373 #add MPLS L3 VPN group
Flavio Castrod8f8af22015-12-02 18:19:26 -0500374 mpls_label_gid, mpls_label_msg = add_mpls_label_group(self.controller, subtype=OFDPA_MPLS_GROUP_SUBTYPE_L3_VPN_LABEL,
Flavio Castro72a45d52015-12-02 16:37:05 -0500375 index=port, ref_gid= mpls_gid, push_mpls_header=True, set_mpls_label=port, set_bos=1, set_ttl=32)
376 #add vlan flow table
377 add_one_vlan_table_flow(self.controller, port, vlan_id, flag=VLAN_TABLE_FLAG_ONLY_BOTH)
378 #add termination flow
379 add_termination_flow(self.controller, port, 0x0800, intf_src_mac, vlan_id)
Flavio Castro35e64392015-12-02 16:53:14 -0500380 #add routing flow
Flavio Castro72a45d52015-12-02 16:37:05 -0500381 dst_ip = dip + (vlan_id<<8)
382 add_unicast_routing_flow(self.controller, 0x0800, dst_ip, 0, mpls_label_gid)
Flavio Castro72a45d52015-12-02 16:37:05 -0500383 #add entries in the Bridging table to avoid packet-in from mac learning
384 group_id = encode_l2_interface_group_id(vlan_id, port)
385 add_bridge_flow(self.controller, dst_mac, vlan_id, group_id, True)
386
387 do_barrier(self.controller)
388
389 switch_mac = ':'.join(['%02X' % x for x in intf_src_mac])
390 for in_port in ports:
391 mac_src='00:00:00:22:22:%02X' % in_port
392 ip_src='192.168.%02d.1' % in_port
393 for out_port in ports:
394 if in_port == out_port:
395 continue
396 ip_dst='192.168.%02d.1' % out_port
397 parsed_pkt = simple_tcp_packet(pktlen=100, dl_vlan_enable=True, vlan_vid=in_port,
398 eth_dst=switch_mac, eth_src=mac_src, ip_ttl=64, ip_src=ip_src,
399 ip_dst=ip_dst)
400 pkt=str(parsed_pkt)
401 self.dataplane.send(in_port, pkt)
402 #build expect packet
403 mac_dst='00:00:00:22:22:%02X' % out_port
404 label = (out_port, 0, 1, 32)
Flavio Castrod8f8af22015-12-02 18:19:26 -0500405 exp_pkt = mpls_packet(dl_vlan_enable=True, vlan_vid=out_port, ip_ttl=64, ip_src=ip_src,
Flavio Castro72a45d52015-12-02 16:37:05 -0500406 ip_dst=ip_dst, eth_dst=mac_dst, eth_src=switch_mac, label=[label])
407 pkt=str(exp_pkt)
408 verify_packet(self, pkt, out_port)
409 verify_no_other_packets(self)
Flavio Castrod8f8af22015-12-02 18:19:26 -0500410
411class MplsTermination(base_tests.SimpleDataPlane):
412 '''
413 Insert IP packet
414 Receive MPLS packet
415 '''
416 def runTest(self):
417 delete_all_flows(self.controller)
418 delete_all_groups(self.controller)
419
420 if len(config["port_map"]) <2:
421 logging.info("Port count less than 2, can't run this case")
422 return
423
424 intf_src_mac=[0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc]
425 dst_mac=[0x00, 0x00, 0x00, 0x22, 0x22, 0x00]
426 dip=0xc0a80001
427 index=1
428 ports = config["port_map"].keys()
429 for port in ports:
430 #add l2 interface group
431 vlan_id=port
432 l2_gid, l2_msg = add_one_l2_interface_grouop(self.controller, port, vlan_id, True, False)
433 dst_mac[5]=vlan_id
434 #add L3 Unicast group
435 l3_msg=add_l3_unicast_group(self.controller, port, vlanid=vlan_id, id=vlan_id, src_mac=intf_src_mac, dst_mac=dst_mac)
Flavio Castro167f5bd2015-12-02 19:33:53 -0500436 #add L3 ecmp group
437 ecmp_msg = add_l3_ecmp_group(self.controller, port, [l3_msg.group_id])
Flavio Castrod8f8af22015-12-02 18:19:26 -0500438 #add vlan flow table
439 add_one_vlan_table_flow(self.controller, port, vlan_id, flag=VLAN_TABLE_FLAG_ONLY_BOTH)
440 #add termination flow
Flavio Castro167f5bd2015-12-02 19:33:53 -0500441 add_termination_flow(self.controller, port, 0x8847, intf_src_mac, vlan_id, goto_table=24)
Flavio Castrod8f8af22015-12-02 18:19:26 -0500442 #add routing flow
443 dst_ip = dip + (vlan_id<<8)
Flavio Castro167f5bd2015-12-02 19:33:53 -0500444 add_mpls_flow(self.controller, ecmp_msg.group_id, port)
Flavio Castrod8f8af22015-12-02 18:19:26 -0500445 #add entries in the Bridging table to avoid packet-in from mac learning
446 group_id = encode_l2_interface_group_id(vlan_id, port)
447 add_bridge_flow(self.controller, dst_mac, vlan_id, group_id, True)
448
449 do_barrier(self.controller)
450
451 switch_mac = ':'.join(['%02X' % x for x in intf_src_mac])
452 for in_port in ports:
453 mac_src='00:00:00:22:22:%02X' % in_port
454 ip_src='192.168.%02d.1' % in_port
455 for out_port in ports:
456 if in_port == out_port:
457 continue
458 ip_dst='192.168.%02d.1' % out_port
Flavio Castro167f5bd2015-12-02 19:33:53 -0500459
460 label = (out_port, 0, 1, 32)
461 parsed_pkt = mpls_packet(pktlen=104, dl_vlan_enable=True, vlan_vid=in_port, ip_src=ip_src,
462 ip_dst=ip_dst, eth_dst=switch_mac, eth_src=mac_src, label=[label])
Flavio Castrod8f8af22015-12-02 18:19:26 -0500463 pkt=str(parsed_pkt)
464 self.dataplane.send(in_port, pkt)
Flavio Castro167f5bd2015-12-02 19:33:53 -0500465
Flavio Castrod8f8af22015-12-02 18:19:26 -0500466 #build expect packet
467 mac_dst='00:00:00:22:22:%02X' % out_port
Flavio Castro167f5bd2015-12-02 19:33:53 -0500468 exp_pkt = simple_tcp_packet(pktlen=100, dl_vlan_enable=True, vlan_vid=out_port,
469 eth_dst=mac_dst, eth_src=switch_mac, ip_ttl=31, ip_src=ip_src, ip_dst=ip_dst)
Flavio Castrod8f8af22015-12-02 18:19:26 -0500470 pkt=str(exp_pkt)
471 verify_packet(self, pkt, out_port)
Flavio Castro167f5bd2015-12-02 19:33:53 -0500472 verify_no_other_packets(self)
473