Hi, What I did to emulate L2 networks, is to install JSON instructions at the controller, for each switch that I needed to test.
For example, to install a JSON file in an ODL controller with IP address 192.168.1.166, that commands to flood all packets received at port 1 of switch 2, use the following curl instruction: curl -u admin:admin -X PUT -d "@s2_ping1.json" -H "Content-Type: application/json" http://192.168.1.166:8181/rests/data/opendaylight-inventory:nodes/node=openflow:2/flow-node-inventory:table=0/flow=201 where the "s2_ping1.json" file contains the following instructions: { "flow": [ { "table_id": "0", "id": "201", "priority": "1001", "match": { "in-port": "openflow:2:1" }, "instructions": { "instruction": [ { "order": 0, "apply-actions": { "action": [ { "order": 0, "output-action": { "output-node-connector": "FLOOD" } } ] } } ] } } ] } Similarly, the following instruction tells the controller that all packets received at port 2 of switch 1, will be forwarded to port 2: curl -u admin:admin -X PUT -d "@s1_ping2.json" -H "Content-Type: application/json" http://192.168.1.166:8181/rests/data/opendaylight-inventory:nodes/node=openflow:1/flow-node-inventory:table=0/flow=102 where the "s1_ping2.json" file contains: { "flow": [ { "table_id": "0", "id": "102", "priority": "1002", "match": { "in-port": "openflow:1:2" }, "instructions": { "instruction": [ { "order": 0, "apply-actions": { "action": [ { "order": 0, "output-action": { "output-node-connector": "1" } } ] } } ] } } ] } This is the solution that worked for me. Since I am also new to ODL, I would like to know if there is an easier way to implement this functionality. Regards, David Arjona -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#8963): https://lists.opendaylight.org/g/Discuss/message/8963 Mute This Topic: https://lists.opendaylight.org/mt/98314434/21656 Mute #help:https://lists.opendaylight.org/g/Discuss/mutehashtag/help Mute #opendaylight-help-openflow:https://lists.opendaylight.org/g/Discuss/mutehashtag/opendaylight-help-openflow Mute #opendaylight:https://lists.opendaylight.org/g/Discuss/mutehashtag/opendaylight Group Owner: discuss+ow...@lists.opendaylight.org Unsubscribe: https://lists.opendaylight.org/g/Discuss/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-