[racktables-users] A Solution: Patch panels and tracing cables

  • From: Jeroen Benda <jeroen@xxxxxxxxxxx>
  • To: racktables-users@xxxxxxxxxxxxx
  • Date: Fri, 14 May 2010 22:05:32 +0200

Hello all,

Some time ago I implemented a solution for patch panels and cables that allows you to not only manage your cables (the way that RackTables does so very well) but also track those cables from one end to the other (over patch panels).

Let me explain the solution and than I will provide you with the code (now only in local files, no more modifying of RackTables code).

The whole idea started because I wanted to be able to trace 2 server ethernet ports to 2 different core switches (at least that is what you hope happens if you follow the cables). To be able to do that you do not only need to know what's in a rack, but also what is connecting those racks; the patch panels and the ODF panels (fiber panels). The idea is simple, a patch panel consists of ports at the front and cables at the back. Basically you can tell that to RackTables easily. All you have to do than is connect those back end cables to the appropriate cables of the other patch panel. And than it suddenly becomes a lot of work....

So to start with that mess, a few simple steps:

- create port types for the cable coming out the back end of the patch panel. I ended up creating 3:
utpLink
fiberLinkSingleMode
fiberLinkMultiMode
Those last 2 might be combined but the network team wanted to see that difference - make all your patch panels not only have front ports, but also cable ports or link ports as I have called them. So basically a 24 port patch panel will have 48 ports in RackTables, 24 of type RJ45 1000 BaseT and 24 of type utpLink. They will have to be named in such a way that you can find the cable to the port so I ended up naming them eth1, eth1link, eth2, eth2link etc. This is of course a lot of work so this is where the first custom code comes into place, a new port generator. Originally created so it can create enough ports (based on the attribute 'number of ports') but now it also looks at hardware type so you can have different ports generated for a Cisco 48 port management switch or a 24 port Gigabit server switch. The code can be found here: http://racktablescode.j-tools.net/ and it's called Port Generator. The code is documented including some examples and on the site you can see how to make sure it works (relatively simple) - so now all your patch panels have front and link ports, now all you need to do is connect them. This is where the second custom code comes into play. It is called Port Linker and it does just that, it links the back end of patch panels based on the destination patch panel. The code is documented including some examples that should help you get started. Again this RackTables extension can be found at http://racktablescode.j-tools.net and it's called Port Linker.

You're done and now of course you want to do something will all this extra information in RackTables. This is where the next extension comes into play. It is called Family. I defined 2 types of relationships for an object, parent or child. Not really revolutionary. A parent of an object is something that child object depends on, so for example, the parent of server can be a PDU (power distribution unit) because it receives it's power from that PDU. That PDU might in it's place have a UPS as a parent, etc. The same can be done for connectivity. A switch can have for example 24 childeren and it's parent might be a core switch. What the extension Family does, is trace the connectivity for each port all the way up to the last parent and this is displayed. And of course this is only possible if you have all your patch panels connected back to back. The extension is ready and works. It does however require some cleaning up and making sure that it is flexible through parameters and of course some documentation. This will take a few more days.

I hope these extension help out and of course if there are any questions, do not hesitate to contact me.

Jeroen@xxxxxxxxxxx
http://racktablescode.j-tools.net/


Other related posts: