| 1 | = [http://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/GREESC13/OpenFlowWiMAX Vertical Handoff with OpenFlow] = |
| 2 | {{{ |
| 3 | #!html |
| 4 | |
| 5 | <div style="text-align:center; width:495px; margin-left:auto; margin-right:auto;"> |
| 6 | <img id="Image-Maps_5201305222028436" |
| 7 | |
| 8 | src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/Setup.jpg?format=raw" |
| 9 | |
| 10 | usemap="#Image-Maps_5201305222028436" border="0" width="495" height="138" alt="" /> |
| 11 | <map id="_Image-Maps_5201305222028436" name="Image-Maps_5201305222028436"> |
| 12 | <area shape="rect" coords="18,18,135,110" |
| 13 | |
| 14 | href="http://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/GREESC13/OpenFlowWiMAX/Design-Setup" alt="" title="" /> |
| 15 | <area shape="rect" coords="180,18,297,111" |
| 16 | |
| 17 | href="http://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/GREESC13/OpenFlowWiMAX/Execute" alt="" title="" /> |
| 18 | <area shape="rect" coords="344,17,460,110" |
| 19 | |
| 20 | href="http://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/GREESC13/OpenFlowWiMAX/Finish" alt="" title="" /> |
| 21 | <area shape="rect" coords="493,136,495,138" href="http://www.image-maps.com/index.php?aff=mapped_users_5201305222028436" |
| 22 | |
| 23 | alt="Image Map" title="Image Map" /> |
| 24 | </map> |
| 25 | <!-- Image map text links - End - --> |
| 26 | |
| 27 | </div> |
| 28 | }}} |
| 29 | |
| 30 | == 1. Design the Experiment == |
| 31 | |
| 32 | The end-user will use the virtual tap interface (created by OpenVPN) for network connections, while the handoff execution will handle which physical interface to use. The Static Flow Pusher API in Floodlight allows for flows to be inserted manually, as determined by the handoff decision. A Python script leverages the Static Flow Pusher API to add and remove flows. Detailed instructions are as follows. ''It should be noted that these instructions are executed inside the VM image with the exception of the very first instruction below.'' |
| 33 | |
| 34 | == 2. Establish the Environment == |
| 35 | |
| 36 | 1. Before booting into the VM, create three network interfaces -- two host-only interfaces and one control NAT interface. If you are using VirtualBox, you must also enable '''promiscuous mode''' for each of the two host-only interfaces. |
| 37 | |
| 38 | 2. Remove the Forwarding module from the Floodlight OpenFlow controller. Floodlight uses what it calls a '''module loading system''', where the user can write modules to perform a certain task or set of tasks. Each module can register for certain events. For example, the Forwarding module registers for PACKET_IN events where the controller is sent a packet from a connected switch. Upon such an event, the Forwarding module will send the packet out the correct port(s) depending on the destination. This module essentially implements a standard '''learning switch''' function where the OpenFlow-enabled switch behaves as if it were a standard network switch. We do not want this functionality, since we would like to have control over which port(s) our packets get forwarded. |
| 39 | a. Open the Root Terminal by browsing to Applications-->Accessories-->Root Terminal. The password is '''password'''. |
| 40 | b. Launch Eclipse by running '''eclipse''' in the Root Terminal. |
| 41 | c. The '''module loading system''' maintains a list of the modules to be loaded at runtime. To remove the Forwarding module from this list (and thus disable it), open the '''floodlight/src/main/resources/floodlightdefault.properties''' file and remove the line '''net.floodlightcontroller.forwarding.Forwarding,\'''. |
| 42 | d. By default, Eclipse automatically builds the Floodlight project, so we do not need to do so manually. |
| 43 | 3. Customize the setup script. This script is designed to (1) define user variables, (2) configure the tap interface with OpenVPN, (3) start Floodlight, (4) initialize and start OpenVswitch, and (5) configure Linux networking. |
| 44 | a. In the Root Terminal, open a new tab by browsing to File-->Open Tab. |
| 45 | b. In the Root Terminal, execute '''ifconfig''': |
| 46 | {{{ |
| 47 | $ ifconfig |
| 48 | eth0 Link encap:Ethernet HWaddr 00:0c:29:04:5c:41 |
| 49 | inet addr:192.168.93.128 Bcast:192.168.93.255 Mask:255.255.255.0 |
| 50 | inet6 addr: fe80::20c:29ff:fe04:5c41/64 Scope:Link |
| 51 | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
| 52 | RX packets:48 errors:0 dropped:0 overruns:0 frame:0 |
| 53 | TX packets:38 errors:0 dropped:0 overruns:0 carrier:0 |
| 54 | collisions:0 txqueuelen:1000 |
| 55 | RX bytes:8503 (8.3 KiB) TX bytes:6274 (6.1 KiB) |
| 56 | Interrupt:18 Base address:0x1424 |
| 57 | |
| 58 | eth1 Link encap:Ethernet HWaddr 00:0c:29:04:5c:4b |
| 59 | inet addr:192.168.193.132 Bcast:192.168.193.255 Mask:255.255.255.0 |
| 60 | inet6 addr: fe80::20c:29ff:fe04:5c4b/64 Scope:Link |
| 61 | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
| 62 | RX packets:152 errors:0 dropped:0 overruns:0 frame:0 |
| 63 | TX packets:26 errors:0 dropped:0 overruns:0 carrier:0 |
| 64 | collisions:0 txqueuelen:1000 |
| 65 | RX bytes:31818 (31.0 KiB) TX bytes:5234 (5.1 KiB) |
| 66 | Interrupt:19 Base address:0x14a4 |
| 67 | |
| 68 | eth2 Link encap:Ethernet HWaddr 00:0c:29:04:5c:55 |
| 69 | inet addr:192.168.193.129 Bcast:192.168.193.255 Mask:255.255.255.0 |
| 70 | inet6 addr: fe80::20c:29ff:fe04:5c55/64 Scope:Link |
| 71 | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
| 72 | RX packets:138 errors:0 dropped:0 overruns:0 frame:0 |
| 73 | TX packets:31 errors:0 dropped:0 overruns:0 carrier:0 |
| 74 | collisions:0 txqueuelen:1000 |
| 75 | RX bytes:27881 (27.2 KiB) TX bytes:6277 (6.1 KiB) |
| 76 | Interrupt:16 Base address:0x1824 |
| 77 | |
| 78 | lo Link encap:Local Loopback |
| 79 | inet addr:127.0.0.1 Mask:255.0.0.0 |
| 80 | inet6 addr: ::1/128 Scope:Host |
| 81 | UP LOOPBACK RUNNING MTU:16436 Metric:1 |
| 82 | RX packets:8 errors:0 dropped:0 overruns:0 frame:0 |
| 83 | TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 |
| 84 | collisions:0 txqueuelen:0 |
| 85 | RX bytes:560 (560.0 B) TX bytes:560 (560.0 B) |
| 86 | }}} |
| 87 | Note the subnets and names given to each of the network interfaces. Recall, when the VM was initialized, we configured 1 NAT interface and 2 host-only interfaces. The two interfaces on the same subnet are the host-only interfaces. Make notes of each interface name and its IP and subnet mask. |
| 88 | c. With this information, to the setup script directory: |
| 89 | {{{ |
| 90 | $ cd /root/06-03-13 |
| 91 | $ ls |
| 92 | ... system_setup.sh ... |
| 93 | }}} |
| 94 | d. Open the script with the text editor of your choice (vi, gedit, pico, nano, etc): |
| 95 | {{{ |
| 96 | $ gedit system_setup.sh |
| 97 | }}} |
| 98 | e. There are numerous user defined variables at the top of the script. These are placeholders for commonly used system and configuration specific information throughout the script. We need to change a few of them to suit our needs for this tutorial. Modify the physical interface names for '''IFACE_wlan0''' and '''IFACE_wimax''' to match those names of the host-only interfaces noted from '''ifconfig'''. Also, modify the '''IFACE_tap_IP''' variable to be an IP in the same subnet of the host-only interfaces (e.g. 192.168.193.155 would work for the host-only subnet 192.168.193/24). |
| 99 | {{{ |
| 100 | ################### |
| 101 | #USR DEF VARIABLES# |
| 102 | ################### |
| 103 | IFACE_bridge_eth=br_eth |
| 104 | IFACE_bridge_wlan0=br_wifi0 |
| 105 | IFACE_bridge_wimax=br_wimax |
| 106 | IFACE_bridge_int=br_tap |
| 107 | |
| 108 | IFACE_tap=tap0 |
| 109 | IFACE_tap_IP=192.168.193.110 |
| 110 | IFACE_ethernet=eth0 |
| 111 | IFACE_wlan0=eth1 |
| 112 | IFACE_wimax=eth2 |
| 113 | }}} |
| 114 | f. Next, we need to create our tap interface. This is the network interface that will funnel all outbound packets from the userspace on our VM and send them into our OpenVswitch network. |
| 115 | {{{ |
| 116 | ############### |
| 117 | #ADD TAP IFACE# |
| 118 | ############### |
| 119 | |
| 120 | echo "OVPN: Installing tap interface, $IFACE_tap" |
| 121 | openvpn --mktun --dev $IFACE_tap --lladdr 12:51:16:90:8f:ee |
| 122 | }}} |
| 123 | g. Now, it is sometimes desirable to automate the start of Floodlight; however, for the purposes of this tutorial, we will launch it from within Eclipse. Comment out the following lines of the '''system_setup.sh''' script: |
| 124 | {{{ |
| 125 | ################## |
| 126 | #START FLOODLIGHT# |
| 127 | ################## |
| 128 | |
| 129 | echo "FL: Starting Floodlight..." |
| 130 | cd / && ((java -jar ./root/floodlight/target/floodlight.jar) > floodlight-output 2>&1 &) |
| 131 | echo "FL: Finished!" |
| 132 | }}} |
| 133 | h. Next, we need to insert the OpenVswitch kernel module: |
| 134 | {{{ |
| 135 | ################### |
| 136 | #START OPENVSWITCH# |
| 137 | ################### |
| 138 | |
| 139 | echo "OVS: Configuring OVS..." |
| 140 | echo "OVS: Checking for kernel module..." |
| 141 | if [ -e $(lsmod | grep openvswitch) ] |
| 142 | then |
| 143 | echo "OVS: ...inserting kernel module" |
| 144 | /sbin/rmmod bridge |
| 145 | sleep 1 |
| 146 | insmod /root/openvswitch-1.7.1/datapath/linux/openvswitch.ko |
| 147 | else |
| 148 | echo "OVS: ...kernel module already present" |
| 149 | fi |
| 150 | }}} |
| 151 | i. After that, we need to initialize OpenVswitch and its database: |
| 152 | {{{ |
| 153 | echo "OVS: Creating database" |
| 154 | ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \ |
| 155 | --remote=db:Open_vSwitch,manager_options \ |
| 156 | --private-key=db:SSL,private_key \ |
| 157 | --certificate=db:SSL,certificate \ |
| 158 | --bootstrap-ca-cert=db:SSL,ca_cert \ |
| 159 | --pidfile --detach |
| 160 | echo "OVS: Initializing OVS..." |
| 161 | ovs-vsctl --no-wait init |
| 162 | echo "OVS: Starting OVS..." |
| 163 | ovs-vswitchd --pidfile --detach |
| 164 | }}} |
| 165 | j. Now, we need to take down any pre-existing OVS bridges: |
| 166 | {{{ |
| 167 | echo "OVS: Removing any existing bridge, $IFACE_bridge_eth $IFACE_bridge_wlan0" |
| 168 | echo "OVS: $IFACE_bridge_wimax $IFACE_bridge_int ..." |
| 169 | |
| 170 | ... |
| 171 | |
| 172 | ## Wlan0 |
| 173 | echo "OVS: Removing any existing bridge, $IFACE_bridge_wlan0..." |
| 174 | if [ -n "$(ovs-vsctl show | grep $IFACE_bridge_wlan0)" ] |
| 175 | then |
| 176 | echo "OVS: ...removing $IFACE_bridge_wlan0" |
| 177 | ovs-vsctl del-br $IFACE_bridge_wlan0 |
| 178 | fi |
| 179 | |
| 180 | ## WiMAX |
| 181 | if [ -n "$(ovs-vsctl show | grep $IFACE_bridge_wimax)" ] |
| 182 | then |
| 183 | echo "OVS: ...removing $IFACE_bridge_wimax" |
| 184 | ovs-vsctl del-br $IFACE_bridge_wimax |
| 185 | fi |
| 186 | |
| 187 | ## Internal |
| 188 | if [ -n "$(ovs-vsctl show | grep $IFACE_bridge_int)" ] |
| 189 | then |
| 190 | echo "OVS: ...removing $IFACE_bridge_int" |
| 191 | ovs-vsctl del-br $IFACE_bridge_int |
| 192 | fi |
| 193 | |
| 194 | ###################### |
| 195 | #ADD INTERNAL BRIDGES# |
| 196 | ###################### |
| 197 | |
| 198 | ... |
| 199 | |
| 200 | ## Wlan0 |
| 201 | echo "OVS: Adding interface bridge, $IFACE_bridge_wlan0..." |
| 202 | ovs-vsctl add-br $IFACE_bridge_wlan0 |
| 203 | echo "OVS: ...with port $IFACE_wlan0" |
| 204 | ovs-vsctl add-port $IFACE_bridge_wlan0 $IFACE_wlan0 -- set Interface $IFACE_wlan0 ofport=$port_eth1 |
| 205 | echo "OVS: ...with port $IFACE_patch_wlan0_to_tap" |
| 206 | ovs-vsctl add-port $IFACE_bridge_wlan0 $IFACE_patch_wlan0_to_tap -- set Interface $IFACE_patch_wlan0_to_tap ofport=$port_wlan0_to_tap |
| 207 | |
| 208 | ## WiMAX |
| 209 | echo "OVS: Adding interface bridge, $IFACE_bridge_wimax..." |
| 210 | ovs-vsctl add-br $IFACE_bridge_wimax |
| 211 | echo "OVS: ...with port $IFACE_wimax" |
| 212 | ovs-vsctl add-port $IFACE_bridge_wimax $IFACE_wimax -- set Interface $IFACE_wimax ofport=$port_eth2 |
| 213 | echo "OVS: ...with port $IFACE_patch_wimax_to_tap" |
| 214 | ovs-vsctl add-port $IFACE_bridge_wimax $IFACE_patch_wimax_to_tap -- set Interface $IFACE_patch_wimax_to_tap ofport=$port_wimax_to_tap |
| 215 | |
| 216 | ## Internal |
| 217 | echo "OVS: Adding interface bridge, $IFACE_bridge_int..." |
| 218 | ovs-vsctl add-br $IFACE_bridge_int |
| 219 | echo "OVS: ...with port $IFACE_tap" |
| 220 | ovs-vsctl add-port $IFACE_bridge_int $IFACE_tap -- set Interface $IFACE_tap ofport=$port_tap0 |
| 221 | #echo "OVS: ...with port $IFACE_patch_tap_to_eth" |
| 222 | #ovs-vsctl add-port $IFACE_bridge_int $IFACE_patch_tap_to_eth -- set Interface $IFACE_patch_tap_to_eth ofport=$port_tap_to_eth |
| 223 | echo "OVS: ...with port $IFACE_patch_tap_to_wlan0" |
| 224 | ovs-vsctl add-port $IFACE_bridge_int $IFACE_patch_tap_to_wlan0 -- set Interface $IFACE_patch_tap_to_wlan0 ofport=$port_tap_to_wlan0 |
| 225 | echo "OVS: ...with port $IFACE_patch_tap_to_wimax" |
| 226 | ovs-vsctl add-port $IFACE_bridge_int $IFACE_patch_tap_to_wimax -- set Interface $IFACE_patch_tap_to_wimax ofport=$port_tap_to_wimax |
| 227 | }}} |
| 228 | k. At this point, we're ready to set the patch ports between the OVS bridges. These create links between the OVS tap bridge and the OVS WiFi and WiMAX bridges in order to facilitate the flow of packets from the tap bridge to the physical interface of choice. |
| 229 | {{{ |
| 230 | ################# |
| 231 | #SET PATCH PORTS# |
| 232 | ################# |
| 233 | |
| 234 | ... |
| 235 | |
| 236 | echo "OVS: Patching ports $IFACE_patch_tap_to_wlan0, $IFACE_patch_wlan0_to_tap" |
| 237 | ovs-vsctl set interface $IFACE_patch_tap_to_wlan0 type=patch |
| 238 | ovs-vsctl set interface $IFACE_patch_tap_to_wlan0 options:peer=$IFACE_patch_wlan0_to_tap |
| 239 | ovs-vsctl set interface $IFACE_patch_wlan0_to_tap type=patch |
| 240 | ovs-vsctl set interface $IFACE_patch_wlan0_to_tap options:peer=$IFACE_patch_tap_to_wlan0 |
| 241 | |
| 242 | echo "OVS: Patching ports $IFACE_patch_tap_to_wimax, $IFACE_patch_wimax_to_tap" |
| 243 | ovs-vsctl set interface $IFACE_patch_tap_to_wimax type=patch |
| 244 | ovs-vsctl set interface $IFACE_patch_tap_to_wimax options:peer=$IFACE_patch_wimax_to_tap |
| 245 | ovs-vsctl set interface $IFACE_patch_wimax_to_tap type=patch |
| 246 | ovs-vsctl set interface $IFACE_patch_wimax_to_tap options:peer=$IFACE_patch_tap_to_wimax |
| 247 | }}} |
| 248 | l. 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'''. |
| 249 | {{{ |
| 250 | ########## |
| 251 | #SET DPID# |
| 252 | ########## |
| 253 | |
| 254 | ... |
| 255 | |
| 256 | ## Set Wlan0 DPID |
| 257 | echo "OVS: Setting $IFACE_bridge_wlan0 DPID to $OVS_switchDPID_wlan0..." |
| 258 | ovs-vsctl set bridge $IFACE_bridge_wlan0 other-config:datapath-id=$OVS_switchDPID_wlan0 |
| 259 | |
| 260 | ## Set WiMAX DPID |
| 261 | echo "OVS: Setting $IFACE_bridge_wimax DPID to $OVS_switchDPID_wimax..." |
| 262 | ovs-vsctl set bridge $IFACE_bridge_wimax other-config:datapath-id=$OVS_switchDPID_wimax |
| 263 | |
| 264 | ## Set Tap DPID |
| 265 | echo "OVS: Setting $IFACE_bridge_int DPID to $OVS_switchDPID_tap..." |
| 266 | ovs-vsctl set bridge $IFACE_bridge_int other-config:datapath-id=$OVS_switchDPID_tap |
| 267 | |
| 268 | ... |
| 269 | |
| 270 | ## Wlan0 |
| 271 | echo "OVS: Connecting $IFACE_bridge_wlan0 to controller at $OVS_controllerIP" |
| 272 | ovs-vsctl set-controller $IFACE_bridge_wlan0 tcp:$OVS_controllerIP |
| 273 | |
| 274 | ## WiMAX |
| 275 | echo "OVS: Connecting $IFACE_bridge_wimax to controller at $OVS_controllerIP" |
| 276 | ovs-vsctl set-controller $IFACE_bridge_wimax tcp:$OVS_controllerIP |
| 277 | |
| 278 | ## Internal |
| 279 | echo "OVS: Connecting $IFACE_bridge_int to controller at $OVS_controllerIP" |
| 280 | ovs-vsctl set-controller $IFACE_bridge_int tcp:$OVS_controllerIP |
| 281 | ovs-vsctl set bridge br_tap other-config:hwaddr=12:51:16:90:8f:ee |
| 282 | |
| 283 | echo "OVS: Finished!" |
| 284 | }}} |
| 285 | m. Now, the second-to-last thing to do in the setup script is to configure our network connections. We need to revoke the IPs from our physical interfaces and assign them to the OVS bridge interfaces corresponding to each inferface. This will allow us to inject data/packets into our OVS network. We also need to configure our OVS tap bridge as an available IP address in the same subnet as our VM's host-only network (noted earlier with '''ifconfig'''). And finally, we need to disable kernel IP forwarding. |
| 286 | {{{ |
| 287 | ########################## |
| 288 | #CONFIGURE NETWORK ACCESS# |
| 289 | ########################## |
| 290 | |
| 291 | ifconfig lo up |
| 292 | |
| 293 | ## Disable IP on physical interfaces |
| 294 | echo "NTWK: Taking down $IFACE_wimax..." |
| 295 | ifconfig $IFACE_wimax 0.0.0.0 |
| 296 | |
| 297 | echo "NTWK: Taking down $IFACE_wlan0..." |
| 298 | ifconfig $IFACE_wlan0 0.0.0.0 |
| 299 | |
| 300 | ## Assign static IP addresses for bridge interfaces |
| 301 | echo "NTWK: Assigning $IFACE_bridge_int IP as $IFACE_tap_IP..." |
| 302 | ifconfig $IFACE_bridge_int $IFACE_tap_IP netmask 255.255.255.0 |
| 303 | |
| 304 | ## Get an IP for bridge interfaces using DHCP |
| 305 | echo "NTWK: Assigning $IFACE_bridge_wimax IP via dhclient..." |
| 306 | dhclient $IFACE_bridge_wimax |
| 307 | |
| 308 | echo "NTWK: Assigning $IFACE_bridge_wlan0 IP via dhclient..." |
| 309 | dhclient $IFACE_bridge_wlan0 |
| 310 | |
| 311 | ... |
| 312 | |
| 313 | ## Turn off IP Forwarding |
| 314 | echo "NTWK: Disabling IP Forwarding..." |
| 315 | echo "0" > /proc/sys/net/ipv4/ip_forward |
| 316 | |
| 317 | ... |
| 318 | |
| 319 | }}} |
| 320 | n. Finally, look towards the bottom of '''system_setup.sh''' script. Notice the lines: |
| 321 | {{{ |
| 322 | #To add 100ms to all outbound traffic on br_wimax |
| 323 | #tc qdisc add dev br_wimax root netem delay 100ms |
| 324 | }}} |
| 325 | This command allows you to add a simulated delay on a particular interface. So we can see the handoff when it occurs, we will add a 100ms delay to the '''br_wimax''' interface. Uncomment this line to do so. |
| 326 | o. Save '''system_setup.sh''' and close your text editor. |
| 327 | 4. Examine the kernel routing table, and create a script to automate adding and removing of IP routes. |
| 328 | a. In the Root Terminal, change to the '''eth_control''' directory: |
| 329 | {{{ |
| 330 | $ cd eth_control |
| 331 | $ ls |
| 332 | ... delete_route.sh ... |
| 333 | }}} |
| 334 | b. Determine and note the entries in the kernel IP routing table: |
| 335 | {{{ |
| 336 | $ route -n |
| 337 | Kernel IP routing table |
| 338 | Destination Gateway Genmask Flags Metric Ref Use Ifac |
| 339 | 192.168.193.0 0.0.0.0 255.255.255.0 U 1 0 0 eth2 |
| 340 | 192.168.193.0 0.0.0.0 255.255.255.0 U 1 0 0 eth1 |
| 341 | 192.168.93.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0 |
| 342 | 0.0.0.0 192.168.93.2 0.0.0.0 UG 0 0 0 eth0 |
| 343 | }}} |
| 344 | c. With your text editor of choice, open '''delete_route.sh''': |
| 345 | {{{ |
| 346 | $ gedit delete_route.sh |
| 347 | #!/bin/bash |
| 348 | |
| 349 | echo "Previous routing table:" |
| 350 | route -n |
| 351 | |
| 352 | echo "Delete route for each phyical interface's OVS bridge..." |
| 353 | route del -net 192.168.193.0 netmask 255.255.255.0 dev br_wifi0 |
| 354 | route del -net 192.168.193.0 netmask 255.255.255.0 dev br_wimax |
| 355 | |
| 356 | echo "Delete route for each physical interface..." |
| 357 | route del -net 192.168.193.0 netmask 255.255.255.0 dev eth1 |
| 358 | route del -net 192.168.193.0 netmask 255.255.255.0 dev eth2 |
| 359 | |
| 360 | echo "Delete default routes..." |
| 361 | route delete default dev eth0 |
| 362 | |
| 363 | echo "Add single default route via OVS tap bridge..." |
| 364 | route add default dev br_tap |
| 365 | |
| 366 | echo "New routing table:" |
| 367 | route -n |
| 368 | |
| 369 | exit 0 |
| 370 | }}} |
| 371 | Configure the script to remove all routes except a single default route via the br_tap interface. Note, until the '''system_setup.sh''' is executed, there will be no OVS bridge interfaces present. As such, this script will not be run until after '''system_setup.sh'''. (There is no harm in running it now, though. If an attempt is made to add or remove a non-existent route, a error message will be displayed and the script will continue.) |
| 372 | d. Save the '''delete_route.sh''' script and exit the text editor. |
| 373 | |
| 374 | === Warnings === |
| 375 | {{{ |
| 376 | #!html |
| 377 | |
| 378 | <table id="Table_01" border="0" cellpadding="5" cellspacing="0"> |
| 379 | <tr> |
| 380 | <td> |
| 381 | <img |
| 382 | |
| 383 | src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/warning-icon-hi.png?format=raw" |
| 384 | |
| 385 | width="50" height="50" alt="Warning"> |
| 386 | </td> |
| 387 | <td> |
| 388 | Be on the lookout for typos in your scripts! |
| 389 | </td> |
| 390 | </tr> |
| 391 | </table> |
| 392 | }}} |
| 393 | |
| 394 | === Notes === |
| 395 | {{{ |
| 396 | #!html |
| 397 | |
| 398 | <table id="Table_02" border="0" cellpadding="5" cellspacing="0"> |
| 399 | <tr> |
| 400 | <td> |
| 401 | <img |
| 402 | |
| 403 | src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/4NotesIcon_512x512.jpeg?format=raw" |
| 404 | |
| 405 | width="50" height="50" alt="Note"> |
| 406 | </td> |
| 407 | <td> |
| 408 | Write down your interface names, IP addresses, and subnet masks. |
| 409 | All subnets must be the same for a Layer-2 handoff. |
| 410 | </td> |
| 411 | </tr> |
| 412 | </table> |
| 413 | }}} |
| 414 | === Tips === |
| 415 | {{{ |
| 416 | #!html |
| 417 | |
| 418 | <table id="Table_03" border="0" cellpadding="5" cellspacing="0"> |
| 419 | <tr> |
| 420 | <td> |
| 421 | <img |
| 422 | |
| 423 | src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/Symbols-Tips-icon.png?format=raw" |
| 424 | |
| 425 | width="50" height="50" alt="Tip"> |
| 426 | </td> |
| 427 | <td> |
| 428 | If you need assistance, please ask for help! |
| 429 | </td> |
| 430 | </tr> |
| 431 | </table> |
| 432 | }}} |
| 433 | |
| 434 | ---- |
| 435 | = [wiki:GENIExperimenter/Tutorials/WiMAXOpenFlow Previous: Introduction] = |
| 436 | = [wiki:GENIExperimenter/Tutorials/WiMAXOpenFlow/Execute Next: Execute] = |