You are on page 1of 6

apt-get install build-essential default-jdk ant python-dev eclipse git

git clone git://github.com/floodlight/floodlight.git


$cd floodlight
ant
java -jar target/floodlight.jar
****CONTROLLER*****
curl -d '{"switch":"00:00:e8:03:9a:ab:ff:b2", "name":"static-flow1", "cookie":"0
", "priority":"32768", "dst-mac":"52:54:00:62:f2:6c", "active":"true", "actions"
:"output=11"}' http://localhost:8080/wm/staticflowentrypusher/json
curl -d '{"switch":"00:00:e8:03:9a:ab:ff:b2", "name":"static-flow2", "cookie":"0
", "priority":"32768", "dst-mac":"52:54:00:2a:ec:4a", "active":"true", "actions"
:"output=9"}' http://localhost:8080/wm/staticflowentrypusher/json
curl -d '{"switch":"00:00:e8:03:9a:ab:ff:b2", "name":"static-flow3", "cookie":"0
", "priority":"32768", "dst-mac":"52:54:00:8f:cb:37", "active":"true", "actions"
:"output=8"}' http://localhost:8080/wm/staticflowentrypusher/json
curl http://localhost:8080/wm/staticflowentrypusher/list/00:00:e8:03:9a:ab:ff:b2
/json
curl http://localhost:8080/wm/staticflowentrypusher/module/status/json
curl http://localhost:8080/wm/staticflowentrypusher/clear/00:00:e8:03:9a:ab:ff:b
2/json
curl http://localhost:8080/wm/core/switch/00:00:e8:03:9a:ab:ff:b2/flow/json
--------------------------------------------------curl -X POST -d '{"src-ip": "192.168.1.1/24", "dst-ip": "192.168.1.140/24"}' htt
p://localhost:8080/wm/firewall/rules/json
curl -X POST -d '{"src-ip": "192.168.1.140/24", "dst-ip": "192.168.1.1/24"}' htt
p://localhost:8080/wm/firewall/rules/json
curl http://localhost:8080/wm/firewall/module/status/json
curl -X POST -d '{"src-ip": "192.168.1.1/24", "dst-ip": "192.168.1.140/24", "dltype":"ARP" }' http://localhost:8080/wm/firewall/rules/json
curl -X POST -d '{"src-ip": "192.168.1.140/24", "dst-ip": "192.168.1.1/24", "dltype":"ARP" }' http://localhost:8080/wm/firewall/rules/json
curl -X POST -d '{"src-ip": "192.168.1.1/24", "dst-ip": "192.168.1.140/24", "nwproto":"ICMP" }' http://localhost:8080/wm/firewall/rules/json
curl -X POST -d '{"src-ip": "192.168.1.140/24", "dst-ip": "192.168.1.1/24", "nwproto":"ICMP" }' http://localhost:8080/wm/firewall/rules/json

curl -X GET http://localhost:8080/wm/firewall/rules/json

curl -X POST -d '{"src-ip": "192.168.1.1/24", "dst-ip": "192.168.1.140/24", "dltype":"ARP" }' http://localhost:8080/wm/firewall/rules/json


curl -X DELETE -d '{"src-ip": "192.168.1.1/24", "dst-ip": "192.168.1.140/24", "n
w-proto":"ICMP", "action":"DENY" }' http://localhost:8080/wm/firewall/rules/jso
n
curl -X POST -d '{"src-ip": "192.168.1.1/24", "dst-ip": "192.168.1.140/24", "nwproto":"ICMP", "action":"DENY" }' http://localhost:8080/wm/firewall/rules/json
________________________________________________
curl http://localhost:8080/wm/firewall/module/enable/json

curl -X POST -d '{"src-ip": "192.168.1.1/24", "dst-ip": "192.168.1.140/24", "act


ion":"DENY"}' http://localhost:8080/wm/firewall/rules/json
curl -X POST -d '{"src-ip": "192.168.1.140/24", "dst-ip": "192.168.1.1/24", "act
ion":"DENY"}' http://localhost:8080/wm/firewall/rules/json
curl -X POST -d '{"src-ip": "192.168.1.1/32", "dst-ip": "192.168.1.140/32", "act
ion":"DENY"}' http://localhost:8080/wm/firewall/rules/json
curl -X POST -d '{"src-ip": "192.168.1.140/32", "dst-ip": "192.168.1.1/32", "act
ion":"DENY"}' http://localhost:8080/wm/firewall/rules/json
curl -X POST
type":"ARP",
curl -X POST
type":"ARP",

-d '{"src-ip": "192.168.1.1/24", "dst-ip": "192.168.1.140/24", "dl"action":"DENY"}' http://localhost:8080/wm/firewall/rules/json


-d '{"src-ip": "192.168.1.140/24", "dst-ip": "192.168.1.1/24", "dl"action":"DENY"}' http://localhost:8080/wm/firewall/rules/json

curl -X POST -d '{"src-ip": "192.168.1.1/24", "dst-ip": "192.168.1.140/24", "nwproto":"ICMP", "action":"DENY"}' http://localhost:8080/wm/firewall/rules/json


curl -X POST -d '{"src-ip": "192.168.1.140/24", "dst-ip": "192.168.1.1/24", "nwproto":"ICMP", "action":"DENY"}' http://localhost:8080/wm/firewall/rules/json
************** COMANDOS PROBADOS ************************
curl http://localhost:8080/wm/staticflowentrypusher/list/00:00:e8:03:9a:ab:ff:b2
/json | json_pp -t dumper
----FILTRO POR MAC----curl http://localhost:8080/wm/staticflowentrypusher/clear/00:00:e8:03:9a:ab:ff:b
2/json
curl -d '{"switch":"00:00:e8:03:9a:ab:ff:b2", "name":"static-flow4", "cookie":"0
", "priority":"32768", "dst-mac":"52:54:00:62:f2:6c", "active":"true", "actions"
:"output=2"}' http://localhost:8080/wm/staticflowentrypusher/json
curl -d '{"switch":"00:00:e8:03:9a:ab:ff:b2", "name":"static-flow5", "cookie":"0
", "priority":"32768", "dst-mac":"52:54:00:2a:ec:4a", "active":"true", "actions"

