With the iptables approach you are "connecting" two networks using
your real Linux box as a router. Basically, you have a private network
where the ip traffic is "masqueraded", and the host's network just
deal with your Linux box.
VM' Network <--->Router (Linux) <---> Host's Network
Using the bridging approach, you are connecting two different
networks using a bridge (of course, using your real Linux box). Here,
you have a private network which is "bridged" to your host's network
VM' Network <----> Bridge (Linux) <---> Host's network.
Reading the parprouted's man page:
"parprouted is a daemon for transparent IP (Layer 3) proxy ARP bridging.
Unlike standard bridging, proxy ARP bridging allows to bridge Ethernet
networks behind wireless nodes..."
"...daemon ensures that the Linux kernel
will be able to route the packets to the destination host when it
receives them without any need routing/subnetting manually"
Parprouted adds a rule to the route table. If you check your route
table, you'll find something like:
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.1 0.0.0.0 255.255.255.255 UH 50 0 0 eth0
192.168.2.113 0.0.0.0 255.255.255.255 UH 50 0 0 tap0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 eth0
The second rule will send all packages for 192.168.2.113 (my VM) to
the tap0 interface.
If your distro doesn't have parprouted (try 'aptitude install
parprouted' in a Debian based distro) you can follow this steps to set
your network using a bridge:
http://www.ubuntuforums.org/showthread.php?t=346185&page=4
Keep in mind that this last link is for a "layer 2 bridge", so you
won't be able to connect VM's to the host's networks if they are
running on a wireless interface...unless you use iptables (in this
case, better use the iptables approach)
I hope it have helped you out!!
On 3/28/07, David Baron <[EMAIL PROTECTED]> wrote:
> On Wednesday 28 March 2007, Luis Gallardo wrote:
> > Javier, you haven't told us what your host system is...but if you're
> > using Linux here you are:
> >
> > I set my networking with bridging. My script in the Linux host is:
> >
> > Host:
> >
> > tunctl -t tap0 -u lgallard
> > chmod 666 /dev/net/tun
> > /sbin/ip link set tap0 up
> > /sbin/ip addr add 172.16.16.16/32 dev tap0
> > echo "1" > /proc/sys/net/ipv4/conf/tap0/proxy_arp
> > echo "1" > /proc/sys/net/ipv4/ip_forward
> > parprouted eth0 tap0
> > echo "tap0 is set"
> >
> > In this example lgallard is the user who launches the virtual
> > machines. Then, I set a static ip in the guest OS (no matter if it's
> > Linux or Windows)
> >
> > Guest (Linux):
> >
> > Add to the /etc/network/interfaces this lines:
> >
> >
> > # The primary network interface
> > auto eth0
> > iface eth0 inet static
> > address 192.168.2.113
> > netmask 255.255.255.0
> > gateway 192.168.2.1
> >
> > Set your ip, netmask and gateway according to the network where the
> > VM's will be connected. If you want DNS resolution, add your dns
> > servers in the /etc/resolv.conf
> >
> > Guest (Windows)
> >
> > Go to the TCP/IP interface properties a set the values for a static
> > IP connection and DNS resolution.
> >
> What is precisely the difference between this and ML's or Vladimir's approach?
> No iptables?
> ip called instead of ifconfig (but similar parameters)?
>
> My distro does not have parprouted. What might one substitute (instead of the
> iptables rule) ?
>
> _______________________________________________
> vbox-users mailing list
> [email protected]
> http://vbox.innotek.de/mailman/listinfo/vbox-users
>
--
Saludos,
Luis Gallardo
_______________________________________________
vbox-users mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-users