10debug.docx

上传人:b****7 文档编号:23866976 上传时间:2023-05-21 格式:DOCX 页数:30 大小:29.75KB
下载 相关 举报
10debug.docx_第1页
第1页 / 共30页
10debug.docx_第2页
第2页 / 共30页
10debug.docx_第3页
第3页 / 共30页
10debug.docx_第4页
第4页 / 共30页
10debug.docx_第5页
第5页 / 共30页
点击查看更多>>
下载资源
资源描述

10debug.docx

《10debug.docx》由会员分享,可在线阅读,更多相关《10debug.docx(30页珍藏版)》请在冰豆网上搜索。

10debug.docx

10debug

Categorized|Cisco,New

Tags:

Cisco,debug

(NoRatingsYet)

10招教你用debug做思科路由交换机故障诊断

Postedon0208月2008

一般来说对路由器和交换机的故障诊断,只用一个“show”命令是远远不够的。

而debug命令往往能够帮助我们看清楚背后的故障原因。

这篇文章主要介绍一下如何利用debug来进行常规的故障诊断。

∙为什么debug命令如此有效?

CiscoIOS"show"命令能够告诉你一个有关你的路由交换设备的基本信息,但是它不能告诉你全部信息。

举个例子,show没有办法告诉你一条路由是什么时候加入或者从路由表中删除的,为什么ISDN线路故障了,一个数据报文是否真的从路由器发出去了,或者指出收到了哪种ICMP错误信息。

而上述的这些信息debug可以毫无保留的呈现给你。

debug除了可以提供比show更多的信息之外,它提供的的实时(或者叫做动态)信息也是show无法比拟的。

反观show无非是抓取特定时间片信息将结果反应到你的控制台上(可以称之为静态结果)。

动态信息对我们故障分析的帮助无疑更有帮助。

∙如何使用debug

我们举一个例子,通过debug模式来看RIP

Router#debugipRIP

RIPprotocoldebuggingison

我们可以用这个命令来看debugging是否启用:

Router#showdebug

RIPprotocoldebuggingison

任何类型的debug启用信息会被发送到Ciscologingsystem定义的地方,同时会被加入到路由器的bufferedlog或者syslogserver。

看一下各种输出类型:

Router#showlogging

Sysloglogging:

enabled(1messagesdropped,3messagesrate-limited,

0flushes,0overruns,xmldisabled,filteringdisabled)

Consolelogging:

leveldebugging,8messageslogged,xmldisabled,

filteringdisabled

Monitorlogging:

leveldebugging,0messageslogged,xmldisabled,

filteringdisabled

Bufferlogging:

levelwarnings,2messageslogged,xmldisabled,

filteringdisabled

LoggingExceptionsize(4096bytes)

Countandtimestamploggingmessages:

disabled

Traplogging:

levelinformational,12messagelineslogged

LogBuffer(51200bytes):

*Jun920:

56:

49.195:

%LINK-3-UPDOWN:

InterfaceFastEthernet0/0,changedstatetoup

*Jun920:

56:

49.231:

%LINK-3-UPDOWN:

InterfaceFastEthernet0/1,changedstatetoup

Router#

控制台会显示RIP更新的信息:

*Jun921:

13:

56.471:

RIP:

sendingv1updateto255.255.255.255viaFastEthernet0/0(1.1.1.1)

*Jun921:

13:

56.471:

RIP:

buildupdateentries-suppressingnullupdate

*Jun921:

14:

22.519:

RIP:

sendingv1updateto255.255.255.255viaFastEthernet0/0(1.1.1.1)

*Jun921:

14:

22.519:

RIP:

buildupdateentries-suppressingnullupdate

需要提醒的是,只能短时间内开启debug来获取一定时间的信息,因为debug会造成路遇器性能的下降。

可以使用undebugall来关闭debug。

∙三种使用debug时的错误

使用debug是一个危险的动作,甚至有经验的管理员使用它时也会失误。

第一常见的错误是当你离开生产环境的时候忘记关闭调试模式。

因为有时候我们集中精力解决问题,当我们解决问题之后,就有可能忘记没有关闭debug模式。

第二常见的错误是忽略同时发出的大量调试命令对路由器产生的影响。

记住,路由器的工作是转发数据包,而不是监穿行,寻找这稚嫩的朗读声,不一会晕头转向,随即问个老太太附近有房子出租么,热情的她告诉我她家就有待租的房子,却察过程和产生调试信息。

举例来说,在你的路由器存在数据包的某些问题,所以s使用debug调试IP数据包。

接着你决定要查看RIP协议方面的一些events。

现在,你有两个单独的调试报表正在处理和发送到控制台。

debug比比其他的网络传输具有更高的优先级,所以,不用说,这些debug可能危及您的路由器的性能。

第三常见的错误是在一个生产环境的路由器上使用debugall命令或debugippacketdetail。

这些命令都可以令负载过重的路由器崩溃。

幸运的是,在正式启动调试模式之前有一个“确定”这样提示的提示。

应该在开始调试命令之前现在某个测试路由器上跑一下这些debug命令。

未完待续,下一片文章介绍一下常用的debug故障诊断例子。

假设我们配置好的Cisco路由器能够象时钟一样稳定的工作或者说极少需要人为去做一些故障排除。

那么这样就可称之为理想状态。

但是,如果你的路由器出了故障,而你不得不快速准确地拿出一个解决方案。

这就是我们为什么要用学会用debug去做故障排除。

这篇文章的对象是没有使用过debug做Cisco故障排除。

但是你如果有这方面的经验,看我的介绍能不能给你一些提示去尝试之前没有用到过的方法。

在开始介绍CiscoIOSdebug10招之前这里有些提示和说明:

∙·       我介绍的方法是部分debug的用法,但并不能涵盖所有的用法。

