Cele:
Adresy IP routerów:
ISP
Interfejs |
IP |
FastEthernet 0/0 |
61.61.61.2/30 |
R1
Interfejs |
IP |
FastEthernet 0/0 |
61.61.61.1/30 |
FastEthernet 1/0 |
172.16.12.1/28 |
FastEthernet 2/0 |
172.16.13.1/28 |
R2A
Interfejs |
IP |
FastEthernet 0/0 |
172.16.12.2/28 |
FastEthernet 1/0 |
172.16.22.1/28 |
R2B
Interfejs |
IP |
FastEthernet 0/0 |
172.16.22.2/28 |
FastEthernet 1/0 |
172.16.24.2/28 |
R3
Interfejs |
IP |
FastEthernet 0/0 |
172.16.13.3/28 |
Ethernet 1/0 |
172.16.34.3/28 |
R4
Interfejs |
IP |
FastEthernet 0/0 |
172.16.24.4/28 |
FastEthernet 2/0 |
172.16.45.4/28 |
Ethernet 1/0 |
172.16.34.4/28 |
R5
Interfejs |
IP |
FastEthernet 0/0 |
172.16.45.5/28 |
Loopback 0 |
5.5.0.1/24 |
Loopback 1 |
5.5.1.1/24 |
Loopback 2 |
5.5.2.1/24 |
Loopback 3 |
5.5.3.1/24 |
Schemat sieci:

