NewDanbyte 0.20.0: Known vulnerabilities, device dependencies and DiscoveryRelease notes
Blog/Guide

How to model racks, devices and cabling in DCIM

A walkthrough of modeling sites, racks, rack units, devices, interfaces and end-to-end cabling in DCIM, so that finding a port becomes a lookup.

Danbyte6 min read
DCIMrackscablingdata center

Someone asks "what's plugged into rack B12, position 24, port 7?", and the only way to answer is to walk to the cage with a flashlight. With a good DCIM model the same question is a lookup. This post describes how to build that model.

Start with the hierarchy

A physical model is built from one idea repeated at each level: a larger container holds a smaller one. Danbyte follows the NetBox-inspired structure, so the vocabulary will be familiar if you have used NetBox:

Site  →  Location  →  Rack  →  Device  →  Interface/Port  →  Cable
(a building)  (a room/row)  (a cabinet)  (a box)  (a hole)  (a link)

Model from the top down and populate from the bottom up. Define sites and racks first so there is somewhere to put things, then rack the devices, then cable them. If you go straight to devices without racks, you get an inventory that knows what you own and does not know where it is.

Sites and locations

A site is a physical boundary such as a data center, a colo suite or a branch office. Give it real metadata: the address, the time zone, the region and the provider's facility ID. With that in place, "show me everything in Frankfurt" is a filter, and you do not have to search a spreadsheet for it.

Inside a site, locations model the structure below it: a floor, a room, a row or a cage. You do not need every closet on the first day. A shallow location tree is worth having as soon as you have more than one room, because it scopes rack numbering and lets you hand a room to a team without touching the rest of the site.

Racks and rack units

The rack is where the model becomes specific. Record these for each one:

  • Height in rack units (U). Most racks are 42U or 48U, but half-height racks and open frames should be recorded too.
  • Numbering direction. Units are numbered bottom-to-top or top-to-bottom. Choose one convention per site and keep to it, because mixing them makes "U24" ambiguous.
  • Width and depth. A 4-post 1000mm cabinet should not be modeled the same way as a 2-post relay rack.
  • Face. Front and rear are separate surfaces, and a device occupies space on one or both.

The reason to record U-height exactly is capacity. When the model knows a rack is 42U with 31U in use, you can answer "where does this 2U server go?" without measuring anything. A good DCIM tool draws the rack elevation and refuses to place a device in units that are already occupied, which is an inexpensive way to prevent a physical collision.

Devices and their footprint

A device is anything that goes in a rack: a server, switch, PDU, patch panel or firewall. Give each one a device type (the make and model, the U-height and whether it is full depth) and then place the instance:

  • Position is the starting rack unit. A 2U server at position 24 occupies U24 and U25.
  • Face is whether it is mounted on the front or the rear.
  • Role is its function, for example access switch, spine, hypervisor or storage, so you can query by function as well as by hostname.

You model the device type once, and every instance inherits its port layout and height. Fifty identical top-of-rack switches can be defined from one template.

Interfaces, ports and patch panels

Cabling depends on this part of the model. A device has typed connection points:

  • Interfaces are the network ports (Ethernet, SFP+, QSFP) that carry traffic and hold IP addresses.
  • Console and power ports are the out-of-band and electrical connections.
  • Front and rear ports are how DCIM models patch panels.

A rear port is the permanent, structured-cabling side of a panel. A front port maps to it and is the side you patch. When a patch panel is modeled this way, a cable can pass through it: the trace follows the front port to its rear port and on to the far end of the trunk, and does not stop at the panel. Cross-connects modeled like this can be followed from end to end.

Cabling: model both ends, including power

A cable connects two termination points, and both ends are in the model. A cable is an object in its own right and is not stored as an attribute of a port. It has an A side and a B side, a type (Cat6, OM4, DAC), a length, and optionally a color and a label. Model power the same way, from the PDU outlet to the device's power port. Power connections are often left out, and the gap shows when a feed trips and nobody can list which devices lose power with it.

Because both terminations are objects, the model can follow the whole path, including the patch panels, and give you an end-to-end trace:

srv-web-04  eth0  ──  patch-A  fp12 → rp12  ──  trunk  ──  patch-B  rp12 → fp12  ──  sw-tor-01  Gi1/0/12

What you get from modeling cables

Modeling cables is the least interesting step and the one that gives the most back. You can trace connectivity end to end and follow a link across every patch and trunk without touching a device. Before you pull a cable or power down a PDU, you can list exactly what depends on it. Troubleshooting is also faster, because "which port?" is a query and the on-call engineer can find the answer at 3am without a site visit.

Practical tips

  • Name consistently. A scheme such as site-role-nn (fra1-tor-03) sorts and filters well. Ad-hoc names do not.
  • Label to match the model. The physical label on a cable should be the same as its DCIM ID. When the two differ, people lose trust in both and stop updating either.
  • Keep front and rear consistent. Always terminate structured cabling on rear ports and patch on front ports. Traces are only reliable when this is done the same way everywhere.
  • Automate the population. Danbyte has a REST API, so you can bulk-import racks and cables from an existing sheet, or reconcile against LLDP with a script, and avoid typing it all in by hand.

Danbyte models all of this, from sites, racks and devices to ports, cables and power, as one connected graph, and all of it is in the free, open-source release. You can self-host it on your own hardware. The docs take you through your first rack.

Cable modeling is dull work, and it is worth doing now, because it is what lets you list the affected devices the next time a feed trips.

Run Danbyte on your own server

Danbyte is free and open source, and it does IPAM and DCIM in one application. One command installs it on a new Ubuntu or Debian server.