Introduction to OSPF

(Safdar A) #109

Hello Rene,
Thank you for the wonderful and simple description of OSPF.
I would like to know what is the meaning of the below -
In OSPF load balancing
- > 4 equal cost paths will be placed in routing table.
Maximum of 16 paths.

Could you please elaborate

0 Likes

(Lazaros Agapides) #110

Hello Safdar

When OSPF has more than one path to a destination and the cost of those paths are equal, it will place up to four of those paths into the routing table. Because OSPF is a routing protocol that keeps a topology of the whole network, it “knows” of all possible paths to a destination. So, in the unlikely event that you have a network with more than 16 equal cost paths to a specific destination, up to 16 will be maintained within the topology, and from those 16 up to 4 will be placed within the routing table.

I hope this has been helpful!

Laz

0 Likes

(FAWAD A) #111

Hi Rene, I have question about Ospf cost. Can two different costs values be assigned to a link connecting the two routers? If yes, then what could be the implications overall in terms of spf calculations since cost of the link connecting the two routers don’t have to match on the 2 routers connected via the link in question? Please advise. Thanks!

0 Likes

(Rene Molenaar) #112

Hi Fawad,

Each router can change the cost of its interface(s) and it can be a different value. Each router runs SPF with itself as the “root” of the shortest path tree so it’s possible that if you have two routers, they’ll use a different path to get to a certain destination because of the cost you configured on the interface. That’s no problem at all.

0 Likes

(Ravi P) #113

Hello Rene,
I did a packet capture and was studying Hello packet in ospf.
My setup here is like this R1------------------------------R2
192.1681.1.1 192.168.1.2
I enabled OSPF on R2 first so it started sending Hello packet, then next I configured OSPF on R1 so now R1 also started sending hello packet. Now as soon as R2 got the hello from R1 then it did an ARP saying who is 192.168.1.1 tell 192.168.1.2. So why this ARP happens at first place and I see this ARP happening on R2 only not on R1, my second question.
I am also attaching the packet capture.hello.pcapng (13.0 KB)

2 Likes

(Lazaros Agapides) #114

Hello Ravi

This is an excellent question, it shows that you are thinking analytically and very deeply about these issues.

When a router sends an OSPF hello packet, it sends it to the 224.0.0.5 multicast address. When R2 receives this packet, one of the pieces of information it receives in the OSPF header is the IP address of the router that sent it.

Now the next step to establishing a neighbour adjacency is for R2 to respond with a unicast packet sending its router ID and its neighbour list. However, in order to do this, it must encapsulate the response, which is an IP packet, into a frame. In order to do that, it must learn the destination MAC address, something it does not yet have in its ARP table since the initial communication was a multicast packet. So it initiates an ARP request for the IP address of R1 and receives the MAC address. It can then further encapsulate the frame and send it on its way.

I hope this has been helpful!

Laz

5 Likes

(rosna s) #116

Hi Rene,

When we configure OSPF on a Router then it starts sending Hello packets. But how did it get all those information first of all. For example, how it knows the DR, BDR IP Address.

0 Likes

(Lazaros Agapides) #117

Hello rosna

When a router is configured with OSPF, it begins sending Hello packets. These packets have a destination of 224.0.0.5 which is the multicast address used by OSPF. All OSPF routers receive such multicast packets. These exchanges allow the formation of neighbour relationships. Once these neighbor relationships are formed, the unicast IP addresses of neighbours are known and exchanges occur in unicast. When a DR and BDR election takes place, packets are exchanged until the DR and BDR are elected. An OSPF router can communicate with the DR and BDR using the multicast address 224.0.0.6. The DR and BDR can respond using unicast.

So in this way, all routers find out about their neighbours as well as the DR and BDR.

I hope this has been helpful!

Laz

0 Likes

(Davis W) #118

Hi Rene,

What is the maximum ospf neighbour in the same network? Is the protocol any limitation or depends on the devices CPU resource?

Best Regard
Davis

0 Likes

(ADRIAN T) #119

Excellent Laz! That helped a lot, thank you!!

0 Likes

