cancel
Showing results for 
Search instead for 
Did you mean: 

Configure ELRP Script

Configure ELRP Script

Mike28
New Contributor II
I understand that any scripts on here need to be tested out before placed on a production network. I am just trying to find a fast way to fix ELRP that was configured incorrectly on all ports.

Right now it is enabled on all ports. The uplink ports are excluded from disable. So when the switch loops it sends it out the uplink port.

Looking for some help with a script to enable ELRP only on untagged ports. Would like it to block a looped port permanently. Would like for this script to run daily to make sure any ports that change vlan's are covered.

If you have ideas on a way to stop uplink ports from having ELRP enabled that would be great too!

Thanks in advance

9 REPLIES 9

Sumit_Tokle
Contributor
I made mistake in step 1. Please change the file type from pol to xsf and run it again.

Mike28
New Contributor II
When I run the script I get this error

X460-24t.10 # load script elrpscript
Cannot open EXSH script "/config/elrpscript.xsf"!

Sumit_Tokle
Contributor
You could use UPM profile to invoke above profile after particular time period.

Mike28
New Contributor II
Sumit,

Thanks for the reply. I will give it a test. On this script is it a one time run? I need to have something that will keep ELRP enabled all the time. But needs to check periodically for VLAN port changes. It is in a large network and people change untagged ports from one VLAN to another. I just want to make sure that we are still protected from loops.

Thanks,
Mike

Sumit_Tokle
Contributor
Below script will run the elrp on all vlan and ports which are present on switch.

step 1) Execute command "vi elrpscript.pol"
Step 2) paste below script

disable clipaging enable elrp-client

set var sv "#ELRP POLL STARTED#"

show var sv

set var cli.out 0

show vlan

set var sv $TCL(split ${cli.out} "\n")

set var e $TCL(lsearch $sv *(B)*)

set var i 5

set var e ($e - 1)

while ($i < $e) do

set var cli.out 0

set var v $TCL(lindex $sv $i)

set var vn $TCL(lindex $v 0)

set var z $TCL(regexp {Mgmt} $vn)

if ($z == 0) then

conf elrp-client one-shot $vn port all print

set var p $TCL(split ${cli.out} "\n")

set var p1 $TCL(lsearch $p *NO*)

if ($p1 == -1) then

set var p1 $TCL(lindex $p 2)

set var p2 $TCL(lindex $p1 9)

set var p1 $TCL(lrange $p1 0 6)

set var p1 $TCL(concat $p1 $p2)

set var p2 $TCL(lindex $p 3)

set var p2 $TCL(lrange $p2 5 7)

set var p $TCL(concat $p1 $p2)

show var p

else

set var p1 $TCL(lindex $p 2)

set var p2 $TCL(lindex $p1 10)

set var p1 $TCL(lrange $p1 0 7)

set var p1 $TCL(concat $p1 $p2)

show var p1

endif

endif

set var i ($i + 1)

endwhile

disable elrp-client

enable clipaging

set var sv "#ELRP POLL COMPLETED#"

show var sv

Step 3) To run script "load script elrpscript"

It will tell you on which port the loop is present.

GTM-P2G8KFN