H3c是否有和思科一样的EEM触发系统日志,满足条件则自动执行命令。
思科类似配置,当接口down后,会执行相关命令。请大佬指点H3c若实现此功能如何实现
event manager applet interface_Shutdown event syslog pattern "Interface GigabitEthernet8, changed state to down" action 1.0 cli command "enable" action 1.5 cli command "config t" action 2.0 cli command "interface GigabitEthernet8" action 2.5 cli command "no shutdown" action 3.0 cli command "speed 100" action 3.5 cli command "duplex full" action 4.0 cli command "end" action 4.5 cli command "exit"
(0)
最佳答案
那就是结合EAA联动之类的操作,下面是联动的类似的案例,可以参考下
1、配置track项track MSR上行口g0/0的物理状态
track 1 interface GigabitEthernet0/0 physical
2、配置EAA策略使上行口down的时候,下行口g0/2跟着down
rtm cli-policy test
event track 1 state negative
action 1 cli system-view
action 2 cli interface g0/2
action 3 cli shutdown running-time 30000000
user-role network-admin
3、配置EAA策略使上行口UP的时候,下行口g0/2跟着UP
rtm cli-policy test1
event track 1 state positive
action 1 cli system-view
action 2 cli interface g0/2
action 3 cli undo shutdown running-time 30000000
user-role network-admin
source ip 1.1.1.2
#
#
rtm cli-policy dzm
event snmp-notification oid 1.3.6.1.4.1.25506.8.3.1.13.1.11.4.115.117.115.117.1.49.1 oid-val 2 op eq
action 0 cli system
action 1 cli int loopback1
action 2 cli shut
user-role network-admin
user-role level-15
(0)
H3c也有类似的触发系统日志功能,称为事件触发器(Event-triggered),可以通过配置触发条件和执行动作来实现类似的功能。具体实现步骤如下:
1. 配置事件触发器
event-trigger applet interface_Shutdown trigger syslog priority emergencies pattern "Interface GigabitEthernet8, changed state to down"
2. 配置执行动作
event-action action1.0 cli command "enable"
event-action action1.5 cli command "config"
event-action action2.0 cli command "interface GigabitEthernet8"
event-action action2.5 cli command "shutdown"
event-action action3.0 cli command "speed 100"
event-action action3.5 cli command "duplex full"
event-action action4.0 cli command "no shutdown"
event-action action4.5 cli command "end"
event-action action5.0 cli command "exit"
以上配置将在接口GigabitEthernet8发生down事件时,执行相关的命令将接口重新配置为100M全双工模式。
(1)
暂无评论
1、有的,H3C的叫做EAA(Embedded Automation Architecture,嵌入式自动化架构)是集成在系统软件中的一系列相关软件模块的总称
2、参考配置文档:
(1)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论