关于思科交换机的日志输出问题

关于思科交换机的日志输出问题,第1张

你还要在交换机上设置snmp trap,说白了就是当交换机的某些状态变化时自动发一条消息给syslog服务器

在我的3750上面默认有如下的trap

sw01(config)#snmp-server enable traps 

bridge            Enable SNMP STP Bridge MIB traps

cluster           Enable Cluster traps

config            Enable SNMP config traps

copy-config       Enable SNMP config-copy traps

entity            Enable SNMP entity traps

envmon            Enable SNMP environmental monitor traps

flash             Enable SNMP FLASH notifications

fru-ctrl          Enable SNMP entity FRU control traps

hsrp              Enable SNMP HSRP traps

mac-notification  Enable SNMP MAC Notification traps

port-security     Enable SNMP port security traps

rtr               Enable SNMP Response Time Reporter traps

snmp              Enable SNMP traps

stpx              Enable SNMP STPX MIB traps

syslog            Enable SNMP syslog traps

vlan-membership   Enable SNMP VLAN membership traps

vlancreate        Enable SNMP VLAN created traps

vlandelete        Enable SNMP VLAN deleted traps

vtp               Enable SNMP VTP traps

<cr>

如果开启的话,上面的配置每发生一次变化就会发送一条消息出去。IOS版本不一样,支持的trap有多有少。

在配置模式下输入snmp-server enable traps就开启了。但是还得加点条件。

比如说接收trap的服务器地址:snmp-server host 192168xx traps xxxxx

把命令帖完格式全变了,给你帖个图上来吧。

1,同步日志,你是指把日志保存到一个服务器上吗,下例为使得交换机的所有日志都保存到1921682517的/tol/logs/cisco/ciscolog日志中
cisco#conf t
cisco(config)#logging on -->打开日志显示
cisco(config)#logging 1921682517
cisco(config)#logging facility local2
cisco(config)#logging source-interface vlan 1
cisco(config)#service timestamps debug uptime
cisco(config)#logging buffered 8192 debugging
2,cisco#conf t
cisco(config)#ip name-server 192168118 设置域名服务器<---DNS 服务器
3,VLAN描述字符与端口描述是否有区别
VLAN 描述字符是指给VLAN取的名字,因为VLAN 都有一个数字式的ID的。
端口描述,是给指定端口设定描述。是在进行端口配置之后用 “DESCRIPTION 描述字符”设定的。

尊敬的联想用户,您好。
建议您通过微信的方式咨询联想工程师:>

欢迎分享,转载请注明来源:内存溢出

原文地址: https://www.outofmemory.cn/zz/13296616.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-07-10
下一篇 2023-07-10

发表评论

登录后才能评论

评论列表(0条)

保存