Open Shortest Path First OSPF - PowerPoint PPT Presentation

1 / 64
About This Presentation
Title:

Open Shortest Path First OSPF

Description:

Developed by OSPF Working Group of IETF (not proprietary) ... T1 (1.544 Mbps seral link) 65. E1 (2.048 Mbps serial link) 48. 4 Mbps token ring 25 ... – PowerPoint PPT presentation

Number of Views:2582
Avg rating:3.0/5.0
Slides: 65
Provided by: cee3
Category:
Tags: ospf | first | open | path | seral | shortest

less

Transcript and Presenter's Notes

Title: Open Shortest Path First OSPF


1
Open Shortest Path First OSPF
  • 8th CEENet Workshop on Network Technology
  • NATO ANW

2
OSPF
  • Link state or SPF technology
  • Developed by OSPF Working Group of IETF (not
    proprietary)
  • Designed for TCP/IP Internet environment
  • Documented in rfc 1583, rfc 2178

3
OSPF - Link State Protocol
  • Link
  • an interface on the router
  • Link state
  • description of the interface and the neighboring
    routers
  • IP address, mask, type, routers connected to
  • Link state database
  • collection of link state advertisement for all
    routers and networks

4
How OSPF Works?
  • Each router generates link-state advertisements
    for its links
  • When no OSPF areas are configured, link-state
    advertisements are flooded to all routers
  • It is crucial that all routers have identical
    link state database
  • Shortest path three is calculated by all routers
    and routing tables are derived

5
Link State Advertisement (LSA)
  • Generated periodically or in response to any
    change
  • Contains
  • source identification
  • sequence number
  • link state age
  • list of neighbors

6
A Simplified Link State Database Example
LS seq. num.
From To Link Cost A B a
1 2 A D c 1
2 B A a 1 2 B
C b 3 1 B E
e 2 2 C B b
3 1 C E f 1
1 D A c 1 2 D
E e 2 1 E B
d 2 2 E C d
2 1 E D e 2
1
c
Link State Announcement (LSA)
From A to B, Link a, Cost 1, Ls seq. Num. 2
7
In Case of a Link Failure
  • A and B send the information to all other nodes
    about state of link a and the connectivity is
    reestablished.
  • In the case when network is segmented the link
    state database in both parts are different.

8
Segmented Network
  • If b breaks, A and D will not receive this LSA
    and their database will be different than the one
    of B, C and E.
  • When e comes up the Ds database has to become
    synchronized. This process is called bringing up
    adjacency.

9
Bringing up Adjacency
  • Synchronizing databases via comparison of
    sequence numbers
  • Interesting records - the sequence numbers are
    different or not present in database
  • Client-server relationship is established first

3
10
The Flooding Protocol
  • Used to securely deliver LSAs
  • Every node sends the LSA on every link except the
    one from where it received it
  • Very fast and very reliable, but wastes bandwidth
  • Messages sent only when there is a change or
    every 45 minutes
  • Each node compares the newly received LSA with
    the entry in the data base. If it is newer the
    database is updated

11
Securing the Map Updates
  • Flooding procedure includes hop-by-hop
    acknowledgments
  • Database description packets are transmitted in a
    secure fashion
  • Each link state record is protected by a timer
    and is removed from the database if a refreshing
    packet does not arrive in due time
  • All records are protected by checksum
  • Messages can be authenticated, e. g. by passwords

12
Authenticated Routing Updates
  • Two possibilities are defined
  • no authentication (configured by default)
  • authentication
  • simple password authentication
  • message digest authentication

13
More Routers on One Network
  • N routers on the same network (broadcast or
    non-broadcast)
  • N(N-1) LSA will be needed to transmit information
    about the same network
  • too much overhead

14
Designated Router (DR)
  • Selected among more routers on the same network
  • selection based on the priority assigned by the
    network administrator
  • for security reason backup designated router
    (BDR) is also selected
  • All routers in the network become adjacent to DR
  • exchange routing information with DR via
    multicast
  • DR updates all the neighbors

15
The Metrics in OSPF
  • formula cost 108 /bandwidth in bps

56 Kbps serial link 1758 64 Kbps serial link
1562 T1 (1.544 Mbps seral link)
65 E1 (2.048 Mbps serial link) 48 4
Mbps token ring 25 Ethernet
10 16 Mbps token ring
6 FDDI
1
16
Shortest Path Algorithm
  • Places the router at the root of the tree
  • In each iteration adds the router that is closest
    to it (smallest cumulative metric of the path)
  • Finished when all routers are added and the
    shortest path tree is generated

