本帖最后由 guangxil 于 2019-4-30 23:45 编辑 1. 排查丢包前先看一下数据包是怎么穿越ASR1K路由器的,在后面的排查会有一个清晰的概念。
如图所示,ASR1K路由器并不是和ASR9K相同架构的路由器,ASR9K是分布式路由器,每块SIP卡都会有自己CEF表和IOS-XR进程,而ASR1K是集中式路由器,路由器所有的转发操作都会经过ESP引擎,ESP是ASR1K的转发引擎,设备的最大转发能力就取决与ESP的能力。
数据包正常穿越设备的流程是由SIP卡进入设备,通过SIP卡将数据传递给ESP引擎,由引擎查询数据包的出接口和出SIP卡,然后将数据包正确的转发出去。
ASR1K比较详细的路径如上图所示。
2. 大体了解了数据包转发流程,下面说一下可能发生丢包的地方。
Cisco ASR 1000系列路由器基于路由处理器(RP),嵌入式服务处理器(ESP),SPA接口处理器(SIP)和共享端口适配器(SPA)构建。对应的丢包可能发生在如下位置:SPA : 取决于接口类型SIP: IO控制处理器(IOCP)SPA聚合ASIC互连ASICESP: 思科QuantumFlow处理器(QFP)转发控制处理器(FECP)互连ASIC QFP子系统。QFP子系统包含以下组件:包处理器引擎(PPE)、缓冲,排队和调度(BQS)、输入数据包模块(IPM)、输出数据包模块(OPM)、全局数据包内存(GPM)。RP:Linux共享内存Punt接口(LSMPI)互连ASIC
3. 知道了数据包可能丢弃的地方怎么能快速找到呢?
首先一定先查看控制台日志,这里在很多时候会提示很多有用的信息。然后如果有Logging server的话,也一定要查看系统日志信息中发生故障一段时间前后的日志信息。在安装一下步骤依次查询:show platform - show platform命令显示RP,ESP,SPA和电源的状态。
命令列表用于收集计数器信息SPA:
show interfaces
show interfaces accounting
show interfaces statsSIP:
show platform hardware port plim statistics
show platform hardware subslot {slot / card} plim statistics
show platform hardware slot {slot} plim statistics
show platform hardware slot {0 | 1 | 2} plim status internal
show platform hardware slot {0 | 1 | 2} serdes statistics
ESP
show platform hardware slot {f0 | f1} serdes statistics
show platform hardware slot {f0 | f1} serdes statistics internal
show platform hardware qfp active bqs 0 ipm mapping
show platform hardware qfp active bqs 0 ipm statistics channel all
show platform hardware qfp active bqs 0 opm mapping
show platform hardware qfp active bqs 0 opm statistics channel all
show platform hardware qfp active statistics drop | exclude _0_
show platform hardware qfp active interface if-name statistics
show platform hardware qfp active infrastructure punt statistics type per-cause | e _0_
show platform hardware qfp active infrastructure punt statistics type punt-drop | e _0_
show platform hardware qfp active infrastructure punt statistics type inject-drop | e _0_
show platform hardware qfp active infrastructure punt statistics type global-drop | exclude _0_
show platform hardware qfp active infrastructure bqs queue output default all
show platform hardware qfp active infrastructure bqs queue output recycle all !--- if-name选项需要完整的interface-name
RP
show platform hardware slot {r0 | r1} serdes statistics
show platform software infrastructure lsmpi