Title: CEENet Workshop
1LINK STATE PROTOCOLS(contents)
- Disadvantages of the distance vector protocols
- Link state protocols
- Why is a link state protocol better?
- The design of OSPF
- OSPF versus RIP
- Other link-state protocols
2Disadvantages of the Distance Vector Protocols
- Slow convergence
- Counting to infinity problem
- Lack of variety of metrics
- No possibility of hierarchical routing
- Bad performance in large networks
3Link State Protocols
- developed to overcome the disadvantages of the
distance vector protocols - centralized database describes the topology of
the whole network - calculation and routing are still distributed
4Characteristics
- information about adjacencies sent to all routers
only when there is a change - each router maintains an identical database
- a shortest path algorithm is used to find the
best route - converge as quickly as databases can be updated
5Link State Database
LS seq. num.
From To Link Cost A B 1
1 2 A D 3 1
2 B A 1 1 2 B
C 2 1 1 B E
4 1 2 C B 2
1 1 C E 5 1
1 D A 3 1 2 D
E 6 1 1 E B
4 1 2 E C 5
1 1 E D 6 1
1
Link State Announcement (LSA)
From A to B, link 1, distance 1 number 2
6The Sequence Numbers
- modulo N numbering is used to avoid very large
numbers - The sequence numbers vary between 1-N and N-2,
where N 231 - numbers -N and N-1 are not used
- at start, router uses the negative number 1-N
- when N-2 is reached, the next value will be 0
- the numbers will continue to cycle in the
positive segment of the sequence space
7The Sequence Numbers 2
- the lollipop analogy is implemented
- comparison of numbers
- if at least one number is negative - direct
- if both numbers are positive - cyclic
- if the difference is smaller than half a cycle,
than the bigger number is newer, otherwise the
smaller number is newer
8The Flooding Protocol
- every node sends the message on every link except
the one from where it received the message - very fast and very reliable, but wastes bandwidth
- used for ordinary traffic in military networks
- messages are sent only when there is a change or
every 45 minutes
9The Flooding Protocol 2
- When a link breaks, A and B send the information
to all other nodes about state of link 1. - Each node compares this entry in the data base,
if it is newer than the received message it
ignores the message, otherwise it updates the
entry.
10Bringing up Adjacency
link 1 and link 6 are down and during that time
link 2 breaks
3
When link 6 comes up it has no information about
link 2
- synchronizing databases via comparison of
sequence numbers - interesting records - the sequence numbers are
different or not present in database
11Securing the Map Updates
- the flooding procedure includes hop-by-hop
acknowledgments - the 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
- the messages can be authenticated, e. g. by
passwords
12Shortest Path Routing Algorithms
- Determine the shortest path tree at each node
- Dijkstras algorithm
- complexity (MlogM)
- Bellman-Ford algorithm
- complexity (MN)
M - number of links N - number of nodes
13 Dijkstras Algorithm
Average time needed to compute the routing table
is about 200ms for a 200 node network on a
typical router.
Step N d(B) d(C) d(D) d(E) Initial A 1
1 1 A, B 1 2 1
2 2 A, B, D 1 2 1 2
3 A, B, C, D 1 2 1 2 4
A, B, C, D, E 1 2 1 2
14Why Is a Link State protocol Better?
- fast loopless convergence
- support of precise metrics and, if needed
multiple metrics - support of a multiple paths to a destination
- splitting very large networks in areas
15Link State ProtocolsDisadvantages
- more memory required
- the link state database is needed in addition to
the routing tables - much more complex procedure
- higher probability for a bug in the program
16OSPF
- link state or SPF technology
- developed by OSPF Working Group of IETF (not
proprietary) - designed for TCP/IP Internet environment
- documented in rfc 1247
17The Design of OSPF
- Strict separation of hosts and routers
- Broadcast networks such as Ethernet or FDDI
- Non broadcast networks as X.25 or ATM
- Splitting very large networks in areas
18OSPF - Advantages
- fast convergence
- load balancing
- low bandwidth utilization
- optimal path utilization
- authenticated routing updates
- external routes
19Fast convergence
detection of failure
LSA/SPF
R2
alternate path
N1
N2
XXX
R1
R3
primary path
20Load Balancing by Multiple Path
equal or proportional cost multiple paths
21Low Bandwidth Utilization
FDDI Dual Ring
- only changes propagated
- multicast on multiaccess
- broadcast network
- database synchronization
LSA
LSA
XXX
22Support of Multiple Metrics
Type of metrics
- throughput
- delay
- cost
- reliability
- several metrics for each link
- different routing tables for each link
- presenting selected metric in the packet
23Optimal Path Utilization
Cost 1
N2
N3
Cost 1
R2
R3
N5
R1
N1
Cost 10
Cost 10
Optimal path is determined by the sum of the
interface cost
R4
Cost 10
N4
24Optimality Depends on Metric
R2
64Kbs/20ms
64 Kbs/20ms
min. delay
max. throughput
R1
R3
1.5 Mbs / 295ms
1.5 Mbs / 295ms
1.5 Mbs / 295ms
R4
R5
25The Cost and The Bandwidth
- 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
26Authenticated Routing Updates
- Two possibilities are defined
- no authentication
- simple authentication using passwords
- network administrator can configure a different
password for each network, e. g. for each
point-to-point connection or each Ethernet
27IP Subnetting Support
- Network number
- Variable length subnet mask (VLSM)
- Discontiguous subnets
- Supernets/subnet prefixes
28Route Summarization
R2
Network Next hop 1
R1
With summarization
Network Next hop 1, A
R1 1, B R1 1, C
R1
Without summarization
R1
1,A 1,B 1,C are stub networks
1,B
1,A
1,C
29Route Summarization Benefit
30Route Tagging
- Autonomous System B wants to
- propagate routes from A --gt D, but not propagate
from C --gt D - OSPF tags routes with AS input
- the information can be used when redistributing
routs
31TOS - Based Routing
- IP header supports 3 bit priority field
- IP header supports 4 special type of services
- bandwidth
- delay
- reliability
- cost
- currently only TOS 0 is supported
32External Routes
- one gateway (router) to external word
- only advertise default route
- several gateways
- pick one that is closest
- pick one that carry data more efficiently
- external routes are added to the database as
gateway link state records
33Broadcast Media Problems
- N neighbors - N(N-1)/2 adjacencies
- Not optimal
- Wasted bandwidth
- does not scale
34Designated Router
- One per multi-access network
- generates network links advertisements
- assists in database synchronization
Backup designated router
Designated router
35Broadcast Media
- select a designated router (DR)
- all routers become adjacent to DR
- exchange routing information with DR via
multicast - DR updates all the neighbors
- less routing traffic generated
36Non Broadcast Networks
- for N routers N(N-1)/2 virtual circuits are
needed to have full connectivity - may be costly (does not scale)
- designated router plays the same roll as in
broadcast media - instead of multicast the LSAs are sent
point-to-point between the designated router and
all the others
37Multiple Areas
- network increases gt increase in
- link state database
- route computation
- volume of messages
- the solution to these problems
- split network into areas and the backbone
- the size of the routing proportional to the size
of the area, not the whole network
38Hierarchical Structure
- backbone area needed to connect all the other
areas
Area 2
Area 1
Area 3
39OSPF Areas
- group of contiguous hosts and networks
- one database per area
- backbone area (contiguous)
- virtual links
- inter-area routing
Area 3
Area 2
area 0
Area 4
Area 1
40OSPF Areas 2
- a router has separate LS database for each area
that it belongs - all routers belonging to the same area have
identical database - SPF calculations are performed separately for
each area - LSA flooding is bounded by area
41Area Link State Database
- area database is composed of
- router links advertisements
- network links advertisements
- summary links advertisements
- AS external advertisements
42Classification of Routers
- IR - internal router
- ABR - area border router
- BR - backbone router
- ASBR -autonomous system border router
IR
ABR/BR
IR/BR
to other AS
ASBR
43OSPF Area Mapping
- area can be one or more networks
- area can be one or more subnets
- any combination of networks and subnets possible
(but bad in practice) - for summarization subnets must be grouped
44The 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
LS age options LS type
Link State ID
Advertising Router
LS sequence number
LS checksum length
45The Router Links
- summarizes all links that start from the router
- bits 6 and 7 of the first word indicate the type
of the router
46The Network Links
- advertised by designated routers
47The Summary Links
- advertised by area-border routers
- the network mask is followed by a set of metrics
48The 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
49Protocols within OSPF
- common header
- hello protocol
- exchange protocol
- flooding protocol
- aging link state record
50The Common Header
0
31
version (1) type (1)
packet length (2)
Router ID (4)
Area ID (4)
Checksum (2)
autype (2)
Authentication (4)
51The 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
52The Exchange Protocol
- uses database description packets
- asymmetric protocol (master-slave)
- master sends database description packets
- slave sends the acknowledgments
53The 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
54The 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
- - - -
55Aging Link State Records
- old or stale records need to be removed from the
link state database - the procedure needs to be synchronized
- the age is set to 0 when the record is first
issued - it is incremented on each hop and by 1 every sec.
- when it reaches maxAge, the router needs to
remove it - the neighbors have to be informed about this
56Scaling OSPF
- Rule of thumb
- no more than 150 routers /area
- Reality
- no more than 500 routers/area
- Backbone area is an area
- always marked as area 0
- proper use of areas reduces bandwidth
- summarized routes
- instability is limited within the area
57Route Redistribution
RIP Domain
OSPF Domain
- the router redistributes RIP into OSPF and vice
versa
58Conclusions
- 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
59Conclusions 2
- 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