簡介
本文說明如何使用簡易網路管理通訊協定(SNMP)v2和v3將聚合存取(5760/3850/3650)新增到Prime基礎架構。
必要條件
需求
思科建議您瞭解以下主題:
- 融合接入(5760/3850/3650)Cisco IOS®版本3.3.x及更高版本或Denali 16.x
- Prime基礎架構版本2.0或更高版本
採用元件
本文件所述內容不限於特定軟體和硬體版本。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路正在作用,請確保您已瞭解任何指令可能造成的影響。
配置(Prime基礎設施2.2及更低版本)
交換器上的SNMP v2組態
GUI
選擇Configuration > Controller > Management > SNMP > Communities > New。
CLI
輸入以下命令:
conf t
snmp-server community V2Community RW
交換器上的SNMP v3組態
CLI
輸入以下命令:
conf t
snmp-server group V3Group v3 auth read V3Read write V3Write
snmp-server user V3User V3Group v3 auth sha Password1 priv aes 128 Password1
snmp-server view V3Read iso included
snmp-server view V3Write iso included
snmp-server host 10.201.234.170 version 3 auth V3User
snmp-server enable traps
Prime基礎架構
附註:使用「生命週期」檢視。
選擇Operate > Device Work Center > Add Device。
SNMP v2
SNMP v3
附註:如果未輸入Telnet/Secure Shell引數,Prime Infrastructure將不會從交換機收集清單。
配置(Prime Infrastructure 3.x及更高版本)
交換器上的SNMP組態(Denali 16.x)
GUI
選擇General Settings > Management > SNMP。
啟用SNMP。
交換器上的GUI SNMP v2組態(Denali 16.x)
交換機上的CLI SNMP v2配置(Denali 16.x)
輸入以下命令:
conf t
snmp-server community V2Community RW
交換器上的GUI SNMP v3組態(Denali 16.x)
交換機上的CLI SNMP v3配置(Denali 16.x)
輸入以下命令:
conf t
snmp-server user V3user V3Group v3 auth sha Password1 priv aes 128 Password1
snmp-server view V3Read iso included
snmp-server view V3Write iso included
snmp-server host 10.201.236.107 version 3 auth V3user
snmp-server enable traps
Prime基礎架構
SNMP v2
SNMP v3
驗證
使用本節內容,確認您的組態是否正常運作。
Cisco CLI Analyzer(僅供已註冊客戶使用)支援某些 show 指令。使用 Cisco CLI Analyzer 檢視 show 指令輸出的分析。
交換器上的SNMP v2組態(Cisco IOS-XE)
輸入以下命令:
5760-79b#show snmp community
Community name: V2Community
Community Index: V2Community
Community SecurityName: V2Community
storage-type: nonvolatile active
交換器上的SNMP v3組態(Cisco IOS-XE)
輸入以下命令:
5760-79b#show snmp user
User name: V3User
Engine ID: 80000009030068BC0C5A8F80
storage-type: nonvolatile active
Authentication Protocol: SHA
Privacy Protocol: AES128
Group-name: V3Group
5760-79b#show snmp group
groupname: V3Group security model:v3 auth
contextname: <no context specified> storage-type: nonvolatile
readview : V3Read writeview: V3Write
notifyview: <no notifyview specified>
row status: active
附註:對於思科錯誤ID CSCuo52406中涉及的一些已知問題,在融合接入上配置SNMP v3時,CLI優先於GUI。
Prime基礎架構(2.2及更低版本)
交換器上的SNMP v2組態(Denali 16.x)
輸入以下命令:
polaris-3850#show snmp community
Community name: v2community
Community Index: v2community
Community SecurityName: v2community
storage-type: nonvolatile active
交換器上的SNMP v3組態(Denali 16.x)
輸入以下命令:
polaris-3850#show snmp user
User name: v3user
Engine ID: 80000009030068BC0C5A8F80
storage-type: nonvolatile active
Authentication Protocol: SHA
Privacy Protocol: AES128
Group-name: V3Group
polaris-3850#show snmp group
groupname: V3Group security model:v3 auth
contextname: <no context specified> storage-type: nonvolatile
readview : V3Read writeview: V3Write
notifyview: <no notifyview specified>
row status: active
Prime基礎架構
疑難排解
本節提供的資訊可用於對組態進行疑難排解。
來自融合接入
show logging命令會顯示從WLC傳送到Prime基礎架構IP位址的活動封包。
輸入以下命令:
polaris-3850#debug snmp packets
Polaris-3850#show logging
entPhysicalEntry.7.2042 = Gi2/0/1
*Jun 10 15:58:51.817: SNMP: Packet sent via UDP to 10.201.236.107
*Jun 10 15:58:51.819: SNMP: Packet received via UDP from 10.201.236.107 on Vlan1105
*Jun 10 15:58:51.825: SNMP: Get-bulk request, reqid 945449769, nonrptr 0, maxreps 10
Jun 10 15:58:51.904: SNMP: Packet sent via UDP to 10.201.236.107
*Jun 10 15:58:51.927: SNMP: Packet received via UDP from 10.201.236.107 on Vlan1105
*Jun 10 15:58:51.928: SNMP: Get-bulk request, reqid 945449775, nonrptr 0, maxreps 10
entPhysicalEntry.7.2062 = NULL TYPE/VALUE
*Jun 10 15:58:51.931: SNMP: Response, reqid 945449775, errstat 0, erridx 0
entPhysicalEntry.7.2063 = Gi2/0/22
entPhysicalEntry.7.2064 = Gi2/0/23
entPhysicalEntry.7.2065 = Gi2/0/24
entPhysicalEntry.7.2066 = Switch 2 FRU Uplink Module 1
--More-- entPhysicalEntry.7.2067 = Gi2/1/1 Container
entPhysicalEntry.7.2068 = Gi2/1/2 Container
entPhysicalEntry.7.2069 = Te2/1/3 Container
entPhysicalEntry.7.2070 = Te2/1/4 Container
entPhysicalEntry.8.1 = V01
*Jun 10 15:58:51.951: SNMP: Packet sent via UDP to 10.201.236.107
*Jun 10 15:58:51.974: SNMP: Packet received via UDP from 10.201.236.107 on Vlan1105
*Jun 10 15:58:51.975: SNMP: Get-bulk request, reqid 945449777, nonrptr 0, maxreps 10
ciscoEnvMonTemperatureStatusEntry.3 = NULL TYPE/VALUE
*Jun 10 15:58:51.978: SNMP: Response, reqid 945449777, errstat 0, erridx 0
ciscoEnvMonTemperatureStatusEntry.3.2008 = 28
ciscoEnvMonTemperatureStatusEntry.3.2009 = 40
ciscoEnvMonTemperatureStatusEntry.3.2010 = 44
ciscoEnvMonTemperatureStatusEntry.6.2008 = 1
--More-- *Jun 10 15:58:52.001: SNMP: Packet sent via UDP to 10.201.236.107
從Prime Infrastructure
裝置之間的SNMPWALK。
輸入以下命令:
PrimeInfrastructurejoker/admin# shell
Enter shell access password :
Starting bash shell ...
ade # snmpwalk -v2c -c v2community 10.201.234.36 sysUpTime
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (238833753) 27 days, 15:25:37.53
v2community = snmp community
10.201.234.36 = WLC IP
如果可達性存在,則出現以下結果:
DISMAN-EVENT-MIB::sysUpTimeInstance =時間戳:xx.xxx