Jump to content


OSPF


  • Please log in to reply
41 replies to this topic

#1 DarkFiber

DarkFiber

    Cisco Expert

  • Members
  • PipPipPipPip
  • 927 posts
  • Gender:Male
  • Location:Cairo-Egypt
  • Interests:Networks

Posted 16 April 2009 - 09:09 PM


OSPF



OSPF Summary

The characteristics of OSPF follow:

 Link-state routing protocol.

 Uses IP protocol 89.

 Classless protocol (supports VLSMs and CIDR).

 Metric is cost, based on interface bandwidth by default (10^8 / BW in bps).

 Sends partial route updates only when there are changes.

 Send hello packets every 10 sec with dead timer of 40 sec over P-P & BC networks.

 Send hello packets every 30 sec with dead timer of 120 sec over NBMA networks.

 If the network is stable and there have been no updates within 30 min, a compressed update is sent.

 Routes labeled as intra-area, interarea, external Type 1, or external Type 2.

 Support for authentication.

 Uses Dijkstra algorithm to calculate SPF tree.

 Default administrative distance is 110.

 Uses multicast address 224.0.0.5 (ALLSPFRouters).

 Uses multicast address 224.0.0.6 (ALLDRouters).

 Recommended for large networks.

 For 2 routers to be adjacent :
1st. Hello packets must be sent & received.
2nd They must have the same hello & dead timers Also & same Net ID with subnet mask.
3rd They must be in the same area.


For more info & configuration, Kindly check the attached Document.

Attached Files

  • Attached File  OSPF.doc   178.5KB   2293 downloads

  • 0

#2 tigerplug

tigerplug

    Newbie

  • Members
  • Pip
  • 30 posts
  • Gender:Male
  • Location:Wherever I may Roam!

Posted 16 April 2009 - 09:27 PM

Excellent, as usual!

Thanks!
  • 0

#3 Marc Jones

Marc Jones

    Advanced Member

  • Members
  • PipPipPip
  • 294 posts
  • Gender:Male
  • Location:Wirral, UK

Posted 17 April 2009 - 02:45 AM

Awesome,

Got my CCNA Exam in 9 days, So stuff like this rocks.

Thanks.
  • 0

#4 Lisalady

Lisalady

    Cisco and Juniper

  • Members
  • Pip
  • 14 posts
  • Gender:Female

Posted 17 April 2009 - 03:25 AM

Always handy to have a summary...later...learn it by heart! :D
  • 0

#5 pappyaar

pappyaar

    Cisco Routing/EEM/TCL

  • Technical Experts
  • PipPipPipPip
  • 959 posts
  • Gender:Male

Posted 17 April 2009 - 04:45 AM

Dear DarkFiber, an excellent post for quick review. One thing i would like to add is regarding the adjacency 2nd point.

For P2P/P2mp links the subnet ID should match but the mask match is not necassary.
example

R1 ---------------------p2p/p2mp---------------------------R2
10.0.0.1/24 10.0.0.2/30

They will be adjacent without any issue (offcourse after matching other parameters as well)

For Broadcast links however the subnet ID plus mask MUST match or they will not be adjacent. This gives rise to very interesting query which i will post later (perhaps tomorrow) in CCNP section. Do check it out ;-)

In case of any confusion feel free to ask.

Edited by pappyaar, 17 April 2009 - 04:46 AM.

  • 0

#6 d_esTin_y

d_esTin_y

    Member

  • Members
  • PipPip
  • 137 posts

Posted 17 April 2009 - 11:46 PM

Dear DarkFiber, an excellent post for quick review. One thing i would like to add is regarding the adjacency 2nd point.

For P2P/P2mp links the subnet ID should match but the mask match is not necassary.
example

R1 ---------------------p2p/p2mp---------------------------R2
10.0.0.1/24 10.0.0.2/30

They will be adjacent without any issue (offcourse after matching other parameters as well)

For Broadcast links however the subnet ID plus mask MUST match or they will not be adjacent. This gives rise to very interesting query which i will post later (perhaps tomorrow) in CCNP section. Do check it out ;-)

In case of any confusion feel free to ask.




R01--p2p--p2m--R02

in this situation they are not going to form adj if they are not having the same mask.
  • 0

#7 pappyaar

pappyaar

    Cisco Routing/EEM/TCL

  • Technical Experts
  • PipPipPipPip
  • 959 posts
  • Gender:Male

Posted 18 April 2009 - 04:54 AM

R01--p2p--p2m--R02

in this situation they are not going to form adj if they are not having the same mask.


Dear Destiny, how can you say that ;-) what made you think they will not form the adj ?
  • 0

#8 hi.friends

hi.friends

    Advanced Member

  • Members
  • PipPipPip
  • 234 posts
  • Gender:Male
  • Location:FRIENDSHIP LAND

Posted 18 April 2009 - 07:05 AM

Dear Destiny, how can you say that ;-) what made you think they will not form the adj ?




awesome :rolleyes:
  • 0

#9 DarkFiber

DarkFiber

    Cisco Expert

  • Members
  • PipPipPipPip
  • 927 posts
  • Gender:Male
  • Location:Cairo-Egypt
  • Interests:Networks

Posted 19 April 2009 - 10:39 PM

Dear all,
This is just more info to read regarding the LSA structure & database, as it was requested by some members here & in my EIGRP post......Just read it, Its advanced for the CCNA level, but who knows one day you might be even above my level :)


The show commands for checking the Topology table ( LSA database ) :

# sh ip ospf database
# sh ip ospf database database-summary
# sh ip ospf database router <link state-id > (display type 1 LSA in ospf database)
# sh ip ospf database network <link state-id > (display type 2 LSA in ospf database)
# sh ip ospf database summary <link state-id > (display type 3 LSA in ospf database)
# sh ip ospf database asbr-summary <link state-id > (display type 4 LSA in ospf database)
# sh ip ospf database external <link state-id > (display type 5 LSA in ospf database)
# sh ip ospf database nssa-external <link state-id > (display type 7 LSA in ospf database)


ZIZO#show ip ospf database router 192.168.30.10 >>>>>>>>>>>>>Type 1 LSA
OSPF Router with ID (192.168.30.50) (Process ID 1)
Router Link States (Area 0)
Routing Bit Set on this LSA
LS age: 680
Options: (No TOS-capability)
LS Type: Router Links
Link State ID: 192.168.30.10
Advertising Router: 192.168.30.10
LS Seq Number: 80001428
Checksum: 0x842A
Length: 60
Area Border Router
Number of Links: 3
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 192.168.30.80
(Link Data) Router Interface address: 192.168.17.9
Number of TOS metrics: 0
TOS 0 Metrics: 64



ZIZO#show ip ospf database summary 172.16.121.0 >>>>>>>>> OIA , type 3 LSA
OSPF Router with ID (192.168.30.50) (Process ID 1)
Summary Net Link States (Area 0)
Routing Bit Set on this LSA
LS age: 214
Options: (No TOS-capability)
LS Type: Summary Links(Network)
Link State ID: 172.16.121.0 (summary Network Number)
Advertising Router: 192.168.30.60
LS Seq Number: 800000B1
Checksum: 0xE864
Length: 28
Network Mask: /24
TOS: 0 Metric: 791

Attached Files


Edited by DarkFiber, 19 April 2009 - 10:40 PM.

  • 0

#10 DarkFiber

DarkFiber

    Cisco Expert

  • Members
  • PipPipPipPip
  • 927 posts
  • Gender:Male
  • Location:Cairo-Egypt
  • Interests:Networks

Posted 26 April 2009 - 10:24 PM




Seems to me that only 4 were interested to know the LSA structure ....loool


  • 0

#11 DarkFiber

DarkFiber

    Cisco Expert

  • Members
  • PipPipPipPip
  • 927 posts
  • Gender:Male
  • Location:Cairo-Egypt
  • Interests:Networks

