Dynamic Routing Algorism: Link State

Download Report

Transcript Dynamic Routing Algorism: Link State

Dynamic Routing Algorism:
Link State
2000. 10.23
Bang, Sun lee
Database Research Lab.
Dept. of Computer Science
Distance Vector Routing’s Problems
• Queue length as the delay metrics, not considered
link bandwidth
• Long convergence time
• Distance vector routing was replaced in 1979 by a
link state routing
• Link State Algorism have Network topology
information
2015-07-17
Network Seminar
2
Link State Algorism’s Basic Operation
• Discover its neighbors and learn their network
address
– Sending HELLO packet
• Measure the delay or cost to each of its neighbors
– Sending ECHO packet
• Construct a packet telling all it has just learned
• Send this packet to all other routers
• Compute the shortest path to every other router
– Dijkstra’s algorism
2015-07-17
Network Seminar
3
Learning about the Neighbors
• Sending a special HELLO packet
• The router on the other end send back a reply
telling who it is
• Name must be globally unique
2015-07-17
Network Seminar
4
Measuring Line Cost
• Reasonable estimate, of the delay to each of
neighbors
– Sending a special ECHO packet
Measuring the round-trip time and dividing it by two
– To factor the load in
• timer must start when the ECHO packet is queued
– To ignore the load
• timer should be start when the ECHO packet reached
the front of the queue
West
B
G
East
C
F
H
A
D
2015-07-17
E
I
Network Seminar
J
5
Building Link State Packets
• Once information is collected,next
Step is for each router to build
a packet containing all the data.
A
• When to build packets?
1.periodically
2.specific events
B
4
3
D
A
5
1
E
6
8
<subnet>
2015-07-17
7
F
Seq.
Sequence number
Age
age
B 4
List of neighbors
E
C
2
Sender’s identity
5
A
B
C
D
E
F
Seq.
Seq.
Seq.
Seq.
Seq.
Seq.
Age
Age
Age
Age
Age
Age
B
4
A
4
B
2
C
3
A
5
B
E
5
C
2
D 3
F
7
C
1
D 7
F
6
E
F
8
E
1
6
8
<link state packet>
Network Seminar
6
Distributing the Link State Packets
• Basic distribution algorithm
– Flooding to distribute the LSP
– Seq. # is incremented for each new packet sent
– Checked against the list of packets already seen
• New : packet is forwarded on all lines
• Duplicate : packet is discarded
• Greater seq. number is newer
– Problems
• If seq. # wrap around, confusion will reign
– Solution. 32-bit seq. #
• If router crashes,lose track of seq. #
• If seq.# is corrupted and 65540(1-bit error) is received instead of 4,
packet 5 is rejected
– Solution
• Include the age of packet
– Ageing
• Puts time out value in the header
• Decrement it once per second
• If Age hits zero then router is discarded
2015-07-17
Network Seminar
7
Distributing the Link State Packets
• Refinement algorism
– Holding area
– To guard against errors on the router-router lines,
LSP are acknowledged
B
C
2
4
A
3
1
5
6
8
E
7
D
F
<subnet>
Source
Send flags ACK flags
Seq.
Age
A
A
21
60
0 1 1 1 0 0
F
21
60
1 1 0 0 0 1
E
21
59
0 1 0 1 0 1
C
20
60
1 0 1 0 1 0
d
21
59
1 0 0 0 1 1
2015-07-17
C
F
A C
F
Network Seminar
Data
8
Computing the New Routes
• Once a router has a full set of link state packets,
the entire subnet graph can be constructed
• Dijkstra’s shortest path algorithm
1 Initialization:
2 N = {A}
3 for all nodes v
4
if v adjacent to A
5
then D(v) = c(A,v)
6
else D(v) = infinity
7
8 Loop
9
find w not in N such that D(w) is a minimum
10 add w to N
11 update D(v) for all v adjacent to w and not in N:
12
D(v) = min( D(v), D(w) + c(w,v) )
13 /* new cost to v is either old cost to v or known
14
shortest path cost to w plus cost from w to v */
15 until all nodes in N
2015-07-17
Network Seminar
9
Computing the New Routes
• For n routers and each with k neighbors
we need memory proportional to kn
F
5
D
9
A
6
4
2
1
6
E
3
B
7
C
step
N
D(B),p(B)
D(C),p(C)
D(D),p(D)
D(E),p(E)
D(F),p(F)
0
A
1,A
6,A
9,A
INFINITY
INFINITY
1
AB
6,A
8,C
9,C
INFINITY
2
ABC
8,C
9,C
13,D
3
ABCD
9,C
13,D
4
ABCDE
5
ABCDEF
2015-07-17
13,D
Network Seminar
10
Computing the New Routes
B(1)
D(9)
C(6)
A(0)
A(0)
A(0)
B(1)
D(9)
B(1)
C(6)
C(6)
D(8)
2015-07-17
Network Seminar
D(9)
E(9)
11
Computing the New Routes
A(0)
B(1)
B(1)
B(1)
C(6)
D(8)
C(6)
C(6)
E(9)
F(13)
2015-07-17
A(0)
A(0)
D(8)
E(9)
F(13)
Network Seminar
D(8)
E(9)
F(13)
12
Used in actual Network
• OSPF(Open Shortest Path First) protocol
– Increasingly being used in the Internet
• IS-IS(Intermediate system-Intermediate system)
– Numerous Internet backbones(include the old NSFNET
backbone)
– Digital cellular systems such as CDPD
– Novell NetWare uses a minor variant of IS-IS for routing
IPX packets
• Almost same between IS-IS and OSPF
– important difference
• IS-IS : it is easy and natural to simultaneously
carry information about multiple network layer
protocol
2015-07-17
Network Seminar
13
OSPF protocol
database1
database2
• Link-State routing Protocol ‘s feature
– All routers has same routing database
– Each database of router implement topology of router
domain
– Runs the same shortest path algorism, this algorism
modify Routing table
2015-07-17
Network Seminar
14