Host networking with VirtualBox in debian etch

Discussions related to using VirtualBox on Linux hosts.
Post Reply
htamayo
Posts: 20
Joined: 7. Aug 2008, 23:59

Host networking with VirtualBox in debian etch

Post 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]
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post 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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply