FreeNas on two Networks + DHCP for multiple Interfaces

Status
Not open for further replies.

Blackclaws

Cadet
Joined
Dec 31, 2014
Messages
2
So I am wanting to try out FreeNAS as our home storage solution.

Due to a strange setup notably 2 internet connection therefore 2 routers therefore 2 networks I want my FreeNAS box to be on both networks and serve content on both of them.

To see if that works the way I want it to I set up a VirtualBox Network that has the same topology as the real network.

The following things I noticed:

- If both networks are the same subnet due to the routers being configured identically for network purposes then it simply doesn't work for both networks. This is probably due to the fact that the FreeNAS box thinks it has two links to the same network and only routes through one interfaces (the first one in this case which also does work correctly)

- If I assign different subnets I can access the web interface from both networks which looks good.

I now wanted to setup the interfaces in the control panel however I get the irritating message that DHCP can only be enabled for ONE interface. I do not understand why that is the case. Indeed I can configure both interfaces using the command line based interface setup to both use DHCP.

Why is there this limitation in the WebGUI when setting up interfaces?

On a different note. Would it be possible to use the FreeNAS box as a bridge between the networks to allow access from one to the other and vice versa? Can different subnets directly communicate and discover each other if bridged?

I would also be interested in maybe coupling both WAN links and routing traffic via the FreeNAS box so as to be able to use both internet connections simultaneously (I know there is a lot involved here and I have read up on Dual WAN setups and what is possible without provider routing tables etc. however has anyone actually done this already with a FreeNAS box? The only things I have found is for pfSense)

Furthermore if I would use the FreeNAS box as a DHCP server I would probably still not be able to set both network interfaces to the same subnet as the box would not know which interface is connected to which network correct? So essentially I need to have two different subnets if I have two interfaces as far as I understand it.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
You need to fix your network issues.

Put a pfsense or vyos box in place to combine your wans and remove this dual network crap.
 

Blackclaws

Cadet
Joined
Dec 31, 2014
Messages
2
Its not so much an issue right now and I also can't just fix it the way you described at least not at the moment.

I also don't have another box just lying around that I can use for that. If you think that this would also work in a VM on the FreeNas box itself that would be a workable idea.

Also that didn't really answer any of my questions.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
It wasn't supposed to answer your question directly. It was to fix your problem.

You are asking Freenas to do something it isn't intended to do. Don't. Just fix the root of the problem instead of breaking it more by hacking on your Freenas box
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
Pirateghost is right. What you are trying to do is much more complicated than the real fix (which is properly setting up the dual wan). And for the love of all that is holy, don't use your FreeNAS to be a dual WAN router. Go find a small cheap box and fix it that way. Or go get a Ubiquiti Edge Router Lite for $100.

Out of curiosity - why do you have 2 WAN connections?
 
Joined
Oct 2, 2014
Messages
925
My guess for 2 WANs is two different ISPs one for fail over and other primary. You could always get a sonicwall TZ100 or TZ200 for cheap off ebay as well, my companies clients utilize 2-4 WAN connections and we use sonicwalls for either fail over or load balancing depending on number of WANs and there purposes.

He could also have 2 WANs and have one for Internet and one for voice (VoIP)
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
Except the OP has a "strange setup". 2 WAN connections, 2 routers, and 2 networks. Doesn't sound like a normal fail over situation.
 

Norleif

Dabbler
Joined
Apr 13, 2012
Messages
20
Perhaps it's a more primitive failover solution. If one WAN goes down, the other can still be accessed by switching to the 2nd network, either in software for dual-ported machines or by moving the drop cable on single-ported machines.
Requires no special hardware or knowledge. Just more jelly-bean LAN hardware.
 

Dave Genton

Contributor
Joined
Feb 27, 2014
Messages
133
Yes FreeNAS can serve up both of your networks but first things first. You have two overlapping networks ! Having 2 networks is fine, I won't question the why or how or waste another moment on it, however two networks means just that, TWO networks. You have 2 physical networks, logically you have one subnet assigned to them both. This is a very bad idea for so many reason and violates networking 101. I will assume you have them setup identically so that if one dies you can seamlessly use the other without disruption or more importantly, without any configuration. You can use DHCP and the router that responds first with his subnet is the one you will use for that session. With FreeNAS connected to both subnets you will see it just the same. I have my FreeNAS on 2 seperate networks for isolated storage iSCSI traffic as well as management and have had up to 7 at a time in it. FreeBSD can and will route but its not purpose built to be router, it can handle the decision making when having multiple networks however. Each router should have a different gateway address, 192.168.1.1 for first network, and 192.168.2.1 for the second. Assign addressing to freenas using the same value for the fourth octect like mine, which is ".9" on both current subnets. If your routers do not have the ability to "track" the WAN or Internet uplink for an outage then I understand that your inside gateway will not go down nor notify in any way to tell you its time to switch over to the 2nd network, I get it. If you can pay for two Internet connections then I suggest a networking device that can handle both WAN connections. As others suggested above an even cheaper solution and much easier to deploy are the Cradle products. A Cradle router the size of a credit card for a hundred bucks has most Enterprise level features when it comes to load balancing or doing failover for up to 3 WAN connections. Due to a fully featured stateful firewall and NAT capabilities as I stated you can choose to either load balance your traffic across all live WAN connections based upon many factors including bandwidth, latency, and other metrics. More so you can have a single subnet range in your house by a device that can front end both of your Internet connections whether as a redundancy failover type situation or load balancing between the two for very little money. A single Cradle router can save money by not having to purchase additional NIC's for all your devices to have to dual connect to the LAN due to limitations with dual Internet provider routers being onsite. With my travel size cradle I can even use USB, 3G, 4G, wireless on top of standard ethernet etc. all as viable WAN options.

Frankly however in todays digital age in all seriousness from someone that's designed networks for over 20 years there is not much reason for dual Internet routers in your home these days. I remember days of the Internet being out more then it was "on" but I have lived in my current home for nearly 5 years and have had one single outage of my Internet WAN. About 8 months ago when that first outage occurred, it was so large every person in the bay area was out telephone, cable tv, Internet, all business were down, it was huge....telco networks must provide 5 9's for service, 99.999% uptime. While cable companies were exempt from this law its become standard in order to compete and survive in the market place. Buy a router, hardware device intended for this purpose, dont rely upon FreeBSD OS under FreeNAS nor anything else. Using software and CPU resources is asking for trouble, not if, but when. or maybe change ISP's to one that's reliable like Verizon FiOS, choose a higher speed with a single connection that will out perform both of your existing combined, if that were actually possible :)
 
Status
Not open for further replies.
Top