cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1087
Views
0
Helpful
1
Replies

IOS-XR EEM LLDP event help

sreenivasgajula
Level 1
Level 1

Hello everyone,

I'm trying to migrate a working eem script on IOS to IOS-XR. Basically want to rename interface description whenever lldp neighbor changes.

Here's the working script on IOS/IOS-XE device:

event manager applet AUTO_UPDATE_NEIGHBOR
event neighbor-discovery interface regexp .*GigabitEthernet[0-9]/[0-9,/]+$ lldp add
action 1.0 cli command "en"
action 1.1 cli command "sh int desc | i $_nd_short_local_intf_name"
action 1.2 regexp "[A-Z][A-Z][A-Z][A-Z][-][M][O][E][-][0-9][0-9][-][P]" "$_cli_result" _ringID
action 1.3 if $_regexp_result eq "1"
action 1.4 string trimright "$_nd_lldp_system_name" ".mgmt.upnfiber.com"
action 1.5 set underscore "_"
action 1.6 cli command "enable"
action 1.7 cli command "conf t"
action 1.8 cli command "interface $_nd_local_intf_name"
action 1.9 cli command "description P2P-$_ringID$underscore$_nd_lldp_system_name"
action 2.0 cli command "end"
action 2.1 cli command "exit"
action 2.2 else
action 2.3 regexp "[A-Z][A-Z][A-Z][A-Z][-][M][O][E][-][0-9][0-9]" "$_cli_result" _ringID
action 2.4 if $_regexp_result eq "1"
action 2.5 string trimright "$_nd_lldp_system_name" ".mgmt.upnfiber.com"
action 2.6 set underscore "_"
action 2.7 cli command "enable"
action 2.8 cli command "conf t"
action 2.9 cli command "interface $_nd_local_intf_name"
action 3.0 cli command "description P2P-$_ringID$underscore$_nd_lldp_system_name"
action 3.1 cli command "end"
action 3.2 cli command "exit"
action 3.3 end
action 3.4 end

 

 

I looked at some posts on on how to use EEM on IOS-XR and I was able to run the example provided. Based on some trial and error, I think the first line in a tcl script shown below is incorrect and I tried tweaking it quite a bit with no luck.

::cisco::eem::event_register_neighbhor_discovery interface regexp .*GigabitEthernet[0-9]/[0-9,/]+$ lldp add maxrun 90

 

1 Reply 1

sreenivasgajula
Level 1
Level 1

I'm trying this on NCS540(XR 7.3.1). Looking at an old Cisco live presentation(screenshot attached), neighbor discovery events were not supported in XR back in 2014, unable to new information on it.