Cisco Systems



Open Shortest Path First (OSPF)


Sommaire

  • Description
  • Single Area Configuration
  • Multi Area Configuration
  • OSPFv6


Description


Open Shortest Path First (OSPF)

Introduction

Open Shortest Path First (OSPF) is by far the most popular and important routing protocol in use today Open Shortest Path First is an open standard routing protocol that’s been implemented by a wide variety of network vendors, including Cisco. And it’s that open standard characteristic that’s the key to OSPF’s flexibility and popularity.

Most people opt for OSPF, which works by using the Dijkstra algorithm to initially construct a shortest path tree and follows that by populating the routing table with the resulting best paths.

EIGRP’s convergence time may be blindingly fast, but OSPF isn’t that far behind, and its quick convergence is another reason it’s a favorite. Another two great advantages OSPF offers are that it supports multiple, equal-cost routes to the same destination and, like EIGRP, it also supports both IP and IPv6 routed protocols.

One of OSPF’s most useful traits is that its design is intended to be hierarchical in use, meaning that it allows us to subdivide the larger internetwork into smaller internetworks called areas. It’s a really powerful feature that I recommend using

OSPF’s best features:
  • Allows for the creation of areas and autonomous systems
  • Minimizes routing update traffic
  • Is highly flexible, versatile, and scalable
  • Supports VLSM/CIDR
  • Offers an unlimited hop count
  • Is open standard and supports multi-vendor deployment

OSPF Operation

Fully equipped with your newly acquired knowledge of the terms and technologies we just covered, it’s now time to delve into how OSPF discovers, propagates, and ultimately chooses routes. Once you know how OSPF achieves these tasks, you’ll understand how OSPF operates internally really well. OSPF operation is basically divided into these three categories:
  1. Neighbor and adjacency initialization
  2. LSA flooding
  3. SPF tree calculation
Mechanism

Lorsque OSPF est actif sur une interface il envoie un message « hello » à ses voisins (découverte de voisins) puis communiqué à ses voisins les réseaux qu’il connait

Neighbor and adjacency initialization

The beginning neighbor/adjacency formation stage is a very big part of OSPF operation. When OSPF is initialized on a router, the router allocates memory for it, as well as for the maintenance of both neighbor and topology tables. Once the router determines which interfaces have been configured for OSPF, it will then check to see if they’re active and begin sending Hello packets

The Hello protocol is used to discover neighbors, establish adjacencies, and maintain relationships with other OSPF routers. Hello packets are periodically sent out of each enabled OSPF interface and in environments that support multicast.

The address used for this is 224.0.0.5, and the frequency with which Hello packets are sent out depends upon the network type and topology.

- Broadcast and point-to-point networks send Hellos every 10 seconds,

- whereas non-broadcast and point-to-multipoint networks send them every 30 seconds.

LSA Flooding

LSA flooding is the method OSPF uses to share routing information. Via Link State Updates (LSU’s) packets, LSA information containing link-state data is shared with all OSPF routers within an area. The network topology is created from the LSA updates, and flooding is used so that all OSPF routers have the same topology map to make SPF calculations with.

Efficient flooding is achieved through the use of a reserved multicast address: 224.0.0.5 (AllSPFRouters). LSA updates, which indicate that something in the topology has changed, are handled a bit differently. The network type determines the multicast address used for sending updates. Table 18.2 contains the multicast addresses associated with LSA flooding. Point-to-multipoint networks use the adjacent router’s unicast IP address.

LSA update multicast addresses

Network Type Multicast Address Description
Point-to-point 224.0.0.5 All SPF Routers
Broadcast 224.0.0.6 All D Routers
Point-to-multipoint NA NA


Shortest Path First (SPF) Tree Calculation

Within an area, each router calculates the best/shortest path to every network in that same area. This calculation is based upon the information collected in the topology database and an algorithm called shortest path first (SPF). Picture each router in an area constructing a tree— much like a family tree—where the router is the root and all other networks are arranged along the branches and leaves. This is the shortest-path tree used by the router to insert OSPF routes into the routing table.

