05-04-2015 02:23 PM
Hello everyone
Recently i got into a problem where i need to change the PIM DR priority of an interface when some other interface on the router goes down.
I heard before about TCL but never used it before, if you have any guides or leads that i could follow to achieve my goal i would thank you so much.
Regards
05-06-2015 10:14 AM
so far i have the following, i can register the policy, i can see that it runs when the track 1 state goes down, but it does not change the config at all
::cisco::eem::event_register_track 1 state down
namespace import ::cisco::eem::*
namespace import ::cisco::lib::*
array set arr_einfo [event_reqinfo]
if [catch {cli_open} result] {
error $result $errorInfo
} else {
array set cli1 $result
}
if [catch {cli_exec $cli1(fd) "conf t"} _cli_result] {
error $_cli_result $errorInfo
}
if [catch {cli_exec $cli1(fd) "router pim"} _cli_result] {
error $_cli_result $errorInfo
}
if [catch {cli_exec $cli1(fd) "interface bvi 640"} _cli_result] {
error $_cli_result $errorInfo
}
if [catch {cli_exec $cli1(fd) "no dr-priority"} _cli_result] {
error $_cli_result $errorInfo
}
if [catch {cli_exec $cli1(fd) "end"} _cli_result] {
error $_cli_result $errorInfo
}
# Close open cli before exit.
catch {cli_close $cli1(fd) $cli1(tty_id)} result
05-06-2015 02:42 PM
Nevermind guys, i answered myself, i had problems with the authorization of the commands, i had to create a vty-pool eem and assign the proper aaa list to the line template and now its all working.
Regards.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide