netbox icon indicating copy to clipboard operation
netbox copied to clipboard

Add support for tracking physical cable plants

Open jeremystretch opened this issue 10 years ago • 100 comments

Currently, NetBox does not support any concept of physical cable plant installations. We can connect one interface to another, but there is no way too associate that connection with information about the physical path taken by the cabling.

Ideally, NetBox should support the construction of physical cable paths to be associated with data (and perhaps console) connections. This would entail the tracking of individual path panels and cables, as well as the ability to support bundles of cabling (e.g. MPO fiber trunks).

The database schema necessary to support this feature will take quite a bit of thought. However, once that schema has been devised and agreed upon, it should be relatively easy to incorporate in NetBox.

jeremystretch avatar Jun 24 '16 20:06 jeremystretch

Nice proposal. Please keep in mind that patch panels could be ordered horizontally or vertically. This would be a great enhancement.

shakalandy avatar Jun 27 '16 14:06 shakalandy

This is where I've always run into roadblocks in designing the schema, especially when looking at some of the cross connect panels we have here. Rack 1, 2U Fiber Shelf in pos41,42 6 Cassettes (Duplex LC) and each cassette goes to a different Rack / Room, etc. So the schema kept getting hairy. couple that with input / output / the ability to connect to either a interface, another patch panel, or say a circuit / provider it snowballs pretty quickly.

doon avatar Jun 28 '16 12:06 doon

With @doon's comment about things snowballing quickly. My thought would be to treat anything that a cable can terminate on as a port. Each socket on a patch panel has two ports, one on the back for structured cabling, and one on the front for patching (and yes, I'd treat a punch down block as a port). A cable can have one or more plugs on each end. Those plugs can go into ports. If you need to connect two cables together it might be able easier to have a coupler that has two (or more) ports on it.

This kind of model should also support octopus cables, with mismatching number of plugs (think MTP on one end and many LC on the other).

Cables could have metadata with them about the maximum speed they support, colour etc.

This model also extends to power infrastructure where PDUs can be treated as patch panels. DC bus bars etc.

puck avatar Jun 28 '16 21:06 puck

For a patch panel i create a device type and i insert 1 interface front and one interface rear for each FO patch in the patch panel.

i connect rear from patch 1 to rear from patch 2 and front to active devices.

the only big problem is the form factor.

it's a trick but if it can help others it's free

mdomore avatar Jun 30 '16 15:06 mdomore

@mdomore Nice trick, I figured I would solve it that way as well, however, I loose the connection between server -> switch in that case since it is just a connection in terminology.

I would like a socket-port, possibly a hub, since that's exactly what it is :) That would mean instead of add a 10G SFP+ interface I add a Hub instead where you can connect several interfaces. Maybe that will also shorten the timespan for designing the models since we don't need to invent that much around it.

isodude avatar Jul 01 '16 10:07 isodude

I also noted that it's not possible to add new Interfaces, if we could focus on that part, maybe this is just a matter of the SysOp to define them and specify how many connections a interface can have.

Today there's not a XenPak connections i.e., also not 10GE Copper. That would be nice be able to add yourself.

isodude avatar Jul 01 '16 10:07 isodude

Yes and if we can add connector type like LC, SC, SCA, LCA ... this could be really usefull

mdomore avatar Jul 01 '16 10:07 mdomore

Something else that I think goes along with this feature is tracking the usage of a patch panel. It'd be great to see that on the Rack list next to the RU Utilization %. That way if I have a rack with lots of free physical space but no patch panel room I won't accidentally tell someone it's available to use.

brianaddicks avatar Aug 03 '16 21:08 brianaddicks

My current bodge for this is to create a parent device which acts as a copper/fiber panel, and then create child devices that serve as copper/fiber cassettes. Each cassette has ports and there is a crosslink interface under the OOB interfaces that connects the cassette pairs. The cassettes are mirrors of eachother as far as port assignments go; if you wish to determine where a device on port-01 traces to you follow the crosslink port to the cassettes mate and see which device is on port-01. The issue with this idea revolves solely around the binding action of interface types. I specifically ran into issues representing console/serial connections; due to how console interfaces work, I had to have the console ports on the cassette in the rack with the console server be OOB ports, and the console interaces in the rack with the servers act as console server ports in order for the ports to be assignable. Enter the passthrough form-factor. A passthrough form-factor would be defined as: • Having an in and an out interface assignement • Having no interface type; allowing it to bind with any interface and not require pre-requisites such as being a console server port or being an OOB port

swickstrom avatar Aug 08 '16 13:08 swickstrom

We are currently using openDCIM and one of the point to start using in the past was the ability to track cabling (but missing the IPAM feature like netbox has). Basically you have devices with data ports (network, console,...) and power ports (to connect to your PDU). The Patch panels are the only special object which have front and back port in order to be able to represent all the patching path. Then, each connection can have a label and you can represent the full path of a connection by searching by one of the labels of any cable in the path. I think this is really useful when you need to dive into the datacenter. The form factor, cable type (ethernet, fiber, coax,...) or even the color of the cable are very good attributes (optional and configurable) to have into account. I'm not a fan of reinventing the wheel and maybe it could be a good starting point for the cable plan design, as it's working very well for us. Of course there are quite a lot of usage cases and maybe this is too simple to cover all of them.