:"DENY"}' http://localhost:8080/wm/staticflowentrypusher/json
curl -d '{"switch":"00:00:e8:03:9a:ab:ff:b2", "name":"static-flow3", "cookie":"0
", "priority":"32768", "dst-mac":"52:54:00:8f:cb:37", "active":"true", "actions"
:"DENY"}' http://localhost:8080/wm/staticflowentrypusher/json
---FILTRO POR IP----curl http://localhost:8080/wm/staticflowentrypusher/clear/00:00:e8:03:9a:ab:ff:b
2/json
curl -d '{"switch":"00:00:e8:03:9a:ab:ff:b2", "name":"static-flow1", "cookie":"0
", "priority":"32768", "ether-type":"2048", "dst-ip": "192.168.1.117/32", "activ
e":"true", "actions":"output=2"}' http://localhost:8080/wm/staticflowentrypusher
/json
curl -d '{"switch":"00:00:e8:03:9a:ab:ff:b2", "name":"static-flow2", "cookie":"0
", "priority":"32768", "ether-type":"2048", "dst-ip":"192.168.1.140/32", "active
":"true", "actions":"DENY"}' http://localhost:8080/wm/staticflowentrypusher/json
curl -d '{"switch":"00:00:e8:03:9a:ab:ff:b2", "name":"static-flow3", "cookie":"0
", "priority":"32768", "ether-type":"2048", "dst-ip":"192.168.1.190/32", "active
":"true", "actions":"DENY"}' http://localhost:8080/wm/staticflowentrypusher/json
---FILTRO POR PUERTO----- XXXXXXXXXXXXXXXXXXXXXXXXXXXX :(
curl http://localhost:8080/wm/staticflowentrypusher/clear/00:00:e8:03:9a:ab:ff:b
2/json
curl -d '{"switch":"00:00:e8:03:9a:ab:ff:b2", "name":"static-flow1", "cookie":"0
", "priority":"32768", "ether-type":"2048", "dst-ip": "192.168.1.117/32", "dst-p
ort":"80", "active":"true", "actions":"output=2"}' http://localhost:8080/wm/stat
icflowentrypusher/json
curl -d '{"switch":"00:00:e8:03:9a:ab:ff:b2", "name":"static-flow2", "cookie":"0
", "priority":"32768", "ether-type":"2048", "dst-port":"4", "active":"true", "ac
tions":"DENY"}' http://localhost:8080/wm/staticflowentrypusher/json
curl -d '{"switch":"00:00:e8:03:9a:ab:ff:b2", "name":"static-flow3", "cookie":"0
", "priority":"32768", "ether-type":"2048", "dst-port":"5", "active":"true", "ac
tions":"DENY"}' http://localhost:8080/wm/staticflowentrypusher/json
_____ POR RANGO DE IPs
curl http://localhost:8080/wm/staticflowentrypusher/clear/00:00:e8:03:9a:ab:ff:b
2/json
curl -d '{"switch":"00:00:e8:03:9a:ab:ff:b2", "name":"static-flow1", "cookie":"0
", "priority":"32768", "ether-type":"0x0800", "ingress-port":"1", "src-ip": "192
.168.1.117", "dst-ip": "192.168.1.140", "active":"true", "actions":"output=7"}'
http://localhost:8080/wm/staticflowentrypusher/json
curl -d '{"switch":"00:00:e8:03:9a:ab:ff:b2", "name":"static-flow1", "cookie":"0
", "priority":"32768", "ether-type":"0x0800", "ingress-port":"1", "src-ip": "192
.168.1.117", "dst-ip": "192.168.1.140", "active":"true", "actions":"DENY"}' http

://localhost:8080/wm/staticflowentrypusher/json
curl -d '{"switch":"00:00:e8:03:9a:ab:ff:b2", "name":"static-flow1", "cookie":"0
", "priority":"32768", "ether-type":"0x0800", "src-ip": "192.168.1.117", "dst-ip
": "192.168.1.140", "active":"true", "actions":"DENY"}' http://localhost:8080/wm
/staticflowentrypusher/json
____________FIREWALL :)_____________________
curl http://localhost:8080/wm/firewall/module/enable/json
curl http://localhost:8080/wm/firewall/module/status/json
curl -X GET http://localhost:8080/wm/firewall/rules/json
curl -X DELETE -d '{"ruleid":"-1641045694"}' http://localhost:8080/wm/firewall/r
ules/json
curl -X POST -d '{"name":"static-flow3", "src-ip": "192.168.1.120/32", "dst-ip":
"192.168.1.141/32", "actions":"DENY"}' http://localhost:8080/wm/firewall/rules/
json
curl -X POST -d '{"name":"static-flow4", "src-ip": "192.168.1.141/32", "dst-ip":
"192.168.1.120/32", "actions":"DENY"}' http://localhost:8080/wm/firewall/rules/
json
__________________________
curl -X POST -d '{"src-ip": "192.168.1.120/32", "dst-ip": "192.168.1.141/32", "a
ction":"DENY"}' http://localhost:8080/wm/firewall/rules/json
curl -X POST -d '{"src-ip": "192.168.1.141/32", "dst-ip": "192.168.1.120/32", "a
ction":"DENY"}' http://localhost:8080/wm/firewall/rules/json
_________________
curl -X POST -d '{"src-ip": "192.168.1.120/32", "dst-ip": "192.168.1.141/32", "d
l-type":"ARP" }' http://localhost:8080/wm/firewall/rules/json
curl -X POST -d '{"src-ip": "192.168.1.141/32", "dst-ip": "192.168.1.120/32", "d
l-type":"ARP" }' http://localhost:8080/wm/firewall/rules/json
curl -X POST -d '{"src-ip": "192.168.1.120/32", "dst-ip": "192.168.1.141/32", "n
w-proto":"ICMP", "action":"DENY"}' http://localhost:8080/wm/firewall/rules/json
curl -X POST -d '{"src-ip": "192.168.1.141/32", "dst-ip": "192.168.1.120/32", "n
w-proto":"ICMP", "action":"DENY" }' http://localhost:8080/wm/firewall/rules/json
curl -X POST -d '{"src-ip": "192.168.1.120/32", "dst-ip": "192.168.1.141/32", "n
w-proto":"ICMP", "tp-src":"5010", "action":"DENY" }' http://localhost:8080/wm/fi
rewall/rules/json
curl -X POST -d '{"src-ip": "192.168.1.141/32", "dst-ip": "192.168.1.120/32", "n
w-proto":"ICMP", "tp-dst":"5010", "action":"DENY" }' http://localhost:8080/wm/fi
rewall/rules/json
-_______________________________________________________________________________
_________________________________________________________
linea remove de: src/main/resources/floodlightdefaultproperties
net.floodlightcontroller.forwarding.Forwarding,\
*________________________________________--

