Setting up network "failover" on your X10 or similar server

Status
Not open for further replies.

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
So, most of the chatter in the forum about the link aggregations centers around LACP, which is something that is dealt with elsewhere, and does not generally apply to the average home user's equipment. If you're like most people, you have poked around into every setting on the GUI, and you see that in the Network->Link Aggregations, you can add several different types of aggregations. If you've been reading the forum, you see that about 95% of the chatter is about LACP, which people (mostly wrongly) believe is a method by which they can double (or whatever) their network throughout. Using most of these link aggregations is probably a bad idea in almost all of the cases, whether it is the LACP, or the "round robin" aggregation, or what have you.

There is however, one of these that EVERYONE can use, regardless of their equipment: failover. There really is no downside, except it can be tricky for a minute or two to set up. The upside is that 90+% of home FreeNAS users with proper boards (say, X10's or whatever) have 2, or sometimes, 4 on board high quality Intel LAN NICs, and they're only using one of them for their network, and you can derive some small amount of satisfaction knowing that you've used more than one.

Unfortunately, you don't really need to. The odds you would ever need "failover" for your home-based FreeNAS setup are just about zero.

But, it costs you nothing, and as I said, there is some satisfaction to it.

What does "failover" do?
It's very simple. You connect two (or more) ethernet connections. One of them (say, igb0) is, as before, your main network connection. 100% of your traffic flows through it. The other one (say, igb1) is connected to your router/switch also. Typically, no traffic at all egresses or ingresses to your FreeNAS box via this link (though, you will still get the general network traffic, such as broadcast packets, or whatever else impinged that ingress). But, in the exceptionally unlikely event that your NIC or cable or port dies on the first link, it will instantly without even a moment's pause simply use the second link, and no one is the wiser. When/if the first link comes back up, it will automatically go to the main, first, link again. Worked pretty well too! I started a download of a 15GB movie, pulled the cable, and it failed over without hardly a blip on the transfer throughput.

I have a picture of this in action. I transferred a 2GB movie with both plugged in, then pulled the first main interface, and did it again. You can see how it fails over:

lagg.jpg


So, how do you set it up?

Turns out it's not entirely trivial, but it's not too bad. Here's how you do it for a board like the X10SLM with 2 Intel NICs:

You have to create your "lagg" (link aggregation) interface. The catch is, you can only put something in a lagg if it's not in use. So you have to "delete" your igbo (or whatever) main interface that you've been using. Which, if you're paying attention, means you're screwed on the GUI, since you just disconnected your FreeNAS, lol. So it has to be done in IPMI, or at the physical console.

So go in there, go to "Configure Network Interfaces", and remove/reset all of your networks. Then, go to "Configure Link Aggregation", and add your two interfaces (typically igb0 and igb1) individually to it, turn on DHCP (if that's what you're using), select "failover" as the type, and now you have a "lagg0" interface. (You might be wondering, will the MAC address for the lagg0 be different? Typically, no. The MAC address for the lagg interface will be the MAC address of the first interface, so if you are using static DHCP assignment from your router, everything will be fine.)

Now, pretty much everything is in chaos. You'll want to reboot your box. Once you reboot, you'll probably want to take these steps:

  1. You should be able to get to the GUI. Go to "network"->global configuration, and set your "IPv4 default gateway" to the correct thing (192.168.1.1 for a lot of people). If you don't do this, your jails will be hosed.
  2. Turn each and every jail off in the jail screen.
  3. Turn them back on.
  4. Your file shares are probably in a state of chaos now. Go into the "SERVICES" menu and turn off, then on, CIFS and whatever else you're using.
And that should do it.

So now, in the 0.00019% chance that your primary network cable or port goes out, you are now automatically going to use the other one. Pretty sweet, as an exercise, at least. Go ahead and pull the main ethernet cable, and observe the cuspiness of the failover.

Anyway, thoughts for a Wednesday night. Thanks to m0nkey_ from the IRC channel who worked out some of the kinks.
 
Last edited:

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Status
Not open for further replies.
Top