Hi,
I would like to have a DHCP server on my guest OS to serve all other guest OS and the PC in the same physical switch. That's possible? All the guest and the host are under Fedora 9.
I use static IP for all my Guest OS and I have no problem (web, ftp, etc), but I will like to install a DHCP server on a Guest OS not the HOST.
I use virtualBox 2.1.0
thank you
DHCP server on Guest
-
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
I don't know, and you don't specify, what connectivity your other Guests will have, and how the rest of your network is build, but if you use HIF, then the Host and all the other guests attached to HIF will get a DHCP address if the VM that offers DHCP is running. Note that any other machine on the network will get an address from the VM too, unless you have them on static.
If you only want the Host and other guests to obtain a DHCP, while the Host has another NIC for internet use, you need to create a virtual TAP interface so it doesn't mess with your current setup of the Host.
If you only want the Host and other guests to obtain a DHCP, while the Host has another NIC for internet use, you need to create a virtual TAP interface so it doesn't mess with your current setup of the Host.
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.
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.
-
dominiquearpin
- Posts: 3
- Joined: 16. Jan 2009, 18:47
Ok,
I had found a solution, but is incomplete. Now, I can use a DHCP server on a host and give IP to all the VM.
I add a tap device for each VM and I modify the vm, example:
tunctl -t tap1 -u vmuser
ip link set up dev tap1
brctl addif br0 tap1
VboxManage modifyvm VM1 -hostifdev1 tap1
And I just need to add eth0 to the bridge:
ip addr add 192.168.0.1/24 dev eth0
brctl addif br0 eth0
So, everything works perfectly
thanks
I had found a solution, but is incomplete. Now, I can use a DHCP server on a host and give IP to all the VM.
I add a tap device for each VM and I modify the vm, example:
tunctl -t tap1 -u vmuser
ip link set up dev tap1
brctl addif br0 tap1
VboxManage modifyvm VM1 -hostifdev1 tap1
And I just need to add eth0 to the bridge:
ip addr add 192.168.0.1/24 dev eth0
brctl addif br0 eth0
So, everything works perfectly
thanks