{"id":894,"date":"2008-10-07T22:00:00","date_gmt":"2008-10-07T14:00:00","guid":{"rendered":"http:\/\/note.systw.net\/note\/?p=894"},"modified":"2023-11-07T22:12:56","modified_gmt":"2023-11-07T14:12:56","slug":"debugshowtroubleshooting","status":"publish","type":"post","link":"https:\/\/systw.net\/note\/archives\/894","title":{"rendered":"Debug,Show,Troubleshooting"},"content":{"rendered":"\n<p>debug\u6307\u4ee4<br>\u986f\u793a\u52d5\u614b\u8cc7\u6599\u8207\u4e8b\u4ef6,\u63d0\u4f9b\u76ee\u524d\u6240\u767c\u751f\u7684\u8cc7\u8a0a,\u53ef\u5354\u52a9\u5340\u9694\u5354\u5b9a\u53ca\u8a2d\u5b9a\u65b9\u9762\u7684\u554f\u984c<br>\u82e5\u4f7f\u7528telnet,\u9700\u57f7\u884cterminal monitor\u6307\u4ee4,\u624d\u53ef\u770b\u5230debug\u7684\u8f38\u51fa<br>ps:\u9700\u5728privileged mode\u4e0b\u624d\u53ef\u57f7\u884cdebug\u6307\u4ee4ps<br>#debug ?<br>dialer\u3000\u3000 Dial on Demand<br>isdn&nbsp;<br>ppp\u3000\u3000 PPP (Point to Point Protocol) information<br>ip\u3000\u3000 IP information<br>all\u3000\u3000 Enable all debugging&nbsp;<\/p>\n\n\n\n<p>\u986f\u793aacl\u6307\u793a\u7684\u5c01\u5305<br><strong>#debug ip packet &lt; acl&gt;<\/strong><br>ex:\u986f\u793a10.10.10.10\u5230172.16.1.1\u7684\u5c01\u5305<br>(config)#access-list 101 permit tcp host 10.10.10.10 host 172.16.1.1&nbsp;<br>#debug ip packet 101&nbsp;&nbsp;<\/p>\n\n\n\n<p><strong>#debug serial interface<\/strong><br>\u78ba\u8a8d\u662f\u5426hdlc keepalive\u5c01\u5305\u6301\u7e8c\u589e\u52a0,\u82e5\u7121\u53ef\u80fd\u662f\u4ecb\u9762\u5361\u4e0a\u6216\u7db2\u8def\u5167\u90e8\u7684\u6642\u9593\u6709\u554f\u984c<\/p>\n\n\n\n<p><strong>#debug arp<\/strong><br>\u986f\u793a\u662f\u5426\u8a72router\u6b63\u5728\u767c\u9001\u6216\u5b78\u7fd2\u5728\u53e6\u4e00\u908awan\u4e2d\u7684\u8def\u7531\u5668\u8cc7\u8a0a<br>\u7576\u5728TCP\/IP\u7db2\u8def\u4e0a\u6709\u4e00\u4e9b\u7bc0\u9ede\u6709\u56de\u61c9\uff0c\u4f46\u662f\u5176\u4ed6\u7684\u7bc0\u9ede\u537b\u6c92\u56de\u61c9\u6642\uff0c\u53ef\u4ee5\u4f7f\u7528\u6b64\u6307\u4ee4<\/p>\n\n\n\n<p>\u95dc\u9589\u5075\u932f\u6a21\u5f0f<br><strong>#undebug all<\/strong><br>\u6216<br><strong>#no debug all<\/strong><\/p>\n\n\n\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;<\/p>\n\n\n\n<p>\u5c07\u4ecb\u9762\u7d71\u8a08\u8cc7\u8a0a\u6b780<br><strong>#clear counters&nbsp;<\/strong><\/p>\n\n\n\n<p>\u986f\u793a\u4ecb\u9762\u72c0\u614b<br><strong>&gt;show interfaces [interface]<\/strong><br>\u6aa2\u67e5\u4ecb\u9762\u7684\u7d71\u8a08\u8cc7\u8a0a\u53ca\u72c0\u614b<br>ps:<br>\u4ee5serial0\u4ecb\u9762\u70ba\u4f8b,\u756b\u9762\u5927\u81f4\u5982\u4e0b<br>serial 0 is up, line protocol is up \/\/\u8868\u793a\u4ecb\u9762layer1,2\u6b63\u5e38<br>Hardware is HD64570&nbsp;\/\/\u5047\u5982\u662fethernet\u4ecb\u9762\u9084\u6703\u591amac address<br>Internet address is 192.168.1.1\/24 \/\/\u76ee\u524dip\/mask<br>MTU 1500 bytes,&nbsp;BW 1544 Kbit, DLY 1000 usec, rely 255\/255, load 1\/255\u3000\/\/\u6700\u5927\u5c01\u5305size\u70ba1500bytes<br>Encapsulation HDLC, loopback not set, keepalive set (10 sec)&nbsp;\/\/hdlc\u5c01\u88dd,keepalive10\u79d2,\u53e6\u4e00\u908a\u4ecb\u9762\u9700\u4e00\u6a23\u624d\u53ef\u9023\u901a<br>Last input 00:00:00, output 00:00:00, output hang never<br>Last clearing of &#8220;show interface&#8221; counters never<br>Queueing strategy: fifo<br>Output queue 0\/40, 0 drops; input queue 0\/75, 0 drops \/\/\u53ef\u6aa2\u67e5\u662f\u5426\u63a5\u6536\u6216\u9001\u51fa\u7684\u8cc7\u8a0a\u662f\u5426\u56e0\u904e\u5feb\u800c\u4e1f\u68c4&nbsp;<br>5 minute input rate 1000 bits\/sec, 2 packets\/sec<br>5 minute output rate 1000 bits\/sec, 2 packets\/sec<br>\u30000 packets input, 0 bytes, 0 no buffer<br>\u3000Received 0 broadcasts, 0 runts,&nbsp;0 giants, 0 throttles<br>\u30000 input errors,&nbsp;0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort \/\/0\u8868\u793a\u8a0a\u865f\u6b63\u5e38,\u975e0\u53ef\u80fd\u70baCRC,duplex,\u6216\u7dda\u8def\u554f\u984c &nbsp;&nbsp;<br>\u30000 input packets with dribble condition detected<br>\u30000 packets output, 0 bytes, 0 underruns<br>\u30000 output errors,&nbsp;0 collisions, 0 interface resets \/\/\u6aa2\u67e5\u662f\u5426\u8f38\u51fa\u932f\u8aa4,\u82e5\u975e0\u53ef\u80fd\u70baduplx\u554f\u984c &nbsp;<br>&nbsp;\u30000 babbles, 0 late collision, 0 deferred<br>\u30000 lost carrier, 0 no carrier<br>\u30000 output buffer failures, 0 output buffers swapped out<br>ps:<br>\u4ee5ether\u4ecb\u9762\u70ba\u4f8b\u756b\u9762\u5927\u81f4\u5982\u4e0b\u3000<br>GigabitEthernet8\/13 is up, line protocol is up (connected)<br>Hardware is C6k 1000Mb 802.3, address is 0018.ba3f.7c7c (bia 0018.ba3f.7c7c)<br>MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,<br>reliability 255\/255, txload 1\/255, rxload 1\/255<br>Encapsulation ARPA, loopback not set<br>Keepalive set (10 sec)<br>Full-duplex, 1000Mb\/s<br>input flow-control is off, output flow-control is off<br>Clock mode is auto<br>ARP type: ARPA, ARP Timeout 04:00:00<br>Last input never, output 00:00:55, output hang never<br>Last clearing of &#8220;show interface&#8221; counters never<br>Input queue: 0\/2000\/0\/0 (size\/max\/drops\/flushes); Total output drops: 0<br>Queueing strategy: fifo<br>Output queue: 0\/40 (size\/max)<br>5 minute input rate 0 bits\/sec, 0 packets\/sec<br>5 minute output rate 0 bits\/sec, 0 packets\/sec<br>800 packets input, 260270 bytes, 0 no buffer<br>Received 76 broadcasts (58 multicasts)<br>\u30000 runts,&nbsp;0 giants, 0 throttles<br>\u30000 input errors, 0 CRC, 3 frame, 0 overrun, 0 ignored<br>\u30000 watchdog, 0 multicast, 0 pause input<br>\u30000 input packets with dribble condition detected<br>\u300068895 packets output, 6044289 bytes, 0 underruns<br>\u30000 output errors,&nbsp;0 collisions, 3 interface resets<br>\u30000 babbles, 0 late collision, 0 deferred<br>\u30000 lost carrier, 0 no carrier, 0 PAUSE output<br>\u30000 output buffer failures, 0 output buffers swapped out&nbsp;<br>ps:<br>runts(packets that were truncated before they were fully received)<br><\/p>\n\n\n\n<p>interface 0 is up\u7684\u610f\u601d<br>\u3000\u786c\u9ad4\u72c0\u614b,\u5305\u62ec\u7e9c\u7dda,\u9023\u63a5\u5668,&#8230;\u7b49,layer1\u76f8\u95dc\u6b63\u5e38<br>\u3000\u4e5f\u53ef\u53cd\u6620\u51fa\u6b64\u4ecb\u9762\u662f\u5426\u6536\u5230\u4f86\u81ea\u53e6\u4e00\u7aefDCE\u7684carrier detect(\u6234\u6ce2\u5075\u6e2c)\u8a0a\u865f<br>interface is down\u7684\u53ef\u80fd\u539f\u56e0<br>\u3000\u4ecb\u9762\u6216\u7e9c\u7dda\u7b49layer1\u5be6\u9ad4\u5c64\u554f\u984c<br>interface is administratively down\u7684\u53ef\u80fd\u539f\u56e0<br>\u30001\u53ef\u80fd\u51fa\u73feback-to-back connection(\u80cc\u5c0d\u80cc\u9023\u63a5)\u554f\u984c<br>\u3000\u3000\u5373\u67d0\u4e00\u7aef\u662f\u7ba1\u7406\u4e0a\u7684\u95dc\u9589,\u4e5f\u5c31\u662f\u7ba1\u7406\u8005\u624b\u52d5\u95dc\u9589,\u56e0\u6b64\u53e6\u4e00\u7aef\u5c31\u6c92\u4f5c\u7528<br>\u3000\u3000\u82e5\u57f7\u884cshutdown\u547d\u4ee4\u6703\u51fa\u73fe,\u53ef\u7528no shutdown\u958b\u555f\u4ecb\u9762<br>\u30002\u4e5f\u53ef\u80fd\u662f\u5c1a\u672a\u63a5\u7dda,\u4f46\u6a5f\u7387\u5f88\u4f4e<\/p>\n\n\n\n<p>protocol is up\u7684\u610f\u601d<br>\u3000layer2\u904b\u4f5c\u6b63\u5e38<br>\u3000\u63a7\u5236\u9023\u7dda\u7684cisco ios\u8a8d\u70ba\u4ecb\u9762\u53ef\u7528,\u662f\u5426\u6210\u529f\u7684\u6536\u5230keepalives(\u5b58\u6d3b)\u8a0a\u606f\u4f86\u6c7a\u5b9a\u7684<br>protocol is down\u7684\u53ef\u80fd\u539f\u56e0<br>\u3000\u5be6\u9ad4\u4ecb\u9762\u7121\u904b\u4f5c,ex:serial 0 is down<br>\u3000\u5be6\u9ad4\u4ecb\u9762\u7ba1\u7406\u6027\u95dc\u9589,ex:serial 0 is administratively down<br>\u3000\u9032\u5165errdisable\u72c0\u614b,\u4f7f\u7528\u4ecb\u9762\u88ab\u95dc\u9589\u3000<br>\u3000\u6c92\u6709keepalives(\u5b58\u6d3b\u8a0a\u865f),\u82e5\u4ecb\u9762\u6c92\u6709\u9023\u7e8c\u6536\u52303\u500bkeepalives,\u5247protocol down<br>\u3000\u6c92\u6709clock rate(\u6642\u8108),ex:dce\u672a\u8a2d\u5b9aclock rate<br>\u3000encapsulation(\u5c01\u88dd)\u578b\u614b\u4e0d\u7b26,ex:\u4e00\u7aef\u7528hdlc,\u53e6\u4e00\u7aef\u7528ppp<br>\u3000authentication(\u9a57\u8b49)\u5931\u6557,ex:ppp\u8a8d\u8b49\u5931\u6557<\/p>\n\n\n\n<p>\u986f\u793a\u4ecb\u9762\u9032\u51faframe\u7684\u7d71\u8a08<br><strong># show interfaces &lt; interface&gt; counters<\/strong><br>\u756b\u9762\u5927\u81f4\u5982\u4e0b<br>Port InOctets InUcastPkts InMcastPkts InBcastPkts<br>Gi0\/9 31265148 20003 3179 1<br>Port OutOctets OutUcastPkts OutMcastPkts OutBcastPkts<br>Gi0\/9 18744149 9126 96 6 &nbsp;<\/p>\n\n\n\n<p>\u986f\u793a\u4ecb\u9762\u4e0a\u7684\u932f\u8aa4<br><strong># show interfaces &lt; interface&gt; counters errors<\/strong><br>\u756b\u9762\u5927\u81f4\u5982\u4e0b<br>Port Align-Err FCS-Err Xmit-Err Rcv-Err UnderSize<br>Gi0\/9 0 0 0 0 0<br>Port Single-Col Multi-Col Late-Col Excess-Col Carri-Sen Runts Giants<br>Gi0\/9 5603 0 5373 0 0 0 0<br>\u5404counter\u8aaa\u660e<br>\u3000Align-Err:CRC\u767c\u73fe\u932f\u8aa4,\u901a\u5e38\u662flayer1\u6709\u554f\u984c\u3000<br>\u3000Fcs-Err:\u7121\u6548\u7684checksum,\u901a\u5e38\u662flayer1\u554f\u984c&nbsp;<br>\u3000Xmit-Err:&nbsp;\u7de9\u885d\u5340\u767c\u751foverflow,\u901a\u5e38\u662f\u9032\u5165\u548c\u96e2\u958b\u4ecb\u9762\u7684\u901f\u5ea6\u4e0d\u4e00\u81f4\u554f\u984c<br>\u3000Rcv-Err:\u63a5\u6536\u7de9\u885d\u5340\u767c\u751foverflow,\u901a\u5e38\u662f\u5168\u96d9\u5de5\u7aef\u7684duplex mismatch\u554f\u984c<br>\u3000UnderSize:frame\u904e\u5c0f<br>\u3000Single-Col:\u8f49\u9001frame\u524d\u767c\u751f\u55ae\u4e00\u78b0\u649e,\u901a\u5e38\u662fduplex mismatch\u6216\u983b\u5bec\u904e\u5ea6\u4f7f\u7528\u554f\u984c<br>\u3000Multi-Col:\u8f49\u9001frame\u524d\u767c\u751f\u591a\u500b\u78b0\u649e,\u53ef\u80fd\u539f\u56e0\u548csingle-Col\u76f8\u540c<br>\u3000Late-Col:\u8f49\u9001frame\u5f8c\u767c\u751f\u5ef6\u9072\u78b0\u649e,\u53ef\u80fd\u662f\u7dda\u8def\u592a\u9577\u6216\u534a\u96d9\u5de5\u7aef\u7684duplex mismatch\u554f\u984c<br>\u3000Excess-Col:\u7d93\u6b7716\u6b21\u9023\u7e8c\u78b0\u649e,\u53ef\u80fd\u539f\u56e0\u548csingle-col\u76f8\u540c,\u4e5f\u6709\u53ef\u80fd\u662f\u540c\u5340\u6bb5\u8a2d\u5099\u592a\u591a<br>\u3000Carri-Sen:\u8f09\u6ce2\u611f\u61c9\u7a0b\u5e8f,\u5728\u534a\u96d9\u5de5\u4e0a\u50b3\u8cc7\u6599\u6642\u8a72counters\u6703\u589e\u52a0<br>\u3000Runts:CRC\u58de\u6389\u7684\u5c0f\u578bFRAME(64)<br>\u3000Giants:CRC\u58de\u6389\u7684\u5de8\u5927\u5c01\u5305(&gt;1518)<\/p>\n\n\n\n<p>\u986f\u793a\u4ecb\u9762\u72c0\u614b<br><strong>#show interfaces status<\/strong><br>Port Name&nbsp;Status&nbsp;Vlan Duplex&nbsp;Speed&nbsp;Type<br>Gi0\/1 connected trunk full 1000 1000BaseSX<br>Gi0\/2 connected 252 full 1000 1000BaseSX<br>Gi0\/3 disabled 1 full 1000 1000BaseSX<br>Gi0\/4 disabled 1 full 1000 No Transceiver<br>Gi0\/5 disabled 1 full 1000 No Transceiver<br>Gi0\/6 connected 10 a-half a-10 10\/100\/1000BaseT<br>Gi0\/7 connected trunk a-full a-100 10\/100\/1000BaseT<br>Gi0\/8 connected trunk a-full a-100 10\/100\/1000BaseT<br>Gi0\/9 connected 10 a-full a-1000 10\/100\/1000BaseT<br>Gi0\/10 notconnect 1 full auto 10\/100\/1000BaseT<br>[omit]<\/p>\n\n\n\n<p>ps:<br>#show interfaces status ?<br>\u3000err-disabled Show interface error disabled state<br>\u3000inactive Show interface inactive state<br>\u3000module Limit display to interfaces on module<\/p>\n\n\n\n<p>&#8230;&#8230;<\/p>\n\n\n\n<p>\u986f\u793a\u4ecb\u9762\u7684ip\u7684\u72c0\u614b<br><strong>&gt;show ip interface [brief]<\/strong><br>ps:<br>\u756b\u9762\u5927\u81f4\u5982\u4e0b<br>Serial1 is administratively down, line protocol is down \/\/serial1\u4ecb\u9762\u70bashutdown\u72c0\u614b<br>\u3000Internet protocol processing disabled<br>Ethernet0 is up, line protocol is up \/\/eth0\u4ecb\u9762layer1,2\u6b63\u5e38<br>\u3000Internet address is 192.168.2.1\/24 \/\/ip\u4f4d\u7f6e\u70ba192.168.2.1\/24<br>\u3000Broadcast address is 255.255.255.0<br>\u3000MTU 1500 bytes,<br>\u3000Helper address is not set<br>\u3000Directed broadcast forwarding is disabled<br>\u3000Outgoing access list is not set \/\/\u754c\u9762\u76ee\u524d\u7121\u5b58\u53d6\u6e05\u55ae\u7b49\u8cc7\u8a0a<br>\u3000Inbound access list is not set<br>\u3000Proxy ARP Is Enabled<br>\u3000Security Level Is Default<br>\u3000Split horizon Is Enabled<br>&#8230;\u4ee5\u4e0b\u7701<br>ps:<br>[brief]\u5217\u51fa\u7cbe\u7c21\u8cc7\u8a0a,\u756b\u9762\u5927\u81f4\u5982\u4e0b<br>Interface IP-Address OK? Method Status Protocol<br>Serial0 192.168.1.1 YES unset down down<br>Serial1 unassigned YES unset administratively down down<br>Ethernet0 192.168.2.1 YES unset up up<br>Bri0 unassigned YES unset administratively down down<br>Bri0:1 unassigned YES unset administratively down down<br>Bri0:2 unassigned YES unset administratively down down<\/p>\n\n\n\n<p>\u986f\u793a\u5be6\u9ad4\u754c\u9762\u76f8\u95dc\u8cc7\u8a0a<br><strong>&gt;show controllers [int]<\/strong><br>\u7e9c\u7dda\u7a2e\u985e,\u5be6\u969b\u4ecb\u9762\u76f8\u95dc\u8cc7\u8a0a,\u63a7\u5236\u5361\u6676\u7247\u72c0\u614b,&#8230;\u7b49\u8a73\u7d30\u8cc7\u8a0a<br>ps:<br>\u756b\u9762\u5927\u81f4\u5982\u4e0b<br>interface serial0<br>HD unit 0, idb = 0x1AE828, driver structure at 0x1B4BA0<br>buffer size 1524 HD unit 0,V.35 DTE cable \/\/dte\u4ecb\u9762,\u4f7f\u7528v.35\u4ecb\u9762<br>cpb = 0x7, eda = 0x58DC, cda = 0x58F0<br>RX ring with 16 entries at 0x4075800<br>&#8230;\u7701\u7565<br>interface FastEthernet0\/0<br>Hardware is PQUICC MPC860T ADDR: 815A3338, FASTSEND: 80011698<br>DIST ROUTE ENABLED: 0<br>Route Cache Flag: 1<br>&#8230;\u7701\u7565<\/p>\n\n\n\n<p>\u6aa2\u8996\u5354\u5b9a\u72c0\u614b<br><strong>#show protocol<\/strong><br>\u756b\u9762\u5927\u81f4\u5982\u4e0b<br>Global values:<br>\u3000Internet Protocol routing is enabled<br>Serial0 is down, line protocol is down \/\/serial0\u4ecb\u9762layer1,2\u555f\u52d5\u5f8c\u7121\u4f5c\u7528<br>\u3000Internet address is 192.168.1.1\/24 \/\/ip\u4f4d\u7f6e\u70ba192.168.1.1\/24<br>Serial1 is administratively down, line protocol is down \/\/serial1\u4ecb\u9762\u70bashutdown\u72c0\u614b<br>Ethernet0 is up, line protocol is up \/\/eth0\u4ecb\u9762layer1,2\u6b63\u5e38<br>\u3000Internet address is 192.168.2.1\/24 \/\/ip\u4f4d\u7f6e\u70ba192.168.2.1\/24<br>Bri0 is administratively down, line protocol is down<br>Bri0:1 is administratively down, line protocol is down<br>Bri0:2 is administratively down, line protocol is down<\/p>\n\n\n\n<p>\u986f\u793a\u5404process\u7684\u4f7f\u7528\u7387&nbsp;<br><strong>#show processes cpu<\/strong><br>CPU utilization for five seconds: 5%\/3%; one minute: 1%; five minutes: 1%<br>PID Runtime(ms) Invoked uSecs 5Sec 1Min 5Min TTY Process<br>1 4 11 363 0.00% 0.00% 0.00% 0 Chunk Manager<br>2 4 13904 0 0.00% 0.00% 0.00% 0 Load Meter<br>4 0 580 0 0.00% 0.00% 0.00% 0 DHCPD Timer<br>5 0 1 0 0.00% 0.00% 0.00% 0 PF Redun ICC Req<br>6 138700 11705 11849 0.00% 0.16% 0.17% 0 Check heaps<br>7 0 1 0 0.00% 0.00% 0.00% 0 Pool Manager<br>8 0 2 0 0.00% 0.00% 0.00% 0 Timers<br>9 49448 410365 120 0.07% 0.03% 0.05% 0 ARP Input<br>10 0 1 0 0.00% 0.00% 0.00% 0 AAA_SERVER_DEADT<br>11 0 2 0 0.00% 0.00% 0.00% 0 AAA high-capacit<br>12 72 90 800 0.00% 0.00% 0.00% 0 Entity MIB API<br>13 0 1 0 0.00% 0.00% 0.00% 0 IFS Agent Manage<br>14 0 1160 0 0.00% 0.00% 0.00% 0 IPC Dynamic Cach<br>15 8 50 160 0.00% 0.00% 0.00% 0 PF_Split Sync Pr<br>16 4 69517 0 0.00% 0.00% 0.00% 0 IPC Periodic Tim<br>[omit&#8230;]&nbsp;<br>ps:\u6b64\u8a0a\u606f\u8aaa\u660ecpu\u8ca0\u8f09\u70ba5%,\u5176\u4e2d3%\u70ba\u4e2d\u65b7\u8655\u7406,\u4e2d\u9593\u7684\u5dee\u984d2%\u70bacontrol panel\u8ca0\u8f09<br>ps:\u4e2d\u65b7\u8655\u7406\u901a\u5e38\u4e0d\u6703\u8d85\u904e5%\u3000<br>ps:cpu\u4f7f\u7528\u7387\u904e\u9ad8,\u53ef\u80fd\u539f\u56e0\u70ba\u4f7f\u7528debug\u547d\u4ee4\u6216snmp,\u6216stp\u6545\u969c\u9020\u6210<\/p>\n\n\n\n<p>\u986f\u793acpu\u548cI\/O,MEMORY\u7684\u6458\u8981&nbsp;<br><strong>#show memory<\/strong><br>Head Total(b) Used(b) Free(b) Lowest(b) Largest(b)<br>Processor 44AE5D50 391193264 70233000 320960264 319948768 247065784<br>I\/O 8000000 67108864 10418792 56690072 56614112 56614072&nbsp;<br>[omit&#8230;]<\/p>\n\n\n\n<p>ps<br>#show ?<br>ip\u3000\u3000 IP information<br>arp\u3000\u3000 ARP table<br>interfaces\u3000\u3000 Interface status and configuration<br>controllers\u3000\u3000 Interface controller status<br>protocols\u3000\u3000 Active network routing protocols<br>&#8230;\u7701\u7565<\/p>\n\n\n\n<p>ps<br>#show ip ?<br>ospf\u3000\u3000 OSPF information<br>dhcp\u3000\u3000 Show items in the DHCP database<br>eigrp\u3000\u3000 IP-EIGRP show commands<br>route\u3000\u3000 IP routing table<br>arp\u3000\u3000 IP ARP Table<br>protocols\u3000\u3000 IP routing protocol process parameters<br>interface\u3000\u3000 IP interface status and configuration<br>nat\u3000\u3000 IP NAT information<br>bgp\u3000\u3000 BGP information<\/p>\n\n\n\n<p>&#8230;&#8230;&#8230;&#8230;.&nbsp;<\/p>\n\n\n\n<p><strong>errdisable detect<\/strong><br>switch\u81ea\u52d5\u6aa2\u6e2c\u529f\u80fd<br>switch\u6703\u5075\u6e2c\u6bcf\u500bport,\u82e5\u6709\u7570\u5e38\u5247\u5c07port\u8a2d\u70baerrdisable\u6a21\u5f0f\u4e26\u95dc\u9589\u4ecb\u9762<br>\u82e5\u767c\u73feerrdisable\u7684\u4ecb\u9762,1\u78ba\u8a8d\u554f\u984c\u9ede,2\u900f\u904e\u6307\u4ee4\u89e3\u9664errdisable\u6a21\u5f0f &nbsp;<\/p>\n\n\n\n<p>\u8a2d\u5b9a\u90a3\u4e9berrdisable detect\u529f\u80fd\u8981\u88ab\u555f\u7528<br><strong>(config)# [no] errdisable detect cause &lt; all | cause-name &gt;<\/strong><br>\u9810\u8a2d\u70ba\u5168\u90e8\u555f\u7528<br>cause-name\u6709\u4ee5\u4e0b\u53ef\u9078,&nbsp;<br><strong>all<\/strong>:Detects every possible cause<br><strong>arp-inspection<\/strong>:Detects errors with dynamic ARP inspection<br><strong>bpduguard<\/strong>:Detects when a spanning-tree BPDU is received on a port configured for STP PortFast<br><strong>channel-misconfig<\/strong>:Detects an error with an EtherChannel bundle<br><strong>dhcp-rate-limit<\/strong>:Detects an error with DHCP snooping<br><strong>dtp-flap<\/strong>:Detects when trunking encapsulation is changing from one type to another<br><strong>gbic-invalid<\/strong>:Detects the presence of an invalid GBIC or SFP module<br><strong>ilpower<\/strong>:Detects an error with offering inline power<br><strong>l2ptguard<\/strong>:Detects an error with Layer 2 Protocol Tunneling<br><strong>link-flap<\/strong>:Detects when the port link state is &#8220;flapping&#8221; between the up and down states<br><strong>loopback<\/strong>:Detects when an interface has been looped back<br><strong>pagp-flap<\/strong>:Detects when an EtherChannel bundle&#8217;s ports no longer have consistent configurations<br><strong>psecure-violation<\/strong>:Detects conditions that trigger port security configured on a port<br><strong>rootguard<\/strong>:Detects when an STP BPDU is received from the root bridge on an unexpected port<br><strong>security-violation<\/strong>:Detects errors related to port security<br><strong>storm-control<\/strong>:Detects when a storm control threshold has been exceeded on a port<br><strong>udld<\/strong>:Detects when a link is seen to be unidirectional (data passing in only one direction)<br><strong>unicast-flood<\/strong>:Detects conditions that trigger unicast flood blocking on a port<br><strong>vmps<\/strong>:Detects errors when assigning a port to a dynamic VLAN through VMPS<\/p>\n\n\n\n<p>\u5728errdisable\u6a21\u5f0f\u4e0b\u6703\u5c07\u4ecb\u9762disable,\u6709\u4ee5\u4e0b\u5169\u65b9\u6cd5\u53ef\u89e3\u9664<\/p>\n\n\n\n<p>1.\u8a2d\u5b9a\u81ea\u52d5\u89e3\u9664errdisable\u6a21\u5f0f<br><strong>(config)# errdisable recovery cause [cause-name]&nbsp;<\/strong><br>\u9810\u8a2d300\u79d2\u5f8c\u81ea\u52d5\u89e3\u9664<br>ps:<br>\u8a2d\u5b9a\u81ea\u52d5\u89e3\u9664errdisable\u6a21\u5f0f\u7684\u8a08\u6642\u5668<br><strong>(config)# errdisable recovery interval&nbsp;<\/strong><br>30-86400seconds(24hours)<br>ex:<br>\u6307\u5b9a\u767c\u73fepsecurity-violation\u5f8c,\u65bc1\u5c0f\u6642\u81ea\u52d5\u89e3\u9664errdisable\u6a21\u5f0f<br>(config)# errdisable recovery cause psecurity-violation<br>(config)# errdisable recovery interval 3600<\/p>\n\n\n\n<p>2.\u624b\u52d5\u95dc\u9589\u4ecb\u9762\u5728\u555f\u7528\u4ecb\u9762<br>(config-if)#shutdown<br>(config-if)#no shutdown<\/p>\n\n\n\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;<\/p>\n\n\n\n<p><strong>&gt;traceroute &lt; ip&gt;<\/strong><br>\u53ef\u7528\u4f86\u627e\u51fa\u50b3\u9001\u5c01\u5305\u5230\u76ee\u7684\u5730\u6642\u6240\u9078\u64c7\u7684\u8def\u5f91,\u53cartt(roundtrip time,\u5f80\u8fd4\u6642\u9593)<br>\u6bcf\u7522\u751f\u4e00\u884c\u8f38\u51fa,\u4ee3\u8868\u8cc7\u6599\u6240\u9032\u5165\u4ecb\u9762\u7684ip\u4f4d\u7f6e,\u82e5\u51fa\u73fe*\u4ee3\u8868\u5c01\u5305\u9001\u5931\u6557<br>\u5931\u6557\u7684\u56de\u61c9\u6709\u53ef\u80fd\u6709\u901f\u7387\u7684\u9650\u5236\u6216\u5728\u4e3b\u6a5f\u4e2d\u88ab\u904e\u6ffe\u6389<br>ps:\u6536\u5230traceroute\u7684\u8a2d\u5099,\u9808\u77e5\u9053\u5982\u4f55\u5c07\u56de\u8986\u50b3\u7d66\u767c\u51fatraceroute\u7684\u4f86\u6e90,\u56e0\u6b64\u5169\u908a\u90fd\u9700\u6709\u5df1\u77e5\u7684\u8def\u5f91<br>\u4ee5traceroute 175.10.1.2\u70ba\u4f8b,\u756b\u9762\u5927\u81f4\u5982\u4e0b<br>Type escape sequence to abort.<br>Tracing the route to 175.10.1.2<br>1 160.10.1.1 0 msec 16 msec 0 msec<br>2 175.10.1.2 20 msec 16 msec 16 msec<\/p>\n\n\n\n<p>\u53ef\u5f97\u77e5\u76ee\u5730ip\u662f\u5426\u6709\u9023\u7dda<br><strong>&gt;ping &lt; ip&gt;&nbsp;[option]<\/strong><br>\u5e38\u898boption<br>\u3000size \u6307\u5b9abyte<br>\u3000repeat \u6307\u5b9a\u56de\u61c9\u6b21\u6578,\u9810\u8a2d\u70ba5\u6b21<br>\u3000timeout \u6307\u5b9a\u7b49\u5f85\u56de\u61c9\u7684\u79d2\u6578<br>\u3000source \u6307\u5b9a\u56de\u61c9\u7684ip<br>\u3000df-bit \u5f37\u5236packet do not fragment(\u5c01\u5305\u4e0d\u5206\u6bb5)<br>\u4ee5ping 192.168.1.1\u70ba\u4f8b,\u756b\u9762\u5927\u81f4\u5982\u4e0b<br>Type escape sequence to abort.<br>Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:<br>!!!!!<br>Success rate is 100 percent (5\/5), round-trip min\/avg\/max = 1\/2\/4 ms<\/p>\n\n\n\n<p>#telnet &lt; ip&gt;<br>\u5224\u65b7layer7\u904b\u4f5c\u662f\u5426\u6b63\u5e38<\/p>\n\n\n\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<\/p>\n\n\n\n<p><br><strong>\u8a2d\u5b9asnmp\u53d6\u5f97\u7d71\u8a08\u8cc7\u6599&nbsp;<\/strong><br>(config)#snmp-server &lt; option&gt;<br>option\u6709\u4ee5\u4e0b<br>\u3000community &lt; name&gt; &lt; ro|rw &gt;<br>\u3000contact &lt; email&gt;<br>\u3000location &lt; description&gt;<br>\u3000ifindex persist:\u70ba\u78ba\u4fddSNMP interface index(snmp\u4ecb\u9762\u7d22\u5f15)\u4fdd\u6301\u4e00\u81f4\u6027&nbsp;&nbsp;<br>ex:<br>(config)# snmp-server community ciscoro ro<br>(config)# snmp-server community ciscorw rw<br>(config)# snmp-server contact ray@systw.net<br>(config)# snmp-server location 5rd Floor&nbsp;<br>(config)# snmp-server ifindex persist<\/p>\n\n\n\n<p><strong>\u8a2d\u5b9aSPAN port\u5074\u9304\u6d41\u91cf<\/strong><br>(config)# monitor session &lt; id&gt; source interface &lt; interface&gt;<br>(config)# monitor session &lt; id &gt; destination interface &lt; interface&gt;<br>ex:<br>\u8a2d\u5b9asession 1\u6536\u96c6gi0\/1\u4ecb\u9762\u7684\u6d41\u91cf,\u4e26\u4e1f\u5230gi0\/3\u4ecb\u9762<br>(config)# monitor session 1 source interface gi 0\/1<br>(config)# monitor session 1 destination interface gi 0\/3<\/p>\n\n\n\n<p># show monitor<br>ex:<br>Session 1<br>&#8212;&#8212;&#8212;&#8212;<br>Type : Local Session<br>Source Ports :<br>Both : Gi0\/1<br>Destination Ports : Gi0\/3<br>Encapsulation : Native<br>Ingress : Disabled<\/p>\n\n\n\n<p><strong>\u8a2d\u5b9aRSPAN port\u5074\u9304\u9060\u7aef\u6d41\u91cf<\/strong><br>\u9060\u7aefswitch\u8a2d\u5b9a<br>1.\u555f\u52d5\u7528\u4f86\u50b3\u9001\u8cc7\u6599\u7684vlan\u70baremote-span<br>SW1(config)# vlan &lt; vlan-id&gt;<br>SW1(config-vlan)# remote-span<br>2.\u8a2d\u5b9aspan port<br>SW1(config)# monitor session &lt; id&gt; source interface &lt; interface&gt;<br>SW1(config)# monitor session &lt; id&gt; destination remote vlan &lt; vlan-id&gt; reflector-port &lt; interface&gt;<br>\u8fd1\u7aefswitch\u8a2d\u5b9a<br>1.\u555f\u52d5\u7528\u4f86\u50b3\u9001\u8cc7\u6599\u7684vlan\u70baremote-span<br>SW2(config)# vlan &lt; vlan-id&gt;<br>SW2(config-vlan)# remote-span<br>2.\u8a2d\u5b9aspan port<br>SW2(config)# monitor session &lt; id&gt; source remote vlan &lt; vlan-id&gt;<br>SW2(config)# monitor session &lt; id&gt; destination interface &lt; interface&gt;<br>ex:<br>\u5c07sw1\u7684gi0\/1\u4ecb\u9762\u6d41\u91cf\uff0c\u4e1f\u5230sw2\u7684fa5\/1\u4ecb\u9762<br>SW1(config)# vlan 10<br>SW1(config-vlan)# remote-span<br>SW1(config)# monitor session 1 source interface gi 0\/1<br>SW1(config)# monitor session 1 destination remote vlan 10 reflector-port gi 0\/3<br>SW1#show monitor<br>Session 1<br>&#8212;&#8212;&#8212;&#8212;<br>Type : Remote Source Session<br>Source Ports :<br>Both : Gi0\/1<br>Reflector Port : Gi0\/3<br>Dest RSPAN VLAN : 10<br>SW2(config)# vlan 10<br>SW2(config-vlan)# remote-span<br>SW2(config)# monitor session 2 source remote vlan 10<br>SW2(config)# monitor session 2 destination interface fa 5\/1<br>SW2# show monitor<br>Session 2<br>&#8212;&#8212;&#8212;&#8212;<br>Type : Remote Destination Session<br>Source RSPAN VLAN : 10<br>Destination Ports : Fa5\/1<\/p>\n","protected":false},"excerpt":{"rendered":"<p>debug\u6307\u4ee4\u986f\u793a\u52d5\u614b\u8cc7\u6599\u8207\u4e8b\u4ef6,\u63d0\u4f9b\u76ee\u524d\u6240\u767c\u751f\u7684\u8cc7\u8a0a,\u53ef\u5354 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[32],"tags":[],"class_list":["post-894","post","type-post","status-publish","format-standard","hentry","category-cisco-network"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts\/894","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/comments?post=894"}],"version-history":[{"count":0,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts\/894\/revisions"}],"wp:attachment":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/media?parent=894"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/categories?post=894"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/tags?post=894"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}