cancel
Showing results for 
Search instead for 
Did you mean: 

UPM - Configure port dispay-string based on LLDP device system name

UPM - Configure port dispay-string based on LLDP device system name

Mark_Bayliss
New Contributor
Hi,

We have a UPM device-detect profile in place and would like to configure the port display-string based on the device connected system name.

If we use the following to configure a generic name it works -

Configure port $EVENT.USER_PORT display-string "UPM-Moto-AP"

I would have thought the we would use $EVENT.SYSNAME however that didn't work

Also, are there any guides where we can better understand what variables we can use?

Cheers,

Mark
8 REPLIES 8

PeterK
Contributor III
Hello,

I need to refresh this thread.
I'm looking for a solution, that changes the port "display-string" & "description string" based on lldp remote information (in this case AP 3825i). Trigger should be a port up event and then the script should be run every 12 or maybe every 24h.

The input for the script can taken from following output/show-command.

show lldp ports neighbors detailed | include "System Name"

my problem:
I came from EOS world and have no skills in XOS scripting or programming.

I understand the main information of the first answer in this thread.

- how can I trigger this by time?
- how can I define a variable in show-command?

I hope you can help me and give me some tips.

Hi Peter,

the UPM variables are described in the EXOS User Guide in the Universal Port Confguration Overview chapter. To detect what kind of device is connected to the port you can use these variables:
  • $EVENT.DEVICE - Device identifcation string.Possible values are: AVAYA_PHONE, GEN_TEL_PHONE, ROUTER, BRIDGE, REPEATER, WLAN_ACCESS_PT, DOCSIS_CABLE_SER, STATION_ONLY and OTHER.
  • $EVENT.DEVICE_IP - The IP address of the device (if available). Blank if not available
  • $EVENT.DEVICE_MAC - The MAC address of the device (if available). Blank if not available.
  • $EVENT.DEVICE_POWER - The power of the device in milliwatts (if available). Blank if not available.
  • $EVENT.DEVICE_MANUFACTURER_NAME -The manufacturer of the device.
  • $EVENT.DEVICE_MODEL_NAME - Model name of the device.
  • $EVENT.USER_PORT - Port associated with the event.
The problem is even there are variables defined, they will not return a correct value every time even the show lldp nei detail command returns a lots of information. I've never get the MANUFACTURER_NAME nor the MODEL_NAME value. I've tested some Grandstream IP Phones and also Extremenetworks APs.

Sumit_Tokle
Contributor
Smaller code:

set var CLI.OUT " "
show switch
set var sysname $TCL(lrange ${CLI.OUT} 1 1)

Sumit_Tokle
Contributor
I am not sure if there is a direct event for sysName, but you can use some logic to retrieve the switch name.

One of the logic is

Execute the command "show switch" and search for "SysName", push the o/p in variable.

Below is the syntax for the same,

enable cli scripting per
set var CLI.OUT 0
show switch
set var input $TCL(split ${CLI.OUT} " ")
set var x $TCL(lsearch -glob $input "*SysName*")
set var x $TCL(lindex $input $x)
set var x $TCL(split $x " ")
set var switchname $TCL(lindex ${x} 10)
GTM-P2G8KFN