The guys fom netbox released version 2.8.5 a couple of days ago, so I decided to do a new setup of my netbox installation - which gives me also the chance to document my setup and go through the device configuration, new features like power feeds and power panels, cabling and scripts. The documentation to setup a server and the application at https://netbox.readthedocs.io/en/stable/ is quite good, therefore I am not covering any installation steps or integration of optional features (like Active Directory integration with LDAP) in this blog post.
Part One: Netbox: New installation (2.8.5) and filling up an empty rack
Part Two: Netbox: New installation (2.8.5) and cabling and assigning IP addresses
Part Three: Netbox: New installation (2.8.5) and NAPALM plus LibreNMS API integration
The empty netbox instance
When the installation of netbox is completed, the netbox instance is empty as shown in the screenshot below. Before any real hardware can be added, various things need to be defined first. This includes Sites, Manufacturers, Device Types, and so on.
Because the nextbox installation is empty, I usually start to define the Manufacturers I am using in my network. This includes manufacturers of passive equipment like rack/cabinet, power strips and power distribution units, patch panels, cable management and shelfs. The manufacturers for active equipment like switches, firewall, wireless controller, servers, storage and uninterruptable power supply need to be defined as well.
To separate the Device Roles of my hardware, I'm defining those roles as shown below. I'm using prefixes like NET- or SRV- and so on to ease the alphabetical sorting and various colors to "group" devices together (for example: everything related to network gets a greenish color).
Defining Power Panels and Feeds
My old installation of netbox did not have any definition of Power Panels or Power Feeds so this is a new feature for me. By having a look on it I figured out that Power Panel is something which is called in German "Sicherungskasten", i. e. something like a fuse box. The Power Feed translates into German as "Stromzufuehrung", i. e. the power cables whichs runs from a fuse box to a power outlet in a wall. In a data center, this can be one Power Panel per rack row, and each rack or cabinet in that row has for example two Power Feeds for redundancy.
For my setup I'm defining a typical Power Panel for a household in Germany (AC / 230 Volt / 16 Ampere) as shown below:
From this Power Panel there is a power cable (flush-mounted) running to a power outlet where my Uninterruptable Power Supply is connected. Therefore I am adding one Power Feed and connecting to the Power Panel:
Defining Device Types
The Device Type is acting as a template. If it's defined for a specific device, it can be used many times where this device is installed. Defining a Device Type can get complex because there is a good understanding of the hardware required, including RTFM (i. e. reading data sheets).
Schneider-APC Smart-UPS 1000
I start with a Schneider-APC Smart-UPS 1000 including an AP9630 Management card because this gives me the opportunity to show the difference between a Power Port (Power comes in) and Power Outlet (Power goes out) of a device.
As shown below, the Uninterruptable Power Supply has one Power Port and four Power Outlets. All four Power Outlets are "mapped" to the one Power Port. This mapping is required because this one Power Port has to serve the four Power Outlets, where devices or power strips or power distribution units might be connected. Because I have the AP9630 Management card installed, I add a 100BASE-TX network interface for remote management.
Digitus Power strip with 8x outlets
On my Uninterruptable Power Supply two 19″ Power Strips with eight outlets are connected, therefore this hardware needs to be defined as well. The same "mapping" of the Power Outlets to the Power Port like for the UPS applies:
Cisco WS-C3760G-24TS-S1U switch
The next example of a Device Type definition is a Cisco WS-C3760G-24TS-S1U switch.
Because this switch has one internal power supply, I'm adding one Power port and name it as PS-01 (IEC 60320 C14). This naming comes handy when dealing with devices in different countries (NEMA in the US, British Standard in UK and India, ...). The switch has also one RJ-45 serial console port, which is added as Console Port.
In the next step the physical Interfaces of the switch are added. By using the bulk creation feature the 24 1000BASE-T interfaces of the switch are added in one step.
The same procedure applies for the four SFP interfaces. If the switch has a modular uplink module.
Please note that virtual interfaces can be added here as well, especially if the management VLAN interface is always the same. In my opinion it's better to add virtual interfaces, because those are depending on the switch configuration, to the Device and not to the Device Type.
Building a Rack
Now it's time to add the first Rack and populate it with one Uninterruptable Power Supply, the two 19″ Power Strips and two Cisco switches.
The Rack is assigned to a Site, has a name and dimensions. In my case I have a 2-port frame with 36U (Height Units).
By selcting a height unit on the front and clicking on "Add Device" I'm populating this specific height unit with the switch:
The result after populating some devices looks like shown in the screenshot.
* If a Device Type is marked as Full Depths the same height unit on the rear cannot be populated (red)
* If the Device Type is not marked as Full Depth, the same height unit on the rear can be used by another device (gray)
Power cabling and connections
With Version 2.6.0 Power Panels and Feeds were introduced. I think this is a cool feature because not only the network cabling and connections are important but also the power cabling. The power cabling of my UPS can be easly done from the Power Port of the device.
The connection dialog shows in detail how the Power cable from the UPS PWR-IN is connected to the Power Feed #1 of the Power Panel.
For the devices in my rack I always try to create Power redundancy. To accomplish this I have two 19″ Power strips connected to the UPS. All devices like switches, storage, servers and so on are then distributed between both 19″ Power strips. The scheme shown below illustrates the complete power cabling, from Power Panel to the Core switches.
+-------+ +-------+ +----------------+ +-------------+ | | | | -------------- | Power Strip #1 | ------------- | Switch #1 | | PWR | ------------ | | PWR cable +----------------+ PWR cable +-------------+ | PANEL | PWR FEED | UPS | | | | | +----------------+ +-------------+ | | | | -------------- | Power Strip #2 | ------------- | Switch #2 | +-------+ +-------+ PWR cable +----------------+ PWR cable +-------------+
Bonus: Creating Virtual Chassis (Switch Stack)
Before creating a Virtual Chassis (Cisco: Switch Stack), physical interfaces must be renamed first based on the amount of stack members. You want to have Gi1/0/1, Gi2/0/1, Gi3/0/1 and not three times Gi1/0/1 ;) This can be easily accomplished by using the Renaming feature as shown in the screenshot:
After the Renaming of the interfaces, the two switches can be selected and by clicking on Create Virtual Chassis the Cisco switch-stack is build.
By selecting one of the switches, the details show now a box named Virtual Chassis. In this box, the two stack members are shown with their position, priority and if the switch is the stack-master.