diff options
author | Yuichi Ito <ito.yuichi0@gmail.com> | 2014-06-23 14:46:20 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-06-23 17:10:25 +0900 |
commit | 1319010d817c09768a9325b9984ca972ff5c164d (patch) | |
tree | 6207a56e3de5b2fd6d0c4bc31f8ef6df253df82a | |
parent | f333b94368c65c2371cec7883622936c5b74ccc8 (diff) |
sw test tool: Add default test files (of14: match)
These test files aim to examine 'match' of FlowMod message.
This patch only copies ryu/tests/switch/of13/match.
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
64 files changed, 53458 insertions, 0 deletions
diff --git a/ryu/tests/switch/of14/match/00_IN_PORT.json b/ryu/tests/switch/of14/match/00_IN_PORT.json new file mode 100644 index 00000000..8a45adb5 --- /dev/null +++ b/ryu/tests/switch/of14/match/00_IN_PORT.json @@ -0,0 +1,460 @@ +[ + "match: 00_IN_PORT", + { + "description":"ethernet/ipv4/tcp-->'in_port=1,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4/tcp-->'in_port=1,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4/tcp-->'in_port=2,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":2 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp-->'in_port=1,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp-->'in_port=1,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp-->'in_port=2,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":2 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/arp-->'in_port=1,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp-->'in_port=1,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp-->'in_port=2,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":2 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 0 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/02_METADATA.json b/ryu/tests/switch/of14/match/02_METADATA.json new file mode 100644 index 00000000..41664639 --- /dev/null +++ b/ryu/tests/switch/of14/match/02_METADATA.json @@ -0,0 +1,667 @@ +[ + "match: 02_METADATA", + { + "description":"ethernet/ipv4/tcp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=255,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[] + } + }, + "instructions":[ + { + "OFPInstructionWriteMetadata":{ + "metadata":255, + "metadata_mask":4294967295 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"metadata", + "value":255 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4/tcp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=255,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[] + } + }, + "instructions":[ + { + "OFPInstructionWriteMetadata":{ + "metadata":255, + "metadata_mask":4294967295 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"metadata", + "value":255 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4/tcp-->'actions=write_metadata:155/0xffffffff,goto_table:1','table_id:1,metadata=255,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[] + } + }, + "instructions":[ + { + "OFPInstructionWriteMetadata":{ + "metadata":155, + "metadata_mask":4294967295 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"metadata", + "value":255 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=255,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[] + } + }, + "instructions":[ + { + "OFPInstructionWriteMetadata":{ + "metadata":255, + "metadata_mask":4294967295 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"metadata", + "value":255 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id=1,metadata=255,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[] + } + }, + "instructions":[ + { + "OFPInstructionWriteMetadata":{ + "metadata":255, + "metadata_mask":4294967295 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"metadata", + "value":255 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp-->'actions=write_metadata:155/0xffffffff,goto_table:1','table_id:1,metadata=255,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[] + } + }, + "instructions":[ + { + "OFPInstructionWriteMetadata":{ + "metadata":155, + "metadata_mask":4294967295 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"metadata", + "value":255 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/arp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=255,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[] + } + }, + "instructions":[ + { + "OFPInstructionWriteMetadata":{ + "metadata":255, + "metadata_mask":4294967295 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"metadata", + "value":255 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=255,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[] + } + }, + "instructions":[ + { + "OFPInstructionWriteMetadata":{ + "metadata":255, + "metadata_mask":4294967295 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"metadata", + "value":255 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp-->'actions=write_metadata:155/0xffffffff,goto_table:1','table_id:1,metadata=255,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[] + } + }, + "instructions":[ + { + "OFPInstructionWriteMetadata":{ + "metadata":155, + "metadata_mask":4294967295 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"metadata", + "value":255 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/02_METADATA_Mask.json b/ryu/tests/switch/of14/match/02_METADATA_Mask.json new file mode 100644 index 00000000..c6c5570e --- /dev/null +++ b/ryu/tests/switch/of14/match/02_METADATA_Mask.json @@ -0,0 +1,676 @@ +[ + "match: 02_METADATA (Mask)", + { + "description":"ethernet/ipv4/tcp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=240(mask=0xfffffff0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[] + } + }, + "instructions":[ + { + "OFPInstructionWriteMetadata":{ + "metadata":255, + "metadata_mask":4294967295 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"metadata", + "mask":4294967280, + "value":240 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4/tcp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=240(mask=0xfffffff0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[] + } + }, + "instructions":[ + { + "OFPInstructionWriteMetadata":{ + "metadata":255, + "metadata_mask":4294967295 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"metadata", + "mask":4294967280, + "value":240 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4/tcp-->'actions=write_metadata:155/0xffffffff,goto_table:1','table_id:1,metadata=240(mask=0xfffffff0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[] + } + }, + "instructions":[ + { + "OFPInstructionWriteMetadata":{ + "metadata":155, + "metadata_mask":4294967295 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"metadata", + "mask":4294967280, + "value":240 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=240(mask=0xfffffff0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[] + } + }, + "instructions":[ + { + "OFPInstructionWriteMetadata":{ + "metadata":255, + "metadata_mask":4294967295 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"metadata", + "mask":4294967280, + "value":240 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=240(mask=0xfffffff0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[] + } + }, + "instructions":[ + { + "OFPInstructionWriteMetadata":{ + "metadata":255, + "metadata_mask":4294967295 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"metadata", + "mask":4294967280, + "value":240 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp-->'actions=write_metadata:155/0xffffffff,goto_table:1','table_id:1,metadata=240(mask=0xfffffff0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[] + } + }, + "instructions":[ + { + "OFPInstructionWriteMetadata":{ + "metadata":155, + "metadata_mask":4294967295 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"metadata", + "mask":4294967280, + "value":240 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/arp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=240(mask=0xfffffff0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[] + } + }, + "instructions":[ + { + "OFPInstructionWriteMetadata":{ + "metadata":255, + "metadata_mask":4294967295 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"metadata", + "mask":4294967280, + "value":240 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=240(mask=0xfffffff0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[] + } + }, + "instructions":[ + { + "OFPInstructionWriteMetadata":{ + "metadata":255, + "metadata_mask":4294967295 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"metadata", + "mask":4294967280, + "value":240 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp-->'actions=write_metadata:155/0xffffffff,goto_table:1','table_id:1,metadata=240(mask=0xfffffff0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[] + } + }, + "instructions":[ + { + "OFPInstructionWriteMetadata":{ + "metadata":155, + "metadata_mask":4294967295 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"metadata", + "mask":4294967280, + "value":240 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/03_ETH_DST.json b/ryu/tests/switch/of14/match/03_ETH_DST.json new file mode 100644 index 00000000..c32bf41a --- /dev/null +++ b/ryu/tests/switch/of14/match/03_ETH_DST.json @@ -0,0 +1,460 @@ +[ + "match: 03_ETH_DST", + { + "description":"ethernet(dst='22:22:22:22:22:22')/ipv4/tcp-->'eth_dst=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_dst", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet(dst='22:22:22:22:22:22')/ipv4/tcp-->'eth_dst=22:22:22:22:22:22,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_dst", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet(dst='ba:bb:bb:bb:bb:bb')/ipv4/tcp-->'eth_dst=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_dst", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet(dst='22:22:22:22:22:22')/ipv6/tcp-->'eth_dst=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_dst", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet(dst='22:22:22:22:22:22')/ipv6/tcp-->'eth_dst=22:22:22:22:22:22,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_dst", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet(dst='ba:bb:bb:bb:bb:bb')/ipv6/tcp-->'eth_dst=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_dst", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet(dst='22:22:22:22:22:22')/arp-->'eth_dst=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_dst", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet(dst='22:22:22:22:22:22')/arp-->'eth_dst=22:22:22:22:22:22,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_dst", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet(dst='ba:bb:bb:bb:bb:bb')/arp-->'eth_dst=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_dst", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 0 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/03_ETH_DST_Mask.json b/ryu/tests/switch/of14/match/03_ETH_DST_Mask.json new file mode 100644 index 00000000..075c733d --- /dev/null +++ b/ryu/tests/switch/of14/match/03_ETH_DST_Mask.json @@ -0,0 +1,469 @@ +[ + "match: 03_ETH_DST (Mask)", + { + "description":"ethernet(dst='22:22:22:22:22:22')/ipv4/tcp-->'eth_dst=22:22:22:22:22:00(mask=ff:ff:ff:ff:ff:00),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_dst", + "mask":"ff:ff:ff:ff:ff:00", + "value":"22:22:22:22:22:00" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet(dst='22:22:22:22:22:22')/ipv4/tcp-->'eth_dst=22:22:22:22:22:00(mask=ff:ff:ff:ff:ff:00),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_dst", + "mask":"ff:ff:ff:ff:ff:00", + "value":"22:22:22:22:22:00" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet(dst='ba:bb:bb:bb:bb:bb')/ipv4/tcp-->'eth_dst=22:22:22:22:22:00(mask=ff:ff:ff:ff:ff:00),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_dst", + "mask":"ff:ff:ff:ff:ff:00", + "value":"22:22:22:22:22:00" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet(dst='22:22:22:22:22:22')/ipv6/tcp-->'eth_dst=22:22:22:22:22:00(mask=ff:ff:ff:ff:ff:00),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_dst", + "mask":"ff:ff:ff:ff:ff:00", + "value":"22:22:22:22:22:00" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet(dst='22:22:22:22:22:22')/ipv6/tcp-->'eth_dst=22:22:22:22:22:00(mask=ff:ff:ff:ff:ff:00),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_dst", + "mask":"ff:ff:ff:ff:ff:00", + "value":"22:22:22:22:22:00" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet(dst='ba:bb:bb:bb:bb:bb')/ipv6/tcp-->'eth_dst=22:22:22:22:22:00(mask=ff:ff:ff:ff:ff:00),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_dst", + "mask":"ff:ff:ff:ff:ff:00", + "value":"22:22:22:22:22:00" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet(dst='22:22:22:22:22:22')/arp-->'eth_dst=22:22:22:22:22:00(mask=ff:ff:ff:ff:ff:00),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_dst", + "mask":"ff:ff:ff:ff:ff:00", + "value":"22:22:22:22:22:00" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet(dst='22:22:22:22:22:22')/arp-->'eth_dst=22:22:22:22:22:00(mask=ff:ff:ff:ff:ff:00),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_dst", + "mask":"ff:ff:ff:ff:ff:00", + "value":"22:22:22:22:22:00" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet(dst='ba:bb:bb:bb:bb:bb')/arp-->'eth_dst=22:22:22:22:22:00(mask=ff:ff:ff:ff:ff:00),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_dst", + "mask":"ff:ff:ff:ff:ff:00", + "value":"22:22:22:22:22:00" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 0 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/04_ETH_SRC.json b/ryu/tests/switch/of14/match/04_ETH_SRC.json new file mode 100644 index 00000000..7029f589 --- /dev/null +++ b/ryu/tests/switch/of14/match/04_ETH_SRC.json @@ -0,0 +1,460 @@ +[ + "match: 04_ETH_SRC", + { + "description":"ethernet(src='12:11:11:11:11:11')/ipv4/tcp-->'eth_src=12:11:11:11:11:11,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_src", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet(src='12:11:11:11:11:11')/ipv4/tcp-->'eth_src=12:11:11:11:11:11,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_src", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet(src='aa:aa:aa:aa:aa:aa')/ipv4/tcp-->'eth_src=12:11:11:11:11:11,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_src", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet(src='12:11:11:11:11:11')/ipv6/tcp-->'eth_src=12:11:11:11:11:11,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_src", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet(src='12:11:11:11:11:11')/ipv6/tcp-->'eth_src=12:11:11:11:11:11,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_src", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet(src='aa:aa:aa:aa:aa:aa')/ipv6/tcp-->'eth_src=12:11:11:11:11:11,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_src", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet(src='12:11:11:11:11:11')/arp-->'eth_src=12:11:11:11:11:11,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_src", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet(src='12:11:11:11:11:11')/arp-->'eth_src=12:11:11:11:11:11,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_src", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet(src='aa:aa:aa:aa:aa:aa')/arp-->'eth_src=12:11:11:11:11:11,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_src", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 0 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/04_ETH_SRC_Mask.json b/ryu/tests/switch/of14/match/04_ETH_SRC_Mask.json new file mode 100644 index 00000000..8794aa09 --- /dev/null +++ b/ryu/tests/switch/of14/match/04_ETH_SRC_Mask.json @@ -0,0 +1,469 @@ +[ + "match: 04_ETH_SRC (Mask)", + { + "description":"ethernet(src='12:11:11:11:11:11')/ipv4/tcp-->'eth_src=00:11:11:11:11:11(mask=00:ff:ff:ff:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_src", + "mask":"00:ff:ff:ff:ff:ff", + "value":"00:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet(src='12:11:11:11:11:11')/ipv4/tcp-->'eth_src=00:11:11:11:11:11(mask=00:ff:ff:ff:ff:ff),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_src", + "mask":"00:ff:ff:ff:ff:ff", + "value":"00:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet(src='aa:aa:aa:aa:aa:aa')/ipv4/tcp-->'eth_src=00:11:11:11:11:11(mask=00:ff:ff:ff:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_src", + "mask":"00:ff:ff:ff:ff:ff", + "value":"00:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet(src='12:11:11:11:11:11')/ipv6/tcp-->'eth_src=00:11:11:11:11:11(mask=00:ff:ff:ff:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_src", + "mask":"00:ff:ff:ff:ff:ff", + "value":"00:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet(src='12:11:11:11:11:11')/ipv6/tcp-->'eth_src=00:11:11:11:11:11(mask=00:ff:ff:ff:ff:ff),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_src", + "mask":"00:ff:ff:ff:ff:ff", + "value":"00:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet(src='aa:aa:aa:aa:aa:aa')/ipv6/tcp-->'eth_src=00:11:11:11:11:11(mask=00:ff:ff:ff:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_src", + "mask":"00:ff:ff:ff:ff:ff", + "value":"00:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet(src='12:11:11:11:11:11')/arp-->'eth_src=00:11:11:11:11:11(mask=00:ff:ff:ff:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_src", + "mask":"00:ff:ff:ff:ff:ff", + "value":"00:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet(src='12:11:11:11:11:11')/arp-->'eth_src=00:11:11:11:11:11(mask=00:ff:ff:ff:ff:ff),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_src", + "mask":"00:ff:ff:ff:ff:ff", + "value":"00:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet(src='aa:aa:aa:aa:aa:aa')/arp-->'eth_src=00:11:11:11:11:11(mask=00:ff:ff:ff:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_src", + "mask":"00:ff:ff:ff:ff:ff", + "value":"00:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 0 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/05_ETH_TYPE.json b/ryu/tests/switch/of14/match/05_ETH_TYPE.json new file mode 100644 index 00000000..8b4249a9 --- /dev/null +++ b/ryu/tests/switch/of14/match/05_ETH_TYPE.json @@ -0,0 +1,460 @@ +[ + "match: 05_ETH_TYPE", + { + "description":"ethernet(ethertype=0x0800)/ipv4/tcp-->'eth_type=0x0800,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet(ethertype=0x0800)/ipv4/tcp-->'eth_type=0x0800,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet(ethertype=0x0800)/ipv4/tcp-->'eth_type=0x0806,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet(ethertype=0x86dd)/ipv6/tcp-->'eth_type=0x86dd,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet(ethertype=0x86dd)/ipv6/tcp-->'eth_type=0x86dd,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet(ethertype=0x86dd)/ipv6/tcp-->'eth_type=0x0806,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet(ethertype=0x0806)/arp-->'eth_type=0x0806,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet(ethertype=0x0806)/arp-->'eth_type=0x0806,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet(ethertype=0x0806)/arp-->'eth_type=0x0800,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 0 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/06_VLAN_VID.json b/ryu/tests/switch/of14/match/06_VLAN_VID.json new file mode 100644 index 00000000..1181768a --- /dev/null +++ b/ryu/tests/switch/of14/match/06_VLAN_VID.json @@ -0,0 +1,475 @@ +[ + "match: 06_VLAN_VID", + { + "description":"ethernet/vlan(vid=100)/ipv4/tcp-->'vlan_vid=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "value":4196 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan(vid=100)/ipv4/tcp-->'vlan_vid=100,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "value":4196 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan(vid=203)/ipv4/tcp-->'vlan_vid=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "value":4196 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan(vid=100)/ipv6/tcp-->'vlan_vid=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "value":4196 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan(vid=100)/ipv6/tcp-->'vlan_vid=100,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "value":4196 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan(vid=203)/ipv6/tcp-->'vlan_vid=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "value":4196 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan(vid=100)/arp-->'vlan_vid=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "value":4196 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan(vid=100)/arp-->'vlan_vid=100,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "value":4196 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan(vid=203)/arp-->'vlan_vid=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "value":4196 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "table-miss":[ + 0 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/06_VLAN_VID_Mask.json b/ryu/tests/switch/of14/match/06_VLAN_VID_Mask.json new file mode 100644 index 00000000..6df10c7e --- /dev/null +++ b/ryu/tests/switch/of14/match/06_VLAN_VID_Mask.json @@ -0,0 +1,484 @@ +[ + "match: 06_VLAN_VID (Mask)", + { + "description":"ethernet/vlan(vid=100)/ipv4/tcp-->'vlan_vid=96(mask=0xf0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "mask":240, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan(vid=100)/ipv4/tcp-->'vlan_vid=96(mask=0xf0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "mask":240, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan(vid=203)/ipv4/tcp-->'vlan_vid=96(mask=0xf0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "mask":240, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan(vid=100)/ipv6/tcp-->'vlan_vid=96(mask=0xf0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "mask":240, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan(vid=100)/ipv6/tcp-->'vlan_vid=96(mask=0xf0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "mask":240, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan(vid=203)/ipv6/tcp-->'vlan_vid=96(mask=0xf0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "mask":240, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan(vid=100)/arp-->'vlan_vid=96(mask=0xf0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "mask":240, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan(vid=100)/arp-->'vlan_vid=96(mask=0xf0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "mask":240, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan(vid=203)/arp-->'vlan_vid=96(mask=0xf0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "mask":240, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "table-miss":[ + 0 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/07_VLAN_PCP.json b/ryu/tests/switch/of14/match/07_VLAN_PCP.json new file mode 100644 index 00000000..498ce890 --- /dev/null +++ b/ryu/tests/switch/of14/match/07_VLAN_PCP.json @@ -0,0 +1,538 @@ +[ + "match: 07_VLAN_PCP", + { + "description":"ethernet/vlan(pcp=3)/ipv4/tcp-->'vlan_pcp=3,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "mask":null, + "value":4196 + } + }, + { + "OXMTlv":{ + "field":"vlan_pcp", + "value":3 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan(pcp=3)/ipv4/tcp-->'vlan_pcp=3,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "mask":null, + "value":4196 + } + }, + { + "OXMTlv":{ + "field":"vlan_pcp", + "value":3 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan(pcp=5)/ipv4/tcp-->'vlan_pcp=3,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "mask":null, + "value":4196 + } + }, + { + "OXMTlv":{ + "field":"vlan_pcp", + "value":3 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan(pcp=3)/ipv6/tcp-->'vlan_pcp=3,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "mask":null, + "value":4196 + } + }, + { + "OXMTlv":{ + "field":"vlan_pcp", + "value":3 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan(pcp=3)/ipv6/tcp-->'vlan_pcp=3,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "mask":null, + "value":4196 + } + }, + { + "OXMTlv":{ + "field":"vlan_pcp", + "value":3 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan(pcp=5)/ipv6/tcp-->'vlan_pcp=3,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "mask":null, + "value":4196 + } + }, + { + "OXMTlv":{ + "field":"vlan_pcp", + "value":3 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan(pcp=3)/arp-->'vlan_pcp=3,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "mask":null, + "value":4196 + } + }, + { + "OXMTlv":{ + "field":"vlan_pcp", + "value":3 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan(pcp=3)/arp-->'vlan_pcp=3,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "mask":null, + "value":4196 + } + }, + { + "OXMTlv":{ + "field":"vlan_pcp", + "value":3 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan(pcp=5)/arp-->'vlan_pcp=3,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"vlan_vid", + "mask":null, + "value":4196 + } + }, + { + "OXMTlv":{ + "field":"vlan_pcp", + "value":3 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "table-miss":[ + 0 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/08_IP_DSCP_IPv4.json b/ryu/tests/switch/of14/match/08_IP_DSCP_IPv4.json new file mode 100644 index 00000000..019f1b43 --- /dev/null +++ b/ryu/tests/switch/of14/match/08_IP_DSCP_IPv4.json @@ -0,0 +1,915 @@ +[ + "match: 08_IP_DSCP (IPv4)", + { + "description":"ethernet/ipv4(tos=32)/tcp-->'ip_dscp=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4(tos=32)/tcp-->'ip_dscp=8,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4(tos=65)/tcp-->'ip_dscp=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(tos=32)/tcp-->'ip_dscp=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(tos=32)/tcp-->'ip_dscp=8,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(tos=65)/tcp-->'ip_dscp=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(tos=32)/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ip_dscp=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(tos=32)/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ip_dscp=8,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(tos=65)/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ip_dscp=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(tos=32)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ip_dscp=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(tos=32)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ip_dscp=8,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(tos=65)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ip_dscp=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/08_IP_DSCP_IPv6.json b/ryu/tests/switch/of14/match/08_IP_DSCP_IPv6.json new file mode 100644 index 00000000..b4273dc0 --- /dev/null +++ b/ryu/tests/switch/of14/match/08_IP_DSCP_IPv6.json @@ -0,0 +1,915 @@ +[ + "match: 08_IP_DSCP (IPv6)", + { + "description":"ethernet/ipv6(traffic_class=32)/tcp-->'ip_dscp=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6(traffic_class=32)/tcp-->'ip_dscp=8,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6(traffic_class=65)/tcp-->'ip_dscp=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(traffic_class=32)/tcp-->'ip_dscp=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(traffic_class=32)/tcp-->'ip_dscp=8,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(traffic_class=65)/tcp-->'ip_dscp=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(traffic_class=32)/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ip_dscp=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(traffic_class=32)/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ip_dscp=8,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(traffic_class=65)/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ip_dscp=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(traffic_class=32)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ip_dscp=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(traffic_class=32)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ip_dscp=8,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(traffic_class=65)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ip_dscp=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_dscp", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/09_IP_ECN_IPv4.json b/ryu/tests/switch/of14/match/09_IP_ECN_IPv4.json new file mode 100644 index 00000000..f1a9cddf --- /dev/null +++ b/ryu/tests/switch/of14/match/09_IP_ECN_IPv4.json @@ -0,0 +1,916 @@ + +[ + "match: 09_IP_ECN (IPv4)", + { + "description":"ethernet/ipv4(tos=32)/tcp-->'ip_ecn=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4(tos=32)/tcp-->'ip_ecn=0,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4(tos=65)/tcp-->'ip_ecn=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(tos=32)/tcp-->'ip_ecn=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(tos=32)/tcp-->'ip_ecn=0,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(tos=65)/tcp-->'ip_ecn=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(tos=32)/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ip_ecn=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(tos=32)/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ip_ecn=0,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(tos=65)/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ip_ecn=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(tos=32)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ip_ecn=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(tos=32)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ip_ecn=0,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(tos=65)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ip_ecn=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/09_IP_ECN_IPv6.json b/ryu/tests/switch/of14/match/09_IP_ECN_IPv6.json new file mode 100644 index 00000000..c32c3cb4 --- /dev/null +++ b/ryu/tests/switch/of14/match/09_IP_ECN_IPv6.json @@ -0,0 +1,915 @@ +[ + "match: 09_IP_ECN (IPv6)", + { + "description":"ethernet/ipv6(traffic_class=32)/tcp-->'ip_ecn=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6(traffic_class=32)/tcp-->'ip_ecn=0,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6(traffic_class=65)/tcp-->'ip_ecn=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(traffic_class=32)/tcp-->'ip_ecn=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(traffic_class=32)/tcp-->'ip_ecn=0,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(traffic_class=65)/tcp-->'ip_ecn=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(traffic_class=32)/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ip_ecn=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(traffic_class=32)/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ip_ecn=0,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(traffic_class=65)/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ip_ecn=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(traffic_class=32)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ip_ecn=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(traffic_class=32)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ip_ecn=0,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(traffic_class=65)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ip_ecn=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_ecn", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/10_IP_PROTO_IPv4.json b/ryu/tests/switch/of14/match/10_IP_PROTO_IPv4.json new file mode 100644 index 00000000..f3cc41e1 --- /dev/null +++ b/ryu/tests/switch/of14/match/10_IP_PROTO_IPv4.json @@ -0,0 +1,915 @@ +[ + "match: 10_IP_PROTO (IPv4)", + { + "description":"ethernet/ipv4(proto=6)/tcp-->'ip_proto=6,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4(proto=6)/tcp-->'ip_proto=6,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4(proto=6)/tcp-->'ip_proto=17,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(proto=6)/tcp-->'ip_proto=6,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(proto=6)/tcp-->'ip_proto=6,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(proto=6)/tcp-->'ip_proto=17,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(proto=6)/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ip_proto=6,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(proto=6)/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ip_proto=6,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(proto=6)/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ip_proto=17,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(proto=6)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ip_proto=6,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(proto=6)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ip_proto=6,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(proto=6)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ip_proto=17,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/10_IP_PROTO_IPv6.json b/ryu/tests/switch/of14/match/10_IP_PROTO_IPv6.json new file mode 100644 index 00000000..de93cd09 --- /dev/null +++ b/ryu/tests/switch/of14/match/10_IP_PROTO_IPv6.json @@ -0,0 +1,915 @@ +[ + "match: 10_IP_PROTO (IPv6)", + { + "description":"ethernet/ipv6(nxt=6)/tcp-->'ip_proto=6,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6(nxt=6)/tcp-->'ip_proto=6,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6(nxt=6)/tcp-->'ip_proto=17,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(nxt=6)/tcp-->'ip_proto=6,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(nxt=6)/tcp-->'ip_proto=6,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(nxt=6)/tcp-->'ip_proto=17,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(nxt=6)/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ip_proto=6,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(nxt=6)/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ip_proto=6,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(nxt=6)/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ip_proto=17,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(nxt=6)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ip_proto=6,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(nxt=6)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ip_proto=6,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(nxt=6)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ip_proto=17,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/11_IPV4_SRC.json b/ryu/tests/switch/of14/match/11_IPV4_SRC.json new file mode 100644 index 00000000..dd9798cf --- /dev/null +++ b/ryu/tests/switch/of14/match/11_IPV4_SRC.json @@ -0,0 +1,915 @@ +[ + "match: 11_IPV4_SRC", + { + "description":"ethernet/ipv4(src='192.168.10.10')/tcp-->'ipv4_src=192.168.10.10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4(src='192.168.10.10')/tcp-->'ipv4_src=192.168.10.10,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4(src='10.10.10.10')/tcp-->'ipv4_src=192.168.10.10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(src='192.168.10.10')/tcp-->'ipv4_src=192.168.10.10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(src='192.168.10.10')/tcp-->'ipv4_src=192.168.10.10,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(src='10.10.10.10')/tcp-->'ipv4_src=192.168.10.10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(src='192.168.10.10')/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ipv4_src=192.168.10.10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(src='192.168.10.10')/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ipv4_src=192.168.10.10,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(src='10.10.10.10')/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ipv4_src=192.168.10.10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(src='192.168.10.10')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv4_src=192.168.10.10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(src='192.168.10.10')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv4_src=192.168.10.10,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(src='10.10.10.10')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv4_src=192.168.10.10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/11_IPV4_SRC_Mask.json b/ryu/tests/switch/of14/match/11_IPV4_SRC_Mask.json new file mode 100644 index 00000000..63c3c6fe --- /dev/null +++ b/ryu/tests/switch/of14/match/11_IPV4_SRC_Mask.json @@ -0,0 +1,927 @@ +[ + "match: 11_IPV4_SRC (Mask)", + { + "description":"ethernet/ipv4(src='192.168.10.10')/tcp-->'ipv4_src=192.168.10.0(mask=255.255.255.0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4(src='192.168.10.10')/tcp-->'ipv4_src=192.168.10.0(mask=255.255.255.0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4(src='10.10.10.10')/tcp-->'ipv4_src=192.168.10.0(mask=255.255.255.0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(src='192.168.10.10')/tcp-->'ipv4_src=192.168.10.0(mask=255.255.255.0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(src='192.168.10.10')/tcp-->'ipv4_src=192.168.10.0(mask=255.255.255.0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(src='10.10.10.10')/tcp-->'ipv4_src=192.168.10.0(mask=255.255.255.0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(src='192.168.10.10')/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ipv4_src=192.168.10.0(mask=255.255.255.0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(src='192.168.10.10')/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ipv4_src=192.168.10.0(mask=255.255.255.0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(src='10.10.10.10')/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ipv4_src=192.168.10.0(mask=255.255.255.0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(src='192.168.10.10')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv4_src=192.168.10.0(mask=255.255.255.0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(src='192.168.10.10')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv4_src=192.168.10.0(mask=255.255.255.0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(src='10.10.10.10')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv4_src=192.168.10.0(mask=255.255.255.0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_src", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/12_IPV4_DST.json b/ryu/tests/switch/of14/match/12_IPV4_DST.json new file mode 100644 index 00000000..e976ae52 --- /dev/null +++ b/ryu/tests/switch/of14/match/12_IPV4_DST.json @@ -0,0 +1,915 @@ +[ + "match: 12_IPV4_DST", + { + "description":"ethernet/ipv4(dst='192.168.20.20')/tcp-->'ipv4_dst=192.168.20.20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4(dst='192.168.20.20')/tcp-->'ipv4_dst=192.168.20.20,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4(dst='10.10.20.20')/tcp-->'ipv4_dst=192.168.20.20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(dst='192.168.20.20')/tcp-->'ipv4_dst=192.168.20.20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(dst='192.168.20.20')/tcp-->'ipv4_dst=192.168.20.20,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(dst='10.10.20.20')/tcp-->'ipv4_dst=192.168.20.20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(dst='192.168.20.20')/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ipv4_dst=192.168.20.20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(dst='192.168.20.20')/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ipv4_dst=192.168.20.20,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(dst='10.10.20.20')/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ipv4_dst=192.168.20.20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(dst='192.168.20.20')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv4_dst=192.168.20.20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(dst='192.168.20.20')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv4_dst=192.168.20.20,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(dst='10.10.20.20')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv4_dst=192.168.20.20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/12_IPV4_DST_Mask.json b/ryu/tests/switch/of14/match/12_IPV4_DST_Mask.json new file mode 100644 index 00000000..c0841b0e --- /dev/null +++ b/ryu/tests/switch/of14/match/12_IPV4_DST_Mask.json @@ -0,0 +1,928 @@ + +[ + "match: 12_IPV4_DST (Mask)", + { + "description":"ethernet/ipv4(dst='192.168.20.20')/tcp-->'ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4(dst='192.168.20.20')/tcp-->'ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4(dst='10.10.20.20')/tcp-->'ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(dst='192.168.20.20')/tcp-->'ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(dst='192.168.20.20')/tcp-->'ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4(dst='10.10.20.20')/tcp-->'ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(dst='192.168.20.20')/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(dst='192.168.20.20')/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4(dst='10.10.20.20')/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(dst='192.168.20.20')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(dst='192.168.20.20')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4(dst='10.10.20.20')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ipv4_dst", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/13_TCP_SRC_IPv4.json b/ryu/tests/switch/of14/match/13_TCP_SRC_IPv4.json new file mode 100644 index 00000000..4654a03d --- /dev/null +++ b/ryu/tests/switch/of14/match/13_TCP_SRC_IPv4.json @@ -0,0 +1,987 @@ +[ + "match: 13_TCP_SRC (IPv4)", + { + "description":"ethernet/ipv4/tcp(src_port=11111)-->'tcp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4/tcp(src_port=11111)-->'tcp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4/tcp(src_port=12345)-->'tcp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/tcp(src_port=11111)-->'tcp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/tcp(src_port=11111)-->'tcp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/tcp(src_port=12345)-->'tcp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/tcp(src_port=11111)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,tcp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/tcp(src_port=11111)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,tcp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/tcp(src_port=12345)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,tcp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/tcp(src_port=11111)-->'actions=pop_pbb,goto_table:1','table_id:1,tcp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/tcp(src_port=11111)-->'actions=pop_pbb,goto_table:1','table_id:1,tcp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/tcp(src_port=12345)-->'actions=pop_pbb,goto_table:1','table_id:1,tcp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/13_TCP_SRC_IPv6.json b/ryu/tests/switch/of14/match/13_TCP_SRC_IPv6.json new file mode 100644 index 00000000..1615f8c0 --- /dev/null +++ b/ryu/tests/switch/of14/match/13_TCP_SRC_IPv6.json @@ -0,0 +1,987 @@ +[ + "match: 13_TCP_SRC (IPv6)", + { + "description":"ethernet/ipv6/tcp(src_port=11111)-->'tcp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp(src_port=11111)-->'tcp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp(src_port=12345)-->'tcp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/tcp(src_port=11111)-->'tcp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/tcp(src_port=11111)-->'tcp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/tcp(src_port=12345)-->'tcp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/tcp(src_port=11111)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,tcp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/tcp(src_port=11111)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,tcp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/tcp(src_port=12345)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,tcp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/tcp(src_port=11111)-->'actions=pop_pbb,goto_table:1','table_id:1,tcp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/tcp(src_port=11111)-->'actions=pop_pbb,goto_table:1','table_id:1,tcp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/tcp(src_port=12345)-->'actions=pop_pbb,goto_table:1','table_id:1,tcp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/14_TCP_DST_IPv4.json b/ryu/tests/switch/of14/match/14_TCP_DST_IPv4.json new file mode 100644 index 00000000..7e0d09a7 --- /dev/null +++ b/ryu/tests/switch/of14/match/14_TCP_DST_IPv4.json @@ -0,0 +1,987 @@ +[ + "match: 14_TCP_DST (IPv4)", + { + "description":"ethernet/ipv4/tcp(dst_port=2222)-->'tcp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4/tcp(dst_port=2222)-->'tcp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4/tcp(dst_port=6789)-->'tcp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/tcp(dst_port=2222)-->'tcp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/tcp(dst_port=2222)-->'tcp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/tcp(dst_port=6789)-->'tcp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/tcp(dst_port=2222)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,tcp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/tcp(dst_port=2222)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,tcp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/tcp(dst_port=6789)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,tcp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/tcp(dst_port=2222)-->'actions=pop_pbb,goto_table:1','table_id:1,tcp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/tcp(dst_port=2222)-->'actions=pop_pbb,goto_table:1','table_id:1,tcp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/tcp(dst_port=6789)-->'actions=pop_pbb,goto_table:1','table_id:1,tcp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/14_TCP_DST_IPv6.json b/ryu/tests/switch/of14/match/14_TCP_DST_IPv6.json new file mode 100644 index 00000000..8f85f967 --- /dev/null +++ b/ryu/tests/switch/of14/match/14_TCP_DST_IPv6.json @@ -0,0 +1,987 @@ +[ + "match: 14_TCP_DST (IPv6)", + { + "description":"ethernet/ipv6/tcp(dst_port=2222)-->'tcp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp(dst_port=2222)-->'tcp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp(dst_port=6789)-->'tcp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/tcp(dst_port=2222)-->'tcp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/tcp(dst_port=2222)-->'tcp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/tcp(dst_port=6789)-->'tcp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/tcp(dst_port=2222)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,tcp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/tcp(dst_port=2222)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,tcp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/tcp(dst_port=6789)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,tcp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/tcp(dst_port=2222)-->'actions=pop_pbb,goto_table:1','table_id:1,tcp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/tcp(dst_port=2222)-->'actions=pop_pbb,goto_table:1','table_id:1,tcp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/tcp(dst_port=6789)-->'actions=pop_pbb,goto_table:1','table_id:1,tcp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":6 + } + }, + { + "OXMTlv":{ + "field":"tcp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/15_UDP_SRC_IPv4.json b/ryu/tests/switch/of14/match/15_UDP_SRC_IPv4.json new file mode 100644 index 00000000..f4d39205 --- /dev/null +++ b/ryu/tests/switch/of14/match/15_UDP_SRC_IPv4.json @@ -0,0 +1,987 @@ +[ + "match: 15_UDP_SRC (IPv4)", + { + "description":"ethernet/ipv4/udp(src_port=11111)-->'udp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4/udp(src_port=11111)-->'udp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4/udp(src_port=12345)-->'udp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=17, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "udp(dst_port=6789, src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/udp(src_port=11111)-->'udp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/udp(src_port=11111)-->'udp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/udp(src_port=12345)-->'udp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)", + "ipv4(tos=65, proto=17, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "udp(dst_port=6789, src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/udp(src_port=11111)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,udp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/udp(src_port=11111)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,udp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/udp(src_port=12345)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,udp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv4(tos=65, proto=17, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "udp(dst_port=6789, src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/udp(src_port=11111)-->'actions=pop_pbb,goto_table:1','table_id:1,udp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/udp(src_port=11111)-->'actions=pop_pbb,goto_table:1','table_id:1,udp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/udp(src_port=12345)-->'actions=pop_pbb,goto_table:1','table_id:1,udp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=17, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "udp(dst_port=6789, src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/15_UDP_SRC_IPv6.json b/ryu/tests/switch/of14/match/15_UDP_SRC_IPv6.json new file mode 100644 index 00000000..d92c9a10 --- /dev/null +++ b/ryu/tests/switch/of14/match/15_UDP_SRC_IPv6.json @@ -0,0 +1,987 @@ +[ + "match: 15_UDP_SRC (IPv6)", + { + "description":"ethernet/ipv6/udp(src_port=11111)-->'udp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6/udp(src_port=11111)-->'udp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6/udp(src_port=12345)-->'udp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=17, hop_limit=127, traffic_class=65)", + "udp(dst_port=6789, src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/udp(src_port=11111)-->'udp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/udp(src_port=11111)-->'udp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/udp(src_port=12345)-->'udp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=17, hop_limit=127, traffic_class=65)", + "udp(dst_port=6789, src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/udp(src_port=11111)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,udp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/udp(src_port=11111)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,udp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/udp(src_port=12345)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,udp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=17, hop_limit=127, traffic_class=65)", + "udp(dst_port=6789, src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/udp(src_port=11111)-->'actions=pop_pbb,goto_table:1','table_id:1,udp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/udp(src_port=11111)-->'actions=pop_pbb,goto_table:1','table_id:1,udp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/udp(src_port=12345)-->'actions=pop_pbb,goto_table:1','table_id:1,udp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=17, hop_limit=127, traffic_class=65)", + "udp(dst_port=6789, src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/16_UDP_DST_IPv4.json b/ryu/tests/switch/of14/match/16_UDP_DST_IPv4.json new file mode 100644 index 00000000..f763f899 --- /dev/null +++ b/ryu/tests/switch/of14/match/16_UDP_DST_IPv4.json @@ -0,0 +1,987 @@ +[ + "match: 16_UDP_DST (IPv4)", + { + "description":"ethernet/ipv4/udp(dst_port=2222)-->'udp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4/udp(dst_port=2222)-->'udp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4/udp(dst_port=6789)-->'udp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=17, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "udp(dst_port=6789, src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/udp(dst_port=2222)-->'udp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/udp(dst_port=2222)-->'udp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/udp(dst_port=6789)-->'udp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)", + "ipv4(tos=65, proto=17, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "udp(dst_port=6789, src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/udp(dst_port=2222)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,udp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/udp(dst_port=2222)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,udp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/udp(dst_port=6789)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,udp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv4(tos=65, proto=17, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "udp(dst_port=6789, src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/udp(dst_port=2222)-->'actions=pop_pbb,goto_table:1','table_id:1,udp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/udp(dst_port=2222)-->'actions=pop_pbb,goto_table:1','table_id:1,udp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=17, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/udp(dst_port=6789)-->'actions=pop_pbb,goto_table:1','table_id:1,udp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=17, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "udp(dst_port=6789, src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/16_UDP_DST_IPv6.json b/ryu/tests/switch/of14/match/16_UDP_DST_IPv6.json new file mode 100644 index 00000000..492d8fed --- /dev/null +++ b/ryu/tests/switch/of14/match/16_UDP_DST_IPv6.json @@ -0,0 +1,987 @@ +[ + "match: 16_UDP_DST (IPv6)", + { + "description":"ethernet/ipv6/udp(dst_port=2222)-->'udp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6/udp(dst_port=2222)-->'udp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6/udp(dst_port=6789)-->'udp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=17, hop_limit=127, traffic_class=65)", + "udp(dst_port=6789, src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/udp(dst_port=2222)-->'udp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/udp(dst_port=2222)-->'udp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/udp(dst_port=6789)-->'udp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=17, hop_limit=127, traffic_class=65)", + "udp(dst_port=6789, src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/udp(dst_port=2222)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,udp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/udp(dst_port=2222)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,udp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/udp(dst_port=6789)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,udp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=17, hop_limit=127, traffic_class=65)", + "udp(dst_port=6789, src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/udp(dst_port=2222)-->'actions=pop_pbb,goto_table:1','table_id:1,udp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/udp(dst_port=2222)-->'actions=pop_pbb,goto_table:1','table_id:1,udp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=17, hop_limit=64, traffic_class=32)", + "udp(dst_port=2222, src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/udp(dst_port=6789)-->'actions=pop_pbb,goto_table:1','table_id:1,udp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":17 + } + }, + { + "OXMTlv":{ + "field":"udp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=17, hop_limit=127, traffic_class=65)", + "udp(dst_port=6789, src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/17_SCTP_SRC_IPv4.json b/ryu/tests/switch/of14/match/17_SCTP_SRC_IPv4.json new file mode 100644 index 00000000..0f41f1af --- /dev/null +++ b/ryu/tests/switch/of14/match/17_SCTP_SRC_IPv4.json @@ -0,0 +1,967 @@ +[ + "match: 17_SCTP_SRC (IPv4)", + { + "description":"ethernet/ipv4/sctp(src_port=11111)-->'sctp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/ipv4/sctp(src_port=11111)-->'sctp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/ipv4/sctp(src_port=12345)-->'sctp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=132, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "sctp(chunks=[chunk_data(payload_data='abcdefghijklmnopqrstuvwxyz0123456789')], dst_port=6789, src_port=12345)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/sctp(src_port=11111)-->'sctp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/sctp(src_port=11111)-->'sctp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/sctp(src_port=12345)-->'sctp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)", + "ipv4(tos=65, proto=132, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "sctp(chunks=[chunk_data(payload_data='abcdefghijklmnopqrstuvwxyz0123456789')], dst_port=6789, src_port=12345)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/sctp(src_port=11111)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,sctp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/sctp(src_port=11111)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,sctp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/sctp(src_port=12345)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,sctp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv4(tos=65, proto=132, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "sctp(chunks=[chunk_data(payload_data='abcdefghijklmnopqrstuvwxyz0123456789')], dst_port=6789, src_port=12345)" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/sctp(src_port=11111)-->'actions=pop_pbb,goto_table:1','table_id:1,sctp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/sctp(src_port=11111)-->'actions=pop_pbb,goto_table:1','table_id:1,sctp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/sctp(src_port=12345)-->'actions=pop_pbb,goto_table:1','table_id:1,sctp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=132, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "sctp(chunks=[chunk_data(payload_data='abcdefghijklmnopqrstuvwxyz0123456789')], dst_port=6789, src_port=12345)" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/17_SCTP_SRC_IPv6.json b/ryu/tests/switch/of14/match/17_SCTP_SRC_IPv6.json new file mode 100644 index 00000000..adb61343 --- /dev/null +++ b/ryu/tests/switch/of14/match/17_SCTP_SRC_IPv6.json @@ -0,0 +1,967 @@ +[ + "match: 17_SCTP_SRC (IPv6)", + { + "description":"ethernet/ipv6/sctp(src_port=11111)-->'sctp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/ipv6/sctp(src_port=11111)-->'sctp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/ipv6/sctp(src_port=12345)-->'sctp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=132, hop_limit=127, traffic_class=65)", + "sctp(chunks=[chunk_data(payload_data='abcdefghijklmnopqrstuvwxyz0123456789')], dst_port=6789, src_port=12345)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/sctp(src_port=11111)-->'sctp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/sctp(src_port=11111)-->'sctp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/sctp(src_port=12345)-->'sctp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=132, hop_limit=127, traffic_class=65)", + "sctp(chunks=[chunk_data(payload_data='abcdefghijklmnopqrstuvwxyz0123456789')], dst_port=6789, src_port=12345)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/sctp(src_port=11111)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,sctp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/sctp(src_port=11111)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,sctp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/sctp(src_port=12345)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,sctp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=132, hop_limit=127, traffic_class=65)", + "sctp(chunks=[chunk_data(payload_data='abcdefghijklmnopqrstuvwxyz0123456789')], dst_port=6789, src_port=12345)" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/sctp(src_port=11111)-->'actions=pop_pbb,goto_table:1','table_id:1,sctp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/sctp(src_port=11111)-->'actions=pop_pbb,goto_table:1','table_id:1,sctp_src=11111,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/sctp(src_port=12345)-->'actions=pop_pbb,goto_table:1','table_id:1,sctp_src=11111,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_src", + "value":11111 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=132, hop_limit=127, traffic_class=65)", + "sctp(chunks=[chunk_data(payload_data='abcdefghijklmnopqrstuvwxyz0123456789')], dst_port=6789, src_port=12345)" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/18_SCTP_DST_IPv4.json b/ryu/tests/switch/of14/match/18_SCTP_DST_IPv4.json new file mode 100644 index 00000000..664b76cb --- /dev/null +++ b/ryu/tests/switch/of14/match/18_SCTP_DST_IPv4.json @@ -0,0 +1,967 @@ +[ + "match: 18_SCTP_DST (IPv4)", + { + "description":"ethernet/ipv4/sctp(dst_port=2222)-->'sctp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/ipv4/sctp(dst_port=2222)-->'sctp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/ipv4/sctp(dst_port=6789)-->'sctp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=132, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "sctp(chunks=[chunk_data(payload_data='abcdefghijklmnopqrstuvwxyz0123456789')], dst_port=6789, src_port=12345)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/sctp(dst_port=2222)-->'sctp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/sctp(dst_port=2222)-->'sctp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/sctp(dst_port=6789)-->'sctp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)", + "ipv4(tos=65, proto=132, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "sctp(chunks=[chunk_data(payload_data='abcdefghijklmnopqrstuvwxyz0123456789')], dst_port=6789, src_port=12345)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/sctp(dst_port=2222)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,sctp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/sctp(dst_port=2222)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,sctp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/sctp(dst_port=6789)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,sctp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv4(tos=65, proto=132, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "sctp(chunks=[chunk_data(payload_data='abcdefghijklmnopqrstuvwxyz0123456789')], dst_port=6789, src_port=12345)" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/sctp(dst_port=2222)-->'actions=pop_pbb,goto_table:1','table_id:1,sctp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/sctp(dst_port=2222)-->'actions=pop_pbb,goto_table:1','table_id:1,sctp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/sctp(dst_port=6789)-->'actions=pop_pbb,goto_table:1','table_id:1,sctp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=132, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "sctp(chunks=[chunk_data(payload_data='abcdefghijklmnopqrstuvwxyz0123456789')], dst_port=6789, src_port=12345)" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/18_SCTP_DST_IPv6.json b/ryu/tests/switch/of14/match/18_SCTP_DST_IPv6.json new file mode 100644 index 00000000..fdcc8b10 --- /dev/null +++ b/ryu/tests/switch/of14/match/18_SCTP_DST_IPv6.json @@ -0,0 +1,967 @@ +[ + "match: 18_SCTP_DST (IPv6)", + { + "description":"ethernet/ipv6/sctp(dst_port=2222)-->'sctp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/ipv6/sctp(dst_port=2222)-->'sctp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/ipv6/sctp(dst_port=6789)-->'sctp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=132, hop_limit=127, traffic_class=65)", + "sctp(chunks=[chunk_data(payload_data='abcdefghijklmnopqrstuvwxyz0123456789')], dst_port=6789, src_port=12345)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/sctp(dst_port=2222)-->'sctp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/sctp(dst_port=2222)-->'sctp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/sctp(dst_port=6789)-->'sctp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=132, hop_limit=127, traffic_class=65)", + "sctp(chunks=[chunk_data(payload_data='abcdefghijklmnopqrstuvwxyz0123456789')], dst_port=6789, src_port=12345)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/sctp(dst_port=2222)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,sctp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/sctp(dst_port=2222)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,sctp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/sctp(dst_port=6789)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,sctp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=132, hop_limit=127, traffic_class=65)", + "sctp(chunks=[chunk_data(payload_data='abcdefghijklmnopqrstuvwxyz0123456789')], dst_port=6789, src_port=12345)" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/sctp(dst_port=2222)-->'actions=pop_pbb,goto_table:1','table_id:1,sctp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/sctp(dst_port=2222)-->'actions=pop_pbb,goto_table:1','table_id:1,sctp_dst=2222,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=132, hop_limit=64, traffic_class=32)", + "sctp(chunks=[chunk_data(payload_data='0123456789abcdefghijklmnopqrstuvwxyz')], dst_port=2222, src_port=11111)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/sctp(dst_port=6789)-->'actions=pop_pbb,goto_table:1','table_id:1,sctp_dst=2222,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":132 + } + }, + { + "OXMTlv":{ + "field":"sctp_dst", + "value":2222 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=132, hop_limit=127, traffic_class=65)", + "sctp(chunks=[chunk_data(payload_data='abcdefghijklmnopqrstuvwxyz0123456789')], dst_port=6789, src_port=12345)" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/19_ICMPV4_TYPE.json b/ryu/tests/switch/of14/match/19_ICMPV4_TYPE.json new file mode 100644 index 00000000..f078d595 --- /dev/null +++ b/ryu/tests/switch/of14/match/19_ICMPV4_TYPE.json @@ -0,0 +1,967 @@ +[ + "match: 19_ICMPV4_TYPE", + { + "description":"ethernet/ipv4/icmp(type=8)-->'icmpv4_type=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_type", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ] + } + ] + }, + { + "description":"ethernet/ipv4/icmp(type=8)-->'icmpv4_type=8,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_type", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ] + } + ] + }, + { + "description":"ethernet/ipv4/icmp(type=3)-->'icmpv4_type=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_type", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=1, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "icmp(code=1,csum=0,data=dest_unreach(data='\\xd3]\\xb7\\xe3\\x9e\\xbb\\xf3\\xd6\\x9bq\\xd7\\x9f\\x82\\x18\\xa3\\x92Y\\xa7\\xa2\\x9a\\xab\\xb2\\xdb\\xaf\\xc3\\x1c\\xb3\\x00\\x10\\x83\\x10Q\\x87 \\x92\\x8b'),type_=3)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/icmp(type=8)-->'icmpv4_type=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_type", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/icmp(type=8)-->'icmpv4_type=8,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_type", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/icmp(type=3)-->'icmpv4_type=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_type", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)", + "ipv4(tos=65, proto=1, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "icmp(code=1,csum=0,data=dest_unreach(data='\\xd3]\\xb7\\xe3\\x9e\\xbb\\xf3\\xd6\\x9bq\\xd7\\x9f\\x82\\x18\\xa3\\x92Y\\xa7\\xa2\\x9a\\xab\\xb2\\xdb\\xaf\\xc3\\x1c\\xb3\\x00\\x10\\x83\\x10Q\\x87 \\x92\\x8b'),type_=3)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/icmp(type=8)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,icmpv4_type=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_type", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/icmp(type=8)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,icmpv4_type=8,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_type", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/icmp(type=3)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,icmpv4_type=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_type", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv4(tos=65, proto=1, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "icmp(code=1,csum=0,data=dest_unreach(data='\\xd3]\\xb7\\xe3\\x9e\\xbb\\xf3\\xd6\\x9bq\\xd7\\x9f\\x82\\x18\\xa3\\x92Y\\xa7\\xa2\\x9a\\xab\\xb2\\xdb\\xaf\\xc3\\x1c\\xb3\\x00\\x10\\x83\\x10Q\\x87 \\x92\\x8b'),type_=3)" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/icmp(type=8)-->'actions=pop_pbb,goto_table:1','table_id:1,icmpv4_type=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_type", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/icmp(type=8)-->'actions=pop_pbb,goto_table:1','table_id:1,icmpv4_type=8,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_type", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/icmp(type=3)-->'actions=pop_pbb,goto_table:1','table_id:1,icmpv4_type=8,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_type", + "value":8 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=1, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "icmp(code=1,csum=0,data=dest_unreach(data='\\xd3]\\xb7\\xe3\\x9e\\xbb\\xf3\\xd6\\x9bq\\xd7\\x9f\\x82\\x18\\xa3\\x92Y\\xa7\\xa2\\x9a\\xab\\xb2\\xdb\\xaf\\xc3\\x1c\\xb3\\x00\\x10\\x83\\x10Q\\x87 \\x92\\x8b'),type_=3)" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/20_ICMPV4_CODE.json b/ryu/tests/switch/of14/match/20_ICMPV4_CODE.json new file mode 100644 index 00000000..4133ce43 --- /dev/null +++ b/ryu/tests/switch/of14/match/20_ICMPV4_CODE.json @@ -0,0 +1,967 @@ +[ + "match: 20_ICMPV4_CODE", + { + "description":"ethernet/ipv4/icmp(code=0)-->'icmpv4_code=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ] + } + ] + }, + { + "description":"ethernet/ipv4/icmp(code=0)-->'icmpv4_code=0,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ] + } + ] + }, + { + "description":"ethernet/ipv4/icmp(code=1)-->'icmpv4_code=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=1, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "icmp(code=1,csum=0,data=dest_unreach(data='\\xd3]\\xb7\\xe3\\x9e\\xbb\\xf3\\xd6\\x9bq\\xd7\\x9f\\x82\\x18\\xa3\\x92Y\\xa7\\xa2\\x9a\\xab\\xb2\\xdb\\xaf\\xc3\\x1c\\xb3\\x00\\x10\\x83\\x10Q\\x87 \\x92\\x8b'),type_=3)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/icmp(code=0)-->'icmpv4_code=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/icmp(code=0)-->'icmpv4_code=0,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv4/icmp(code=1)-->'icmpv4_code=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)", + "ipv4(tos=65, proto=1, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "icmp(code=1,csum=0,data=dest_unreach(data='\\xd3]\\xb7\\xe3\\x9e\\xbb\\xf3\\xd6\\x9bq\\xd7\\x9f\\x82\\x18\\xa3\\x92Y\\xa7\\xa2\\x9a\\xab\\xb2\\xdb\\xaf\\xc3\\x1c\\xb3\\x00\\x10\\x83\\x10Q\\x87 \\x92\\x8b'),type_=3)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/icmp(code=0)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,icmpv4_code=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/icmp(code=0)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,icmpv4_code=0,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv4/icmp(code=1)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,icmpv4_code=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2048 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv4(tos=65, proto=1, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "icmp(code=1,csum=0,data=dest_unreach(data='\\xd3]\\xb7\\xe3\\x9e\\xbb\\xf3\\xd6\\x9bq\\xd7\\x9f\\x82\\x18\\xa3\\x92Y\\xa7\\xa2\\x9a\\xab\\xb2\\xdb\\xaf\\xc3\\x1c\\xb3\\x00\\x10\\x83\\x10Q\\x87 \\x92\\x8b'),type_=3)" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/icmp(code=0)-->'actions=pop_pbb,goto_table:1','table_id:1,icmpv4_code=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/icmp(code=0)-->'actions=pop_pbb,goto_table:1','table_id:1,icmpv4_code=0,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=1, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "icmp(code=0,csum=0,data=echo(data='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL'),type_=8)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv4/icmp(code=1)-->'actions=pop_pbb,goto_table:1','table_id:1,icmpv4_code=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2048 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":1 + } + }, + { + "OXMTlv":{ + "field":"icmpv4_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)", + "ipv4(tos=65, proto=1, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "icmp(code=1,csum=0,data=dest_unreach(data='\\xd3]\\xb7\\xe3\\x9e\\xbb\\xf3\\xd6\\x9bq\\xd7\\x9f\\x82\\x18\\xa3\\x92Y\\xa7\\xa2\\x9a\\xab\\xb2\\xdb\\xaf\\xc3\\x1c\\xb3\\x00\\x10\\x83\\x10Q\\x87 \\x92\\x8b'),type_=3)" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/21_ARP_OP.json b/ryu/tests/switch/of14/match/21_ARP_OP.json new file mode 100644 index 00000000..c153fa5e --- /dev/null +++ b/ryu/tests/switch/of14/match/21_ARP_OP.json @@ -0,0 +1,895 @@ +[ + "match: 21_ARP_OP", + { + "description":"ethernet/arp(opcode=1)-->'arp_op=1,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_op", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp(opcode=1)-->'arp_op=1,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_op", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp(opcode=2)-->'arp_op=1,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_op", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(opcode=1)-->'arp_op=1,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_op", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(opcode=1)-->'arp_op=1,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_op", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(opcode=2)-->'arp_op=1,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_op", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(opcode=1)-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_op=1,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_op", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(opcode=1)-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_op=1,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_op", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(opcode=2)-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_op=1,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_op", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(opcode=1)-->'actions=pop_pbb,goto_table:1','table_id:1,arp_op=1,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_op", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(opcode=1)-->'actions=pop_pbb,goto_table:1','table_id:1,arp_op=1,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_op", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(opcode=2)-->'actions=pop_pbb,goto_table:1','table_id:1,arp_op=1,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_op", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/22_ARP_SPA.json b/ryu/tests/switch/of14/match/22_ARP_SPA.json new file mode 100644 index 00000000..daf251db --- /dev/null +++ b/ryu/tests/switch/of14/match/22_ARP_SPA.json @@ -0,0 +1,895 @@ +[ + "match: 22_ARP_SPA", + { + "description":"ethernet/arp(src_ip='192.168.10.10')-->'arp_spa=192.168.10.10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp(src_ip='192.168.10.10')-->'arp_spa=192.168.10.10,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp(src_ip='10.10.10.10')-->'arp_spa=192.168.10.10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(src_ip='192.168.10.10')-->'arp_spa=192.168.10.10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(src_ip='192.168.10.10')-->'arp_spa=192.168.10.10,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(src_ip='10.10.10.10')-->'arp_spa=192.168.10.10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(src_ip='192.168.10.10')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_spa=192.168.10.10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(src_ip='192.168.10.10')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_spa=192.168.10.10,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(src_ip='10.10.10.10')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_spa=192.168.10.10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(src_ip='192.168.10.10')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_spa=192.168.10.10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(src_ip='192.168.10.10')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_spa=192.168.10.10,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(src_ip='10.10.10.10')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_spa=192.168.10.10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "value":"192.168.10.10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/22_ARP_SPA_Mask.json b/ryu/tests/switch/of14/match/22_ARP_SPA_Mask.json new file mode 100644 index 00000000..93cef596 --- /dev/null +++ b/ryu/tests/switch/of14/match/22_ARP_SPA_Mask.json @@ -0,0 +1,907 @@ +[ + "match: 22_ARP_SPA (Mask)", + { + "description":"ethernet/arp(src_ip='192.168.10.10')-->'arp_spa=192.168.10.0(mask=255.255.255.0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp(src_ip='192.168.10.10')-->'arp_spa=192.168.10.0(mask=255.255.255.0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp(src_ip='10.10.10.10')-->'arp_spa=192.168.10.0(mask=255.255.255.0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(src_ip='192.168.10.10')-->'arp_spa=192.168.10.0(mask=255.255.255.0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(src_ip='192.168.10.10')-->'arp_spa=192.168.10.0(mask=255.255.255.0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(src_ip='10.10.10.10')-->'arp_spa=192.168.10.0(mask=255.255.255.0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(src_ip='192.168.10.10')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_spa=192.168.10.0(mask=255.255.255.0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(src_ip='192.168.10.10')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_spa=192.168.10.0(mask=255.255.255.0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(src_ip='10.10.10.10')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_spa=192.168.10.0(mask=255.255.255.0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(src_ip='192.168.10.10')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_spa=192.168.10.0(mask=255.255.255.0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(src_ip='192.168.10.10')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_spa=192.168.10.0(mask=255.255.255.0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(src_ip='10.10.10.10')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_spa=192.168.10.0(mask=255.255.255.0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_spa", + "mask":"255.255.255.0", + "value":"192.168.10.0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/23_ARP_TPA.json b/ryu/tests/switch/of14/match/23_ARP_TPA.json new file mode 100644 index 00000000..97a597c0 --- /dev/null +++ b/ryu/tests/switch/of14/match/23_ARP_TPA.json @@ -0,0 +1,895 @@ +[ + "match: 23_ARP_TPA", + { + "description":"ethernet/arp(dst_ip='192.168.20.20')-->'arp_tpa=192.168.20.20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp(dst_ip='192.168.20.20')-->'arp_tpa=192.168.20.20,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp(dst_ip='10.10.20.20')-->'arp_tpa=192.168.20.20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(dst_ip='192.168.20.20')-->'arp_tpa=192.168.20.20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(dst_ip='192.168.20.20')-->'arp_tpa=192.168.20.20,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(dst_ip='10.10.20.20')-->'arp_tpa=192.168.20.20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(dst_ip='192.168.20.20')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_tpa=192.168.20.20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(dst_ip='192.168.20.20')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_tpa=192.168.20.20,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(dst_ip='10.10.20.20')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_tpa=192.168.20.20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(dst_ip='192.168.20.20')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_tpa=192.168.20.20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(dst_ip='192.168.20.20')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_tpa=192.168.20.20,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(dst_ip='10.10.20.20')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_tpa=192.168.20.20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "value":"192.168.20.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/23_ARP_TPA_Mask.json b/ryu/tests/switch/of14/match/23_ARP_TPA_Mask.json new file mode 100644 index 00000000..2bb6693e --- /dev/null +++ b/ryu/tests/switch/of14/match/23_ARP_TPA_Mask.json @@ -0,0 +1,907 @@ +[ + "match: 23_ARP_TPA (Mask)", + { + "description":"ethernet/arp(dst_ip='192.168.20.20')-->'arp_tpa=192.168.0.20(mask=255.255.0.255),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp(dst_ip='192.168.20.20')-->'arp_tpa=192.168.0.20(mask=255.255.0.255),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp(dst_ip='10.10.20.20')-->'arp_tpa=192.168.0.20(mask=255.255.0.255),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(dst_ip='192.168.20.20')-->'arp_tpa=192.168.0.20(mask=255.255.0.255),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(dst_ip='192.168.20.20')-->'arp_tpa=192.168.0.20(mask=255.255.0.255),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(dst_ip='10.10.20.20')-->'arp_tpa=192.168.0.20(mask=255.255.0.255),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(dst_ip='192.168.20.20')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_tpa=192.168.0.20(mask=255.255.0.255),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(dst_ip='192.168.20.20')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_tpa=192.168.0.20(mask=255.255.0.255),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(dst_ip='10.10.20.20')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_tpa=192.168.0.20(mask=255.255.0.255),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(dst_ip='192.168.20.20')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_tpa=192.168.0.20(mask=255.255.0.255),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(dst_ip='192.168.20.20')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_tpa=192.168.0.20(mask=255.255.0.255),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(dst_ip='10.10.20.20')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_tpa=192.168.0.20(mask=255.255.0.255),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tpa", + "mask":"255.255.0.255", + "value":"192.168.0.20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/24_ARP_SHA.json b/ryu/tests/switch/of14/match/24_ARP_SHA.json new file mode 100644 index 00000000..e79aaea6 --- /dev/null +++ b/ryu/tests/switch/of14/match/24_ARP_SHA.json @@ -0,0 +1,895 @@ +[ + "match: 24_ARP_SHA", + { + "description":"ethernet/arp(src_mac='12:11:11:11:11:11')-->'arp_sha=12:11:11:11:11:11,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp(src_mac='12:11:11:11:11:11')-->'arp_sha=12:11:11:11:11:11,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp(src_mac='aa:aa:aa:aa:aa:aa')-->'arp_sha=12:11:11:11:11:11,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(src_mac='12:11:11:11:11:11')-->'arp_sha=12:11:11:11:11:11,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(src_mac='12:11:11:11:11:11')-->'arp_sha=12:11:11:11:11:11,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(src_mac='aa:aa:aa:aa:aa:aa')-->'arp_sha=12:11:11:11:11:11,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(src_mac='12:11:11:11:11:11')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_sha=12:11:11:11:11:11,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(src_mac='12:11:11:11:11:11')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_sha=12:11:11:11:11:11,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(src_mac='aa:aa:aa:aa:aa:aa')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_sha=12:11:11:11:11:11,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(src_mac='12:11:11:11:11:11')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_sha=12:11:11:11:11:11,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(src_mac='12:11:11:11:11:11')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_sha=12:11:11:11:11:11,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(src_mac='aa:aa:aa:aa:aa:aa')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_sha=12:11:11:11:11:11,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "value":"12:11:11:11:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/24_ARP_SHA_Mask.json b/ryu/tests/switch/of14/match/24_ARP_SHA_Mask.json new file mode 100644 index 00000000..d0a6fe79 --- /dev/null +++ b/ryu/tests/switch/of14/match/24_ARP_SHA_Mask.json @@ -0,0 +1,907 @@ +[ + "match: 24_ARP_SHA (Mask)", + { + "description":"ethernet/arp(src_mac='12:11:11:11:11:11')-->'arp_sha=12:11:11:00:11:11(mask=ff:ff:ff:00:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "mask":"ff:ff:ff:00:ff:ff", + "value":"12:11:11:00:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp(src_mac='12:11:11:11:11:11')-->'arp_sha=12:11:11:00:11:11(mask=ff:ff:ff:00:ff:ff),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "mask":"ff:ff:ff:00:ff:ff", + "value":"12:11:11:00:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp(src_mac='aa:aa:aa:aa:aa:aa')-->'arp_sha=12:11:11:00:11:11(mask=ff:ff:ff:00:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "mask":"ff:ff:ff:00:ff:ff", + "value":"12:11:11:00:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(src_mac='12:11:11:11:11:11')-->'arp_sha=12:11:11:00:11:11(mask=ff:ff:ff:00:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "mask":"ff:ff:ff:00:ff:ff", + "value":"12:11:11:00:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(src_mac='12:11:11:11:11:11')-->'arp_sha=12:11:11:00:11:11(mask=ff:ff:ff:00:ff:ff),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "mask":"ff:ff:ff:00:ff:ff", + "value":"12:11:11:00:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(src_mac='aa:aa:aa:aa:aa:aa')-->'arp_sha=12:11:11:00:11:11(mask=ff:ff:ff:00:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "mask":"ff:ff:ff:00:ff:ff", + "value":"12:11:11:00:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(src_mac='12:11:11:11:11:11')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_sha=12:11:11:00:11:11(mask=ff:ff:ff:00:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "mask":"ff:ff:ff:00:ff:ff", + "value":"12:11:11:00:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(src_mac='12:11:11:11:11:11')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_sha=12:11:11:00:11:11(mask=ff:ff:ff:00:ff:ff),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "mask":"ff:ff:ff:00:ff:ff", + "value":"12:11:11:00:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(src_mac='aa:aa:aa:aa:aa:aa')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_sha=12:11:11:00:11:11(mask=ff:ff:ff:00:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "mask":"ff:ff:ff:00:ff:ff", + "value":"12:11:11:00:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(src_mac='12:11:11:11:11:11')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_sha=12:11:11:00:11:11(mask=ff:ff:ff:00:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "mask":"ff:ff:ff:00:ff:ff", + "value":"12:11:11:00:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(src_mac='12:11:11:11:11:11')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_sha=12:11:11:00:11:11(mask=ff:ff:ff:00:ff:ff),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "mask":"ff:ff:ff:00:ff:ff", + "value":"12:11:11:00:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(src_mac='aa:aa:aa:aa:aa:aa')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_sha=12:11:11:00:11:11(mask=ff:ff:ff:00:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_sha", + "mask":"ff:ff:ff:00:ff:ff", + "value":"12:11:11:00:11:11" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/25_ARP_THA.json b/ryu/tests/switch/of14/match/25_ARP_THA.json new file mode 100644 index 00000000..559d1bf5 --- /dev/null +++ b/ryu/tests/switch/of14/match/25_ARP_THA.json @@ -0,0 +1,895 @@ +[ + "match: 25_ARP_THA", + { + "description":"ethernet/arp(dst_mac='22:22:22:22:22:22')-->'arp_tha=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp(dst_mac='22:22:22:22:22:22')-->'arp_tha=22:22:22:22:22:22,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp(dst_mac='ba:bb:bb:bb:bb:bb')-->'arp_tha=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(dst_mac='22:22:22:22:22:22')-->'arp_tha=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(dst_mac='22:22:22:22:22:22')-->'arp_tha=22:22:22:22:22:22,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(dst_mac='ba:bb:bb:bb:bb:bb')-->'arp_tha=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(dst_mac='22:22:22:22:22:22')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_tha=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(dst_mac='22:22:22:22:22:22')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_tha=22:22:22:22:22:22,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(dst_mac='ba:bb:bb:bb:bb:bb')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_tha=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(dst_mac='22:22:22:22:22:22')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_tha=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(dst_mac='22:22:22:22:22:22')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_tha=22:22:22:22:22:22,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(dst_mac='ba:bb:bb:bb:bb:bb')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_tha=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/25_ARP_THA_Mask.json b/ryu/tests/switch/of14/match/25_ARP_THA_Mask.json new file mode 100644 index 00000000..74712cfd --- /dev/null +++ b/ryu/tests/switch/of14/match/25_ARP_THA_Mask.json @@ -0,0 +1,907 @@ +[ + "match: 25_ARP_THA (Mask)", + { + "description":"ethernet/arp(dst_mac='22:22:22:22:22:22')-->'arp_tha=22:22:00:22:22:22(mask=ff:ff:00:ff:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "mask":"ff:ff:00:ff:ff:ff", + "value":"22:22:00:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp(dst_mac='22:22:22:22:22:22')-->'arp_tha=22:22:00:22:22:22(mask=ff:ff:00:ff:ff:ff),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "mask":"ff:ff:00:ff:ff:ff", + "value":"22:22:00:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp(dst_mac='ba:bb:bb:bb:bb:bb')-->'arp_tha=22:22:00:22:22:22(mask=ff:ff:00:ff:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "mask":"ff:ff:00:ff:ff:ff", + "value":"22:22:00:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(dst_mac='22:22:22:22:22:22')-->'arp_tha=22:22:00:22:22:22(mask=ff:ff:00:ff:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "mask":"ff:ff:00:ff:ff:ff", + "value":"22:22:00:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(dst_mac='22:22:22:22:22:22')-->'arp_tha=22:22:00:22:22:22(mask=ff:ff:00:ff:ff:ff),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "mask":"ff:ff:00:ff:ff:ff", + "value":"22:22:00:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/vlan/arp(dst_mac='ba:bb:bb:bb:bb:bb')-->'arp_tha=22:22:00:22:22:22(mask=ff:ff:00:ff:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "mask":"ff:ff:00:ff:ff:ff", + "value":"22:22:00:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(dst_mac='22:22:22:22:22:22')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_tha=22:22:00:22:22:22(mask=ff:ff:00:ff:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "mask":"ff:ff:00:ff:ff:ff", + "value":"22:22:00:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(dst_mac='22:22:22:22:22:22')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_tha=22:22:00:22:22:22(mask=ff:ff:00:ff:ff:ff),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "mask":"ff:ff:00:ff:ff:ff", + "value":"22:22:00:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/mpls/arp(dst_mac='ba:bb:bb:bb:bb:bb')-->'actions=pop_mpls:0x0806,goto_table:1','table_id:1,arp_tha=22:22:00:22:22:22(mask=ff:ff:00:ff:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":2054 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "mask":"ff:ff:00:ff:ff:ff", + "value":"22:22:00:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(dst_mac='22:22:22:22:22:22')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_tha=22:22:00:22:22:22(mask=ff:ff:00:ff:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "mask":"ff:ff:00:ff:ff:ff", + "value":"22:22:00:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(dst_mac='22:22:22:22:22:22')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_tha=22:22:00:22:22:22(mask=ff:ff:00:ff:ff:ff),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "mask":"ff:ff:00:ff:ff:ff", + "value":"22:22:00:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/arp(dst_mac='ba:bb:bb:bb:bb:bb')-->'actions=pop_pbb,goto_table:1','table_id:1,arp_tha=22:22:00:22:22:22(mask=ff:ff:00:ff:ff:ff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":2054 + } + }, + { + "OXMTlv":{ + "field":"arp_tha", + "mask":"ff:ff:00:ff:ff:ff", + "value":"22:22:00:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/26_IPV6_SRC.json b/ryu/tests/switch/of14/match/26_IPV6_SRC.json new file mode 100644 index 00000000..9ffc94e7 --- /dev/null +++ b/ryu/tests/switch/of14/match/26_IPV6_SRC.json @@ -0,0 +1,915 @@ +[ + "match: 26_IPV6_SRC", + { + "description":"ethernet/ipv6(src='10::10')/tcp-->'ipv6_src=10::10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "value":"10::10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6(src='10::10')/tcp-->'ipv6_src=10::10,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "value":"10::10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6(src='a0::a0')/tcp-->'ipv6_src=10::10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "value":"10::10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(src='10::10')/tcp-->'ipv6_src=10::10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "value":"10::10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(src='10::10')/tcp-->'ipv6_src=10::10,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "value":"10::10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(src='a0::a0')/tcp-->'ipv6_src=10::10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "value":"10::10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(src='10::10')/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_src=10::10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "value":"10::10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(src='10::10')/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_src=10::10,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "value":"10::10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(src='a0::a0')/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_src=10::10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "value":"10::10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(src='10::10')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_src=10::10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "value":"10::10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(src='10::10')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_src=10::10,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "value":"10::10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(src='a0::a0')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_src=10::10,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "value":"10::10" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/26_IPV6_SRC_Mask.json b/ryu/tests/switch/of14/match/26_IPV6_SRC_Mask.json new file mode 100644 index 00000000..6aff5b83 --- /dev/null +++ b/ryu/tests/switch/of14/match/26_IPV6_SRC_Mask.json @@ -0,0 +1,927 @@ +[ + "match: 26_IPV6_SRC (Mask)", + { + "description":"ethernet/ipv6(src='10::10')/tcp-->'ipv6_src=10::0(mask=ffff:ffff:ffff:ffff:ffff:ffff:ffff:0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "mask":"ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", + "value":"10::0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6(src='10::10')/tcp-->'ipv6_src=10::0(mask=ffff:ffff:ffff:ffff:ffff:ffff:ffff:0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "mask":"ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", + "value":"10::0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6(src='a0::a0')/tcp-->'ipv6_src=10::0(mask=ffff:ffff:ffff:ffff:ffff:ffff:ffff:0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "mask":"ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", + "value":"10::0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(src='10::10')/tcp-->'ipv6_src=10::0(mask=ffff:ffff:ffff:ffff:ffff:ffff:ffff:0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "mask":"ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", + "value":"10::0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(src='10::10')/tcp-->'ipv6_src=10::0(mask=ffff:ffff:ffff:ffff:ffff:ffff:ffff:0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "mask":"ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", + "value":"10::0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(src='a0::a0')/tcp-->'ipv6_src=10::0(mask=ffff:ffff:ffff:ffff:ffff:ffff:ffff:0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "mask":"ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", + "value":"10::0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(src='10::10')/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_src=10::0(mask=ffff:ffff:ffff:ffff:ffff:ffff:ffff:0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "mask":"ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", + "value":"10::0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(src='10::10')/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_src=10::0(mask=ffff:ffff:ffff:ffff:ffff:ffff:ffff:0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "mask":"ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", + "value":"10::0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(src='a0::a0')/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_src=10::0(mask=ffff:ffff:ffff:ffff:ffff:ffff:ffff:0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "mask":"ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", + "value":"10::0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(src='10::10')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_src=10::0(mask=ffff:ffff:ffff:ffff:ffff:ffff:ffff:0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "mask":"ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", + "value":"10::0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(src='10::10')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_src=10::0(mask=ffff:ffff:ffff:ffff:ffff:ffff:ffff:0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "mask":"ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", + "value":"10::0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(src='a0::a0')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_src=10::0(mask=ffff:ffff:ffff:ffff:ffff:ffff:ffff:0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_src", + "mask":"ffff:ffff:ffff:ffff:ffff:ffff:ffff:0", + "value":"10::0" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/27_IPV6_DST.json b/ryu/tests/switch/of14/match/27_IPV6_DST.json new file mode 100644 index 00000000..05a087f3 --- /dev/null +++ b/ryu/tests/switch/of14/match/27_IPV6_DST.json @@ -0,0 +1,915 @@ +[ + "match: 27_IPV6_DST", + { + "description":"ethernet/ipv6(dst='20::20')/tcp-->'ipv6_dst=20::20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6(dst='20::20')/tcp-->'ipv6_dst=20::20,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6(dst='b0::b0')/tcp-->'ipv6_dst=20::20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(dst='20::20')/tcp-->'ipv6_dst=20::20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(dst='20::20')/tcp-->'ipv6_dst=20::20,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(dst='b0::b0')/tcp-->'ipv6_dst=20::20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(dst='20::20')/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_dst=20::20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(dst='20::20')/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_dst=20::20,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(dst='b0::b0')/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_dst=20::20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(dst='20::20')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_dst=20::20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(dst='20::20')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_dst=20::20,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(dst='b0::b0')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_dst=20::20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/27_IPV6_DST_Mask.json b/ryu/tests/switch/of14/match/27_IPV6_DST_Mask.json new file mode 100644 index 00000000..34a9ec8b --- /dev/null +++ b/ryu/tests/switch/of14/match/27_IPV6_DST_Mask.json @@ -0,0 +1,927 @@ +[ + "match: 27_IPV6_DST (Mask)", + { + "description":"ethernet/ipv6(dst='20::20')/tcp-->'ipv6_dst=0::20(mask=0:ffff:ffff:ffff:ffff:ffff:ffff:ffff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "mask":"0:ffff:ffff:ffff:ffff:ffff:ffff:ffff", + "value":"0::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6(dst='20::20')/tcp-->'ipv6_dst=0::20(mask=0:ffff:ffff:ffff:ffff:ffff:ffff:ffff),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "mask":"0:ffff:ffff:ffff:ffff:ffff:ffff:ffff", + "value":"0::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6(dst='b0::b0')/tcp-->'ipv6_dst=0::20(mask=0:ffff:ffff:ffff:ffff:ffff:ffff:ffff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "mask":"0:ffff:ffff:ffff:ffff:ffff:ffff:ffff", + "value":"0::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(dst='20::20')/tcp-->'ipv6_dst=0::20(mask=0:ffff:ffff:ffff:ffff:ffff:ffff:ffff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "mask":"0:ffff:ffff:ffff:ffff:ffff:ffff:ffff", + "value":"0::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(dst='20::20')/tcp-->'ipv6_dst=0::20(mask=0:ffff:ffff:ffff:ffff:ffff:ffff:ffff),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "mask":"0:ffff:ffff:ffff:ffff:ffff:ffff:ffff", + "value":"0::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(dst='b0::b0')/tcp-->'ipv6_dst=0::20(mask=0:ffff:ffff:ffff:ffff:ffff:ffff:ffff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "mask":"0:ffff:ffff:ffff:ffff:ffff:ffff:ffff", + "value":"0::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(dst='20::20')/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_dst=0::20(mask=0:ffff:ffff:ffff:ffff:ffff:ffff:ffff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "mask":"0:ffff:ffff:ffff:ffff:ffff:ffff:ffff", + "value":"0::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(dst='20::20')/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_dst=0::20(mask=0:ffff:ffff:ffff:ffff:ffff:ffff:ffff),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "mask":"0:ffff:ffff:ffff:ffff:ffff:ffff:ffff", + "value":"0::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(dst='b0::b0')/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_dst=0::20(mask=0:ffff:ffff:ffff:ffff:ffff:ffff:ffff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "mask":"0:ffff:ffff:ffff:ffff:ffff:ffff:ffff", + "value":"0::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(dst='20::20')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_dst=0::20(mask=0:ffff:ffff:ffff:ffff:ffff:ffff:ffff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "mask":"0:ffff:ffff:ffff:ffff:ffff:ffff:ffff", + "value":"0::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(dst='20::20')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_dst=0::20(mask=0:ffff:ffff:ffff:ffff:ffff:ffff:ffff),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "mask":"0:ffff:ffff:ffff:ffff:ffff:ffff:ffff", + "value":"0::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(dst='b0::b0')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_dst=0::20(mask=0:ffff:ffff:ffff:ffff:ffff:ffff:ffff),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_dst", + "mask":"0:ffff:ffff:ffff:ffff:ffff:ffff:ffff", + "value":"0::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/28_IPV6_FLABEL.json b/ryu/tests/switch/of14/match/28_IPV6_FLABEL.json new file mode 100644 index 00000000..13481342 --- /dev/null +++ b/ryu/tests/switch/of14/match/28_IPV6_FLABEL.json @@ -0,0 +1,915 @@ +[ + "match: 28_IPV6_FLABEL", + { + "description":"ethernet/ipv6(flow_label=100)/tcp-->'ipv6_flabel=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6(flow_label=100)/tcp-->'ipv6_flabel=100,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6(flow_label=203)/tcp-->'ipv6_flabel=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(flow_label=100)/tcp-->'ipv6_flabel=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(flow_label=100)/tcp-->'ipv6_flabel=100,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(flow_label=203)/tcp-->'ipv6_flabel=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(flow_label=100)/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_flabel=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(flow_label=100)/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_flabel=100,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(flow_label=203)/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_flabel=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(flow_label=100)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_flabel=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(flow_label=100)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_flabel=100,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(flow_label=203)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_flabel=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/28_IPV6_FLABEL_Mask.json b/ryu/tests/switch/of14/match/28_IPV6_FLABEL_Mask.json new file mode 100644 index 00000000..6d588713 --- /dev/null +++ b/ryu/tests/switch/of14/match/28_IPV6_FLABEL_Mask.json @@ -0,0 +1,927 @@ +[ + "match: 28_IPV6_FLABEL (Mask)", + { + "description":"ethernet/ipv6(flow_label=100)/tcp-->'ipv6_flabel=96(mask=0x000ffff0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "mask":1048560, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6(flow_label=100)/tcp-->'ipv6_flabel=96(mask=0x000ffff0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "mask":1048560, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6(flow_label=203)/tcp-->'ipv6_flabel=96(mask=0x000ffff0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "mask":1048560, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(flow_label=100)/tcp-->'ipv6_flabel=96(mask=0x000ffff0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "mask":1048560, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(flow_label=100)/tcp-->'ipv6_flabel=96(mask=0x000ffff0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "mask":1048560, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(flow_label=203)/tcp-->'ipv6_flabel=96(mask=0x000ffff0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "mask":1048560, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(flow_label=100)/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_flabel=96(mask=0x000ffff0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "mask":1048560, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(flow_label=100)/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_flabel=96(mask=0x000ffff0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "mask":1048560, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(flow_label=203)/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_flabel=96(mask=0x000ffff0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "mask":1048560, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(flow_label=100)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_flabel=96(mask=0x000ffff0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "mask":1048560, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(flow_label=100)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_flabel=96(mask=0x000ffff0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "mask":1048560, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(flow_label=203)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_flabel=96(mask=0x000ffff0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_flabel", + "mask":1048560, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/29_ICMPV6_TYPE.json b/ryu/tests/switch/of14/match/29_ICMPV6_TYPE.json new file mode 100644 index 00000000..03cc87b8 --- /dev/null +++ b/ryu/tests/switch/of14/match/29_ICMPV6_TYPE.json @@ -0,0 +1,967 @@ +[ + "match: 29_ICMPV6_TYPE", + { + "description":"ethernet/ipv6/icmpv6(type=128)-->'icmpv6_type=128,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":128 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ] + } + ] + }, + { + "description":"ethernet/ipv6/icmpv6(type=128)-->'icmpv6_type=128,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":128 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ] + } + ] + }, + { + "description":"ethernet/ipv6/icmpv6(type=135)-->'icmpv6_type=128,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":128 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=58, hop_limit=127, traffic_class=65)", + "icmpv6(code=1,data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa'),dst='a0::a0'),type_=135)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/icmpv6(type=128)-->'icmpv6_type=128,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":128 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/icmpv6(type=128)-->'icmpv6_type=128,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":128 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/icmpv6(type=135)-->'icmpv6_type=128,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":128 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=58, hop_limit=127, traffic_class=65)", + "icmpv6(code=1,data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa'),dst='a0::a0'),type_=135)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/icmpv6(type=128)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,icmpv6_type=128,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":128 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/icmpv6(type=128)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,icmpv6_type=128,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":128 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/icmpv6(type=135)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,icmpv6_type=128,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":128 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=58, hop_limit=127, traffic_class=65)", + "icmpv6(code=1,data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa'),dst='a0::a0'),type_=135)" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/icmpv6(type=128)-->'actions=pop_pbb,goto_table:1','table_id:1,icmpv6_type=128,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":128 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/icmpv6(type=128)-->'actions=pop_pbb,goto_table:1','table_id:1,icmpv6_type=128,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":128 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/icmpv6(type=135)-->'actions=pop_pbb,goto_table:1','table_id:1,icmpv6_type=128,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":128 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=58, hop_limit=127, traffic_class=65)", + "icmpv6(code=1,data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa'),dst='a0::a0'),type_=135)" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/30_ICMPV6_CODE.json b/ryu/tests/switch/of14/match/30_ICMPV6_CODE.json new file mode 100644 index 00000000..e5843658 --- /dev/null +++ b/ryu/tests/switch/of14/match/30_ICMPV6_CODE.json @@ -0,0 +1,967 @@ +[ + "match: 30_ICMPV6_CODE", + { + "description":"ethernet/ipv6/icmpv6(code=0)-->'icmpv6_code=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ] + } + ] + }, + { + "description":"ethernet/ipv6/icmpv6(code=0)-->'icmpv6_code=0,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ] + } + ] + }, + { + "description":"ethernet/ipv6/icmpv6(code=1)-->'icmpv6_code=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=58, hop_limit=127, traffic_class=65)", + "icmpv6(code=1,data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa'),dst='a0::a0'),type_=135)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/icmpv6(code=0)-->'icmpv6_code=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/icmpv6(code=0)-->'icmpv6_code=0,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/icmpv6(code=1)-->'icmpv6_code=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=58, hop_limit=127, traffic_class=65)", + "icmpv6(code=1,data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa'),dst='a0::a0'),type_=135)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/icmpv6(code=0)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,icmpv6_code=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/icmpv6(code=0)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,icmpv6_code=0,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/icmpv6(code=1)-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,icmpv6_code=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=58, hop_limit=127, traffic_class=65)", + "icmpv6(code=1,data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa'),dst='a0::a0'),type_=135)" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/icmpv6(code=0)-->'actions=pop_pbb,goto_table:1','table_id:1,icmpv6_code=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/icmpv6(code=0)-->'actions=pop_pbb,goto_table:1','table_id:1,icmpv6_code=0,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=echo(data='\\x00\\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 !\"#$%&\\'()*+,-./0123'),type_=128)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/icmpv6(code=1)-->'actions=pop_pbb,goto_table:1','table_id:1,icmpv6_code=0,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_code", + "value":0 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=58, hop_limit=127, traffic_class=65)", + "icmpv6(code=1,data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa'),dst='a0::a0'),type_=135)" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/31_IPV6_ND_TARGET.json b/ryu/tests/switch/of14/match/31_IPV6_ND_TARGET.json new file mode 100644 index 00000000..72d59e1b --- /dev/null +++ b/ryu/tests/switch/of14/match/31_IPV6_ND_TARGET.json @@ -0,0 +1,1039 @@ +[ + "match: 31_IPV6_ND_TARGET", + { + "description":"ethernet/ipv6/icmpv6(data=nd_neighbor(dst='20::20'))-->'ipv6_nd_target=20::20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_target", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='12:11:11:11:11:11'),dst='20::20'),type_=135)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='12:11:11:11:11:11'),dst='20::20'),type_=135)" + ] + } + ] + }, + { + "description":"ethernet/ipv6/icmpv6(data=nd_neighbor(dst='20::20'))-->'ipv6_nd_target=20::20,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_target", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='12:11:11:11:11:11'),dst='20::20'),type_=135)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='12:11:11:11:11:11'),dst='20::20'),type_=135)" + ] + } + ] + }, + { + "description":"ethernet/ipv6/icmpv6(data=nd_neighbor(dst='b0::b0'))-->'ipv6_nd_target=20::20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_target", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=58, hop_limit=127, traffic_class=65)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa'),dst='b0::b0'),type_=135)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/icmpv6(data=nd_neighbor(dst='20::20'))-->'ipv6_nd_target=20::20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_target", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='12:11:11:11:11:11'),dst='20::20'),type_=135)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='12:11:11:11:11:11'),dst='20::20'),type_=135)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/icmpv6(data=nd_neighbor(dst='20::20'))-->'ipv6_nd_target=20::20,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_target", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='12:11:11:11:11:11'),dst='20::20'),type_=135)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='12:11:11:11:11:11'),dst='20::20'),type_=135)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/icmpv6(data=nd_neighbor(dst='b0::b0'))-->'ipv6_nd_target=20::20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_target", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=58, hop_limit=127, traffic_class=65)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa'),dst='b0::b0'),type_=135)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/icmpv6(data=nd_neighbor(dst='20::20'))-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_nd_target=20::20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_target", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='12:11:11:11:11:11'),dst='20::20'),type_=135)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='12:11:11:11:11:11'),dst='20::20'),type_=135)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/icmpv6(data=nd_neighbor(dst='20::20'))-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_nd_target=20::20,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_target", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='12:11:11:11:11:11'),dst='20::20'),type_=135)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='12:11:11:11:11:11'),dst='20::20'),type_=135)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/icmpv6(data=nd_neighbor(dst='b0::b0'))-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_nd_target=20::20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_target", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=58, hop_limit=127, traffic_class=65)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa'),dst='b0::b0'),type_=135)" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/icmpv6(data=nd_neighbor(dst='20::20'))-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_nd_target=20::20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_target", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='12:11:11:11:11:11'),dst='20::20'),type_=135)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='12:11:11:11:11:11'),dst='20::20'),type_=135)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/icmpv6(data=nd_neighbor(dst='20::20'))-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_nd_target=20::20,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_target", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='12:11:11:11:11:11'),dst='20::20'),type_=135)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='12:11:11:11:11:11'),dst='20::20'),type_=135)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/icmpv6(data=nd_neighbor(dst='b0::b0'))-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_nd_target=20::20,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_target", + "value":"20::20" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=58, hop_limit=127, traffic_class=65)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa'),dst='b0::b0'),type_=135)" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/32_IPV6_ND_SLL.json b/ryu/tests/switch/of14/match/32_IPV6_ND_SLL.json new file mode 100644 index 00000000..0d130ba1 --- /dev/null +++ b/ryu/tests/switch/of14/match/32_IPV6_ND_SLL.json @@ -0,0 +1,1039 @@ +[ + "match: 32_IPV6_ND_SLL", + { + "description":"ethernet/ipv6/icmpv6(data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22')))-->'ipv6_nd_sll=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_sll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=135)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=135)" + ] + } + ] + }, + { + "description":"ethernet/ipv6/icmpv6(data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22')))-->'ipv6_nd_sll=22:22:22:22:22:22,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_sll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=135)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=135)" + ] + } + ] + }, + { + "description":"ethernet/ipv6/icmpv6(data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa')))-->'ipv6_nd_sll=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_sll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=58, hop_limit=127, traffic_class=65)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa'),dst='b0::b0'),type_=135)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/icmpv6(data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22')))-->'ipv6_nd_sll=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_sll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=135)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=135)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/icmpv6(data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22')))-->'ipv6_nd_sll=22:22:22:22:22:22,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_sll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=135)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=135)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/icmpv6(data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa')))-->'ipv6_nd_sll=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_sll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=58, hop_limit=127, traffic_class=65)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa'),dst='b0::b0'),type_=135)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/icmpv6(data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22')))-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_nd_sll=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_sll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=135)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=135)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/icmpv6(data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22')))-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_nd_sll=22:22:22:22:22:22,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_sll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=135)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=135)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/icmpv6(data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa')))-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_nd_sll=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_sll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=58, hop_limit=127, traffic_class=65)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa'),dst='b0::b0'),type_=135)" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/icmpv6(data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22')))-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_nd_sll=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_sll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=135)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=135)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/icmpv6(data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22')))-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_nd_sll=22:22:22:22:22:22,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_sll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=135)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=135)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/icmpv6(data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa')))-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_nd_sll=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":135 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_sll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=58, hop_limit=127, traffic_class=65)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_sla(hw_src='aa:aa:aa:aa:aa:aa'),dst='b0::b0'),type_=135)" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/33_IPV6_ND_TLL.json b/ryu/tests/switch/of14/match/33_IPV6_ND_TLL.json new file mode 100644 index 00000000..b6cb2c61 --- /dev/null +++ b/ryu/tests/switch/of14/match/33_IPV6_ND_TLL.json @@ -0,0 +1,1039 @@ +[ + "match: 33_IPV6_ND_TLL", + { + "description":"ethernet/ipv6/icmpv6(data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22')))-->'ipv6_nd_tll=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":136 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_tll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=136)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=136)" + ] + } + ] + }, + { + "description":"ethernet/ipv6/icmpv6(data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22')))-->'ipv6_nd_tll=22:22:22:22:22:22,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":136 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_tll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=136)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=136)" + ] + } + ] + }, + { + "description":"ethernet/ipv6/icmpv6(data=nd_neighbor(option=nd_option_tla(hw_src='aa:aa:aa:aa:aa:aa')))-->'ipv6_nd_tll=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":136 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_tll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=58, hop_limit=127, traffic_class=65)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='aa:aa:aa:aa:aa:aa'),dst='b0::b0'),type_=136)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/icmpv6(data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22')))-->'ipv6_nd_tll=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":136 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_tll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=136)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=136)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/icmpv6(data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22')))-->'ipv6_nd_tll=22:22:22:22:22:22,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":136 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_tll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=136)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=136)" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/icmpv6(data=nd_neighbor(option=nd_option_tla(hw_src='aa:aa:aa:aa:aa:aa')))-->'ipv6_nd_tll=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":136 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_tll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=58, hop_limit=127, traffic_class=65)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='aa:aa:aa:aa:aa:aa'),dst='b0::b0'),type_=136)" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/icmpv6(data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22')))-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_nd_tll=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":136 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_tll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=136)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=136)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/icmpv6(data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22')))-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_nd_tll=22:22:22:22:22:22,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":136 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_tll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=136)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=136)" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/icmpv6(data=nd_neighbor(option=nd_option_tla(hw_src='aa:aa:aa:aa:aa:aa')))-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_nd_tll=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":136 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_tll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=58, hop_limit=127, traffic_class=65)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='aa:aa:aa:aa:aa:aa'),dst='b0::b0'),type_=136)" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/icmpv6(data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22')))-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_nd_tll=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":136 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_tll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=136)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=136)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/icmpv6(data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22')))-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_nd_tll=22:22:22:22:22:22,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":136 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_tll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=136)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=58, hop_limit=64, traffic_class=32)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='22:22:22:22:22:22'),dst='20::20'),type_=136)" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/icmpv6(data=nd_neighbor(option=nd_option_tla(hw_src='aa:aa:aa:aa:aa:aa')))-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_nd_tll=22:22:22:22:22:22,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ip_proto", + "value":58 + } + }, + { + "OXMTlv":{ + "field":"icmpv6_type", + "value":136 + } + }, + { + "OXMTlv":{ + "field":"ipv6_nd_tll", + "value":"22:22:22:22:22:22" + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=58, hop_limit=127, traffic_class=65)", + "icmpv6(code=0,data=nd_neighbor(option=nd_option_tla(hw_src='aa:aa:aa:aa:aa:aa'),dst='b0::b0'),type_=136)" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/34_MPLS_LABEL.json b/ryu/tests/switch/of14/match/34_MPLS_LABEL.json new file mode 100644 index 00000000..05628c55 --- /dev/null +++ b/ryu/tests/switch/of14/match/34_MPLS_LABEL.json @@ -0,0 +1,529 @@ +[ + "match: 34_MPLS_LABEL", + { + "description":"ethernet/mpls(label=100)/ipv4/tcp-->'mpls_label=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_label", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls(label=100)/ipv4/tcp-->'mpls_label=100,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_label", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls(label=203)/ipv4/tcp-->'mpls_label=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_label", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls(label=100)/ipv6/tcp-->'mpls_label=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_label", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls(label=100)/ipv6/tcp-->'mpls_label=100,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_label", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls(label=203)/ipv6/tcp-->'mpls_label=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_label", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls(label=100)/arp-->'mpls_label=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_label", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * 30)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/mpls(label=100)/arp-->'mpls_label=100,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_label", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * 30)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/mpls(label=203)/arp-->'mpls_label=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_label", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "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')", + "str('\\x00' * 30)" + ], + "table-miss":[ + 0 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/35_MPLS_TC.json b/ryu/tests/switch/of14/match/35_MPLS_TC.json new file mode 100644 index 00000000..e8038d70 --- /dev/null +++ b/ryu/tests/switch/of14/match/35_MPLS_TC.json @@ -0,0 +1,529 @@ +[ + "match: 35_MPLS_TC", + { + "description":"ethernet/mpls(exp=3)/ipv4/tcp-->'mpls_tc=3,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_tc", + "value":3 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls(exp=3)/ipv4/tcp-->'mpls_tc=3,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_tc", + "value":3 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls(exp=5)/ipv4/tcp-->'mpls_tc=3,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_tc", + "value":3 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls(exp=3)/ipv6/tcp-->'mpls_tc=3,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_tc", + "value":3 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls(exp=3)/ipv6/tcp-->'mpls_tc=3,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_tc", + "value":3 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls(exp=5)/ipv6/tcp-->'mpls_tc=3,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_tc", + "value":3 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls(exp=3)/arp-->'mpls_tc=3,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_tc", + "value":3 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * 30)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/mpls(exp=3)/arp-->'mpls_tc=3,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_tc", + "value":3 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * 30)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/mpls(exp=5)/arp-->'mpls_tc=3,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_tc", + "value":3 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "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')", + "str('\\x00' * 30)" + ], + "table-miss":[ + 0 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/36_MPLS_BOS.json b/ryu/tests/switch/of14/match/36_MPLS_BOS.json new file mode 100644 index 00000000..6cc47aa8 --- /dev/null +++ b/ryu/tests/switch/of14/match/36_MPLS_BOS.json @@ -0,0 +1,532 @@ +[ + "match: 36_MPLS_BOS", + { + "description":"ethernet/mpls(bsb=1)/ipv4/tcp-->'mpls_bos=1,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_bos", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls(bsb=1)/ipv4/tcp-->'mpls_bos=1,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_bos", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls(bsb=0)/mpls(bsb=1)/ipv4/tcp-->'mpls_bos=1,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_bos", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=0, label=203, exp=5, ttl=127)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls(bsb=1)/ipv6/tcp-->'mpls_bos=1,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_bos", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls(bsb=1)/ipv6/tcp-->'mpls_bos=1,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_bos", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls(bsb=0)/mpls(bsb=1)/ipv6/tcp-->'mpls_bos=1,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_bos", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=0, label=203, exp=5, ttl=127)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls(bsb=1)/arp-->'mpls_bos=1,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_bos", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * 30)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/mpls(bsb=1)/arp-->'mpls_bos=1,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_bos", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * 30)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/mpls(bsb=0)/mpls(bsb=1)/arp-->'mpls_bos=1,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + }, + { + "OXMTlv":{ + "field":"mpls_bos", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=0, label=203, exp=5, ttl=127)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "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')", + "str('\\x00' * 30)" + ], + "table-miss":[ + 0 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/37_PBB_ISID.json b/ryu/tests/switch/of14/match/37_PBB_ISID.json new file mode 100644 index 00000000..fb9b7857 --- /dev/null +++ b/ryu/tests/switch/of14/match/37_PBB_ISID.json @@ -0,0 +1,589 @@ +[ + "match: 37_PBB_ISID", + { + "description":"ethernet/svlan/itag(sid=100)/ethernet/svlan/vlan/ipv4/tcp-->'pbb_isid=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + }, + { + "OXMTlv":{ + "field":"pbb_isid", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/svlan/itag(sid=100)/ethernet/svlan/vlan/ipv4/tcp-->'pbb_isid=100,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + }, + { + "OXMTlv":{ + "field":"pbb_isid", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/svlan/itag(sid=203)/ethernet/svlan/vlan/ipv4/tcp-->'pbb_isid=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + }, + { + "OXMTlv":{ + "field":"pbb_isid", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/svlan/itag(sid=100)/ethernet/svlan/vlan/ipv6/tcp-->'pbb_isid=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + }, + { + "OXMTlv":{ + "field":"pbb_isid", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/svlan/itag(sid=100)/ethernet/svlan/vlan/ipv6/tcp-->'pbb_isid=100,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + }, + { + "OXMTlv":{ + "field":"pbb_isid", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/svlan/itag(sid=203)/ethernet/svlan/vlan/ipv6/tcp-->'pbb_isid=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + }, + { + "OXMTlv":{ + "field":"pbb_isid", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/svlan/itag(sid=100)/ethernet/svlan/vlan/arp-->'pbb_isid=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + }, + { + "OXMTlv":{ + "field":"pbb_isid", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/svlan/itag(sid=100)/ethernet/svlan/vlan/arp-->'pbb_isid=100,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + }, + { + "OXMTlv":{ + "field":"pbb_isid", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/svlan/itag(sid=203)/ethernet/svlan/vlan/arp-->'pbb_isid=100,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + }, + { + "OXMTlv":{ + "field":"pbb_isid", + "value":100 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "table-miss":[ + 0 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/37_PBB_ISID_Mask.json b/ryu/tests/switch/of14/match/37_PBB_ISID_Mask.json new file mode 100644 index 00000000..644ffc16 --- /dev/null +++ b/ryu/tests/switch/of14/match/37_PBB_ISID_Mask.json @@ -0,0 +1,598 @@ +[ + "match: 37_PBB_ISID (Mask)", + { + "description":"ethernet/svlan/itag(sid=100)/ethernet/svlan/vlan/ipv4/tcp-->'pbb_isid=96(mask=0xf0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + }, + { + "OXMTlv":{ + "field":"pbb_isid", + "mask":240, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/svlan/itag(sid=100)/ethernet/svlan/vlan/ipv4/tcp-->'pbb_isid=96(mask=0xf0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + }, + { + "OXMTlv":{ + "field":"pbb_isid", + "mask":240, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/svlan/itag(sid=203)/ethernet/svlan/vlan/ipv4/tcp-->'pbb_isid=96(mask=0xf0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + }, + { + "OXMTlv":{ + "field":"pbb_isid", + "mask":240, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)", + "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/svlan/itag(sid=100)/ethernet/svlan/vlan/ipv6/tcp-->'pbb_isid=96(mask=0xf0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + }, + { + "OXMTlv":{ + "field":"pbb_isid", + "mask":240, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/svlan/itag(sid=100)/ethernet/svlan/vlan/ipv6/tcp-->'pbb_isid=96(mask=0xf0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + }, + { + "OXMTlv":{ + "field":"pbb_isid", + "mask":240, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/svlan/itag(sid=203)/ethernet/svlan/vlan/ipv6/tcp-->'pbb_isid=96(mask=0xf0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + }, + { + "OXMTlv":{ + "field":"pbb_isid", + "mask":240, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/svlan/itag(sid=100)/ethernet/svlan/vlan/arp-->'pbb_isid=96(mask=0xf0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + }, + { + "OXMTlv":{ + "field":"pbb_isid", + "mask":240, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/svlan/itag(sid=100)/ethernet/svlan/vlan/arp-->'pbb_isid=96(mask=0xf0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + }, + { + "OXMTlv":{ + "field":"pbb_isid", + "mask":240, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ] + } + ] + }, + { + "description":"ethernet/svlan/itag(sid=203)/ethernet/svlan/vlan/arp-->'pbb_isid=96(mask=0xf0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + }, + { + "OXMTlv":{ + "field":"pbb_isid", + "mask":240, + "value":96 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34984)", + "svlan(ethertype=35047, vid=10)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34984)", + "svlan(ethertype=33024, vid=10)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=2054)", + "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')", + "str('\\x00' * 30)" + ], + "table-miss":[ + 0 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/38_TUNNEL_ID.json b/ryu/tests/switch/of14/match/38_TUNNEL_ID.json new file mode 100644 index 00000000..4b739c58 --- /dev/null +++ b/ryu/tests/switch/of14/match/38_TUNNEL_ID.json @@ -0,0 +1,829 @@ +[ + "match: 38_TUNNEL_ID", + { + "description":"ethernet/ipv4/tcp-->'actions=set_field:12345->tunnel_id,goto_table:1','table_id:1,tunnel_id=12345,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionSetField":{ + "field":{ + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4/tcp-->'actions=set_field:12345->tunnel_id,goto_table:1','table_id:1,tunnel_id=12345,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionSetField":{ + "field":{ + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4/tcp-->'actions=set_field:6666->tunnel_id,goto_table:1','table_id:1,tunnel_id=12345,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionSetField":{ + "field":{ + "OXMTlv":{ + "field":"tunnel_id", + "value":6666 + } + } + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp-->'actions=set_field:12345->tunnel_id,goto_table:1','table_id:1,tunnel_id=12345,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionSetField":{ + "field":{ + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp-->'actions=set_field:12345->tunnel_id,goto_table:1','table_id:1,tunnel_id=12345,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionSetField":{ + "field":{ + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp-->'actions=set_field:6666->tunnel_id,goto_table:1','table_id:1,tunnel_id=12345,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionSetField":{ + "field":{ + "OXMTlv":{ + "field":"tunnel_id", + "value":6666 + } + } + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/arp-->'actions=set_field:12345->tunnel_id,goto_table:1','table_id:1,tunnel_id=12345,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionSetField":{ + "field":{ + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp-->'actions=set_field:12345->tunnel_id,goto_table:1','table_id:1,tunnel_id=12345,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionSetField":{ + "field":{ + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp-->'actions=set_field:6666->tunnel_id,goto_table:1','table_id:1,tunnel_id=12345,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionSetField":{ + "field":{ + "OXMTlv":{ + "field":"tunnel_id", + "value":6666 + } + } + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/38_TUNNEL_ID_Mask.json b/ryu/tests/switch/of14/match/38_TUNNEL_ID_Mask.json new file mode 100644 index 00000000..99aa0418 --- /dev/null +++ b/ryu/tests/switch/of14/match/38_TUNNEL_ID_Mask.json @@ -0,0 +1,838 @@ +[ + "match: 38_TUNNEL_ID (Mask)", + { + "description":"ethernet/ipv4/tcp-->'actions=set_field:12345->tunnel_id,goto_table:1','table_id:1,tunnel_id=12288(mask=0xff00),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionSetField":{ + "field":{ + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"tunnel_id", + "mask":65280, + "value":12288 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4/tcp-->'actions=set_field:12345->tunnel_id,goto_table:1','table_id:1,tunnel_id=12288(mask=0xff00),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionSetField":{ + "field":{ + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"tunnel_id", + "mask":65280, + "value":12288 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv4/tcp-->'actions=set_field:6666->tunnel_id,goto_table:1','table_id:1,tunnel_id=12288(mask=0xff00),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionSetField":{ + "field":{ + "OXMTlv":{ + "field":"tunnel_id", + "value":6666 + } + } + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"tunnel_id", + "mask":65280, + "value":12288 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)", + "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp-->'actions=set_field:12345->tunnel_id,goto_table:1','table_id:1,tunnel_id=12288(mask=0xff00),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionSetField":{ + "field":{ + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"tunnel_id", + "mask":65280, + "value":12288 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp-->'actions=set_field:12345->tunnel_id,goto_table:1','table_id:1,tunnel_id=12288(mask=0xff00),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionSetField":{ + "field":{ + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"tunnel_id", + "mask":65280, + "value":12288 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp-->'actions=set_field:6666->tunnel_id,goto_table:1','table_id:1,tunnel_id=12288(mask=0xff00),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionSetField":{ + "field":{ + "OXMTlv":{ + "field":"tunnel_id", + "value":6666 + } + } + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"tunnel_id", + "mask":65280, + "value":12288 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/arp-->'actions=set_field:12345->tunnel_id,goto_table:1','table_id:1,tunnel_id=12288(mask=0xff00),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionSetField":{ + "field":{ + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"tunnel_id", + "mask":65280, + "value":12288 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp-->'actions=set_field:12345->tunnel_id,goto_table:1','table_id:1,tunnel_id=12288(mask=0xff00),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionSetField":{ + "field":{ + "OXMTlv":{ + "field":"tunnel_id", + "value":12345 + } + } + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"tunnel_id", + "mask":65280, + "value":12288 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ] + } + ] + }, + { + "description":"ethernet/arp-->'actions=set_field:6666->tunnel_id,goto_table:1','table_id:1,tunnel_id=12288(mask=0xff00),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"in_port", + "value":1 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionSetField":{ + "field":{ + "OXMTlv":{ + "field":"tunnel_id", + "value":6666 + } + } + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"tunnel_id", + "mask":65280, + "value":12288 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)", + "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')", + "str('\\x00' * (60 - 42))" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/39_IPV6_EXTHDR.json b/ryu/tests/switch/of14/match/39_IPV6_EXTHDR.json new file mode 100644 index 00000000..a65c6f2b --- /dev/null +++ b/ryu/tests/switch/of14/match/39_IPV6_EXTHDR.json @@ -0,0 +1,915 @@ +[ + "match: 39_IPV6_EXTHDR", + { + "description":"ethernet/ipv6(ext_hdrs=[hop_opts,auth]/tcp-->'ipv6_exthdr=68,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "value":68 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6(ext_hdrs=[hop_opts,auth])/tcp-->'ipv6_exthdr=68,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "value":68 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp-->'ipv6_exthdr=68,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "value":68 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(ext_hdrs=[hop_opts,auth])/tcp-->'ipv6_exthdr=68,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "value":68 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(ext_hdrs=[hop_opts,auth])/tcp-->'ipv6_exthdr=68,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "value":68 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/tcp-->'ipv6_exthdr=68,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "value":68 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(ext_hdrs=[hop_opts,auth])/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_exthdr=68,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "value":68 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(ext_hdrs=[hop_opts,auth])/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_exthdr=68,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "value":68 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_exthdr=68,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "value":68 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(ext_hdrs=[hop_opts,auth])/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_exthdr=68,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "value":68 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(ext_hdrs=[hop_opts,auth])/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_exthdr=68,actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "value":68 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_exthdr=68,actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "value":68 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] diff --git a/ryu/tests/switch/of14/match/39_IPV6_EXTHDR_Mask.json b/ryu/tests/switch/of14/match/39_IPV6_EXTHDR_Mask.json new file mode 100644 index 00000000..e4d48fb1 --- /dev/null +++ b/ryu/tests/switch/of14/match/39_IPV6_EXTHDR_Mask.json @@ -0,0 +1,927 @@ +[ + "match: 39_IPV6_EXTHDR (Mask)", + { + "description":"ethernet/ipv6(ext_hdrs=[hop_opts,auth])/tcp-->'ipv6_exthdr=64(mask=0x1f0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "mask":496, + "value":64 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6(ext_hdrs=[hop_opts,auth])/tcp-->'ipv6_exthdr=64(mask=0x1f0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "mask":496, + "value":64 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/ipv6/tcp-->'ipv6_exthdr=64(mask=0x1f0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "mask":496, + "value":64 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(ext_hdrs=[hop_opts,auth])/tcp-->'ipv6_exthdr=64(mask=0x1f0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "mask":496, + "value":64 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6(ext_hdrs=[hop_opts,auth])/tcp-->'ipv6_exthdr=64(mask=0x1f0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "mask":496, + "value":64 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)", + "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/vlan/ipv6/tcp-->'ipv6_exthdr=64(mask=0x1f0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "mask":496, + "value":64 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)", + "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 0 + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(ext_hdrs=[hop_opts,auth])/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_exthdr=64(mask=0x1f0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "mask":496, + "value":64 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6(ext_hdrs=[hop_opts,auth])/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_exthdr=64(mask=0x1f0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "mask":496, + "value":64 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)", + "mpls(bsb=1, label=100, exp=3, ttl=64)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/mpls/ipv6/tcp-->'actions=pop_mpls:0x86dd,goto_table:1','table_id:1,ipv6_exthdr=64(mask=0x1f0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34887 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopMpls":{ + "ethertype":34525 + } + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "mask":496, + "value":64 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)", + "mpls(bsb=1, label=203, exp=5, ttl=127)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(ext_hdrs=[hop_opts,auth])/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,actions=pop_pbb,goto_table:1','table_id:1,ipv6_exthdr=64(mask=0x1f0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "mask":496, + "value":64 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "egress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6(ext_hdrs=[hop_opts,auth])/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_exthdr=64(mask=0x1f0),actions=output:CONTROLLER'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "mask":496, + "value":64 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "max_len":65535, + "port":4294967293 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)", + "itag(sid=100)", + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ], + "PACKET_IN":[ + "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)", + "ipv6(dst='20::20',ext_hdrs=[hop_opts(nxt=51), auth(nxt=6)],flow_label=100, src='10::10', nxt=0, hop_limit=64)", + "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)", + "'\\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'" + ] + } + ] + }, + { + "description":"ethernet/itag/ethernet/ipv6/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv6_exthdr=64(mask=0x1f0),actions=output:2'", + "prerequisite":[ + { + "OFPFlowMod":{ + "table_id":0, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":35047 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionPopPbb":{} + } + ], + "type":4 + } + }, + { + "OFPInstructionGotoTable":{ + "table_id":1 + } + } + ] + } + }, + { + "OFPFlowMod":{ + "table_id":1, + "match":{ + "OFPMatch":{ + "oxm_fields":[ + { + "OXMTlv":{ + "field":"eth_type", + "value":34525 + } + }, + { + "OXMTlv":{ + "field":"ipv6_exthdr", + "mask":496, + "value":64 + } + } + ] + } + }, + "instructions":[ + { + "OFPInstructionActions":{ + "actions":[ + { + "OFPActionOutput":{ + "port":2 + } + } + ], + "type":4 + } + } + ] + } + } + ], + "tests":[ + { + "ingress":[ + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)", + "itag(sid=203)", + "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)", + "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127)", + "tcp(dst_port=6789, option=str('\\x11' * 4), src_port=12345)", + "'\\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'" + ], + "table-miss":[ + 1 + ] + } + ] + } +] |