Changes between Version 1 and Version 2 of GENIExperimenter/Tutorials/GREESC13/OpenFlowWiMAX/Execute
- Timestamp:
- 06/24/13 15:19:20 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GENIExperimenter/Tutorials/GREESC13/OpenFlowWiMAX/Execute
v1 v2 41 41 $ cd eth_control 42 42 $ ./delete_route.sh 43 Verify the new routing table has a default route via the br_tap interface no routes via the br_wimax and br_wifi 44 45 interfaces. 43 }}} 44 Verify the new routing table has a default route via the br_tap interface no routes via the br_wimax and br_wifi interfaces. 46 45 3. In Eclipse, run Floodlight by browsing to '''Run-->Run'''. Note the console output shown toward the bottom of the 47 48 46 Eclipse window. Since OVS is running, and the '''system_setup.sh''' script pointed each OVS bridge to the Floodlight 49 50 47 controller, you should see where each switch DPID connects to Floodlight. 51 48 4. In the Root Terminal, open an new tab (File-->Open Tab) or switch to an unused tab. Browse to the '''/root/06-03- 52 53 49 13/eth_control''' directory. 54 50 5. In this directory are some Python scripts to manually add and remove flows in the OVS bridges. These scripts 55 56 51 leverage the Static Flow Pusher REST API present in the Floodlight controller. Since we have previously disabled 57 58 52 Forwarding, flows added by the Static Flow Pusher will be the only flows present on the switches, and thus only traffic 59 60 53 permitted by these flows will traverse the OVS network. These flows essentially take packets from a particular ingress 61 62 54 port and send them out a destination port. To do this, we need to determine the port numbers Floodlight has associated 63 64 55 with the ports of our OVS bridges. The Floodlight REST API is a means of obtaining data from the Floodlight controller. We 65 66 56 need to send a query to Floodlight asking for what it knows about any connected switches. 67 57 {{{ … … 275 265 }}} 276 266 Above is sample output from the query issued. The output is organized by switch -- there should be three -- br_tap, 277 278 267 br_wifi, and br_wimax. On each of these switches, you can see the ports and the names of the ports as they were given in 279 280 268 '''system_setup.sh'''. Take note of the port numbers for the patch ports on each switch, as well as the port numbers for 281 282 269 the interface port on each switch. 283 270 6. Armed with this information, we can now create the flows we want to insert on each switch. Namely, we can specify 284 285 271 and ingress and output port on br_tap, br_wifi, and br_wimax for packets traveling in each direction. In the Root 286 287 272 Terminal, open the Python script '''gree13_switchWiFi.py''' with your favorite text editor. This script is designed to 288 289 273 switch to the WiFi interface. 290 274 {{{ 291 275 $ gedit gree13_switchWiFi.py 292 293 276 import httplib 294 277 import json 295 296 278 class StaticFlowPusher(object): 297 298 279 def __init__(self, server): 299 280 self.server = server … … 418 399 }}} 419 400 In this script, there are four flows for each OVS bridge -- two for outgoing packets and two for incoming packets. Why 420 421 401 two? OpenFlow filters packets by not only data like MAC and IP addresses, but also by the type of packet (its 422 423 402 '''ethertype'''). We need to forward all IP (ethertype=0x800) and all ARP (ethertype=0x806) packets in each direction in 424 403