Posted 30 April 2009 - 08:27 AM



Hello Guys , any questions regarding this Topic : )
  • 0

#12 moekad

moekad

    Advanced Member

  • Members
  • PipPipPip
  • 270 posts

Posted 07 May 2009 - 05:52 AM

heys
they say highest priority will elect DR
why here is the least on it elect DR ?
R2#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
192.168.200.1 140 FULL/ - 00:00:39 192.168.0.2 Serial0/0
192.168.100.2 3 FULL/DR 00:00:35 192.168.100.2 FastEthernet0/
1
R2#

one more thing
if i got Giga ethernet
i use
auto-cost reference-bandwith 1000 ?
in other mean
when i use this command auto-cost reference-bandwith ?

Thanks smile.gif
  • 0

#13 .n.

.n.

    Newbie

  • Members
  • Pip
  • 26 posts

Posted 07 May 2009 - 01:40 PM

The DR/BDR election in OSPF:
- The priority default is 1. Routers with priority 0 will not be included in the election process. The highest priority will be elected as DR.
- If there's a tie in priority, the highest Router ID will be elected as DR.
- If the DR is down, then the BDR will be the DR. If the previous DR is up again, it will not replace the current DR, because the DR/BDR election is not preemptive.

In your case, the neighbors are probably not in the same OSPF area:
- The 192.168.200.1 is connected to Serial0/0 interface, the default OSPF network type for directly connected serial interfaces is point-to-point. In point-to-point network, the OSPF doesn't need DR/BDR, therefore no DR/BDR election occurs. That's why the state is 'FULL/-', it's not the DR, BDR, or DROTHER.
- The 192.168.100.2 is connected to FastEthernet0 interface, the default OSPF network type for Ethernet interfaces is broadcast. In broadcast network the OSPF needs DR/BDR. In this case, it's the DR.


The auto-cost bandwidth-reference, by default the value is 100Mbps.
The formula to calculate the cost is as follow: 100Mbps / bandwidth.
For example, the FastEthernet interface has the speed of 100Mbps, the cost = 100Mbps/100Mbps = 1.

The reason to use this command is if we're using the link faster than 100Mbps in the network.
For example, if we're using the Gigabit link which has the speed of 1000Mbps, the cost calculation using the default value of 100Mbps = 100Mbps/1000Mbps = 0.1, in this case the cost would be rounded to 1 because the lowest cost is 1. The Gigabit cost would be the same with the FastEthernet cost.

If using the Gigabit link, in order to make the cost as 1, the default value of 100Mbps should be changed to 1000Mbps, so then the cost = 1000Mbps/1000Mbps = 1.
The command would be: auto-cost reference-bandwidth 1000

Another example, for 10Gigabit link, the speed is 10000Mbps, to make the cost as 1, then the value should be change to 10000Mbps, so the cost = 10000Mbps/10000Mbps = 1.
The command would be: auto-cost reference-bandwidth 10000
  • 0

#14 moekad

moekad

    Advanced Member

  • Members
  • PipPipPip
  • 270 posts

Posted 08 May 2009 - 07:12 AM

QUOTE (.n. @ May 7 2009, 08:40 AM) <{POST_SNAPBACK}>
The DR/BDR election in OSPF:
- The priority default is 1. Routers with priority 0 will not be included in the election process. The highest priority will be elected as DR.
- If there's a tie in priority, the highest Router ID will be elected as DR.
- If the DR is down, then the BDR will be the DR. If the previous DR is up again, it will not replace the current DR, because the DR/BDR election is not preemptive.

In your case, the neighbors are probably not in the same OSPF area:
- The 192.168.200.1 is connected to Serial0/0 interface, the default OSPF network type for directly connected serial interfaces is point-to-point. In point-to-point network, the OSPF doesn't need DR/BDR, therefore no DR/BDR election occurs. That's why the state is 'FULL/-', it's not the DR, BDR, or DROTHER.
- The 192.168.100.2 is connected to FastEthernet0 interface, the default OSPF network type for Ethernet interfaces is broadcast. In broadcast network the OSPF needs DR/BDR. In this case, it's the DR.


