List all interfaces with specific attributes

This query provides a list of all interfaces within a domain that have specific attribute values.

The example given here retrieves interfaces that have an interface speed greater than 155 MB per second; however, you can construct a query using any of the attributes in the networkInterface table.

Example

1] SELECT     e.entityName Interface_Name,
2]            i.ifName IfName,
3]            i.ifSpeed Interface_Speed
4] FROM       entityData e
5] INNER JOIN networkInterface i ON i.entityId = e.entityId
6] WHERE      ifSpeed > 155000000
7] ORDER BY   i.ifSpeed DESC;

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 an interface, represented by e.entityName
  • The name of the interface stored in the MIB, represented by i.ifName
  • The speed of the interface, represented by i.ifSpeed

4

Use the entityData table as the driving table for this query. This part of the query retrieves all entities held in the database.

5

Limit the results of the query to interfaces.

Do this by joining the networkInterface table to the entityData table using the mainNodeEntityId field. There is now a line of data for each interface in the database. The INNER JOIN statement ensures that only interface data is retrieved.

6

Limit the results of the query to interfaces with interface speeds greater than 155 MB per second.

7

Order the results by the speed of the interface.

Results

The table below shows the results of this query.

Table 2. Results of the query 

Interface name

IfName

Interface speed

10.1.254.2[ 1 [ 1 ] ]

Gi1/1

1000000000

192.170.170.10[ 0 [ 51 ] ]

Gi50

1000000000

192.170.170.10[ 0 [ 50 ] ]

Gi49

1000000000

192.170.170.10[ 0 [ 1 ] ]

FX1

1000000000

172.20.4.19[ 0 [ 1 ] ]

ATM0/1/0

622080000

172.18.1.102[ 2 [ 1 ] ]

FEC-9/39-42

400000000

172.20.4.19[ 0 [ 2 ] ]

ATM0

155520000

192.170.170.10[ 0 [ 52 ] ]

Co51

155520000