--- title: Protocole OSPFv2 --- ###### tags: `__ccna_EN`,`Routage dynamique` default-information originate # Protocole OSPF - Open Shortest Path First Notion d'administrative distance: Si plusieurs chemins avec différebts protocole de routage disponibles. Le routeur R1, utilisera la métrique "administrative distancec" pour déterminer le chemin. Il s'agit du cout de chaque protocole utilisé. ![](https://i.imgur.com/cdGsRGH.png) Les commandes: SHOW IP OSPF INTERFACE BRIEF show ip ospf int brief shwo ip ospf neighbor ## Description OsPF is a Link state protocol Using LSA Lin state advertissement ## OSPF Path What will be the best path ? what is the most efficient ? ![](https://i.imgur.com/lqjzDOp.jpg) It depend of **metric** Cost = Bandwidth ref / Interface Bandwidth BD ref = 100 Millions ![](https://i.imgur.com/SxwmKS3.png) ![](https://i.imgur.com/kGdyoOX.jpg) # Router ID How Router ID or RID is choosen ? When we write router ospf 1 > conf t > **router ospf 1** > First option is the RID Configured = 2.3.4.5 Second option Loopback address ( Highest IP) Three Highest IP on any active Interface In this case ![](https://i.imgur.com/7NLeLpn.png) How to see the RID? ![](https://i.imgur.com/alZ0rF3.png) How to configure Router-id ![](https://i.imgur.com/M5Pz13g.png) # OSPF AREA ![](https://i.imgur.com/alFlaPv.jpg) In order to not have heavy LSDB in OSPF Router we split the topology in smaller AREA ![](https://i.imgur.com/qXc98Vu.jpg) # WILDCARD MASK and Network Statement ![](https://i.imgur.com/3cHEmlS.png) How many bit we want match ? ![](https://i.imgur.com/rjLEywG.png) Include multiple interface in the same time? ![](https://i.imgur.com/jUPfbFS.png) in this case the router is interesed only by the interface begining with 10.x.x.x Next Case In this case Routeur is insterested only bit 2 first BITs ![](https://i.imgur.com/g9MQfWk.png) Next case Routeur is interested by everything int directly connected ![](https://i.imgur.com/zIUmfME.png) # How OSPF Wilcard mask & Network Operate Relation between Network Mask & Wildcard Mask = INVERTED ![](https://i.imgur.com/vyqfyUf.png) SHOW IP OSPF INTERFACE BRIEF # OSPF Wilcards Masks for Subnets 255-224 = 31 ![](https://i.imgur.com/EBZXmSm.png) ![](https://i.imgur.com/TwP4c72.png) # OSPF DR and BRDs on Broadcast Networks Communication with Neighbor Down state: Waiting Init state Init state (Hello Packet) Two-way state: Bidirectionnial communication Ex start: LSBD exchange Excchange: DBD packet FULL: Data synchro ![](https://i.imgur.com/fWBEJM5.png) In this schema Incontrolable mesh ![](https://i.imgur.com/ScCxJgt.jpg) ![](https://i.imgur.com/t9W7TiP.jpg) # Verifying OSPF Adjacencies ![](https://i.imgur.com/kjYz7jY.jpg) R1 show ip ospf int brief ![](https://i.imgur.com/FF4xfd7.png) ![](https://i.imgur.com/dqnxdP9.png) show ip ospf neighbor ![](https://i.imgur.com/WRtUbkJ.png) R2 show ip ospf int brief ![](https://i.imgur.com/ixeoNbC.png) show ip ospf neighbor ![](https://i.imgur.com/N3l8Ahe.png) R3 show ip ospf int brief ![](https://i.imgur.com/TKzzf39.png) show ip ospf neighbor ![](https://i.imgur.com/wC1GR8f.png) Table ![](https://i.imgur.com/UlkqVEM.jpg) # OSPF, LSA, and DRs ![](https://i.imgur.com/5vR5cyC.png) LSA 1 every router ospf is going to generate LSA type 1 to communicate with the rest of the router (they are in the darkness) my rid is 2.2.2.2 my network is 10.12.34.0/24 LSA 2 is describing network broadcast which exist very router create lsa 2 which generate DR ![](https://i.imgur.com/1W53pap.png) # OSPF and Point to Point Network Types ![](https://i.imgur.com/SJw2NDu.png) PPP unicast protocost Point-to-point Protocol is a unicast link. So there is only one neighbor OSPF multicast => 224.0.0.5 ![](https://i.imgur.com/MkGyCEC.png) ![](https://i.imgur.com/Y2K05mQ.png) ![](https://i.imgur.com/vo2kJK5.png)