Tutorial: TrueNAS FreeNAS LAGG & LACP Setup

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
tom here from lawrence systems we're going to talk about link aggregation on the trunas mini 3.0 x plus that was provided to me by iax systems for review and this demo is all about why you'd want to do link aggregation the benefits and a couple caveats and some of the requirements for doing it before we dive into this topic if you click the like button and first if you'd like to learn more about me or my company head over to lawrences.com if you'd like to hire a sharp project there's a hires button right at the top if you'd like to help keep this channel sponsor free and thank you to everyone who already has there is a join button here for youtube and a patreon page your support is greatly appreciated if you're looking for deals or discounts on products and services we offer on this channel check out the affiliate links down below they're in the description of all of our videos including a link to our shirt store we have a wide variety of shirts that we sell and new designs come out well randomly so check back frequently and finally our forums forums.laurensystems.com is where you can have a more in-depth discussion about this video and other tech topics you've seen on this channel now back to our content and we'll start with the lab setup that we have here now we have the trunas at 192.1683.13 and the lag that we're going to build that doesn't exist yet is going to be at 192.168.3.213 and then we have a unifi 16xg and unifi 16xg we have an xcpng for part of this demo i'm running some vms and it's connected at 10 gig to this switch each one of these red links represents a 10 gig link now the trunas has three of them right now one is the one currently in use and the next two are the ones we're going to bond together using lacp now let's consult the manual right here and talk about a couple of scenarios here aggregation works best on switches supporting lacp now i happen to have unify set up and i have some 10k unified switches so that's what i'm doing this on for all 10 gig this will work with lacp and one gig as well but it is important that whatever switch you're using and many managed switches to support this lacp is an important factor in that so if you have an unmanaged random switch this is probably not the demo for you um managed switches that have lacp support you can you know look at the instructions or details on that particular switch make sure that they have it that is essentially a prerequisite for the way we're going to set this up here a couple other notes with the way this is set up it is not going to solve your mpio problem multipath io and iscsi or nfs this is for link aggregation to get the aggregate bandwidth of bonding two 10 gig ports together but not going to increase your iscsi connection from 10 gigs and bonding together doesn't give you 20 gigs on iscsi or nfs if you're using it for a virtual machine share this is just a note that it's just not going to work that way and they have some you know different talks about this and they have some more in-depth that goes on a scope of here of how to set up a multi-path io and they have some links on there for example on esxi i maybe do other talks on that later but for now that is not going to be in scope we're just talking about link aggregation and of course why we're doing it and the big why is because if my computer wants to talk at 10 gigs to do a file share and another computer would like to talk at 10 gigs to the file share under normal circumstances of having a single 10 gig link they're going to get saturated and i drew it up this way because my computer has a 10 gig link to this and that has a 10 gig link to this but they're all singular that means this has a single 10 gig link so as long as i am on this switch and another device on this switch and they both come at the true nas well it's going to go less than 10 gigs and let me give you a quick demo before we go further so right here is 5201 and 5202. this is an actual you know kvm essentially how we log into the trunance mini i've talked about this it has a ip over html5 iv ikvm and what i'm doing is you know showing you what's on the screen right here then we're going to bring over i have to two different machines one is my computer and one is the debian 10 lab where does this lab live it's right over in here it's one of the vms running on this xd png system so we're going to go here and this one's going to connect to port 5202 oh i got to change it to 139 because the other one doesn't exist yet 139 enter and we can see i'm getting 10 gigs great so we'll go ahead and stop that real quick because we're going to start these at the same time because if i do this the same time i can get 10 gigs by myself but as soon as i start this one here again got to do them on different ports now they're fighting for bandwidth so let's start this up one more time so we're doing exactly the same time here this one's connecting over port 5202 this one's 5201 my computer's on this side of the network here going through this switch at 10 gigs and going here and this one's here and they both go through the switch and they're both hitting it at the same time so we go here here and now they're just going to struggle for bandwidth between each other so they're duking it out and this is where the problem is the trueness mini has all solid state drives so it actually can provide a lot of data really fast but if you can't pipe it through the network now this is where lacp is really handy when you do these link aggregations we're going to show you how both of these computers at the same time can talk to 10 gigs now what doesn't happen is you don't get 20 gigs you don't get to have one computer if it also has a link variation as well it won't allow 20 gigs because of the way the streams work so it's kind of protocol dependent it and it's one of those misconceptions some people go well i did the iperf test and i have one machine connected with it over here and another one over here and they're not getting 20 gigs now no but the two streams because the way the protocol works each stream can be at 10 gig all right let's move this out of the way and actually show you how to get it set up now so we can get that extra speed like i said leave links all the instructions and everything they have here now depending on how you want to do this the command line is well how we'll do it second but first we'll show you how to do it without going to the command line and the reason i say go to the command line is what if you like the ip address you have and you want to drop it well if i delete this ip address and reconfigure the interfaces the web interface breaks that's one of the advantages of doing it from the you know command line of the system itself but pretty easy to do here we're going to add slink aggregation what's the name now this is important the name has to be in this format you can't just type anything you want there so it has to be lag and then a number so we're going to type flag zero laggy 10 gigs and we can give a description whatever we want we just got to make sure this is called lag zero lag setting what's the protocol lacp that way the switch is in communication with lag interfaces all right we're going to say ix0 ix1 we're choosing these now there is a no someone may ask well what about these can you do all of them at once and bond them together this is not recommended per the documentation that if the cards are using different drivers there may be unusual or strange incompatibilities try at your own risk it probably will have problems i think when i tried it it just broke uh so not ideal so you have a network interface you have pairs of network interfaces these are the ones you want to use pair them together with the same type of driver they're using in this example they're going to be ix0 and ix1 then we're going to assign an ip address and the ip address we said was 192.168.3.213 and then hit apply before we hit apply we're going to go over here though and make sure our network switch is configured pretty straightforward in unify we're going to go click this look down at this port and i've already got aggregation turned on so we look at the profiles and it's pretty simple in the way unify handles it you go from switching to aggregation and you span the ports you want so we did 13 and 14 which are these ports interesting side note inside of unify white is to designate that it is a 10g connection and green is a 1gig connection when these interfaces are not configured and said to be disabled they just show one gig thought that was kind of interesting and as soon as we enable them they're actually going to go and show that they're actually connected at 10 gig so i've already done aggregation and this needs to be turned on on a switch before you apply it or it's going to have some errors because it well it can't negotiate the protocol unless it's turned on so link irrigation lag0 and apply then test changes confirm it's going to now do that actual negotiation and talk to it save changes don't forget that or it will revert i have left that sitting there for a minute and well that'll cause a problem it'll revert back now once this is done description laggy 10 gigs and we're gonna go back over here to edit you can change the description but everything is pretty much you can change ips but now that they're tied together they're tied together we can't actually change the protocol again you'll have to delete the interfaces just a heads up on that so now we have this ip address which is the one we're operating on and now we have this ip address that is the one that is the link aggregation and we can go over here and do our little 10 gig test again but first we'll ping it make sure make sure it works great it works now because i have this over here still running it binds to whatever new interfaces show up so iperf is still running over here and it's just bound to the new extra ip address we added so we can actually do the same test again but just change the ip address to 213 and we'll do them simultaneously here two one three so this one's going to 5201 5202 enter enter 10 gigs 10 gigs so now they're both talking at 10 gigs simultaneously and as we show right here go back over to draw.io the system over here 10 gigs is looking at these two we'll just assume it's the bottom two are bonded together so this is able to figure it out and say i'm going over here and this one comes over and the lacp on the switch goes yep we have plenty of bandwidth for you we're just going to put you on that other cable so now we can just do it one more time and show you that simultaneously both of these are getting the 10 gigs pretty straightforward setup pretty easy to do now back to that other scenario let's go ahead and delete this interface and walk you through doing it from the command line so go back over here and delete the interface test confirm save save changes are made permanent now we're back to where we started all right we're now we're going to configure it from the command line interface so we choose link aggregation option 2. we want to create a link aggregation we want to choose option 2 lacp and now we get to pick the interfaces in there so we're going to pick interface 2 interface 2. and i'm pressing twos it's just letting you choose which one's on there and then q to quick because we're done choosing interfaces and like i said we don't want to mix and match different ones and please note it excluded the one it's already configured which we're actually logged into but we could have redone this and chose that interface like delete the interface and away we go where we do that so configuring the members all right now we want to configure the network interface and we can even go here and press one and now i could go and press one again and delete that cx l0 if i want to delete it but we actually just want to configure the lag interface so we'll choose lag zero now it just names it automatically lag zero you don't have to do anything do you want to delete the interface no remove current settings uh for this interface no because we want to add it configure ipv4 yes interface name default it to lag zero one i text that one it's okay one three dot two one three i'm sorry so one nine 192.168.3.213 that mask we can type 24 or you can type out 255 225250 i don't care about ipv6 someone will be mad about that configure failover settings no give it a second restarting network and you notice behind this screen there it flickered for a second and then came back so we'll move this out of the way and there's the same setup that we had all configured from the command line and like i said i could have chose this one and bonded these two together it would have allowed me to reset it because you would actually first go in and delete that interface which when you go to configure network interface i can say one and delete interface and just say yes and then go through the build process this would be a way you could do it so you could build it and have it function in terms of not having to change ip address could reuse the same ip address which you can't do through web interface because the moment you delete the interface you lose the ability to keep configuring it through the web interface i know it seems obvious but this question does seem to come up a bit so let's go ahead no no no no no don't set anything i think i may have clicked the wrong thing whoops there we go it'll just close it and go back out now once again we can if i we run through the test again i can run iperf again and see it'll work but you can see that these are working both at 3.213 now it's really that simple to get this working it's pretty straightforward if you have especially like one of those intel four port cards that are popular because you have the one gig ones or you have a series of sfp these happen to be rj45 type but it'll work whichever way and back over to our unify system now that the link aggregation is set up if we look over here they've turned white and show the aggregation working on there now like i said the prerequisites are very important though that you have these turned on with the aggregation because if you don't this is what will end up happening we'll just go and turn it off real quick on these let's put it back on switching it's going to take a second and you'll see actually the unifi after provisions and updates this is going to realize there's a problem with it and we're going to try to hang it move over here it's getting confused because it's getting duplicate replies because the system is trying to do it and the switches aren't in lacp mode freenas is tracking lacp the switch isn't so now you get a confusing problem this is also something we've helped people troubleshoot when they're trying to figure this out they usually just have a setting wrong and a switch i just wanted to show this is the result you'll get because you get these it's pinging right now but it it is kind of random i'm gonna guess after this refreshes again go ahead see what it's doing without it proper aggregating it's not going to work properly this is so we did get some duplicate package you get weird results sometimes when you have something not in the mode so do make sure your switch properly supports lacp it's the protocol has been around for a while and it's configured to do that if you want it to work properly matter of fact we can probably go back over here we'll open a shell yeah interface stop distributing possibly flapping you can kind of see where this is kicking out errors because we don't have them configured properly i just want to bring this up because it's a quick troubleshooting run over to d message take a look see what you're getting from the system you're going to get weird results if you don't have the protocols matched so i do recommend checking that and look for these type of errors because maybe you have a misconfigured switch because not every switch implements it the same i do admit unified does it pretty easy because you just check a box and hit apply you know some of the other ones it does require some command line config so you may have missed a step on that but i'll leave links to the documentation from freenas and hopefully get this working thanks and thank you for making it to the end of the video if you like this video please give it a thumbs up if you'd like to see more content from the channel hit the subscribe button and hit the bell icon if you like youtube to notify you when new videos come out if you'd like to hire us head over to lawrences.com fill out our contact page and let us know what we can help you with and what projects you'd like us to work together on if you want to carry on the discussion head over to forums.laurensystems.com where we can carry on the discussion about this video other videos or other tech topics in general even suggestions for new videos they're accepted right there on our forums which are free also if you like to help the channel in other ways head over to our affiliate page we have a lot of great tech offers for you and once again thanks for watching and see you next time you
Info
Channel: Lawrence Systems
Views: 18,409
Rating: undefined out of 5
Keywords: lawrencesystems, FreeNAS LAGG & LACP, lacp, freenas, link aggregation, lagg, nas, networking, freenas (software), network, server, load balance, iscsi, managed switch, freenas mini xl
Id: B7Dpuu_gBmo
Channel Id: undefined
Length: 17min 48sec (1068 seconds)
Published: Thu Sep 24 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.