Diff for "Network Bridge with a Tap!"


Differences between revisions 1 and 7 (spanning 6 versions)
Revision 1 as of 2010-10-30 11:59:41
Size: 2501
Editor: pool-96-238-53-181
Comment:
Revision 7 as of 2010-12-27 18:50:03
Size: 2513
Editor: 78-105-201-166
Comment: added coding brackets
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 10: Line 10:
= First Section = = Install =
Line 13: Line 13:
{{
sudo apt-get install uml-utilities bridge-utils
}}
Line 14: Line 17:
sudo apt-get install uml-utilities bridge-utils

= Second Section =
= Edit Configurations =
Line 20: Line 21:
== Subsection == == Loopback ==
Line 22: Line 23:
{{
auto iface lo inet loopback
}}
Line 23: Line 27:
auto lo
iface lo inet loopback

== Bridge ==
Line 28: Line 29:
{{
Line 60: Line 61:
}}
Line 61: Line 63:
== Subsection ==
That's it. The device is brought up and down with the system.
== Restart Networking ==
That's it. The device is brought up and down with the system or just restart the networking service
{{{
sudo etc/init
.d/networking restart
}}}
Line 68: Line 73:
* http://compsoc.dur.ac.uk/~djw/qemu.html

* https://help.ubuntu.com/community/BridgingNetworkInterfaces

* http://www.cyberciti.biz/faq/setting-up-an-network-interfaces-file/

* http://www.montanalinux.org/node/561

* http://samiux.wordpress.com/2007/07/11/bridge-network-interface-on-virtualbox/
 * <https://help.ubuntu.com/community/NetworkConnectionBridge>
 * <https://help.ubuntu.com/community/BridgingNetworkInterfaces>
 * <http://www.cyberciti.biz/faq/setting-up-an-network-interfaces-file/>

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*.)

Install

First, install the apps: {{ sudo apt-get install uml-utilities bridge-utils }}

Edit Configurations

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.)

Loopback

Your device names may be different, but the principle remains the same: {{ auto iface lo inet loopback }}

Bridge

# 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) }}

Restart Networking

That's it. The device is brought up and down with the system or just restart the networking service

sudo etc/init.d/networking restart

External Links

The links that follow are where I got all opf the info used to make this to do:


CategoryNetworking

Network Bridge with a Tap! (last edited 2011-05-10 21:07:43 by vpn-3206)