Sign in to follow this  
Followers 0
DarkFiber

OSPF

42 posts in this topic

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.

OSPF.doc

0

Share this post


Link to post
Share on other sites

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
0

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Dear Destiny, how can you say that ;-) what made you think they will not form the adj ?

 

 

 

awesome :rolleyes:

0

Share this post


Link to post
Share on other sites

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

LSA_Structure.doc

Edited by DarkFiber
0

Share this post


Link to post
Share on other sites

 

 

 

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

 

 

0

Share this post


Link to post
Share on other sites

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 :)

0

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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. :)

0

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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
0

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0