> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tangoanalytics.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Network devices

This article explains the steps required to add new SNMP-based network devices to Locatee Admin.

> 📘 Have you enabled SNMP access?
>
> Measuring network infrastructure via the SNMP protocol requires the [deployment of an on-premise gateway](https://docs.locatee.ch/docs/on-premise-gateway) and configuration of Locatee-specific credentials on the hardware.
>
> Consult the following articles for [Cisco](https://docs.locatee.ch/docs/cisco-snmp-configuration) or [Aruba](https://docs.locatee.ch/docs/aruba-snmp-configuration) for more details.

## Add a new network device

1. Go to **Admin → Data Sources → Network Devices**
2. Click the **New** button and fill in the fields. Required ones are marked with **\***:

| Field | Description |
| :- | :- |
| Type\* | Type of network device. Supported types: Cisco Switch, Generic Switch, Cisco WLC, Aruba Controller |
| Model | Model of the device, e.g. *Catalyst C9200* |
| IP address\* | IP address of the device |
| Port | Port at which the SNMP protocol is available (can be left blank to apply the default value of 161) |
| Query enabled | Enabling or disabling the polling of this device |
| Search enabled | Enabling or disabling the search of this device during desk mapping |
| VLAN inclusions | List of VLAN IDs (comma separated) assigned to user devices |
| SNMP version | Version of SNMP protocol used for polling. Each version has specific fields, see table below. |
| Gateway | On-premise gateway server polling the device |
| Building, Floor | Building and floor where the device is located |

### SNMP v2 fields

| Field | Description |
| :- | :- |
| SNMP community | Locatee-specific community string configured on the device |

### SNMP v3 fields

<thead>
  <tr>
    <th>
      Field
    </th>

    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      SNMP username
    </td>

    <td>
      Username/security name
    </td>
  </tr>

  <tr>
    <td>
      SNMP context name prefix
    </td>

    <td>
      Cisco specific, used for creating context names for every VLAN found on the default VLAN. Usually set to `vlan-`
    </td>
  </tr>

  <tr>
    <td>
      SNMP security level
    </td>

    <td>
      noAuthNoPriv: no security\
      authNoPriv: authentication necessary\
      authPriv: authentication and privacy necessary
    </td>
  </tr>

  <tr>
    <td>
      Authentication protocol
    </td>

    <td>
      Algorithm used for authentication purposes (MD5 or SHA). Necessary for authNoPriv and authPriv security level.
    </td>
  </tr>

  <tr>
    <td>
      Authentication passphrase
    </td>

    <td>
      Authentication password. Necessary for authNoPriv and authPriv security level.
    </td>
  </tr>

  <tr>
    <td>
      Privacy protocol
    </td>

    <td>
      Algorithm used for privacy purposes (DES or AES). Necessary for authPriv security level.
    </td>
  </tr>

  <tr>
    <td>
      Privacy passphrase
    </td>

    <td>
      Privacy password. Necessary for authPriv security level.
    </td>
  </tr>
</tbody>

3. Click **Create** to save changes.

***

## Import devices via CSV

Locatee supports the import of network devices in bulk via a prepared CSV file.

### File preparation

Prepare the CSV file according to the following template:

<thead>
  <tr>
    <th>
      Column name
    </th>

    <th>
      Format
    </th>

    <th>
      Comments
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Type
    </td>

    <td>
      String
    </td>

    <td>
      Cannot be empty, currently only `CISCO`, `WIFI_CISCO_WLC` and `GENERIC` are supported
    </td>
  </tr>

  <tr>
    <td>
      Name
    </td>

    <td>
      String
    </td>

    <td>
      Cannot be empty, must be unique
    </td>
  </tr>

  <tr>
    <td>
      Address
    </td>

    <td>
      String
    </td>

    <td>
      Cannot be empty, formatted as `XXX.XXX.XXX.XXX`
    </td>
  </tr>

  <tr>
    <td>
      Port
    </td>

    <td>
      Integer
    </td>

    <td>
      Leave `161` as default
    </td>
  </tr>

  <tr>
    <td>
      Query Enabled
    </td>

    <td>
      Boolean
    </td>

    <td>
      `1` is considered as `true`, other values as `false`
    </td>
  </tr>

  <tr>
    <td>
      Search Enabled
    </td>

    <td>
      Boolean
    </td>

    <td>
      `1` is considered as `true`, other values as `false`. Only required for `CISCO` and `GENERIC` device types.
    </td>
  </tr>

  <tr>
    <td>
      VLAN Inclusions
    </td>

    <td>
      String
    </td>

    <td>
      Comma-separated list of integers. Integers are in the range `1` to `4096`. Only required for `CISCO` device types.

      Example: `1,5,100,990`
    </td>
  </tr>

  <tr>
    <td>
      Port Exclusions
    </td>

    <td>
      String
    </td>

    <td>
      Comma-separated list of port labels. Only required for `CISCO` and `GENERIC` device types.

      Example: `Po1,Gi1/0/2,Gi3/0/1`
    </td>
  </tr>

  <tr>
    <td>
      SNMP Version
    </td>

    <td>
      String
    </td>

    <td>
      Allowed values: `v2c` or `v3`
    </td>
  </tr>

  <tr>
    <td>
      SNMP Community
    </td>

    <td>
      String
    </td>

    <td>
      Can be empty.
    </td>
  </tr>

  <tr>
    <td>
      SNMP Security Level
    </td>

    <td>
      String
    </td>

    <td>
      Allowed inputs: `noAuthNoPriv`, `authNoPriv`, `authPriv`. Needed only if SNMP Version is set to `v3`.
    </td>
  </tr>

  <tr>
    <td>
      SNMP Username
    </td>

    <td>
      String
    </td>

    <td>
      Needed only if SNMP Version is set to `v3`.
    </td>
  </tr>

  <tr>
    <td>
      SNMP Context Name Prefix
    </td>

    <td>
      String
    </td>

    <td>
      Needed only if SNMP Version is set to `v3`. Only relevant for `CISCO` device types.
    </td>
  </tr>

  <tr>
    <td>
      SNMP Context Name
    </td>

    <td>
      String
    </td>

    <td>
      Needed only if SNMP Version is set to `v3`.
    </td>
  </tr>

  <tr>
    <td>
      SNMP Authentication Protocol
    </td>

    <td>
      String
    </td>

    <td>
      Allowed inputs: `MD5` or `SHA`. Needed only if SNMP Version is set to `v3` and Security Level is set to `authPriv` or `authNoPriv`
    </td>
  </tr>

  <tr>
    <td>
      SNMP Authentication Passphrase
    </td>

    <td>
      String
    </td>

    <td>
      Needed only if SNMP Version is set to `v3` and Security Level is set to `authPriv` or `authNoPriv`
    </td>
  </tr>

  <tr>
    <td>
      SNMP Privacy Protocol
    </td>

    <td>
      String
    </td>

    <td>
      Allowed inputs: `DES` or `AES128`. Needed only if SNMP Version is set to `v3` and Security Level is set to `authPriv` .
    </td>
  </tr>

  <tr>
    <td>
      SNMP Privacy Passphrase
    </td>

    <td>
      String
    </td>

    <td>
      Needed only if SNMP Version is set to `v3` and Security Level is set to `authPriv` .
    </td>
  </tr>
</tbody>

#### Example

```Text csv theme={null}
Type,Name,Address,Port,Query Enabled,Search Enabled,VLAN Inclusions,Port Exclusions,Gateway,SNMP Version,SNMP Community,SNMP Security Level,SNMP Username,SNMP Context Name Prefix,SNMP Context Name,SNMP Authentication Protocol,SNMP Authentication Passphrase,SNMP Privacy Protocol,SNMP Privacy Passphrase
CISCO,main switch,192.150.1.25,4040,false,1,"1,2,4096","Pe1/2/3,Fa/3/2/1",gateway1,v2c,test-community,,,,,,,,
```

### File import

1. Go to **Admin → Data Sources → Network Devices**
2. Click the Import button and load the prepared file.

New network devices will be inserted into the table, whilst existing ones will be updated.

***

## Desk mapping

Associating network switch ports to spaces on the Locatee floor plan is done via a process called *desk mapping*. You can find more information here: [https://docs.locatee.ch/docs/desk-mapping](https://docs.locatee.ch/docs/desk-mapping)
