Escolar Documentos
Profissional Documentos
Cultura Documentos
Outline
Info about the TLT-2336 course
Overview of the course content Arrangements and grading
Routing algorithms
Link state Distance Vector Hierarchical routing
Slides have been derived from the support material from Computer Networking by Kurose and Ross
Computer networking II aims to illustrate those special needs that are typical in modern networks and to prepare you for the challenges they present
Course Info
Computer Networking I is highly recommended Lectures
Third & fourth period (09.01.2013 13.05.2013): Wednesdays, 16:15 - 17:45 Tietotalo, TB222
Course Syllabus
Course persons responsible
Dmitri Moltchanov and Yevgeni Koucheryavy Email: moltchan@cs.tut.fi, yk@cs.tut.fi Office: Tietotalo, TH208
Instructors
Alexander Pyattaev, Vitaly Petrov Email: alexander.pyattaev@tut.fi, vitaly.petrov@tut.fi Office: Tietotalo, TH209 and TC240
Supplementary courses:
TLT-2156 Laboratory excercises (basic level, recommended) TLT-2506 Communications laboratory (advanced, recommended)
11/01/2012
Outline
Info about the TLT-2336 course Routing algorithms
Link state Distance Vector Hierarchical routing
The following slides have been derived from the support material from Computer Networking by Kurose and Ross
Routing algorithms
Routing algorithms Purpose
Link state Distance Vector Hierarchical routing
1
3 2
So what is routing?
A set of proceures/algorithms that allows to set up the forwarding tables automatically and intelligently
It is not a network layer protocol it is an application, just like any other service like DNS
Routing is a process that allows to construct routes, it is not responsible for the actual forwarding
In fact, routing protocol is not needed after the network is configured But the forwarding part is of course needed as long as the network works
Graph abstraction
5 2 1 Graph: G = (N,E)
v
2
3 3 1
w
1
z
2
N = set of routers = { u, v, w, x, y, z } E = set of links ={ (u,v), (u,x), (u,w), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) } Remark: Graph abstraction is useful in other network contexts Example: P2P, where N is set of peers and E is set of TCP connections
v
2
3 3 1
w
1
- e.g., c(w,z) = 5
z
2
Cost of path (x1, x2, x3,, xp) = c(x1,x2) + c(x2,x3) + + c(xp-1,xp) Question: Whats the least-cost path between u and z ?
Static or dynamic?
Static: routes change slowly Updates periodically Dynamic: routes change quickly Updates in response to link cost changes
Routing algorithms
Routing algorithms
Link state Distance Vector Hierarchical routing
Link-state routing
Works by analyzing the cost of each edge of the graph
Represents the quality of the links Can be run independently on each host (but it still needs info from each edge)
The routing protocol itself uses flooding to propagate the link states
Flooding is a process of forwarding to everyone, until each host has a copy of a certain link state In some way it works similar to how rumors spread in a crowd: Have you heard the news about route 666 over last 2 seconds? No! Guess what, the route 666 is congested for the last 2 seconds! OR: Have you heard the news about route 666 over last 2 seconds? Yep, I have that news Okay, I'm gonna check on my other neighbors...
5 2 1
v
2
3 3 1
w
1
z
2
v u
z x
y
A
0 0
1+e e
B
1
C
e
2+e
D
1
0 1
A
0 0
2+e 1+e
B
1
2+e
C
e
D 1+e 1 B 0 0 C 1 1
e
initially
Solutions:
recompute
recompute
Link costs not depend on the amount of traffic Ensure that not all routers run LS at the same time
Routing algorithms
Routing algorithms
Link state Distance Vector Hierarchical routing
11/01/2012
22
Bellman-Ford example
5 2 1
v
2
3 3
w
1
du(z) = min { c(u,v) + dv(z), y 1 c(u,x) + dx(z), c(u,w) + dw(z) } = min {2 + 5, 1 + 3, 5 + 3} = 4 Node that achieved minimum is next hop in shortest path forwarding table x
2
11/01/2012 TLT-2336, spring 2012, Lecture #1 24
11/01/2012
25
11/01/2012
26
Distributed:
each node notifies neighbors only when its DV changes
neighbors then notify their neighbors if necessary
recompute estimates
if DV to any node has changed, notify neighbors
11/01/2012
27
y
7
time
y
50
At time t0, y detects the link-cost change, updates its DV, and informs its neighbors.
At time t1, z receives the update from y and updates its table. It computes a new least cost to x and sends its neighbors its DV. At time t2, y receives zs update and updates its distance table. ys least costs do not change and hence y does not send any message to z.
11/01/2012
30
good news travels fast bad news travels slow - count to infinity problem! 44 iterations before algorithm stabilizes: see text If Z routes through Y to get to X:
60
y
50
Poisoned reverse:
No! It is good only for loops involving only two nodes TLT-2336, spring 2012, Lecture #1 31
11/01/2012
Speed of Convergence
LS: O(n2) algorithm requires O(nE) messages may have oscillations DV: convergence time varies may be routing loops count-to-infinity
DV:
DV node can advertise incorrect path cost each nodes table used by others
error propagate through network
Internet routing
Routing algorithms
Link state Distance Vector Hierarchical routing Internet routing
Hierarchical Routing
Our routing study thus far - idealization all routers identical network flat not true in practice scale: with 200 million destinations:
cant store all destinations in routing tables! (~2.4 GB just to store them) routing table exchange would take ages!
administrative autonomy
Internet = network of networks each network administrator may want to control routing in its own network
Hierarchical Routing
aggregate routers into regions, autonomous systems (AS) routers in same AS run same routing protocol
intra-AS routing protocol routers in different AS can run different intra-AS routing protocol
11/01/2012 TLT-2336, spring 2012, Lecture #1 35
Interconnected AS
3a 3b AS3 1a
3c
1c 1d 1b AS1
2a
2c
AS2
2b
Forwarding table
Inter-AS tasks
suppose router in AS1 receives datagram destined outside of AS1: router should forward packet to gateway router, but which one? AS1 must: 1. learn which destinations are reachable through AS2, which through AS3 2. propagate this reachability info to all routers in AS1 Job of inter-AS routing!
2a 1b AS1 2c
AS2
3a 3b AS3 1a
3c
1c 1d
2b
Internet routing
Routing in the Internet Interior Gateway Protocols protocols
RIP OSPF
11/01/2012
38
Intra-AS Routing
also known as Interior Gateway Protocols (IGP) most common Intra-AS routing protocols:
RIP: Routing Information Protocol OSPF: Open Shortest Path First IGRP: Interior Gateway Routing Protocol (Cisco proprietary)
11/01/2012
39
z
11/01/2012
x y
40
RIP advertisements
distance vectors: exchanged among neighbors every 30 sec via Response Message (also called advertisement) each advertisement: list of up to 25 destination subnets within AS
11/01/2012
41
RIP: Example
z w A x D C
Destination Network
w y z x
Next Router
.
11/01/2012
A B B -.
2 2 7 1
....
Routing/Forwarding table in D
TLT-2336, spring 2012, Lecture #1 42
RIP: Example
Dest w x z . Next C hops 1 1 4 ...
Advertisement from A to D
z x D
Next Router
Destination Network
w y z x
.
11/01/2012
A B B A -.
2 2 7 5 1
....
43
11/01/2012
44
forwarding table
forwarding table
45
Internet routing
Routing in the Internet IGP protocols
RIP OSPF
11/01/2012
46
OSPF advertisement carries one entry per neighbor router advertisements disseminated to entire AS (via flooding)
carried in OSPF messages directly over IP (rather than TCP or UDP
security: all OSPF messages authenticated (to prevent malicious intrusion), 2 modes:
simple authentication same password for all routers, passed in the message (plaintext not very secure) MD5 authentication shared secret keys used, MD5 hash computed for each OSPF message content, used with sequence numbers (against reply attacks)
11/01/2012
48
For each link, multiple cost metrics for different TOS (e.g., satellite link cost set low for best effort; high for real time)
Up to the network administrator
11/01/2012
49
Hierarchical OSPF
Hierarchical OSPF
two-level hierarchy: local area, backbone.
Link-state advertisements only in area each node has detailed area topology; only knows direction (shortest path) to nets in other areas.
area border routers: summarize distances to nets in own area, advertise to other Area Border routers. backbone routers: run OSPF routing limited to backbone. boundary routers: connect to other ASs.
Checklist: Check course regulations Understand why do we need routing Review routing algorithms Review routing protocols Understand what is an AS