Page 1 of 1

Host networking with VirtualBox in debian etch

Posted: 18. Sep 2008, 00:23
by htamayo
Hi, I need to host networking between my Debian Etch (Host OS) and Windows XP (guest OS), my host OS gets an IP from the DHCP Server, I need to assign an IP the my Guest OS to communicate between them, but here is the problem:

The network admin told me that I should geet ONE IP from the DHCP, so, i can't use NAT for the guest OS, if I do so, my Host and Guest OS will have different IP gotten from the DHCP.

My question is: how can I add a "local static ip" for my Guest OS, for ex: 192.168.10.10 added to a tap0, and then communicate with my real eth0 (that obtains the ip from the dhcp)

The config in my /etc/network/interfaces is the next:

Code: Select all

auto eth0
iface eth0 inet manual

auto br0
iface br0 inet dhcp
bridge_ports eth0 tap0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off

Now, at this point, I was trying with the next:

Code: Select all

sudo tunctl -t tap0 -u utamayo
sudo chmod 666 /dev/net/tun
sudo /usr/sbin/brctl addif br0 tap0
sudo ifconfig tap0 192.168.0.94 up
sudo bash -c 'echo 1 > /proc/sys/net/ipv4/conf/tap0/proxy_arp'
sudo route add -host 10.10.1.16 dev tap0
sudo arp -Ds 10.10.1.16  eth0 pub
Any suggestions are welcome

Regards[/code]

Posted: 19. Sep 2008, 22:24
by Sasquatch
What is the problem with NAT? Why do you want to use HIF? Just curious, as there might be a different way for you to get what you want. NAT is just for Internet and some basic port forwarding.

You can create a permanent Host Interface if you use the VBoxAddIF command as described in the manual. As you already attach the Host Interface to the bridge, the Guest system should get a DHCP address too. If it doesn't, you only need to set a static address with the same information as the Host, except for the actual IP address else there will be a conflict. If the Guest does not obtain an IP from the DHCP server, ask your Network Admin to provide you a static address to use so there won't be a conflict on the network.