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