It’s important to understand that this tree contains only networks that exist in the same area as the router itself does. If a router has interfaces in multiple areas, then separate trees will be constructed for each area. One of the key criteria considered during the route selection process of the SPF algorithm is the metric or cost of each potential path to a network. But this SPF calculation doesn’t apply to routes from other areas.

les intervalles Hello et Dead

Les paquets OSPFv2 Hello sont transmis à l'adresse de multidiffusion 224.0.0.5 (tous les routeurs OSPF) toutes les 10 secondes. Il s'agit de la valeur du minuteur par défaut sur les réseaux à accès multiple et point à point.

Remarque: Les paquets Hello ne sont pas envoyés sur les interfaces définies sur passive par la commande passive-interface .

L'intervalle Dead est la période pendant laquelle le routeur attend de recevoir un paquet Hello avant de déclarer le voisin en panne. Si l'intervalle Dead expire avant que les routeurs ne reçoivent un paquet Hello, le protocole OSPF supprime le voisin de sa LSDB. Le routeur diffuse vers la LSDB les informations concernant le voisin hors service vers toutes les interfaces compatibles OSPF. Cisco utilise par défaut le quadruple de l'intervalle Hello. Ce délai est de 40 secondes sur les réseaux multi-accès et point à point.

Les intervalles Hello et Dead OSPF sont configurables par interface. Si les intervalles OSPF ne correspondent pas, la contiguïté de voisinage ne peut pas s'établir.

Pour vérifier les intervalles de l'interface OSPFv2 qui ont été configurés, utilisez la commande show ip ospf interface . Les intervalles Hello et Dead 0/0/0 Gigabit Ethernet sont réglés par défaut à 10 secondes et 40 secondes respectivement.

Utilisez la commande show ip ospf neighbor pour voir le délai Dead amorce un compte à rebours de 40 secondes. Par défaut, cette valeur est réactualisée toutes les 10 secondes lorsque R1 reçoit un Hello de son voisin.


OSPF Packets

Les routeurs qui exécutent OSPF échangent des messages pour transmettre les informations de routage via cinq types de paquets.
  1. Paquet Hello
  2. Paquet DBD de description de base de données
  3. Paquet LSR de demande d'état de liens
  4. Paquet LSU de mise à jour d'état de liens
  5. Paquet LSA d'accusé de réception d'état de liens

Paquet Hello

Les paquets OSPFv2 Hello sont transmis à l'adresse de multidiffusion 224.0.0.5 (tous les routeurs OSPF) toutes les 10 secondes. Il s'agit de la valeur du minuteur par défaut sur les réseaux à accès multiple et point à point.

Remarque: Les paquets Hello ne sont pas envoyés sur les interfaces définies sur passive par la commande passive-interface .

L'intervalle Dead est la période pendant laquelle le routeur attend de recevoir un paquet Hello avant de déclarer le voisin en panne. Si l'intervalle Dead expire avant que les routeurs ne reçoivent un paquet Hello, le protocole OSPF supprime le voisin de sa LSDB. Le routeur diffuse vers la LSDB les informations concernant le voisin hors service vers toutes les interfaces compatibles OSPF. Cisco utilise par défaut le quadruple de l'intervalle Hello. Ce délai est de 40 secondes sur les réseaux multi-accès et point à point.

Il peut être souhaitable de modifier les minuteurs OSPF afin que les routeurs détectent plus rapidement les défaillances du réseau. Cela augmente le trafic, mais le besoin d'une convergence rapide est parfois plus important que les inconvénients du trafic supplémentaire produit.

Remarque: Les valeurs par défaut des intervalles des paquets Hello et Dead sont basées sur les meilleures pratiques et doivent être modifiées uniquement dans de rares circonstances.

Les intervalles Hello et Dead OSPFv2 peuvent être modifiés manuellement au moyen des commandes suivantes de mode de configuration d'interface :

Router(config-if)# ip ospf hello-interval seconds
Router(config-if)# ip ospf dead-interval seconds

