-
Notifications
You must be signed in to change notification settings - Fork 6
1. Warp User's Guide
(work in progress)
It's very simple. Go to
$ git clone https://github.com/FlowForwarding/warp
$ cd warp
$ sbt assemblyCurrently, you can run a simple REST API service to the controller and a simple learning switch application. They are both are using OF Java API. To run REST API:
Start java controller:
$ java -jar ./of_driver/target/scala-2.11/of_driver-assembly-0.5.jarController is listening tcp port 6633.
You can install flows using the curl command. The curl command has to be issued from another terminal window.
Below are some instances:
$ curl -d '{"switch":"00:0C:29:C9:8E:AE:00:00", "name":"flow-mod-1", "priority":"32768", "ingress-port":"1", "active":"true", "apply-actions":"output=1"}' http://localhost:8080/ff/of/controller/restapi
$ curl -d '{"switch":"00:0C:29:C9:8E:AE:00:00", "name":"flow-mod-1", "priority":"32768", "ingress-port":"2","active":"true"}' http://localhost:8080/ff/of/controller/restapi
$ curl -d '{"switch":"00:0C:29:AC:93:43:00:00", "name":"flow-mod-1", "priority":"32768", "ether-type":"0x0800", "active":"true"}' http://localhost:8080/ff/of/controller/restapi
$ curl -d '{"switch":"00:0C:29:AC:93:43:00:00", "name":"flow-mod-1", "priority":"32768", "ether-type":"0x0800", "dst-ip":"10.10.10.10","active":"true"}' http://localhost:8080/ff/of/controller/restapi
$ curl -d '{"switch":"00:90:FB:37:71:6E:00:00", "name":"flow-mod-1", "priority":"10", "ingress-port":"5","active":"true", "write-actions":"output=6"}' http://localhost:8080/ff/of/controller/restapi
$ curl -d '{"switch":"00:90:FB:37:71:6E:00:00", "name":"flow-mod-1", "priority":"10", "ingress-port":"6","active":"true", "apply-actions":"output=5, output=6"}' http://localhost:8080/ff/of/controller/restapiThe instructions and match criterias are: ####Instructions The next instructions are supported
Name |Description |
---------|-------------|
apply-actions||
write-actions||
clear-actions||
goto-table||
write-metadata||
#####Actions Actions are comma-separated string, each action is: 'action_name=action_value', e.g.:
"apply-actions":"output=5, set_queue=1"Name |Pattern|
---------|-------------|
output|0,...,65535|
set_queue|0,...,65535|
####Match Criterias Name |Description | Prerequisites -------- | ----------- | -------- ingress-port| Ingress port. This may be a physical or switch-defined logical port | in-phy-port | | metadata || src-mac |Ethernet source address| dst-mac|Ethernet destination address| ether-type|Ethernet type of the OpenFlow packet payload| vlan-vid|| vlan-priority|| ip-dscp|| ip-ecn|| protocol|IPv4 or IPv6 protocol number| src-ip|IPv4 source address| dst-ip|IPv4 destination address| src-port|TCP source port| dst-port|TCP destination port| udp-src|UDP source port| udp-dst|UDP destination port| sctp-src|| sctp-dst|| icmpv4-type|| icmpv4-code|| arp-op|| arp-spa|| arp-tpa|| arp-sha|| arp-tha|| ipv6-src|IPv6 source address| ipv6-dst|IPv6 destination address| ipv6-flabel|| icmpv6-type|| icmpv6-code|| ipv6-nd-sll|| ipv6-nd-tll|| mpls-label|| mpls-tc|| mpls-bos|| pbb-isid|| tunnel-id|| ipv6-exthdr||
To delete flow from a switch with REST API you can use curl -X DELETE command
####Installing flow
curl -d '{"switch":"00:0C:29:BD:37:38:00:00", "name":"flow-mod-1", "priority":"32768", "ingress-port":"2", "active":"true", "apply-actions":"output=3"}' http://localhost:8080/ff/of/controller/restapi####Deleting flow
curl -X DELETE -d '{"switch":"00:0C:29:BD:37:38:00:00", "name":"flow-mod-1", "priority":"32768", "ingress-port":"2", "active":"true", "apply-actions":"output=3"}' http://localhost:8080/ff/of/controller/restapiThe steps needed to use this controller with Linc switch are below.
- Make and run LINC by doing the following:
$ sudo make rel
$ sudo ./rel/linc/bin/linc console- To find out switch Dpid, in linc switch console, type
>1 linc_logic:get_datapath_id(0).The output will be like:
"00:0C:29:C9:8E:AE:00:00"To check flow_table:
>1 linc_us4_flow:get_flow_table(0,0).