SOLVED Setting a static IP for my FreeNAS box

Status
Not open for further replies.

CraftyClown

Patron
Joined
Apr 5, 2014
Messages
214
Afternoon chaps and chapettes,

I am fairly new to FreeNAS so I'll start by asking you to please excuse any silly questions I may ask, but I've ballsed up enough tech based things in my life to know it's sometimes better to ask silly questions, than to make silly mistakes!

I have had my FreeNAS box running without problem for a while now, but after some recent decorating where it was necessary to unplug my box, PCs and routers for a while, I had a devil of a job setting things back up on the network again afterwards, as new IP addresses were assigned and nobody could see each other across the network.

I'm presuming the most sensible thing here would be to assign a static IP address to the FreeNAS box so it can always be found in the same location, however here is where my knowledge gets very shaky. I understand what I should be doing in principle, but I'm conscious that making a mess of this could cause me a great deal of headaches.

I've looked in the manual under static routes (I presume this is what I should be looking at) however to my untrained eye this information was still a little hard to understand.

I would be hugely grateful if someone more knowledgeable could give me a nudge in the right direction here.

Cheers

Rich
 
Last edited by a moderator:

CraftyClown

Patron
Joined
Apr 5, 2014
Messages
214
Ok, so I'm trying to work this out myself and I'm presuming that at the router end it is simple as reserving the IP address FreeNAS uses so nobody else can take it?

I've taken a screen grab of the options on my Sky router. So effectively my router stays on DHCP, randomly dishing out IP addresses for however connects to it,
except for my FreeNAS box, which will always be assigned 192.168.0.3

Am I on the right lines here?

The bit I'm not sure about is how to tell FreeNAS it is always 192.168.0.3

Skyrouter_zps2db6dab7.jpg
 
Last edited by a moderator:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
You can either reserve an IP address at your router, and leave FreeNAS to get it via DHCP; or you can configure FreeNAS to use a static IP address--see the manual, section 2.5 (to use the console) or section 5.2 (to use the web GUI). There's no need to mess with routes at all.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
CraftyClown,

I agree with danb35. Additionally, your questions are *far* outside the realm of this forum.

To be honest, and blunt, if you are asking questions about DHCP and static IPs, you've got *much* more hurt coming down the line than you are probably ready to handle.
 

CraftyClown

Patron
Joined
Apr 5, 2014
Messages
214
CraftyClown,

I agree with danb35. Additionally, your questions are *far* outside the realm of this forum.

To be honest, and blunt, if you are asking questions about DHCP and static IPs, you've got *much* more hurt coming down the line than you are probably ready to handle.


Ermm okey dokey, but as a user new to FreeNAS. Where on earth should I be asking questions that pertain to static IPs, if such a question is far outside the realm of the 'New to FreeNAS' forum.

I'm also not sure why you think I should be expecting trouble down the line, just because I'm asking questions about FreeNAS's static IP settings? I've not had the need to deal with static IPs before, however that doesn't mean I'm incapable of learning about them or generally grasping new concepts. :)
 
Last edited by a moderator:

CraftyClown

Patron
Joined
Apr 5, 2014
Messages
214
You can either reserve an IP address at your router, and leave FreeNAS to get it via DHCP; or you can configure FreeNAS to use a static IP address--see the manual, section 2.5 (to use the console) or section 5.2 (to use the web GUI). There's no need to mess with routes at all.

Thank you danb35. I incorrectly presumed I would need to tell both the router and the FreeNAS box what the IP address was. As it is incredibly straight forward to assign the IP via the router, that seems like the more sensible way to solve this.
 
Last edited by a moderator:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Either way works, and I don't know that one works any better than the other. The only potential sticking point with configuring via the router is that you need the MAC address, but that usually isn't much of a problem.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Your questions are with basic networking, so I'd read up on basic networking. This section of the forums (and the forums in general) are meant for solving problems with FreeNAS. They aren't typically used for giving someone a basic understanding of computing. If my mom had to setup a FreeNAS server, this is the last place she should come because she should understand all the other underlying technology first (that includes networking, hardware, etc etc etc). You appear to lack knowledge in what we would call "networking-101". That's not what this forum is for, and not many of us are about to spend a few hours writing up an explanation when you could easily google and get the answer. That's why I recommended Google.

I also said that you are likely to have more problems because if you don't understand basic networking I don't think it's a far stretch to assume you probably don't know the basics of other important topics. And it is quite possible to have a working server that will some day eat your data without you even realizing what you've screwed up until after it's too late.

To take a quote from my FreeNAS for noobs presentation:

