Cisco Systems A9014CFD Router User Manual


 
31-12
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
event tag event_cd ethernet microwave clear-sd interface GigabitEthernet0/10
event tag event_sd ethernet microwave sd interface GigabitEthernet0/10 threshold 1000
trigger
correlate event event_cd or event event_sd
! Variable settings
action 100 set olc "100"
action 102 set dlc "1"
action 104 set n "$_ring_nodes"
action 106 set cb "$_ethernet_current_bw"
action 108 set nb "$_ethernet_nominal_bw"
action 110 set ifname "vlan $_svi61"
action 112 set cpmap_bw 0
action 114 set pri_bw 0
action 116 set ppmap 0
action 118 set s1 "EEM-"
action 120 set zeros "000000"
action 122 set cb_bps "$cb$zeros"
action 124 set nb_bps "$nb$zeros"
action 126 set ifcfg 1
action 130 cli command "enable"
action 132 cli command "conf t"
! Restore the original QoS policy
action 160 if $cb eq $nb
action 162 cli command "interface $_ethernet_intf_name"
action 163 cli command "no service-policy output $s1$ppmap"
action 164 cli command "service-policy output $ppmap"
! QoS block
! Find an original parent policy-map name and create a new name
action 180 elseif $_eem_mode le "1"
action 181 if $ppmap eq "0"
action 182 cli command "do show run int $_ethernet_intf_name | i service-policy output"
# action 184 syslog msg "cli_result 184: $_cli_result, into: $_ethernet_intf_name"
action 186 regexp "service-policy output (.*)\n" "$_cli_result" line pmap
# action 188 syslog msg "line 196: $line"
# action 190 string replace "$line" 0 21 ""
action 192 string trimright "$pmap"
# action 194 syslog msg "QoS done. string 194: $_string_result, line: $line"
action 196 set pmap $_string_result
action 197 else
action 198 set pmap $ppmap
action 199 end
action 200 syslog msg "s1pmap 200: $s1$pmap"
! Find an original child policy-map name and create a new name
action 214 cli command "do show run policy-map $pmap | i service-policy"
# action 215 syslog msg "cli_result 215: $_cli_result"
action 216 regexp "service-policy (.*)\n" "$_cli_result" line cpmap
action 217 string trimright "$cpmap"
action 218 set cpmap "$_string_result"
# action 219 syslog msg "cpmap 219: $s1$cpmap"
action 220 cli command "do show run policy-map $cpmap"
action 221 regexp "class .*!" $_cli_result string
! Configuration of a new child policy-map
action 223 cli command "policy-map $s1$cpmap"
action 226 foreach var "$string" "\n"
action 228 regexp "class (.*)" $var match cname
action 230 if $_regexp_result eq 1