examples/tap/virtual-network-setup.sh
author Tom Henderson <tomh@tomh.org>
Fri, 20 Aug 2010 12:17:19 -0700
changeset 6589 9c325569fb01
parent 6112 57ee810f08f3
permissions -rwxr-xr-x
Help waf to guess release versions of nsc and pybindgen
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6112
57ee810f08f3 Python versions of tap VM examples
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     1
#!/bin/sh
57ee810f08f3 Python versions of tap VM examples
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     2
brctl addbr br-left
57ee810f08f3 Python versions of tap VM examples
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     3
brctl addbr br-right
57ee810f08f3 Python versions of tap VM examples
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     4
tunctl -t tap-left
57ee810f08f3 Python versions of tap VM examples
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     5
tunctl -t tap-right
57ee810f08f3 Python versions of tap VM examples
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     6
ifconfig tap-left 0.0.0.0 promisc up
57ee810f08f3 Python versions of tap VM examples
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     7
ifconfig tap-right 0.0.0.0 promisc up
57ee810f08f3 Python versions of tap VM examples
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     8
brctl addif br-left tap-left
57ee810f08f3 Python versions of tap VM examples
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     9
ifconfig br-left up
57ee810f08f3 Python versions of tap VM examples
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    10
brctl addif br-right tap-right
57ee810f08f3 Python versions of tap VM examples
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    11
ifconfig br-right up
57ee810f08f3 Python versions of tap VM examples
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    12
pushd /proc/sys/net/bridge
57ee810f08f3 Python versions of tap VM examples
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    13
for f in bridge-nf-*; do echo 0 > $f; done
57ee810f08f3 Python versions of tap VM examples
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    14
popd
57ee810f08f3 Python versions of tap VM examples
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    15
lxc-create -n left -f lxc-left.conf
57ee810f08f3 Python versions of tap VM examples
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    16
lxc-create -n right -f lxc-right.conf