4.link State & Multicasting
4.link State & Multicasting
Prepared by
Divya K S
Adi Shankara Institute of Engineering & Technology
Kalady
Link State Routing
Link State Routing
• Distance vector routing was used in the ARPANET until 1979, when it
was replaced by link state routing.
2. Count-to-infinity problem
Link State Routing-steps
• Each router must do the following:
• 1. Discover its neighbors and learn their network addresses.
• This algorithm requires each router to know the estimate of delay to each of its
neighbours.
• The most direct way to determine this delay is to send over the line a special
ECHO packet that the other side is required to send back immediately.
• By measuring the round-trip time and dividing it by two, the sending router can
get a reasonable estimate of the delay.
Construct a packet telling all it has just
learned.
• Once the information needed for the exchange has been collected, the next step
is for each router to build a packet containing all the data.
• The packet starts with the identity of the sender, followed by a sequence number
and age (to be described later) and a list of neighbors.
• The cost to each neighbor is also given
• Building the link state packets is easy.
• The hard part is determining when to build them.
• One possibility is to build them periodically, that is, at regular intervals.
• Another possibility is to build them when some significant event occurs, such as a
line or neighbor going down or coming back up again or changing its properties
appreciably.
Construct a packet telling all it has just
learned.
• First, if the sequence numbers wrap around, confusion will reign. (Using the
sequence numbers again and again once all of them got used up, in order to
maintain the continuity of data transfer ” is called Wrap around the concept)
• The solution here is to use a 32-bit sequence number. With one link state packet
per second, it would take 137 years to wrap around, so this possibility can be
ignored.
• Second, if a router ever crashes, it will lose track of its sequence number.
• The solution to all these problems is to include the age of each packet after the
sequence number and decrement it once per second.
• When the age hits zero,the information from that router is discarded.
Computing the New Routes
• Once a router has accumulated a full set of link state packets, it can construct the
entire network graph because every link is represented.
• Every link is, in fact, represented twice, once for each direction.
• Now Dijkstra’s algorithm can be run locally to construct the shortest paths to all
possible destinations.
• The results of this algorithm tell the router which link to use to reach each
destination.
• This information is installed in the routing tables, and normal operation is
resumed.
multicast routing
• Some applications require that widely-separated processes work together in
groups, for example, a group of processes implementing a distributed database
system.
• If the group is small, it can just send each other member a point-to point
message.
• All multicasting schemes require some way to create and destroy groups and to identify which
routers are members of a group.
• Each group is identified by a multicast address and that routers know the groups to which they
belong.
multicast routing
• Multicasting requires group management. Some way is needed to create and
destroy groups, and to allow processes to join and leave groups.
• It is important that routers know which of their hosts belong to which groups.
• Either hosts must inform their routers about changes in group membership, or
routers must query their hosts periodically.
• Either way, routers learn about which of their hosts are in which groups.
• Routers tell their neighbors, so the information propagates through the subnet.
multicast routing
• To do multicast routing, each router computes a spanning tree covering all other routers.
• Some routers are attached to hosts that belong to one or both of these groups, as indicated in the figure.
• When a process sends a multicast packet to a group, the first router examines its spanning tree and prunes it,
removing all lines that do not lead to hosts that are members of the group.
• In our example, Fig.(c) shows the pruned spanning tree for group 1.
• Similarly, Fig. (d) shows the pruned spanning tree for group 2.
• Multicast packets are forwarded only along the appropriate spanning tree.
(a) A network. (b) A spanning tree for the
leftmost router
18
(c) A multicast tree for group 1. (d) A multicast tree for group
2.
19
Applications
• Multimedia
• Teleconferencing
• Database
• Distributed computations
• Real time workshop
• File ,graphics and messages are exchanged among active group members in
real time
20