事实上debug的用法有很多,这里不能一一列举。

ListingA

ListingA

Router#debug?

 aaa                      AAAAuthentication,AuthorizationandAccounting

 access-expression        Booleanaccessexpression

 adjacency                adjacency

 all                      Enablealldebugging

 alps                     ALPSdebuginformation

 apollo                   Apolloinformation

 apple                    Appletalkinformation

 arap                     Appletalkremoteaccess

 arp                      IPARPandHPProbetransactions

 aspp                     ASPPinformation

 async                    Asyncinterfaceinformation

 backhaul-session-manager BackhaulSMoptions

 backup                   Backupevents

 bsc                      BSCinformation

 bstun                    BSTUNinformation

 call                     Callinformation

 callback                 Callbackactivity

 cca                      CCAactivity

 ccfrf11                  CCFRF11information

 cch323                   CCH323information

 ccm-manager              CallManagerApplicationinformation

 ccsip                    CCSIPinformation

 ccswvoice                ccswvoiceinformation

 cdapi                    CDAPIinformation

 cdp                      CDPinformation

 ces-conn                 ConnectionManagerCESclientinfo

 chat                     Chatscriptsactivity

 clns                     CLNSinformation

 cls                      CLSinformation

 cns                      CNSdebugging

 compress                 COMPRESStraffic

 condition                Condition

 confmodem                Modemconfigurationdatabase

 conn                     ConnectionManagerinformation

 cops                     COPS

 cpp                      Cppinformation

 crypto                   Cryptographicsubsystem

 ctunnel                  GenericCTunnelInterface

 custom-queue             Customoutputqueuing

 decnet                   DECnetinformation

 dhcp                     DHCPclientactivity

 dialer                   Dialondemand

 dlsw                     DataLinkSwitching(DLSw)events

 dnsix                    Dnsixinformation

 domain                   DomainNameSystem

 drip                     DRiPdebuginformation

 dspu                     DSPUinformation

 dxi                      atm-dxiinformation

 eigrp                    EIGRPProtocolinformation

 entry                    Incomingqueueentries

 ethernet-interface       Ethernetnetworkinterfaceevents

 fastethernet             FastEthernetinterfaceinformation

 fax                      Fax

 frame-relay              FrameRelay

 fras                     FRASdebug

 fras-host                FRASHostDebug

 gssapi                   GSSAPIdebugs

 h225                     H.225LibraryDebugging

 h245                     H.245LibraryDebugging

 interface                interface

 ip                       IPinformation

 ipx                      Novell/IPXinformation

 isis                     IS-ISInformation

 kerberos                 KERBEROSauthenticationandauthorization

 lane                     LANemulation

 lapb                     LAPBprotocoltransactions

 lat                      LATinformation

 ldap                     LDAPdebugcommands

 lex                      LANExtenderprotocol

 list                     Setinterfaceand/oraccesslistforthenextdebug

                           command

 llc2                     LLC2typeIIinformation

 lnm                      LanNetworkManagerinformation

 lnx                      genericqllc/llc2conversionactivity

 local-ack                LocalACKnowledgementinformation

 mgcp                     MediaGatewayControlProtocol

 modem                    Modemcontrol/processactivation

 mop                      DECnetMOPserverevents

 mpls                     MPLSdebug

 mpoa                     MPOAdebugoptions

 nbf                      NetBIOSinformation

 ncia                     NativeClientInterfaceArchitecture(NCIA)events

 netbios-name-cache       NetBIOSnamecachetracing

 nhrp                     NHRPprotocol

 ntp                      NTPinformation

 nvram                    DebugNVRAMbehavior

 packet                   Logunknownpackets

 pad                      X25PADprotocol

 ppp                      PPP(PointtoPointProtocol)information

 printer                  LPDprinterprotocol

 priority                 Priorityoutputqueuing

 probe                    HPProbeproxyrequests

 qdm                      QoSDeviceManager

 qllc                     qllcdebuginformation

 radius                   RADIUSprotocol

 ras                      H.323RASlibrary

 rif                      RIFcachetransactions

 rscmon                   ResourceMonitor

 rtpspi                   RTPServiceProviderInterface

 rtr                      RTRMonitorinformation

 rudpv1                   RUDP,V1information

 sdlc                     SDLCinformation

 sdllc                    SDLLCmediatranslation

 serial                   Serialinterfaceinformation

 sgbp                     SGBPdebugging

 sgcp                     SimpleGatewayControlProtocol

 smf                      SoftwareMACfilter

 smrp                     SMRPinformation

 sna                      SNAInformation

 snapshot                 Snapshotactivity

 snmp                     SNMPinformation

 source                   Sourcebridginginformation

 spanning-tree            Spanningtreedebugging

 srcp                     SimpleResourceCoordinationProtocol

 ssl                      SSLDebugcommand

 standby                  Hotstandbyprotocol

 

 stun                     STUNinformation

 tacacs                   TACACSauthenticationandauthorization

 tag-switching            TagSwitching(obsoleteuse"debugmpls...")

 tarp                     TARPinformation

 tbridge                  Transparentbridging

 tccs                     TransparentCCSinformation

 telnet                   Incomingtelnetconnections

 template                 Templateactivity

 tftp                     TFTPdebugging

 tgrm                     TrunkGroupResourceManagerinfo

 token                    TokenRinginformation

 translate                Protocoltranslationevents

 translation              translationruleinformation

 tsp                      TelephonyServiceinformation

 tunnel                   GenericTunnelInterface

 udptn                    UDPtnasyncdatatransport

 v120                     V120information

 vines                    VINESinformation

 vlan                     vLANinformation

 voice                    VOICEinformation

 voip                     VOIPinformation

 vpdn                     

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 人文社科 > 哲学历史

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1