You are on page 1of 36

:

.



Ahmed_it@windowslive.com

-:
muslimtech.wordpress.com

Open Shortest Path First


Single Area

-1
OSPF -2
Link-State Routing Protocols -3
OSPF Terminology -4
OSPF Metric -5
LSA Operation -6
OSPF Packet Types -7
OSPF Network Types -8
Neighbor Adjacencies -9
Configuring OSPF Routing -10
Configuration OSPF on NBMA Networks -11

-1
) Open Shortest Path First (OSPF Routing Protocol
) Internet Protocol (IP IGP IETF
1988 IGP ) Shortest Path First (SPF
OSPF ) Routing Information Protocol (RIP



SPF the Dijkstra algorithm

OSPF -2
Open Standard Protocol -1

OSPF is not a Cisco-proprietary protocol -2
Cisco

O routing table -3
OSPF is transport layer protocols-4
Layer 4
Administrative Distance = 110 -5
VLSM support -6
classless routing protocol
Load balancing-7
by default of 4 paths and maximum of 6 paths Traffic
Support Hierarchical design- 8
area Area Autonomous System
Update
Updates is sent on multicast (224.0.0.5 or 224.0.0.6 / unicast addresses) -9
periodic updates & triggered updates
triggered updates
refresh 30 min link-state refresh periodic updates
Topology table ( Link-state Data base)
IP protocol -10
AppleTalk IPX
Ospf Use SPF Algorithm To Choose The best Path to any Destination -11
OSPF is Classless Protocol (VLSM) -12
Ripv1 Route information Subnet mask

Link-State Routing Protocols -3


Ospf Link-State Routing Protocol
distance-vector
Link-State Routing
) (triggered updates ) (periodic updates 30 min Refresh link-state advertisement
) (LSA Neighbors multicast address
LSA Area Area

LSA Area link-state
) database (LSDB LSA 0x8000 0001 0x7FFF FFFF
) link-state database (LSDB
show ip ospf database

Area Area
Distance vector neighbor
Eigrp neighbor Routing table
SPF

LSA Link-state Database


SPF Destination
SPF Tree .Routing table

Link state protocols Bandwidth


Distance vector protocols
RIP

Rip Hope count 64k


ospf

T3

OSPF Terminology -4

OSPF topology
OSPF neighbor table = adjacency database-1
Neighbors ospf

#show ip ospf neighbors
Neighbor 60
OSPF topology table = OSPF topology database = LSDB-2
Destination
LSA LSDB
) (OSPF topology table
Area LSA LSDB
#show ip ospf database
Routing table (forwarding database)-3
Destination
]#show ip route [ospf

OSPF Area Structure


OSPF Router
SPF


!!
Update

Area
: Transit area -1 IP Packets Area
Area Area Area0 Backbone Area
: Regular area or nonbackbone area-2
Area Regular area Transit area Area
Area
nonbackbone area Area 0
LSA Area

Area

:
Area Autonomous System

OSPF Router Types


OSPF

: Internal routers-1 interfaces Area


