Netsight ELRP script
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎04-13-2016 02:18 PM
Hi All
I need to change the settings of ELRP interval. I have found this script which i am sure can be used in Netsight.
But am unsure as to how much of it i need. All I need to do is conf elrp-client periodic vlan ($variable) ports all interval 20
The above sript does way more, so i assume i can delete parts of it. Does anyone know which ones?
Also would i need to add excluded ports to the script even though it has already been defined.
I need to change the settings of ELRP interval. I have found this script which i am sure can be used in Netsight.
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
But am unsure as to how much of it i need. All I need to do is conf elrp-client periodic vlan ($variable) ports all interval 20
The above sript does way more, so i assume i can delete parts of it. Does anyone know which ones?
Also would i need to add excluded ports to the script even though it has already been defined.
17 REPLIES 17
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎04-27-2016 06:14 AM
XOS 16.1.1.4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎04-26-2016 08:13 PM
What version of EXOS are you running?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎04-20-2016 10:05 AM
Hi
Tested the script and it failed with the below error
*** Error at line - 59 ***
invalid command name "config elrp-client periodic ports All interval 5 log disable-port ingress 300"
Line 59 is
I am so confused. Doesn't seem to like the ingress 300 bit.
So i did
But still get the error.
invalid command name "config elrp-client periodic Extreme1 ports All interval 3 log disable-port ingress duration 300"
The command works in the cli.
Tested the script and it failed with the below error
*** Error at line - 59 ***
invalid command name "config elrp-client periodic
Line 59 is
set var recmd $TCL(concat "config elrp-client periodic" $v "ports" $p "interval" $int $lt)
I am so confused. Doesn't seem to like the ingress 300 bit.
if (!$t) then
set var recmd $TCL(concat $recmd "disable-port" $ie)
set var t $TCL(regexp {\d+} $d)
if ($t) then
set var d $TCL(concat "duration" $d)
So i did
set var recmd $TCL(concat "config elrp-client periodic" $v "ports" $p "interval" $int $lt)
if (!$t) then
set var recmd $TCL(concat $recmd "disable-port" $ie "duration")
set var t $TCL(regexp {\d+} $d)
if ($t) then
set var d $TCL(concat "duration" $d)
endif
set var recmd $TCL(concat $recmd $d)
endif
But still get the error.
invalid command name "config elrp-client periodic Extreme1 ports All interval 3 log disable-port ingress duration 300"
The command works in the cli.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎04-18-2016 08:04 AM
Thanks for the explanation.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎04-14-2016 04:31 PM
Yes. It takes the int variable in at the top and makes that the interval for all ELRP VLAN instances. It assumes you are not running any one-shot instances of ELRP on a VLAN. It only works on 16.1 forward because the ports are shown in the output without spaces in that release of EXOS fwd, else it could get really messed up.