17
Representation of routers and networks in a table
R1
R2
N3
R8
R3
R3
R4
R6
8
6
4
N7
From
R1 R2 R3 R4 N3 R1
0 R2 0 R3
0 R4
0 N3 1 1 1 1
From
From
R8 R8 N7 4
R3 R6 R3 6 R6 8
To
To
To
Broadcast or NBMA network
Stub network
Point-to-point network
18
Example of an AS
N12
N13
N14
R1
R4
R5
R2
N2
R6
R3
N4
N12
N11
R7
N15
N8
R9
R11
R10
R5 and R7 are border routers
R8
R12
N10
N7
19
R1 R2 R3 R4 R5 R6 R7 R8 R9R10R11R12 N3 N6 N8
N9 R1
0 R2 0
R3 6 0 R4
8 0 R5
8 6 6 R6 8 7 5 R7
6 0 R8
0 R9
0 R10
7 0 0 R11
0 0 R12
0 N1
3 N2 3 N3 1 1 1 1 N4 2 N6
1 1 1 N7
4 N8 3 2 N9
1 1 1 N10
2 N11
3 N12 8 2 N13 8 N14
8 N15 9
The Resulting Directed Graph
Networks and routers are represented by
vertices. An edge of cost X connects Vertex A to
Vertex B if the intersection of Column A and Row
B is marked with the cost of the interface.
20
Shortest Path Tree and Routing Table for R6
Dest. Next Hop Cost N1
R3 10 N2 R3
10 N3 R3 7 N4
R3 8 N6 R10
8 N7 R10 12 N8
R10 10 N9 R10 11
N10 R10 13 N11 R10
14 RT5 RT5 6 RT7
RT10 8
21
Load Balancing by Multiple Path
equal or proportional cost multiple paths
R2
path 1
N1
N2
path 2
R3
R1
R4
22
Hierarchical Structure
  • Introduced to put a boundary on the explosion of
    link-state updates
  • Every area is connected to the backbone area

Area 2
Area 1
Area 3
23
Multiple Areas
IR
  • Group of contiguous hosts and networks
  • One LS database per area
  • Backbone area (contiguous)
  • Virtual links
  • Inter-area routing

Area 3
Area 2
IR/BR
to other AS
area 0
ASBR
Area 4
Area 1
Virtual link
24
OSPF Areas
  • The border area is OSPF area 0
  • all routers belonging to the same area have
    identical database
  • SPF calculations are performed separately for
    each area
  • LSA flooding is bounded by area

25
Area Link State Database
  • Link state database for every area is different
  • Area database is composed of
  • router links advertisements
  • network links advertisements
  • summary links advertisements
  • AS external advertisements

26
Scaling OSPF
  • Rule of thumb
  • no more than 150 routers /area
  • Reality
  • no more than 500 routers/area
  • Backbone area is an area that glue all the other
    areas
  • always marked as area 0
  • proper use of areas reduces bandwidth
  • summarized routes
  • instability is limited within the area

27
Route Redistribution
RIP Domain
OSPF Domain
  • UNIX host running routed
  • the router redistributes RIP into OSPF and vice
    versa

28
OSPF Advanatages
  • No limitation on hop count
  • Supports classless routing
  • Routing updates sent only when there is a change
    or very rarely
  • Faster convergence
  • Better load balancing
  • Logical definition of areas
  • Authentication and external routes tagging

