LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-28-2009, 10:59 AM   #1
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 690

Rep: Reputation: 34
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 ?
 
Old 12-28-2009, 11:56 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you shouldn't need to create your own bridge, virtualbox should handle all off this for you.
 
Old 12-28-2009, 12:26 PM   #3
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 690

Original Poster
Rep: Reputation: 34
Quote:
Originally Posted by acid_kewpie View Post
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...
 
Old 12-28-2009, 02:21 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
concept deepaksinghnegi Linux - Newbie 2 10-23-2009 02:56 AM
LVM concept LinuGeek Linux - General 2 12-10-2008 09:41 AM
what is the concept behind RAID ? tofee Linux - Newbie 2 05-20-2006 05:44 AM
Do I have this concept down correctly? Creslin Linux - Newbie 7 05-16-2006 03:27 AM
MX record concept SiLiCoN Linux - Networking 3 06-17-2005 06:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration