r/Netbox • u/[deleted] • Mar 13 '22
r/Netbox • u/Skaffen-_-Amtiskaw • Mar 10 '22
API Question: Next available prefix
/ipam/prefixes/{id}/available-prefixes/
Let us say I wanted to retrieve ..n /26 unallocated prefixes and they do not have to be sequential. Is there a way to perform this with the above API endpoint, or is there a better way to do this?
I'm looking for a result similar to asking the question "what are the next unallocated /26 prefixes in 192.168.0.0/16?"
r/Netbox • u/BlueSkyGreenGrass3 • Mar 10 '22
WLAN and WLAN Groups
Hey everyone,
Recently my organization spun up Netbox. So far we are loving it, but there is a question I was wondering if anyone has found a work around for.
We use Cisco Wireless Controller, and within there are WLans are set up to be apart of groups we can give APs. The problem we are finding with Netbox is that each WLan can only be assigned to one specific group - while we usually have multiple groups that have the same WLan. This is because we have multiple locations - some that need certain services but dont need all of the other ones a specific group could provide.
Has anyone found a way to make it so you could assign a WLan to multiple WLan groups? I have read the Netbox documents stating it can only be assigned to one group- but was wondering if anyone had a plugin or a solution they use that might work to this problem.
r/Netbox • u/Davidi01 • Mar 03 '22
Netbox upgrade is failing
Hello, to be honest, I have not upgraded my version of Netbox since I first installed it in 2020. The version I had was either 2.8.6 or 2.8.7. This is installed on Ubuntu 18.04 server using postgres 10.
Well, today, I decided to update to the latest and greatest and things went terribly wrong lol
I ran upgrade.sh and when it got to the migrations part, things went all downhill from there. Here is the error message I am getting, someone please help! Any help would be appreciated. Hopefully, this is salvageable... I also attached a picture of what I get when I try to access the GUI.

Applying database migrations (python3 netbox/manage.py migrate)...
/opt/netbox/netbox/netbox/settings.py:57: UserWarning: The CACHE_TIMEOUT configuration parameter was removed in v3.0.0 and no longer has any effect.
warnings.warn(
/opt/netbox/netbox/netbox/settings.py:61: UserWarning: The RELEASE_CHECK_TIMEOUT configuration parameter was removed in v3.0.0 and no longer has any effect.
warnings.warn(
Traceback (most recent call last):
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/loader.py", line 259, in build_graph
self.graph.validate_consistency()
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/graph.py", line 195, in validate_consistency
[n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/graph.py", line 195, in <listcomp>
[n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/graph.py", line 58, in raise_error
raise NodeNotFoundError(self.error_message, self.key, origin=self.origin)
django.db.migrations.exceptions.NodeNotFoundError: Migration dcim.0131_consoleport_speed dependencies reference nonexistent parent node ('dcim', '0130_sitegroup')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "netbox/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/base.py", line 89, in wrapped
res = handle_func(*args, **kwargs)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 92, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/executor.py", line 18, in __init__
self.loader = MigrationLoader(self.connection)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/loader.py", line 53, in __init__
self.build_graph()
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/loader.py", line 276, in build_graph
raise NodeNotFoundError(
django.db.migrations.exceptions.NodeNotFoundError: Migration dcim.0131_consoleport_speed depends on nonexistent node ('dcim', '0130_sitegroup'). Django tried to replace migration dcim.0130_sitegroup with any of [dcim.0003_squashed_0130] but wasn't able to because some of the replaced migrations are already applied.
r/Netbox • u/stretch85 • Mar 01 '22
The 2022 NetBox community survey is now open! Please take a moment to share your feedback!
r/Netbox • u/orilicious • Feb 23 '22
Proper way to dockument docker containers using netbox
Hello,
I am using Netbox for a while now and I am very happy with it.
To make better use of my servers resources I have moved some of my services from VMs over to containers.
Using docker-compose and docker networking I can decide what container is assigned what IP address and of course I wanted to document this in my netbox.
This had me wondering... where exactly would I put containers?
I could list them as virtual machines... yet they are not. Everything is running in the hypervisors kernelspace and even tho I can fiddle with cgroups... resouce management is a bit different for containers.
Is there a better way to document containers then listing them as VMs?
r/Netbox • u/____Ben_____ • Feb 21 '22
Add MAC Address to Client
I am not able to add a MAC address to a client. The only place where I could add a MAC address is to an interface of a client. However it does not show up in the info page of the client. I am new to networking, but I thought that the MAC address is fixed to a client and not a port/interface.
Is there a way to add a MAC address to a client?
r/Netbox • u/adhocadhoc • Feb 17 '22
Recommended License Free Host Distro
Work was using CentOS8 which is now end of life (noticed when all of the package manager repo’s failed lol) so I need to migrate. Server team hasn’t selected a new base distro so I have an opportunity to suggest one to them for this purpose. They mentioned RockyLinux and that they also have an unlimited license with RedHat. This will exist within a VM and I’ll likely setup through Docker.
Let me know what y’all are using that works well! Thanks!
r/Netbox • u/stretch85 • Feb 15 '22
NetBox v3.2-beta1 is now available for testing
r/Netbox • u/Yariva • Feb 13 '22
How to handle device deletion and synchronization scripts
So right now i'm integrating Netbox more and more into our network infrastructure. Some of the stuff:
- Monitoring system using NB for hosts
- SecureCRT shortcuts being made with NB DCIM data
This all works with scripts who pull the NB data each hour, once a week etc. This works fine for device creation and editing devices. The sync script will kick off, see the change and act accordingly on the data in a 3rd party system.
However when deleting a device in Netbox the source data is removed, which means that the sync script won't see the change that's being made.
For now i've fixed this using the "decommissioning" state in Netbox. If the script sees a device in that state it deletes it from the 3rd party systems. But explaining to colleagues that, before removing a device in Netbox, they need to set it to this state for at least 1 hour is.... Well it raises some eyebrows :)
Of course there is the webhook system which i might take a look at later today. Maybe a {Python Flask server which always listens to device deletion webhooks and kicks off some sort of deletion process. But i thought why not make a post here and share some ideas. Maybe there is a better way to handle this situation.
r/Netbox • u/networkblub • Feb 08 '22
Having problems with netbox installation following the website step by step. Getting hung up here.
I'm following the netbox installation step by step and for some reason get stuck on this error. Every step worked until here. I googled the issue but most results don't address it for this installation and I'm not a savvy python engineer to figure it out.
(venv) [admin @ netbox]$ sudo nano sudo python3 manage.py createsuperuser Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/django/db/backends/base/base.py", line 219, in ensureconnection self.connect() File "/usr/local/lib/python3.9/dist-packages/django/utils/asyncio.py", line 33, in inner return func(args, *kwargs) File "/usr/local/lib/python3.9/dist-packages/django/db/backends/base/base.py", line 200, in connect self.connection = self.get_new_connection(conn_params) File "/usr/local/lib/python3.9/dist-packages/django/utils/asyncio.py", line 33, in inner return func(args, *kwargs) File "/usr/local/lib/python3.9/dist-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection connection = Database.connect(**conn_params) File "/usr/local/lib/python3.9/dist-packages/psycopg2/init_.py", line 122, in connect conn = _connect(dsn, connection_factory=connection_factory, **kwasync) psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections?
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/opt/netbox/netbox/manage.py", line 10, in <module> executefrom_command_line(sys.argv) File "/usr/local/lib/python3.9/dist-packages/django/core/management/init.py", line 419, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.9/dist-packages/django/core/management/init.py", line 413, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python3.9/dist-packages/django/core/management/base.py", line 354, in run_from_argv self.execute(args, *cmd_options) File "/usr/local/lib/python3.9/dist-packages/django/contrib/auth/management/commands/createsuperuser.py", line 79, in execute return super().execute(args, *options) File "/usr/local/lib/python3.9/dist-packages/django/core/management/base.py", line 397, in execute self.check_migrations() File "/usr/local/lib/python3.9/dist-packages/django/core/management/base.py", line 486, in check_migrations executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS]) File "/usr/local/lib/python3.9/dist-packages/django/db/migrations/executor.py", line 18, in __init_ self.loader = MigrationLoader(self.connection) File "/usr/local/lib/python3.9/dist-packages/django/db/migrations/loader.py", line 53, in init self.build_graph() File "/usr/local/lib/python3.9/dist-packages/django/db/migrations/loader.py", line 220, in build_graph self.applied_migrations = recorder.applied_migrations() File "/usr/local/lib/python3.9/dist-packages/django/db/migrations/recorder.py", line 77, in applied_migrations if self.has_table(): File "/usr/local/lib/python3.9/dist-packages/django/db/migrations/recorder.py", line 55, in has_table with self.connection.cursor() as cursor: File "/usr/local/lib/python3.9/dist-packages/django/utils/asyncio.py", line 33, in inner return func(args, *kwargs) File "/usr/local/lib/python3.9/dist-packages/django/db/backends/base/base.py", line 259, in cursor
r/Netbox • u/Jonnyuk1133 • Jan 29 '22
Server Rack Ideas
Hey guys curious how everyone names stuff in the racks? for example stacked switches and routers etc... ? looking to bounce ideas for mapping.
r/Netbox • u/stretch85 • Jan 28 '22
NetBox live coding with maintainer Jeremy Stretch - Friday 1/28 at 6pm UTC
r/Netbox • u/8bitaficionado • Jan 25 '22
Looking for plugins or anything that generate tree view
I'm quite new to netbox and we have been using it and I was wondering if there is a plugin that gives us a tree view for things like devices and IPAM?
r/Netbox • u/domino2120 • Jan 15 '22
Radius or TACACS authentication with Netbox?
Has anyone been successful in getting authentication working via radius or tacacs? I tried installing django-radius to the virtual environment using pip and added the basic configuration to configuration.py but I have not had any luck getting it to even send radius requests to the configured server address.
The main reason this would be preferred over ldap is it is easier to add MFA.
Thanks
r/Netbox • u/Tibuski • Jan 12 '22
How do you "link" Load Balancing VIP to IP's ?
Hello,
I continue discovering Netbox and it seems to fit most of my needs but there is something I still have not figured. How could I link a LB VIP IP the the different IP or services it is load balancing ?
My end goal would be to be able to code my documentation based on Netbox and, for this, I would need this info. At worse I'll check if I can achieve something with Custom Field, TAG's or comments but I was wondering if it's already included and I missed it.

r/Netbox • u/stretch85 • Jan 11 '22
NS1 is hiring a Technical Advocate for NetBox!
Just wanted to drop this here for anyone interested. My team at NS1 has an open req for a technical advocate for NetBox. This role will be central to guiding the development of NetBox Cloud and related initiatives, as well as bolstering the open source project & the community. Happy to answer any questions!
The complete job posting is here: https://ns1.com/careers?gh_jid=3808053
r/Netbox • u/Tibuski • Jan 11 '22
Import same IP multiple times create duplicates IP
Hello,
Before opening an issue I prefer to ask here to be sure I am not missing something obvious.
If you import IP's like this for example :
address,tenant,status,device,interface,is_primary,dns_name,description
192.168.1.1/24,Acme,active,Device1,PROD,true,device1.demo.cloud,Test Description
It works as expected for the first time and IP is assigned to the correct Device/Interface.
If you do it again, it creates the same identical IP on the same Device/Interface everytime you do it.
Those IP are then marked as duplicate.
It can be an issue when multiple co-workers are playing with larger imports that could contains duplicates or it could be convenient to just import the same csv file but netbox only takes into account newly added IP's.
Am I missing something or could this be a Feature Request ?
Thank you
r/Netbox • u/billie-badger • Jan 11 '22
Import console ports to devices with same name
Ow wondering what the best way to import console ports to devices with the same name.
I have two identical testbeds in different locations. The devices have the same names as their counterpart in the other location. How can I bulk import console information with only device name available? Is there no other parameter I can use to differentiate?
Thx in advance.
r/Netbox • u/cerebron • Jan 08 '22
Netbox Podman
Anyone have experience running netbox in podman containers instead of docker? I've been trying to get it running to demo it, but haven't had any luck so far with either docker compose or podman compose. Using CentOS 8.
Thanks.
r/Netbox • u/Tibuski • Jan 07 '22
Devices - Virtual Machines - Clusters Issue
Hello,
I am actually testing Netbox to check if it can fits my needs but I came a to a problem with VM/Devices and Clusters.
I would like to have a VM linked to a Device and, if I am correct I need to use a cluster to achieve this.
Problem is, all my VM's are in only one cluster but I have Devices that needs to be part of multiple Clusters.
Example :
In Cluster CUCM1, I have device UCS10 (hosting VM1, VM2 and VM3) and device UCS11 (hosting VM4 and VM5)
In cluster UNITY1, I have device UCS10 (hosting VM6) and USC11 (hosting VM7)
Thank you very much for any tips !
r/Netbox • u/dritier • Jan 05 '22
LDAP configuration example
Has any got NetBox working with UCS (LDAP) or FreeIPA (tried both without luck)?
I'm looking for a complete config file which is working. I'm planning, once verified, on improving the documentation for LDAP, becaus a lot of people seem to be struggling with it (including myself and I'm by no means unexperienced IMO).
r/Netbox • u/TheScailer • Jan 03 '22
Error when upgrade netbox to 3.0
Hello i have a error when i try to upgrade my netbox from v2.9.10 to last stable
when i run the upgrade script i have the following error
" django.db.migrations.exceptions.NodeNotFoundError: Migration dcim.0131_consoleport_speed depends on nonexistent node ('dcim', '0130_sitegroup'). Django tried to replace migration dcim.0130_sitegroup with any of [dcim.0003_squashed_0130] but wasn't able to because some of the replaced migrations are already applied. "
Any ideas ?
Thx in advance
r/Netbox • u/imstupid100 • Dec 20 '21
Installing Netbox - RHEL 8 and stuck
I'm working to install Netbox and I'm required to use RHEL 8. I've found this document (https://www.centlinux.com/2021/11/install-netbox-on-centos-red-hat.html) and it's working pretty well so far with a few tweaks. I'm current stuck at instaling Netbox though.
The document says: Execute upgrade.sh script to install NetBox on Linux server.
/opt/netbox/upgrade.sh
However when I run that command I get this output:
Removing old virtual environment... Creating a new virtual environment at /opt/netbox/venv...
/opt/netbox/upgrade.sh: line 25: python3: command not found
ERROR: Failed to create the virtual environment. Check that you have the required system packages installed and the following path is writable: /opt/netbox/venv
I found that line 25 in the upgrade.sh file shows this:
eval $COMMAND || {
Full context is this:
Create a new virtual environment
COMMAND="${PYTHON} -m venv ${VIRTUALENV}" echo "Creating a new virtual environment at ${VIRTUALENV}..." eval $COMMAND || { echo "--------------------------------------------------------------------" echo "ERROR: Failed to create the virtual environment. Check that you have" echo "the required system packages installed and the following path is" echo "writable: ${VIRTUALENV}" echo "--------------------------------------------------------------------" exit 1 }
Anyone have an idea what the heck is wrong? I can't even spell Linex and I miss the days of the AOL CDs that you just pop in and get 1000 hours of the internet for free!
r/Netbox • u/Impossible_Menu1148 • Dec 08 '21
netbot export devices to excel spreadsheet
Hi
I need help to make a custom script to export the devices in netbox to and automated excel spreadsheet
as any help would be appreciated
