Changes between Version 1 and Version 2 of Automatic_Bridge_Ubuntu
- Timestamp:
- Mar 19, 2007 9:32:54 AM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Automatic_Bridge_Ubuntu
v1 v2 5 5 Date: 2007/03/16[[BR]] 6 6 7 1. Introduction 7 = 1. Introduction = 8 8 9 9 This is a quick tutorial on how to setup your Linux environment and VirtualBox, … … 16 16 modem to which i connect through my eth0 port. The modem has DHCP, so i get my IP automatically. 17 17 18 1.1 What is bridging anyway? 18 = 1.1 What is bridging anyway? = 19 19 20 20 Well... I thought you would already know it (since you are reading this howto). … … 25 25 26 26 One example of its use is if you have a notebook that can connect to your home 27 computer through a wireless adapter and the home computer is also connect to the Internet (or to any other network) through a cable. To make the notebook able to access the Internet you have to options: routing [1] and bridging[2]. Both solutions will work, but if you do routing only TCP/IP packets will be able to be exchanged (ok, ok, 90% of the world uses TCP/IP but hang with me). On the other hand bridging will give you a lot more of flexibility, since now the notebook will appear is it were direct connect to the other network, just like you. Doing so the notebook can then get its own IP address with DHCP, and you (and anybody on the same network than you) will be able to exchange any packet with the notebook without any problem.27 computer through a wireless adapter and the home computer is also connect to the Internet (or to any other network) through a cable. To make the notebook able to access the Internet you have to options: routing(ref 1) and bridging(ref 2). Both solutions will work, but if you do routing only TCP/IP packets will be able to be exchanged (ok, ok, 90% of the world uses TCP/IP but hang with me). On the other hand bridging will give you a lot more of flexibility, since now the notebook will appear is it were direct connect to the other network, just like you. Doing so the notebook can then get its own IP address with DHCP, and you (and anybody on the same network than you) will be able to exchange any packet with the notebook without any problem. 28 28 29 29 What happens here is that your computer was turned in a Switch (or a HUB), and … … 31 31 want to be connect to it. So what we will do here is configure a single bridge, and say that our network interface (usually eth0), and all network interfaces created by the VMs, will be connected to it. 32 32 33 1.2 Prerequisites 33 = 1.2 Prerequisites = 34 34 35 35 Before continuing the first thing you're going to need is make sure you have … … 44 44 }}} 45 45 46 2. Configuring the bridge 46 = 2. Configuring the bridge = 47 47 48 48 Ok, so lets start with the fun ;) … … 99 99 interface. 100 100 101 3. Giving the needed access 101 = 3. Giving the needed access = 102 102 103 103 Ok, now we need to give some permissions to devices and files. Note that, as … … 105 105 hey, its for a good cause! 106 106 107 3.1 /dev/net/tun 107 = 3.1 /dev/net/tun = 108 108 109 109 First things first, to allow VBox to automatically create the virtual interface … … 116 116 }}} 117 117 118 3.2 ifconfig and brctl[[BR]] 118 = 3.2 ifconfig and brctl = 119 119 120 Besides that you (optionally) need to setuid in the "ifconfig" and "brtcl" 120 121 commands. Setuid is necessary on these commands because you need to call them on the script used to configure your network, but they both need to be run as root to do what we want. … … 132 133 }}} 133 134 134 4. The scripts 135 = 4. The scripts = 135 136 136 137 Now that everything is in place lets configure the scripts that will be called … … 171 172 password only once. 172 173 173 5. Wrapping it up 174 = 5. Wrapping it up = 174 175 175 176 Well, thats it! Quite easy huh? Now all you need to do is create and virtual machine, go on its "Network" options, change the "Attached to" to "Host Interface", give the Interface a name (each machine should use a different interface!), and point the "Startup Application" and "Terminate Application", to your TapUP and TapDown files. … … 177 178 I've tested it with a Windows guest, and everything worked like a charm. 178 179 179 6. Thanks 180 = 6. Thanks = 180 181 181 7. Changelog 182 = 7. Changelog = 182 183 183 184 0.1 -> Initial version 184 185 185 8. References 186 = 8. References = 186 187 187 [1] http://en.wikipedia.org/wiki/Routing [[BR]]188 [1] http://en.wikipedia.org/wiki/Routing [[BR]] 188 189 [2] http://en.wikipedia.org/wiki/Bridging_%28networking%29