Router: 3640
IOS: c3640-jk9o3s-mz.124-16a.bin
Rozwiązanie
Skonfiguruj OSPF według schematu sieci.
Nasza przygodę zaczynamy jak zwykle od podstawowej konfiguracji OSPF:
R1(config-router)#network 172.16.12.0 0.0.0.15 area 0 |
R1(config-router)#network 172.16.13.0 0.0.0.15 area 0 |
R2A(config)#router ospf 1 |
R2A(config-router)#network 172.16.12.0 0.0.0.15 area 0 |
R2A(config-router)#network 172.16.22.0 0.0.0.15 area 24 |
R2B(config)#router ospf 1 |
R2B(config-router)#network 172.16.22.0 0.0.0.15 area 24 |
R2B(config-router)#network 172.16.24.0 0.0.0.15 area 24 |
R3(config-router)#network 172.16.13.0 0.0.0.15 area 0 |
R3(config-router)#network 172.16.34.0 0.0.0.15 area 34 |
R4(config-router)#network 172.16.24.0 0.0.0.15 area 24 |
R4(config-router)#network 172.16.34.0 0.0.0.15 area 34 |
R4(config-router)#network 172.16.45.0 0.0.0.15 area 45 |
R5(config-router)#network 172.16.45.0 0.0.0.15 area 45 |
Po chwili relacja sąsiedztwa pomiędzy routerami zostaje ustanowiona. Zobaczmy tablicę routingu dla R4:
172.16.0.0/28 is subnetted, 6 subnets |
O 172.16.22.0 [110/2] via 172.16.24.2, 00:31:52, FastEthernet0/0 |
O IA 172.16.12.0 [110/3] via 172.16.24.2, 00:29:15, FastEthernet0/0 |
O IA 172.16.13.0 [110/4] via 172.16.24.2, 00:29:15, FastEthernet0/0 |
Zwróćmy uwagę, że wszystkie trasy prowadzą przez obszar 24. Powodem tego jest łącze 10Mb/s między routerami R3 i R4 przez co trasa ta ma wyższy koszt. Koszt danej ścieżki obliczamy ze wzoru 10^8 / przepustowość w bps, gdzie niższy wynik oznacza bardziej optymalną ścieżkę. Tak więc dla łącza FastEthernet 0/0 (100Mb/s) koszt wynosi 1, a dla Ethernet 1/0 (10Mb/s) koszt równa się 10. Poniżej wynik polecenia show ip ospf interface brief
na R4:
R4#show ip ospf interface brief |
Interface PID Area IP Address/Mask Cost State Nbrs F/C |
Fa0/0 1 24 172.16.24.4/28 1 BDR 1/1 |
Et1/0 1 34 172.16.34.4/28 10 DR 1/1 |
Fa2/0 1 45 172.16.45.4/28 1 DR 1/1 |
Router ISP: dodaj statyczne trasy do sieci 172.16.0.0/16 oraz 5.0.0.0/8 przez router R1.
ISP to router naszego dostawcy w tym zadaniu. Chcemy aby w jego tablicy routingu trasy do sieci 172.16.0.0/16 oraz 5.0.0.0/8 wskazywały przez router R1. Dodajemy je statycznie:
ISP(config)#ip route 172.16.0.0 255.255.0.0 61.61.61.1 |
ISP(config)#ip route 5.0.0.0 255.0.0.0 61.61.61.1 |
Gdzie 61.61.61.1 to adres IP routera R1. Nowe wpisy są widoczne od razu:
ISP#show ip route | begin Gateway |
Gateway of last resort is not set |
S 5.0.0.0/8 [1/0] via 61.61.61.1 |
S 172.16.0.0/16 [1/0] via 61.61.61.1 |
61.0.0.0/30 is subnetted, 1 subnets |
C 61.61.61.0 is directly connected, FastEthernet0/0 |
Nie ma sensu testować teraz łączności z ISP do routerów za R1, ponieważ nie wiedzą one jak dotrzeć do ISP.
R1 ma być bramą domyślną dla pozostałych routerów w OSPF.
W poprzednim kroku skonfigurowaliśmy router ISP. Teraz musimy zrobić to samo, ale w drugą stronę. Najpierw do routera R1 dodamy trasę domyślną wskazującą na ISP. Następnie skonfigurujemy OSPF w ten sposób, aby R1 stał się domyślną bramą dla pozostałych routerów.
R1(config)#ip route 0.0.0.0 0.0.0.0 61.61.61.2 |
Tablica routingu R1:
Gateway of last resort is 61.61.61.2 to network 0.0.0.0 |
172.16.0.0/28 is subnetted, 5 subnets |
O IA 172.16.34.0 [110/11] via 172.16.13.3, 01:34:02, FastEthernet2/0 |
O IA 172.16.24.0 [110/3] via 172.16.12.2, 01:34:02, FastEthernet1/0 |
O IA 172.16.22.0 [110/2] via 172.16.12.2, 01:34:02, FastEthernet1/0 |
C 172.16.12.0 is directly connected, FastEthernet1/0 |
C 172.16.13.0 is directly connected, FastEthernet2/0 |
61.0.0.0/30 is subnetted, 1 subnets |
C 61.61.61.0 is directly connected, FastEthernet0/0 |
S* 0.0.0.0/0 [1/0] via 61.61.61.2 |
Widzimy nowy statyczny wpis S* 0.0.0.0/0 [1/0] via 61.61.61.2. Teraz przechodzimy do trybu konfiguracji OSPF:
R1(config-router)#default-information originate |
R1 ogłasza siebie jako bramę domyślną w OSPF. Zobaczmy tablicę routingu na R2A i R4:
172.16.0.0/28 is subnetted, 5 subnets |
O IA 172.16.34.0 [110/12] via 172.16.12.1, 01:07:49, FastEthernet0/0 |
O 172.16.24.0 [110/2] via 172.16.22.2, 01:07:49, FastEthernet1/0 |
O 172.16.13.0 [110/2] via 172.16.12.1, 01:38:10, FastEthernet0/0 |
O*E2 0.0.0.0/0 [110/1] via 172.16.12.1, 00:06:34, FastEthernet0/0 |
Dla R2A domyślna trasa prowadzi właśnie przez R1.
172.16.0.0/28 is subnetted, 6 subnets |
O 172.16.22.0 [110/2] via 172.16.24.2, 01:07:30, FastEthernet0/0 |
O IA 172.16.12.0 [110/3] via 172.16.24.2, 01:07:30, FastEthernet0/0 |
O IA 172.16.13.0 [110/4] via 172.16.24.2, 01:07:30, FastEthernet0/0 |
O*E2 0.0.0.0/0 [110/1] via 172.16.24.2, 00:06:10, FastEthernet0/0 |
W przypadku R4 trasa domyślna wskazuje na router R2B, który natomiast ma taki sam wpis, ale wskazujący na R2A. Przetestujemy jeszcze łączność z R4 do ISP (ping
i traceroute
):
Type escape sequence to abort. |
Sending 5, 100-byte ICMP Echos to 61.61.61.2, timeout is 2 seconds: |
Success rate is 100 percent (5/5), round-trip min/avg/max = 72/78/84 ms |
Type escape sequence to abort. |
Tracing the route to 61.61.61.2 |
1 172.16.24.2 16 msec 16 msec 20 msec |
2 172.16.22.1 32 msec 44 msec 32 msec |
3 172.16.12.1 52 msec 52 msec 64 msec |
4 61.61.61.2 60 msec * 80 msec |
Obszary 24 i 34 – zmień ich typ jako stub.
Obszary 24 i 34 powinny być typu stub area. Zmiany musimy wprowadzić na wszystkich routerach należących do tych obszarów. Zaczynamy od obszaru 24, czyli routery R2A, R2B i R4:
R2A(config)#router ospf 1 |
R2A(config-router)#area 24 stub |
R2B(config)#router ospf 1 |
R2B(config-router)#area 24 stub |
R4(config-router)#area 24 stub |
Następnie obszar 34, czyli routery R3 i R4:
R3(config-router)#area 34 stub |
R4(config-router)#area 34 stub |
Po tej zmianie routery nawiązują od nowa relację sąsiedztwa. Routery R2 i R3 rozgłaszają teraz zewnętrzne trasy (E2) jako jeden wpis O*IA 0.0.0.0/0. Poniżej tablice routingu dla R2B i R4:
172.16.0.0/28 is subnetted, 5 subnets |
O IA 172.16.34.0 [110/13] via 172.16.22.1, 00:01:16, FastEthernet0/0 |
O IA 172.16.12.0 [110/2] via 172.16.22.1, 00:01:16, FastEthernet0/0 |
O IA 172.16.13.0 [110/3] via 172.16.22.1, 00:01:16, FastEthernet0/0 |
O*IA 0.0.0.0/0 [110/2] via 172.16.22.1, 00:01:16, FastEthernet0/0 |
172.16.0.0/28 is subnetted, 6 subnets |
O 172.16.22.0 [110/2] via 172.16.24.2, 00:01:32, FastEthernet0/0 |
O IA 172.16.12.0 [110/3] via 172.16.24.2, 00:01:32, FastEthernet0/0 |
O IA 172.16.13.0 [110/4] via 172.16.24.2, 00:01:32, FastEthernet0/0 |
O*IA 0.0.0.0/0 [110/3] via 172.16.24.2, 00:01:32, FastEthernet0/0 |
Upewnij się, że router R5 ma pełną łączność z innymi.
Tak jak pisaliśmy we wcześniejszych ćwiczeniach, aby możliwa była wymiana informacji na temat routingu w OSPF routery muszą być wpięte do obszaru zerowego (backbone area). W tym przykładzie tylko router R5 nie spełnia tego warunku, przez co nic nie wie o innych trasach w OSPF:
R5#show ip route | begin Gateway |
Gateway of last resort is not set |
5.0.0.0/24 is subnetted, 4 subnets |
C 5.5.0.0 is directly connected, Loopback0 |
C 5.5.1.0 is directly connected, Loopback1 |
C 5.5.2.0 is directly connected, Loopback2 |
C 5.5.3.0 is directly connected, Loopback3 |
172.16.0.0/28 is subnetted, 1 subnets |
C 172.16.45.0 is directly connected, FastEthernet0/0 |
Rozwiązaniem tego problemu mogłoby być utworzenie łącza wirtualnego pomiędzy R4 a R3, jednak tutaj pojawia się pewien problem:
R4(config-router)#area 34 virtual-link 172.16.34.3 |
% OSPF: Area 34 is a stub or nssa so virtual links are not allowed |
No własnie w poprzednim kroku zmieniliśmy typ obszarów 24 i 34 na stub, przez co nie mogą zostać obszarem tranzytowym i stąd niemożliwe jest utworzenie virtual link. No właśnie, czyli jak „wpiąć” router R5 do obszaru 0? Rozwiązaniem może być tunel GRE, np pomiędzy R3 i R4. W pierwszym kroku utworzymy tunel na routerach R3 i R4:
R3(config-if)#ip unnumbered ethernet 1/0 |
R3(config-if)#tunnel mode gre ip |
R3(config-if)#tunnel source ethernet 1/0 |
R3(config-if)#tunnel destination 172.16.34.4 |
R4(config-if)#ip unnumbered ethernet 1/0 |
R4(config-if)#tunnel mode gre ip |
R4(config-if)#tunnel source ethernet 1/0 |
R4(config-if)#tunnel destination 172.16.34.3 |
Interfejsem źródłowym jest Ethernet 1/0 (łącze 10Mb/s), a drugi koniec tunelu wskazuje na adres IP sąsiada. Zobaczmy status tunelu na R3:
R3#show ip interface brief tunnel 0 |
Interface IP-Address OK? Method Status Protocol |
Tunnel0 172.16.34.3 YES TFTP up up |
Zarówno Status jak i Protocol wskazują na up, a więc tunel działa. Teraz musimy przypisać interfejs Tunnel 0 do obszaru 0:
R3(config-if)#ip ospf 1 area 0 |
R4(config-if)#ip ospf 1 area 0 |
Po chwili relacja sąsiedztwa zostanie nawiązana:
R4#show ip ospf interface brief |
Interface PID Area IP Address/Mask Cost State Nbrs F/C |
Tu0 1 0 0.0.0.0/0 11111 P2P 1/1 |
Fa0/0 1 24 172.16.24.4/28 1 BDR 1/1 |
Et1/0 1 34 172.16.34.4/28 10 DR 1/1 |
Fa2/0 1 45 172.16.45.4/28 1 DR 1/1 |
Widzimy, że interfejs tunelowy należy do Area 0. Domyślny koszt to 11111 (możemy zmienić tę wartość w trybie konfiguracji interfejsu poleceniem ip ospf cost
).
Rozszerzyliśmy więc obszar 0 aż do R4, tak więc R5 ma teraz połączenie bezpośrednie. Zobaczmy jego tablicę routingu:
172.16.0.0/28 is subnetted, 6 subnets |
O IA 172.16.34.0 [110/11] via 172.16.45.4, 00:56:30, FastEthernet0/0 |
O IA 172.16.24.0 [110/2] via 172.16.45.4, 00:56:30, FastEthernet0/0 |
O IA 172.16.22.0 [110/3] via 172.16.45.4, 00:56:30, FastEthernet0/0 |
O IA 172.16.12.0 [110/11114] via 172.16.45.4, 00:56:30, FastEthernet0/0 |
O IA 172.16.13.0 [110/11113] via 172.16.45.4, 00:56:30, FastEthernet0/0 |
O*E2 0.0.0.0/0 [110/1] via 172.16.45.4, 00:56:29, FastEthernet0/0 |
Ma on wszystkie trasy, a brama domyślna wskazuje na R4. Zobaczmy czy ma łączność z ISP
Type escape sequence to abort. |
Sending 5, 100-byte ICMP Echos to 61.61.61.2, timeout is 2 seconds: |
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/83/96 ms |
Jeszcze jedna ważna uwaga. Tworząc tunel pomiędzy R3 i R4 pojawił się nowy problem. Poprzednio R4 domyślnie kierował pakiety przez obszar 24 korzystając z łącza 100Mb/s. Po zestawieniu tunelu sytuacja się zmieniła i wszystkie trasy OSPF prowadzą właśnie przez tunel, a więc łącze 10Mb/s:
172.16.0.0/28 is subnetted, 6 subnets |
O 172.16.22.0 [110/2] via 172.16.24.2, 01:02:19, FastEthernet0/0 |
O 172.16.12.0 [110/11113] via 172.16.34.3, 00:08:56, Tunnel0 |
O 172.16.13.0 [110/11112] via 172.16.34.3, 00:08:56, Tunnel0 |
O*E2 0.0.0.0/0 [110/1] via 172.16.34.3, 00:03:17, Tunnel0 |
Dlaczego tak jest? Widzimy nawet, że koszt (>11111) jest zdecydowanie wyższy niż poprzednio (>2). Odpowiedź jest taka, że OSPF zawsze preferuje trasy wewnątrz obszarowe (intra area) od tych między obszarowych (inter area). Przypisując tunel do obszaru 0 rozszerzyliśmy go aż do R4. Na schemacie sieci załączonym powyżej moglibyśmy dopisać obok AREA 34 także AREA 0. Widzimy nawet, że sieci 172.16.12.0/28 i 172.16.13.0/28 oznaczone są jako O a nie jako O IA. W takim razie nie jest ważne jaki koszt ustawimy, R4 zawsze wybierze trasę przez Tunnel0.
R5 – skonfiguruj RIPv2, rozgłoś interfejsy Loopback, redystrybuuj go do OSPF i sprawdź łączność.
Włączymy RIP na R5 i rozgłosimy w nim sieć 5.0.0.0/8
R5(config-router)#version 2 |
R5(config-router)#network 5.0.0.0 |
R5(config-router)#no auto-summary |
Następnie redystrybucja RIP w OSPF:
R5(config-router)#redistr |
R5(config-router)#redistribute rip su |
R5(config-router)#redistribute rip subnets |
Tablica routingu od R1:
5.0.0.0/24 is subnetted, 4 subnets |
O E2 5.5.0.0 [110/20] via 172.16.13.3, 00:00:40, FastEthernet2/0 |
O E2 5.5.1.0 [110/20] via 172.16.13.3, 00:00:40, FastEthernet2/0 |
O E2 5.5.2.0 [110/20] via 172.16.13.3, 00:00:40, FastEthernet2/0 |
O E2 5.5.3.0 [110/20] via 172.16.13.3, 00:00:40, FastEthernet2/0 |
172.16.0.0/28 is subnetted, 6 subnets |
O IA 172.16.45.0 [110/11113] via 172.16.13.3, 01:21:38, FastEthernet2/0 |
O IA 172.16.34.0 [110/11] via 172.16.13.3, 01:21:38, FastEthernet2/0 |
O IA 172.16.24.0 [110/3] via 172.16.12.2, 01:21:38, FastEthernet1/0 |
O IA 172.16.22.0 [110/2] via 172.16.12.2, 01:21:38, FastEthernet1/0 |
Widoczne są 4 nowe sieci oznaczone jako O E2 (zewnętrzne). Sprawdźmy łączność z R1 i ISP:
Type escape sequence to abort. |
Sending 5, 100-byte ICMP Echos to 5.5.1.1, timeout is 2 seconds: |
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/48/76 ms |
Type escape sequence to abort. |
Sending 5, 100-byte ICMP Echos to 5.5.3.1, timeout is 2 seconds: |
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/68/80 ms |
Wszystko działa jak należy.
R4 – ustaw trasę domyślną przez R2B.
Tak jak pisaliśmy trasa domyślna od R4 prowadzi przez łącze 10Mb/s. Zmienimy to dodając trasę domyślną przez interfejs FastEthernet 0/0:
R4(config)#ip route 0.0.0.0 0.0.0.0 fastEthernet 0/0 |
R4#show ip route | begin Gateway |
Gateway of last resort is 172.16.24.2 to network 0.0.0.0 |
5.0.0.0/24 is subnetted, 4 subnets |
O E2 5.5.0.0 [110/20] via 172.16.45.5, 00:00:54, FastEthernet2/0 |
O E2 5.5.1.0 [110/20] via 172.16.45.5, 00:00:54, FastEthernet2/0 |
O E2 5.5.2.0 [110/20] via 172.16.45.5, 00:00:54, FastEthernet2/0 |
O E2 5.5.3.0 [110/20] via 172.16.45.5, 00:00:54, FastEthernet2/0 |
172.16.0.0/28 is subnetted, 6 subnets |
C 172.16.45.0 is directly connected, FastEthernet2/0 |
C 172.16.34.0 is directly connected, Ethernet1/0 |
C 172.16.24.0 is directly connected, FastEthernet0/0 |
O 172.16.22.0 [110/2] via 172.16.24.2, 00:00:54, FastEthernet0/0 |
O 172.16.12.0 [110/11113] via 172.16.34.3, 00:44:31, Tunnel0 |
O 172.16.13.0 [110/11112] via 172.16.34.3, 00:44:31, Tunnel0 |
S* 0.0.0.0/0 is directly connected, FastEthernet0/0 |
Wpis statyczny zastąpił ten z OSPF. Zobaczmy czy wciąż mamy łączność pingując ISP:
Type escape sequence to abort. |
Sending 5, 100-byte ICMP Echos to 61.61.61.2, timeout is 2 seconds: |
Success rate is 0 percent (0/5) |
Ping nagle przestał działać, teraz wyjście z polecenia traceroute
:
Type escape sequence to abort. |
Tracing the route to 61.61.61.2 |
1 172.16.24.2 24 msec 16 msec 20 msec |
2 172.16.24.4 24 msec 16 msec 20 msec |
To samo polecenie z R5:
Type escape sequence to abort. |
Tracing the route to 61.61.61.1 |
1 172.16.45.4 16 msec 8 msec 12 msec |
2 172.16.24.2 24 msec 36 msec 20 msec |
3 172.16.24.4 36 msec 28 msec 36 msec |
4 172.16.24.2 40 msec 36 msec 44 msec |
5 172.16.24.4 68 msec 44 msec 60 msec |
6 172.16.24.2 56 msec 80 msec 56 msec |
7 172.16.24.4 84 msec 60 msec 52 msec |
Problem występuje właśnie pomiędzy R4 i R2B. Zobaczmy tablice routingu od R2B:
Codes: C - connected, S - static, 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 |
i - IS-IS, su - IS-IS summary, 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 172.16.24.4 to network 0.0.0.0 |
172.16.0.0/28 is subnetted, 6 subnets |
O IA 172.16.45.0 [110/2] via 172.16.24.4, 00:05:12, FastEthernet1/0 |
O IA 172.16.34.0 [110/11] via 172.16.24.4, 00:05:12, FastEthernet1/0 |
C 172.16.24.0 is directly connected, FastEthernet1/0 |
C 172.16.22.0 is directly connected, FastEthernet0/0 |
O IA 172.16.12.0 [110/2] via 172.16.22.1, 00:05:12, FastEthernet0/0 |
O IA 172.16.13.0 [110/3] via 172.16.22.1, 00:05:12, FastEthernet0/0 |
O*IA 0.0.0.0/0 [110/2] via 172.16.24.4, 00:05:13, FastEthernet1/0 |
[110/2] via 172.16.22.1, 00:05:13, FastEthernet0/0 |
Odpowiedź mamy w ostatniej linice. Trasa domyślna wskazuje na dwie bramy: R2A i R4. Tak więc R4 wysyłając pakiet do R2B, dostaje go ponownie. Musimy pozbyć się tej trasy z tablicy routingu. Zwiększymy koszt OSPF dla interfejsu FastEthernet 1/0 routera R2B na wartość 2:
R2B(config)#interface fastEthernet 1/0 |
R2B(config-if)#ip ospf cost 2 |
Teraz trasa domyślna powinna wskazywać tylko przez R2B (koszt = 2). Trasa przez R4 zostanie odrzucona, ponieważ sztucznie zwiększyliśmy jej koszt (teraz koszt = 3):
Codes: C - connected, S - static, 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 |
i - IS-IS, su - IS-IS summary, 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 172.16.22.1 to network 0.0.0.0 |
172.16.0.0/28 is subnetted, 6 subnets |
O IA 172.16.45.0 [110/3] via 172.16.24.4, 00:01:02, FastEthernet1/0 |
O IA 172.16.34.0 [110/12] via 172.16.24.4, 00:01:02, FastEthernet1/0 |
C 172.16.24.0 is directly connected, FastEthernet1/0 |
C 172.16.22.0 is directly connected, FastEthernet0/0 |
O IA 172.16.12.0 [110/2] via 172.16.22.1, 00:01:02, FastEthernet0/0 |
O IA 172.16.13.0 [110/3] via 172.16.22.1, 00:01:02, FastEthernet0/0 |
O*IA 0.0.0.0/0 [110/2] via 172.16.22.1, 00:01:04, FastEthernet0/0 |
Świetnie, mamy tylko 1 wpis w tablicy routingu. Wypróbujmy ponownie traceroute
i ping
do ISP z R5:
Type escape sequence to abort. |
Tracing the route to 61.61.61.1 |
1 172.16.45.4 12 msec 16 msec 8 msec |
2 172.16.24.2 28 msec 12 msec 40 msec |
3 172.16.22.1 60 msec 92 msec 60 msec |
4 172.16.12.1 56 msec * 68 msec |
Type escape sequence to abort. |
Sending 5, 100-byte ICMP Echos to 61.61.61.1, timeout is 2 seconds: |
Success rate is 100 percent (5/5), round-trip min/avg/max = 52/59/68 ms |
Sukces, pakiety są kierowane przez obszar 24. Co ważne nie stracimy łączności jeśli łącze pomiędzy R2B i R4 przestanie działać. Wtedy w tablicy routingu od R4 automatycznie pojawi się trasa domyślna przez Tunnel 0 (OSPF):
*Mar 1 02:35:10.599: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.24.2 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached |
*Mar 1 02:35:12.591: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down |
*Mar 1 02:35:13.591: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down |
R4#show ip route | include 0.0.0.0 |
Gateway of last resort is 172.16.34.3 to network 0.0.0.0 |
O*E2 0.0.0.0/0 [110/1] via 172.16.34.3, 00:00:56, Tunnel0 |
Domyślna trasa prowadzi przez 172.16.34.3. Oczywiście R5 wciąż ma 100% łączność:
Type escape sequence to abort. |
Tracing the route to 61.61.61.2 |
1 172.16.45.4 16 msec 8 msec 12 msec |
2 172.16.34.3 28 msec 24 msec 36 msec |
3 172.16.13.1 40 msec 56 msec 40 msec |
4 61.61.61.2 64 msec * 76 msec |
Type escape sequence to abort. |
Sending 5, 100-byte ICMP Echos to 61.61.61.2, timeout is 2 seconds: |
Success rate is 100 percent (5/5), round-trip min/avg/max = 52/73/92 ms |
0 Komentarze.