1 L.A. Steffenel
OSPF Avancé - CCNP
2 L.A. Steffenel
Rappel sur OSPF
• Protocole ouvert (IETF, 1992) • Standard Internet pour les réseaux locaux
• Protocole basé sur l'état des liens • Utilisation de l'algorithme Shortest Path First (SPF) de Dijkstra Link State
1 – Flooding of link-state information
2 – Building a 3 – SPF Algorithm
5 – Routing Table
Topological Database
4 – SPF Tree
Link State
1 – Flooding of link-state information
2 – Building a 3 – SPF Algorithm
5 – Routing Table
Topological Database
4 – SPF TreeTable de Routage
Link State
1 – Flooding of link-state information
2 – Building a 3 – SPF Algorithm
5 – Routing Table
Topological Database
4 – SPF Tree
Inondation du réseau avec des informations
sur l'état des liens
Construction d'une
base de données
topologique
Algorithme SPF et
construction de l'arbre SPF
Remplissage de la table de routage
3 L.A. Steffenel
Rappel sur OSPF – les paramètres
• Les routeurs OSPF envoient des paquets Hello OSPF sur les interfaces activées : • À chaque 10s par défaut sur les segments multi-accès et point-à-point
• À chaque 30s par défaut sur les segments NBMA (Frame Relay, etc)
• Dans la plupart des cas les paquets OSPF Hello sont envoyés en multicast (224.0.0.5)
• Hello Interval – les intervalles par défaut de 10s ou 30s (sur les routeurs Cisco) peuvent être changés avec la commande ip ospf hello-interval
• Router Dead Interval – L'intervalle qu'un routeur attend un message Hello avant de suspecter un voisin et le retirer de sa table
• Les routeurs Cisco utilisent par défaut un facteur 4x sur le HelloInterval ; ce paramètre peut être toutefois changé avec la commande ip ospf dead-interval
• Note : Pour réussir une adjacence les paramètres Hello Interval, Dead Interval et type de réseau doivent être identiques
• Dans le cas contraires les paquets Hello sont ignorés
4 L.A. Steffenel
Types de Réseaux
• show ip ospf interface
• Broadcast Multiaccès • Ethernet, Token Ring, FDDI
• Non-Broadcast Multiaccès • Frame Relay, X.25
• Point-à-point • PPP, HDLC
• Point-à-multipoint • Configuré par l'administrateur
• Généralement le type de réseau n'affecte rien, sauf en Frame Relay • Dans ce cas, plusieurs admins préfèrent utiliser des liens point-à-point ou point-à-
multipoint pour le NMBA, évitant ainsi les problèmes avec les DR/BDR
Network Types
show ip ospf interface
Unless you are configuring an NBMA network like Frame Relay, this won’t be an issue.
• Many administrators prefer to use point-to-point or point-to-multipoint for NMBA to avoid the DR/BDR and full-mesh issues.
5 L.A. Steffenel
Configuration OSPF de Base
• Activer un ou plusieurs processus de routage
• Définir les interfaces sur lesquelles OSPF tournera
• Méthode optionnelle pour activer OSPF explicitement sur une interface
Configuring Basic OSPF
t f id [ f ]Router(config)#
router ospf process-id [vrf vpn-name]
� Enable one or more OSPF routing processes.
network ip-address wildcard-mask area area-idRouter(config-router)#
� Define the interfaces that OSPF will run on.
Router(config-if)#Router(config if)#
ip ospf process-id area area-id [secondaries none]
� Optional method to enable OSPF explicitly on an interface.
Configuring Basic OSPF
t f id [ f ]Router(config)#
router ospf process-id [vrf vpn-name]
� Enable one or more OSPF routing processes.
network ip-address wildcard-mask area area-idRouter(config-router)#
� Define the interfaces that OSPF will run on.
Router(config-if)#Router(config if)#
ip ospf process-id area area-id [secondaries none]
� Optional method to enable OSPF explicitly on an interface.
Configuring Basic OSPF
t f id [ f ]Router(config)#
router ospf process-id [vrf vpn-name]
� Enable one or more OSPF routing processes.
network ip-address wildcard-mask area area-idRouter(config-router)#
� Define the interfaces that OSPF will run on.
Router(config-if)#Router(config if)#
ip ospf process-id area area-id [secondaries none]
� Optional method to enable OSPF explicitly on an interface.
6 L.A. Steffenel
Configuration de OSPF
7 L.A. Steffenel
La métrique OSPF - Coût
• Cisco utilise un coût basé sur le débit • Coût = 108 / débit
• Quelques valeurs par défaut • Lien série 56-kbps = 1785
• T1 (Lien série 1.544-Mbps) = 64
• Ethernet = 10
• Fast Ethernet = 1
• Problème : Gigabit Ethernet (ou d'autres réseaux rapides) = 1
• Notes • Les interfaces séries sont par défaut configurées comme des liens T1 (1.544Mbps) ; la
commande bandwidth permet de modifier ces valeurs
• ospf auto-cost reference-bandwidth reference-bandwidth peut être utilisé pour modifier le débit de référence (et donc la formule) dans le cas des réseaux plus rapides
Valeur de référence = débit Fast Ethernet !!!
8 L.A. Steffenel
Modification de la Métrique Coût
• Modifier la valeur de référence • défaut 100Mbps (Fast Ethernet)
• les valeurs peuvent varier entre 1 et 4294967 Mbps
• Parfois on ne veut pas modifier la valeur de référence globale • Ex : lorsque le routeur doit parler à un routeur non-Cisco
• La commande ip ospf cost permet de définir un coût entre 1 et 65535 directement pour une interface
Changing the Cost Metric
• The cost, or metric, is an indication of the overhead to send packets over an interface Default = (100 Mbps)/(bandwidthpackets over an interface. Default (100 Mbps)/(bandwidth in Mbps).
RouterA(config-router)#
auto-cost reference-bandwidth ref-bw
( g )#
� Sets the reference bandwidth to values other than 100 Mbps
R t A( fi if)#
Sets the reference bandwidth to values other than 100 Mbps (legal values range from 1 to 4,294,967 in Mbps).
ip ospf cost interface-cost
RouterA(config-if)#
� Overrides the default cost calculation Values from 1 to� Overrides the default cost calculation. Values from 1 to 65535 can be defined.
Changing the Cost Metric
• The cost, or metric, is an indication of the overhead to send packets over an interface Default = (100 Mbps)/(bandwidthpackets over an interface. Default (100 Mbps)/(bandwidth in Mbps).
RouterA(config-router)#
auto-cost reference-bandwidth ref-bw
( g )#
� Sets the reference bandwidth to values other than 100 Mbps
R t A( fi if)#
Sets the reference bandwidth to values other than 100 Mbps (legal values range from 1 to 4,294,967 in Mbps).
ip ospf cost interface-cost
RouterA(config-if)#
� Overrides the default cost calculation Values from 1 to� Overrides the default cost calculation. Values from 1 to 65535 can be defined.
9 L.A. Steffenel
Router ID
• Le routeur est identifié par son numéro RouterID • Les paquets LSDB utilisent ces RouterID pour différencier les routeurs
• Par défaut, le RouterID est la plus grande adresse IP parmi les interfaces actives lorsque le processus OSPF a démarré
• Si aucune interface est active, le message suivant est affiché :
• Si une interface loopback est présente, le RouterID est celui de la plus grande adresse IP des interfaces loopback actives
• La commande router-id peut être utilisée pour définir manuellement le RouterID
• Il est recommandé d'utiliser une interface loopback ou de router-id pour des fins de stabilité du réseau
OSPF Router ID
• The router is known to OSPF by the OSPF router ID number.• LSDBs use the OSPF router ID to differentiate one router from the
nextnext.• By default, the router ID is the highest IP address on an active
interface at the moment of OSPF process startup.If no interface is up when the OSPF process starts you will get the following error message:If no interface is up when the OSPF process starts, you will get the following error message:
R1(config)#router ospf 1
2w1d: %OSPF-4-NORTRID: OSPF process 1 cannot start.
• If a loopback interface exists, the router ID is the highest IP address on any active loopback interface.
• The OSPF router-id command can be used to override the OSPF router ID.
• Using a loopback interface or a router-id command is recommended for stability.y
10 L.A. Steffenel
La commande OSPF router-id
• Cette commande permet de configurer un RouterID • Possibilité de configurer différents RouterID si plusieurs processus OSPF tournent
• N'importe quelle valeur unique au format d'une adresse IPv4 (décimale pointée) peut être utilisée
• Si la commande est lancée sur un processus OSPF déjà actif, le nouveau identifiant ne sera utilisé que lors du prochain redémarrage ou après la réinitialisation manuelle du processus OSPF :
OSPF router-id Command
router-id ip-addressRouter(config-router)#
� This command is configured under the router ospf [process-id]command.A i bit 32 bit l i IP dd f t (d tt d d i l)� Any unique arbitrary 32-bit value in an IP address format (dotted decimal) can be used.
� If this command is used on an OSPF process that is already active, then the t ID t k ff t ft th t l d ft l t ti fnew router ID takes effect after the next reload or after a manual restarting of
the OSPF process using:
Router#clear ip ospf process
Router(config)#router ospf 1Router(config-router)#router-id 172.16.1.1
Router#clear ip ospf process
OSPF router-id Command
router-id ip-addressRouter(config-router)#
� This command is configured under the router ospf [process-id]command.A i bit 32 bit l i IP dd f t (d tt d d i l)� Any unique arbitrary 32-bit value in an IP address format (dotted decimal) can be used.
� If this command is used on an OSPF process that is already active, then the t ID t k ff t ft th t l d ft l t ti fnew router ID takes effect after the next reload or after a manual restarting of
the OSPF process using:
Router#clear ip ospf process
Router(config)#router ospf 1Router(config-router)#router-id 172.16.1.1
Router#clear ip ospf process
11 L.A. Steffenel
OSPF sur des réseaux NBMA
• La RFC 2328 définit les modes suivants : • Non-broadcast (NBMA)
• Point-à-multipoint
• Cisco rajoute ces autres modes : • Point-à-multipoint non-broadcast
• Broadcast
• Point-à-point
• Le type d'interface peut être défini avec la commande suivante :
OSPF over NBMA Topology Modes of OperationOperation
• RFC 2328 -compliant modes are as follows:N b d t (NBMA)Nonbroadcast (NBMA)Point-to-multipoint
• Additional modes from Cisco are as follows:Additional modes from Cisco are as follows:Point-to-multipoint nonbroadcastBroadcastPoint-to-point
Router(config if)#
ip ospf network [{broadcast | non-broadcast | point-to-multipoint [non-broadcast] | point-to-point}]
Router(config-if)#
� This interface command defines OSPF network type.
12 L.A. Steffenel
Mode Non-Broadcast (RFC)
• Un seul sous-réseau IP
• Les voisins doivent être configurés manuellement
• Le DR et le BDR doivent être élus • Le DR et le BDR doivent avoir une
connectivité totale aux autres routeurs
• Configuration utilisée typiquement dans une topologie "full mesh"
R1(config-if)#ip ospf network non-broadcast -------- R1(config-router)#network 10.1.1.0 0.0.0.255 area 0 R1(config-router)#neighbor 10.1.1.2 R1(config-router)#neighbor 10.1.1.3
13 L.A. Steffenel
Mode Point-à-Multipoint (RFC)
• Un seul sous-réseau IP
• Utilise le multicast des paquets OSPF Hello pour découvrir les voisins
• DR et BDR ne sont pas nécessaires
• Typiquement utilisé dans un mesh partiel ou dans une topologie "hub and spoke"
RA(config-if)#ip ospf network point-to-multipoint -------- RA(config-router)#network 192.168.1.0 0.0.0.255 area 0
14 L.A. Steffenel
Mode Point-à-Multipoint Non-Broadcast (Cisco)
• Extension Cisco du mode RFC point-to-multipoint
• Doit définir statiquement les voisins, comme dans le mode nonbroadcast
• Comme dans le mode point-à-multipoint, DR/BDR ne sont pas élus
• Utilisé dans des cas spéciaux où les voisins ne peuvent pas être découverts
RA(config-if)#ip ospf network point-to-multipoint non-broadcast -------- RA(config-router)#network 192.168.1.0 0.0.0.255 area 0 RA(config-router)#neighbor 192.168.1.2 cost 10 RA(config-router)#neighbor 192.168.1.3 cost 20
15 L.A. Steffenel
Mode Broadcast (Cisco)
• Fait un WAN paraître comme un LAN
• Un seul sous-réseau IP
• Utilise multicast pour découvrir les voisins
• DR et BDR sont élus
• Requiert un full mesh
R1(config-if)#ip ospf network broadcast -------- R1(config-router)#network 10.1.1.0 0.0.0.255 area 0
16 L.A. Steffenel
Mode Point-à-Point (Cisco)
• Un sous-réseau IP par sous-interface
• DR et BDR ne sont pas élus
• Utilisé quand seul deux routeurs doivent former une adjacence
• Conservent les mêmes propriétés qu'une interface physique point-à-point
RTA(config)#interface serial 0/0/0.1 RTA(config-subif)#ip address 192.168.1.1 255.255.255.0 RTA(config-subif)#interface serial 0/0/0.2 RTA(config-subif)#ip address 192.168.2.1 255.255.255.0 -------- RTA(config-router)#network 192.168.1.0 0.0.0.255 area 0 RTA(config-router)#network 192.168.2.0 0.0.0.255 area 0
17 L.A. Steffenel
Les options de la commande neighbor
Option Description priority number Spécifie la priorité du voisin. Utilisé pour l'élection des
DR/BDR. Par défaut à zéro, le routeur ne sera jamais élu
poll-interval number Intervalle entre les envois des Hellos (même si les voisins sont inactifs)
cost number Attribue un coût au voisin. Les voisins sans coût seront attribués du coût de l'interface (non utilisé avec les NBMA)
database-filter all Filtre les paquets LSA envoyés à un voisin
The neighbor command options
neighbor ip-address [priority number] [poll-intervalnumber] [cost number] [database-filter all]
Router(config-router)#
Used to statically define neighbor relationships in an NBMA network
Option Description
priority number Specifies the priority of neighbor. Default is zero, which means neighbor can never be DR.which means neighbor can never be DR.
poll-interval number
Amount of time a NBMA interface waits before sending hellos to the neighbor even if the neighbor is inactive.
cost numberAssigns a cost to the neighbor from 1 to 65535. Neighbors with no specific cost configured will assume the cost of the interface, based on the ip ospf cost command (Not used with NBMA)ospf cost command. (Not used with NBMA)
database-filter all Filters outgoing LSAs to an OSPF neighbor
18 L.A. Steffenel
Problèmes avec les grands réseaux OSPF
• Grande table d'état des liens • Chaque routeur maintient une LSDB pour toute sa zone (area)
• La LSDB prend de la place en mémoire
• Calcul SPF fréquent • Une modification de topologie force tous les routeurs dans une zone à reconstruire leur
arbre SPF et la table de routage
• Un lien instable (flapping) affecte toute la zone
• Grande table de routage • Typiquement, le plus grande la zone, le plus grande sera la table de routage
• Une grande table de routage utilise plus de mémoire et ralentit la recherche des routes
19 L.A. Steffenel
Les zones OSPF
• Le routage hiérarchique permet la séparation de grands réseaux (les systèmes autonomes) en petits domaines appelés zones (areas)
• Grâce à cette technique, le routage entre les zones est toujours assuré mais la plupart des opérations de routage (comme la construction de la base de données et le calcul SPF) sont limités à la seule zone concernée
OSPF uses “Areas”
• Hierarchical routing enables you to separate large internetworks (autonomous systems) into smaller internetworks that are called areas.
• With this technique routing still occurs between the areas (called inter-areaWith this technique, routing still occurs between the areas (called inter-arearouting), but many of the smaller internal routing operations, such as recalculating the database – re-running the SPF algorithm, are restricted within an area.
20 L.A. Steffenel
Types de Routeurs OSPF
21 L.A. Steffenel
Les types LSA LSA Types
22 L.A. Steffenel
Types de Liens
Type Description ID Link State
1 Connexion point-à-point vers un autre routeur
Router ID du voisin
2 Connexion à un lien de transit Adresse IP du DR 3 Connexion à un réseau stub Numéro IP du réseau/sous-réseau 4 Virtual Link Router ID du voisin
23 L.A. Steffenel
La base de données OSPF
• Link ID : identifie chaque LSA • ADV router : Le routeur qui a annoncé le LSA • Age : le compteur d'âge, en secondes. Le maximum est 1 heure ou 3600 secondes • Seq# : numéro de séquence du LSA ; ce numéro commence à 0x80000001 et augmente
à chaque mise-à-jour LSA • Checksum : vérification du paquet LSA • Link count : Le nombre de liens directement attachés, utilisé uniquement dans les LSA
routeur. Ce nombre inclut les liens point-à-point, transit, et stub. Chaque lien série point-à-point compte pour deux ; tous les autres comptent pour un, même Ethernet
RouterA#show ip ospf database
Interpreting the OSPF DatabaseRouterA#show ip ospf database
OSPF Router with ID (10.0.0.11) (Process ID 1)Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count10.0.0.11 10.0.0.11 548 0x80000002 0x00401A 110 0 0 12 10 0 0 12 549 0 80000004 0 003A1B 110.0.0.12 10.0.0.12 549 0x80000004 0x003A1B 1100.100.100.100 100.100.100.100 548 0x800002D7 0x00EEA9 2
Net Link States (Area 0)Link ID ADV Router Age Seq# Checksum172.31.1.3 100.100.100.100 549 0x80000001 0x004EC9
Summary Net Link States (Area 0)Link ID ADV Router Age Seq# Checksum10.1.0.0 10.0.0.11 654 0x80000001 0x00FB1110.1.0.0 10.0.0.12 601 0x80000001 0x00F516<output omitted><output omitted>
�Link ID: Identifies each LSA.
�ADV router: Advertising router; the source router of the LSA.
�Age: The maximum age counter in seconds; the maximum age is 1 hour or 3,600 seconds.
�Seq#: Sequence number of the LSA; this number begins at 0x80000001 and increases with each update of the LSA.
�Checksum: Checksum of the individual LSA to ensure reliable receipt of that LSA�Checksum: Checksum of the individual LSA to ensure reliable receipt of that LSA.
�Link count: Total number of directly attached links, used only on router LSAs. The link count includes all point-to-point, transit, and stub links. Each point-to-point serial link counts as two; all other links count as one, including Ethernet links.
24 L.A. Steffenel
Les Types LSA
• LSA Types 1 à 5 • Nous allons les étudier en détail
• LSA Type 6 MOSPF (Multicast OSPF) • Non supporté par Cisco
• MOSPF étend OSPF en permettant aux routeurs de construire des arbres de distribution multicast à partir de leurs bases d'état des liens. Utilisé pour le routage du trafic multicast
• LSA Type 7 NSSA "Lien extérieur" • Paquet envoyé par un ASBR connecté à un NSSA
• Les messages de type 7 peuvent être transmises au travers une zone NSSA, pour ensuite être traduites en messages LSA Type 5 par les ABRs
• Les routes apprises grâce à des paquets LSA Type 7 sont indiquées par “N1” ou “N2” dans la table de routage (similaire à E1 et E2)
25 L.A. Steffenel
Les Types de Area
• Areas (zones) Standard • Backbone (la zone 0)
• Non-Backbone
• Stub • Stub Area
• Totally Stubby Area (TSA)
• Not-so-stubby-area (NSSA) – extension Cisco
26 L.A. Steffenel
Les types de Area
+ le NSSA
27 L.A. Steffenel
Rappel sur les Areas standard
• Accepte toute route annoncée à l'intérieur de l'AS : • Dans la zone locale (Intra-Area) – LSA 1 et LSA 2
• D'autres zones (Inter-Area) – LSA 3, LSA 4 et LSA 5
• Accepte les routes reçues d'autres AS : • À partir d'un AS extérieur – LSA 5
• Tant que ces routes sont redistribuées par un ASBR
• Routes par défaut • Reçues seulement si la commande default-information-originate a été utilisée
• Si default-information-originate n'est pas utilisée, la route par défaut n'est pas reçue
28 L.A. Steffenel
Partie 1 – LSAs dans une zone normale Part I - LSAs using all normal areas
Multi Area OSPF
Normal Areas
11.0.0.0/812.0.0.0/813.0.0.0/8
Normal Areas
ASBR
10.1.0.0/24
Lo - RouterID
Lo - RouterID192.168.1.1/32
ABR-1 ABR-2.1
.1
.2 .3
192.168.2.1/32
Lo - RouterID192.168.3.1/32
Pri 100Pri 200
Area 0
172.16.1.0/24
172.16.51.0/24172.16.10.4/30
.5
6
InternalArea 51 172.16.0.0/16
172.16.20.0/24
.6
.1Lo - RouterID192.168.4.1/32
Area 1
OSPF multizone Avec des zones standard
29 L.A. Steffenel
OSPF multizone - configuration
ASBR router ospf 1 redistribute static network 172.16.1.0 0.0.0.255 area 0
ABR-1 interface FastEthernet0/0 ip address 172.16.1.2 255.255.255.0 ip ospf priority 200 router ospf 1 network 172.16.1.0 0.0.0.255 area 0 network 172.16.51.0 0.0.0.255 area 51
ABR-2 interface FastEthernet0/0 ip address 172.16.1.3 255.255.255.0 ip ospf priority 100 router ospf 1 network 172.16.1.0 0.0.0.255 area 0 network 172.16.10.4 0.0.0.3 area 1
Internal router ospf 1 network 172.16.0.0 0.0.0.255 area 1
Les ABR ont des entrées network pour chaque zone à qui ils appartiennent
30 L.A. Steffenel
LSA type 1 – État des liens des Routeurs Part I - LSAs using all normal areas
Multi Area OSPF
Normal Areas
11.0.0.0/812.0.0.0/813.0.0.0/8
Normal Areas
ASBR
10.1.0.0/24
Lo - RouterID
Lo - RouterID192.168.1.1/32
ABR-1 ABR-2.1
.1
.2 .3
192.168.2.1/32
Lo - RouterID192.168.3.1/32
Pri 100Pri 200
Area 0
172.16.1.0/24
172.16.51.0/24172.16.10.4/30
.5
6
InternalArea 51 172.16.0.0/16
172.16.20.0/24
.6
.1Lo - RouterID192.168.4.1/32
Area 1
OSPF multizone Avec des zones standard
LSA1 LSA1 LSA1
Les LSA 1 envoyés à l'intérieur de la zone 0
31 L.A. Steffenel
LSA type 1 – État des liens des Routeurs Part I - LSAs using all normal areas
Multi Area OSPF
Normal Areas
11.0.0.0/812.0.0.0/813.0.0.0/8
Normal Areas
ASBR
10.1.0.0/24
Lo - RouterID
Lo - RouterID192.168.1.1/32
ABR-1 ABR-2.1
.1
.2 .3
192.168.2.1/32
Lo - RouterID192.168.3.1/32
Pri 100Pri 200
Area 0
172.16.1.0/24
172.16.51.0/24172.16.10.4/30
.5
6
InternalArea 51 172.16.0.0/16
172.16.20.0/24
.6
.1Lo - RouterID192.168.4.1/32
Area 1
OSPF multizone Avec des zones standard
LSA1 LSA1 LSA1
Les LSA 1 envoyés sur les autres zones
LSA1 LSA1
LSA1
LSA1
32 L.A. Steffenel
LSA 1 – État des liens des Routeurs
• En ce qui concerne les liens entre les routeurs : • Le Link State ID est toujours le même que l'Advertising Router
• L'Advertising Router est le Router ID du routeur qui a crée ce paquet LSA 1
• Conclusion • Les états des liens (LSA1) doivent indiquer tous les Router IDs des routeurs de la zone, le
sien inclus
• Astuce: LSA 1 -> “ma seule zone”
LSA 1 - Router Link StatesFor Router Links: • The Link State ID is always the same as the Advertising Router• Advertising Router is the Router ID of the router that created this LSA 1
Internal#show ip ospf dataOSPF Router with ID (192.168.4.1) (Process ID 1)OSPF Router with ID (192.168.4.1) (Process ID 1)
Router Link States (Area 1)
(LSA 1 - Links in the area to which this router belongs.)(LSA 1 Links in the area to which this router belongs.)Link ID ADV Router Age Seq# Checksum Link count192.168.3.1 192.168.3.1 898 0x80000003 0xCE56 2192 168 4 1 192 168 4 1 937 0x80000003 0xFD44 3192.168.4.1 192.168.4.1 937 0x80000003 0xFD44 3
• Conclusion: Router Link States (LSA1’s) should display all the Router IDs of routers in that area including its ownIDs of routers in that area, including its own.
• reminder: LSA 1 -> “my one area”
33 L.A. Steffenel
LSA 1 – État des liens des Routeurs
• Routes indiquées par un "O" dans la table de routage (ou "C")
• Pourquoi il y a un seul "O" pour ce réseau et pas pour les autres ? • Les autres sont des routes directement connectées ou annoncées par une autre area
LSA 1 - Router Link States
ABR-2 - show ip route
172 16 0 0/16 is variably subnetted 4 subnets 3 masks172.16.0.0/16 is variably subnetted, 4 subnets, 3 masksO IA 172.16.51.1/32 [110/2] via 172.16.1.2, 00:11:44, FastEthernet0O 172.16.20.0/24 [110/782] via 172.16.10.6, 00:12:29, Serial0C 172.16.10.4/30 is directly connected, Serial0C 172.16.1.0/24 is directly connected, FastEthernet0O E2 11.0.0.0/8 [110/20] via 172.16.1.1, 00:11:44, FastEthernet0O E2 12.0.0.0/8 [110/20] via 172.16.1.1, 00:11:44, FastEthernet0O E2 13.0.0.0/8 [110/20] via 172.16.1.1, 00:11:44, FastEthernet0
192.168.3.0/32 is subnetted, 1 subnetsC 192.168.3.1 is directly connected, Loopback1
• Denoted by just an “O” in the routing table, or a “C”• Why is there only just an ”O” for this network and not the other
networks?networks?– Directly connected or via another area.
34 L.A. Steffenel
LSA 2 – État des liens du Réseau
• LSA 2 – Network LSA • Envoyés par le DR dans chaque réseau multiaccès
• Indiqués par un “O” dans la table de routage ou un “C” si le réseau est directement connecté
• Paquets diffusés uniquement à l'intérieur de la zone d'origine • Les paquets LSA 2 sont inclus dans la base des états des liens de tous les routeurs à
l'intérieur d'une zone
• Les routeurs ABR doivent traiter les LSA 2 de chaque zone qu'ils appartiennent
LSA 2 - Network Link States
• LSA 2 – Network LSA• Generated by the DR on every multi-access network• Denoted by just an “O” in the routing table or “C” if the network isDenoted by just an O in the routing table or C if the network is
directly connected.• Flooded only within the originating area. • LSA 2’s are in link state database for all routers within an area.• ABR may include a set of LSA 2s for each area it belongs to.
35 L.A. Steffenel
LSA type 2 – État des liens des Réseaux Part I - LSAs using all normal areas
Multi Area OSPF
Normal Areas
11.0.0.0/812.0.0.0/813.0.0.0/8
Normal Areas
ASBR
10.1.0.0/24
Lo - RouterID
Lo - RouterID192.168.1.1/32
ABR-1 ABR-2.1
.1
.2 .3
192.168.2.1/32
Lo - RouterID192.168.3.1/32
Pri 100Pri 200
Area 0
172.16.1.0/24
172.16.51.0/24172.16.10.4/30
.5
6
InternalArea 51 172.16.0.0/16
172.16.20.0/24
.6
.1Lo - RouterID192.168.4.1/32
Area 1
OSPF multizone Avec des zones standard
LSA2
Aucun LSA 2 sur ABR-1 dans Area 51 ou sur Internal car ces routeurs sont seuls sur le segment multiaccès DR
36 L.A. Steffenel
LSA 2 – État des liens du Réseau
• Link ID 172.16.1.2 = Adresse IP du DR dans un réseau multiaccès
• ADV Router 192.168.2.1 = Router ID du DR
• Conclusion : l'entrée "Net Link States" doit indiquer les DRs des réseaux multiaccès dans la zone
• Astuce: LSA 2 -> "Envoyé par le D R"
1 2
LSA 2 - Network Link States
ASBR#show ip ospf data
OSPF Router with ID (192.168.1.1) (Process ID 1)( ) ( )
Net Link States (Area 0)(LSA 2 - Generated by the DR)
Link ID ADV Router Age Seq# Checksum172.16.1.2 192.168.2.1 201 0x8000000D 0xCFE8
• Link ID 172.16.1.2 = IP address of DR on MultiAccess Network• ADV Router 192.168.2.1 = Router ID of DR• Conclusion: Net Link States (LSA2’s) should display the RouterIDs of
the DRs on all multi-access networks in the area and their IP addresses.
• reminder: LSA 2 -> “Generated by the D R”1 2
37 L.A. Steffenel
LSA type 3 – Résumé des liens Part I - LSAs using all normal areas
Multi Area OSPF
Normal Areas
11.0.0.0/812.0.0.0/813.0.0.0/8
Normal Areas
ASBR
10.1.0.0/24
Lo - RouterID
Lo - RouterID192.168.1.1/32
ABR-1 ABR-2.1
.1
.2 .3
192.168.2.1/32
Lo - RouterID192.168.3.1/32
Pri 100Pri 200
Area 0
172.16.1.0/24
172.16.51.0/24172.16.10.4/30
.5
6
InternalArea 51 172.16.0.0/16
172.16.20.0/24
.6
.1Lo - RouterID192.168.4.1/32
Area 1
OSPF multizone Avec des zones standard
Les LSA 1 sont envoyés aux autres zones par l'ABR sous la forme de paquets LSA 3
LSA1 LSA1 LSA1
LSA3
LSA3
38 L.A. Steffenel
LSA type 3 – Résumé des liens Part I - LSAs using all normal areas
Multi Area OSPF
Normal Areas
11.0.0.0/812.0.0.0/813.0.0.0/8
Normal Areas
ASBR
10.1.0.0/24
Lo - RouterID
Lo - RouterID192.168.1.1/32
ABR-1 ABR-2.1
.1
.2 .3
192.168.2.1/32
Lo - RouterID192.168.3.1/32
Pri 100Pri 200
Area 0
172.16.1.0/24
172.16.51.0/24172.16.10.4/30
.5
6
InternalArea 51 172.16.0.0/16
172.16.20.0/24
.6
.1Lo - RouterID192.168.4.1/32
Area 1
OSPF multizone Avec des zones standard
Les LSA 1 sont envoyés aux autres zones par l'ABR sous la forme de paquets LSA 3
LSA3 LSA3
LSA1 LSA1
LSA1
LSA1
39 L.A. Steffenel
LSA 3 – Résumé des Liens
• Conclusion : nous devons trouver des réseaux des autres zones annoncées par l'ABR
• Astuce: LSA 3 -> "Envoyé par l' A B R"
1 2 3
LSA 3 – Summary Net Link States
ASBRASBR# show ip ospf database
S i k S ( 0)Summary Net Link States (Area 0)Link ID ADV Router Age Seq# Checksum
(Area 1 networks - Advertising Router ABR-2)(Area 1 networks Advertising Router ABR 2)172.16.10.4 192.168.3.1 278 0x80000001 0xD126 172.16.20.0 192.168.3.1 278 0x80000001 0xA746
(Area 51 networks - Advertising Router ABR-1)172.16.51.1 192.168.2.1 206 0x80000005 0xA832
• Conclusion: We should see networks in other areas and the ABR advertising• Conclusion: We should see networks in other areas and the ABR advertising that route.
• reminder: LSA 3 -> “networks sent by the A B R”1 2 3
40 L.A. Steffenel
LSA 3 – Résumé des Liens LSA 3 – Summary Net Link States
ASBRASBR# show ip route
/172.16.0.0/16 is variably subnetted, 4 subnets, 3 masksO IA 172.16.51.1/32 [110/2] via 172.16.1.2, 00:02:54, FastEthernet0/0O IA 172.16.20.0/24 [110/783] via 172.16.1.3, 00:02:54, FastEthernet0/0O IA 172.16.10.4/30 [110/782] via 172.16.1.3, 00:02:54, FastEthernet0/0C 172.16.1.0/24 is directly connected, FastEthernet0/0
10.0.0.0/24 is subnetted, 1 subnetsC 10.1.0.0 is directly connected, FastEthernet0/1S 11.0.0.0/8 is directly connected, Null0S 12.0.0.0/8 is directly connected, Null0
192.168.1.0/32 is subnetted, 1 subnetsC 192.168.1.1 is directly connected, Loopback0S 13.0.0.0/8 is directly connected, Null0/ y ,
IA = Inter Area
41 L.A. Steffenel
LSA 4 – Résumé de l'ASBR
• Paquet envoyé par un ABR • Annoncé par la zone backbone (zéro) à l'attention des autres ABRs
• Indique comment contacter les ASBRs • Annonce un ASBR (Router ID), pas un réseau
• Inclus dans la table de routage en tant que route "IA”
• Même format d'un paquet LSA 3 - Summary LSA • Exceptions
• N'est pas diffusé dans les réseaux Stub ou Totally Stubby
42 L.A. Steffenel
LSA type 4 – Résumé de l'ASBR Part I - LSAs using all normal areas
Multi Area OSPF
Normal Areas
11.0.0.0/812.0.0.0/813.0.0.0/8
Normal Areas
ASBR
10.1.0.0/24
Lo - RouterID
Lo - RouterID192.168.1.1/32
ABR-1 ABR-2.1
.1
.2 .3
192.168.2.1/32
Lo - RouterID192.168.3.1/32
Pri 100Pri 200
Area 0
172.16.1.0/24
172.16.51.0/24172.16.10.4/30
.5
6
InternalArea 51 172.16.0.0/16
172.16.20.0/24
.6
.1Lo - RouterID192.168.4.1/32
Area 1
OSPF multizone Avec des zones standard
Les LSA 4 sont crées à la suite d'un LSA5 reçu d'un ASBR
LSA5 LSA5
LSA4
LSA4
LSA4
LSA 4 = comment atteindre l'ASBR
LSA5
LSA5
LSA5
43 L.A. Steffenel
LSA 4 – Résumé de l'ASBR
• Conclusion : Les routeurs des autres zones doivent voir le lien vers l'ASBR
• N'est pas nécessairement présent dans la table de routage
• Astuce: LSA 4 -> "Comment trouver l' A S B R"
1 2 3 4
LSA 4 – ASBR Summary Link States
ABR-2ABR-2# show ip ospf databasep p
Summary ASB Link States (Area 1)LSA 4 - Reachability to ASBR.
Not flooded to Stub and Totally Stubby networks.
Link ID ADV Router Age Seq# Checksum192.168.1.1 192.168.3.1 801 0x80000003 0x93CC
• Conclusion: Routers in non-area 0, should see Router ID of ASBR d it ABR t t thand its ABR to get there .
• reminder: LSA 4 -> “Reachability to the A S B R”1 2 3 4
44 L.A. Steffenel
LSA 5 – État des liens d'un AS externe
• Paquet envoyé par l'ASBR • Décrit les réseaux externes aux Système Autonome (AS)
• Diffusé à travers tout l'AS OSPF, à l'exception des zones stub ou totally stubby • Indiqués dans la table de routage par E1 ou E2 (défaut)
• ASBR – le routeur qui redistribue les routes dans le domaine OSPF
• Exceptions • Ce paquet n'est pas diffusé dans les zones Stub et Totally Stubby
45 L.A. Steffenel
LSA type 5 – État des liens d'un AS externe
Part I - LSAs using all normal areas
Multi Area OSPF
Normal Areas
11.0.0.0/812.0.0.0/813.0.0.0/8
Normal Areas
ASBR
10.1.0.0/24
Lo - RouterID
Lo - RouterID192.168.1.1/32
ABR-1 ABR-2.1
.1
.2 .3
192.168.2.1/32
Lo - RouterID192.168.3.1/32
Pri 100Pri 200
Area 0
172.16.1.0/24
172.16.51.0/24172.16.10.4/30
.5
6
InternalArea 51 172.16.0.0/16
172.16.20.0/24
.6
.1Lo - RouterID192.168.4.1/32
Area 1
LSA5 LSA5
LSA4
LSA4
LSA4
11.0.0.0/812.0.0.0/813.0.0.0/8 Normal Areas
ASBRrouter ospf 1
redistribute staticnetwork 172.16.1.0 0.0.0.255 area 0
i t 11 0 0 0 255 0 0 0 N ll0
ASBR
10.1.0.0/24
1Lo - RouterID192 168 2 1/32
Lo - RouterID192.168.1.1/32
LSA 5’s flooded
ip route 11.0.0.0 255.0.0.0 Null0ip route 12.0.0.0 255.0.0.0 Null0ip route 13.0.0.0 255.0.0.0 Null0
ABR-1 ABR-2.1
.1
.2 .3
192.168.2.1/32
Lo - RouterID192.168.3.1/32
Pri 100Pri 200
LSA 5
LSA 5 s floodedLSA 5
Area 0
172.16.1.0/24
172.16.51.0/24172.16.10.4/30
.5
.6
LSA 5
LSA 5
InternalArea 51172.16.0.0/16
172.16.20.0/24
.1Lo - RouterID192.168.4.1/32LSA 5
LSA 5
Area 1• “Redistribute” command creates an ASBR router.• This flood is originated by the ASBR. • It describes destination networks external to the OSPF Routing
Domain• It’s flooded throughout the OSPF AS, except to stub and totally stubby
areas
LSA5 LSA5
LSA5
46 L.A. Steffenel
LSA type 5 – État des liens d'un AS externe
• Conclusion : Tous les routeurs voient les routes externes et l'ID du ASBR
• Astuce: LSA 5 -> "A U T R E AS"
1 2 3 4 5
LSA 5 - AS External Link StatesABR-2ABR-2# show ip ospf database
AS External Link States
LSA 5 - External Networks originated by the ASBRLSA 5 - External Networks originated by the ASBR, Flooded throughout A.S. except to Stub and Totally Stubby
Link ID ADV Router Age Seq# Checksum Tag11 0 0 0 192 168 1 1 1191 0 80000001 0 3FEA 011.0.0.0 192.168.1.1 1191 0x80000001 0x3FEA 012.0.0.0 192.168.1.1 1191 0x80000001 0x32F6 013.0.0.0 192.168.1.1 1191 0x80000001 0x2503 0
• Conclusion: All Routers should see External networks and the Router ID of ASBR to get there .
• reminder: LSA 5 -> O T H E R networks1 2 3 4 51 2 3 4 5
47 L.A. Steffenel
LSA type 5 – État des liens d'un AS externe
• Les routes externes sont indiquées par un “E2”
• Note : le coût des trois routes est 20. Ceci est le coût par défaut des routes E2
• Commande redistribute : Si une valeur de métrique n'est pas spécifiée, redistribute utilise la métrique par défaut 0, à l'exception de OSPF où le coût par défaut est de 20
LSA 5 - AS External Link States
ABR-2ABR-2# show ip route
172.16.0.0/16 is variably subnetted, 4 subnets, 3 masksO IA 172.16.51.1/32 [110/2] via 172.16.1.2, 00:11:44, FastEthernet0O 172.16.20.0/24 [110/782] via 172.16.10.6, 00:12:29, Serial0C 172.16.10.4/30 is directly connected, Serial0C 172.16.1.0/24 is directly connected, FastEthernet0O E2 11.0.0.0/8 [110/20] via 172.16.1.1, 00:11:44, FastEthernet0O E2 12.0.0.0/8 [110/20] via 172.16.1.1, 00:11:44, FastEthernet0O E2 13.0.0.0/8 [110/20] via 172.16.1.1, 00:11:44, FastEthernet0
192.168.3.0/32 is subnetted, 1 subnetsC 192.168.3.1 is directly connected, Loopback1
• Designated by “E2”g y• Notice that the cost is 20 for all three routes, we will see why later. • It has to do with E2 routes and where the default cost is 20.
– Redistribute command: If a value is not specified for the metric option, and f f fno value is specified using the default-metric command, the default
metric value is 0, except for OSPF where the default cost is 20.
48 L.A. Steffenel
Différence entre routes E1 et E2
• Les routes externes peuvent être de deux types • Externe type 1
• Externe type 2
• La différence entre les deux types est la manière selon laquelle nous calculons la métrique
• Une route externe de type 2 garde toujours le coût annoncé, peu importe le coût interne pour arriver à ce ASBR
• Une route externe de type 1 rajoute le coût interne au fur et à mesure que le message se propage
• Pour la même destination, une route de type 1 a toujours la préférence sur une route de type 2
49 L.A. Steffenel
Zones Stub
• C'est quoi une zone Stub (ou Totally Stubby) ? • C'est une zone où une seule sortie est disponible (un seul ABR)
• C'est une zone qui n'a pas besoin d'un routage optimal pour les réseaux extérieurs
• C'est une zone qui ne sera pas utilisée comme pont pour un lien virtuel (plus tard)
• L'ASBR ne se situe pas dans cette zone
• Ce n'est pas la zone backbone (area 0)
• L'établissement de zones Stub réduit les coûts en mémoire et CPU, selon la taille du réseau
50 L.A. Steffenel
Configuration d'une zone Stub
• Tous les routeurs d'une zone doivent être configurés comme Stub, même l'ABR
Stub Areas
ABR-2
router ospf 1router ospf 1network 172.16.1.0 0.0.0.255 area 0network 172.16.10.4 0.0.0.3 area 1area 1 stub << Command: area area stubarea 1 stub Command: area area stub
Internal
router ospf 1network 172.16.0.0 0.0.255.255 area 1area 1 stub << Command: area area stub
• All routers in the area must be configured as “stub” including the ABRincluding the ABR
51 L.A. Steffenel
Zone Stub Part I - LSAs using all normal areas
Multi Area OSPF
Normal Areas
11.0.0.0/812.0.0.0/813.0.0.0/8
Normal Areas
ASBR
10.1.0.0/24
Lo - RouterID
Lo - RouterID192.168.1.1/32
ABR-1 ABR-2.1
.1
.2 .3
192.168.2.1/32
Lo - RouterID192.168.3.1/32
Pri 100Pri 200
Area 0
172.16.1.0/24
172.16.51.0/24172.16.10.4/30
.5
6
InternalArea 51 172.16.0.0/16
172.16.20.0/24
.6
.1Lo - RouterID192.168.4.1/32
Area 1
LSA4 LSA5
LSA3 LSA4
LSA5 LSA3 Route par défaut vers l'ABR
Zone Stub
52 L.A. Steffenel
Zones Totally Stubby
• Une zone Totally Stubby est une variante propriétaire de Cisco • La configuration diffère seulement sur l'ABR
• Utilise les mêmes règles qu'une zone Stub mais : • Les ABR bloquent tous les LSA 3, à l'exception des routes par défaut
• L'ABR injectent la route par défaut dans la zone Totally Stubby
ABR-2 router ospf 1 network 172.16.1.0 0.0.0.255 area 0 network 172.16.10.4 0.0.0.3 area 1 area 1 stub no-summary ^^ Commande : area area stub no-summary Crée un zone totally stubby. Aucun LSA Type 3 ou 4 ne passe Internal router ospf 1 network 172.16.0.0 0.0.255.255 area 1 area 1 stub ^^ Commande : area area stub
53 L.A. Steffenel
Zone Totally Stubby
Part I - LSAs using all normal areas
Multi Area OSPF
Normal Areas
11.0.0.0/812.0.0.0/813.0.0.0/8
Normal Areas
ASBR
10.1.0.0/24
Lo - RouterID
Lo - RouterID192.168.1.1/32
ABR-1 ABR-2.1
.1
.2 .3
192.168.2.1/32
Lo - RouterID192.168.3.1/32
Pri 100Pri 200
Area 0
172.16.1.0/24
172.16.51.0/24172.16.10.4/30
.5
6
InternalArea 51 172.16.0.0/16
172.16.20.0/24
.6
.1Lo - RouterID192.168.4.1/32
Area 1
LSA4 LSA5
LSA3 LSA4
LSA5 LSA3 Route par défaut vers l'ABR
Zone Totally Stubby
54 L.A. Steffenel
Zones Totally Stubby
• La route par défaut est injectée dans la zone totally stubby par l'ABR
• Cette route par défaut couvre toute route extérieure • Aucune route inter-area est renseignée (LSA 3)
• Aucune route extérieur (autre AS) n'est renseignée (LSAs 4 et 5)
Totally Stubby Areas
InternalInternal# show ip routeInternal# show ip routeGateway of last resort is 172.16.10.5 to network 0.0.0.0
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masksC 172 16 20 0/24 is directly connected FastEthernet0C 172.16.20.0/24 is directly connected, FastEthernet0C 172.16.10.4/30 is directly connected, Serial0
192.168.4.0/32 is subnetted, 1 subnetsC 192.168.4.1 is directly connected, Loopback0O*IA 0 0 0 0/0 [110/782] i 172 16 10 5 00 03 09 S i l0O*IA 0.0.0.0/0 [110/782] via 172.16.10.5, 00:03:09, Serial0
• Default route is injected into totally stubby area by ABR for all other networks (inter-area and external routes)
• Does not receive routes from other areas (Inter-Area)• Does not receive routes from External A.S. (External Routes)
55 L.A. Steffenel
NSSA – Not So Stubby Area
• Type de zone relativement récent • basé sur le RFC 1587 qui met à jour certaines fonctionnalités d'OSPF
• Un NSSA se comporte comme une zone stub, mais permet la remontée d'un information externe (LSA type 7) d'une extrémité jusqu'au backbone
• Astuce : Type 7 = E X T E R N E
1 2 3 4 5 6 7
• Les ASBR au bout d'une zone NSSA peuvent injecter des routes externes sur la zone NSSA et le backbone
• Continuent à refuser les routes externes venant des ABR
• Deux types de zone NSSA • Stub (générique) – l'ABR n'injecte pas une route par défaut dans la zone NSSA
• Totally stubby – l'ABR inject une route par défaut
56 L.A. Steffenel
Configuration d'un NSSA générique
NSSAArea 2
Backbone AreaArea 0Default route via RTG
NSSA Generic
Area 2 Area 0
RIPRTH
Default route via RTG
LSA 7
RTD
RTE
RTGLSA 7
LSA 7
LSA 7LSA 5
ASBR
ABR (PossibleASBR)
RTARTB
RTCRTF
LSA 7LSA 7
LSA 7 LSA 7LSA 7s BlockedLSA 7 LSA 7 Blocked
Configuring NSSA Stub AreaConfigured for all routers in Area 2:router ospf 1network 172.16.2.0 0.0.0.255 area 2area 2 nssa
Configuration pour tous les routeurs dans area 2 router ospf 1 network 172.16.2.0 0.0.0.255 area 2 area 2 nssa
57 L.A. Steffenel
NSSA – Stub et Totally Stubby
• Zones NSSA Stub • Bloquent les LSA de type 4 et 5, mais laissent passer ceux de type 3
• Pour configurer un NSSA Stub, tous les routeurs de la zone doivent être configurés
router ospf 1 area 2 nssa
• Zones NSSA Totally Stubby • Bloquent les LSA type 4, 5 et 3, mais acceptent la route par défaut
• L'ABR de la zone doit être configuré pour cela
router ospf 1 area 2 nssa no-summary
58 L.A. Steffenel
NSSA Stub
NSSAArea 2
Backbone AreaArea 0Default route via RTG
NSSA Generic
Area 2 Area 0
RIPRTH
Default route via RTG
LSA 7
RTD
RTE
RTGLSA 7
LSA 7
LSA 7LSA 5
ASBR
ABR (PossibleASBR)
RTARTB
RTCRTF
LSA 7LSA 7
LSA 7 LSA 7LSA 7s BlockedLSA 7 LSA 7 Blocked
Configuring NSSA Stub AreaConfigured for all routers in Area 2:router ospf 1network 172.16.2.0 0.0.0.255 area 2area 2 nssa
Configuration pour tous les routeurs dans area 2 router ospf 1 network 172.16.2.0 0.0.0.255 area 2 area 2 nssa
LSA 3
LSA 4 et 5
0.0.0.0/0
RTH : N1/N2
RTH : E1/E2
59 L.A. Steffenel
NSSA Totally Stubby
NSSAArea 2
Backbone AreaArea 0Default route via RTG
NSSA Generic
Area 2 Area 0
RIPRTH
Default route via RTG
LSA 7
RTD
RTE
RTGLSA 7
LSA 7
LSA 7LSA 5
ASBR
ABR (PossibleASBR)
RTARTB
RTCRTF
LSA 7LSA 7
LSA 7 LSA 7LSA 7s BlockedLSA 7 LSA 7 Blocked
Configuring NSSA Stub AreaConfigured for all routers in Area 2:router ospf 1network 172.16.2.0 0.0.0.255 area 2area 2 nssa
RTB (ABR) : router ospf 1 network 172.16.1.0 0.0.0.255 area 0 network 172.16.2.0 0.0.0.255 area 2 area 2 nssa no-summary Les autres routeurs dans area 2 router ospf 1 network 172.16.2.0 0.0.0.255 area 2 area 2 nssa
LSA 3
LSA 4 et 5
0.0.0.0/0
RTH : N1/N2
RTH : E1/E2
60 L.A. Steffenel
Liens Virtuels
• Les zones OSPF doivent être organisées autour de la zone backbone • Parfois ceci n'est pas possible
• Les liens virtuels permettent la liaison (temporaire) à travers une autre zone (non 0)
• Un lien virtuel doit : • Établir la liaison entre deux routeurs ABR qui partagent la même zone
• L'un de ces routeurs doit être connecté au backbone
61 L.A. Steffenel
Liens Virtuels
Virtual Links
The command to configure a virtual link is as follows:g
area <area-id> virtual-link <remote-router-id>RTA(config)#router ospf 1
RTA(config-router)#network 192.168.0.0 0.0.0.255 area 51
RTA(config-router)#network 192.168.1.0 0.0.0.255 area 3
RTA(config-router)#area 3 virtual-link 10 0 0 1RTA(config router)#area 3 virtual-link 10.0.0.1
RTB(config)#router ospf 1
RTB(config-router)#network 192.168.1.0 0.0.0.255 area 3
RTB(config-router)#network 192.168.2.0 0.0.0.255 area 0
RTB(config-router)#area 3 virtual-link 10.0.0.2
RTA(config)#router ospf 1 RTA(config-router)#network 192.168.0.0 0.0.0.255 area 51 RTA(config-router)#network 192.168.1.0 0.0.0.255 area 3 RTA(config-router)#area 3 virtual-link 10.0.0.1 RTB(config)#router ospf 1 RTB(config-router)#network 192.168.1.0 0.0.0.255 area 3 RTB(config-router)#network 192.168.2.0 0.0.0.255 area 0 RTB(config-router)#area 3 virtual-link 10.0.0.2
L'ID de l'ABR en face
62 L.A. Steffenel
Agrégation de Routes – area range
• Par défaut les ABR ne font pas l'agrégation automatique entre les zones • Contrairement à RIP ou EIGRP
• Pour diffuser une route agrégée aux autres zones, OSPF doit être configuré spécifiquement
• Commande area range
Router(config-router)# area area-id range network-address subnet-mask
• area-id – l'identifiant de la zone qui sera agrégée
ABR router ospf 100 area 1 range 195.16.0.0 255.255.0.0
63 L.A. Steffenel
Agrégation de Routes – summary-address
• Lors de la redistribution d'une route externe, OSPF envoie chaque route dans un LSA séparé
• Les routeurs Cisco permettent l'agrégation des ces routes redistribuées • Commande summary-address
Router(config-router)# summary-address network-address subnet-mask
ASBR router ospf 100 summary-address 195.16.0.0 255.255.0.0
64 L.A. Steffenel
Injection des Routes par Défaut dans OSPF
• Il y a deux façons d'injecter une route par défaut
1. default-information originate • Si l'ASBR connaît déjà la route par défaut (ip route 0.0.0.0 0.0.0.0), il peut annoncer
0.0.0.0 dans la zone
2. default-information originate always • Si l'ASBR ne connaît pas la route par défaut (ip route 0.0.0.0 0.0.0.0), il peut toujours
s'annoncer comme la passerelle à utiliser grâce au mot clé always
65 L.A. Steffenel
Redistribution des Routes Externes
• Commande : router ospf 1
redistribute routing-protocol metric-type [1|2]
• metric-type 1 – Un coût type 1 correspond à la somme des coûts externes et internes vers cette destination
• Ex :
• metric-type 2 – Un coût type 2 correspond uniquement au coût extérieur annoncé par l'ASBR
• Ex :
Redistributing External Routes
router ospf 1redistribute routing-protocol metric-type [1|2]
• metric-type 1 - A type 1 cost is the addition of the external cost and the internal costused to reach that route.
redistribute rip [metric value] metricmetric--type type 11
ASBRrouter ospf 1redistribute rip metric 500 metric-type 1
• metric-type 2 - The cost of a type 2 route is always the external cost, irrespective of the interior cost to reach that routethe interior cost to reach that route.
redistribute rip [metric value] metricmetric--type type 22
ASBRrouter ospf 1router ospf 1redistribute rip metric 500 metric-type 2
Redistributing External Routes
router ospf 1redistribute routing-protocol metric-type [1|2]
• metric-type 1 - A type 1 cost is the addition of the external cost and the internal costused to reach that route.
redistribute rip [metric value] metricmetric--type type 11
ASBRrouter ospf 1redistribute rip metric 500 metric-type 1
• metric-type 2 - The cost of a type 2 route is always the external cost, irrespective of the interior cost to reach that routethe interior cost to reach that route.
redistribute rip [metric value] metricmetric--type type 22
ASBRrouter ospf 1router ospf 1redistribute rip metric 500 metric-type 2
66 L.A. Steffenel
Configuration de l'Authentification
• Authentification simple
Rtr(config-if)# ip ospf authentication-key passwd
• L'authentification est configurée dans chaque interface
• Le mot de passe doit être le même pour deux voisins
• password = texte en clair (possibilité de digest dans le prochain transparent)
• Après configurer le mot de passe, il faut activer l'authentification dans tous les routeurs concernés (ceux de la zone)
Rtr(config-router)# area area authentication
67 L.A. Steffenel
Configuration Configuring Simple Authentication
s1 s270.0.0.0/8 172.16.0.0/16
RouterA RouterB
192.16.64.1/24 192.16.64.2/24
RouterA RouterB
RouterA
interface Serial1
ip address 192.16.64.1 255.255.255.0
ip ospf authentication-key secret
RouterB
interface Serial2
ip address 192.16.64.2 255.255.255.0
ip ospf authentication-key secretip ospf authentication key secret
!
router ospf 10
network 192.16.64.0 0.0.0.255 area 0
ip ospf authentication key secret
!
router ospf 10
network 172.16.0.0 0.0.255.255 area 0
network 70.0.0.0 0.255.255.255 area 0
area 0 authentication
network 192.16.64.0 0.0.0.255 area 0
area 0 authentication
Configuring Simple Authentication
s1 s270.0.0.0/8 172.16.0.0/16
RouterA RouterB
192.16.64.1/24 192.16.64.2/24
RouterA RouterB
RouterA
interface Serial1
ip address 192.16.64.1 255.255.255.0
ip ospf authentication-key secret
RouterB
interface Serial2
ip address 192.16.64.2 255.255.255.0
ip ospf authentication-key secretip ospf authentication key secret
!
router ospf 10
network 192.16.64.0 0.0.0.255 area 0
ip ospf authentication key secret
!
router ospf 10
network 172.16.0.0 0.0.255.255 area 0
network 70.0.0.0 0.255.255.255 area 0
area 0 authentication
network 192.16.64.0 0.0.0.255 area 0
area 0 authentication
Configuring Simple Authentication
s1 s270.0.0.0/8 172.16.0.0/16
RouterA RouterB
192.16.64.1/24 192.16.64.2/24
RouterA RouterB
RouterA
interface Serial1
ip address 192.16.64.1 255.255.255.0
ip ospf authentication-key secret
RouterB
interface Serial2
ip address 192.16.64.2 255.255.255.0
ip ospf authentication-key secretip ospf authentication key secret
!
router ospf 10
network 192.16.64.0 0.0.0.255 area 0
ip ospf authentication key secret
!
router ospf 10
network 172.16.0.0 0.0.255.255 area 0
network 70.0.0.0 0.255.255.255 area 0
area 0 authentication
network 192.16.64.0 0.0.0.255 area 0
area 0 authentication
68 L.A. Steffenel
Configuration de l'Authentification MD5
• Authentification simple
Rtr(config-if)# ip ospf digest-key key-id md5 passwd
• L'authentification est configurée dans chaque interface
• Le mot de passe doit être le même pour deux voisins
• Key-id = 1 à 255, doit correspondre sur les autres routeurs
• Après configurer le mot de passe, il faut activer l'authentification dans tous les routeurs concernés (ceux de la zone)
Rtr(config-router)# area area authentication message-digest
69 L.A. Steffenel
Configuration Configuring Simple Authentication
s1 s270.0.0.0/8 172.16.0.0/16
RouterA RouterB
192.16.64.1/24 192.16.64.2/24
RouterA RouterB
RouterA
interface Serial1
ip address 192.16.64.1 255.255.255.0
ip ospf authentication-key secret
RouterB
interface Serial2
ip address 192.16.64.2 255.255.255.0
ip ospf authentication-key secretip ospf authentication key secret
!
router ospf 10
network 192.16.64.0 0.0.0.255 area 0
ip ospf authentication key secret
!
router ospf 10
network 172.16.0.0 0.0.255.255 area 0
network 70.0.0.0 0.255.255.255 area 0
area 0 authentication
network 192.16.64.0 0.0.0.255 area 0
area 0 authentication
Configuring MD5 Encrypted Authentication
s1 s270.0.0.0/8 172.16.0.0/16
RouterA RouterB
192.16.64.1/24 192.16.64.2/24
RouterA RouterB
RouterA
interface Serial1
ip address 192.16.64.1 255.255.255.0
ip ospf message-digest-key 1 md5 secret
RouterB
interface Serial2
ip address 192.16.64.2 255.255.255.0
ip ospf message-digest-key 1 md5 secretip ospf message digest key 1 md5 secret
!
router ospf 10
network 192.16.64.0 0.0.0.255 area 0
ip ospf message digest key 1 md5 secret
!
router ospf 10
network 172.16.0.0 0.0.255.255 area 0
network 70.0.0.0 0.255.255.255 area 0
area 0 authentication message-digest
network 192.16.64.0 0.0.0.255 area 0
area 0 authentication message-digest
Configuring MD5 Encrypted Authentication
s1 s270.0.0.0/8 172.16.0.0/16
RouterA RouterB
192.16.64.1/24 192.16.64.2/24
RouterA RouterB
RouterA
interface Serial1
ip address 192.16.64.1 255.255.255.0
ip ospf message-digest-key 1 md5 secret
RouterB
interface Serial2
ip address 192.16.64.2 255.255.255.0
ip ospf message-digest-key 1 md5 secretip ospf message digest key 1 md5 secret
!
router ospf 10
network 192.16.64.0 0.0.0.255 area 0
ip ospf message digest key 1 md5 secret
!
router ospf 10
network 172.16.0.0 0.0.255.255 area 0
network 70.0.0.0 0.255.255.255 area 0
area 0 authentication message-digest
network 192.16.64.0 0.0.0.255 area 0
area 0 authentication message-digest