OSPF Area Type
- Stub
- Totally Stubby
- NSSA
Dans notre exemple :
Le routeur R5 annonce en OSPF 10 sous réseaux 5.5.0.0 /24 à 5.5.9.0 /24
Le routeur R1 annonce en OSPF 10 sous réseaux 1.1.0.0 /24 à 1.1.9.0 /24
Le routeur R1 redistribue dans OSPF 5 sous réseaux 10.1.0.0 à 10.1.4.0/24
Table routage de R5 (Area 2) :
R5#show ip route 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 not set 1.0.0.0/24 is subnetted, 10 subnets O IA 1.1.0.0 [110/117] via 10.1.45.4, 00:00:04, FastEthernet0/0 O IA 1.1.1.0 [110/117] via 10.1.45.4, 00:00:04, FastEthernet0/0 O IA 1.1.2.0 [110/117] via 10.1.45.4, 00:00:04, FastEthernet0/0 O IA 1.1.3.0 [110/117] via 10.1.45.4, 00:00:04, FastEthernet0/0 O IA 1.1.4.0 [110/117] via 10.1.45.4, 00:00:04, FastEthernet0/0 O IA 1.1.5.0 [110/117] via 10.1.45.4, 00:00:04, FastEthernet0/0 O IA 1.1.6.0 [110/117] via 10.1.45.4, 00:00:04, FastEthernet0/0 O IA 1.1.7.0 [110/117] via 10.1.45.4, 00:00:05, FastEthernet0/0 O IA 1.1.8.0 [110/117] via 10.1.45.4, 00:00:05, FastEthernet0/0 O IA 1.1.9.0 [110/117] via 10.1.45.4, 00:00:05, FastEthernet0/0 2.0.0.0/24 is subnetted, 1 subnets O IA 2.2.2.0 [110/53] via 10.1.45.4, 00:00:05, FastEthernet0/0 3.0.0.0/24 is subnetted, 1 subnets O IA 3.3.3.0 [110/52] via 10.1.45.4, 00:00:05, FastEthernet0/0 4.0.0.0/24 is subnetted, 1 subnets O IA 4.4.4.0 [110/2] via 10.1.45.4, 00:00:05, FastEthernet0/0 5.0.0.0/24 is subnetted, 10 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 C 5.5.4.0 is directly connected, Loopback4 C 5.5.5.0 is directly connected, Loopback5 C 5.5.6.0 is directly connected, Loopback6 C 5.5.7.0 is directly connected, Loopback7 C 5.5.8.0 is directly connected, Loopback8 C 5.5.9.0 is directly connected, Loopback9 22.0.0.0/24 is subnetted, 1 subnets O IA 22.2.2.0 [110/53] via 10.1.45.4, 00:00:06, FastEthernet0/0 10.0.0.0/24 is subnetted, 9 subnets O IA 10.1.12.0 [110/116] via 10.1.45.4, 00:00:06, FastEthernet0/0 O E2 10.1.3.0 [110/20] via 10.1.45.4, 00:00:06, FastEthernet0/0 O E2 10.1.2.0 [110/20] via 10.1.45.4, 00:00:06, FastEthernet0/0 O E2 10.1.1.0 [110/20] via 10.1.45.4, 00:00:06, FastEthernet0/0 O E2 10.1.0.0 [110/20] via 10.1.45.4, 00:00:06, FastEthernet0/0 O E2 10.1.4.0 [110/20] via 10.1.45.4, 00:00:06, FastEthernet0/0 O IA 10.1.23.0 [110/52] via 10.1.45.4, 00:00:06, FastEthernet0/0 C 10.1.45.0 is directly connected, FastEthernet0/0 O IA 10.1.34.0 [110/51] via 10.1.45.4, 00:00:06, FastEthernet0/0 44.0.0.0/24 is subnetted, 1 subnets O 44.4.4.0 [110/2] via 10.1.45.4, 00:00:06, FastEthernet0/0
Configuration de l’AREA 2 en STUB
- Tous les routers de l’Area doivent être configurés avec la commande « area x stub »
- Les LSA de type 4 et 5 (E1 et E2) ne sont plus reçus
- Une route par défaut est injecté par l’ABR
R4#conf t R4(config)#router ospf 1 R4(config-router)#area 2 stub
R5#conf t R5(config)#router ospf 1 R5(config-router)#area 2 stub
Vérification :
R5#show ip route ospf 1.0.0.0/24 is subnetted, 10 subnets O IA 1.1.0.0 [110/117] via 10.1.45.4, 00:00:13, FastEthernet0/0 O IA 1.1.1.0 [110/117] via 10.1.45.4, 00:00:13, FastEthernet0/0 O IA 1.1.2.0 [110/117] via 10.1.45.4, 00:00:13, FastEthernet0/0 O IA 1.1.3.0 [110/117] via 10.1.45.4, 00:00:13, FastEthernet0/0 O IA 1.1.4.0 [110/117] via 10.1.45.4, 00:00:13, FastEthernet0/0 O IA 1.1.5.0 [110/117] via 10.1.45.4, 00:00:13, FastEthernet0/0 O IA 1.1.6.0 [110/117] via 10.1.45.4, 00:00:13, FastEthernet0/0 O IA 1.1.7.0 [110/117] via 10.1.45.4, 00:00:13, FastEthernet0/0 O IA 1.1.8.0 [110/117] via 10.1.45.4, 00:00:13, FastEthernet0/0 O IA 1.1.9.0 [110/117] via 10.1.45.4, 00:00:13, FastEthernet0/0 2.0.0.0/24 is subnetted, 1 subnets O IA 2.2.2.0 [110/53] via 10.1.45.4, 00:00:13, FastEthernet0/0 3.0.0.0/24 is subnetted, 1 subnets O IA 3.3.3.0 [110/52] via 10.1.45.4, 00:00:13, FastEthernet0/0 4.0.0.0/24 is subnetted, 1 subnets O IA 4.4.4.0 [110/2] via 10.1.45.4, 00:00:13, FastEthernet0/0 22.0.0.0/24 is subnetted, 1 subnets O IA 22.2.2.0 [110/53] via 10.1.45.4, 00:00:14, FastEthernet0/0 10.0.0.0/24 is subnetted, 4 subnets O IA 10.1.12.0 [110/116] via 10.1.45.4, 00:00:14, FastEthernet0/0 O IA 10.1.23.0 [110/52] via 10.1.45.4, 00:00:14, FastEthernet0/0 O IA 10.1.34.0 [110/51] via 10.1.45.4, 00:00:14, FastEthernet0/0 44.0.0.0/24 is subnetted, 1 subnets O 44.4.4.0 [110/2] via 10.1.45.4, 00:00:14, FastEthernet0/0 O*IA 0.0.0.0/0 [110/2] via 10.1.45.4, 00:00:14, FastEthernet0/0
Configuration de l’AREA 2 en « Totally Stubby »
- L’ABR doit être configuré avec la commande « area x stub no-summary »
- Les autres routeurs de l’Area doivent être configurés avec la commande « area x stub »
- Les LSA de type 3, 4 et 5 ne sont plus reçus
- Une route par défaut est injecté par l’ABR
R4#conf t R4(config)#router ospf 1 R4(config-router)#area 2 stub no-summary
Vérification
R5#show ip route ospf 44.0.0.0/24 is subnetted, 1 subnets O 44.4.4.0 [110/2] via 10.1.45.4, 00:00:49, FastEthernet0/0 O*IA 0.0.0.0/0 [110/2] via 10.1.45.4, 00:00:04, FastEthernet0/0
Configuration de l’AREA 2 en « NSSA »
- Tous les routers de l’Area doivent être configurés avec la commande « area x nssa »
- Seuls les LSA de type 1,2,3 et 7 sont traités
- Par défaut, en mode NSSA, aucunne route par défaut n’est injectée
R4#conf t R4(config)#router ospf 1 R4(config-router)#area 2 nssa R5#conf t R5(config)#router ospf 1 R5(config-router)#area 2 nssa
Vérification
R5#show ip route ospf 1.0.0.0/24 is subnetted, 10 subnets O IA 1.1.0.0 [110/117] via 10.1.45.4, 00:01:12, FastEthernet0/0 O IA 1.1.1.0 [110/117] via 10.1.45.4, 00:01:12, FastEthernet0/0 O IA 1.1.2.0 [110/117] via 10.1.45.4, 00:01:12, FastEthernet0/0 O IA 1.1.3.0 [110/117] via 10.1.45.4, 00:01:12, FastEthernet0/0 O IA 1.1.4.0 [110/117] via 10.1.45.4, 00:01:12, FastEthernet0/0 O IA 1.1.5.0 [110/117] via 10.1.45.4, 00:01:12, FastEthernet0/0 O IA 1.1.6.0 [110/117] via 10.1.45.4, 00:01:12, FastEthernet0/0 O IA 1.1.7.0 [110/117] via 10.1.45.4, 00:01:12, FastEthernet0/0 O IA 1.1.8.0 [110/117] via 10.1.45.4, 00:01:12, FastEthernet0/0 O IA 1.1.9.0 [110/117] via 10.1.45.4, 00:01:12, FastEthernet0/0 2.0.0.0/24 is subnetted, 1 subnets O IA 2.2.2.0 [110/53] via 10.1.45.4, 00:01:12, FastEthernet0/0 3.0.0.0/24 is subnetted, 1 subnets O IA 3.3.3.0 [110/52] via 10.1.45.4, 00:01:12, FastEthernet0/0 4.0.0.0/24 is subnetted, 1 subnets O IA 4.4.4.0 [110/2] via 10.1.45.4, 00:01:12, FastEthernet0/0 22.0.0.0/24 is subnetted, 1 subnets O IA 22.2.2.0 [110/53] via 10.1.45.4, 00:01:13, FastEthernet0/0 10.0.0.0/24 is subnetted, 4 subnets O IA 10.1.12.0 [110/116] via 10.1.45.4, 00:01:13, FastEthernet0/0 O IA 10.1.23.0 [110/52] via 10.1.45.4, 00:01:13, FastEthernet0/0 O IA 10.1.34.0 [110/51] via 10.1.45.4, 00:01:13, FastEthernet0/0 44.0.0.0/24 is subnetted, 1 subnets O 44.4.4.0 [110/2] via 10.1.45.4, 00:01:13, FastEthernet0/0
NSSA: Injection d’une route par défaut
R4(config)#router ospf 1 R4(config-router)#area 1 nssa default-information-originate R5#show ip route ospf | inc 0.0.0.0/0 O*N2 0.0.0.0/0 [110/1] via 10.1.45.4, 00:01:25, FastEthernet0/0
NSSA: Filtrer les LSA de type 3
R4(config)#router ospf 1 R4(config-router)#area 2 nssa no-summary R5#show ip route ospf 44.0.0.0/24 is subnetted, 1 subnets O 44.4.4.0 [110/2] via 10.1.45.4, 00:13:18, FastEthernet0/0 O*IA 0.0.0.0/0 [110/2] via 10.1.45.4, 00:00:02, FastEthernet0/0
Modification du cout OSPF de la route par défaut
R4(config)#router ospf 1 R4(config-router)#area 2 default-cost 50
R5#show ip route ospf 44.0.0.0/24 is subnetted, 1 subnets O 44.4.4.0 [110/2] via 10.1.45.4, 00:17:21, FastEthernet0/0 O*IA 0.0.0.0/0 [110/51] via 10.1.45.4, 00:00:05, FastEthernet0/0