You are on page 1of 21

Link-State Routing Protocols

2004, Cisco Systems, Inc. All rights reserved.

Link-State Routing Protocols


14.0.0.2/8 14.0.0.1/8

10.0.0.1/8

11.0.0.2/8 11.0.0.1/8

15.0.0.1/8

12.0.0.1/8 12.0.0.2/8

13.0.0.1/8 13.0.0.2/8

Operation : At Startup
1. Each router will discover its neighbors (direct connected +operate with link state protocols) using the hello protocol (layer-3 protocol).
2. Each router will form a packet called link state advertisement (LSA) describing itself.
Link 10.0.0.1/8 11.0.0.1/8 12.0.0.1/8
2004, Cisco Systems, Inc. All rights reserved.

State Up Up up Metric 10 Metric 10 Metric 10

Advertiser Router ID C
3

Link-State Routing Protocols


3. Each router will flood its LSA to all its neighbors on special multicast address .

4. Each neighbor that receives a LSA will do the following:


a. take a copy of it in its LSDB (Link state Data Base). b. Then sends it as it is to all its neighbors, so LSA of each router will be flooded in the AS.

C
Link State Data Base (LSDB)

10.0.0.1/8 Metric 10 Up 11.0.0.1/8 Metric 10 Up 12.0.0.1/8 Metric 10 up


11.0.0.2/8 14.0.0.2/8 12.0.0.2/8 13.0.0.2/8 13.0.0.1/8 14.0.0.1/8 15.0.0.1/8 Metric 10 Metric 10 Metric 10 Metric 10 Metric 10 Metric 10 Metric 10 Up up Up up Up Up up
4

B D A

2004, Cisco Systems, Inc. All rights reserved.

Link-State Routing Protocols


5. Every router will draw the LSDB Tree that describe the actual connection of the network topology. 6. Each router will apply Dijekstra algorithm (SPF Algorithm) on the LSDB tree to get SPF (Shortest Path First) Tree.
LSDB Tree Dijekstra Algorithm SPF Algorithm 10.0.0.1/8 c 12.0.0.1/8 11.0.0.1/8 SPF Tree

7. The SPF Tree will then be translated to a routing table.

12.0.0.2/8 D 13.0.0.2/8
13.0.0.1/8
2004, Cisco Systems, Inc. All rights reserved.

11.0.0.2/8 B 14.0.0.2/8
A 14.0.0.1/8 LSDB Tree
5

15.0.0.1/8

Link-State Routing Protocols

At convergence: Each router will only send periodic LSA every 30 min. to make LSDB refreshment.
At change: The router that feels a change will send triggered partial update containing the effected entry only to its neighbors and the process is repeated all over again.
2004, Cisco Systems, Inc. All rights reserved.

Link-State Routing Protocols

2004, Cisco Systems, Inc. All rights reserved.

Advantages of Link-State Routing


Fast convergence:
- Changes are reported immediately by the source affected (partial triggered updates)

Robustness against routing loops: - Routers know the topology. - Link-state packets are sequenced and acknowledged (reliable protocol). Lower bandwidth waste: - No periodic updates.

Classless.
2004, Cisco Systems, Inc. All rights reserved.

disadvantages of Link-State Routing


Significant demands for resources: Memory (three tables: adjacency, topology, forwarding) CPU (Dijkstras algorithm can be intensive, especially when a lot of instabilities are present.)
Network instability will affect the entire AS, so it requires very strict network design (multiple areas)

Complex configuration
-

2004, Cisco Systems, Inc. All rights reserved.

OSPF (Open Shortest Path First)


Open standard Link-state routing protocol Use Dijkstras algorithm SPF Algorithm. Administrative Distance = 110 (R=120,I=100) Metric called cost = 10^8 / BWi Hop-count is unlimited Symbol in routing table is O Loop free protocol (each router knows the topology). Classless routing protocol Supports hierarchical multiple area design.
2004, Cisco Systems, Inc. All rights reserved.

10

OSPF Hierarchical Design

Each router must know full details about its area & knows only summary about other areas. Area 0 is the backbone area and all other areas must be connected to area 0 Network instability affect the area only ,& not the entire network.

Less CPU usage.


Less memory utility.
2004, Cisco Systems, Inc. All rights reserved.

11

OSPF Topologies
The operation of the ospf depend on the network topology its working in. Network Topologies
Point-to-Point topology Broadcast Multiple Access (BMA) Ex: Ethernet Non Broadcast Multiple Access (NBMA) Ex: FR,ATM,X.25

2004, Cisco Systems, Inc. All rights reserved.

12

BMA & NBMA Operation


1.Neighbor Discovery :
By sending hello messages periodically on multicast 224.0.0.5 (all ospf routers address) every 10 sec for BMA & every 30 sec for NBMA For OSPF routers to be neighbors they must have:

- the same area ID. - same hello interval. - same dead interval = 4 hello timer. - same authentication password.
2.1. DR & BDR Election:
-Q: How to elect a DR? 1. The first router to boot up. 2. Router having highest priority per interface. 3.Router having highest router ID. -the routers that are not DR or BDR called drothers
2004, Cisco Systems, Inc. All rights reserved.

13

Priority
Priority is a number from (0-255) By default all interfaces have priority=1 & we can change it by configuration.

Router with priority=0 cant be the DR or BDR.


If a new router with highest priority added ,it wont be the DR directly.

2004, Cisco Systems, Inc. All rights reserved.

14

Router ID
Every router in OSPF environment is identified by RID RID is 32 bit value, it is selected to be : 1-The highest IP address of loopback interface if exist (logical interface that is always up) to configure loopback interface :

(config)# interface loopback no.(0-4 billions)


(config-if)# ip address ip mask
255.255.255.255

2- If no loopback interfaces the RID will take the highest IP

configured on an active physical interface when the OSPF


process get started.

2004, Cisco Systems, Inc. All rights reserved.

15

BMA & NBMA Operation


2.2. Route Discovery: Exchange state Each router sends its LSA or LSU to DR & BDR on 224.0.0.6 then DR & BDR send ACK to it DR send the update to drothers on 224.0.0.5 & receive ACK from them. Full adjacency (Full state): Network reach full adjacency when all routers have date base of each others=full convergence

3. Route Selection: Apply Dijestra Algorithm on SPF tree to form the RTG table
2004, Cisco Systems, Inc. All rights reserved.

16

point to point operation


1. Neighbor discovery :

- By sending hello messages periodically on multicast 224.0.0.5 (all


ospf routers address) every 10 sec.

- For OSPF routers to be neighbors they must have:


- The same area ID

- Same hello interval.


- Same dead interval = 4 hello timer. - Same authentication password 2. Route discovery :

- Exchange LSAs on 224.0.0.5 so as each router has the same LSDB


3. Route selection :

- Form the routing table


2004, Cisco Systems, Inc. All rights reserved.

17

Configuring Single-Area OSPF

Router(config)#router ospf process-id(1-65535)

Defines OSPF as the IP routing protocol

Router(config-router)#network network wildcard-mask area area-id

Assigns networks to a specific OSPF area

2004, Cisco Systems, Inc. All rights reserved.

18

OSPF Configuration Example

0 0

255 area 0 255 area 0

2004, Cisco Systems, Inc. All rights reserved.

19

OSPF Configuration Example

2004, Cisco Systems, Inc. All rights reserved.

20

Verifying the OSPF Configuration


Router#show ip protocols

Verifies that OSPF is configured


Router#show ip route

Displays all the routes learned by the router


Router#show ip ospf interface

Displays area ID and adjacency information


Router#show ip ospf neighbor

Displays OSPF neighbor information on a per-interface basis


2004, Cisco Systems, Inc. All rights reserved.

21

You might also like