¨Your dedication to learning how to use the command line and setup FreeNAS with the proper features to monitor your hard drives, your UPS, and your hardware will determine how safe your data is."
¨If you choose to do the bare minimum learning, your data is not as safe as someone that has spent a few weeks to become thoroughly familiar with FreeNAS and custom scripts."
¨If you choose to spend the necessary time to get familiar with FreeBSD command line and scripting you can have a very safe and reliable storage location for your data."

Those are written because of how many people start using FreeNAS thinking they do have the required info and don't realize they have one (or more) serious knowledge gaps. Some are nothing more than an inconvenience (like the one from this thread). Others have resulted in a loss of their data with no potential for recovery.

This is akin to swimming in the deep end of the pool without a lifeguard. Don't go into the deep waters until you are sure you know what you are doing. If you don't know what you are doing you might find you are going to pay the price.. with your data being lost to the mysterious void.

From my experience here over the last 2.5+ years there's two things I am good at:

1. Identifying the problem that people have.
2. Identifying people that are almost certainly going to make serious problems they aren't going to identify until its too late.

I can't fix #1 until it happens. And I've tried to fix #2 with my noobie presentation and the FreeNAS documentation. I also try to warn people (like I warned you above) that you probably are in over your head right now. It can be fixed, just need to do more reading and understanding. But the reason for the warning is so you can know what you are doing right now and not when you post your next thread titled "ZOMG my data is gone! PLEASE HELP!". We seen plenty of those threads already and I hate them.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
@cyberjock, OP's question was about how to set his FreeNAS server to a static IP address. How is that out of scope for this forum? I agree that the question (particularly where he didn't realize that a DHCP reservation on the router obviates any need to specify the IP address on the FreeNAS box) suggested a lack of basic network knowledge, but the question itself sounds exactly on point for this forum.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Notice that his screenshot is not FreeNAS? That's not our realm, and any advice given for that hardware (and or software) is not really appropriate for this forum.

We get people that ask how to create a domain on their Windows Server so they can run FreeNAS on their domain, and they get the same answer.. "These aren't the droids you are looking for..."

That's all I was trying to say.
 

CraftyClown

Patron
Joined
Apr 5, 2014
Messages
214
Ok, fair point my second post which included a screen grab of my router took things out of the forums scope, however I stand by my original question which was a genuine attempt to find a solution to my issue within Freenas.

I appreciate you get a lot of stupid questions from people who fail to RTFM but that certainly isn't the case here. I always read what ever info I can get my hands on before attempting anything technical. In fact Cyberjock, your guide was the first thing I read before setting up my box ;)

I read the section on Networking but I didn't find it incredibly clear and thought it sensible to check here first, hence my post.

Yes my knowledge of networking is basic at best, but I've genuinely never needed to give a device a static IP before now. We all have to learn somewhere :D

I hope this clears things up
 

mw2014

Dabbler
Joined
Aug 27, 2014
Messages
27
As a newbie myself, I understand the frustration of not being able to find answers.

My first choice for questions is to look in the Guide, then search this forum, then Google.
If I still can't find it or I'm confused, I ask the Forum (I'm sure most newbie questions have been answered a thousand times and I don't like to waste peoples time).

Print the FreeNAS Guide and read it cover to cover (boring but it helps), I had it printed (about $30.00), you can make notes and refer to it at any time.
The Static IP setup is on pages 41-42 of the manual.

When I set up my test box I had the same question about setting up a static IP and found a step by step answer on Google.
It's the same information as the guide but in a step by step form.

http://gamblisfx.com/how-to-change-ip-address-on-freenas-server/

First, boot FreeNAS and you should see a menu screen after boot.

Type 1 and press enter to get into the network interface configuration.

You will see all the network interfaces listed.

In my case I only have one network interface.

Type 1 and press Enter. Then answer the following question.

Q: Reset Network Configuration? (Y/N)
A: Press N

Q: Configure Interface for DHCP? (Y/N)
A: Press N

Q: Configure IPv4? (Y/N)
A: Press Y

And then give a new name for the interface or simply press Enter.

Next type the IP address you want to assign to the server.

IPv4 Address: 192.168.2.200 (its just an example. You can change this to anything you want)

IPv4 Netmask: 255.255.255.0

Q: Configure IPv6? (Y/N)
A: Press N (I do not need to configure IPv6 at the moment).

Now FreeNAS will reset the network interface. Now you should see your new IP address displayed.

You can now access the web interface using the new IP address


The website has pictures.
Also, this is all done from the console.

I hope this helps.
 

9C1 Newbee

