Ti è stato assegnato il compito di configurare la rete mostrata nella Figura 5-13 utilizzando RIPv2 in modo che:
1. Tutte le interfacce su ogni router sono annunciate in RIP
2. RouterC non dovrebbe apprendere percorsi dal resto della rete. Dovrebbe utilizzare un percorso predefinito per raggiungere le reti remote. Tutti i router dovrebbero apprendere la rete 172.20.0.0/16 utilizzando RIP
3. Tutte le interfacce che non si connettono a un altro router, ad esempio, non annunciano percorsi RIP.
4. Ricordare che il lato DCE del cavo back to back DTE / DCE deve essere collegato all’interfaccia configurata con la frequenza di clock.
Figura 5-13 Configurazione della rete per Lab 5-1
Di seguito viene fornita la configurazione iniziale di ogni router
RouterARouter (config) #hostname RouterA
RouterA (config) #int fa0 / 0
RouterA (config-if) #ip address 172.16.0.1 255.255.0.0
RouterA (config-if) #no shut
RouterA (config-if) #exit
RouterA ( config) #int s0 / 0
RouterA (config-if) #ip address 192.168.1.1 255.255.255.252
RouterA (config-if) #no shut
RouterA (config-if) #exit
RouterA (config) #int s0 / 1
RouterA ( config-if) #ip address 192.168.1.9 255.255.255.252
RouterA (config-if) #no shut
RouterA (config-if) #exit
RouterBRouter (config) #hostname RouterB
RouterB (config) #int fa0 / 0
RouterB (config-if) #ip address 192.168.1.5 255.255.255.252
RouterB (config-if) #no shut
RouterB (config-if) #exit
RouterB ( config) #int s0 / 0
RouterB (config-if) #ip add 192.168.1.2 255.255.255.252
RouterB (config-if) #clock rate 2000000
RouterB (config-if) #no shut
RouterB (config-if) #exit
RouterB (config) #int s0 / 1
RouterB (config-if) #ip address 192.168.1.13 255.255.255.252
RouterB (config-if) #clock rate 2000000
RouterB (config-if) #no shut
RouterB (config-if) #exit
RouterB (config) #int fa0 / 1
RouterB (config-if) #ip address 172.18.0.2 255.255.0.0
RouterB (config-if) #no shut
RouterB (config-if) #exit
RouterCRouter (config) #hostname RouterC
RouterC (config) #int fa0 / 0
RouterC (config-if) #ip address 192.168.1.6 255.255.255.252
RouterC (config-if) #no shut
RouterC (config-if) #exit
RouterC ( config) #int s0 / 0
RouterC (config-if) #ip address 172.20.0.3 255.255.0.0
RouterC (config-if) #no shut
RouterC (config-if) #exit
RouterDRouter (config) #hostname RouterD
RouterD (config) #int fa0 / 0
RouterD (config-if) #ip address 172.17.0.4 255.255.0.0
RouterD (config-if) #no shut
RouterD (config-if) #exit
RouterD ( config) #int s0 / 0
RouterD (config-if) #clock rate 2000000
RouterD (config-if) #ip address 192.168.1.17 255.255.255.252
RouterD (config-if) #no shut
RouterD (config-if) #exit
RouterD (config) #int s0 / 1
RouterD (config-if) #ip address 192.168.1.10 255.255.255.252
RouterD (config-if) #clock rate 2000000
RouterD (config-if) #no shut
RouterD (config-if) #exit
RouterERouter (config) #hostname RouterE
RouterE (config) #int fa0 / 0
RouterE (config-if) #ip address 172.19.0.5 255.255.0.0
RouterE (config-if) #no shut
RouterE (config-if) #exit
RouterE ( config) #int s0 / 0
RouterE (config-if) #ip address 192.168.1.18 255.255.255.252
RouterE (config-if) #no shut
RouterE (config-if) #exit
RouterE (config) #int s0 / 1
RouterE ( config-if) #ip indirizzo 192.168.1.14 255.255.255.252
RouterE (config-if) #no shut
RouterE (config-if) #exit
Soluzione
Innanzitutto, ogni interfaccia su ogni router deve essere aggiunta in RIP e la versione 2 deve essere abilitata:
RouterA (config) #router rip
RouterA (config-router) #version 2
RouterA (config-router) #network 192.168.1.0
RouterA (config-router) #network 172.16.0.0
RouterA (config-router) #end
RouterB (config) #router rip
RouterB (config-router) #version 2
RouterB (config-router) #network 192.168.1.0
RouterB (config-router) #network 172.18.0.0
RouterB (config-router) #end
RouterC (config) #router rip
RouterC (config-router) #version 2
RouterC (config-router) #network 192.168.1.0
RouterC (config-router) #network 172.20.0.0
RouterC (config-router) #end
RouterD (config) #router rip
RouterD (config-router) #version 2
RouterD (config-router) #network 192.168.1.0
RouterD (config-router) #network 172.17.0.0
RouterD (config-router) #end
RouterE (config) #router rip
RouterE (config-router) #version 2
RouterE (config-router) #network 192.168.1.0
RouterE (config-router) #network 172.19.0.0
RouterE (config-router) #end
Il secondo elemento nell’elenco afferma che RouterC non dovrebbe apprendere alcun percorso dal resto della rete, mentre il resto della rete dovrebbe apprendere percorsi originati da esso. RouterC deve anche avere un percorso predefinito per il resto della rete. Per ottenere ciò, l’interfaccia f0 / 0 di RouterB deve essere resa passiva in modo che non annunci i percorsi in uscita da questa interfaccia a RouterC mentre apprende ancora i percorsi pubblicizzati da RouterC. La configurazione richiesta è mostrata di seguito:
RouterB (config) #router rip
RouterB (config-router) # passive-interface fa0 / 0
RouterC (config) #ip route 0.0.0.0 0.0.0.0 192.168.1.5
L’ultimo elemento nell’elenco afferma che le rotte non devono essere pubblicizzate su interfacce che non si connettono a un altro router. Ciò richiede che alcune interfacce su tutti i router siano passive:
RouterA (config) #router rip
RouterA (config-router) # passive-interface fa0 / 0
RouterB (config) #router rip
RouterB (config-router) # passive-interface fa0 / 1
RouterC (config) #router rip
RouterC (config-router) # passive-interface s0 / 0
RouterD (config) #router rip
RouterD (config-router) # passive-interface fa0 / 0
RouterE (config) #router rip
RouterE (config-router) # passive-interface fa0 / 0
Verifica
Per verificare la soluzione, controlla prima la tabella di instradamento su ogni router. La tabella di instradamento dovrebbe assomigliare all’output mostrato di seguito:
RouterA#sh ip route
–output truncated—
Gateway of last resort is not set
R 172.17.0.0/16 [120/1] via 192.168.1.10, 00:00:10, Serial0/1
C 172.16.0.0/16 is directly connected, FastEthernet0/0
R 172.19.0.0/16 [120/2] via 192.168.1.10, 00:00:10, Serial0/1
[120/2] via 192.168.1.2, 00:00:01, Serial0/0
R 172.18.0.0/16 [120/1] via 192.168.1.2, 00:00:01, Serial0/0
R 172.20.0.0/16 [120/2] via 192.168.1.2, 00:00:01, Serial0/0
192.168.1.0/30 is subnetted, 5 subnets
C 192.168.1.8 is directly connected, Serial0/1
R 192.168.1.12 [120/1] via 192.168.1.2, 00:00:01, Serial0/0
C 192.168.1.0 is directly connected, Serial0/0
R 192.168.1.4 [120/1] via 192.168.1.2, 00:00:01, Serial0/0
R 192.168.1.16 [120/1] via 192.168.1.10, 00:00:10, Serial0/1
RouterB#sh ip route
–output truncated–
Gateway of last resort is not set
R 172.17.0.0/16 [120/2] via 192.168.1.14, 00:00:04, Serial0/1
[120/2] via 192.168.1.1, 00:00:02, Serial0/0
R 172.16.0.0/16 [120/1] via 192.168.1.1, 00:00:02, Serial0/0
R 172.19.0.0/16 [120/1] via 192.168.1.14, 00:00:04, Serial0/1
C 172.18.0.0/16 is directly connected, FastEthernet0/1
R 172.20.0.0/16 [120/1] via 192.168.1.6, 00:00:25, FastEthernet0/0
192.168.1.0/30 is subnetted, 5 subnets
R 192.168.1.8 [120/1] via 192.168.1.1, 00:00:02, Serial0/0
C 192.168.1.12 is directly connected, Serial0/1
C 192.168.1.0 is directly connected, Serial0/0
C 192.168.1.4 is directly connected, FastEthernet0/0
R 192.168.1.16 [120/1] via 192.168.1.14, 00:00:04, Serial0/1
RouterC#sh ip route
–output truncated–
Gateway of last resort is 192.168.1.5 to network 0.0.0.0
C 172.20.0.0/16 is directly connected, Serial0/0
192.168.1.0/30 is subnetted, 1 subnets
C 192.168.1.4 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 192.168.1.5
RouterD#sh ip route
–output truncated—
Gateway of last resort is not set
C 172.17.0.0/16 is directly connected, FastEthernet0/0
R 172.16.0.0/16 [120/1] via 192.168.1.9, 00:00:24, Serial0/1
R 172.19.0.0/16 [120/1] via 192.168.1.18, 00:00:01, Serial0/0
R 172.18.0.0/16 [120/2] via 192.168.1.18, 00:00:01, Serial0/0
[120/2] via 192.168.1.9, 00:00:24, Serial0/1
R 172.20.0.0/16 [120/3] via 192.168.1.18, 00:00:01, Serial0/0
[120/3] via 192.168.1.9, 00:00:24, Serial0/1
192.168.1.0/30 is subnetted, 5 subnets
C 192.168.1.8 is directly connected, Serial0/1
R 192.168.1.12 [120/1] via 192.168.1.18, 00:00:01, Serial0/0
R 192.168.1.0 [120/1] via 192.168.1.9, 00:00:24, Serial0/1
R 192.168.1.4 [120/2] via 192.168.1.18, 00:00:01, Serial0/0
[120/2] via 192.168.1.9, 00:00:24, Serial0/1
C 192.168.1.16 is directly connected, Serial0/0
RouterE#sh ip route
–output truncated–
Gateway of last resort is not set
R 172.17.0.0/16 [120/1] via 192.168.1.17, 00:00:09, Serial0/0
R 172.16.0.0/16 [120/2] via 192.168.1.17, 00:00:09, Serial0/0
[120/2] via 192.168.1.13, 00:00:19, Serial0/1
C 172.19.0.0/16 is directly connected, FastEthernet0/0
R 172.18.0.0/16 [120/1] via 192.168.1.13, 00:00:19, Serial0/1
R 172.20.0.0/16 [120/2] via 192.168.1.13, 00:00:19, Serial0/1
192.168.1.0/30 is subnetted, 5 subnets
R 192.168.1.8 [120/1] via 192.168.1.17, 00:00:09, Serial0/0
C 192.168.1.12 is directly connected, Serial0/1
R 192.168.1.0 [120/1] via 192.168.1.13, 00:00:19, Serial0/1
R 192.168.1.4 [120/1] via 192.168.1.13, 00:00:19, Serial0/1
C 192.168.1.16 is directly connected, Serial0/0
Negli output precedenti si noti che RouterC non ha percorsi RIP ma tutti gli altri router conoscono la rete 172.20.0.0/16.
Una verifica finale può essere eseguita inviando un ping a 172.20.0.3 (interfaccia s0 / 0 di RouterC) da RouterD come mostrato di seguito:
RouterD#ping 172.20.0.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.20.0.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/8/8 ms