Cisco Systems A9014CFD Router User Manual


 
31-14
Cisco ASR 901 Series Aggregation Services Router Software Configuration Guide
OL-23826-09
Chapter 31 Microwave ACM Signaling and EEM Integration
Configuration Examples for Microwave ACM Signaling and EEM Integration
action 338 cli command "shape average $cb_bps"
action 340 cli command "service-policy $s1$cpmap"
! Apply the QoS policy on a PHY interface
action 344 cli command "int $_ethernet_intf_name"
action 346 cli command "no service-policy output $pmap"
action 348 cli command "service-policy output $s1$pmap"
action 390 end
! End of the QoS part
! IGP metric block
action 400 if $_eem_mode ge 1
action 402 multiply $n $cb
action 404 divide $_result $nb
action 406 syslog msg "406: cb: $cb nb: $nb result: $_result"
action 408 set m $_result
action 410 syslog msg "m: $m"
action 412 increment n
action 414 subtract $n $m
action 416 multiply $_result $olc
action 418 if $ifcfg eq 0
action 420 set dlc $metric
action 422 else
action 424 set dlc $_result
action 426 end
action 428 syslog msg "428: n:$n m:$m olc:$olc dlc:$dlc result:$_result intf: $ifname"
# action 430 cli command "enable"
# action 432 cli command "conf t"
action 434 cli command "int $ifname"
action 436 cli command "do show run int $ifname"
action 438 string first "ip router isis" "$_cli_result"
action 440 if $_string_result ne "-1"
action 442 cli command "isis metric $dlc"
action 444 cli command "do show ip ospf int | i $ifname"
action 446 string first "$ifname" "$_cli_result"
action 448 elseif $_string_result ne "-1"
action 450 cli command "ip ospf cost $dlc"
action 452 end
action 454 end
! Adjust the current applet
action 456 syslog msg "The EEM script executed"
action 458 cli command "event manager applet ACM62"
action 460 cli command "event tag event_sd ethernet microwave sd interface
GigabitEthernet0/10 threshold $nb"
action 462 if $ppmap eq 0
action 464 if $_eem_mode le 1
action 466 cli command "action 116 set ppmap $pmap"
action 468 end
action 470 end
! End of the script