本文說明如何使用使用者設定的SNMP群組在Cisco MGX交換器上執行簡易網路管理通訊協定(SNMP)執行。
思科建議您在嘗試此組態之前符合以下要求:從要執行SNMP行走的系統必須能夠訪問MGX上lnPci介面上配置的IP地址。
本文檔基於採用PXM45C作為處理器卡的MGX 8850。但是本檔案所述內容不限於特定軟體和硬體版本。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路正在作用,請確保您已瞭解任何指令可能造成的影響。
當您在MGX上的公共/專用組中通過SNMP行走輪詢對象識別符號(OID)時,它工作正常(請參閱輸出)。 但是,如果您定義了一個新的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
預設情況下,MGX上的SNMP行走僅允許在公用和專用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
目前尚無適用於此組態的具體疑難排解資訊。
修訂 | 發佈日期 | 意見 |
---|---|---|
1.0 |
16-May-2014 |
初始版本 |