backing up
[vsorcdistro/.git] / ryu / build / lib.linux-armv7l-2.7 / ryu / tests / switch / of13 / match / 06_VLAN_VID_Mask.json
1 [
2     "match: 06_VLAN_VID (Mask)",
3     {
4         "description":"ethernet/vlan(vid=100)/ipv4/tcp-->'vlan_vid=96(mask=0xf0),actions=output:2'",
5         "prerequisite":[
6             {
7                 "OFPFlowMod":{
8                     "table_id":0,
9                     "match":{
10                         "OFPMatch":{
11                             "oxm_fields":[
12                                 {
13                                     "OXMTlv":{
14                                         "field":"vlan_vid",
15                                         "mask":240,
16                                         "value":96
17                                     }
18                                 }
19                             ]
20                         }
21                     },
22                     "instructions":[
23                         {
24                             "OFPInstructionActions":{
25                                 "actions":[
26                                     {
27                                         "OFPActionOutput":{
28                                             "port":2
29                                         }
30                                     }
31                                 ],
32                                 "type":4
33                             }
34                         }
35                     ]
36                 }
37             }
38         ],
39         "tests":[
40             {
41                 "ingress":[
42                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
43                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
44                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
45                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
46                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
47                 ],
48                 "egress":[
49                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
50                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
51                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
52                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
53                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
54                 ]
55             }
56         ]
57     },
58     {
59         "description":"ethernet/vlan(vid=100)/ipv4/tcp-->'vlan_vid=96(mask=0xf0),actions=output:CONTROLLER'",
60         "prerequisite":[
61             {
62                 "OFPFlowMod":{
63                     "table_id":0,
64                     "match":{
65                         "OFPMatch":{
66                             "oxm_fields":[
67                                 {
68                                     "OXMTlv":{
69                                         "field":"vlan_vid",
70                                         "mask":240,
71                                         "value":96
72                                     }
73                                 }
74                             ]
75                         }
76                     },
77                     "instructions":[
78                         {
79                             "OFPInstructionActions":{
80                                 "actions":[
81                                     {
82                                         "OFPActionOutput":{
83                                             "max_len":65535,
84                                             "port":4294967293
85                                         }
86                                     }
87                                 ],
88                                 "type":4
89                             }
90                         }
91                     ]
92                 }
93             }
94         ],
95         "tests":[
96             {
97                 "ingress":[
98                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
99                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
100                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
101                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
102                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
103                 ],
104                 "PACKET_IN":[
105                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
106                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
107                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
108                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
109                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
110                 ]
111             }
112         ]
113     },
114     {
115         "description":"ethernet/vlan(vid=203)/ipv4/tcp-->'vlan_vid=96(mask=0xf0),actions=output:2'",
116         "prerequisite":[
117             {
118                 "OFPFlowMod":{
119                     "table_id":0,
120                     "match":{
121                         "OFPMatch":{
122                             "oxm_fields":[
123                                 {
124                                     "OXMTlv":{
125                                         "field":"vlan_vid",
126                                         "mask":240,
127                                         "value":96
128                                     }
129                                 }
130                             ]
131                         }
132                     },
133                     "instructions":[
134                         {
135                             "OFPInstructionActions":{
136                                 "actions":[
137                                     {
138                                         "OFPActionOutput":{
139                                             "port":2
140                                         }
141                                     }
142                                 ],
143                                 "type":4
144                             }
145                         }
146                     ]
147                 }
148             }
149         ],
150         "tests":[
151             {
152                 "ingress":[
153                     "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)",
154                     "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)",
155                     "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)",
156                     "tcp(dst_port=6789, option=bytes(b'\\x01' * 4), src_port=12345)",
157                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
158                 ],
159                 "table-miss":[
160                     0
161                 ]
162             }
163         ]
164     },
165     {
166         "description":"ethernet/vlan(vid=100)/ipv6/tcp-->'vlan_vid=96(mask=0xf0),actions=output:2'",
167         "prerequisite":[
168             {
169                 "OFPFlowMod":{
170                     "table_id":0,
171                     "match":{
172                         "OFPMatch":{
173                             "oxm_fields":[
174                                 {
175                                     "OXMTlv":{
176                                         "field":"vlan_vid",
177                                         "mask":240,
178                                         "value":96
179                                     }
180                                 }
181                             ]
182                         }
183                     },
184                     "instructions":[
185                         {
186                             "OFPInstructionActions":{
187                                 "actions":[
188                                     {
189                                         "OFPActionOutput":{
190                                             "port":2
191                                         }
192                                     }
193                                 ],
194                                 "type":4
195                             }
196                         }
197                     ]
198                 }
199             }
200         ],
201         "tests":[
202             {
203                 "ingress":[
204                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
205                     "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
206                     "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
207                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
208                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
209                 ],
210                 "egress":[
211                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
212                     "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
213                     "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
214                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
215                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
216                 ]
217             }
218         ]
219     },
220     {
221         "description":"ethernet/vlan(vid=100)/ipv6/tcp-->'vlan_vid=96(mask=0xf0),actions=output:CONTROLLER'",
222         "prerequisite":[
223             {
224                 "OFPFlowMod":{
225                     "table_id":0,
226                     "match":{
227                         "OFPMatch":{
228                             "oxm_fields":[
229                                 {
230                                     "OXMTlv":{
231                                         "field":"vlan_vid",
232                                         "mask":240,
233                                         "value":96
234                                     }
235                                 }
236                             ]
237                         }
238                     },
239                     "instructions":[
240                         {
241                             "OFPInstructionActions":{
242                                 "actions":[
243                                     {
244                                         "OFPActionOutput":{
245                                             "max_len":65535,
246                                             "port":4294967293
247                                         }
248                                     }
249                                 ],
250                                 "type":4
251                             }
252                         }
253                     ]
254                 }
255             }
256         ],
257         "tests":[
258             {
259                 "ingress":[
260                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
261                     "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
262                     "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
263                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
264                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
265                 ],
266                 "PACKET_IN":[
267                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
268                     "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
269                     "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
270                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
271                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
272                 ]
273             }
274         ]
275     },
276     {
277         "description":"ethernet/vlan(vid=203)/ipv6/tcp-->'vlan_vid=96(mask=0xf0),actions=output:2'",
278         "prerequisite":[
279             {
280                 "OFPFlowMod":{
281                     "table_id":0,
282                     "match":{
283                         "OFPMatch":{
284                             "oxm_fields":[
285                                 {
286                                     "OXMTlv":{
287                                         "field":"vlan_vid",
288                                         "mask":240,
289                                         "value":96
290                                     }
291                                 }
292                             ]
293                         }
294                     },
295                     "instructions":[
296                         {
297                             "OFPInstructionActions":{
298                                 "actions":[
299                                     {
300                                         "OFPActionOutput":{
301                                             "port":2
302                                         }
303                                     }
304                                 ],
305                                 "type":4
306                             }
307                         }
308                     ]
309                 }
310             }
311         ],
312         "tests":[
313             {
314                 "ingress":[
315                     "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)",
316                     "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)",
317                     "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)",
318                     "tcp(dst_port=6789, option=bytes(b'\\x01' * 4), src_port=12345)",
319                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
320                 ],
321                 "table-miss":[
322                     0
323                 ]
324             }
325         ]
326     },
327     {
328         "description":"ethernet/vlan(vid=100)/arp-->'vlan_vid=96(mask=0xf0),actions=output:2'",
329         "prerequisite":[
330             {
331                 "OFPFlowMod":{
332                     "table_id":0,
333                     "match":{
334                         "OFPMatch":{
335                             "oxm_fields":[
336                                 {
337                                     "OXMTlv":{
338                                         "field":"vlan_vid",
339                                         "mask":240,
340                                         "value":96
341                                     }
342                                 }
343                             ]
344                         }
345                     },
346                     "instructions":[
347                         {
348                             "OFPInstructionActions":{
349                                 "actions":[
350                                     {
351                                         "OFPActionOutput":{
352                                             "port":2
353                                         }
354                                     }
355                                 ],
356                                 "type":4
357                             }
358                         }
359                     ]
360                 }
361             }
362         ],
363         "tests":[
364             {
365                 "ingress":[
366                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
367                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
368                     "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='12:11:11:11:11:11')",
369                     "bytes(b'\\x00' * 30)"
370                 ],
371                 "egress":[
372                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
373                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
374                     "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='12:11:11:11:11:11')",
375                     "bytes(b'\\x00' * 30)"
376                 ]
377             }
378         ]
379     },
380     {
381         "description":"ethernet/vlan(vid=100)/arp-->'vlan_vid=96(mask=0xf0),actions=output:CONTROLLER'",
382         "prerequisite":[
383             {
384                 "OFPFlowMod":{
385                     "table_id":0,
386                     "match":{
387                         "OFPMatch":{
388                             "oxm_fields":[
389                                 {
390                                     "OXMTlv":{
391                                         "field":"vlan_vid",
392                                         "mask":240,
393                                         "value":96
394                                     }
395                                 }
396                             ]
397                         }
398                     },
399                     "instructions":[
400                         {
401                             "OFPInstructionActions":{
402                                 "actions":[
403                                     {
404                                         "OFPActionOutput":{
405                                             "max_len":65535,
406                                             "port":4294967293
407                                         }
408                                     }
409                                 ],
410                                 "type":4
411                             }
412                         }
413                     ]
414                 }
415             }
416         ],
417         "tests":[
418             {
419                 "ingress":[
420                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
421                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
422                     "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='12:11:11:11:11:11')",
423                     "bytes(b'\\x00' * 30)"
424                 ],
425                 "PACKET_IN":[
426                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
427                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
428                     "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='12:11:11:11:11:11')",
429                     "bytes(b'\\x00' * 30)"
430                 ]
431             }
432         ]
433     },
434     {
435         "description":"ethernet/vlan(vid=203)/arp-->'vlan_vid=96(mask=0xf0),actions=output:2'",
436         "prerequisite":[
437             {
438                 "OFPFlowMod":{
439                     "table_id":0,
440                     "match":{
441                         "OFPMatch":{
442                             "oxm_fields":[
443                                 {
444                                     "OXMTlv":{
445                                         "field":"vlan_vid",
446                                         "mask":240,
447                                         "value":96
448                                     }
449                                 }
450                             ]
451                         }
452                     },
453                     "instructions":[
454                         {
455                             "OFPInstructionActions":{
456                                 "actions":[
457                                     {
458                                         "OFPActionOutput":{
459                                             "port":2
460                                         }
461                                     }
462                                 ],
463                                 "type":4
464                             }
465                         }
466                     ]
467                 }
468             }
469         ],
470         "tests":[
471             {
472                 "ingress":[
473                     "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)",
474                     "vlan(pcp=5, cfi=0, vid=203, ethertype=2054)",
475                     "arp(dst_ip='10.10.20.20',dst_mac='ba:bb:bb:bb:bb:bb', opcode=2, src_ip='10.10.10.10',src_mac='aa:aa:aa:aa:aa:aa')",
476                     "bytes(b'\\x00' * 30)"
477                 ],
478                 "table-miss":[
479                     0
480                 ]
481             }
482         ]
483     }
484 ]