| 206 | ---- |
| 207 | === Incase you are using regular linux bridgeing === |
| 208 | |
| 209 | In winlab we used simple bridgeing instead of the open-V-switch. Many steps remain the same however there are a few adjustments. These adjustments basically have to do with installed packages and the ifup and ifdown scripts. |
| 210 | |
| 211 | 1. The package installed was |
| 212 | {{{ |
| 213 | apt-get install bridge-utils |
| 214 | }}} |
| 215 | 1. /etc/networks/interfaces was reconfigured to reflect the bridged interface: |
| 216 | {{{ |
| 217 | # This file describes the network interfaces available on your system |
| 218 | # # and how to activate them. For more information, see interfaces(5). |
| 219 | |
| 220 | # The loopback network interface |
| 221 | auto lo |
| 222 | iface lo inet loopback |
| 223 | |
| 224 | # The primary network interface |
| 225 | auto eth0 |
| 226 | iface eth0 inet dhcp |
| 227 | |
| 228 | auto eth1 |
| 229 | iface eth1 inet manual |
| 230 | |
| 231 | auto br0 |
| 232 | iface br0 inet static |
| 233 | address 192.168.200.67 |
| 234 | network 192.168.200.0 |
| 235 | netmask 255.255.252.0 |
| 236 | bridge_ports eth1 |
| 237 | bridge_stp off |
| 238 | bridge_fd 0 |
| 239 | bridge_maxwait 0 |
| 240 | }}} |
| 241 | 1. The ifup and ifdown scripts were replaced with the brctl equivalents: |
| 242 | {{{ |
| 243 | /etc/ifup-br0 |
| 244 | -------------------------------------------------------------------- |
| 245 | #!/bin/sh |
| 246 | |
| 247 | switch='br0' |
| 248 | /sbin/ifconfig $1 0.0.0.0 up |
| 249 | /sbin/brctl addif ${switch} $1 |
| 250 | -------------------------------------------------------------------- |
| 251 | |
| 252 | /etc/ifdown-br0 |
| 253 | -------------------------------------------------------------------- |
| 254 | #!/bin/sh |
| 255 | |
| 256 | switch='br0' |
| 257 | /sbin/ifconfig $1 0.0.0.0 down |
| 258 | /sbin/brctl delif ${switch} $1 |
| 259 | -------------------------------------------------------------------- |
| 260 | }}} |
| 261 | 1. The kvm startup script was modified to use these scripts instead of their ovs coutnerparts: |
| 262 | {{{ |
| 263 | vmhost2:/root# more start_vm |
| 264 | kvm -daemonize -vnc :$2 -m 2048 -smp 2 -net nic,model=virtio,macaddr=00:11:22:EE:EE:E$2 -net tap,script=/etc/ifup-br0,downscript=/etc/ifdown-br0 -drive file=$1 |
| 265 | }}} |
| 266 | Where $1 is the image name, and $2 is the last digit of the mac and it's matching vnc port number. |
| 267 | ---- |