amatamalas avatar Aug 31 '16 14:08 amatamalas

One way you could accommodate single connections would be to allow edit the device types and devices forms to support "back-to-back connection" in the same way that you have "Power Ports" and "Interfaces" only this type of connection has an A side and a B side.

The A side can be connected to a fibre bundle such as Device: "48 CORE BUNDLE 4728" which in turn can have back to back connections. In this way you'd eventually describe the entire path.

iamdadmin avatar Sep 07 '16 12:09 iamdadmin

I've been toying with this on my own (in ruby/rails as I not so good with Parseltongue :)).

What I've come up with, and it seems to work so far...

ports belong to a PortGroup, which then belongs to a PortGroupOwner, these are basically abstractions to represent anything that can have a "port". So for example.

PortGroupOwner == ASR9K PortGroup (index: 0) GigabitEthernet0/0/0 Ports(0) GigabitEthernet0/0/0/0 Ports(1) GigabitEthernet0/0/0/1

or

PortGroupOwner = RandomDellServer PortGroup (index: 0) Mezzanine Ethernet Card Ports(0) Eth0 Ports(1) Eth1

or even an abstract entity such as a hand off to another carrier,

PortGroupOwner = RandomCarrier PortGroup(index:1) 80SS Handoffs Port(0) TieCircuit XYZ

Then each circuit consists of port connects (cross connects).

this connection has a port_a and a port_b (Which are both FKs into ports) and both are required. the circuit_id is also required unless this connection is marked as permanent.

port_a and port_b have unique constraints on them. So each port can only be used once as port_a and once as a port_b.

Permanent port_connects are used between panels, and are generally created at panel creation time. I have scripts that build perm connections between 2 port_groups with the same number of ports to automate panel creation).

So when assigning to a circuit I just need to create connections between 2 ports.(service tries to create it as a,b, and then b,a, and both violate constraints it fails). if either ports belongs to a perm cross connect, then it updates the circuit_id for the existing port_connection for those ports, else it just creates the new one and assigns the circuit id.

Once we have all the ports mapped out in the circuit you can find the endpoints by taking the set of ports as A ports and the set of ports as B ports and look for which elements are exclusive.

To graph it can just dump it into dot/graphviz as the the series of cross connects.

to build a DLR or the like can just start at one of the ends and follow the port connects til you reach the other end.

So far it seems to solve most of the issues/requirements that I have.

Hope this helps, or feel free to tell me I Am crazy/misguided/etc..

doon avatar Sep 07 '16 15:09 doon

[Suggestion] You can start with adding colums line this in the interface connections menu: A-END -- Z-END Row/Rack DeviceA Interface Media -- Row/Rack DeviceB Interface Media

where media is cable/connector type. e.g.: SM LC, MM LC, QSFP twinax, copper, etc.

This does not map the entire Layer 1 but helps to keep track of cabling type used.

harsh-kotak avatar Sep 20 '16 21:09 harsh-kotak

Something that would be useful is to treat fibre pairs as individual fibres, or bundle them together. Some providers track every strand, rather than pairs. This would also enable use of BiDi optics, etc.

MPO/MTP support would be very useful, also. I currently model MTP connected patch panels in Device42 by pretending that there are many panel-to-panel cables, which isn't right obviously!

Perhaps support for inline circulators and taps, too. A company I work with splices these inline, rather than going through a rack mounted device.

nward avatar Oct 01 '16 09:10 nward

I'm glad to see this is on the roadmap to be implemented as this is the most-needed feature for us to switch from a spreadsheet for tracking all our cable paths. Is there an ETA or milestone for when this will be implemented?

RyanBreaker avatar Jan 31 '17 16:01 RyanBreaker

+1000! Great feature to a great software. It will have a diagram of the connections like Opendcim does?

Thanks

Jluisito avatar Feb 15 '17 08:02 Jluisito

Hi, this feature is the only reason I cannot use this software at the moment !

May I help you to achieve this ?

quentindavid avatar Feb 17 '17 10:02 quentindavid

I've been spending a lot of time prior to finding netbox thinking about cable and pathway design and documentation. There are really three main parts to this, paneling with ports, cabling and "pathways" which would include not just the cabling but the duct and construction types being aerial, buried, riser, etc, as well as geo information that would be used to create a geo based map from the lat/lon attributes of each part of the pathway. Cable is more of a logical construct in this methodology (including a relationship with the pathway its a part of), but the most important part is the pathway concept that basically lays the groundwork for what your trying to achieve, similar to a circuit.

@jeremystretch can you provide anymore color to what your thinking here with panels, cables, etc? I'd be interested in helping depending on the need for this.

th3goose avatar Feb 23 '17 18:02 th3goose

I don't think we'll extend beyond representing physical cables and patch panels in NetBox. This by itself is already fairly complex, especially when you consider that cable types can change between the front and back of a panel. Attempting to map the actual physical path is more of facilities management thing, and well outside the scope of NetBox.

jeremystretch avatar Feb 23 '17 18:02 jeremystretch

@jeremystretch I think thats fine, how would you suggest a custom module be created to interface with netbox all the while limiting the forking of code and continually having to merge branches? Since netbox is its own branch I'm having a hard time wanting to fork it to create a custom module and losing future fixes from the main branch.

th3goose avatar Feb 23 '17 19:02 th3goose