[[fester:staticip]]

This is an old revision of the document!


Configuring a Static IP Address

So far we have relied upon the DHCP server built into the router to assign IP addresses to the NICs in the server. This is inconvenient for reasons already outlined.

So let us assign static IP addresses to these NICs. This will ensure that the FreeNAS web GUI IP address will no longer change. This is much more expedient when administering a server.

Make sure it is outside of the range of the DHCP server.

There are two ways to do this. You can do it via the FreeNAS web GUI. This is the preferred method in most cases.

The other way is via the console, either directly at the server with a keyboard and monitor, or using an IPMI remote console viewer. This worked for me.

I have included both methods in the guide so you can see which works best for you.

Go to the “Network” page.

Click on “Interfaces” (1) and then click on the “Add Interface” button (2).

The “Add Interface” window will pop up.

In this window select the NIC you wish to configure from the “NIC:” drop down selection box (3).

Give the NIC a name if you wish in the “Interface name:” text box (4).

Do not tick the “DHCP:” tick box (5).

Now assign the static IP address to the NIC in the “IPv4 Address:” text box (6) (in Fester’s case this is 192.168.0.5).

Select from the “IPv4 Netmask:” drop down menu (7) the correct value for the subnet mask of your private network (Fester’s is 255.255.255.0).

My ISP does not use IPv6 at present so there is nothing to configure for this.

Now scroll down to the bottom of this window and click the “OK” button.

If you attempt to configure a second NIC with an IP address on the same subnet as the first within the FreeNAS web GUI, you will get an error that looks like this:

This is because multiple interfaces on the same subnet is an invalid configuration.

Start the IPMI remote console viewer, or connect a keyboard and monitor to your server. You should see a screen similar to this.

For “Enter an option from 1-14:” enter 1 and press the “Return/Enter” key.

Input the number that corresponds to the NIC you wish to configure in “Select an interface (q to quit):” (1).

Input n for “Delete Interface? (y/n):” (2).

Input n for “Reset network configuration? (y/n):” (3).

Input n for “Configure interface for DHCP? (y/n):” (4).

Input y for “Configure IPv4? (y/n):” (5).

Give the NIC a name if you wish at “Interface name:” (6). If you don’t want to give it a name then leave it empty and press the “Return/Enter” key.

Type in the static IP address you require at “IPv4 Address:” (7).

Now enter the subnet mask of the private network at “IPv4 Netmask:” (8).

The console should confirm that the configuration has been saved with an “OK”.

If you don’t need or use IPv6, then just type n at “Configure IPv6? (y/n):” (9).

That’s the static IP addresses assigned.

  • fester/staticip.1465650048.txt.gz
  • Last modified: 2016/06/11 13:00
  • by dan