Using freenas server as switch to access internet

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
If the smart switch doesn't support trunking because it has no routing capabilities but you plug one port from that switch into a router that does, the router can then manage what VLAN it will send the traffic to and the switch doesn't need to have router capabilites? Or would the switch also need it to read in the frame telling it which VLAN the traffic is destined too?
The switch will in most cases support trunking, just not be routing between VLANs. So it forwards the frames over the trunkport to thr router which removes the tag from VLAN A, slaps on a new tag for VLAN B, and passes it back to the switch which forwards it to the port with the client addressed. So the traffic passes the switch-router link twice. This is this router-on-a-stick thing.
 

tibblist

Dabbler
Joined
Apr 15, 2020
Messages
28
I was just trying to heed the warnings of others on the forum that bridging through the server is hacky and may break in the future or whatever. But yeah that is the solution I would prefer.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
If you simply want 4 or some greater number of clients with 1G each to max out all four ports of your FreeNAS then simply LAGG all the ports together into a 4G bundle and do the same on your sufficiently capable switch. Connect the router with a single 1G port, because it is limited by the uplink anyway. Done. LAGG can distribute traffic based on layer 2 and layer 3 addresses, so if your 4 clients have 4 consecutive IPv4 addresses the traffic will nicely balance across all four links.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I was just trying to heed the warnings of others on the forum that bridging through the server is hacky and may break in the future or whatever. But yeah that is the solution I would prefer.
It's not hacky. It's been supported by FreeBSD for years. The FreeBSD foundation just sponsored Kristof Provost completely refactoring the bridge code to get a speed improvement of 5x or similar.
It is possible that FreeNAS could drop support for this fancy networking stuff some time in the future because of maintenance effort and, seriously, it's a NAS and not a network device. But then again they also just vastly improved the network management interface in 11.3 and I do not see FreeBSD core functions like bridging going away any time soon.
Should they drop it from the web UI you could still write a post-init script that creates the bridging and similar stuff. I have also been doing that for years in FreeNAS prior to 11.3.
 

tibblist

Dabbler
Joined
Apr 15, 2020
Messages
28
Reading the "Should you LACP" primer on the forums said it would randomly hash and distribute devices so they could end up all on the same line and it's just random. That said if consecutive addresses solves it I can manually set the IP of all the devices to be consecutive using the router if that would definitely solve that problem.

4) So the basic problem many people experience is that in order to get a good distribution of traffic, you need more than just two clients. If you have two clients, there is a 50% chance that both flows will end up on the same link of a dual-link LACP connection. If you have three clients, at least two will end up on one connection while another probably has a connection all to itself - but! It is still possible for all three to end up on the same link! And what client generates network traffic 100% of the time? In practice, it is usually difficult to get link aggregation to work well until you have at least a dozen clients and a very busy network.
 
Last edited:

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776

Look for the laggproto and lagghash options. It appears random if you don't know what is going on under the hood ...
Your switch will have to support LACP and provide similar load-distributing options.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680

Look for the laggproto and lagghash options. It appears random if you don't know what is going on under the hood ...
Your switch will have to support LACP and provide similar load-distributing options.

The real problem is that LACP is still useless at small scale even if you do know what's going on under the hood. With a small set of clients, it is usually only luck if it works out well for any given traffic load. That's the point of the sticky.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
With layer 3 hash only and suitable addressing it should work out as intended ...

Then again I am not quite sure I understood what the OP is trying to achieve. If this is just an academic exercise to max out available capacity ... shrug. If 1G doesn't cut it, I would go to 10G.

This is not the age of yellow hose, anymore. Bursty traffic will perfectly max out the shared capacity now that everything is switched and full duplex ...
 
Top