-2

I have created an overlay Level 2 network using VLAN tags with Open vSwitch. I want a Level 3 one so I need to give each VM a consistent IP address.

I'd like every host on this VLAN to get an IP address from a DHCP server, so I can plug in and out every VM without having to manually set static IP addresses in each one of them.

I though about attach a DHCP-VM on this VLAN : this VM would contain a DHCP server implementation (Ubuntu default one is ok) and as the default DHCP is out of this VLAN, every VM attached would get the IP address from this VM's DHCP.

But I am introducing a whole VM, in other words another machine, just for a DHCP server, this solution seems just too much. Can you suggest me any other solution?

Abhijeet Kasurde
  • 983
  • 9
  • 20
user2358943
  • 105
  • 1
  • 3
  • Install DHCP on an existing server? – NickW Mar 11 '14 at 14:15
  • If you're trying to get to a layer 3 network, you'll need some device that can route between the two networks. Almost any device that can route between the two networks can be setup to do forward DHCP requests. – Rex Mar 11 '14 at 14:25
  • 1
    `Is there a way to emulate a DHCP server` - Yes. Deploy a DHCP server. `But I am introducing a whole VM, in other words another machine, just for a DHCP server, this solution seems just too much` - How else would you deploy a DHCP server without deploying a DHCP server? If you don't want to deploy a dedicated VM for this then use one of the existing VM's. – joeqwerty Mar 11 '14 at 14:54
  • Please do not post on multiple Stack Exchanges sites. Questions will be migrated if needed. http://superuser.com/questions/727545/need-a-dhcp-server-solution-for-overlay-network – Dave M Mar 11 '14 at 14:57
  • Just deleted sorry...I copied the question because it suited more to serverfault but totally forgot to delete it from super user – Phate Mar 11 '14 at 15:31

1 Answers1

2

Yeah, either you have a router on the network that does dhcp serving, or you can have a small (1 virt proc 512mb ram) linux box running dhcpd, but you need something. A small linux dhcpd would be an extremely small footprint on any decent sized hypervised box, imho.

MDMoore313
  • 5,581
  • 6
  • 36
  • 75
  • Is there any particular small distro you would suggest me? – Phate Mar 11 '14 at 15:31
  • Well, I'm partial to CentOS minimal, it's pretty small and you always make it *smaller*, depending on what you require, which isn't much. – MDMoore313 Mar 11 '14 at 16:03