The auto-cost bandwidth-reference, by default the value is 100Mbps.
The formula to calculate the cost is as follow: 100Mbps / bandwidth.
For example, the FastEthernet interface has the speed of 100Mbps, the cost = 100Mbps/100Mbps = 1.

The reason to use this command is if we're using the link faster than 100Mbps in the network.
For example, if we're using the Gigabit link which has the speed of 1000Mbps, the cost calculation using the default value of 100Mbps = 100Mbps/1000Mbps = 0.1, in this case the cost would be rounded to 1 because the lowest cost is 1. The Gigabit cost would be the same with the FastEthernet cost.

If using the Gigabit link, in order to make the cost as 1, the default value of 100Mbps should be changed to 1000Mbps, so then the cost = 1000Mbps/1000Mbps = 1.
The command would be: auto-cost reference-bandwidth 1000

Another example, for 10Gigabit link, the speed is 10000Mbps, to make the cost as 1, then the value should be change to 10000Mbps, so the cost = 10000Mbps/10000Mbps = 1.
The command would be: auto-cost reference-bandwidth 10000


hey thanks really good explain
just one more question
when i create the topology i'm the one who elect the DR/BDR is better right ?
by specify priority or Router ID ? so to minimize the traffic !
right?
Thanks again smile.gif

in addition on my reply
i had a test
2 routers fa0/0 having neighbot 192.168.1.200 and fa0/1 192.168.1.204 neighbot
i put DR 192.168.1.204 and BDR 192.168.1.200 it give me wrong
the correct DR 192.168.1.200 and BDR 192.168.1.204
in addition all pirority set to 1 mean tie and u said before
DR having highest Router ID if no loopback config/and all priority are equal
and here 192.168.1.204 is greater must be DR why it's set as BDR ?
Thanks
  • 0

#15 .n.

.n.

    Newbie

  • Members
  • Pip
  • 26 posts

Posted 08 May 2009 - 01:58 PM

The router would have the Router ID as follows:
1. The Router ID would be the highest IP address of a Loopback interface if available.
2. If there's no Loopback interface, then the Router ID would be the highest IP address of a physical interface on that router.
3. You can also override the default Router ID by setting your own Router ID using the 'router-id' command.
However, after using that command, in order for it to take effect, you should reload the router or clear the OSPF process.

In your case, if you're using the default Router ID and priority, then the DR would be the 192.168.1.204 because it's the highest IP address and there's a tie in the priority.

If you're using the 'router-id' command, do not forget to reload the router or clear the OSPF process, or it won't take effect.

Please post a more detailed configuration if you still have question.

I hope this helps. smile.gif
  • 0

#16 pappyaar

pappyaar

    Cisco Routing/EEM/TCL

  • Technical Experts
  • PipPipPipPip
  • 959 posts
  • Gender:Male

Posted 08 May 2009 - 04:25 PM

QUOTE (moekad @ May 8 2009, 08:12 AM) <{POST_SNAPBACK}>
hey thanks really good explain
just one more question
when i create the topology i'm the one who elect the DR/BDR is better right ?
by specify priority or Router ID ? so to minimize the traffic !
right?
Thanks again smile.gif

in addition on my reply
i had a test
2 routers fa0/0 having neighbot 192.168.1.200 and fa0/1 192.168.1.204 neighbot
i put DR 192.168.1.204 and BDR 192.168.1.200 it give me wrong
the correct DR 192.168.1.200 and BDR 192.168.1.204
in addition all pirority set to 1 mean tie and u said before
DR having highest Router ID if no loopback config/and all priority are equal
and here 192.168.1.204 is greater must be DR why it's set as BDR ?
Thanks


Dear Moekd, i have tried to answer your confusion in your original post here

http://www.sadikhov.com/forum/index.php?showtopic=167652

Check and see if it resolves your issue
  • 0

#17 jowie