Router(config-if)# no ip ospf hello-interval
Router(config-if)# no ip ospf dead-interval
pour rétablir les valeurs par défaut des intervalles

En exemple, l'intervalle Hello pour la liaison entre R1 et R2 est modifié à 5 secondes. Le Cisco IOS modifie automatiquement l'intervalle Dead pour le porter à 4 fois la valeur de l'intervalle Hello. Cependant, vous pouvez documenter le nouvel intervalle Dead dans la configuration en le réglant manuellement à 20 secondes, comme indiqué.

Lorsque le Minuteur Dead sur R1 expire, R1 et R2 perdent la contiguïté. R1 et R2 doivent être configurés avec le même intervalle Hello. Utilisez la commande show ip ospf neighbor sur R1 pour vérifier les contiguïtés de voisin.


OSPF Terminology

Link A link is a network or router interface assigned to any given network. When an interface is added to the OSPF process, it’s considered to be a link. This link, or interface, will have up or down state information associated with it as well as one or more IP addresses.

Router ID (RID) The router ID is an IP address used to identify the router. Cisco chooses the router ID by using the highest IP address of all configured loopback interfaces. If no loopback interfaces are configured with addresses, OSPF will choose the highest IP address out of all active physical interfaces. To OSPF, this is basically the “name” of each router.

Neighbor Neighbors are two or more routers that have an interface on a common network, such as two routers connected on a point-to-point serial link. OSPF neighbors must have a number of common configuration options to be able to successfully establish a neighbor relationship, and all of these options must be configured exactly the same way: Area ID Stub area flag Authentication password (if using one) Hello and Dead intervals

Adjacency An adjacency is a relationship between two OSPF routers that permits the direct exchange of route updates. Unlike EIGRP, which directly shares routes with all of its neighbors, OSPF is really picky about sharing routing information and will directly share routes only with neighbors that have also established adjacencies. And not all neighbors will become adjacent—this depends upon both the type of network and the configuration of the routers.

■ In multi-access networks, routers form adjacencies with designated and backup designated routers.

■ In point-to-point and point-to-multipoint networks, routers form adjacencies with the router on the opposite side of the connection.

Designated router (DR) A designated router is elected whenever OSPF routers are connected to the same broadcast network to minimize the number of adjacencies formed and to publicize received routing information to and from the remaining routers on the broadcast network or link.

■ Elections are won based upon a router’s priority level, with the one having the highest priority becoming the winner.

■ If there’s a tie, the router ID will be used to break it. All routers on the shared network will establish adjacencies with the DR and the BDR, which ensures that all routers’ topology tables are synchronized.

Backup designated router A backup designated router (BDR) is a hot standby for the DR on broadcast, or multi-access, links. The BDR receives all routing updates from OSPF adjacent routers but does not disperse LSA updates.

NB: L'election des DR et BDR se font sur chaque Reseau

Hello protocol The OSPF Hello protocol provides dynamic neighbor discovery and maintains neighbor relationships. Hello packets and Link State Advertisements (LSAs) build and maintain the topological database. Hello packets are addressed to multicast address 224.0.0.5.

Neighborship database The neighborship database is a list of all OSPF routers for which Hello packets have been seen. A variety of details, including the router ID and state, are maintained on each router in the neighborship database.

Topological database The topological database contains information from all of the Link State Advertisement packets that have been received for an area. The router uses the information from the topology database as input into the Dijkstra algorithm that computes the shortest path to every network.

LSA packets are used to update and maintain the topological database.

Link State Advertisement (LSA) A Link State Advertisement is an OSPF data packet containing link-state and routing information that’s shared among OSPF routers. An OSPF router will exchange LSA packets only with routers to which it has established adjacencies.

OSPF areas An OSPF area is a grouping of contiguous networks and routers. All routers in the same area share a common area ID. Because a router can be a member of more than one area at a time, the area ID is associated with specific interfaces on the router. This would allow some interfaces to belong to area 1 while the remaining interfaces can belong to area 0. All of the routers within the same area have the same topology table. When configuring OSPF with multiple areas, you’ve got to remember that there must be an area 0 and that this is typically considered the backbone area. Areas also play a role in establishing a hierarchical network organization—something that really enhances the scalability of OSPF!

