Changes between Version 32 and Version 33 of Internal/OpenFlow/miscUnix


Ignore:
Timestamp:
Apr 27, 2013, 8:16:29 PM (12 years ago)
Author:
akoshibe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/miscUnix

    v32 v33  
    2020  * with `pf` (*BSD)
    2121 * Wireless with wpa_supplicant 
    22  * FreeBSD `ifconfig` shinaniganries. 
     22 * FreeBSD `ifconfig` shinaniganries.
     23 * FreeBSD, mininet (`mn`), and `qemu`
    2324[#print Quick Printing] Printing under *nix, relatively quickly
    2425 * CUPS
     
    313314If it throws errors, make sure that the kernel module (pf.ko or something similar) is loaded.
    314315
    315 == FreeBSD `Ifconfig` shinanigans. ==
    316 FreeBSD's `ifconfig` combines the features of `ifconfig` and `iwconfig` in Linux. For example, you can get a list of AP's, you can do:
     316== FreeBSD `ifconfig` shinanigans. ==
     317FreeBSD's `ifconfig` combines the features of `ifconfig` and `iwconfig` in Linux (and probably more). For example, you can get a list of AP's, you can do:
    317318{{{
    318319$ ifconfig wlan0 list scan
     
    354355}}}
    355356
     357Otherwise, this feature is pretty handy for quickly adding a IP interface to an interface for, say (as a silly example), creating a carted-off piece of network for a host you don't want to put on the main network, but you still need to access.   
     358
     359== FreeBSD , mininet, and `qemu/kvm`.==
     360
     361[http://mininet.org Mininet] is an SDN prototyping platform/data plane emulator. It uses Linux network namespaces, so it can only be natively installed on Linux. However, they provide a pre-installed VM that can be run with some virtualization. `qemu` is one such platform that can be used to run this VM. We need to diverge a bit from the Mininet page tutorials to get this working on FreeBSD.
     362
     363Note,we do need a machine that meets the prereqs for running `qemu` for this to work.
     364
     365=== references ===
     366 * https://wiki.freebsd.org/qemu - basic configs/setup
     367 * http://www.cyberciti.biz/faq/howto-configure-freebsd-vlans-with-ifconfig-command/ - figuring out some of the configs in the link above do
     368 * http://mininet.org/vm-setup-notes/ - starting the mininet VM
     369
     370=== the steps. ===
     371Installation. [[BR]]
     372Repeating the steps on the first link above:
     373
     374 1. Install `qemu` and `kqemu-kmod`. The first is qemu itself. the latter is the accelerator.
     375 2. Add to /boot/loader.conf:
     376  {{{
     377if_bridge_load="YES"
     378if_tap_load="YES"
     379aio_load="YES"
     380kqemu_load="YES"
     381  }}}
     382 3. add `kqemu_enable="YES"` to /etc/rc.conf so `aio` and `kqemu` are loaded at startup (optional).
     383 4. force re-reading of configs by rebooting or dropping to single-user mode and returning.
     384
     385Network configuration. [[BR]]
     386We need to configure network settings so the VM can communicate with the outside world.
     387
     388 1. add/set sysctl's in /etc/sysctl.conf :
     389  {{{
     390echo net.link.tap.user_open=1 >> /etc/sysctl.conf
     391echo net.link.tap.up_on_open=1 >> /etc/sysctl.conf
     392  }}}
     393 2. force read by service restart: `/etc/rc.d/sysctl start`
     394 3. create/bridge interfaces:
     395  {{{
     396ifconfig bridge0 create
     397ifconfig tap0 create
     398ifconfig bridge0 addm $iface addm tap0 up
     399chmod 0660 /dev/tap0
     400  }}}
     401 where $iface is your main networked interface.
     402
     403Convert/run Mininet VM. [[BR]]
     404
     405 1. Acquire VM from mininet site.
     406 2. convert .vmdk to .qcow2"
     407   {{{
     408qemu-img convert -O qcow2 mininet-vm-disk1.vmdk mininet-vm-disk1.qcow2
     409   }}}
     410 3. start VM (we don't use an ifup/ifdown script here):
     411   {{{
     412qemu -m 1024 mininet-vm-disk1.qcow2 -net nic,model=virtio -net tap,name=tap0,script=no
     413   }}}
     414
     415Configure guest. [[BR]]
     416
     417 1. To the guest's eth0, assign an address in the same IP block as your host's interface bound to tap0. For example, if tap0 is bound to fxp0 with address 192.168.1.100/24, assign something like 192.168.1.200.
     418 2. set default gateway. If my host's gateway is 192.168.1.1:
     419   {{{
     420sudo route add default gw 192.168.1.1
     421   }}}
     422 3. fix /etc/resolv.conf to match your network's DNS settings.
     423
     424You should be able to reach the VM from the network now/vice versa.
    356425----
    357426== Quick Printing Setup. == #print
     
    439508----
    440509[[BR]]
    441 ^1."Use" here is more close to "get it limping along" in this situation.^ [[BR]]
     510^1.ORBIT favors Ubuntu as the OS to use. ^
    442511^2.Apparently Mac OSX inherits this behavior. However I don't know if the same +/-alias parameter applies.^