Size: 2398
Comment:
|
Size: 2394
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
||<tablestyle="float:right; font-size: 0.9em; width:40%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;"><<BR>><<TableOfContents(2)>>|| | ||<tablestyle="float:right; font-size: 0.9em; width:30%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;"><<BR>><<TableOfContents(2)>>|| |
Line 23: | Line 23: |
auto lo iface lo inet loopback |
auto iface lo inet loopback |
Network Bridge with a Tap!
Introduction
I was trying to get my Qemu XP VPC to have assigned IP from router to allow my Verizon Media Manger app to gain access to the network as it does not support forwarding. I created a set-up with the help of several posts in several locations (*to be noted later*.)
First Section
First, install the apps:
sudo apt-get install uml-utilities bridge-utils
Second Section
Second, Edit the /etc/network/interfaces file to match what you require, but my example shows my set-up for 1 ethernet (eth0,) 1 bridge (br0,) and one tap (tap0.)
Subsection
Your device names may be different, but the principle remains the same:
auto iface lo inet loopback
# Bridge between eth0 and tap0
auto br0
iface br0 inet dhcp
pre-up tunctl -t (tap device ""ex:tap0"") -u (tap owner) -g (owner group name)
pre-up ifconfig eth0 down (Brings down ethernet)
pre-up brctl addbr br0 (Adds bridge)
pre-up brctl addif br0 eth0 (Adds eth0 to bridge)
pre-up brctl addif br0 tap0 (Adds tap0 to bridge)
pre-up ifconfig tap0 up (Bring tap0 up)
pre-up ifconfig eth0 0.0.0.0 (Puts eth0 in promiscuous mode)
up chmod 0666 /dev/net/tun (Changes permissions on tap device to user/ owner)
post-down ifconfig eth0 down (Brings down eth0 )
post-down ifconfig tap0 down (Brings down tap0)
post-down ifconfig br0 down (Brings down br0)
post-down brctl delif br0 eth0 (Removes bridge between br0 & eth0)
post-down brctl delif br0 tap0 (Removes bridge between br0 & tap0)
post-down brctl delbr br0 (Removes bridge)
Subsection
That's it. The device is brought up and down with the system.
External Links
The links that follow are where I got all opf the info used to make this to do:
<https://help.ubuntu.com/community/BridgingNetworkInterfaces>
<http://www.cyberciti.biz/faq/setting-up-an-network-interfaces-file/>