Commande de diagnostique sur des routeurs Cisco - TRI INFO

Techniques des Réseaux Informatiques

Breaking

&width=339&height=255&colorscheme=light&show_faces=true&show_border=false&stream=false&header=false' style='border: none; overflow: hidden; background: #fff; width: 339px; height: 200px;'>
&width=339&height=255&colorscheme=light&show_faces=true&show_border=false&stream=false&header=false' style='border: none; overflow: hidden; background: #fff; width: 339px; height: 200px;'>

Sunday, 26 May 2019

Commande de diagnostique sur des routeurs Cisco

Ces commandes permettent d'afficher les voisins, d'afficher différentes statistiques, de faire un ping vers une interface ou encore de vérifier l'état des processus.
Image result for ccna

Activer/désactiver les notifications (par défaut en mode console)

R2#terminal monitor
R2#
R2#terminal no monitor
R2#

Comment afficher les voisins?

Il peut être utile d'afficher les voisins (en général d'autre routeur relié). Cisco utilise le protocole CDP (cisco discovery protocol) pour afficher les informations sur les voisins. Il faut donc pour que la commande fonctionne que le protocole cdp soit activé sur les routeurs.
La commande suivante active le protocole cdp puis affiche les voisins.
R2(config)#cdp run
R2(config)#exit
R2#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater

Device ID Local Intrfce Holdtme Capability Platform Port ID
R1 Eth 1/0 125 R 7206VXR Eth 1/0
R2#

Il est aussi possible d'afficher les détails sur le voisin, notamment l'adresse IP et le modèle de ce dernier en filtrant sur un port ou sur le nom d'un voisin.
R2#show cdp neighbors ethernet 1/0 detail
-------------------------
Device ID: R1
Entry address(es):
IP address: 192.168.100.1
Platform: Cisco 7206VXR, Capabilities: Router
Interface: Ethernet1/0, Port ID (outgoing port): Ethernet1/0
Holdtime : 124 sec

Version :
Cisco IOS Software, 7200 Software (C7200-IPBASEK9-M), Version 12.4(22)T, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2008 by Cisco Systems, Inc.
Compiled Fri 10-Oct-08 10:10 by prod_rel_team

advertisement version: 2
Duplex: half

R2#
R2#
R2#
R2#show cdp entry R1
-------------------------
Device ID: R1
Entry address(es):
IP address: 192.168.100.1
Platform: Cisco 7206VXR, Capabilities: Router
Interface: Ethernet1/0, Port ID (outgoing port): Ethernet1/0
Holdtime : 173 sec
Pour des raisons de sécurité, certain préfère désactiver le protocole.
R1(config)#no cdp run
R1(config)#end
R1#
R1#sh cdp neighbors
% CDP is not enabled
R1#

Sans commentaire

R2#ping
Protocol [ip]:
Target IP address: 192.168.1.1
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.100.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R2#

Affichage de l'inventaire du matériel

R1#show inventory
NAME: "Chassis", DESCR: "Cisco 7206VXR, 6-slot chassis"
PID: CISCO7206VXR , VID: , SN: 4279256517

NAME: "NPE400 0", DESCR: "Cisco 7200VXR Network Processing Engine NPE-400"
PID: NPE-400 , VID: , SN: 11111111

NAME: "module 0", DESCR: "I/O FastEthernet (TX-ISL)"
PID: C7200-IO-FE-MII/RJ45=, VID: , SN: 4294967295

Affichage de l'utilisation de la mémoire et du processeur

R1#show processes memory
Processor Pool Total: 150516196 Used: 23573320 Free: 126942876
I/O Pool Total: 16777216 Used: 2737120 Free: 14040096
Transient Pool Total: 16777216 Used: 21636 Free: 16755580

PID TTY Allocated Freed Holding Getbufs Retbufs Process
0 0 39544288 16210268 20763096 0 0 *Init*
0 0 12052 73028 12052 0 0 *Sched*
0 0 22660 317548 412 183104 183104 *Dead*
R1#
R1#
R1#show processes cpu
CPU utilization for five seconds: 1%/100%; one minute: 1%; five minutes: 1%
PID Runtime(ms) Invoked uSecs 5Sec 1Min 5Min TTY Process
1 12 64 187 0.00% 0.00% 0.00% 0 Chunk Manager
2 0 240 0 0.00% 0.00% 0.00% 0 Load Meter
3 5280 445 11865 0.23% 0.25% 0.22% 0 Exec
4 0 1 0 0.00% 0.00% 0.00% 0 EDDRI_MAIN
5 800 145 5517 0.00% 0.06% 0.05% 0 Check heaps
6 0 1 0 0.00% 0.00% 0.00% 0 Pool Manager
7 0 2 0 0.00% 0.00% 0.00% 0 Timers

Affichage de l'état des interfaces

R1#show interfaces
FastEthernet0/0 is down, line protocol is down
Hardware is DEC21140, address is ca03.0bc0.0000 (bia ca03.0bc0.0000)
MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Half-duplex, 100Mb/s, 100BaseTX/FX
Il est possible d'afficher l'état d'une interface en particulier en faisant suivre la commande du numéro de l'interface (R1#show interfaces ethernet 1/0).

Affichage des statistiques pour les interfaces

R1#show interfaces stats
FastEthernet0/0
Switching path Pkts In Chars In Pkts Out Chars Out
Processor 0 0 0 0
Route cache 0 0 0 0
Total 0 0 0 0
Ethernet1/0
Switching path Pkts In Chars In Pkts Out Chars Out
Processor 39 9346 165 17188
Route cache 0 0 0 0
Total 39 9346 165 17188

Mise à zéro des compteurs pour les interfaces

R1#clear counters
Clear "show interface" counters on all interfaces [confirm]
R1#

Affichage de la température et de l'état des alimentations électriques

R1#show environment all
Power Supplies:
Power Supply 1 is AC Power Supply. Unit is on.
Power Supply 2 is AC Power Supply. Unit is on.

Temperature readings:
I/O Cont Inlet measured at 22C/71F
I/O Cont Outlet measured at 22C/71F
NPE Inlet measured at 22C/71F
NPE Outlet measured at 22C/71F

Fourniture d'un rapport complet sur le routeur (ça peut être long ...)

R1#show tech-support

Affichage des statistiques IP

R1#sh ip traffic
IP statistics:
Rcvd: 14 total, 14 local destination
0 format errors, 0 checksum errors, 0 bad hop count
0 unknown protocol, 0 not a gateway
0 security failures, 0 bad options, 0 with options
Opts: 0 end, 0 nop, 0 basic security, 0 loose source route

Afficher les protocoles configurés

R1#show protocols
Global values:
Internet Protocol routing is enabled
FastEthernet0/0 is up, line protocol is up
Internet address is 192.168.0.1/24
Serial0/0 is administratively down, line protocol is down
FastEthernet0/1 is up, line protocol is up
Internet address is 192.168.100.1/24
Serial0/1 is administratively down, line protocol is down

Afficher l'état des protocoles de routage actif

R1#sh ip protocols
Routing Protocol is "ospf 100"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 172.16.0.1
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
10.0.0.0 0.0.0.255 area 0
10.0.3.0 0.0.0.255 area 0
Reference bandwidth unit is 100 mbps
Routing Information Sources:
Gateway Distance Last Update
172.16.0.2 110 00:04:42
172.16.0.3 110 00:04:42
Distance: (default is 110)

R1#

No comments:

Post a Comment

Post Top Ad