NetBox - Open Source Network Design and Mapping Software from homelab to network engineers.

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] it's your open source advocate and i'm back with another video and i just want to say thank you so much to everyone who's been so patient while i've been away it's been a hard couple of weeks but i'm back and i'm ready to do this i was very fortunate my father supported me in everything that i ever tried to do including youtube and uh for that i'm going to continue doing this and making sure that you guys all have that support for me to know about really terrific open source software and i'm super excited i've been contacted by a couple of open source projects who have asked me to do videos specifically about their projects and i've got those coming up here later in july so i'm really really excited about that as well so i hope you look forward to those things today's topic is netbox now i've been asked to do this one by several viewers over the years and i've just kind of put it off because i was trying to really wrap my head around what it's used for and how useful it is and as i've grown my network i'm starting to understand why netbox is so useful so before we get into it i want to tell you what it is that box is a network management system or well let's call it a network design system it is not for network monitoring it is not for dns it is not for for radius it is not for any of those things it's really for a network engineer or a developer to say i have a complicated network and i want to lay that out and i want to understand and i want to assign and i want to be sure exactly where everything is in my network and what's assigned so it's got ip management it's got so many different things just built into it so this is the documentation we're going to talk about the documentation a little bit we'll look over at their github for docker compose because you can run this in docker which i love you do not have to there are other ways to run it and they tell you how to run it and what you need so right here it says you're going to need postgres sql you need redis you're going to need several other things in order to run this an http server you know if you want to use ldap it has ldap authentication but it's not required um it uses some g unicorns uh to run some things as well so i think there's some go going on in the background there um and then the next but the net box components themselves so you can go and run this just straight up on a server um i'll leave that to somebody like scott over at scottabyte who likes to run things more in like lxc containers to jump on that if he wants to i think it's really cool and i think as an ex network engineer and i t administrator he would he would kind of love some software like this himself so definitely a really cool system a really great system that i'm going to show you guys now if you're just doing a home network and you only have 20 or 30 devices netbox is going to be extreme overkill for your needs most likely but as we start to move forward into the future we're seeing that everything we buy these days has some kind of connectivity to the internet you have iot devices that everything connects to the internet somehow right you have light bulbs and switches and refrigerators and toasters and washers and dishwashers and just everything you have connects to the internet and that stuff is all going through your home network these days so you really need better routers than we used to have so that's where things like pf sense and open sense and open wrt and ddwrt come into play because they can actually handle that kind of traffic and they have some really great features like vlans so using vlans and really understanding how those work is going to become important as we move forward in time so i'll be covering vlans as well if you're interested now scott has several videos where he's covered vlans and it's just terrific information just absolutely incredible information i want to say thank you to all of my subscribers and all of my patrons over at patreon seriously you guys make this so worth it for me to do these videos every week i really truly enjoy it and i just can't say thank you enough if you're enjoying these videos subscribe let youtube know that i'm doing a good job by subscribing to the channel plus you'll get notified when i have new videos coming out and finally if you're enjoying what i'm doing give it a like just click on that thumbs up and that way youtube knows that you like it and they'll pass it along to other people that might enjoy my content as well i really appreciate it thank you again let's get started so when we start looking at something like netbox i want you to kind of understand what it's really for and what it lets you do so especially if you're a network engineer but even at home now you can start kind of using something like netbox to break down your network and understand what your devices are and where they are and which networks they're connecting to what i p addresses they're getting and you know dhcp is great if you don't need to know the ip address of things or you don't need those things to be static ip addresses that's great but when you're a network engineer when you're somebody who has a home lab or a home lab set up or maybe multiple machines that you're using for pi holes or pi zeros or maybe you're using raspberry pi fours to run several of your different docker containers you want those things to have a fixed ip address so that it doesn't change on you suddenly and nothing will connect and especially that seems to only happen when you leave home and then suddenly you can't connect anything that you wanted to connect to back at home so having those things set statically is important and being able to track that information is great i've been using spreadsheets it's not the best way to do that i mean if it's a small setup like i said 10 20 devices that's probably fine but as you get into more complexity where you have vlans and things you're going to want something like netbox so if you look at this you get a lot of information here kind of on the dashboard and this is just their demo site so i'm going to show you their demo site first if you want to go to their demo site it's the address is right here i'll have a link in the description and in the show notes and then you just log in with the username admin and the password admin now it runs a little slow they may have this running on a limited system or they may just have a lot of people hitting it right now kind of trying to test it out but it's really cool and digitalocean are the guys who came up with this so digitalocean is one of my um i have they're not a sponsor but i i have a link that will get you free use of digitalocean for a couple of months or fifty dollars of credit or a hundred dollars a credit and when you sign up and stick with it then i get a credit which you know it benefits both of us because then i can run servers that i'm using to do these videos and show you guys things so it's really kind of a benefit for everybody i like digitalocean i like what they have to offer that's why i've used them and that's why i have them as a link that gives credits uh there in the in the show notes in the description so if you want to get to that definitely check the description for the links to that but digitalocean came up with this because they realized we need a way to map out our network because they have it obviously a very complex network and they have a network that's always changing and always getting more complex and they want to know if i call in and i say well here's my ip address that they can go look that up very quickly and find where exactly is my server my virtual server my vps and they can if they need to go do physical access they can or if they you know it just helps them figure out where things are and where problems might be at by mapping out their network really well so if you look here you've got organizations so you have options for sites regions site groups and locations so if we just check out locations here let's let's go see what that looks like now it takes just a second like i said it's running a little bit slow on their system we'll install this ourself but i'm not going to have all the test data that they've got they've got tons of test data here so if we look at locations they have row one row two row three row four i'm sure this is talking about server rack rows inside of their facilities so really cool if we go back up to site where that looks more like a top level thing and we click on it again it's loading so we'll give it just a second to load up but we can see like what's what's going on with their hierarchy and with their organization so we're going to click on this we're going to let sites load up and look at this i mean look at all the sites that they've got so they've got dm in birmingham let's just click on that i'm sure that that may be birmingham over in the uk that maybe birmingham in alabama and the united states i don't know um yeah united states so north america united states so they can get some really great information on where their stuff is at now again in a home network you may not need all of this your one site might be home but let's say that you're the guy who actually learns how to do a lot of this stuff and now your family says man i wish i had better organization on my network or you know i've got so much stuff on my network i don't know what's going on or your parents call and say we don't know why our wi-fi is not working well you can start setting up those sites and you can start mapping out what they've got and guess what as you map this out while it is not there for setting up your network and saying here go make this my network what you can do is export this out to other tools to use the information to set up the network that the way that you want so you can say you know what i'm going to map out your network i'm going to look at it then i'm going to try to fix it i'm going to kind of change things around and then you can export that out and say i'm going to set you up with sense or pf sense or some other tool and we're going to use that to get your network set up in a really great way so there's a lot of power behind something like netbox even for a home user and this is open source software this is apache 2 license so that's really awesome that these guys are making this available you can run it again in docker and docker compose so that's what we're going to do we're going to get it set up running in docker and docker compose now again it won't have all this test data so i say if you want to check it out just go see what they've got definitely go and look at what they have out here online because you're going to want to see that and again this is pulling out of databases it could be on a really small vps that they're running just to let people see what it's like so they're not using up resources they could be selling to people it could be that a lot of people are hitting this at once you know the speed the speed thing isn't overly important but if you look here you can kind of click on these different tabs to kind of see different information but if we go down now we have this option that says racks so if we click on racks it's going to open up and kind of load up the racks that we have so you have these all these breakdowns of how things are and it's kind of this hierarchy and i believe some of this is set but some of this you can kind of generate yourself to have a better hierarchy so they've got these racks so they have this thing called the comms closet and you can kind of see what the racks look like so this is their communications closet if we scroll down they've got rooms they've got rooms listed for where different things are at which is great so if you're a network engineer at a college or university or at a business or anything like that where you've got things spread all over the place again you start to get this nice layout of where things are and what's going on now if you look at this search up here so let's just say room 305 so i jump in here and i'm like okay well i want r 305. let's hit enter let's just see what we get so this is going to search all objects now if you just want to search on this page they have a search right here that would just filter this table but we're going to search on all objects and kind of see how it goes there it is room 305 so i didn't even have to go and look through all that stuff to actually find this i was able to just go here i can click on it i can get some more details now because it's going to dig in so it's got layers upon layers upon layers of information there's some really great stuff in here that just it's going to make it really really good for you and if you look here they've got the server rack and they've got the front and they've got the back and you can go through here and kind of check things out so look here they've got add a device add a device what's connected here on this rack what's going on in this room 305 rack that i need to know about so you can say add a device let's just click on it let's just see what happens you can see all of the information you can load up and put into these things so it's going to take some configuration some setup but again if you're a network engineer or a developer who needs this this is an amazing tool look at the build out on this thing so we talked about ip administration so initially we're looking at organization this is just getting things organized and setting up locations and things but if you continue down the list you'll see you have devices so you can set specific devices up you have connections where you can go set up connections you have your wireless so you can set up information about your wireless systems you have your ip address management so super important we've got virtualization so if you have virtual machines or you're virtualizing things you have virtualized networks you can see this as well so your vlans and things like that can be really really well scoped here power management so if you have a pcs and things like that you've got this kind of set up here and then they have others so they even have other things that they don't really have a category for yet so as this builds out i mean just think about how much this has got already in it and how much more it could get over time i think this is just super great now i cannot possibly go through everything in this system with you there's there's no way you guys definitely want to see how to set this up and install it yourselves i have no doubt about that if you've been watching this long you're interested in getting this ready so that's what i want to talk about next so we're going to go over here to github they have some really great documentation so i'm going to just go back here over to the code section and again i'll have this linked in the in the show notes in the description they've got some pretty straightforward instructions down here for you to follow so you're going to clone this thing step one move into the folder once you've cloned it step two now they want you to run this command i'm not sure what this does other than it's got an override.yaml file that we'll look at whenever we get it cloned down first and then they've got this kind of override of here's what we want so we want to basically throw the override text into this file so we're going to say hey put what's here into this file uh we can just look at the file and we don't have to do that step i don't think next we're going to do docker compose pool because it's going to pull everything down that we need and then we'll do docker compose now they say up that's going to let you see all the logging as it goes we'll just do up dash d and then we'll do a couple of ampersands and then we'll do docker post log dash f so that it'll show us all the logs but when we click when we control c out of that it won't kill the application it'll be running as a damon in the background so we'll do it a little bit different than what they have here but pretty good instructions and pretty easy for us to kind of look at so they have container image tag information so you'll kind of want to understand that as well you'll see documentation i mean just so much great stuff getting help looking at dependencies updating and then this tells you hey this is supported by the community so please consider supporting the community members so you kind of go look out and see who's working on this see what they have make sure to give them a kudos make sure to give this thing a star if you like it make sure to get out there and give them you know any kind of monetary support that you can if that's what you want to do if you want to help by contributing and making sure that this thing continues to work well do that as well again issues list so you kind of see what they have right now for issues and see where those things fall you can look at pool requests that people have done so you can see like what have people done to try to improve this so far seeing look i mean it's just so much great stuff on github whenever you look at it so we're going to go back to the code page here for now and we'll kind of start with the simple stuff which is pull down the code and make a few changes inside of some of those code blocks so let's do that first all right so right here i've got my terminal that i've got set up and i'm logged into my testing server that i've created so i'm just going to go and cd into my docker folder so the way that i like to run is i have this docker folder right here that keeps everything set up for me and i keep all of my docker stuff in there because it's easy to back up that single folder and compress it for my backups so i'm just do cd docker and if i do ls you can see i've got a couple of things here that i'm messing with so we'll kind of look at these later don't worry about it right now but i'll clear that and we're just going to go grab that command that they said you know what you need to clone this thing so we're just going to grab this clone command right here and we're going to go back to our terminal and we're just going to paste that in and we're going to hit enter so that's going to pull that down now we can cd into net box docker and we can just do an ls and kind of see what's here so right off the bat we see there's dockercompose.yaml a dockercomposeoverride.yaml.example and a dockercompose.test.com so this little thing where they say hey next thing you want to do is run this thing is to create this file that has these contents so they want us to create a file that's called dockercompose dot override dot yml and they want it to have these contents so what we can do is just look at what they already have actually in their example file so we'll just do nano docker compose dot override and it's going to give us that example so if we look it already has what they said to put in there so we don't actually need to go and do that other step unless you just want to if you feel like it's faster that's fine but what we can do is just ctrl c out now we want to make sure that we have 8000 open on our machine if you don't you can change that port you can change this left side right here the left side of the colon you can always change the right side you do not want to mess with but the left side you can change so we're just going to control x out of that and we're going to clear that and we're going to say cp docker compose dot override and that's that example and we're going to change that to docker composed and we're just going to take out the example part like that so now we have a dockercompose.override.yml file that's exactly what they said they want the next step says do doc compose pool and then docker compose up so we'll kind of do it their way but you could just do docker compose up and it's going to pull down the stuff that you need but we'll do it their way it's fine so we're going to do docker compose cool this is going to go out and pull down all of the different repositories that it needs all right it took about 30 seconds it didn't take very long now the next thing i want to do is docker compose up dash d but before we do that i want to do an ls again and i want to point out a file here or a folder actually so this folder called env this is an important folder so we're going to cd env and we're going to look at this so we have these things that are netbox.env postgres.env rediscash.env and redis.env so it's important that you understand that these are the environment variable files that are going to use by the docker compose file so we're going to say nano net box.env this is the most important one in my opinion now it's got a lot of stuff in here and a lot of these things you don't need to change but you might want to so like for instance this email from where it says netbox at bar.com you might want this to be yourself because if you're setting this up for an organization or for your home you might want to be able to get emails for yourself so you want to set up your email i'll set mine up just like that an email password so you put in the email password for the email account you just put you want to put in the correct email port so if yours is not if you have tls you probably have 587 you might have 465 if it's ssl only the email server on my case is not localhost so i would put in my email server and then your your email ssl cert file if you have ssl you would put that here i don't email timeout 5 that's fine and then email username again is not netbox in my case it's my full email address so you need to know how to set up your email smtp settings but that's what they're looking for right here so you might want to go through and set these and make sure everything's correct don't forget to put your password there okay and it says email use ssl and email use tls are mutually exclusive which means you can only use one or the other you can't set both of them to true so in my case it's tls so i'm going to set this to true and then graph q a q l enable or q ml enabled that's up to you guys um if you want to leave that enabled or not i would say just leave it alone if you don't know what that is and then we're just going to kind of scroll down here now they have some default things here so they have this redis cache password this password if you change it here you need to go to that redis cache dot env file and change it there to be exactly the same they need to match if they don't match it's not going to work again with the redis password this is already set you'll want to change this or you may want to change this let me put it that way but if you do you need to go to the redis dot env file and make sure you change the password there so again that they match so you have this super user api token this is just a generic thing that they've set you will probably want to change this you don't want to have your api token be this because then anybody could access your system using the domain and the api token that's here that's default so you want to change this for sure make sure this is long strong do not leave it like this your user super user email again you'll probably want to change this to your actual email so we'll just go here and we'll say right here super user username is up to you if you want to leave that as admin but i highly recommend changing the password to something else you probably don't want to leave this as admin make it something long and strong don't use what i just put on the screen because that's still a weak password but it's different from what it was at least and then web hooks enabled true you can leave that alone that's fine once you're done you can do control o and enter to save and then ctrl x to exit now let's just look and see if i'm wrong about these other files nano redis dot env yeah so there's that password remember i said you have to make sure they match you want to come in here and change this to match what you changed it to in the in the net box env file and then the same way with the redis cache password make sure that you change that and if you change the postgres information you want to change that stuff too so you may have a few things you need to modify here in these env files before you move forward it's very important for you to understand that this is something that can really cost you a lot if someone gets into your system because you did not change these defaults so now that we've got those things changed and set we can cd back to our other folder here and now we can do the command docker hyphen compose up dash d and then we're gonna do ampersand ampersand docker hyphen compose logs dash f and what this will give us instead of having to do docker compose up without the dash d to see all the logging that happens when it's creating the the actual system and starting up so we can look for errors is this creates it as a daemon in the background and keeps it running but this will show us the logs so that we can see that if there's any errors we can hit control c to get all the logs and we can do docker compose down to shut down everything and make any changes we need to and then try again so we're just going to hit enter we're going to let this thing kind of go and try to start up it's going to try to start up all these different containers and it's going to start scrolling a bunch of stuff and it'll take a few minutes potentially the first time you run it for sure to kind of get everything set up the way it needs to be all right right here we see this this line that says netbox application started and it says unit configuration loaded successfully great so a lot of these things don't mean a lot to me but if i see that that gives me some hope that maybe this is running so what i'm going to do i'm going to go back to my browser i'm going to open up a new tab here and i'm going to go to the ip address of my server that i set this up on and i'm gonna go to port 8000 let's just see if we get anything to load yeah that loaded up pretty fast now i'm not logged in this shows me kind of the dashboard but you see all these locks all these padlocks that's because i'm not logged in yet so i'm going to go ahead and click on the login button here that should take me to the login screen so i'm going to type in admin and i'm going to type in that horrible password that i put in it while ago and never there we go now you can see it's all zeros this is why i did not want to do the installation first because there's nothing in here so really this is a blank slate for you to start with and understanding how all of this functions together is just it's a series of videos and it's not something that i can cover but the good news is they have a youtube channel with a whole series of videos on how to use netbox and what you can do with it and things that you can get out of it and how it functions and it's really really a terrific series i highly recommend you go and watch it so i will have that linked in the show notes and in the description again i just wanted to show you that you can install this and run this in your home lab you can install this and run this in your place of business you can install this and run this at your university you can use this to your benefit you can really build out that network and your understanding of how your network functions and there's just so much to it that i can't go into all of it in this video but i definitely recommend you go check out their videos that you go check out their documentation and that you see what you can do with it and let me know what you're doing with it i want to know what you're doing with it but as a home lab user i don't want you to feel like this is overkill for you i want you to understand that this could be something that could really help you in getting started now if you're just beginning might be the right time to do it it may seem like it's kind of sparse at first but as you grow into your home labbing as you learn more about networking as your network grows as your devices device numbers grow as your internet of things grows a tool like this is going to become completely useful for you i guarantee you that this will be a tool that you will use and depend on and it will make your life much much easier if you get it set up and get started even if you have a complex network already there's no reason not to jump in and start using something like netbox i really like it i think it's great again digitalocean are the ones who came up with it and who created it and who are making it so the way you support them is by going out and getting a digitalocean account and setting up a vps and paying them five bucks a month or 10 bucks a month or whatever you need to use now again in the description i have a link that will give you a 50 credit i believe for a couple of months to test out the vps stuff their stuff is awesome i really love it i've i use it for a lot of things you guys have seen it on my other videos when i use it i think it's terrific so that's why i like to have them in there i hope you guys enjoyed this video if you did like subscribe tell your friends about it so then come along the journey with us and i'll talk to you next time [Music] you
Info
Channel: Awesome Open Source
Views: 116,030
Rating: undefined out of 5
Keywords: open, source, opensource, open-source, self, hosted, selfhosted, self-hosted, free, libre, software, server, web, internet, browser, linux, mac, macos, os x, windows, microsoft, unix, bsd, ios, android, pi, raspberry, desktop, digital, ocean, digitalocean, vps, tutorial, how to, setup, installation, instructions, cli, command line, terminal, interface, open source software, open source news, open source projects, netbox, mapping, design, engineer, network, networking, architecture, layout, organization, automation, ipam, ldap, plugin
Id: sHvMyRHA7sY
Channel Id: undefined
Length: 26min 6sec (1566 seconds)
Published: Tue Jul 05 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.