OSPF Tutorial
In this article we will learn about the OSPF Routing Protocol
Open-Shortest-Path-First (OSPF) is the most widely used interior gateway protocol routing protocol on the world because it is a public (non-proprietary) routing protocol while its biggest rival, EIGRP, is a Cisco proprietary protocol so other vendors can’t use it (edit: EIGRP has become a public routing protocol since 2013). OSPF is a complex link-state routing protocol. Link-state routing protocols generate routing updates only when a change occurs in the network topology. When a link changes state, the device that detected the change creates a link-state advertisement (LSA) concerning that link and sends to all neighboring devices using a special multicast address. Each routing device takes a copy of the LSA, updates its link-state database (LSDB), and forwards the LSA to all neighboring devices.
Note:
+ OSPF routers use LSA (Link State Advertisement)to describe its link state. LSDB stores all LSAs.
+ A router uses Router LSA to describe its interface IP addresses.
+ After OSPF is started on a router, it creates LSDB that contains one entry: this router’s Router LSA.
There are five types of OSPF Link-State Packets (LSPs).
+ Hello: are used to establish and maintain adjacency with other OSPF routers. They are also used to elect the Designated Router (DR) and Backup Designated Router (BDR) on multiaccess networks (like Ethernet or Frame Relay).
+ Database Description (DBD or DD): contains an abbreviated list of the sending router’s link-state database and is used by receiving routers to check against the local link-state database
+ Link-State Request (LSR): used by receiving routers to request more information about any entry in the DBD
+ Link-State Update (LSU): used to reply to LSRs as well as to announce new information. LSUs contain seven different types of Link-State Advertisements (LSAs)
+ Link-State Acknowledgement (LSAck): sent to confirm receipt of an LSU message
Key points
+ Is a public (non-proprietary) routing protocol.
+ Is the only link-state routing protocol you learn in CCNA
+ This works by using the Dijkstra algorithm
+ Information about its neighbors (local connectivity) is sent to the entire network using multicasting
+ Routing information is shared through Link-state updates (LSAs)
+ HELLO messages are used to maintain adjacent neighbors. By default, OSPF routers send Hello packets every 10 seconds on multiaccess and point-to-point segments and every 30 seconds on non-broadcast multiaccess (NBMA) segments (like Frame Relay, X.25, ATM).
+ Is a classless routing protocol because it does not assume the default subnet masks are used. It sends the subnet mask in the routing update.
+ Supports VLSM and route summarization
+ Uses COST as a metric which CISCO defines as the inverse of the bandwidth
+ Uses AREAs to subdivide large networks, providing a hierarchical structure and limit the multicast LSAs within routers of the same area — Area 0 is called backbone area and all other areas connect directly to it. All OSPF networks must have a backbone area
+ Only support IP but it’s not bad as we are all using IP, right? :)
Area Border Routers (ABR) are any routers that have one interface in one area and another interface in another area
Let’s see an example of OSPF
Suppose OSPF has just been enabled on R1 & R2. Both R1 and R2 are very eager to discover if they have any neighbors nearby but before sending Hello messages they must first choose an OSPF router identifier (router-id) to tell their neighbors who they are. The Router ID (RID) is an IP address used to identify the router and is chosen using the following sequence:
+ The highest IP address assigned to a loopback (logical) interface.
+ If a loopback interface is not defined, the highest IP address of all active router’s physical interfaces will be chosen.
+ The router ID can be manually assigned
In this example, suppose R1 has 2 loopback interfaces & 2 physical interfaces:
+ Loopback 0: 10.0.0.1
+ Loopback 1: 12.0.0.1
+ Fa0/0: 192.168.1.1
+ Fa0/1: 200.200.200.1
As said above, the loopback interfaces are preferred to physical interfaces (because they are never down) so the highest IP address of the loopback interfaces is chosen as the router-id -> Loopback 1 IP address is chosen as the router-id.
Suppose R1 doesn’t have any loopback interfaces but it has 2 physical interfaces:
+ Fa0/0: 210.0.0.1 but it is shut down
+ Fa0/1: 192.168.1.2 (is active)
Although Fa0/0 has higher IP address but it is shutdown so R1 will choose Fa0/1 as its router-id.
Now both the routers have the router-id so they will send Hello packets on all OSPF-enabled interfaces to determine if there are any neighbors on those links. The information in the OSPF Hello includes the OSPF Router ID of the router sending the Hello packet.
OSPF Tutorial page 1 says “Uses COST as a metric which CISCO defines as the inverse of the bandwidth”. What does that exactly mean?
@mayor_martin: The formula of cost:
Cost = Reference / Bandwidth.
By default, Reference is 100000 [ Kb/s ].
We can see Cost is inverse of Bandwidth.
Very useful tutorial about OSPF.
is the ccna exam as same as the dump and simulation on 9tut
yes shifa but you must download and practise latest dumps,so best of luck for your exam
I find this OSPF tutorial very vague – you don’t even mention DR/BDR or that actually LSA’s are sent to the DR/BDR via multicast 224.0.0.6 and then redistributed to all other routers in the area via multicast 224.0.0.5 to reduce traffic and ensure routers have consistent LSDBs. Isn’t that correct or am I wrong?
@ rick, pls can u help me with current dumps, i’m planning writing my own in two weeks time. my e-mail is: michaelskywave@yahoo.com
Can you please send me the link to the latest dumps.
id is avanita25@yahoo.co.in
How close are the questions on this site to the real CCNA exam ?
any one please send me latest ccna dumps to this mail id : skazeemullah@gmail.com
what does the router say when you try to asigsn the privilege level 15? I would check what level your current user has also. Run a show privilege’ command to find out
Hello Guys I hope you will be fine there. I have CCNA (640-802) Vouchers on
special discount of 58% for World wide, with six months expiry date till you
purchase. Each voucher cost 60USD.
Details Required For CCNA Voucher For Discount Processing:
1-Full Name. 1st Name & Last Name (as you want to appear on certificate & documents)
2-Country.
3-City.
4-State.
5-Pin Code (or Area Code)
6-Residential Address (or where you can collect your Certificate or further correspondence
can be received)
Add me on Skype through this information which is written below:
Skype Name: rockon660
you can also email me at this email address which is written below:
madeelqaiser@gmail.com
If you have any Questions feel free to contact me.
Thanks,
Best regards,
Adeel
9tut.com i enjoy your tutorial on ospf, quite understandable, thanks.
9tut yo are greet keep, it up
i am want to sit for my ccna exam by end of may. can any onesend me the latest dump
my email is kariokojim@yahoo.com
9tut THX very much
i need some advice before exam CCNA and latest dump
my e-mail is engineer.haytham@yahoo.com
Hi All,
I am confused with auto-summary command, anyone can tell me Why we need it and What is a benefit of using it in all routing protocols (RIP, EIGRP and OSPF ) ?
I appreciate.
What does loopback do? Can you explain?
Nahro, it reduces the network traffic by sending an ip address instead of dozens.
hii
@ alper
What does loopback do ?
the most benefits of loop back interface it is always turn on ” because is logic interface ”
so I use loop back interface always to identify the router to make ” telent ,ping —etc”
the configuratuion is easy
in configuration mode
router # interface loopback 55
router # ip add “ip of network” ” subnet mask of network”
just lke this
55 can replace by any number
note: always loop back interface is up .
increadible tutorial.
arsalan_duli@yahoo.com
can someone email me the latest dumps. Also does anyone know when the CCNA exam is changing?
shahram3272gmail.com
nice concepts…….
please help me in this question
What is the type of LSA?
@9tut@
please help me in this question
What is the type of LSA?
Anyone please send me the latest dump to sidegrove@yahoo.com. thank you in advance
very useful tutorial, keep the good work up guys.
can anyone send me the latest dumps, i am planning to give ccna exam within 15days.. Please
send me on my mail id rj.nidcity@gmail.com
Hello all,
Is there any kind person who would mail me latest dumps? My email: jelena234@hotmail.com
any one please send me lates ccna dumps and any tutorial which might help me to pass may exam
ahmedfaaf@hotmail.co.uk
Please please suggest which ccna certif icate is good prepare ccna routing and switching , security please
Hello Guys, good summary to OSPF, can someone send latest dumps to ped.figueroa@gmail.com. or where can I get them from? I am taking test next week. Thank you all.
i am appearing for CCNA. Please send me the latest dumps on vaibhavgopal.dange@gmail.com.
thanks
i am appearing for CCNA next week
I’m going to write CCNA next month..Can anyone plz send the latest dumps at moh_moez@yahoo.com
The Last Router should be labeled R2 *not* R1. I hope you all saw that
**It’s a Rubicon**
Hi, does 9tut operate in other language? exemple French?
very simple and understandable information about ospf
please send me the latest 200-120 CCNA dumps on syed.asad@basecampdata.org
9 tuts is so great —– but …this may also be some useful. http://www.routeralley.com/ra/docs/ospf.pdf
I am about to sit to the ccna 200-120 in second week of January.I would be grateful if you can send me the latest dumps at sonkonn@yahoo.co.uk
people,im gonna have exam after 2 weeks pls send me the atest dumps pls pls z.mesteliyev@gmail.com
Any new dumps for ccna 200-120
Taking ICND1 IN 2 WEEKS. Can some Saint out there send me the latest dumps please ?? rick27mp@yahoo.com.. I would be sooo thankkful..
same here, taking the 100-101 soon. any update dumps out there would be helpful. thx
oops…edugeek211@yahoo.com
can any1 plz send me the 100-101 ICND1 dumps on wtohfa88@live.com
“Suppose OSPF has just been enabled on R1 & R2. Both R1 and R2 are very eager to discover if they have any neighbors nearby but before sending Hello messages they must first choose an OSPF router identifier (router-id) to tell their neighbors who they are. The Router ID (RID) is an IP address used to identify the router and is chosen using the following sequence:”
The router ID is a 32 bit number. It appears in the same quad dotted decimal format as an IP address, but it is not. If the router does not have a router ID specified, then the OSPF will chose the IP address on the first interface that comes up and use that as the RID.
Hi,
Seems that there is typing mistake in here :
…using the following sequence:
+ The highest IP address assigned to a loopback (logical) interface.
+ If a loopback interface is not defined, the highest IP address of all active router’s physical interfaces will be chosen.
+ The router ID can be manually assigned
In fact the sequence is :
1- Manually assigned RID using #router-id A.B.C.D (router command)(even if A.B.C.D is not one of our interfaces’ IP)
2- Highest IP of assigned Loopback
3- Highest IP of active interfaces (up/up – up/down – but not down/down)
thank you 9tut.
can someone email me the latest ICND2 dumps please: ahaghighi@aol.co.uk