List all interfaces on all devices

This query provides a list of all main node devices within a domain together with the identifiers and names of the interfaces on each device.

Example

1] SELECT     eMainNode.entityName Main_Node_Name, 
2]            eInterface.entityId Interface_Entity_ID,
3]            eInterface.entityName Interface_Entity_Name
4] FROM       entityData eInterface
5] INNER JOIN entityData eMainNode ON eMainNode.entityId =
6]                   eInterface.mainNodeEntityId
7] WHERE      eInterface.entityType = 2
8] ORDER BY   eMainNode.entityName, eInterface.entityName

Description

The table below describes this query.

Table 1. Description of the query 

Line numbers

Description

1-3

Specify the data to show in the results, as follows:

  • The name of a main node device, represented by eMainNode.entityName
  • The unique entity ID of the interface within the topology database, represented by eInterface.entityId
  • The name of the interface, represented by eInterface.entityName

4

Use the entityData table as the driving table for this query. Use the alias eInterface for the entityData table to indicate that the data extracted using this alias is interface data.

5-6

Identify the containing main node device for each of the entities retrieved in the preceding line. Do this by joining the entityData table to itself using the mainNodeEntityId field.

7

Limit the components of the device to interfaces only. Do this filtering the components to retrieve only components with an entity type of 2, which corresponds to an interface.

8

To facilitate readability of the results, order first by main node name and then by interface name.

Results

The table below shows a portion of the results for this query.

Table 2. Results of the query 

Main node name

Interface entity ID

Interface entity name

172.20.1.41

1622

172.20.1.41[0[1]]

172.20.4.11

1621

172.20.4.11[0[1]]

172.20.4.11

1624

172.20.4.11[0[10]]

172.20.4.11

1479

172.20.4.11[0[11]

172.20.4.11

1632

172.20.4.11[0[12]

VE001.example.net

1631

VE001.example.net[0[1]]