Cisco ASR 9000 IM and SYSDB Debugging: show im database - 夜莺博客

Cisco ASR 9000 IM and SYSDB Debugging: show im database

Normal show interface output tells you the interface is down; it rarely tells you why an IOS XR box that has the optics up, the config committed and the line card ready still refuses to bring a port into service. At that point you have to look one layer below the routing protocols, at the infrastructure managers that own interface state: the Interface Manager (IM), the Interface Manager Distribution Server (IMDS) and the System Database (SYSDB). The commands in this article come from Cisco's advanced system command reference and behave differently from ordinary show commands — they are support-oriented, so read the field tables before pasting them into a production maintenance window.

Why these commands exist

IOS XR is built as a distributed system: every process replicates its state to a database in shared memory, and clients subscribe to specific paths of that database. Interface state, encapsulation and MTU live in the IM database; IMDS distributes that state across nodes; SYSDB coordinates who is subscribed to what on each node. When these layers disagree, you get the classic symptoms:

  • an interface whose physical layer is up but whose operational state never comes up, with no protocol error to explain it;
  • MTU or encapsulation values that differ between the running configuration and the hardware;
  • an interface that flaps only when a specific line card is active;
  • config that commits cleanly but never reaches the data plane.

Layer 1: the IM database

RP/0/RSP0/CPU0:router# show im database interface GigabitEthernet0/0/0/0 verbose
RP/0/RSP0/CPU0:router# show im database summary
RP/0/RSP0/CPU0:router# show im database brief location 0/0/CPU0

The verbose form prints the state transitions counter, the MTU fields and the protocol capability list for that interface. Read it in this order:

Field What it tells you
Interface flags Whether the interface is CONFIG, VIS (visible to clients), DATA (in the data plane) or VIRTUAL
Encapsulation The encap actually registered in the IM database — compare with the committed config
State Transitions A high count on a "quiet" interface is direct evidence of a dampening loop
MTU actual/notified Mismatch here explains PMTUD and jumbo-frame failures even when config looks right
Views Which database views (OWN, L3P, G3P, LDP, GDP) hold the interface; a missing view means a client never registered it

Layer 2: IMDS distribution

RP/0/RSP0/CPU0:router# show imds interface brief

IMDS output lists handle, name, flags, state, MTU and encapsulation per interface as distributed across nodes. Use it when an interface is correct on the active RSP but wrong after a switchover: if the brief output differs between locations, the distribution layer is the fault domain, not the line card. A handle of 0x00000000 alongside a state of down is the signature of an interface that IMDS knows about but IM has not yet populated.

Layer 3: SYSDB subscribers

RP/0/RSP0/CPU0:router# show sysdb connections
RP/0/RSP0/CPU0:router# show sysdb connection path /net/interface
RP/0/RSP0/CPU0:router# show sysdb trace verification location 0/0/CPU0

show sysdb connections answers the question "who is listening to interface state?" The output shows the client connection ID, the process that owns it (sysmgr, subscriber names) and whether the connection is in a transaction or verification-suspended state. A client stuck in In trans: Y blocks commits for that path — which looks exactly like a hung commit with no error message. If a verification is suspended, run the trace verification command to see which verifier is holding the transaction; the usual culprits are third-party route processors or a stuck subscription from a disabled feature.

Memory thresholds that stop these layers from working

All three managers are in-memory. When a node runs out of memory, they degrade before any alarm fires. Cisco exposes configurable minor/severe/critical thresholds:

RP/0/RSP0/CPU0:router# configure
RP/0/RSP0/CPU0:router(config)# watchdog threshold memory location 0/RP0/CPU0 minor 30 severe 20 critical 10
RP/0/RSP0/CPU0:router(config)# commit

With a 2 GB node, a 20 percent minor threshold means an alert at roughly 410 MB free. Measuring before tuning matters: raising thresholds on a box that genuinely runs at 15 percent free turns a warning into permanent noise.

A practical troubleshooting sequence

  1. Confirm the physical and protocol layer with ordinary interface commands.
  2. Compare the committed configuration against the IM database encapsulation and MTU values.
  3. Run show imds interface brief and compare active versus standby RSP output.
  4. Check show sysdb connections for a stuck subscriber or an open transaction on /net/interface.
  5. Check node memory against the thresholds before assuming a software bug.
  6. Only then clear counters or bounce the interface — and document the state transitions counter value beforehand, since clearing it destroys your evidence.

Safety notes

These are support commands. Some of them (particularly the watchdog threshold write path and anything under the cisco-support task ID) require the correct task group and can change system behaviour. In most operational environments the read-only forms are safe; treat the write forms as change-controlled actions, and capture output to a file (show ... | file disk0:/im-$(date).txt is not supported, so use terminal logging or an out-of-band capture) before you change anything.

Interface flap suppression and damping

One field in the IM database deserves special attention: Dampening Config. IOS XR can suppress interface state changes so that a link oscillating due to a failing optic does not repeatedly tear down routing adjacencies across the network. When dampening is active, an interface that flaps repeatedly is held in a penalty state and stops advertising availability, which is far better for routing stability than repeated adjacency resets.

RP/0/RSP0/CPU0:router(config-if)# dampening
RP/0/RSP0/CPU0:router(config-if)# dampening 5 1000 2000 60

Read the four arguments as: half-life in minutes, reuse threshold, suppress threshold, and maximum suppress time in minutes. The tuning decision is a trade-off between responsiveness (a genuinely restored link comes back quickly) and stability (a marginal link does not drag the routing table with it). On a spine-facing port, err toward stability; on an edge port used for a single customer, favour fast reinstatement.

When you see a high State Transitions count in the IM database for an interface that is currently up, that count is your evidence file. Correlate it with the logging buffer and the optical levels before deciding whether the fault is the optic, the patch lead, or the peer's transmit side. Replacing hardware without that evidence usually results in the same flap recurring with a new SFP in place.

Collecting a usable evidence package for a TAC case

Infrastructure-layer problems are the hardest category to get a TAC engineer engaged on without evidence, because the symptoms are indirect. A file set collected in this order shortens resolution substantially:

  1. show tech-support — the baseline, and specifically the parts covering interfaces, IM, and platform.
  2. show im database verbose interface <name> for the affected interface.
  3. show imds interface brief from each node in the path.
  4. show sysdb connections and, if a transaction appears stuck, the trace verification output.
  5. show logging covering the window in which the problem started.
  6. Node memory state at the time of the failure, particularly if the IM layer was slow to converge.

Capture at the time of the fault, not afterwards. Several of these counters and states are transient: once the interface recovers, the IM database shows a healthy interface and the interesting fields are gone. Setting up continuous logging of the interface state transitions into a persistent location is the practical way to have evidence when the problem next occurs.

Finally, remember the level these commands operate at. If the routing protocol never received the interface event, the fault is in the IM/SYSDB layer. If the protocol received the event and behaved incorrectly, the infrastructure layer did its job and the investigation belongs in the protocol process. Confirming which of those two worlds you are in is the purpose of everything above.

Related ASR 9000 material

Start with the general ASR 9000 troubleshooting commands guide if you have not yet isolated the layer, then move to fabric troubleshooting with show commands for multi-line-card symptoms. Line card bring-up verification is covered in ASR 9000 line card bring-up verification.

原文链接:https://www.cisco.com/c/en/us/td/docs/routers/asr9000/software/adv-sys/command/reference/b-advsys-cr-asr9000/b-advsys-cr-asr9000_chapter_01.html