本文在有一个用户配置的SNMP组的Cisco MGX交换机描述如何执行简单网络管理协议(SNMP)走。
Cisco建议您符合此要求,在您尝试此配置前:在MGX的lnPci接口配置的IP地址一定是可及的从您打算执行SNMP走的系统。
本文根据与PXM45C的一MGX8850作为处理器卡。然而,本文不限于特定软件和硬件版本。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
当您轮询与SNMP时的一Object Identifier (OID)在MGX的一个公共专用组走,工作良好(请参阅输出)。但是,如果定义了一个新的SNMP组并且进行走,您接受超时。
MGX.7.PXM.a > dspsnmpgroups
GroupName SecurityModel SecurityLevel
-------------------------------- ----------------- -----------------
public SNMPV1 NoAuthNoPriv
private SNMPV1 NoAuthNoPriv
cisco_group SNMPV3 AuthPriv
trapCommunity SNMPV1 NoAuthNoPriv
snmp_server% snmpwalk -Os -c public -v1 192.168.2.2 system
sysDescr.0 = STRING: Cisco MGX8880 Media Gateway
sysObjectID.0 = OID: enterprises.9.1.598
sysUpTimeInstance = Timeticks: (497996272) 57 days, 15:19:22.72
sysContact.0 = STRING:
sysName.0 = STRING: MGX
sysLocation.0 = STRING:
sysServices.0 = INTEGER: 72
snmp_server% snmpwalk -Os -c private -v1 192.168.2.2 system
sysDescr.0 = STRING: Cisco MGX8850 Wide Area Switch
sysObjectID.0 = OID: enterprises.9.1.228
sysUpTimeInstance = Timeticks: (10648330) 1 day, 5:34:43.30
sysContact.0 = STRING:
sysName.0 = STRING: MGX
sysLocation.0 = STRING:
sysServices.0 = INTEGER: 72
默认情况下, SNMP在MGX在公共和专用的SNMP组走仅允许。
完成这些步骤为了配置。
MGX.7.PXM.a > addsnmpgroup
Syntax: addsnmpgroup <groupName> <securityModel> <securityLevel>
groupName -- String with length less than 33 characters
securityModel -- 1 - snmpv1, 3 - usm (snmpv3)
securityLevel -- 1 - noAuthNoPriv, 2 - authNoPriv, 3 - authPriv
(for securityModel = snmpv1, securityLevel has to be 1)
read -- String with length less than 33 characters
write -- String with length less than 33 characters
notify -- String with length less than 33 characters
(for SII, use SII-RW-VIEW as Read & Write view and SII-TRAP-VIEW
as Notify view)
MGX.7.PXM.a > addsnmpgroup test 1 1 >>> Adding SNMP group named 'test' for
SNMPv1 and noAuthNoPriv.
MGX.7.PXM.a > dspsnmpgroups
GroupName SecurityModel SecurityLevel
-------------------------------- ----------------- -----------------
test SNMPV1 NoAuthNoPriv
public SNMPV1 NoAuthNoPriv
private SNMPV1 NoAuthNoPriv
cisco_group SNMPV3 AuthPriv
trapCommunity SNMPV1 NoAuthNoPriv
snmp_server% snmpwalk -Os -c test -v1 192.168.2.2 system
Timeout: No Response from 192.168.2.2 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>> does not work
MGX.7.PXM.a > dspsnmp
MGX System Rev: 05.05 May. 10, 2014 03:16:57 GMT
MGX8850 Node Alarm: MAJOR
Community (rw): private
Community (ro): public
System Location:
System Contact:
MGX.7.PXM.a > cnfsnmp community
ERR: Syntax: cnfsnmp community <string> [ro|rw]
cnfsnmp contact [string] -- a printable string of 0-255 characters
cnfsnmp location [string] -- a printable string of 0-255 characters
MGX.7.PXM.a > cnfsnmp community test rw
M5.7.PXM.a > dspsnmp
MGX System Rev: 05.05 May. 05, 2014 05:05:02 GMT
MGX8850 Node Alarm: CRITICAL
Community (rw): test >>>>>>>>>>>>>>earlier it was private
Community (ro): public
System Location:
System Contact:
请使用此部分为了验证您的配置适当地工作。
MGX.7.PXM.a > dspsnmpgroups
GroupName SecurityModel SecurityLevel
-------------------------------- ----------------- -----------------
test SNMPV1 NoAuthNoPriv
public SNMPV1 NoAuthNoPriv
private SNMPV1 NoAuthNoPriv
cisco_group SNMPV3 AuthPriv
trapCommunity SNMPV1 NoAuthNoPriv
M5.7.PXM.a > dspsnmp
MGX System Rev: 05.05 May. 05, 2014 05:05:02 GMT
MGX8850 Node Alarm: CRITICAL
Community (rw): test >>>>>>>>>>>>>>earlier it was private
Community (ro): public
System Location:
System Contact:
snmp_server@kyudo-1% snmpwalk -Os -c test -v1 192.168.2.2 system
sysDescr.0 = STRING: Cisco MGX8850 Wide Area Switch
sysObjectID.0 = OID: enterprises.9.1.228
sysUpTimeInstance = Timeticks: (10699803) 1 day, 5:43:18.03
sysContact.0 = STRING: [string] -- a printable string of 0-255 characters
sysName.0 = STRING: M5
sysLocation.0 = STRING: [string] -- a printable string of 0-255 characters
sysServices.0 = INTEGER: 72
目前没有针对此配置的故障排除信息。