Broadcast (multi-access) Broadcast (multi-access) networks such as Ethernet allow multiple devices to connect to or access the same network, enabling a broadcast ability in which a single packet is delivered to all nodes on the network. In OSPF, a DR and BDR must be elected for each broadcast multi-access network.

Nonbroadcast multi-access Nonbroadcast multi-access (NBMA) networks are networks such as Frame Relay, X.25, and Asynchronous Transfer Mode (ATM). These types of networks allow for multi-access without broadcast ability like Ethernet. NBMA networks require special OSPF configuration to function properly.

Point-to-point Point-to-point refers to a type of network topology made up of a direct connection between two routers that provides a single communication path. The point-topoint connection can be physical—for example, a serial cable that directly connects two routers—or logical, where two routers thousands of miles apart are connected by a circuit in a Frame Relay network. Either way, point-to-point configurations eliminate the need for DRs or BDRs.

Point-to-multipoint Point-to-multipoint refers to a type of network topology made up of a series of connections between a single interface on one router and multiple destination routers. All interfaces on all routers share the point-to-multipoint connection and belong to the same network. Point-to-multipoint networks can be further classified according to whether they support broadcasts or not. This is important because it defines the kind of OSPF configurations you can deploy.


OSPF Priority

Configure OSPF Priority
LAB-R1(config)#int interface-name
LAB-R1(config-if)#ip ospf priority priority
LAB-R1(config-if)#end
LAB-R1#clear ip ospf process

Priority Values: 0-255

R5(config-if)#ip ospf priority ?
<0-255> Priority

Example
R1(config-if)#ip ospf priority 200

You change the priority if you like by using the ip ospf priority command:

■ The default priority is 1.
■ A priority of 0 means you will never be elected as DR or BDR.
■ You need to use clear ip ospf process before this change takes effect.

exemple
router ospf 10
network 192.168.1.0 0.0.0.255 area 0
or
network 192.168.1.1 0.0.0.0 area 0
or
network 0.0.0.0 255.255.255.255 area 0 si toutes les interfaces appartiennent a la même zone
or network 192.168.1.1 0.0.0.0 area 0 s’il y a des interfaces qui n’appartiennent pas a la même zone


OSPF Router ID

Un ID de routeur OSPF est une valeur 32 bits, représentée par une adresse IPv4. Il est utilisé pour identifier de manière unique un routeur OSPF, et tous les paquets OSPF incluent l'ID du routeur d'origine.

Chaque routeur doit disposer d'un ID de routeur pour pouvoir participer à un domaine OSPF. Il peut être défini par un administrateur ou attribué automatiquement par le routeur. L'ID du routeur est utilisé par un routeur compatible OSPF pour faire ce qui suit :

- Participer à la synchronisation des bases de données OSPF: Pendant l'état Exchange, le routeur ayant l'ID de routeur le plus élevé enverra d'abord leurs paquets de descripteur de base de données (DBD).

- Participer à l'élection du routeur désigné (DR) : Dans un environnement LAN multiaccès, le routeur avec l'ID de routeur le plus élevé est élu le DR. Le périphérique de routage dont l'ID est le deuxième plus élevé devient le routeur désigné de secours (BDR).

Configuration

R5(config)#router ospf 1
R5(config-router)#router-id 5.5.5.5
R5(config-router)#end
R5#clear ip ospf process

Priority in ID Value Choosing

  1. ■ ID= Router ID Value (If Value set)
  2. ■ ID= highest IP of loopback Interfaces (If Router ID value not set)
  3. ■ ID= Highest IP of Physical interfaces (If Loopback interfaces not set)
Configurer une interface de bouclage comme ID de routeur

