DHCP to Static IP

Status
Not open for further replies.

balanga

Patron
Joined
Jul 10, 2014
Messages
271
What do I need to change from DHCP to Static IP?

Can I do everything via the GUI or is there any editing of conf files involved?
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
What do I need to change from DHCP to Static IP?
Some routers can effectively do this too, i.e. you tell the router to always assign the same IP address to a specific device (identified by its MAC address).
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Some routers can effectively do this too, i.e. you tell the router to always assign the same IP address to a specific device (identified by its MAC address).
Just be aware that many routers do not handle DHCP reservation properly.

When I set up my NAS and the plug-ins that I use, I assigned static IP's. To me, this kept everything simple - and made it easy to set up special conditions for port forwarding, etc. When I recently updated my home network to AC wifi and installed a new router, I did not have to go back and change any network settings on my devices.

In the small networks I manage, I set the router to start DHCP assignment at xxx.xxx.xxx.031 which leaves me with plenty of IP addresses for DHCP while reserving a reasonable number that can be used for static IP assignment. For most home and small office networks, this should be sufficient.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
You know what sucks about relying on your dhcp server to handle server IP addresses, even reservations?

When the damn dhcp isn't online when you fire up your server. Fustercluck ensues.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
In the small networks I manage, I set the router to start DHCP assignment at xxx.xxx.xxx.031 which leaves me with plenty of IP addresses for DHCP while reserving a reasonable number that can be used for static IP assignment. For most home and small office networks, this should be sufficient.
I do essentially the same thing, but some people like to run everything off DHCP, fusterclucks notwithstanding ;)
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
You know what sucks about relying on your dhcp server to handle server IP addresses, even reservations?

When the damn dhcp isn't online when you fire up your server. Fustercluck ensues.

The best solution is to use DHCP reservations and static IP addresses on the server. If either the server or the router gets reset, IP addresses are still working until both sides are set up correctly again.

...just don't forget to fix the problem, or you're back to square one.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
The best solution is to use DHCP reservations and static IP addresses on the server. If either the server or the router gets reset, IP addresses are still working until both sides are set up correctly again.

...just don't forget to fix the problem, or you're back to square one.
Which is what I do for the main server functions in my home.

But I have been bitten by the dhcp server isn't up before the reservation client is up. It sucks.


Sent from my iPhone using Tapatalk
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
It's all in the GUI.

IP address, gateway, name server

Apologies in advance for my naivity, but I can't figure where I need to make these changes.... I guess it must be under the Network tab, but where exactly?

Under Interfaces do I need to click Add Interface ? This seems strange since I already have a working interface so why would I want to add one?
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Apologies in advance for my naivity, but I can't figure where I need to make these changes.... I guess it must be under the Network tab, but where exactly?

Under Interfaces do I need to click Add Interface ? This seems strange since I already have a working interface so why would I want to add one?
gateway and name server are under the global configuration


for the nic and static IP, add interface, select your interface, and set an ipv4 address.
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
Thanks for that.... It just didn't seem intuitive that I needed to add an interface if the only interface I have is already configured and working...
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
Thanks for that.... It just didn't seem intuitive that I needed to add an interface if the only interface I have is already configured and working...

I don't think you do! I think you just go to Network/Interfaces, select your existing interface, press the Edit button that appears, and alter the settings. If you are changing to DHCP you may have to remove some of the existing settings, I've never used DHCP on FreeNAS. You probably then may have to alter some of the Global Configuration settings too, I don't know to what extent they are automatically populated when you use DHCP
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
I don't think you do! I think you just go to Network/Interfaces, select your existing interface, press the Edit button that appears, and alter the settings. If you are changing to DHCP you may have to remove some of the existing settings, I've never used DHCP on FreeNAS. You probably then may have to alter some of the Global Configuration settings too, I don't know to what extent they are automatically populated when you use DHCP
For whatever stupid reason, when you have the server configured for dhcp, it doesn't show an interface at all. You have to add one. Dumb design.
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
For whatever stupid reason, when you have the server configured for dhcp, it doesn't show an interface at all. You have to add one. Dumb design.
So I was wrong! How bizarre; I said I'd never used DHCP. What happens if you have an interface configured with fixed IP, and add a second one configured with DHCP? (Usually not a good idea, but your fixed IP might not be on your DHCP subnet.) If it doesn't show the second one, how do you ever remove it? Presumably 'add' a new configuration to the second NIC and then delete it?
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
So I was wrong! How bizarre; I said I'd never used DHCP. What happens if you have an interface configured with fixed IP, and add a second one configured with DHCP? (Usually not a good idea, but your fixed IP might not be on your DHCP subnet.) If it doesn't show the second one, how do you ever remove it? Presumably 'add' a new configuration to the second NIC and then delete it?
If you add a second one, you can select dhcp on the add interfaces option and it will show up. It's just the default configuration out of the box that is jacked up. I thought someone was crazy until I went and tested it myself.
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
If you add a second one, you can select dhcp on the add interfaces option and it will show up. It's just the default configuration out of the box that is jacked up. I thought someone was crazy until I went and tested it myself.

Someone ought to do a bug report, it must be very confusing to people in @balanga's position.
 

ovizii

Patron
Joined
Jun 30, 2014
Messages
435
LOL, it sure is, I never left "DHCP" because I couldn'T figure out why I would need to add an interface if it was actually working with DHCP without adding one :smile:
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Which is what I do for the main server functions in my home.
But I have been bitten by the dhcp server isn't up before the reservation client is up. It sucks.
I have always used static IP's for the FreeNAS server and other network infrastructure items I have on my home network. Everything else, such as laptops, phones, TV's, etc will be DHCP. Also, I don't bother with DHCP reservation in the router. When I need to reset the entire system (which doesn't happen very often,) there won't be any issues waiting for a DHCP server to come up. Obviously, you have to wait for everything to come up (say after a power outage) before you can use the network, but it will all come back.

For a simple home network, with FreeNAS only, maintaining one static IP for the server is easy. If you install a plugin that serves data, such as Plex, then I suggest you also set it up with a static IP. Then you just point your browser to the IP address, and it all works.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Lol. I have 30 reservations in my dhcp server right now. I've actually scaled down on my server count in the house....
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
Someone ought to do a bug report, it must be very confusing to people in @balanga's position.

It certainly was confusing because being a newbie I assumed that I could simply edit the existing network config, and spent quite a while looking for such an option, before giving up and posing the question in the forum, half expecting that some FreeNAS guru would jump on me saying .... the obvious ... RTFM.

Anyway thanks to some helpful folks here, I have static IP configured - but it should be a little bit more intuitive...
 
Status
Not open for further replies.
Top