(Rene Molenaar) #120

Hi Davis,

There isn’t really a hard limit, it mostly depends on the resources of your router. The number of neighbors might not be the limitation btw, there are some other factors like the number of interfaces, networks, area types, etc.

Rene

0 Likes

(Juan C) #121

i have a doubt regarding load-balancing

on the lesson you say the following :

Some things worth knowing about OSPF load balancing:

Paths must have an equal cost.
4 equal cost paths will be placed in routing table.
Maximum of 16 paths.
To make paths equal cost, change the “cost” of a link

The third point states about a maximum of 16 paths but on the second it states about 4 equal cost paths… so i wonder if i have 6 OSPF equal route metrics, these 6 OSPF path will be installed on the RiB ??

0 Likes

(Rene Molenaar) #122

Hi Juan,

By default, OSPF will install up to 4 maximum paths. You can see this here:

Router#show ip protocols | begin ospf
Routing Protocol is "ospf 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 0.0.0.0
  Number of areas in this router is 0. 0 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
  Routing Information Sources:
    Gateway         Distance      Last Update
  Distance: (default is 110)

However, if you want to change this you can do it with the following command:

Router(config)#router ospf 1 
Router(config-router)#maximum-paths ?
  <1-32>  Number of paths

This IOS 15 router can even install up to 32 paths. I’ll edit the lesson so it shows 32 instead of 16.

Rene

0 Likes

(karthik k) #123

Hi,
Quick one : Is HELLO packet sent to everyone in the Area ? or only to the DR ?

Thanks

0 Likes

(Lazaros Agapides) #124

Hello Karthik

A HELLO packet is sent by an OSPF router as a unicast packet to its neighbors only. It is used to maintain the neighbor adjacency and to tell its OSPF neighbors that it is still there and active.

I hope this has been helpful!

Laz

0 Likes

(Swapnil K) #125

Hi Rene,

How many router’s can be configured in a single area?

Regards,
Swapnil

0 Likes

(Lazaros Agapides) #126

Hello Swapnil

There is no hard and fast rule about the number of OSPF routers in a single area. It depends on how many subnets you have, what kind of bandwidths you have available and how complex the network topology is. Cisco does however have general rules that give you an idea of how many routers is too many.

Cisco recommends that you not more than 90-100 routers in a single OSPF area. Additionally it is Cisco’s recommendation that you not have more than 200 subnetworks per area. Again, these are general recommendations and other factors will definitely play a role in the limits involved.

It’s a good idea never to approach such numbers per area however. Having multiple areas also aids in administration as well as network design simplicity.

I hope this has been helpful!

Laz

0 Likes

(vijay ananth) #127

I was under the assumption the initial OSPF hello is a multicast packet sent to 224.0.0.5 when the router interface is no shutdown and hellos once the neighbor is formed are unicasted to the specific next hop.Is this not right ?

0 Likes

(Lazaros Agapides) #128

Hello Vijay

Thanks for the clarification, you are correct. I was thinking about virtual links. Specifically, the RFC2328 that defines OSPF (see link below) states the following:

On broadcast networks and physical point-to-point networks, Hello packets are sent every HelloInterval seconds to the IP multicast address AllSPFRouters. On virtual links, Hello packets are sent as unicasts (addressed directly to the other end of the virtual link) every HelloInterval seconds. On Point-to-MultiPoint networks, separate Hello packets are sent to each attached neighbor every HelloInterval seconds.

This was taken from the following:

https://tools.ietf.org/html/rfc2328

Thanks again.

Laz

0 Likes

(ADRIAN T) #129

Hi Rene,
I think that the way OSPF calculates its cost to destination should also include cost of the exit interface to destination network: ‘Using the router on top we would have a cost of 10+8 which is 18’. I think it should be 10+8+x instead. Where ‘x’ is the cost of the very interface that the last router (extreme right) is connected directly to destination network. I’ve read this in CCNA R&S OCG ICND2 200-105 Wendel Odom fig 7-11 and table 7-6.
Do I miss something here? Thank you.
Adrian

0 Likes