Friday, October 11, 2019

Network patching data model for CMDB

I need to start tracking every physical and logical patch, to enable programmatic config generation. Does anyone know of a good example of a patching data model that already exists, to save reinventing the wheel (I already have too many funny shaped wheels, and none of them are round). The more I think about it, the more complicated I realise it is, when you are trying to track all possibilities. I need to effectively be able to track, log and search every end to end patch in the DC, and report on paths.

Physical Patching

Off the top of my head here are a few examples of physical L1 Patches:

  • Host-Cat6-Switch
  • Switch-Twinax-Switch
  • Host-(LC)OM3(SC)-PatchPanel-OM3infrastructure-PatchPanel-(ST)OM3(LC)-Switch
  • Host-(LC)OM3(SC)-RapidNetPanel-(MTR12)OM3Fanout(LC)-Switch
  • Host-Cat6-FloorPlate-PatchPanel-Cat6-Switch
  • Switch-(LC)MMF(LC)-ThirdPartySP-(LC)MMF(LC)-Switch
  • Switch-(LC)MMF(LC)-CWDM_Frequency_converter-(LC)SMF(LC)-splitter-(LC)SMF(SC)-PatchPanel-PatchPanel-(LC)SMF(SC)-splitter-(LC)SMF(LC)-CWDM_Frequency_converter-(LC)MMF(LC)-Switch

Arguably Host and Switch are the same thing, they are both devices with numbered interfaces (numbering is inconsistent, but unique).

Floor plates and panels could also be the same type.

Switch QSFP ports can break out to 4 SFP connections

Patch Panels may be connected to other panels in an arbitrary number of hops specific paths in the middle may not be known. Panels are not always the same number or ports either end (eg. 2 12 ports panels may connect to a single 24 port)

Patch panels and switch ports can potentially be more than one link. a single MTR cable can have multiple cables in it. It could be a single plug one end and 12 the other

I also need to track the media type (SMF, MMF, OM3, Copper, Twinax, etc.)

Track the Termination Type (RJ45, LC, SC, ST, MTR12, SFP, QSFP, etc.) Plug or socket.

Allow for CWDM/DWDM link aggregation channels on dark fibre. The optical spliter is effectively a patch panel of sorts, it has 8 interfaces which correlate to the splitter ports the other end, not sure if this is always the case.

Logical Patching

On top of the physical connections, I need to track things like:

  • Port Channel aggregations (LACP, MLAG etc.)
  • Trunks and VLANs
  • Tunnels (GRE, IPSEC, SSL)

Some of these can obviously be nested for added annoyance and complexity. VLANs can even be in other vlans using QinQ trunks.

Can anyone else think of any other use cases to add to the list that would be typical in an enterprise network/DC.

My thoughts so far

  • I think a link is comprised of two pieces of hardware at each end with a number of cables in between.
  • Each piece of hardware has one or more interfaces of a defined type
  • Each cable has a media type and a connector type at each end.
  • A Patch Panel has a number of ports and each port can join two cables
  • Multi core cables have a channel suffix and can connect a range of ports.
  • WDM links are treated like multi core cables.
  • Connecting it all together
    • Each host interface has an UID or, the host has a UID and interface index
    • Each Patch Panel has an port UID or, the panel has a UID and port index
    • Each Cable has a UID and an A and Z end Foreign Key for the hosts or Panel UID and/or index
    • Multi core cables are a collection of individual cables, possibly grouped at the connector

Representing the data in the DB is the first hurdle. I also need to find a way to enter it that is easy for everyone, to encourage them to maintain the data. I also need a good way to represent an end to end path in a clear easy to understand way.

I need to implement this in our CMDB, which is primarily Python/Django based, but want to get my head around the data model first. I would greatly appreciate any incites or recommendations from anyone who has already had experience with this type of problem, and any ideas of how to better represent any of the components.



No comments:

Post a Comment