jowie

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 19 May 2009 - 05:36 PM

Guys,

good day to everyone.. I know im a bit out of topic.. this is my first post here..

I found this site very informative but I do not know where to start...

I want to be a CCNA and I am targeting to get the exam within 2 months because I have work 6 days a week so I can't study full time.

I want to know about the updates for CCNA today and I want to ask for some links where to get study materials for the common networking protocols and the list of IOS commands that I have to memorize...

I dont have too much time to read so I am looking for concise study materials..


A million thanks...




  • 0

#18 dgharami

dgharami

    Newbie

  • Members
  • Pip
  • 22 posts
  • Gender:Male
  • Location:India

Posted 29 May 2009 - 02:07 PM

DarkFiber's files in PDF Format

Attached File  OSPF.pdf   1.01MB   439 downloads

Attached File  LSA_Structure.pdf   772.34KB   258 downloads

smile.gif
  • 0

#19 nashar

nashar

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 09 June 2009 - 01:21 AM

QUOTE (dgharami @ May 29 2009, 03:07 PM) <{POST_SNAPBACK}>
DarkFiber's files in PDF Format

Attached File  OSPF.pdf   1.01MB   439 downloads

Attached File  LSA_Structure.pdf   772.34KB   258 downloads

smile.gif

thank you
but i cant download this files always disconnect
can you upload this file on another site
  • 0

#20 dgharami

dgharami

    Newbie

  • Members
  • Pip
  • 22 posts
  • Gender:Male
  • Location:India

Posted 09 June 2009 - 03:34 AM

Re-Upload DarkFiber's OSPF files in PDF Format

Attached File  OSPF.pdf   1MB   162 downloads

Attached File  LSA_Structure.pdf   773.49KB   137 downloads

Hope this will work !!!!!
cool.gif
  • 0

#21 amfpg

amfpg

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 21 July 2009 - 12:44 PM

QUOTE (pappyaar @ Apr 18 2009, 04:54 AM) <{POST_SNAPBACK}>
Dear Destiny, how can you say that ;-) what made you think they will not form the adj ?



can you explain about this?

and what the p2m and p2p?

thx
  • 0

#22 urangkayo

urangkayo

    Newbie

  • Members
  • Pip
  • 2 posts
  • Gender:Male
  • Location:Indonesia

Posted 21 July 2009 - 09:01 PM

QUOTE (dgharami @ Jun 9 2009, 12:34 AM) <{POST_SNAPBACK}>
Re-Upload DarkFiber's OSPF files in PDF Format

Attached File  OSPF.pdf   1MB   162 downloads

Attached File  LSA_Structure.pdf   773.49KB   137 downloads

Hope this will work !!!!!
cool.gif


can you reupload again because i still can't download it

thanks smile.gif

  • 0

#23 haiNo1

haiNo1

    Newbie

  • Members
  • Pip
  • 9 posts
  • Gender:Male
  • Location:Viet Nam

Posted 04 August 2009 - 01:50 AM

thanks
  • 0

#24 haiNo1

haiNo1

    Newbie

  • Members
  • Pip
  • 9 posts
  • Gender:Male
  • Location:Viet Nam

Posted 04 August 2009 - 02:13 AM

thank you so much!
  • 0

#25 Mutu

Mutu

    Member

  • Members
  • PipPip
  • 67 posts

Posted 28 September 2009 - 05:14 AM

The DR/BDR election in OSPF:
- The priority default is 1. Routers with priority 0 will not be included in the election process. The highest priority will be elected as DR.
- If there's a tie in priority, the highest Router ID will be elected as DR.
- If the DR is down, then the BDR will be the DR. If the previous DR is up again, it will not replace the current DR, because the DR/BDR election is not preemptive.

