VMs and IP address assignment


Recommended Posts

Hi all, I am a novice at this stuff, so please pardon if my question sounds silly. 

 

I am am running a firewall and dhcp in a vm in unraid and I want the unraid server Ip assigned by the vm. This is on a test machine with just one nic, but I do have a smart switch where I have the isp modem and the server plugged in using vlan tags.

 

so what I am trying to do, is that possible at all? If so, what sort of network configuration will I need to make?thanks

Link to comment

Seems a bit chicken and egg to me.  The DHCP server can't hand out a lease until it starts.  I would set a static ip in the Unraid webui and then get your VM setup.

 

Other thing you could look at it running ESXI as a hypervisor and both Unraid and Firewall as VMs.

Link to comment

I actually set this up recently with pfsense. You have to set your server on a static ip as @CHBMB stated.. Takes a little longer on boot because the server complains about not finding the network, but once the vm starts (which should be set to autostart) then everything seems fine for me.

Link to comment
20 hours ago, 1812 said:

I actually set this up recently with pfsense. You have to set your server on a static ip as @CHBMB stated.. Takes a little longer on boot because the server complains about not finding the network, but once the vm starts (which should be set to autostart) then everything seems fine for me.

 

 

To clarify, you're saying to setup a static IP in the network settings of unraid itself?  or setup static IP in the network settings of the VM?  

 

I'm currently having a similar issue where unraid will not grab an IP on the VLAN i had setup on my router ( Ubiquiti edgerouter connected to a smart switch) and my VM's also won't grab an IP either from the DHCP server.

Link to comment
5 minutes ago, brambo23 said:

 

 

To clarify, you're saying to setup a static IP in the network settings of unraid itself?  or setup static IP in the network settings of the VM?  

 

I'm currently having a similar issue where unraid will not grab an IP on the VLAN i had setup on my router ( Ubiquiti edgerouter connected to a smart switch) and my VM's also won't grab an IP either from the DHCP server.

 

Yes, I set  a static ip in unRaid (Setting tab>Network Settings), which boots and sets the ip of the server before the dhcp server in the pfsense vm is even started.

 

58ef6b0fe4697_ScreenShot2017-04-13at8_11_28AM.png.1890b73314d646cededbc4ed4a9f1e54.png

 

 

Then, the array auto starts after unRaid has fully booted. After the array starts (or maybe as it starts,) the vm with pfsense also starts. The vm ip is set as the gateway, which is also the default, which can be set/modified once pfsense is installed. 

 

The logs show unRaid complaining about the link being down upon boot, but once the vm starts, the link goes up and all works well.\

 

I haven't set the ip assigned to the mac address of my server in pfsense because I'm lazy (I should do this) and I don't have more than 30 devices, and they are all mostly static as well so no ip issues so far.

  • Like 1
Link to comment

ip address assignment to static, not automatic if you want to change that.

 

I don't play with vlan's on unRaid so I can't help much  there unless you change the assignment to static (shows auto in the image). Array has to be topped to make the changes, but you probably know that.

 

make sure your network interface is part of the bond (usually br0) and make sure your vm is set to use br0 and not vibr0<--- private and different ip range.

Link to comment
4 hours ago, brambo23 said:

I seem to be not having the same success as you.

 

58ef8c7bde262_Screenshotfrom2017-04-13103413.png.b627ddd008062daa4319e570cb76a4a3.png

 

I changed the VLAN to static but my vm still couldn't access anything on the network (even the gateway)

 

When using VLANs you need to set up your switch to handle VLANs as well, is this case you need to enable vlan tagging on the switch port.

 

The address 169.254.xxx.xxx signifies the server times-out in contacting the DHCP server to obtain an address, likely because the DHCP server isn't reachable (see point above).

 

Link to comment
9 hours ago, brambo23 said:

 

 

To clarify, you're saying to setup a static IP in the network settings of unraid itself?  or setup static IP in the network settings of the VM?  

 

I'm currently having a similar issue where unraid will not grab an IP on the VLAN i had setup on my router ( Ubiquiti edgerouter connected to a smart switch) and my VM's also won't grab an IP either from the DHCP server.

You seen to have a 10GBe NIC. Mind asking me what brand NIC/switch they are/connected to? I do have the same EdgeRouter (Lite) as you, though the exact model may differ.

 

I want to build something similar. 

Link to comment
3 hours ago, daze said:

You seen to have a 10GBe NIC. Mind asking me what brand NIC/switch they are/connected to? I do have the same EdgeRouter (Lite) as you, though the exact model may differ.

 

I want to build something similar. 

 

FWIW Here is what I use:

 

Mellanox connectx-2 MNPA19-XTR. I have one in my main server and one in the backup server. Originally I had one going directly to the other with DAC. But now, both go into a quanta LB4M.  I was going to build a switch with vyos but decided plug and play was nicer, in addition to the 48 gigabit ports on the switch.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.