Capital City Christian Church

The Network Hardware Inventory Database





Introduction

In order to manage a network, especially of this size and complexity, you must have both documentation and an usable and accurate Inventory. The best choice was to build the inventory in an RDBMS. I selected mysql (then played with mariadb, but seem to stick with mysql). I run and maintaine the RDBMS on my laptop for the time being and dump formatted reports to be included on the internal website. I do plan to setup an RDBMS server to house the production version.

Being in an RDBMS the data will be quickly assisable and managable. As things go, this is a small and rather simple database (just one table) what others would implement in a spreadsheet, but I have bigger plans for the data.

I keep backups of different iteration of the db both on my laptop and the subsiquent backup systems I personally use. On our Internet webserver I also keep raw backups along with viewable reports.


Information


Schema

The schema is, in this case, a description of the different fields and their characteristics.

Below is the Inventory.Inventory table schema as of 6/18/22 6:07 PM


MariaDB [inventory]> describe inventory;
+-------------+---------------+------+-----+---------+----------------+
| Field       | Type          | Null | Key | Default | Extra          |
+-------------+---------------+------+-----+---------+----------------+
| id          | int(11)       | NO   | PRI | NULL    | auto_increment |
| ip          | varchar(16)   | YES  |     | NULL    |                |
| mac         | varchar(18)   | YES  |     | NULL    |                |
| wifiip      | varchar(16)   | YES  |     | NULL    |                |
| wifimac     | varchar(18)   | YES  |     | NULL    |                |
| name        | varchar(256)  | YES  |     | NULL    |                |
| type        | varchar(256)  | YES  |     | NULL    |                |
| function    | varchar(256)  | YES  |     | NULL    |                |
| location    | varchar(256)  | YES  |     | NULL    |                |
| ports       | varchar(4096) | YES  |     | NULL    |                |
| switch      | varchar(64)   | YES  |     | NULL    |                |
| switchport  | varchar(64)   | YES  |     | NULL    |                |
| sn          | varchar(124)  | YES  |     | NULL    |                |
| os          | varchar(256)  | YES  |     | NULL    |                |
| firmware    | varchar(96)   | YES  |     | NULL    |                |
| dante       | varchar(256)  | YES  |     | NULL    |                |
| ssid        | varchar(256)  | YES  |     | NULL    |                |
| channel     | varchar(8)    | YES  |     | NULL    |                |
| disposition | varchar(512)  | YES  |     | NULL    |                |
| notes       | varchar(4096) | YES  |     | NULL    |                |
| lastseen    | date          | YES  |     | NULL    |                |
+-------------+---------------+------+-----+---------+----------------+
21 rows in set (0.002 sec)

In the table above note that;

Column Descriptions

Below is the schema of the Inventory table. Each column's purpose is described.

  • id
    This is the key. It is a unique integer for each record guaranteeing that each record is identifiable and unique.
  • ip
    The IPv4 address of hardwired Ethernet devices
  • mac
    The Media Access Control address of the NIC
  • wifiip
    The IPv4 address of WiFi devices
  • wifimac
    The Media Access Control address of a WiFi NIC
  • name
    The cosmetic name of the host, if any
  • type
    The basic type of device or service
  • function
    What this device does
  • location
    The physical location of the device
  • ports
    A list of the open TCP ports
  • switch
    Set to 'Switch' if the device is a switch
  • switchport
    The switch port that connects to another switch
  • sn
    Serial Number
  • os
    Operating System
  • firmware
    Firmware Version
  • dante
    Set to Dante if the device used or relies on the Dante protocol
  • ssid
    The broadcast name of a WiFi device
  • channel
    The channel the device operates on
  • disposition
    Is the device in production, retired, ...
  • notes
    Free-form notes about the device
  • lastseen
    The date this device was last seen on the network.