Cisco Packet Tracer - Routing - testowanie i rozwiązywanie problemów
Omówione zostanie na podstawie protokołu RIP i znanej już sieci opartej na 5 routerach. Patrz: https://soisk.info/index.php/Cisco_Packet_Tracer_-_routing
traceroute
Router0#traceroute 192.168.0.3 Type escape sequence to abort. Tracing the route to 192.168.0.3 1 172.16.1.2 8 msec 1 msec 1 msec 2 172.17.1.2 3 msec 4 msec 6 msec 3 192.168.0.3 2 msec 11 msec 0 msec
Polecenie traceroute
jest odpowiednikiem windowsowego polecenia tracert
i służy oczywiście do śledzenie trasy pakietów IP, czyli zobaczymy w kolejnych skokach adresy IP kolejnych routerów.
Jak widać, abyt pakiet doszedł do PC3, musiał przejść z routera0 przez routery router1 i router2.
show ip route
Wyświetlenie tablicy routingu, tablicy która pokazuje jak trasowane są pakiety IP. Zwróć uwagę na kody (codes), gdzie właściwie wszystko jest wyjaśnione. Jak widać router0 jest połączony bezpośrednio z 3 sieciami (C - directly connected). Z kolejnymi sieciami jest połączony poprzez protokół RIP (R), podany jest adres IP interfejsu oraz jego nazwa.
Router0#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set C 10.0.0.0/8 is directly connected, FastEthernet0/0 C 172.16.0.0/16 is directly connected, Serial2/0 R 172.17.0.0/16 [120/1] via 172.16.1.2, 00:00:07, Serial2/0 R 172.18.0.0/16 [120/2] via 172.20.1.2, 00:00:08, Serial3/0 [120/2] via 172.16.1.2, 00:00:07, Serial2/0 R 172.19.0.0/16 [120/1] via 172.20.1.2, 00:00:08, Serial3/0 C 172.20.0.0/16 is directly connected, Serial3/0 R 192.168.0.0/24 [120/2] via 172.16.1.2, 00:00:07, Serial2/0
show ip protocol
Jak widać protokołem routingu jest RIP. Router0 wysyła uaktualnioną tablicę routingu co 30 sekund. W RIP ma wpisane 3 sieci. Wymienia tablice z 2 routerami (172.16.1.2 i 172.20.1.2), podany jest czas, który minął od ostatniego uaktualnienia. Odległość administracyjna wynosi 120 (czyli domyślna).
Router0#show ip protocol Routing Protocol is "rip" Sending updates every 30 seconds, next due in 24 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Redistributing: rip Default version control: send version 1, receive any version Interface Send Recv Triggered RIP Key-chain FastEthernet0/0 1 2 1 Serial2/0 1 2 1 Serial3/0 1 2 1 Automatic network summarization is in effect Maximum path: 4 Routing for Networks: 10.0.0.0 172.16.0.0 172.20.0.0 Passive Interface(s): Routing Information Sources: Gateway Distance Last Update 172.16.1.2 120 00:00:12 172.20.1.2 120 00:00:00 Distance: (default is 120)
debug ip rip
Polecenie debug ip rip
wyświetla wysłane i odebrane uaktualnienia routingu RIP. Metric, czyli metryka jest oparta na liczbie skoków (hops).
Router0#debug ip rip RIP protocol debugging is on Router#RIP: received v1 update from 172.16.1.2 on Serial2/0 172.17.0.0 in 1 hops 172.18.0.0 in 2 hops 192.168.0.0 in 2 hops RIP: received v1 update from 172.20.1.2 on Serial3/0 172.18.0.0 in 2 hops 172.19.0.0 in 1 hops 192.168.0.0 in 3 hops RIP: sending v1 update to 255.255.255.255 via FastEthernet0/0 (10.0.0.1) RIP: build update entries network 172.16.0.0 metric 1 network 172.17.0.0 metric 2 network 172.18.0.0 metric 3 network 172.19.0.0 metric 2 network 172.20.0.0 metric 1 network 192.168.0.0 metric 3 RIP: sending v1 update to 255.255.255.255 via Serial2/0 (172.16.1.1) RIP: build update entries network 10.0.0.0 metric 1 network 172.19.0.0 metric 2 network 172.20.0.0 metric 1 RIP: sending v1 update to 255.255.255.255 via Serial3/0 (172.20.1.1) RIP: build update entries network 10.0.0.0 metric 1 network 172.16.0.0 metric 1 network 172.17.0.0 metric 2 network 192.168.0.0 metric 3 RIP: received v1 update from 172.16.1.2 on Serial2/0 172.17.0.0 in 1 hops 172.18.0.0 in 2 hops 192.168.0.0 in 2 hops RIP: received v1 update from 172.20.1.2 on Serial3/0 172.18.0.0 in 2 hops 172.19.0.0 in 1 hops 192.168.0.0 in 3 hops RIP: sending v1 update to 255.255.255.255 via FastEthernet0/0 (10.0.0.1) RIP: build update entries network 172.16.0.0 metric 1 network 172.17.0.0 metric 2 network 172.18.0.0 metric 3 network 172.19.0.0 metric 2 network 172.20.0.0 metric 1 network 192.168.0.0 metric 3 RIP: sending v1 update to 255.255.255.255 via Serial2/0 (172.16.1.1) RIP: build update entries network 10.0.0.0 metric 1 network 172.19.0.0 metric 2 network 172.20.0.0 metric 1 RIP: sending v1 update to 255.255.255.255 via Serial3/0 (172.20.1.1) RIP: build update entries network 10.0.0.0 metric 1 network 172.16.0.0 metric 1 network 172.17.0.0 metric 2 network 192.168.0.0 metric 3
Nie zapomnij na koniec wpisać no debug ip rip
Router0#no debug ip rip RIP protocol debugging is off