university of delaware cpeg 4191 distance vector routing dynamic programming zlimited state...

22
University of Delaware CPEG 419 1 Distance Vector Routing – Dynamic Programming Limited state information. Just the next hop and cost. A B D G F C H E address Next hop cos t A A 0 B B 1 C C 1 D D 1 E E 2 F D 2 G B 2 H B 3 A address Next hop cos t A A 1 B B 1 C A 2 D D 0 E B 2 F F 1 G B 2 H B 3 D

Upload: carol-robbins

Post on 18-Jan-2018

219 views

Category:

Documents


0 download

DESCRIPTION

University of Delaware CPEG 4193 Distance Vector Routing – Dynamic Programming zSuppose a new node comes on line. zSuppose I first talks to A. A B D G F C H E I addressNext hop cost AA0 BB1 CC1 DD1 EE2 FD2 GB2 HB3 A addressNext hop cost AA1 BA2 CA2 DA2 EA3 FA3 GA2 HA2 II0 I

TRANSCRIPT

Page 1: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 1

Distance Vector Routing – Dynamic Programming Limited state information. Just the next hop and cost.

A

B

D

G

FC

H

E

address Next hop

cost

A A 0

B B 1

C C 1

D D 1

E E 2

F D 2

G B 2

H B 3

A address Next hop

cost

A A 1

B B 1

C A 2

D D 0

E B 2

F F 1

G B 2

H B 3

D

Page 2: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 2

Distance Vector Routing – Dynamic Programming Suppose a new node comes on line.

A

B

D

G

FC

H

E

I

address Next hop

Cost

A ?

B ?

C ?

D ?

E ?

F ?

G ?

H ?

I I 0

I

Page 3: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 3

Distance Vector Routing – Dynamic Programming Suppose a new node comes on line. Suppose I first talks to A.

A

B

D

G

FC

H

E

I

address Next hop

cost

A A 0

B B 1

C C 1

D D 1

E E 2

F D 2

G B 2

H B 3

A address Next hop

cost

A A 1

B A 2

C A 2

D A 2

E A 3

F A 3

G A 2

H A 2

I I 0

I

Page 4: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 4

Distance Vector Routing – Dynamic Programming Suppose a new node comes on line. Suppose I first talks to A. Next I talks to D.

A

B

D

G

FC

H

E

I

address Next hop

cost

A A 1

B A 2

C A 2

D D 1

E A 3

F D 2

G A 2

H A 2

I I 0

Iaddress Next hop

cost

A A 1

B B 1

C A 2

D D 0

E B 2

F F 1

G B 2

H B 3

D

Page 5: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 5

Distance Vector - AlgorithmStart with all destinations with infinite

distance, except for the actual node, which is distance 0.

Every 30 seconds (RIP), or when a change occurs in the table, send table to neighbors.

If the distance to a prefix advertised by a neighbor is less plus the distance to the neighbor is less than known distance, reduce distance to prefix and route packets with that destination prefix to that neighbor.

Page 6: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 6

Count to Infinity ProblemA B C D E

initial1 1 iteration1 2 2 iterations1 2 3 3 iterations1 2 3 4 4 iterations

A B C D E1 2 3 4 initial3 2 3 4 1 iteration3 4 3 4 2 iterations5 3 5 4 3 iterations5 6 5 6 4 iterations

Page 7: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 7

Approaches to Mitigate Count InfinityWhy is count to infinity a problem?

It generates tons of routing updates – too much trafficThe network should report that a route is unreachable.

Put upper bound an upper bound the the diameter of the network.But what is the network grows (as it did).

Split horizon. A router does not report a distance to the neighbor it learned the distance from.

Split horizon with poison reverse. If A advertises the best cost to E to B, then B advertises a cost of infinity to E back to A.

This only works for loops that involve two nodes. With larger loops, the mitigation is more difficult and these remedies reduce the rate of convergence.

The way to fix it is to use link state routing.

Page 8: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 8

Link State Routing (IS-IS and OSPF)Each router learns the entire network.

(Compare to distance vector)If the entire network is known, the

shortest cost routing can be computed.Each router advertises to its neighbors

who it is connected to.Each router floods any advertisement it

receives.

Page 9: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 9

Link State Routing

HELLO – Determining who the router is connected to.

Reliable Flooding of LSA (link state advertisement) and keeping/getting up-to-date information.

Calculate shortest path.

Page 10: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 10

HELLOPeriodically, a node sends a HELLO

LSP (Link State Packet) to its neighbors.

The neighbor responds with a HELLO reply.

This way the router can determine which router it is connected to.

The default period is 10 – 30sec.

Page 11: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 11

Reliable FloodingEach LSP contains

The ID of the node that created the LSP. The list of the neighbors directly

connected to that node with the cost of each link.

A sequence number A time to live

Each LSP reception is ACKed.

Page 12: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 12

Sequence Number The node that generated the LSA increments the

sequence number for each LSA it sends out. The sequence number is 32 bits long, so wrap around

is not possible. When router receives an LSA, it checks if the seq num

of the received LSA is larger than the LSA in memory. If the LSA has a larger seq. num, it is stored, the old

one discarded and the new LSA is flooded to all neighbors, except the one that sent it.

If the LSA has a smaller or equal seq. no, it is discarded.

Page 13: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 13

Time to Live (TTL)Each second a LSA sits in memory, its TTL

is decremented.Each time the LSA is transmitted, its TTL is

decremented.When the TTL reaches zero, the LSA is

discarded and the router floods the LSA with TTL=0 to tell other routers to delete this information.

Page 14: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 14

A LSA is generated periodically (on the order of hours) or when a change is detected (via the HELLO).

When a node reboots, it doesn’t know its seq. no. It floods its link state with seq. no. 0. It sends a Link State Request to its neighbors The neighbors respond with the most up to date LSA

they have. These LSA may contain the LSA of the before it crashed. In this case, the node updates its seq. no.

Remember that every time a router gets a new info, it floods the information.

Page 15: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 15

Security IssuesAn attacker could send fake LSAs.Must filter out LSA from any other

source but the neighbor and use authentication.

If a router is compromised, it could advertise a low cost to all nodes. Then all nodes will send packets to this node and the network would stop working.

Page 16: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 16

metrics ARPANET – the link cost included the size of the queue (a

measure of congestion). This does not work..

Static cost – just use delay (Juniper seems to do this) Dynamic cost – must make sure that link costs do not vary

too much. The cost can is restricted to only change slowly over time. The cost between links cannot vary much. There cannot be

more than a factor of 7 difference between the most and least expensive link.

The cost of a link can only vary by a factor of 3. Cost only depends on utilization at moderate or high loads. Only send updates when the cost crosses a threshold. Is this stable?

Page 17: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 17

TOS – Type of ServiceA data packet can identify the type

of service it wants.The router can provide different

routing according to the TOS..To support this, OSPF allows the link

cost to depend on the TOS.This is not widely deployed.

Page 18: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 18

OSPF Header

version type length

Source address

Area ID

Checksum Authentication type

Authentication

Type:1=hello2=database description3=link status request4=link state update5=link state ack

Which area the packet originated

Address of the sender

Page 19: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 19

OSPF LSALS Age Options Type=1

Link State ID

Advertising Router

Seq. No

Checksum Length

Number of Links

Link ID

Link Data

MetricLink Type Num TOS

Optional TOS

More Links

Like TTL

The same

Page 20: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 20

Page 21: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 21

Page 22: University of Delaware CPEG 4191 Distance Vector Routing  Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E

University of Delaware CPEG 419 22