09-10-2013 06:35 AM
Hi All,
I'm developing EEM script for ASR903 platform... I define two EVC, one for each "host" connected to the same ASR903 interface ( gi 0/1 ).
Each host sends CFM packet, I would recognize from which EVC the CFM packet arrives. In the EEM scripting language there is the following variable : $_ethernet_intf_name that can be used to retreive the interface name. Is there any other variable that could be used to recognize the EVC or is there any syslog message that conatins this information ?
ethernet cfm ieee
ethernet cfm global
ethernet cfm domain HOST1 level 2
service vlan301 evc evc301 vlan 1301 direction down
continuity-check
!
ethernet cfm ieee
ethernet cfm global
ethernet cfm domain HOST2 level 3
service vlan301 evc evc302 vlan 1302 direction down
continuity-check
!
ethernet evc evc301
ethernet evc evc302
!
interface GigabitEthernet0/1
description ink to ASR-903 via Microwave
no ip address
load-interval 30
negotiation auto
ethernet event microwave hold-off 10
ethernet event microwave wtr 5
ethernet event microwave loss-threshold 255
!
service instance 301 ethernet evc301
encapsulation dot1q 301
rewrite ingress tag pop 1 symmetric
bridge-domain 301
cfm mep domain HOST1 mpid 101
cfm encapsulation dot1q 301
!
service instance 302 ethernet evc302
encapsulation dot1q 302
rewrite ingress tag pop 1 symmetric
bridge-domain 302
cfm mep domain HOST2 mpid 102
cfm encapsulation dot1q 302
!
Solved! Go to Solution.
09-10-2013 08:31 AM
Ah, ethernet OAM. I have never used this event detector, so I'm not sure what capabilities are available. I also don't have an ASR903 handy to test myself. You can run the "show event manager detector ethernet detail" command to see what built-in variables are available to your EEM policy from the ethernet event. You can also do "show event manager detector all" to see all event detectors. Hopefully you'll see something there that specifies the EVC.
If not, you certainly could extract it from something like a syslog message if a message is generated that contains the EVC name. Again, I'm not sure what syslogs are generated, so you'd have to test that yourself.
09-10-2013 08:11 AM
I'm not sure where the _ethernet_intf_name variable is coming from. It is not a built-in variable that I have seen before. It would be helpful to see the script as you have it written today to get a better idea of what you're trying to do.
09-10-2013 08:24 AM
Hi read about it in the following configuration example:
http://www.cisco.com/en/US/docs/routers/asr903/feature/guide/mw_acm.html
In the EEM script example the "ethernet_intf_name" is used, so I was thinking somehing like this for the EVC ...
My idea is defined two different EVCs for the same Gig 0/0/1 , enable them to receive the VSM packet and, since that it's possible define only one EEM script, use the EVC information in a swtich case statement to take different actions...
Thank you for your cooperation,
---
simone
09-10-2013 08:31 AM
Ah, ethernet OAM. I have never used this event detector, so I'm not sure what capabilities are available. I also don't have an ASR903 handy to test myself. You can run the "show event manager detector ethernet detail" command to see what built-in variables are available to your EEM policy from the ethernet event. You can also do "show event manager detector all" to see all event detectors. Hopefully you'll see something there that specifies the EVC.
If not, you certainly could extract it from something like a syslog message if a message is generated that contains the EVC name. Again, I'm not sure what syslogs are generated, so you'd have to test that yourself.
09-12-2013 12:00 AM
Hi, here below the output of the two commands you suggested :
Applet Built-in Environment Variables:
$_event_id
$_job_id
$_event_type
$_event_type_string
$_event_pub_time
$_event_pub_sec
$_event_pub_msec
$_event_severity
$_ethernet_notification
$_ethernet_source
$_ethernet_notification_subtype
$_ethernet_intf_name
$_ethernet_current_bw
$_ethernet_nominal_bw
I think that "$_ethernet_source" or "$_ethernet_intf_name" could be contain usefull information, but where can I find the doc about the description of these variables ?
Thank you
09-12-2013 07:42 AM
There likely isn't any. What I typically do is create a sample policy that prints the value. Build an ethernet event, then create syslog actions for each variable. For example:
action 1.0 syslog msg "Source : $_ethernet_source"
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