/ 6.-dinamic-routing / 07-komand-dlia-troubleshooting.md
07-komand-dlia-troubleshooting.md
 1  # Полезные команды для траблшутинга
 2  
 3  1\) Список соседей и состояние связи с ними вызывается командой **show ip ospf neighbor**
 4  
 5  ```text
 6  msk-arbat-gw1:
 7  
 8  Neighbor ID Pri State Dead Time Address Interface
 9  172.16.255.32 1 FULL/DROTHER 00:00:33 172.16.2.2 FastEthernet0/1.4
10  172.16.255.48 1 FULL/DR 00:00:34 172.16.2.18 FastEthernet0/1.5
11  172.16.255.64 1 FULL/DR 00:00:33 172.16.2.34 FastEthernet0/1.7
12  172.16.255.80 1 FULL/DR 00:00:33 172.16.2.130 FastEthernet0/1.8
13  172.16.255.112 1 FULL/DR 00:00:33 172.16.2.197 FastEthernet1/0.911
14  ```
15  
16  2\) Или для EIGRP: **show ip eigrp neighbors**
17  
18  ```text
19  IP-EIGRP neighbors for process 1
20  H Address Interface Hold Uptime SRTT RTO Q Seq
21  (sec) (ms) Cnt Num
22  0 172.16.2.38 Fa0/1 12 00:04:51 40 1000 0 54
23  1 172.16.2.42 Fa0/0 13 00:04:51 40 1000 0 58
24  ```
25  
26  3\) С помощью команды **show ip protocols** можно посмотреть информацию о запущенных протоколах динамической маршрутизации и их взаимосвязи.
27  
28  klgr-balt-gw1:
29  
30  ```text
31  Routing Protocol is "EIGRP 1 " 
32  Outgoing update filter list for all interfaces is not set 
33  Incoming update filter list for all interfaces is not set 
34  Default networks flagged in outgoing updates 
35  Default networks accepted from incoming updates 
36  EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
37  EIGRP maximum hopcount 100
38  EIGRP maximum metric variance 1
39  Redistributing: EIGRP 1, OSPF 1 
40  Automatic network summarization is in effect 
41  Automatic address summarization: 
42  Maximum path: 4
43  Routing for Networks: 
44  172.16.0.0
45  Routing Information Sources: 
46  Gateway Distance Last Update 
47  172.16.2.42 90 4 
48  172.16.2.38 90 4 
49  Distance: internal 90 external 170
50  
51  Routing Protocol is "OSPF 1"
52  Outgoing update filter list for all interfaces is not set 
53  Incoming update filter list for all interfaces is not set 
54  Router ID 172.16.255.64
55  It is an autonomous system boundary router
56  Redistributing External Routes from,
57  EIGRP 1 
58  Number of areas in this router is 1\. 1 normal 0 stub 0 nssa
59  Maximum path: 4
60  Routing for Networks:
61  172.16.2.32 0.0.0.3 area 0
62  Routing Information Sources: 
63  Gateway Distance Last Update 
64  172.16.255.64 110 00:00:23
65  Distance: (default is 110)
66  ```
67  
68  4\) Для отладки и понимания работы протоколов будет полезно воспользоваться следующими командами:  
69  **debug ip OSPF events  
70  debug ip OSPF adj  
71  debug EIGRP packets**
72  
73  Попробуйте подёргать разные интерфейсы и посмотреть, что происходит в дебаге, какие сообщения летят.
74