Professional Documents
Culture Documents
EEC-682/782
The Network Layer
Computer Networks I Network Layer Design Issues
Routing Algorithms
Lecture 11 Feedback
Anonymous email account
Wenbing Zhao username: eec682@yahoo.com
w.zhao1@csuohio.edu password: anyone
http://academic.csuohio.edu/zhao_w/teaching/eec682.htm Feedback so far:
(Lecture nodes are based on materials supplied by I speak too fast
Dr. Louise Moser at UCSB and Prentice-Hall)
Should points out what is more important
Use the black board when explaining problems
1
Connection-Oriented Service
Connection-Oriented Service
Routing within a virtual-circuit subnet - Each router must
remember where to forward packets for each currently open
Virtual Circuit (VC) passing through it
Each router must maintain a table with one entry per open VC
Each packet must contain VC number field in its header
Router must forward packet to correct router based on
Line on which it arrived and VC number
Desirable properties
Correctness, simplicity
Robustness to faults
Stability – converge to equilibrium
Fairness and optimality – hard to achieve both
Two classes
Non-adaptive (static) - Route computed in advance, off-line,
downloaded to routers
Adaptive (dynamic) - Route based on measurements or
estimates of current traffic and topology
2
Routing Algorithms The Optimality Principle
Optimality principle – if router J is on the optimal path from
The Optimality Principle router I to router K, than the optimal path from J to K also
Shortest Path Routing falls along the same route
Sink tree – the set of optimal routes from all sources to a given
Flooding destination form a tree rooted at the destination
Distance Vector Routing
Link State Routing
Hierarchical Routing
Broadcast Routing
Multicast Routing
Routing for Mobile Hosts
Routing in Ad Hoc Networks
Node Lookup in Peer-to-Peer Networks (skip)
(a) A subnet. (b) A sink tree for router B.
EEC-682: Computer Networks I EEC-682: Computer Networks I
Spring Semester 2005 - Wenbing Zhao 9 Spring Semester 2005 - Wenbing Zhao 10
3
Flooding Distance Vector Routing
Idea: every incoming packet is sent out on every outgoing line Also called Bellman-Ford or Ford-Fulkerson. Used in ARPANET
except the one it arrived on Idea: each router maintains a table (a vector), giving best
Adv: flooding always chooses shortest path, no other algorithm known distance to each destination and which line to use to get
has shorter delay there
Disadv: generates lots of duplicates Table is updated by exchanging info with neighbors
Methods to damper this effect Table contains one entry for each router in network with
Preferred outgoing line to that destination
Header of each packet has hop counter that is decremented at
each hop; packet discarded when counter reaches 0 Estimate of time or distance to that destination
Source router puts sequence number in each packet it receives Once every T msec, router sends to each neighbor a list of
from its hosts estimated delays to each destination and receives same from those
neighbors
Each router has list for each source router telling which sequence
numbers originating at that source have already been seen A d(A,Y) Y At router A, for Z
Each list augmented with counter k, meaning all sequence numbers up
d(Y,Z) Compute d(A,X) + d(X,Z) and
through k have been seen
d(A,X) d(A,Y) + d(Y,Z), take minimum
If packet is duplicate, router discards it
X Z
EEC-682: Computer Networks I
d(X,Z) EEC-682: Computer Networks I
Spring Semester 2005 - Wenbing Zhao 13 Spring Semester 2005 - Wenbing Zhao 14
4
Distance Vector Routing -
Distance Vector Routing - Exercise
Exercise
Going via B gives (11, 6, 14, 18, 12, 8).
Consider the subnet shown. Distance vector routing Going via D gives (19, 15, 9, 3, 9, 10).
is used, and the following vectors have just come in
Going via E gives (12, 11, 8, 14, 5, 9).
to router C:
from B: (5, 0, 8, 12, 6, 2);
Taking the minimum for each destination except C
from D: (16, 12, 6, 0, 9, 10); and
gives (11, 6, 0, 3, 5, 8).
from E: (7, 6, 3, 9, 0, 4). The outgoing lines are (B, B, –, D, E, B).
The measured delays to B, D, and E, are 6, 3, and 5,
respectively. What is C's new routing table? Give
both the outgoing line to use and the expected delay.
5
Building Link State Packets
Measuring Line Cost
Packets contain identity of sender, sequence number, age, list of
neighbors and delay to that neighbor
Router sends “echo” packet When are link state packets constructed?
Router at other end sends it back immediately Periodically at regular intervals
Divide round trip by 2 to get one-way delay When link or nodes goes down or comes back
To take load into account, start timing when packet (a) A subnet. (b) The link state packets for this subnet.
enters back of queue
To ignore load, start timing when packet leaves front
of queue
Distributing the Link State Packets Distributing the Link State Packets
Goal – all routers have same version of topology
Use flooding – source identifiers and sequence numbers to Router B’s data structure
recognize and discard duplicates Link state packet from A forwarded to C, F; acked to A
Problems Link state packet from E arrived twice, via EAB and EFB;
Finite range of sequence numbers, so must recycle them. Can result forwarded to C, acked to A, F
in different messages with same sequence number
Use 32-bit sequence numbers to avoid this problem
Router crashes and restarts with sequence number 0. Can result in
different messages with same sequence number
Use router incarnation numbers to avoid this problem
Sequence number may be corrupted
Solution – include age of packet in its header and decrement it
once per second; a packet is discarded when ago hits 0
Also use ACKS for link state packets for reliability
6
Hierarchical Routing
Hierarchical Routing
Tradeoff: savings in memory space may result in longer path.
Usually, increase in mean path length not significant
As network size increases, more router memory used Optimal number of levels for N routers is ln N, with e ln N
to store routing table, more time to process routing routing table entries per router
tables, more bandwidth to transmit states reports
Use hierarchical structure similar to telephone
network
Regions: router knows details of how to route packets within
its region, does not know internals of other regions
Clusters of regions, zones of clusters, groups of zones
7
Broadcast Routing - Exercise
Reverse Path Forwarding
Looking at the subnet shown below, how many packets
are generated by a broadcast from B, using
1 (a) reverse path forwarding?
2 (b) the sink tree?
3
4
5
Multicast Routing
Broadcast Routing - Exercise
2 Multicast to groups of hosts
B
Router must know which hosts are in which groups, compute
spanning trees
4 A C
When process sends multicast packet to group, router
examines its spanning tree and prunes it by removing all lines
10 F D I J that do not lead to hosts in the group
8 K H G H I N
D J I E
4 L L E F O H M O
G M Sink tree – 14 L H
Reverse Forwarding - 28
EEC-682: Computer Networks I EEC-682: Computer Networks I
Spring Semester 2005 - Wenbing Zhao 31 Spring Semester 2005 - Wenbing Zhao 32
8
Multicast Routing
Multicast Routing
Pruning
With link state routing, start at end of path and work
toward root. Remove all routers that do not belong to group
With distance vector routing (use reverse path forwarding)
When router with no hosts in group and no connection to other
routers, and receives multicast packet for group, it sends
PRUNE message to sender telling it not to send any more
multicasts for group
When router with no hosts in group has received PRUNE
messages on all its line, it also sends PRUNE message