: Backbone routers-2 interface Backbone Area
: Area border routers-3 Area Summarization
: Autonomous System Boundary Routers-4 (Autonomous System
( Network Information Ospf route
redistribution BSCI

OSPF Metric -5
Metric OSPF EIGRP
cost Destination
1 65535 Cost
)cost= 10000 0000/bandwith in bps(in interface

Cost= 108/BW of interface


Cost interface
ip ospf cost
Ethernet =10MB


Bit

Cost=10000 0000/10000 000=10


MB 1000000 108 MB
100000000/1000000=100
Cost=100/10=10
Cost = 10
SPF

Topology Table X
Destination )Ethernet (10MB
Cost=10 SPF Destination
Cost F-G-H Routing Table
: Cost Cost
Cost X&H X-C-E-H 10+10+10=30
: Cost 0

RA 128.5.2.1
RA-RB-RE-128.5.2.1
Cost=10+10+15=35
RA-RC-RD-128.5.2.1
Cost=5+15+64=84
Cost
Default Cost List

LSA Operation -6
LSA LSA Database
Sequencing, Checksums, and Aging
: Sequencing-1 32Bit 0x80000001 0x7fffffff LSA
sequence number LSA Sequence number
LSA Seq Num 0x7fffffff flush
Old LSA Age ) MaxAge
( Area LSA MaxAge
LSA Seq Num 0x80000001
:checksum-2 Checksum LSA Age

:Age-3 LSA 0 3600) 3600 ( LSA


Age 0 ) (flooding 3600 LSA
flushed LSA MaxAge refresh
LSA link-state refresh 30 Refresh
LSA 30min LSA
LSA

)(Process ID 1
Link Count
2
3
8
3

Checksum
0xA94E
0x8D53
0x523
0x94DD

Seq#
0x80000F29
0x80000F55
0x800011CA
0x80000AF4

Manet#show ip ospf database


)OSPF Router with ID (192.168.30.43
)Router Link States (Area 3
Link ID
ADV Router
Age
192.168.30.13 192.168.30.13 910
192.168.30.23 192.168.30.23 1334
192.168.30.30 192.168.30.30 327
192.168.30.33 192.168.30.33 70

Multiple instances of the same LSA


Link-State Update (LSU) packet LSU LSA
LSAs
-1 LSA LSDB LSDB link-state
) acknowledgment (LSAck SPF LSA
split-horizon
-2 LSA LSDB Seq Num Seq Num
LSA LSAck SPF
LSA
-3 Seq Num LSU LSA
LSA Seq Num LSA

OSPF Packet Types -7

OSPF Packet Header Format


ospf Packet


:Version Number 2, 3 IPv6
:Type Packet
:Packet length Packet
:Router ID Router ID
Area 32Bit ipv4
-1 > (config-if)# router-id <ip address !!!!

loopback interface

-2 loopback ip address
!!!!!loopback interface
-3 ip physical interface
:Area ID Area packet
:Checksum Ospf Packet
:Authentication type clear Text MD5
:Authentication Authentication
:Data
:hello packet
:DBD packet LSDB Router_id

:LSR packet LSU


:LSU packet LSA
:LSAck packet

OSPF Network Types -8


OSPF

Point-to-point networks

HDLC & PPP DR or


BDR Hello Packet ip multicast 224.0.0.5

T1, DS-3, : SONET link
Broadcast Multiaccess (BMA) networks

Broadcast Multicast DR , BDR


BMA
Hello Packet IP Multicast 224.0.0.5

Other OSPF Packet IP Multicast 224.0.0.6


Ethernet, Token Ring, and FDDI Ethernet
Nonbroadcast Multiaccess (NBMA) networks

Broadcast
Configuration Router Neighbors OSPF packets unicast
X.25, Frame Relay, and ATM :

)Designated Routers (DR)& Backup Designated Routers(BDR


Multi-access LSA
LSA LSA

A D,B,C,E

B A,D,C,E
C A,B,D,E
D A, B,C,E
E A,B,C,D
!!!!!

) Update(LSA
interface LSA DR
DR BDR
Hello Packet DR BDR Area

DR&BDR

-1 interface priority DR BDR
Priority
Priority 8-bit Range 0 255 interfaces Cisco
priority by Default=1 ip ospf priority interface
multi-access


(a priority 0 interface DR BDR
(b interface DR interfaces DR
DR interface Topology
-2 interfaces Default=1
Router ID DR BDR Router ID OSPF Packet Types
-3 DR&BDR Router Priority
DR&BDR!!!!
!! DR BDR
BDR
-4 BDR DR wait timer
RouterDeadInterval

Neighbor Adjacencies -9
OSPF
OSPF interface Ospf Hello Packet
Multicast 224.0.0.5

Hello Packet EIGRP


Eigrp Hello Packet
Packet
Area ID &Router ID
:Hello and dead intervals

:Hello interval Hello Packet


ip ospf hello-interval
:The dead interval Packet
) (declaring neighbor Table Hello Interval
ip ospf dead-interval
by Default
the default hello interval is 10 seconds :On broadcast OSPF networks
The default dead interval is 40 seconds
the default hello interval is 30 seconds :On nonbroadcast networks
The default dead interval is 120 seconds
:Neighbors
:Router Priority Router Priority interface
:DR IP Address DR ip
:Authentication Password Password
:Stub Area Flag Area interface Backbone Area
Areas

Neighbors OSPF
-1 area ID.
-2 hello & dead intervals.
-3 authentication password
-4 Stub area flag.

Exchanging and Synchronizing LSDBs


OSPF

Interface Down , init , Two-Way


:Down Hello Packet
Hello Packet BMA Point to point Multicast 224.0.0.5
NBMA Unicast Unicast
:Init directly connected Hello Packet A
:2-Way A Hello Packet ) (directly connected
neighbor table
BMA DR BDR
Hello Packet

Discovering the Network Routes


DR BDR BMA


Exstart State Master Slave
DBD Packet
Master Router ID DR
BMA DR,BDR

Exchange State Master Master LSDB
Slave Slave LSDB Master

DBD Packet
LSAck DBD Packet Loading State
LSDB LSDB LSR
LSA
DR LSU Packet LSA LSA LSDB
Full State
: Full State Traffic
Full State LSDB

Maintaining Routing Information


OSPF

A Down


-1 A LSU Packet LSA IP Multicast 224.0.0.6
DR&BDR LSU LSAs
-2 Ack DR (Flooding LSU) LSU
DR 224.0.0.5
-3 LSU LSAck Packet DR
-4 B LSU
-5 LSU LSDB SPF

Configuring OSPF Routing -10


Configuring Basic OSPF Routing
>(config)# router ospf <process id
1-65535=Process id
)(Just in local Router
(config-router)# network ip-address wildcard-mask area area-id
: network ip-address interface OSPF
:wildcard-mask Net mask Bits Wildcard 0 Bits
Hosts 1
Network ID = 172.16.0.0
Netmask = 255.255.0.0
Wildcard mask = 0.0.255.255
Netmask by bits = 11111111.11111111.00000000. 00000000
Wildcard Mask = 00000000.00000000.11111111.11111111

: area-id Area Area 0 Backbone


interface ospf
Router(config-if)# ip ospf process-id area area-id

Configuring a Router ID
R ID Configuration
RID Loopback interface Physical interface
>(config-router)# router-id <ip address
loopback interface
(config)# int loopback 0
(config-if)# ip address ip mask
Router#clear ip ospf process
RID
: router priority
(config)# int e0/0
>(config-if)# ip ospf priority <no.
Cost
>1- (config-if)# ip ospf cost <no.
>2- (config-if)# bandwidth <no. in kbps

3- (config-router)# ospf auto-cost reference-bandwidth <no.>



(config-router)# timer spf <spf delay time> <spf hold time>
(config-if)# ip ospf hello-interval <no. in sec>
(config-if)# ip ospf dead-interval <no. in sec>
Destination
(config-router)# maximum-paths <no.>

Show commands
:show ip protocols
OSPF :show ip route ospf

OSPF interface :show ip ospf interface

LSA OSPF Timer Router Id :show ip ospf


Neighbor :show ip ospf neighbor

show ip ospf neighbor detail

: debug ip ospf events OSPF

* Router#clear ip route
Routing Table
Router#clear ip route A.B.C.D

OSPF Router Authentication


OSPF Authentication
Clear Text-1
MD5 :MD5-2

Configuring OSPF Password Authentication
Clear text password
Router(config-if)# ip ospf authentication-key password

MD5 password
Router(config-if)#ip ospf message-digest-key key-id md5 key

255 1 :key-id
16 byte Alphanumeric :Key
Authentication
Clear txt
Router(config-if)# ip ospf authentication

MD5
Router(config-if)#ip ospf authentication message-digest

Authentication
Router(config-if)#ip ospf authentication null

Area
Router(config-router)# area area-id authentication [message-digest]

Troubleshooting Simple Password Authentication


debug ip ospf adj Troubleshooting
Successful Simple Password Authentication Example

Auth
Null Type 0
Simple password Type 1
MD5 Type 2

Verifying MD5 Authentication
Neighbor table Neighbor
show ip ospf neighbor
Successful MD5 Authentication Example

Key

Configuration OSPF on NBMA Networks -11



Point-to-point networks
Broadcast Multiaccess (BMA) networks
Nonbroadcast Multiaccess (NBMA) networks
Point To Point BMA Configuration
NBMA
Unicast
(X.25, Frame Relay, and ATM) : NBMA
Frame Relay

Star Topology hub-and-spoke

Full-mesh topology
Partial-mesh topology Full-mesh topology


Configuration
DR Neighbors NBMA Configuration

configuring OSPF on this NBMA network

Full-mesh topology

Topology

Subnet

Subnet

30 Sec

Hello Timer

( )Manual
RFC

Adjacency
:RFC or Cisco
Cisco
Configuration

Rembrandt's configuration.
interface Serial0
encapsulation frame-relay
ip address 172.16.2.1 255.255.255.0
frame-relay map ip 172.16.2.2 100
frame-realy map ip 172.16.2.3 300
frame-relay map ip 172.16.2.4 500
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
neighbor 172.16.2.2
neighbor 172.16.2.3
neighbor 172.16.2.4

Hals's configuration specifying a neighbor priority.


interface Serial0
encapsulation frame-relay
ip address 172.16.2.2 255.255.255.0
frame-relay map ip 172.16.2.1 600
frame-relay map ip 172.16.2.3 600
frame-relay map ip 172.16.2.4 600
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
neighbor 172.16.2.1 priority 10

Vandyck's configuration specifying a neighbor priority.


interface Serial0
encapsulation frame-relay
ip address 172.16.2.3 255.255.255.0
frame-relay map ip 172.16.2.1 400
frame-relay map ip 172.16.2.2 400
frame-relay map ip 172.16.2.4 400
!
router ospf 1
network 172.16.0.0 0.0.255.255 are a 0
neighbor 172.16.2.1 priority 10

Brueghel's configuration specifying a neighbor priority.


interface Serial0
encapsulation frame-relay
ip address 172.16.2.4 255.255.255.0
frame-relay map ip 172.16.2.1 200
frame-relay map ip 172.16.2.2 200
frame-relay map ip 172.16.2.3 200
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
neighbor 172.16.2.1 priority 10

DR DR Priority
DR Priority 10 172.16.2.1

configured as an OSPF broadcast network

Full-mesh topology

Topology

Subnet

Subnet

10 Sec

Hello Timer

( )Automatic
Cisco

Adjacency
:RFC or Cisco
Cisco

Configuration

Rembrandt's Frame Relay interface is configured as an OSPF broadcast network.


interface Serial0
encapsulation frame-relay
ip address 172.16.2.1 255.255.255.0
ip ospf network broadcast
ip ospf priority 10
frame-relay map ip 172.16.2.2 100 broadcast
frame-realy map ip 172.16.2.3 300 broadcast
frame-relay map ip 172.16.2.4 500 broadcast
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0

Hals's Frame Relay interface is configured as an OSPF broadcast network.


interface Serial0
encapsulation frame-relay
ip address 172.16.2.2 255.255.255.0
ip ospf network broadcast
ip ospf priority 0
frame-relay map ip 172.16.2.1 600 broadcast
frame-relay map ip 172.16.2.3 600 broadcast
frame-relay map ip 172.16.2.4 600 broadcast
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0

Vandyck's Frame Relay interface is configured as an OSPF broadcast network.


interface Serial0
encapsulation frame-relay
ip address 172.16.2.3 255.255.255.0
ip ospf network broadcast
ip ospf priority 0
frame-relay map ip 172.16.2.1 400 broadcast
frame-relay map ip 172.16.2.2 400 broadcast
frame-relay map ip 172.16.2.4 400 broadcast
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0

Brueghel's Frame Relay interface is configured as an OSPF broadcast network.


interface Serial0
encapsulation frame-relay
ip address 172.16.2.4 255.255.255.0
ip ospf network broadcast
ip ospf priority 0
frame-relay map ip 172.16.2.1 200 broadcast
frame-relay map ip 172.16.2.2 200 broadcast
frame-relay map ip 172.16.2.3 200 broadcast
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0

Priority 10 DR BMA NBMA


Cisco Configuration

configured as an OSPF point-to-multipoint network.

Partial-mesh Or Star topology

Topology

Subnet

Subnet

30 Sec

Hello Timer

BDR DR
RFC

Adjacency
:RFC or Cisco
Cisco
Configuration

Rembrandt's Frame Relay interface is configured as an OSPF point-to-multipoint network.


interface Serial0
encapsulation frame-relay
ip address 172.16.2.1 255.255.255.0
ip ospf network point-to-multipoint
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0

Hals's Frame Relay interface is configured as an OSPF point-to-multipoint network.


interface Serial0
encapsulation frame-relay
ip address 172.16.2.2 255.255.255.0
ip ospf network point-to-multipoint
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0

Vandyck's Frame Relay interface is configured as an OSPF point-to-multipoint network.


interface Serial0
encapsulation frame-relay
ip address 172.16.2.3 255.255.255.0
ip ospf network point-to-multipoint
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0

Brueghel's Frame Relay interface is configured as an OSPF point-to-multipoint network.


interface Serial0
encapsulation frame-relay
ip address 172.16.2.4 255.255.255.0

ip ospf network point-to-multipoint


!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0

Point PVCs Point To Point NBMA


BDR DR To Point

configured as an OSPF point-to-multipoint, non-broadcast network.

Partial-mesh Or Star topology

Topology

Subnet

Subnet

30 Sec

Hello Timer

BDR DR
Cisco

Adjacency
:RFC or Cisco
Cisco
Configuration

Rembrandt's Frame Relay interface is configured as an OSPF point-to-multipoint, non-broadcast network.


interface Serial0
ip address 172.16.2.1 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint non-broadcast
map-group Leiden
frame-relay lmi-type q933a
frame-relay svc
!

router ospf 1
network 172.16.0.0 0.0.255.255 area 0
neighbor 172.16.2.2 cost 30
neighbor 172.16.2.3 cost 20
neighbor 172.16.2.4 cost 50

Hals's Frame Relay interface is configured as an OSPF point-to-multipoint, non-broadcast network.


interface Serial0
ip address 172.16.2.2 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint non-broadcast
map-group Haarlem
frame-relay lmi-type q933a
frame-relay svc
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
neighbor 172.16.2.1 priority 10

Vandyck's Frame Relay interface is configured as an OSPF point-to-multipoint, non-broadcast network.


interface Serial0
ip address 172.16.2.3 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint non-broadcast
map-group Antwerp
frame-relay lmi-type q933a
frame-relay svc
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
neighbor 172.16.2.1 priority 10

Brueghel's Frame Relay interface is configured as an OSPF point-to-multipoint, non-broadcast network.


interface Serial0
ip address 172.16.2.4 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint non-broadcast
map-group Brussels
frame-relay lmi-type q933a
frame-relay svc
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
neighbor 172.16.2.1 priority 10

Unicast Multicast OSPF Packet


manually configured Neighbor

configured with point-to-point subinterfaces


Topology

Partial-mesh Or Star topology


Subinterface

Subnet

10 Sec

Hello Timer

BDR DR
Cisco

Adjacency
:RFC or Cisco
Cisco
Configuration

Rembrandt is configured with point-to-point subinterfaces.


interface Serial0
no ip address
encapsulation frame-relay
interface Serial0.100 point-to-point
description -------------------------- to Hals
ip address 172.16.2.1 255.255.255.252
frame-relay interface-dlci 100
interface Serial0.300 point-to-point
description -------------------------- to Vandyck
ip address 172.16.2.5 255.255.255.252
frame-relay interface-dlci 300
interface Serial0.500 point-to-point
description -------------------------- to Brueghels
ip address 172.16.2.9 255.255.255.252
frame-relay interface-dlci 500
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0

Hals is configured with point-to-point subinterfaces.


interface Serial0
no ip address
encapsulation frame-relay
interface Serial0.600
description --------------------------- to Rembrandt
ip address 172.16.2.2 255.255.255.252
frame-relay interface-dlci 600
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0

Vandyck is configured with point-to-point subinterfaces.


interface Serial0
no ip address
encapsulation frame-relay
interface Serial0.400
description ---------------------------- to Rembrandt
ip address 172.16.2.6 255.255.255.252
frame-relay interface-dlci 400
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0

Brueghel is configured with point-to-point subinterfaces.


interface Serial0
no ip address
encapsulation frame-relay
interface Serial0.200
description ---------------------------- to Rembrandt
ip address 172.16.2.10 255.255.255.252
frame-relay interface-dlci 200
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0

point to point sub Sub interface interface



ppp and hdlc wan fastethernet point to point b

You might also like