LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need help with the 'bridge' concept (https://www.linuxquestions.org/questions/linux-newbie-8/need-help-with-the-bridge-concept-778497/)

jonaskellens 12-28-2009 11:59 AM

Need help with the 'bridge' concept
 
I have several virtual machines that I would like to be able to talk to each other AND talk to my LAN-clients (and visa versa).

So I have defined a bridge 'mybridge' where I have added my eth0 (LAN-interface) to it.

I would like this bridge 'mybridge' to be a virtual switch. Can I do it like this ??

How can I add the host where my virtual machines are running to this bridge ??? So I can vnc into the host to view my vm's (virtualbox).

What I have now is :

Code:

[jonas@host ~]$ brctl show
bridge name        bridge id                STP enabled        interfaces
mybridge                8000.002421547022        no                eth0

Code:

[jonas@jocan ~]$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:XX:XX:54:XX:22 
          inet6 addr: fe80::224:21ff:fe54:7022/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:39354253 errors:0 dropped:0 overruns:0 frame:0
          TX packets:72238736 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3089707404 (2.8 GiB)  TX bytes:18082253673 (16.8 GiB)
          Interrupt:17 Base address:0x4000

eth1      Link encap:Ethernet  HWaddr 00:XX:XX:68:XX:B9 
          inet6 addr: fe80::222:b0ff:fe68:73b9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3373182 errors:0 dropped:0 overruns:0 frame:3
          TX packets:2047594 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3209776035 (2.9 GiB)  TX bytes:278314457 (265.4 MiB)
          Interrupt:17

mybridge  Link encap:Ethernet  HWaddr 00:24:21:54:70:22 
          inet addr:192.168.1.10  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::224:21ff:fe54:7022/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:68728130 errors:0 dropped:0 overruns:0 frame:0
          TX packets:40887567 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5464766687 (5.0 GiB)  TX bytes:13841911927 (12.8 GiB)

To make my host accessible I have given the bridge 'mybridge' the static IP 192.168.1.10. Is this necessary ?
It makes that I am able to access my host machine through vnc or ssh...

So do I create a "virtual switch" this way ?? By creating a bridge ?

acid_kewpie 12-28-2009 12:56 PM

you shouldn't need to create your own bridge, virtualbox should handle all off this for you.

jonaskellens 12-28-2009 01:26 PM

Quote:

Originally Posted by acid_kewpie (Post 3806972)
you shouldn't need to create your own bridge, virtualbox should handle all off this for you.

If you choose natting yes... but that's not the way I work.

When working with my bridge, network traffic is rather slow...

acid_kewpie 12-28-2009 03:21 PM

VirtualBox doesn't do full bridging networking by default? Hmm, another good reason never to use it! ;-)

Anyway, they have a tutorial here.. http://www.virtualbox.org/wiki/Advan...tworking_Linux and seems all pretty standard stuff. By connecting the machines then it will be like a switch, certainly.


All times are GMT -5. The time now is 02:07 AM.