Au lieu de s'appuyer sur l'interface physique, l'ID du routeur peut être affecté à une interface de bouclage. En règle générale, l'adresse IPv4 pour ce type d'interface de bouclage doit être configurée en utilisant un masque de sous-réseau de 32 bits (255.255.255.255). Cette méthode permet de créer une route d'hôte de façon efficace. Une route hôte 32 bits ne serait pas annoncée comme une route vers d'autres routeurs OSPF.

OSPF n'a pas besoin d'être activé sur une interface pour que cette interface soit choisie comme ID de routeur.


OSPF Metrics

OSPF uses a metric referred to as cost. A cost is associated with every outgoing interface included in an SPF tree. The cost of the entire path is the sum of the costs of the outgoing interfaces along the path. Because cost is an arbitrary value as defined in RFC 2338, Cisco had to implement its own method of calculating the cost for each OSPF-enabled interface.

Formula

Coût=bande passante de référence/ bande passante de l'interface

La bande passante de référence par défaut correspond à 108 (100,000,000); par conséquent, la formule est la suivante:
Coût = 100,000,000 bps/bande passante de l'interface en bps

Cisco uses a simple equation of 108/bandwidth, where bandwidth is the configured bandwidth for the interface. Using this rule, a 100 Mbps Fast Ethernet interface would have a default OSPF cost of 1 and a 1,000 Mbps Ethernet interface would have a cost of 1.

Example: 100 Mbps Interface 100 000 000/100 Mbps = 100 000 000/100 000 000 bps = 1

Warning
La valeur du coût doit être un entier. Si un élément inférieur à un entier est calculé, OSPF arrondit à l'entier le plus proche.

Comme la valeur du coût OSPF doit être un nombre entier, les interfaces FastEthernet, Gigabit Ethernet et 10 GigE partagent le même coût.

Pour corriger cette situation, vous pouvez:
■ Réglez la bande passante de référence avec la commande auto-cost reference-bandwidth sur chaque routeur OSPF.
■ Définissez manuellement la valeur de coût OSPF avec la commande ip ospf cost sur les interfaces nécessaires.

Non-Default OSPF Interface Cost Configuration

Corp(config)#int g0/1
Corp(config-if)#ip ospf cost 10

Cost values: 1-65535

Important to note is that this value can be overridden with the ip ospf cost command. The cost is manipulated by changing the value to a number within the range of 1 to 65,535. Because the cost is assigned to each link, the value must be changed on the specific interface you want to change the cost on.

Default Values

OSPF Metrics
Interface Type Bandwidth in bits/second Bandwidth in bytes/second OSPF Interface Cost
Ethernet 1G 128M 1
Ethernet 100M 12.5M 10
Ethernet 10M 1.25M 100
Modem 2M 256K 500
Modem 1M 128K 1000
Modem 500K 62.5K 2000
Modem 250K 31.25K 4000
Modem 125K 15 625 8 000
Modem 62500 7812 16000
Serial 115200 14400 10850
Serial 57600 7200 21700
Serial 38400 4800 32550
Serial 19200 2400 61120
Serial 9600 1200 65535

Reference Bandwidth

Pour aider le protocole OSPF à déterminer le chemin exact, la bande passante de référence doit être remplacée par une valeur supérieure pour prendre en compte les réseaux disposant de liens plus rapides que 100 Mbit/s.

La modification de la bande passante de référence n'affecte pas réellement la capacité de la bande passante sur le lien; en revanche, cela affecte simplement le calcul utilisé pour déterminer la métrique.

Pour ajuster la bande passante de référence, utilisez la command auto-cost reference-bandwidth Mbps en mode de configuration de routeur. Cette commande doit être configurée sur chaque routeur du domaine OSPF. Notez dans la commande que la valeur est exprimée en Mbps; par conséquent, pour ajuster les coûts pour Gigabit Ethernet, utilisez la commande auto-cost reference-bandwidth 1000. Pour 10 Gigabit Ethernet, utilisez la commande auto-cost reference-bandwidth 10000.

Pour revenir à la bande passante de référence par défaut, utilisez la commande auto-cost reference-bandwidth 100 . Une autre option consiste à modifier le coût sur une interface spécifique à l'aide de la commande ip ospf cost cost .