curl http://localhost:8080/wm/staticflowentrypusher/clear/00:00:e8:03:9a:ab:ff:b
2/json
curl http://localhost:8080/wm/staticflowentrypusher/list/00:00:e8:03:9a:ab:ff:b2
/json
curl -d '{"switch":"00:00:e8:03:9a:ab:ff:b2", "name":"static-flow1", "cookie":"
0", "priority":"1", "ether-type":"0x0806", "active":"true", "actions":"flood"}'
http://localhost:8080/wm/staticflowentrypusher/json

curl -d '{"switch":"00:00:e8:03:9a:ab:ff:b2", "name":"static-flow2", "cookie":"0


", "priority":"10000", "active":"true", "ingress-port":"4", "actions":"output=2"
}' http://localhost:8080/wm/staticflowentrypusher/json
curl -d '{"switch":"00:00:e8:03:9a:ab:ff:b2", "name":"static-flow3", "cookie":"0
", "priority":"10000", "active":"true", "ingress-port":"2", "actions":"output=4"
}' http://localhost:8080/wm/staticflowentrypusher/json
curl -d '{"switch":"00:00:e8:03:9a:ab:ff:b2", "name":"static-flow3", "cookie":"0
", "priority":"10000", "active":"true", "ingress-port":"2", "ether-type":"0x0800
", "dst-ip": "192.168.1.140", "actions":"output=4"}' http://localhost:8080/wm/st
aticflowentrypusher/json

********************************************************************************
***
curl -X POST -d '{"switchid": "00:00:e8:03:9a:ab:ff:b2"}' http://localhost:8080/
wm/firewall/rules/json
curl http://localhost:8080/wm/firewall/module/status/json
curl http://localhost:8080/wm/firewall/module/enable/json
curl http://localhost:8080/wm/firewall/rules/json
curl -X POST -d '{"switchid": "00:00:e8:03:9a:ab:ff:b2", "src-ip": "192.168.1.19
0/32", "dst-ip": "192.168.1.140/32"}' http://localhost:8080/wm/firewall/rules/js
on
curl -X POST -d '{"switchid": "00:00:e8:03:9a:ab:ff:b2", "src-ip": "192.168.1.14
0/32", "dst-ip": "192.168.1.190/32" }' http://localhost:8080/wm/firewall/rules/j
son
curl -X POST -d '{"switchid": "00:00:e8:03:9a:ab:ff:b2", "src-ip": "192.168.1.19
0/32", "dst-ip": "192.168.1.140/32", "dl-type":"ARP"}' http://localhost:8080/wm/
firewall/rules/json
curl -X POST -d '{"switchid": "00:00:e8:03:9a:ab:ff:b2", "src-ip": "192.168.1.14
0/32", "dst-ip": "192.168.1.190/32", "dl-type":"ARP" }' http://localhost:8080/wm
/firewall/rules/json
curl -X POST -d '{"switchid": "00:00:e8:03:9a:ab:ff:b2", "src-ip": "192.168.1.19
0/32", "dst-ip": "192.168.1.140/32", "nw-proto":"ICMP" }' http://localhost:8080/
wm/firewall/rules/json
curl -X POST -d '{"switchid": "00:00:e8:03:9a:ab:ff:b2", "src-ip": "192.168.1.14
0/32", "dst-ip": "192.168.1.190/32", "nw-proto":"ICMP" }' http://localhost:8080/
wm/firewall/rules/json

You might also like