cable modem remote-query命令是在Cisco IOS中引入的?软件版本12.0(7)XR和12.1(2)T。此命令允许您直接从uBR电缆调制解调器终端系统(CMTS)查询电缆调制解调器(CM)性能统计信息。
其思想是使用简单网络管理协议(SNMP)定期轮询CM,并缓存CMTS上的IP地址、MAC地址、S/N比和上游传输功率等信息(请参见输出)。 这有助于您了解单个调制解调器的状态,并获得工厂的整体状态。
本文档没有任何特定的要求。
本文档中的信息基于以下软件版本:
IOS软件版本12.0(7)XR和12.1(2)T
有关文档规则的详细信息,请参阅 Cisco 技术提示规则。
在电缆调制解调器上,必须配置SNMP社区字符串。使用以下方法之一执行此操作:
手动配置:添加snmp-server community<string>全局配置命令
强制CM通过有线数据服务接口规范(DOCSIS)配置文件下载IOS配置文件
通过DOCSIS配置文件中定义的SNMP对象标识符(OID)配置CM社区
在CMTS上,配置以下全局配置命令:
snmp-server community<community string>
snmp-server manager
注意:在12.2(33)SC中,在配置电缆调制解调器远程查询<社区字符串>后,不能配置snmp-server community <community string> RO。它是冗余的,因为IOS会自动将电缆调制解调器远程<community string>中注明的社区添加为SNMP RO <community string>社区。当您尝试配置时,您将收到错误消息,提示%Error:社区<Name>已存在,用于电缆调制解调器远程查询,配置新的社区字符串以进行SNMP管理。
电缆调制解调器远程查询[轮询间隔] [社区字符串]是[轮询间隔]定义执行查询的时间间隔的位置。例如,30表示每30秒执行一次查询。[社区字符串]定义社区字符串。
配置电缆远程查询时,所有社区字符串必须匹配:
在CM上配置的snmp-server community字符串
在CMTS上配置的snmp-server community字符串
cable modem remote-query [polling interval] [Community string]命令中配置的snmp社区字符串
Current configuration : 3473 bytes ! version 12.1 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname big-cmts ! ! cable modem remote-query 30 test !--- This configures the CMTS to perform the remote !--- query every 30 seconds with a community string of test. no cable qos permission create no cable qos permission update cable qos permission modems cable time-server ip subnet-zero no ip finger no ip domain-lookup ip dhcp relay information option no ip dhcp relay information check ! interface Ethernet2/0 ip address 10.200.68.3 255.255.255.0 ! interface Cable3/0 ip address 10.200.71.17 255.255.255.240 secondary ip address 10.200.71.1 255.255.255.240 no keepalive cable downstream annex B cable downstream modulation 64qam cable downstream interleave-depth 32 cable upstream 0 frequency 20000000 cable upstream 0 power-level 0 no cable upstream 0 shutdown cable dhcp-giaddr policy cable helper-address 10.200.68.200 ! ip classless ip route 0.0.0.0 0.0.0.0 10.200.68.1 no ip http server ! snmp-server community test RO !--- The community string has to match the one !--- set on the CM and the one configured above in the cable modem remote-query !--- command. snmp-server manager !--- Needed to configure the CMTS as SNMP manager !--- so that is is able to generate requests to the SNMP agents on the CM. line con 0 transport input none line aux 0 line vty 0 4 login ! end
对于CM,请通过添加全局命令snmp-server community test RO来配置出厂默认设置。
以下是收集的信息的输出:
big-cmts#show cable modem remote-query IP address MAC address S/N US DS Tx Time Micro (dB) Modem Ratio Power Power Offset Reflection State 10.200.71.8 0001.9659.47af 36.6 31.0 0.0 12352 17 online 10.200.71.4 0001.9659.47c7 36.6 37.0 0.0 12352 17 online 10.200.71.6 0001.9611.b9a3 36.6 37.0 0.0 12353 15 online 10.200.71.3 0001.9659.47a9 36.6 37.0 0.0 12351 16 online 10.200.71.2 0001.9659.47c1 0.0 0.0 0.0 0 0 online !--- This modem does not answer to the SNMP query.
如果调制解调器不响应SNMP查询,则需要一些调试来验证:
big-cmts#debug cable remote-query CMTS remote-query debugging is on *Sep 26 01:30:41.677: For IP address 10.200.71.2 !--- The IP address of the modem showing all 0s in the show cable modem remote-query !--- command output. *Sep 26 01:30:41.677: !--- SNMP proxy exec got event, but the queue is empty.
前面的消息表示已查询调制解调器,但未收到任何应答。要接收更多详细信息,请查看SNMP级别:
big-cmts#show snmp sessions Destination: 10.200.71.2.161, V1 community: test !--- "V1": SNMP version - "test": community string used to query the modem. Round-trip-times: 0/0/0 (min/max/last) packets output 2147 Gets, 0 GetNexts, 0 GetBulks, 0 Sets, 0 Informs !--- Number of SNMP GETS issued to the modem. 2146 Timeouts, 0 Drops !--- All the SNMP GETS timed out. packets input 0 Traps, 0 Informs, 0 Responses (0 errors)
以下是debug cable remote-query命令输出,用于调制解调器应答远程查询:
*Sep 26 01:30:49.709: For IP address 10.200.71.8 *Sep 26 01:30:49.713: docsIfSignalQualityEntry.5.3 = 366 *Sep 26 01:30:49.713: docsIfMibObjects.2.2.1.3.2 = 310 *Sep 26 01:30:49.717: docsIfDownstreamChannelEntry. 6.3 = 0 *Sep 26 01:30:49.717: docsIfUpstreamChannelEntry.6. 4 = 12352 *Sep 26 01:30:49.721: docsIfSignalQualityEntry.6.3 = 17
这是同一调制解调器的SNMP会话详细信息。请注意,Gets的数等于没有超时或丢弃的响应数:
Destination: 10.200.71.8.161, V1 community: test, Expires in 581 secs Round-trip-times: 1/1/1 (min/max/last) packets output 5421 Gets, 0 GetNexts, 0 GetBulks, 0 Sets, 0 Informs 0 Timeouts, 0 Drops packets input 0 Traps, 0 Informs, 5421 Responses (0 errors)
此输出显示为远程查询定义的社区字符串和CMTS snmp-server社区行中的不匹配:
big-cmts#sh snmp Chassis: 6888364 0 SNMP packets input 0 Bad SNMP version errors 30 Unknown community name !--- Community string mismatch. 0 Illegal operation for community name supplied 0 Encoding errors 0 Number of requested variables 0 Number of altered variables 0 Get-request PDUs 0 Get-next PDUs 0 Set-request PDUs 3944 SNMP packets output 0 Too big errors (Maximum packet size 1500) 0 No such name errors 0 Bad values errors 0 General errors 0 Response PDUs 0 Trap PDUs
最常见的问题是更改cable modem remote-query [polling interval] [Community string]命令参数会导致其失败。建议执行以下步骤:
删除没有电缆调制解调器远程查询的命令。
恢复命令。
另一个问题是更改使用snmp-server community <string>命令定义的社区字符串。建议执行以下步骤:
删除cable modem remote-query [polling interval] [Community string]命令。
更改社区字符串。
恢复cable modem remote-query [polling interval] [Community string]命令。