LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 07-16-2008, 12:32 PM   #1
hashbangbinbash
Member
 
Registered: Mar 2008
Posts: 106

Rep: Reputation: 16
Bridging, NAT, and the use of virtual servers


Not specifically a linux question this but... does anyone know what bridging means when talking about setting up virtual servers? I see the option but I'm not sure what it does, apparently it affects the way your vm is reached over the networka routera? For some reason some hosting companies don't like it if you use bridging when running virtual machines on their servers.

And also there is something to do with NAT filesystem...

If any of what I'm saying means anything to someone It'd really help me if you could explain something, at the moment I'm not even sure what to google regarding bridging, virtual machines and NAT and how these three terms might relate to eachother.

Thanks for any help at all.
 
Old 07-16-2008, 01:03 PM   #2
pruneau
Member
 
Registered: Jul 2008
Location: Montreal
Distribution: Debian/Fedora/RHEL
Posts: 45

Rep: Reputation: 15
Bridging for a virtual machine basically means that the hardware interface is equally shared amongst the host and the VM, which, for all practical purposes, simulate the fact that you have a bunch of computers connected through a switch.
With this option, there is little on the host computer that can be done to control what is done by the VMs, hence maybe the reluctance of your provider to let you do it.

Another problem is that in bridging configuration, the VM are taking IP address directly from the pool of the LAN where the host machine is connected: in the NAT configuration, they use a machine-local IP address, and only the host computer requires an IP address for itself.

Hope it clears things a bit, but do not hesitate to ask more questions.
 
Old 07-16-2008, 01:04 PM   #3
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
i think it means connecting the networking on the guest os to the hosts.
 
Old 07-16-2008, 01:48 PM   #4
kcoriginal
LQ Newbie
 
Registered: Oct 2007
Location: US -First Baltimore, then MD Sticks, then NC then Cali now San Antonio.
Distribution: ubuntu 8.04 and Centos 5.2
Posts: 29
Blog Entries: 4

Rep: Reputation: 15
Bridging

You know how your home Cable or DSL router takes a public IP from your Internet provider and gives everyone inside your house a 192.168.1.x address?

Hopefully, you do... heh heh

Well, that's NAT.

In that case your PC would be NATted a 192.168.1.100 or something like that. And it would, in turn, NAT again to the VMs. So the main system IP would be 192.168.1.100 on the house network, but to the VM, your PC that is actually running VMware would appear like 192.168.1.1 or 192.168.7.1, the same way your router appears to the PCs in your home.

With this confusion spoken, bridging has your VM request an IP from your home router instead of the PC. So, the physical machine that is "the computer running VMWare"... it has two or more IP addresses. One for "the real physical machine", and one for each "virtual machine" as well.

If you NATted, it would only appear to have 1 ip address, for the physical machine. All requests to the internet from the VM would be translated/brokered/negotiated by the main PC/VMware Server/VMware Player software. Which would, in turn, send the request to the router to be brokered again.

With Bridging, this translation/brokering/negotiating is done directly by the router for the VM, as it is normally for a home user. As if the VM was an actual physical stand-alone computer.





Of course, if you are not a home user, you will need to replace all occurences of home user and home router with "See your IT department for further details"!

:-)

HTH

kc
 
Old 07-16-2008, 03:43 PM   #5
kenoshi
Member
 
Registered: Sep 2007
Location: SF Bay Area, CA
Distribution: CentOS, SLES 10+, RHEL 3+, Debian Sarge
Posts: 159

Rep: Reputation: 32
Sounds like you are running some form of VMWare Server/Workstation. Anyway, bridging is simply 2 way packet forwarding. Where VMWare is concerned, the guest OS that has its network connection "bridged" has direct access to the same network the host OS is on. Any network traffic to and from the guest OS is simply "forwarded" by the host system.

Your hosting service doesn't like VMs with bridged connections is probably cause they're lazy, or they have to assign additional IPs to you, or they have some strict NAC in place, or even worse, they are hosting you on VMs already heh.

NAT stands for network address translation. When the guest OS is configured to use NAT instead of bridging, it means (in layman terms):

- A virtual network is created between the guest OS and host system
- The network interface of the guest OS is on this virtual network.
- The host system accesses this network via a vif (virtual interface)
- the host system's vif is also the gateway for the virtual network
- the host system then acts as a NAT router for the virtual network

Any traffic that originates from the guest OS and destined for computers outside of the virtual network, will have its source IP translated to the host system's real IP. The destination computer thinks the traffic originated from the host system, and is unaware of the guest OS.

Any RETURNING traffic from computers outside of the virtual network, destined for the guest OS, will have its destination IP set to the host system's IP. Once it gets to the host system, the destination IP is translated to the guest OS IP, and is forwarded to the guest OS.

VMWare site has a lot of helpful docs that can explain this in more detail, you might wanna check there.

Hope this helps.
 
Old 07-17-2008, 08:08 AM   #6
hashbangbinbash
Member
 
Registered: Mar 2008
Posts: 106

Original Poster
Rep: Reputation: 16
Thanks alot people, your solid and easily understandable answers really have been enormously helpfull!

Yaay, LinuxQuestions.org
 
Old 07-19-2008, 09:32 PM   #7
kcoriginal
LQ Newbie
 
Registered: Oct 2007
Location: US -First Baltimore, then MD Sticks, then NC then Cali now San Antonio.
Distribution: ubuntu 8.04 and Centos 5.2
Posts: 29
Blog Entries: 4

Rep: Reputation: 15
:-D

<sniff>

I am so glad I could help...

<sniff sniff>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
VMWare's bridging vs Window's bridging - routing is messed up when Windows bridging brenan99 General 0 05-04-2008 11:24 PM
Windows virtual machine can't join domain using bridging on Linux host (RPC failed) bgottesman Linux - Networking 0 07-10-2007 06:09 PM
LVS-NAT for DNS servers freelinuxcpp Linux - Networking 0 07-31-2004 05:52 AM
Double NAT, IPtables and bridging SWAT Linux - Newbie 1 02-16-2004 05:43 PM
Multiple Servers behind NAT router pnh73 Linux - Networking 6 10-08-2003 02:18 PM


All times are GMT -5. The time now is 06:39 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration