0% found this document useful (0 votes)
43 views20 pages

4.link State & Multicasting

Link state routing involves each router learning about its neighboring routers and the connectivity between them. It then constructs link state packets containing this information and floods them to all other routers. Each router uses Dijkstra's algorithm to compute the shortest path to every other router based on the collected link state information. This allows all routers to independently construct an identical view of the network topology. Multicast routing extends this to allow efficient delivery of data to well-defined groups of recipients by constructing multicast distribution trees.

Uploaded by

Divya K.S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views20 pages

4.link State & Multicasting

Link state routing involves each router learning about its neighboring routers and the connectivity between them. It then constructs link state packets containing this information and floods them to all other routers. Each router uses Dijkstra's algorithm to compute the shortest path to every other router based on the collected link state information. This allows all routers to independently construct an identical view of the network topology. Multicast routing extends this to allow efficient delivery of data to well-defined groups of recipients by constructing multicast distribution trees.

Uploaded by

Divya K.S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Link State Routing

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.

• Two primary problems with distance vector routing is that


1. It did not take line bandwidth into account when choosing routes.

2. Count-to-infinity problem
Link State Routing-steps
• Each router must do the following:
• 1. Discover its neighbors and learn their network addresses.

• 2. Measure the delay or cost to each of its neighbors.

• 3. Construct a packet telling all it has just learned.

• 4. Send this packet to all other routers.

• 5. Compute the shortest path to every other router.


• The complete topology and all delays are experimentally measured and
distributed to every router.
• Then Dijkstra's algorithm can be run to find the shortest path to every other
router.
Discover its neighbors and learn their
network addresses
• When a router is booted, its first task is to learn who its neighbors are.

• It accomplishes this goal by sending a special HELLO packet on each point-to-


point line.
• The router on the other end is expected to send back a reply giving its name.
• These names must be globally unique because when a distant router later hears
that three routers are all connected to F, it is essential that it can determine
whether all three mean the same F.
Measure the delay or cost to each of its neighbors.

• 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.

(a) A network. (b) The link state packets for this


network.
Send this packet to all other routers
The next step is distributing the link state packets
• The fundamental idea is to use flooding to distribute the link state packets to
all routers.
• To keep the flood in check, each packet contains a sequence number that is
incremented for each new packet sent.
• Routers keep track of all the (source router, sequence) pairs they see.
• When a new link state packet comes in, it is checked against the list of packets
already seen.
• If it is new, it is forwarded on all lines except the one it arrived on.
• If it is a duplicate, it is discarded.
• If a packet with a sequence number lower than the highest one seen so far ever
arrives, it is rejected as being obsolete as the router has more recent data
Problems with this algorithm
• This algorithm has a few problems, but they are manageable.

• 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.

• If it starts again at 0, the next packet it sends will be rejected as a duplicate.


Problems with this algorithm

• Third, if a sequence number is ever corrupted and 65,540 is received instead of 4


(a 1-bit error), packets 5 through 65,540 will be rejected , since the current
sequence number will be thought to be 65,540.

• 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.

• In these situations, it is frequently necessary for one process to send a message


to all the other members of the group.

• If the group is small, it can just send each other member a point-to point
message.

• If the group is large, this strategy is expensive.


multicast routing
• Sometimes broadcasting can be used, but using broadcasting to
inform 1000 machines on a million-node network is inefficient
because most receivers are not interested in the message (or worse
yet, they are definitely interested but are not supposed to see it).

• Thus, we need a way to send messages to well-defined groups


multicast routing
• Sending messages to well-defined groups is called multicasting, and the routing algorithm used
is called multicast routing.

• 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.

• when a process joins a group, it informs its host of this fact.

• 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.

• For example, in Fig.(a) we have two groups, 1 and 2.

• Some routers are attached to hosts that belong to one or both of these groups, as indicated in the figure.

• A spanning tree for the leftmost router is shown in Fig. (b).

• 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

You might also like