coût cumulé

Vérification du coût cumulé pour le chemin d'accès au réseau 10.10.2.0/24:


Single Area Configuration


Single Area OSPF Configuration

Steps

  1. OSPF Global Activation
  2. OSPF Interfaces Activation
OSPF Global Activation
LAB-R1(config)#router ospf Process-ID

Process ID
Values: 1-65535

R1(config)#router ospf ?
<1-65535> Process ID



OSPF Interfaces Activation

LAB-R1(config-router)#network net1-IP wildcard-mask area 0
or
LAB-R1(config)# interface Interface-ID
LAB-R1(config-if)# ip ospf process-id area 0

Syntax

LAB-R1(config)#router ospf Process-ID
LAB-R1(config-router)#network net1-IP wildcard-mask area 0
LAB-R1(config-router)#network net2-IP wildcard-mask area 0

Example
R1(config)#router ospf 1
R1(config-router)#network 192.168.1.0 0.0.0.255 area 0
R1(config-router)#network 192.168.2.0 0.0.0.255 area 0
R1(config-router)#network 10.0.0.0 0.0.0.3 area 0

Other Configurations

router ospf PID activate OSPF on router
LAB-R1(config-router)# passive interface-ID tell to interface to not send hello message. Do it for interface which aren’t connected to routers
LAB-R1(config-router)# passive default tell to all interfaces to not send hello message.in this case we can do no command for interfaces to be active
default information-originate dire aux autres routers de la zone que s’ils veulent aller vers un réseau inconnu passer par moi

LAB-R1(config-if)# ip ospf network point-to-point : Configurer l'interface pour fonctionner en mode Point-To-Point (Pas d' élection de DR et BDR)

Examples
LAB-R1(config-router)# passive g0/0

OSPF in Broadcast Networks

Dans les réseaux à accès multiple, OSPF choisit un DR et un BDR. Le DR est responsable de la collecte et de la distribution des LSVs envoyées et reçues. Le DR utilise l'adresse IPv4 multicast 224.0.0.5 qui est destinée à tous les routeurs OSPF.

Un BDR est également sélectionné en cas de panne du routeur DR. Le BDR écoute passivement et maintient une relation avec tous les routeurs. Lorsque le DR arrête de produire des paquets Hello, le BDR s'autodésigne comme DR et en assume le rôle.

