Skip to main content

I am trying to locate all of my fiber 100Mbps interfaces because they are being phased out by various vendors and not supported on newer equipment.

The data model has an interface speed value (ethernet.speedMbps) but not seeing a medial type - I can see both inside the interface details however the speed/media is naturally in strings without spaces so challenging to pull out.

 

I was looking to see if both speed and media types were in the data model for a simple NQE vs having to parse out the interface details.

 

Also the interface speed value (ethernet.speedMbps) but it appears that if bandwidth is statically configured, that value is used - on Cisco devices bandwidth can be set to value for protocol calculation but is not necessarily matching the actual interface speed.  

@CarlB 

Unfortunately that would need to be requested as a feature request.  We currently do not parse the media type into the data model.  Which means that in the short term, you would need to parse it with NQE.

If it is not space separated, then you would need to define a user function to split the data.  Or you could use a glob match that would allow you to use wildcards.  Something like *fx*.


@CarlB We parse the transceivers from the inventory, so while it isn’t listed under the interface, it does exist in the data model. This NQE will find the interface speed and the associated transceiver, and will fail interfaces with a speed of 100Mbps and a transceiver present. 

 

foreach device in network.devices
foreach interface in device.interfaces
where isPresent(interface.ethernet.speedMbps)
let partID = max(foreach component in device.platform.components
where component.name in interface.aliases
select component.partId)
select {
violation: interface.ethernet.speedMbps == 100 && isPresent(mediaType),
deviceName: device.name,
interfaceName: interface.name,
speedMbps: interface.ethernet.speedMbps,
"Part ID": partID
}

 


Reply