Changes

Jump to navigation Jump to search
1,108 bytes added ,  16:05, 11 May 2016
m
Removed protection from "Qemu & Bridge"
== Enable virtual sharing of a Network Interface Card ==

(called "bridge network")
edit /etc/network/interfaces ans set:
<pre>
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto br0
iface br0 inet static
address 192.168.178.XXX <-- your PC IP
netmask 255.255.255.0
gateway 192.168.178.1
bridge_ports eth0
bridge_fd 5
bridge stp no
</pre>

== QEMU Scripts IFUP / DOWN MISSED BY DEFAULT SETUP !! ==

(on a default debian squeeze setup this scripts are not available)

Create with nano..
<pre>
sudo nano /etc/qemu-ifup
</pre>
Insert this text..
<pre>
#!/bin/sh

switch=$(/sbin/ip route list | awk '/^default / { print $5 }')
/sbin/ifconfig $1 0.0.0.0 up
/usr/sbin/brctl addif ${switch} $1
</pre>
Create with nano...
<pre>
sudo nano /etc/qemu-ifdown
</pre>
Insert this text..
<pre>
#!/bin/sh

# NOTE: This script is intended to run in conjunction with qemu-ifup
# which uses the same logic to find your bridge/switch

switch=$(/sbin/ip route list | awk '/^default / { print $5 }')

/usr/sbin/brctl delif $switch $1
/sbin/ifconfig $1 0.0.0.0 down
</pre>

Navigation menu