Aprile 2004 Ultimo aggiornamento - Aggiornamenti successivi vai a libro routing -

 

 

 

Esempi sulla propagazione della route di default in RIP-IGRP-EIGRP



Nell'esempio a seguire due router, "itesys1" e "itesys2" sono collegati tra loro tramite WAN. Il router "itesys2" ha accesso ad internet tramite un gateway in LAN, con IP 192.168.0.2. L'esempio mostra come propagano questa route di default RIP, IGRP e EIGRP

 

Ecco il router "itesys2" con una corretta e funzionante configurazione con RIP:

... snip ...

!

interface FastEthernet0/0

ip address 192.168.0.2 255.255.255.0

no ip directed-broadcast

duplex auto

speed auto

!

interface Serial0/0

ip address 128.10.10.2 255.255.255.252

no ip directed-broadcast

no ip mroute-cache

no fair-queue

!

interface FastEthernet0/1

no ip address

no ip directed-broadcast

shutdown

duplex auto

speed auto

!

router rip

network 128.10.0.0

network 192.168.0.0

default-information originate

!

ip classless

ip route 0.0.0.0 0.0.0.0 192.168.0.1

Sovrapponiamo al RIP di "itesys2" una configurazione IGRP:

itesys2#conf t

itesys2(config)#router igrp 10

itesys2(config-router)#network 128.10.10.0

itesys2(config-router)#network 192.168.190.0

Vediamo cosa succede al router adiacente (che ha sia RIP che IGRP):

itesys1#sh 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 128.10.10.2 to network 0.0.0.0

C 192.168.94.0/24 is directly connected, FastEthernet0/0
128.10.0.0/30 is subnetted, 1 subnets
C 128.10.10.0 is directly connected, Serial0/0
I 192.168.0.0/24 [100/8486] via 128.10.10.2, 00:00:00, Serial0/0
R* 0.0.0.0/0 [120/1] via 128.10.10.2, 00:00:25, Serial0/0

IGRP non propaga la route di default cosi' non la sovrascrive. Le altre route RIP sono sovrascritte a causa della minore AD di IRGP.

Adesso togliamo il RIP. Ad 'itesys2' facciamo propagare tramite IGRP la route di default. "default-information originate" non funziona cosi' come non funziona "redistribute static" o "ip default-gateway". E' necessario l'uso di "ip default-network":

itesys2#conf t

Enter configuration commands, one per line. End with CNTL/Z.

itesys2(config)#ip default-network ?

A.B.C.D IP address of default network

itesys2(config)#ip default-network 192.168.0.0

itesys2(config)#exit

itesys2#sh run

Building configuration...

...snip...

!

router igrp 10

network 128.10.0.0

network 192.168.0.0

!

ip classless

ip default-network 192.168.0.0

ip route 0.0.0.0 0.0.0.0 192.168.0.1

ip route 192.168.0.0 255.255.255.0 192.168.0.1

...snip...

itesys2#sh 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 192.168.0.1 to network 0.0.0.0

I 192.168.94.0/24 [100/8486] via 128.10.10.1, 00:00:05, Serial0/0
128.10.0.0/30 is subnetted, 1 subnets
C 128.10.10.0 is directly connected, Serial0/0
C* 192.168.0.0/24 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 192.168.0.1

Notate come la Fast0/0 abbia adesso C* nella tabella di routing. Questa informazione sara' propagata da IGRP:

 

itesys1#sh 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 128.10.10.2 to network 192.168.0.0

C 192.168.94.0/24 is directly connected, FastEthernet0/0
128.10.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 128.10.10.0/30 is directly connected, Serial0/0
D 128.10.0.0/16 is a summary, 00:01:42, Null0
D* 192.168.0.0/24 [90/2172416] via 128.10.10.2, 00:01:16, Serial0/0

Adesso aggiungiamo EIGRP ad 'itesys2' e togliamo "ip default-network":

...snip...

!

router eigrp 15

network 128.10.0.0

network 192.168.0.0

!

router igrp 10

network 128.10.0.0

network 192.168.0.0

!

ip classless

ip route 0.0.0.0 0.0.0.0 192.168.0.1

ip route 192.168.0.0 255.255.255.0 192.168.0.1

no ip http server

 

itesys1#sh 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 128.10.10.2 to network 192.168.0.0

C 192.168.94.0/24 is directly connected, FastEthernet0/0
128.10.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 128.10.10.0/30 is directly connected, Serial0/0
D 128.10.0.0/16 is a summary, 00:02:23, Null0
D 192.168.0.0/24 [90/2172416] via 128.10.10.2, 00:00:25, Serial0/0

itesys1#exit

togliamo "ip default-network" e, per propagare la route di default con EIGRP usiamo "redistribute static":

 

itesys2(config)#router eigrp 15

itesys2(config-router)#redistribute static

itesys2(config-router)#exit

itesys2(config)#exit

 

itesys1#sh 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 128.10.10.2 to network 0.0.0.0

C 192.168.94.0/24 is directly connected, FastEthernet0/0
128.10.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 128.10.10.0/30 is directly connected, Serial0/0
D 128.10.0.0/16 is a summary, 00:02:57, Null0
D 192.168.0.0/24 [90/2172416] via 128.10.10.2, 00:00:59, Serial0/0
D*EX 0.0.0.0/0 [170/2172416] via 128.10.10.2, 00:00:14, Serial0/0

itesys1#

Per EIGRP avremmo potuto utilizzare anche "ip default-network"