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