Changes between Version 13 and Version 14 of GENIExperimenter/Tutorials/WiMAXOpenFlow/Design-Setup


Ignore:
Timestamp:
10/27/13 14:42:11 (8 years ago)
Author:
Ryan Izard
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIExperimenter/Tutorials/WiMAXOpenFlow/Design-Setup

    v13 v14  
    195195      echo "FL: Finished!"
    196196      ...
    197       {{{
     197      }}}
    198198      g.  Now that Floodlight is running, we need to give the OpenFlow controller something to connect to, which is out OVS network. The first thing to to wirth regard to OVS is to load its kernel module and initialize it's database.
    199199      {{{
     
    230230      {{{
    231231      echo "OVS: Removing any existing bridge, $IFACE_bridge_A $IFACE_bridge_B"
    232 echo "OVS: $IFACE_bridge_C $IFACE_bridge_D ..."
    233 
    234 ## Ethernet
    235 #if [ -n "$(ovs-vsctl show | grep $IFACE_bridge_A)" ]
    236 #then
    237 #       echo "OVS: ...removing $IFACE_bridge_A"
    238 #       ovs-vsctl del-br $IFACE_bridge_A
    239 #fi
    240 
    241 ## Wlan0
    242 echo "OVS: Removing any existing bridge, $IFACE_bridge_B..."
    243 if [ -n "$(ovs-vsctl show | grep $IFACE_bridge_B)" ]
    244 then
    245         echo "OVS: ...removing $IFACE_bridge_B"
    246         ovs-vsctl del-br $IFACE_bridge_B
    247 fi
    248 
    249 ## Wlan1
    250 #if [ -n "$(ovs-vsctl show | grep $IFACE_bridge_C)" ]
    251 #then
    252 #       echo "OVS: ...removing $IFACE_bridge_C"
    253 #       ovs-vsctl del-br $IFACE_bridge_C
    254 #fi
    255 
    256 ## WiMAX
    257 if [ -n "$(ovs-vsctl show | grep $IFACE_bridge_D)" ]
    258 then
    259         echo "OVS: ...removing $IFACE_bridge_D"
    260         ovs-vsctl del-br $IFACE_bridge_D
    261 fi
    262 
    263 ## Tap
    264 if [ -n "$(ovs-vsctl show | grep $IFACE_bridge_E)" ]
    265 then
    266         echo "OVS: ...removing $IFACE_bridge_E"
    267         ovs-vsctl del-br $IFACE_bridge_E
    268 fi
    269 
    270 ## Wlan0
    271 echo "OVS: Adding interface bridge, $IFACE_bridge_B..."
    272 ovs-vsctl add-br $IFACE_bridge_B
    273 echo "OVS: ...with port $IFACE_B"
    274 ovs-vsctl add-port $IFACE_bridge_B $IFACE_B
    275 echo "OVS: ...with port $IFACE_patch_bridge_B_to_bridge_E"
    276 ovs-vsctl add-port $IFACE_bridge_B $IFACE_patch_bridge_B_to_bridge_E
    277 
    278 ## Wlan1
    279 #echo "OVS: Adding interface bridge, $IFACE_bridge_C..."
    280 #ovs-vsctl add-br $IFACE_bridge_C
    281 #echo "OVS: ...with port $IFACE_C"
    282 #ovs-vsctl add-port $IFACE_bridge_C $IFACE_C
    283 #echo "OVS: ...with port $IFACE_patch_bridge_C_to_bridge_E"
    284 #ovs-vsctl add-port $IFACE_bridge_C $IFACE_patch_bridge_C_to_bridge_E
    285 
    286 ## WiMAX
    287 echo "OVS: Adding interface bridge, $IFACE_bridge_D..."
    288 ovs-vsctl add-br $IFACE_bridge_D
    289 echo "OVS: ...with port $IFACE_D"
    290 ovs-vsctl add-port $IFACE_bridge_D $IFACE_D
    291 echo "OVS: ...with port $IFACE_patch_bridge_D_to_bridge_E"
    292 ovs-vsctl add-port $IFACE_bridge_D $IFACE_patch_bridge_D_to_bridge_E
    293 
    294 ## Tap
    295 echo "OVS: Adding interface bridge, $IFACE_bridge_E..."
    296 ovs-vsctl add-br $IFACE_bridge_E
    297 echo "OVS: ...with port $IFACE_E"
    298 ovs-vsctl add-port $IFACE_bridge_E $IFACE_E
    299 #echo "OVS: ...with port $IFACE_patch_bridge_E_to_bridge_A"
    300 #ovs-vsctl add-port $IFACE_bridge_E $IFACE_patch_bridge_E_to_bridge_A
    301 echo "OVS: ...with port $IFACE_patch_bridge_E_to_bridge_B"
    302 ovs-vsctl add-port $IFACE_bridge_E $IFACE_patch_bridge_E_to_bridge_B
    303 #echo "OVS: ...with port $IFACE_patch_bridge_E_to_bridge_C"
    304 #ovs-vsctl add-port $IFACE_bridge_E $IFACE_patch_bridge_E_to_bridge_C
    305 echo "OVS: ...with port $IFACE_patch_bridge_E_to_bridge_D"
    306 ovs-vsctl add-port $IFACE_bridge_E $IFACE_patch_bridge_E_to_bridge_D
     232      echo "OVS: $IFACE_bridge_C $IFACE_bridge_D ..."
     233     
     234      ## Ethernet
     235      #if [ -n "$(ovs-vsctl show | grep $IFACE_bridge_A)" ]
     236      #then
     237      #       echo "OVS: ...removing $IFACE_bridge_A"
     238      #       ovs-vsctl del-br $IFACE_bridge_A
     239      #fi
     240     
     241      ## Wlan0
     242      echo "OVS: Removing any existing bridge, $IFACE_bridge_B..."
     243      if [ -n "$(ovs-vsctl show | grep $IFACE_bridge_B)" ]
     244      then
     245              echo "OVS: ...removing $IFACE_bridge_B"
     246              ovs-vsctl del-br $IFACE_bridge_B
     247      fi
     248     
     249      ## Wlan1
     250      #if [ -n "$(ovs-vsctl show | grep $IFACE_bridge_C)" ]
     251      #then
     252      #       echo "OVS: ...removing $IFACE_bridge_C"
     253      #       ovs-vsctl del-br $IFACE_bridge_C
     254      #fi
     255
     256      ## WiMAX
     257      if [ -n "$(ovs-vsctl show | grep $IFACE_bridge_D)" ]
     258      then
     259              echo "OVS: ...removing $IFACE_bridge_D"
     260              ovs-vsctl del-br $IFACE_bridge_D
     261      fi
     262     
     263      ## Tap
     264      if [ -n "$(ovs-vsctl show | grep $IFACE_bridge_E)" ]
     265      then
     266              echo "OVS: ...removing $IFACE_bridge_E"
     267              ovs-vsctl del-br $IFACE_bridge_E
     268      fi
     269     
     270      ## Wlan0
     271      echo "OVS: Adding interface bridge, $IFACE_bridge_B..."
     272      ovs-vsctl add-br $IFACE_bridge_B
     273      echo "OVS: ...with port $IFACE_B"
     274      ovs-vsctl add-port $IFACE_bridge_B $IFACE_B
     275      echo "OVS: ...with port $IFACE_patch_bridge_B_to_bridge_E"
     276      ovs-vsctl add-port $IFACE_bridge_B $IFACE_patch_bridge_B_to_bridge_E
     277     
     278      ## Wlan1
     279      #echo "OVS: Adding interface bridge, $IFACE_bridge_C..."
     280      #ovs-vsctl add-br $IFACE_bridge_C
     281      #echo "OVS: ...with port $IFACE_C"
     282      #ovs-vsctl add-port $IFACE_bridge_C $IFACE_C
     283      #echo "OVS: ...with port $IFACE_patch_bridge_C_to_bridge_E"
     284      #ovs-vsctl add-port $IFACE_bridge_C $IFACE_patch_bridge_C_to_bridge_E
     285     
     286      ## WiMAX
     287      echo "OVS: Adding interface bridge, $IFACE_bridge_D..."
     288      ovs-vsctl add-br $IFACE_bridge_D
     289      echo "OVS: ...with port $IFACE_D"
     290      ovs-vsctl add-port $IFACE_bridge_D $IFACE_D
     291      echo "OVS: ...with port $IFACE_patch_bridge_D_to_bridge_E"
     292      ovs-vsctl add-port $IFACE_bridge_D $IFACE_patch_bridge_D_to_bridge_E
     293     
     294      ## Tap
     295      echo "OVS: Adding interface bridge, $IFACE_bridge_E..."
     296      ovs-vsctl add-br $IFACE_bridge_E
     297      echo "OVS: ...with port $IFACE_E"
     298      ovs-vsctl add-port $IFACE_bridge_E $IFACE_E
     299      #echo "OVS: ...with port $IFACE_patch_bridge_E_to_bridge_A"
     300      #ovs-vsctl add-port $IFACE_bridge_E $IFACE_patch_bridge_E_to_bridge_A
     301      echo "OVS: ...with port $IFACE_patch_bridge_E_to_bridge_B"
     302      ovs-vsctl add-port $IFACE_bridge_E $IFACE_patch_bridge_E_to_bridge_B
     303      #echo "OVS: ...with port $IFACE_patch_bridge_E_to_bridge_C"
     304      #ovs-vsctl add-port $IFACE_bridge_E $IFACE_patch_bridge_E_to_bridge_C
     305      echo "OVS: ...with port $IFACE_patch_bridge_E_to_bridge_D"
     306      ovs-vsctl add-port $IFACE_bridge_E $IFACE_patch_bridge_E_to_bridge_D
    307307      ...
    308308      }}}
     
    315315     
    316316     ## Set patch ports
    317 #echo "OVS: Patching ports $IFACE_patch_bridge_E_to_bridge_A, $IFACE_patch_bridge_A_to_bridge_E"
    318 #ovs-vsctl set interface $IFACE_patch_bridge_E_to_bridge_A type=patch
    319 #ovs-vsctl set interface $IFACE_patch_bridge_E_to_bridge_A options:peer=$IFACE_patch_bridge_A_to_bridge_E
    320 #ovs-vsctl set interface $IFACE_patch_bridge_A_to_bridge_E type=patch
    321 #ovs-vsctl set interface $IFACE_patch_bridge_A_to_bridge_E options:peer=$IFACE_patch_bridge_E_to_bridge_A
    322 
    323 echo "OVS: Patching ports $IFACE_patch_bridge_E_to_bridge_B, $IFACE_patch_bridge_B_to_bridge_E"
    324 ovs-vsctl set interface $IFACE_patch_bridge_E_to_bridge_B type=patch
    325 ovs-vsctl set interface $IFACE_patch_bridge_E_to_bridge_B options:peer=$IFACE_patch_bridge_B_to_bridge_E
    326 ovs-vsctl set interface $IFACE_patch_bridge_B_to_bridge_E type=patch
    327 ovs-vsctl set interface $IFACE_patch_bridge_B_to_bridge_E options:peer=$IFACE_patch_bridge_E_to_bridge_B
    328 
    329 #echo "OVS: Patching ports $IFACE_patch_bridge_E_to_bridge_C, $IFACE_patch_bridge_C_to_bridge_E"
    330 #ovs-vsctl set interface $IFACE_patch_bridge_E_to_bridge_C type=patch
    331 #ovs-vsctl set interface $IFACE_patch_bridge_E_to_bridge_C options:peer=$IFACE_patch_bridge_C_to_bridge_E
    332 #ovs-vsctl set interface $IFACE_patch_bridge_C_to_bridge_E type=patch
    333 #ovs-vsctl set interface $IFACE_patch_bridge_C_to_bridge_E options:peer=$IFACE_patch_bridge_E_to_bridge_C
    334 
    335 echo "OVS: Patching ports $IFACE_patch_bridge_E_to_bridge_D, $IFACE_patch_bridge_D_to_bridge_E"
    336 ovs-vsctl set interface $IFACE_patch_bridge_E_to_bridge_D type=patch
    337 ovs-vsctl set interface $IFACE_patch_bridge_E_to_bridge_D options:peer=$IFACE_patch_bridge_D_to_bridge_E
    338 ovs-vsctl set interface $IFACE_patch_bridge_D_to_bridge_E type=patch
    339 ovs-vsctl set interface $IFACE_patch_bridge_D_to_bridge_E options:peer=$IFACE_patch_bridge_E_to_bridge_D
    340 
     317      #echo "OVS: Patching ports $IFACE_patch_bridge_E_to_bridge_A, $IFACE_patch_bridge_A_to_bridge_E"
     318      #ovs-vsctl set interface $IFACE_patch_bridge_E_to_bridge_A type=patch
     319      #ovs-vsctl set interface $IFACE_patch_bridge_E_to_bridge_A options:peer=$IFACE_patch_bridge_A_to_bridge_E
     320      #ovs-vsctl set interface $IFACE_patch_bridge_A_to_bridge_E type=patch
     321      #ovs-vsctl set interface $IFACE_patch_bridge_A_to_bridge_E options:peer=$IFACE_patch_bridge_E_to_bridge_A
     322     
     323      echo "OVS: Patching ports $IFACE_patch_bridge_E_to_bridge_B, $IFACE_patch_bridge_B_to_bridge_E"
     324      ovs-vsctl set interface $IFACE_patch_bridge_E_to_bridge_B type=patch
     325      ovs-vsctl set interface $IFACE_patch_bridge_E_to_bridge_B options:peer=$IFACE_patch_bridge_B_to_bridge_E
     326      ovs-vsctl set interface $IFACE_patch_bridge_B_to_bridge_E type=patch
     327      ovs-vsctl set interface $IFACE_patch_bridge_B_to_bridge_E options:peer=$IFACE_patch_bridge_E_to_bridge_B
     328     
     329      #echo "OVS: Patching ports $IFACE_patch_bridge_E_to_bridge_C, $IFACE_patch_bridge_C_to_bridge_E"
     330      #ovs-vsctl set interface $IFACE_patch_bridge_E_to_bridge_C type=patch
     331      #ovs-vsctl set interface $IFACE_patch_bridge_E_to_bridge_C options:peer=$IFACE_patch_bridge_C_to_bridge_E
     332      #ovs-vsctl set interface $IFACE_patch_bridge_C_to_bridge_E type=patch
     333      #ovs-vsctl set interface $IFACE_patch_bridge_C_to_bridge_E options:peer=$IFACE_patch_bridge_E_to_bridge_C
     334     
     335      echo "OVS: Patching ports $IFACE_patch_bridge_E_to_bridge_D, $IFACE_patch_bridge_D_to_bridge_E"
     336      ovs-vsctl set interface $IFACE_patch_bridge_E_to_bridge_D type=patch
     337      ovs-vsctl set interface $IFACE_patch_bridge_E_to_bridge_D options:peer=$IFACE_patch_bridge_D_to_bridge_E
     338      ovs-vsctl set interface $IFACE_patch_bridge_D_to_bridge_E type=patch
     339      ovs-vsctl set interface $IFACE_patch_bridge_D_to_bridge_E options:peer=$IFACE_patch_bridge_E_to_bridge_D
     340     
    341341      }}}
    342342      m.  Now, we need to assign each OVS bridge a unique ID (DPID) and point them to the address of the Floodlight controller. Floodlight will be run on the localhost, so the loopback address is defined within a the variable '''OVS_controllerIP''' and is set as the loopback address '''127.0.0.1:6633'''. Port '''6633''' is the default OpenFlow port. As long as Floodlight and OVS are configured to use the same port number, any available port will suffice. We also need to tell the OVS bridges what to do if and when they lose connection to the Floodlight controller. The '''standalone''' mode allows them to default to a learning switch state if the link between the controller and the bridge is broken.