Jump to content

Static or Dinamic IP ? (SOLVED)


Recommended Posts

Hey everyone, a few days ago I had to reboot my UnRaid to find out when it loaded it reassign a different IP address.

My question is:

1. Should I try to assign an Static IP? 

   If yes, should I do that on my UnRaid or Router

   If not, how can I avoid the constant IP change

2. How would you guys go about it?

3. Why the default IP assignment is "Automatic" (DHCP I guess).

 

Thanks a lot...

Edited by MacRaid
Link to comment
Hey everyone, a few days ago I had to reboot my UnRaid to find out when it loaded it reassign a different IP address.
My question is:
1. Should I try to assign an Static IP? 
   If yes, should I do that on my UnRaid or Router
   If not, how can I avoid the constant IP change
2. How would you guys go about it?
3. Why the default IP assignment is "Automatic" (DHCP I guess).
 
Thanks a lot...

1. Yes, it is better to assign a static IP address to the server. This avoids the very situation you described; not knowing the IP address of the server when that may be the only way you can access it.

2. I assigned the static IP address in both UnRAID (settings —> network) and the router. No doubt about it then.

3. It has to default to DHCP or the server would not get an IP address and would not be accessible on initial boot. No way to set a static address as default without knowing your network configuration; thus DHCP.


Sent from my iPhone using Tapatalk
Link to comment

Thank you so much to both. I completely understand the theory now, tomorrow I'll get hands on and set it up on both as recommended. 

This is what I need to change in UnRaid to manual and whatever address, right? 

1078398782_SmartSelect_20200504-003653_SamsungInternet.thumb.jpg.021cc0a0c601cbe0b6b59ae7c3aecab8.jpg

BTW what is that /24? The range for other IP assignments? Should I leave it as is and change only the address?

I'll check my Router (since it's a new one) and let you know.

Link to comment
5 minutes ago, MacRaid said:

BTW what is that /24? The range for other IP assignments? Should I leave it as is and change only the address?

It is the mask for the subnet.  Basically, it controls the size of the address space.  Look here for more information:

 

     https://en.wikipedia.org/wiki/Subnetwork

 

Just leave it set at /24 unless you know you have to set to some other value.  (If you have to ask what value to assign to it, you definitely don't want to change it!)

Link to comment
5 minutes ago, MacRaid said:

BTW what is that /24? The range for other IP assignments? Should I leave it as is and change only the address?

That's the CIDR notation of the IP address and /24 is the bit length of the subnet mask (255.255.255.0).  Leave it at /24 unless you have a reason to want to change it and know what that means.

 

Here are my network settings for eth0.  I also set static DNS entries to a third-party (Cloudflare) DNS.  Some like to use Google DNS (8.8.8.8 and 8.8.4.4).  That is often preferred to just letting it default to your router/ISP DNS entries.

 

image.thumb.png.6f35dd0f5e3a84801a8c42178d121121.png

  • Like 1
Link to comment
10 minutes ago, Hoopster said:

I also set static DNS entries to a third-party (Cloudflare) DNS.  Some like to use Google DNS (8.8.8.8 and 8.8.4.4).  That is often preferred to just letting it default to your router/ISP DNS entries.

+1   Unraid should be able to use the router's DNS settings but sometimes things don't work like they should.  Supplying entries for DNS servers on this page will always guarantee the the server can get DNS service.  Always provide two addresses in case a DNS server is down.

 

Link to comment
1 hour ago, Frank1940 said:

Just leave it set at /24 unless you know you have to set to some other valu

I'll do that, very little knowledge about this.

1 hour ago, Hoopster said:

Here are my network settings for eth0.  I also set static DNS entries to a third-party (Cloudflare) DNS

I'll go step and test, one at the time:

1. Change the IP in UnRaid, test.

2. Find out how to change IP in Router (this should be the same one I assign in step 1, right), test.

3. Try to understand/match your DNS settings.

 

The DNS address setting (Cloudflare/Google) is to improve connection? Stability? Security? As I said before I'm way over my head with all this, I do learn quickly tho.

This is how mine looks atm.

1284897773_Screenshot_20200504-020220_SamsungInternet.thumb.jpg.a252a10cc467e9f1a09a1d2e9a9b0864.jpg

 

59 minutes ago, Frank1940 said:

Always provide two addresses in case a DNS server is down.

I'll Google that to get a better understanding.

 

I'll work on it tomorrow, 2am already here.

Thanks everyone for your help and patience.

Link to comment
58 minutes ago, MacRaid said:

1. Change the IP in UnRaid, test.

You need to set the server assignment to static as well.  Don't leave it at Automatic.

 

59 minutes ago, MacRaid said:

The DNS address setting (Cloudflare/Google) is to improve connection? Stability? Security? As I said before I'm way over my head with all this, I do learn quickly tho.

Speed, reliability, accessibility are the general reasons for using a third-party DNS.  It also bypasses any weird DNS things your router/ISP may have implemented.

Link to comment

Sorry for the late update.

 

So I manage all changes and after reboot it assign the same IP as expected.

My Router was tricky since it only had "Reserve IP address" option, but I guess the function is the same.

 

A big thank you to all for your help and patience.

 

Be safe...

Link to comment

I prefer to set the address as "static" in the router, and leave on automatic in unraid.

How to set a "static" address on a ASUS router is described here.

https://www.asus.com/support/FAQ/114068

 

Note that the router will still use the HDCP dynamic addresses in the range you decided to use, so all other devices connected to it will always connect and get a dynamic address (prevents address conflicts). You can reserve addresses in the used range.

That is what a "static" address as in the link above is.

The "reserved" address is linked to the MAC address (=unique) of your physical communication port and thus work as a "local" LAN "static" address.

 

If you only set your static addresses on the router it will not allow you to give the same address to several devices or to be outside the used range.

 

As an example If you want to suddenly use the 192.168.X.X range instead of 10.X.X.X which you can choose to do on your router.

Then your unraid static ip has to be changed at the same time to fit in that range before you can access it.

The router will immediately notice you that your static IP is not valid, unraid will not, because it doesn't know that you are changing the router "IP range".

 

I prefer to keep track of all this management in my router.

For example if you connect several unraid servers to your router you manage all addresses on the router instead of on the router (IP range) and all your unraid servers (static addresses).

 

If you connect to several different routers (network backup scenario or something) or if someone else manages the router and you can't configure them then I can see a point in setting the static address in unraid.

 

If you happen to mess with the settings, at least unraid will try to connect at some non conflicting address if you have it set to automatic.

Just log into your router and see where it is or use the id name like "Tower" when searching from a terminal device.

 

Do note that a static address on WAN (the internet) is something else and usually what people mean when they talk about a static address.

In the context of unraid of course we talk about our local (LAN) "static" IP.

Edited by Alexander
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.

×
×
  • Create New...