Tous les autres routeurs deviennent un DROTHER (un routeur qui n'est ni le DR ni le BDR). Les DROTHER utilisent l'adresse à accès multiple 224.0.0.6 (tous les routeurs désignés) pour envoyer les paquets OSPF au DR et au BDR. Seuls le DR et le BDR écoutent le 224.0.0.6.

Processus d'élection DR/BDR par défaut

  • La sélection du DR et du BDR OSPF est basée sur les critères suivants, dans l'ordre indiqué:
  • Les routeurs du réseau choisissent le routeur ayant la priorité d'interface la plus élevée comme étant le DR. Le routeur ayant la deuxième priorité d'interface la plus élevée est choisi comme BDR.
  • La priorité peut être tout nombre compris entre 0 et 255.
  • Si la valeur de priorité de l'interface est définie sur 0, cette interface ne peut pas être sélectionnée comme DR ou BDR.
  • La priorité par défaut des interfaces de diffusion à accès multiple est de1.
  • Si les priorités d'interface sont égales, c'est le routeur dont l'ID est le plus élevé qui est choisi comme DR. Le routeur ayant le deuxième ID le plus élevé est choisi comme BDR.
  • Le processus de sélection a lieu dès que le premier routeur avec une interface OSPF devient actif sur le réseau actif. Si certains routeurs du réseau n'ont pas fini de démarrer, il est possible qu'un routeur avec un ID de routeur plus bas devienne le DR.
  • L'ajout d'un nouveau routeur ne déclenche pas un nouveau choix.
Une fois le DR choisi, ce routeur reste le DR jusqu'à ce l'un des événements ci-dessous survienne.
  • le DR défaille
  • Le processus OSPF exécuté sur le DR échoue ou s'arrête.
  • L'interface à accès multiple sur le DR échoue ou est désactivée.
En cas de panne du DR, le BDR devient automatiquement le DR, même si un DROTHER de priorité ou d'ID de routeur plus élevés a été ajouté au réseau après la sélection initiale du DR et du BDR. Cependant, une fois qu'un BDR est promu en DR, une nouvelle élection de BDR a lieu et le DROTHER ayant la plus haute priorité ou l'ID de routeur est élu comme nouveau BDR.

default-information originate

La commande de configuration de routeur default-information originate . R2 devient donc la source des informations de la route par défaut et la route statique par défaut est propagée dans les mises à jour OSPF.(Broadcast Networks)

R2(config)# router ospf 10
R2(config-router)# default-information originate
R2(config-router)# end

Vous pouvez vérifier les paramètres de route par défaut sur R2 en utilisant la commande show ip route . Vous pouvez également vérifier que R1 et R3 ont reçu une route par défaut.

Notez que l'origine de la route sur R1 est O*E2, ce qui signifie qu'elle a été apprise en utilisant OSPFv2. L'astérisque identifie cette route comme une bonne candidate pour la route par défaut.

La désignation E2 indique qu'il s'agit d'une route externe. La signification de E1 et E2 dépasse le champ d'application de ce module.


OSPF Commands

LAB# show ip ospf neighbor
LAB# show ip ospf neighbor detail Details About Neighbors
LAB# show ip ospf database information from all of the Link State Advertisement packets that have been received for an area.
LAB# show ip ospf interface
LAB# show ip ospf interface brief
LAB# show ip route
LAB# show ip route ospf
LAB# show ip ospf
LAB# show ip ospf int interface
LAB# show ip protocols


Multi Area Configuration


Multi Area OSPF

Pour une efficacité et une évolutivité supérieures, le protocole OSPF prend en charge le routage hiérarchique à l'aide de zones. Une zone OSPF est un groupe de routeurs qui partagent les mêmes informations d'état de liens dans leurs LSDB. Le protocole OSPF peut être implémenté de deux manières différentes:

OSPF à zone unique - Tous les routeurs sont dans une zone. La meilleure pratique consiste à utiliser la zone 0.

OSPF à zone plusieurs - le protocole OSPF est mis en œuvre à l'aide de plusieurs zones, de façon hiérarchique. Toutes les zones doivent se connecter à la zone de réseau fédérateur (zone 0). Les routeurs qui relient les zones entre elles sont des routeurs ABR (Area Border Router).

When configuring multi-area OSPF, one area must be called area 0, referred to as the backbone area. All other areas must connect to area 0.

Internal Router An internal router is any router with all of its interfaces included as members of the same area

Area Border Router (ABR)

Autonomous System Boundary Router (ASBR)An autonomous system boundary router (ASBR) is an OSPF router with at least one interface connected to an external network or different AS

A network is considered external if it’s either running a routing protocol other than OSPF


R0#sh ip ospf border-routers


OSPFv6


OSPFv3

Configuration Example

Router(config)#ipv6 router ospf 10
Router(config-rtr)#router-id 1.1.1.1
Router(config-if)#ipv6 ospf 10 area 0.0.0.0
I configured the area as 0.0.0.0, which is the same thing as just typing area 0

Corp#config t
Corp(config)#int g0/0
Corp(config-if)#ipv6 ospf 1 area 0
Corp(config-if)#int g0/1
Corp(config-if)#ipv6 ospf 1 area 0
Corp(config-if)#int s0/0/0
Corp(config-if)#ipv6 ospf 1 area 0
Corp(config-if)#int s0/0/1
Corp(config-if)#ipv6 ospf 1 area 0

Displaying

Corp#sh ipv6 route ospf
Corp#sh ipv6 protocols
Corp#sh ipv6 ospf int g0/0
Corp#sh ipv6 ospf neighbor
Corp#sh ipv6 ospf

Eninam BAGNABANA     |         |     bagnadavid@outlook.fr     |