ASR9k EEM+TCL General custom SNMP Trap
If customer want to focus a alarm on their NMS by SNMP Trap, they can config “snmp-server traps syslog”. But if customer no filter feature on NMS, they couldn’t find special alarm in all syslog, now we can use EEM + TCL to match customer requirement.
Follow TCL Script:
::cisco::eem::event_register_syslog pattern $_error_log occurs $_number period $_times maxrun 300 namespace import ::cisco::eem::* namespace import ::cisco::lib::* set alarm "***OOB_ERROR Happened!***" sys_reqinfo_snmp_trapvar var temp oid 1.1.1.1.1.1.1.1 string $alarm sys_reqinfo_snmp_trap enterprise_oid 1.3.6.1 generic_trapnum 6 specific_trapnum 2 trap_oid 1.1.1.1.1.1.1.1.1.1.1.1.1 trap_var temp
How to sniffer Dummy VLAN on L2VPN ?
什么是dummy vlan?
由于EVC平台在入端口可以通过rewrite命令剥离VLAN tag,这样导致在PW中没有任何tag,在Type 4时会有问题,两边VLAN的QOS无法传递给对端,所以就有了这个所谓的dummy vlan,它不是一个真正的VLAN,他只是传递一些QOS字段并且占一个位。那么dummy VLAN长什么样?其实大鹏之前的文章里已经详细介绍了EVC的各种行为,我这里只是介绍抓dummy VLAN的“心路历程”以及dummy VLAN的“样子”~
测试Topology:
起始测试环境为VPLS BGP auto discovery + LDP Sig,在76的入向抓包
测试步骤
1. 默认Type 5,在CE1 ping 带cos 5,ASR9k-1在AC上不配置rewrite,透传的VLAN是否带着802.1p?根据抓包信息,正常带着802.1p,详细看“bgp-ldp-vlan-cos5.pcapng”;另外有个疑问,既然type 5支持VLAN透传,为什么还要Type 4?答案请看文章结束部分
完整阅读