cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1639
Views
5
Helpful
3
Replies

automatic interface description

Althaf07
Level 1
Level 1


i am looking for a EEM script which automatically updates the interface description. can anyone help me with the same., we have different models of Cisco Switches (2960s, 3850s, 3650s, 4500s and 6500s)

switch A and switch B are connected together through a portchannel config on each side

po1 on switchA and po2 on switchB. i want to update the interface description to this standard for around 600 switches. so that it is easier while troubleshooting. is there any EEM script available
to make this interface description automated.

i know a EEM script which detects the cdp neiborship and updates the interface description. but the challenge here updating my interface description is,

it has to detect the remote port channel interface number associated with the remote physical interface like below example. any expert advice ?

switchA#

int po1
description switchB-po2 (remote port channel interface on switchB)
!
int gi1/1/1
description switchB-te1/1/1-po2 (remote physical interface and portchannel interface no on switchB)
!
int gi1/1/2
description switchB-te1/1/2-po2 (remote physical interface and portchannel interface no on switchB)
!

SwitchB

!
int po2
description switchA-po1 (remote portchannel interface no on switchA)
!
int te1/1/1
description switchA-gi1/1/1-po1 (remote physical interface and portchannel interface no on switchB)
!
int te1/1/2
description switchA-gi1/1/2-po1 (remote physical interface and portchannel interface no on switchB)
!

 

3 Replies 3

Seb Rupik
VIP Alumni
VIP Alumni

Hi there,

The local switch has no way of determine port-channel membership on the remote switch, certainly this is not possible with CDP.

 

On IOS-XE platforms feasibly you could use the built-in python interpreter and create a script which logged onto the remote switch and 'looked back' towards the local switch allowing it to return the remote port-channel ID number.... but I am thinking out loud.

 

You best bet is to use an intermediate script on a server which periodically trawls your network looking for port-channels. It would easily be able to determine the PO IDs of both ends and update the switchport descriptions. Sadly this would not be an event driven process=and would need to be cron'd .

 

I don't think using EEM for this is possible.

 

cheers,

Seb.

Hey Seb, thanks for getting back on this! sadly both the options that you mentioned is not feasible for me. is there any other way to automate this except EEM or python? 

Automate it *without* using a scripting language?? 

 

There may be an NMS out there which would label your interfaces....but the idea of labeling your interfaces based on the perspective of the remote system is definitely not an off the shelf request.

 

You will have to automate this with a script which is executed on a system remote to the two switches. If not python, then Perl.... something with SSH libraries.

 

cheers,

Seb.

Review Cisco Networking for a $25 gift card