29
The Link State Header
  • LS age
  • time since the LS record was first advertised
  • options
  • E - external links
  • T - TOS (type 0 doesnt support any TOS
  • LS type (router link, network link, summary link
    (IP network, summary link, to a border router,
    external link)

31
0
T
E
LS age options LS type
Link State ID
Advertising Router
LS sequence number
LS checksum length
30
The Router Links
  • summarizes all links that start from the router
  • bits 6 and 7 of the first word indicate the type
    of the router

31
The Network Links
  • advertised by designated routers

32
The Summary Links
  • advertised by area-border routers
  • the network mask is followed by a set of metrics

33
The External Links
  • advertised by border routers
  • required by EGPs
  • E indicates that TOS is not comparable with that
    of internal routes

network mask
E, TOS 0 TOS 0 metric
external route tag 0
E,TOS x 0 TOS x metric
external route tag x
- - -
- - -
- - -
E,TOS z 0 TOS z metric
external route tag z
34
Protocols within OSPF
  • Common header
  • Hello protocol
  • Exchange protocol
  • Flooding protocol

35
The Common Header
0
31
version (1) type (1)
packet length (2)
Router ID (4)
Area ID (4)
Checksum (2)
autype (2)
Authentication (4)
36
The Hello Protocol
0
31
OSPF packet header, type 1 (hello)
Network mask
Hello interval
Options
Priority
Dead interval
Designated router
Backup designated router
Neighbour
- - - -
Neighbour
37
The Exchange Protocol
  • Uses database description packets
  • Asymmetric protocol (master-slave)
  • Master sends database description packets
  • Slave sends the acknowledgments

38
The Exchange Protocol 2
  • Request records
  • send in case when sequence number of the LS is
    smaller
  • the other router will answer with a LS update

39
The Flooding Protocol
  • When a link changes state
  • a router responsible for that link issues a new
    version of the link state
  • the update is retransmitted in regular interval
    until an acknowledgment is received

0
31
OSPF packet header, type 5 (ack)
Link State advertisements headers
- - - -
40
Conclusions
  • More complex than RIP
  • the documentation is five times thicker
  • the management needs more information
  • the implementation needs more code
  • Why design such complex procedure?
  • routing is important
  • requires less signalization messages
  • compute better routes

41
Conclusions
  • OSPF is not a perfect protocol
  • IETF keeps making it better
  • O in OSPF stands for Open
  • OSPF is not the only link state protocol
  • IS-IS protocol is part of OSI routing framework
    for CLNP
  • similar in design to OSPF
  • uses different terminology

42
IP Routing Configuration
43
IP Routing Configuration Tasks
44
IP Routing Configuration Tasks
  • Global configuration
  • Select routing protocol(s)
  • Specify network(s)
  • Interface configuration
  • Verify address/subnet mask

Network 172.16.0.0
OSPF
Network 160.89.0.0
OSPF
Network 172.30.0.0
45
Dynamic Routing Configuration
Router (config)
router protocol keyword
  • Defines an IP routing protocol

46
OSPF Basic Configuration Commands
  • Enables an OSPF routing process

47
OSPF Basic Configuration Example
48
OSPF Route Summarization
  • Minimizes routing table entries
  • Localizes impact of a topology change

49
Route Summarization (cont.)
  • Inter-area (IA) summary link carries mask
  • One entry can represent several subnets

50
Route Summarization Issue
Existing Subnet
1111 11 000000 11 00
Mask 252Address 12
Valid 3rd Subnet
131.108.12.0
255.255.252.0
Summary Route
Mask 240Address 12
1111 00000000 1100
Invalid Subnet Zero
255.255.240.0
131.108.12.0
  • Some addresses may need reallocating

51
Route Summarization Commands
  • Consolidates IA routes on an ABR

52
Route Summarization Example
53
OSPF Route Redistribution
RIP IGRP Enhanced IGRP IS-IS
  • Allows routing-information exchange between OSPF
    and other routing protocols

54
OSPF Redistribution Command
  • Redistributes routes from OSPF into other routing
    protocols (and vice versa)

55
OSPF Redistribution Example 1
56
OSPF Redistribution Example 1
router ospf 109 network 172.16.62.0 0.0.0.255
area 0 network 172.16.63.0 0.0.0.255 area
0 redistribute rip subnets metric-type 1 metric
20 router rip network 172.16.0.0 passive-interfa
ce serial 0 passive-interface serial
1 default-metric 10 redistribute ospf 109 match
internal external 1 external 2
57
Redistribution Example 2
"Back door" creates potential loop
58
Redistribution Example 2 cont
router ospf 109 network 172.16.62.0 0.0.0.255
area 0 network 172.16.63.0 0.0.0.255 area
0 redistribute rip subnets metric-type 1 metric
20 distribute-list 11 out rip access-list 11
permit 172.16.8.0 0.0.7.255
59
VERIFYING OSPF OPERATION
60
show ip ospf interface Command
Router show ip ospf interface e0 Ethernet0 is
up, line protocol is up Internet Address
203.250.14.1 255.255.255.0, Area 0.0.0.0
Process ID 10, Router ID 203.250.13.41, Network
Type BROADCAST, Cost 10 Transmit Delay is
1 sec, State BDR, Priority 1 Designated Router
(ID) 203.250.15.1, Interface address
203.250.14.2 Backup Designated router (ID)
203.250.13.41, Interface address 203.250.14.1
Timer intervals configured, Hello 10, Dead 40,
Wait 40, Retransmit 5 Hello due in 00002
Neighbor Count is 3, Adjacent neighbor count is
3 Adjacent with neighbor 203.250.15.1
(Designated Router)Loopback0 is up, line
protocol is up Internet Address 203.250.13.41
255.255.255.255, Area 1 Process ID 10, Router
ID 203.250.13.41, Network Type LOOPBACK, Cost 1
Loopback interface is treated as a stub Host
  • Verifies interfaces are in correct areas

61
show ip ospf Command
  • Displays general information about the OSPF
    routing process

62
show ip ospf database Command
63
show ip protocol Command
64
Other OSPF show Commands
  • Displays parameters about OSPF virtual links
Write a Comment
User Comments (0)
About PowerShow.com