Patron
Joined
Oct 9, 2012
Messages
485
CraftyClown, setting up a static address in FreeNAS is pretty straight forward. But your problem is, you need to select one in a range outside of your router's DHCP range. We have all been there and done that. This is your opportunity to spend an hour or two to learn what is going on. If you take the time to learn what is happening here, it will be absolutely worth it. Not just for FreeNAS. This would be a skill set you will use every time you connect a device to your network. Since networks are not going to go away....well.....you see where I am going with this. You already know you need a static ip. Knowing that means you are half way there.

And by the way, you may want to take note on all the tweeks you do to the router. When you decide to get a different router and/or change ISP's, you will have to figure out how to make those changes on different equipment. Having a list of what you did will help you figure it out. And that will be yet another wonderful joyous opportunity to learn even more stuff :(
 
Last edited:

CraftyClown

Patron
Joined
Apr 5, 2014
Messages
214
Ha ha, thank you for the feedback guys.

In the two weeks since I originally posted this, I have learnt an awful lot about networking, to the point I have now swapped out my naf router for a much better one, which I then modded with dd-wrt, allowing me to set up a secure OpenVPN server for me to tunnel in to my network with.

It's now making me chuckle that I didn't know how to set a static IP at the start, as it really is basic :D

I've spent so many man hours researching and learning some of this stuff in the past 14 days and in this day and age, it really is useful stuff to know.

The next pet project is going to be setting up a VPN in my office.

Big thanks to @cyberjock for the kick up the backside, as it set me on a mission :)
 

9C1 Newbee

Patron
Joined
Oct 9, 2012
Messages
485
That is cyber's thing. Tough love for everyone. Everyone that meets minimum requirements, that is.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
It is tough love, but in the bigger scheme of things it's important that you get a dose of it if you don't have the required knowledge to know "right from wrong". Better to give you a dose of reality than to lose your data (and we've had far too many of the latter because they didn't accept the former).

For those that meet the minimum requirements and use appropriate hardware, if you have a FreeNAS problem I practically bend over backwards to help. I've done plenty of Teamviewer sessions for free and such.

I also don't feel that this forum is the place to get support for things that aren't directly FreeNAS. Yes, I may have what I think is the answer, but that's not why I am here and its not why %randomuser% is here. The last thing this forum needs is for people to think they can use the FreeNAS forums for unrelated support. We could easily give bad advice or bad recommendations that could be fatal problems in the future. So let people take those questions to the appropriate forum.

I don't think I'm unreasonable with those simple "rules for the road", but I think people are just expecting the first place they post to always provide the answer (and the correct one) and that's unrealistic. If you came to this forum to overhaul your vehicle's engine you'd be an idiot in my book. That's clearly not something you should be asking people in *this* forum. ;)
 

9C1 Newbee

Patron
Joined
Oct 9, 2012
Messages
485
You know I gotta toss a few zingers your way, cyber.:p

It cracks me up how people come into a forum (not just here, but any forum) looking for answers. They get all red assed when the answers are not favorable to their situation. And/or they have a piss poor attitude (unlike CraftyClown) toward the messenger of bad news.

Crafty took the ball and ran with it. Now he has a one more tool in the tool bag to attack future problems.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Yeah. I think it really boils down to how many feel they must prove themselves everywhere they go. For those that do they'll fight tooth and nail to the extreme. But for those that are mature (and smart enough) to realize there's nothing to prove here and it's just about storing some data and building an amazing file server, this place is great.

People think I have an axe to grind for whatever reason, and they are welcome to their opinion. But for those that have met me in person, that's not my way. I don't care if you've got to prove yourself everywhere you go. You come here then expect advice that is the best I can offer with the information provided. Sometimes its wrong, sometimes it not "the whole story", but (hopefully) it's correct more often than not. If you don't like the advice, that's fine. Nobody is making you take it. But don't be upset if you ignore me and later it bites you in the ass. ;)

I love to see people take the ball and run with it. I have no doubt he'll ask another question or two as anyone that has the ball and runs sometimes hits the speed bump and needs to know where the ball needs to be taken next. Those are the kinds of users that will have a heck of an amazing time with FreeNAS. The real pain is for those people that will only accept advice if they like what they hear.
 

Matt Platte

Cadet
Joined
Apr 13, 2017
Messages
3
I looked in the Manual too. Eventually discovered that /etc/netcli.sh is the setup script. Reading /etc/rc.conf leaves one the impression that using ifconfig would soon lead to tears. NB: don't choose the "reset" option.
 
Status
Not open for further replies.
Top