Update and rename MantenerFIFO to MantenerFIFO.md
[vsorcdistro/.git] / scripts / basicflow.sh
index b7f251c4590c9100dbd3206eac979b523c6034c0..99fdf7b91c74b18b2afe7503e0f0038bec76e37f 100755 (executable)
@@ -4,22 +4,20 @@ Written by: Felix G. Tejada
 
 This script is applied to a linear 3 topo, just for show the example
 '
-echo "Cleaning all flows entry switch dpid 1 and 2"
 curl -X DELETE http://localhost:8080/stats/flowentry/clear/1
 curl -X DELETE http://localhost:8080/stats/flowentry/clear/2
 echo "adding new flows entry to switches 1 and 2"
-
 curl -X POST -d '{
     "dpid": 1,
-    "cookie": 1,
-    "cookie_mask": 1,
+    "cookie": 0,
+    "cookie_mask": 0,
     "table_id": 0,
     "idle_timeout": 0,
     "hard_timeout": 0,
-    "priority": 11111,
-    "flags": 1,
+    "priority": 100,
+    "flags": 0,
     "match":{
-        "in_port":1
+       "in_port":1
     },
     "actions":[
         {
@@ -28,18 +26,18 @@ curl -X POST -d '{
         }
     ]
  }' http://localhost:8080/stats/flowentry/add
-
+sleep 1
 curl -X POST -d '{
     "dpid": 1,
-    "cookie": 1,
-    "cookie_mask": 1,
+    "cookie": 0,
+    "cookie_mask": 0,
     "table_id": 0,
     "idle_timeout": 0,
     "hard_timeout": 0,
-    "priority": 22222,
-    "flags": 1,
+    "priority": 101,
+    "flags": 0,
     "match":{
-        "in_port":2
+       "in_port":2
     },
     "actions":[
         {
@@ -48,45 +46,47 @@ curl -X POST -d '{
         }
     ]
  }' http://localhost:8080/stats/flowentry/add
+sleep 1
 curl -X POST -d '{
     "dpid": 2,
-    "cookie": 1,
-    "cookie_mask": 1,
+    "cookie": 0,
+    "cookie_mask": 0,
     "table_id": 0,
     "idle_timeout": 0,
     "hard_timeout": 0,
-    "priority": 11111,
-    "flags": 1,
+    "priority": 200,
+    "flags": 0,
     "match":{
-        "in_port":2
+        "in_port":1
     },
     "actions":[
         {
             "type":"OUTPUT",
-            "port": 1
+            "port": 2
         }
     ]
  }' http://localhost:8080/stats/flowentry/add
-
+sleep 1
 curl -X POST -d '{
     "dpid": 2,
-    "cookie": 1,
-    "cookie_mask": 1,
+    "cookie": 0,
+    "cookie_mask": 0,
     "table_id": 0,
     "idle_timeout": 0,
     "hard_timeout": 0,
-    "priority": 22222,
-    "flags": 1,
+    "priority": 201,
+    "flags": 0,
     "match":{
-        "in_port":1
+        "in_port":2
     },
     "actions":[
         {
             "type":"OUTPUT",
-            "port": 2
+            "port": 1
         }
     ]
  }' http://localhost:8080/stats/flowentry/add
+
 echo "Connectivity from h1 to h2"
 echo "Done"