In your case, the neighbors are probably not in the same OSPF area:
- The 192.168.200.1 is connected to Serial0/0 interface, the default OSPF network type for directly connected serial interfaces is point-to-point. In point-to-point network, the OSPF doesn't need DR/BDR, therefore no DR/BDR election occurs. That's why the state is 'FULL/-', it's not the DR, BDR, or DROTHER.
- The 192.168.100.2 is connected to FastEthernet0 interface, the default OSPF network type for Ethernet interfaces is broadcast. In broadcast network the OSPF needs DR/BDR. In this case, it's the DR.


The auto-cost bandwidth-reference, by default the value is 100Mbps.
The formula to calculate the cost is as follow: 100Mbps / bandwidth.
For example, the FastEthernet interface has the speed of 100Mbps, the cost = 100Mbps/100Mbps = 1.

The reason to use this command is if we're using the link faster than 100Mbps in the network.
For example, if we're using the Gigabit link which has the speed of 1000Mbps, the cost calculation using the default value of 100Mbps = 100Mbps/1000Mbps = 0.1, in this case the cost would be rounded to 1 because the lowest cost is 1. The Gigabit cost would be the same with the FastEthernet cost.

If using the Gigabit link, in order to make the cost as 1, the default value of 100Mbps should be changed to 1000Mbps, so then the cost = 1000Mbps/1000Mbps = 1.
The command would be: auto-cost reference-bandwidth 1000

Another example, for 10Gigabit link, the speed is 10000Mbps, to make the cost as 1, then the value should be change to 10000Mbps, so the cost = 10000Mbps/10000Mbps = 1.
The command would be: auto-cost reference-bandwidth 10000


Hi guys,

I'm a bit confused. My question maybe a newbie question, but I'm a bit confused, so please bare with me on this.

The OSPF Election process as I understand it is:

1- The highest LoopBack address wins DR
if LB not configured then
2- Highest Physical address
3- Priority where 0 will not participate and 255 is highest.

Am I right on the first 3 steps?

Also, I don't see when will the priority be useful because most of the time you'll have an IP address set!

Last note:

I read somewhere on a cisco PDF that if the priority is set to 255, then this will overwrite the loopback address in the election process.

As you can see I'm well confused, so, someone please do help!
:(
  • 0

#26 Mutu

Mutu

    Member

  • Members
  • PipPip
  • 67 posts

Posted 30 September 2009 - 03:28 AM

I just labbed this on GNS 3 and noticed the following:

Highest LoopBack wins election
Highest Physical
When priority set to 0 router will not participate in election on a broadcast network
When set to priority 255, the router becomes DR regardless of all of the above!

I don't remember reading anywhere that using priority 255 overwrites the loopback and physical address in the election process!
  • 0

#27 TroyTempest

TroyTempest

    Member

  • Members
  • PipPip
  • 68 posts

Posted 03 October 2009 - 04:45 AM

So what happens if two routers have a priority of 255?

TT

I just labbed this on GNS 3 and noticed the following:

Highest LoopBack wins election
Highest Physical
When priority set to 0 router will not participate in election on a broadcast network
When set to priority 255, the router becomes DR regardless of all of the above!

I don't remember reading anywhere that using priority 255 overwrites the loopback and physical address in the election process!


  • 0

#28 Mutu

Mutu

    Member

  • Members
  • PipPip
  • 67 posts

Posted 05 October 2009 - 09:32 AM

So what happens if two routers have a priority of 255?

TT


Goos question.

I will try it out tomorrow on my GNS Lab and I will let you know!

ta
  • 0

#29 Haidar

Haidar

    Member

  • Members
  • PipPip
  • 84 posts
  • Gender:Male
  • Location:UK

Posted 05 October 2009 - 10:28 PM

OK

I labbed it and if two routers have the same priority (255) the one with the highest Loopback address will win the election and become the Designated Router.

Edited by Haidar, 05 October 2009 - 10:28 PM.

  • 0

#30 TroyTempest

TroyTempest

    Member

  • Members
  • PipPip
  • 68 posts

Posted 06 October 2009 - 04:08 AM

OK

I labbed it and if two routers have the same priority (255) the one with the highest Loopback address will win the election and become the Designated Router.


Thanks! :)

TT
  • 0





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users