Ospf by Harsh

20
8/8/2019 Ospf by Harsh http://slidepdf.com/reader/full/ospf-by-harsh 1/20 OPEN SHORTEST PATH FIRST OSPF BY: - HARSH KUMAR 

Transcript of Ospf by Harsh

Page 1: Ospf by Harsh

8/8/2019 Ospf by Harsh

http://slidepdf.com/reader/full/ospf-by-harsh 1/20

OPEN SHORTEST PATH FIRST 

OSPF 

BY: - HARSH KUMAR 

Page 2: Ospf by Harsh

8/8/2019 Ospf by Harsh

http://slidepdf.com/reader/full/ospf-by-harsh 2/20

Introduction to Open Shortest Path First (OSPF)

Open Shortest Path First (OSPF) is a

routing protocol which is used to allow

routers to dynamically learn routes from

other routers and to advertise routes to other 

routers.

Advertisements containing routes are

referred to as Link State Advertisements(LSAs) in OSPF.

Page 3: Ospf by Harsh

8/8/2019 Ospf by Harsh

http://slidepdf.com/reader/full/ospf-by-harsh 3/20

Specifications

1. Keeps track of the  state of all the various network connections (linkslinks) between itself and a network itis trying to send data to. This makes it a link link--state state

routing protocol.

2. Supports the use of classless IP address rangesand is very efficient.

3. Uses areas to organize a network into a hierarchalstructure; it summarizes route information toreduce the number of advertised routes andthereby reduce network load and uses adesignated router (elected via a process that is partof OSPF) to reduce the quantity and frequency of Link State Advertisements.

Page 4: Ospf by Harsh

8/8/2019 Ospf by Harsh

http://slidepdf.com/reader/full/ospf-by-harsh 4/20

Specifications

4. Does require the router to have a more powerful

 processor and more memory than other routing

 protocols.

5. Selects the best routes by finding the lowest cost paths to a destination. All router interfaces

(links) are given a cost. The cost of a route is

equal to the sum of all the costs configured on all

the outbound links between the router and thedestination network, plus the cost configured on

the interface that OSPF received the Link State

Advertisement on.

Page 5: Ospf by Harsh

8/8/2019 Ospf by Harsh

http://slidepdf.com/reader/full/ospf-by-harsh 5/20

The Shortest path to a destination is not necessarily the path

with the least number of hops

Page 6: Ospf by Harsh

8/8/2019 Ospf by Harsh

http://slidepdf.com/reader/full/ospf-by-harsh 6/20

OSPF cost

The cost (also called metric) of an interface inOSPF is an indication of the overhead required tosend packets across a certain interface. The cost of an interface is inversely proportional to the bandwidth of that interface. A higher bandwidthindicates a lower cost. (There is more overhead³higher cost´ and time delays involved in crossinga 56k serial line than crossing a 10M Ethernet line.

The formula used to calculate the cost is:The formula used to calculate the cost is:

cost= 10000 0000/bandwith in bpscost= 10000 0000/bandwith in bps

Page 7: Ospf by Harsh

8/8/2019 Ospf by Harsh

http://slidepdf.com/reader/full/ospf-by-harsh 7/20

Example

For example, it will cost

108/107 = 10 to cross a 10M Ethernet line while it

will cost

108 /1544000 = 64 to cross a T1 line.

By default, the cost of an interface is calculated

 based on the bandwidth; you can force the cost of an interface with the

ip ospf costip ospf cost <value><value> interface subconfigurationinterface subconfiguration

mode command.mode command.

Page 8: Ospf by Harsh

8/8/2019 Ospf by Harsh

http://slidepdf.com/reader/full/ospf-by-harsh 8/20

Link-State Routing Process

Each routers learns about its own directlyconnected networks

Hello Packets

Link State Packet (LSP)Flooding to all neighbors

Calculating SPF

Page 9: Ospf by Harsh

8/8/2019 Ospf by Harsh

http://slidepdf.com/reader/full/ospf-by-harsh 9/20

The Shortest path to a destination is not necessarily the path

with the least number of hops

Page 10: Ospf by Harsh

8/8/2019 Ospf by Harsh

http://slidepdf.com/reader/full/ospf-by-harsh 10/20

 Neighbors

Routers that share a common segment become neighbors on that segment.

 Neighbors are elected via the Hello

 protocol.Hello packets are sent periodically out of 

each interface using IP multicast.

Routers become neighbors as soon as theysee themselves listed in the neighbor's Hello packet. This way, a two waycommunication is guaranteed.

Page 11: Ospf by Harsh

8/8/2019 Ospf by Harsh

http://slidepdf.com/reader/full/ospf-by-harsh 11/20

Page 12: Ospf by Harsh

8/8/2019 Ospf by Harsh

http://slidepdf.com/reader/full/ospf-by-harsh 12/20

Page 13: Ospf by Harsh

8/8/2019 Ospf by Harsh

http://slidepdf.com/reader/full/ospf-by-harsh 13/20

Adjacencies

Adjacency is the next step after the neighboring process. Adjacent routers are routers that go beyondthe simple Hello exchange and proceed into thedatabase exchange process.

In order to minimize the amount of informationexchange on a particular segment, OSPF elects onerouter to be a designated router (DR), and one router to be a backup designated router (BDR), on eachmulti-access segment.

The BDR is elected as a backup mechanism in casethe DR goes down. The idea behind this is that routershave a central point of contact for informationexchange. Instead of each router exchanging updateswith every other router on the segment, every router exchanges information with the DR and BDR. TheDR and BDR relay the information to everybody else.

Page 14: Ospf by Harsh

8/8/2019 Ospf by Harsh

http://slidepdf.com/reader/full/ospf-by-harsh 14/20

Example

Page 15: Ospf by Harsh

8/8/2019 Ospf by Harsh

http://slidepdf.com/reader/full/ospf-by-harsh 15/20

Router types

OSPF elects two or more routers to manage theLink State Advertisements:

Designated Router (DR)

It is the router to which all other routers within an areasend their Link State Advertisements. The DesignatedRouter will keep track of all link state updates andmake sure the LSAs are flooded to the rest of thenetwork using Reliable Multicast transport.

Backup Designated Router (BDR)The election process which determines the Designated

Router will also elect a Backup Designated Router (BDR). The BDR takes over from the DR when the DR fails.

Page 16: Ospf by Harsh

8/8/2019 Ospf by Harsh

http://slidepdf.com/reader/full/ospf-by-harsh 16/20

Router types

OSPF elects two or more routers to manage

the Link State Advertisements:

Designated Router (DR)

Backup Designated Router (BDR)

A priority value of zero indicates an

interface which is not to be elected as DR or 

BDR. The state of the interface with priorityzero will be DR OTHER .

Page 17: Ospf by Harsh

8/8/2019 Ospf by Harsh

http://slidepdf.com/reader/full/ospf-by-harsh 17/20

Areas and Border R outers

As previously mentioned, OSPF uses flooding to exchangelink-state updates between routers. Any change in routinginformation is flooded to all routers in the network. Areasare introduced to put a boundary on the explosion of link-

state updates. Flooding and calculation of the Dijkstraalgorithm on a router is limited to changes within an area.

All routers within an area have the exact link-statedatabase.

Routers that belong to multiple areas, and connect these

areas to the backbone area are called area border routers(ABR). ABRs must therefore maintain informationdescribing the backbone areas and other attached areas.

Page 18: Ospf by Harsh

8/8/2019 Ospf by Harsh

http://slidepdf.com/reader/full/ospf-by-harsh 18/20

Enabling OSPF on the R outer

Enabling OSPF on the router involves the following twosteps in config mode:

1. Enabling an OSPF process using the router ospf <process-id> command.

2. Assigning areas to the interfaces using the network <network or IP address> <mask> <areaid> command.

The OSPF process-id is a numeric value local to the router.It does not have to match process-ids on other routers. It is

 possible to run multiple OSPF processes on the samerouter, but is not recommended

The network command is a way of assigning an interfaceto a certain area.

The mask contains wild card bits where 0 is a match and 1is a "do not care" bit, e.g. 0.0.255.255 indicates a match inthe first two bytes of the network number.

Page 19: Ospf by Harsh

8/8/2019 Ospf by Harsh

http://slidepdf.com/reader/full/ospf-by-harsh 19/20

RTA#

interface Ethernet0

ip address 192.213.11.1 255.255.255.0

interface Ethernet1

ip address 192.213.12.2 255.255.255.0

interface Ethernet2ip address 128.213.1.1 255.255.255.0

router ospf 100

network 192.213.0.0 0.0.255.255 area 0.0.0.0

network 128.213.1.1 0.0.0.0 area 23

Page 20: Ospf by Harsh

8/8/2019 Ospf by Harsh

http://slidepdf.com/reader/full/ospf-by-harsh 20/20

 THANK YOU