0% found this document useful (0 votes)
47 views

CNModel2 Answer Key

Link state routing is an interior gateway protocol that uses flooding to distribute link state advertisements throughout an autonomous system. Each router uses the Dijkstra algorithm on the collected link states to independently calculate the shortest path to all other routers in the network and build identical routing tables. When a link changes cost or goes down, affected routers flood updated advertisements to trigger routing table recalculations across the autonomous system.

Uploaded by

Anitha M
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

CNModel2 Answer Key

Link state routing is an interior gateway protocol that uses flooding to distribute link state advertisements throughout an autonomous system. Each router uses the Dijkstra algorithm on the collected link states to independently calculate the shortest path to all other routers in the network and build identical routing tables. When a link changes cost or goes down, affected routers flood updated advertisements to trigger routing table recalculations across the autonomous system.

Uploaded by

Anitha M
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 27

14(a) (i) Explain link state algorithm in detail.

Link state routing is an interior protocol that updates the routers inside the autonomous system i.e it is an
intradomain protocol. The link-state routing was introduced to overcome the shortcomings of the distance
vector routing protocol.

The reason behind the replacement of distance vector routing protocol was it would take too long to
propagate the information about the change in the cost of the link, or if the link becomes unavailable.

Content: Link State Routing

1. Working of Link State Routing

2. Building Routing Table

Working of Link State Routing

Whenever a new router is initialized inside the domain of an autonomous system the first thing it
determines is the cost of the links on each of its interfaces. Once it determines the cost for the link at each
of its interfaces the router advertises this information to all the routers present in the domain and it keeps
monitoring the cost of the links onwards.

If the router observes any change in the cost of the link at any of its interfaces, then the router again
advertises this change to all the routers in the domain. Now in this protocol, each router has information
about the set of link costs of all the routers in the domain, so each router develops the topology of the
entire domain. Each router having the topology of the domain can now calculate the shortest path and
build a routing table using the Dijkstra algorithm.

The link-state routing protocol can not be used as an exterior routing protocol or inter-domain routing
protocol. The reason behind not using the link-state routing as interdomain routing protocol is discussed
below:

 In a large network like the Internet, different autonomous systems may use different link metrics.
As the metrics vary from one network to another this prevents the link-state routing to be used as
a consistent routing protocol.

 Link state routing involves the flooding of link-state information to all the routers in the domain.
If we use it as an interdomain routing protocol, the flooding across multiple autonomous systems
may be unmanageable.

The working of link-state routing can be stated in four simple steps.

1. When a router is initiated, it identifies its neighbors and their network address.

2. It set the cost metric of the link at each of its interfaces connecting it to its neighbor.

3. Advertise link-state packet (LSP) containing its link-state information to all other routers in the
domain. Also, receive information from other routers.
4. Calculate the shortest path to every other router in the domain and prepare a routing table.

Discussing the working of link-state routing in brief let’s discuss the building of routing table at each
router in the domain in brief.

Building Routing Tables

While building of routing table the routers have to ensure that they are showing the shortest path to every
other router in the domain. Building a routing table involves the following steps.

1. A router has to create a link-state packet (LSP) which contains a set of link costs at each interface
of the router.

2. Distribute this LSP to all other routers in the domain, not just the neighboring ones.

3. Formation of shortest-path tree for each router.

4. Formation of routing table with the shortest path to other routers in the domain.

Let us discuss each step in more detail.

1. Formation of Link State Packet (LSP)

The link-state packet has information about the router in detail. It has information about the router’s
identity, list of links, sequence number, and age. The information about the router’s identity and list of
links from the router help another router in the AS to understand and make a topology of the entire
domain.

The sequence number of the LSP helps the receiving routers to compare between the old LSP and new
LSP and it also facilitates the flooding feature of link-state routing. The age of LSP helps routers in the
domain to decide the time at which the LSP must be discarded.

The LSP is created by routers in the domain at two events first when the topology of the domain gets
changed and second at a regular interval.

1. Whenever there is a little change in the topology of the domain the LSPs are disseminated
informing all the routers in the domain updating them about the change.

2. Dissemination of the LSPs at a periodic interval ensures that any router in the domain does not
contain the old information. The timer set for the periodic dissemination of the LSP is around 60
min to 2 hours. The long interval prevents the flooding features from creating too much traffic in
the domain.

2. Flooding of LSPs

The created LSPs are disseminated to all other routers present in the domain, not just the neighboring
routers. This transmission of LSPs to all the routers in the domain is referred to as flooding.

In the first step, the created LSP is sent on the link at each interface of the router.
The routers receiving the LSPs first compare it with the LSP it has received earlier. If the new LSP is
older than the previous LSP the newly received LSP is discarded else the router performs the following
steps to ensure flooding.

1. First, the router discards the old LSP.

2. Secondly, the router disseminates a copy of LSP through all its interface other than the one
through which it has received the LSP.

3. Creation of Shortest Path Tree

As each router in the domain has information about each other router in the domain so, each router creates
the topology of the entire domain. To determine the shortest path to every other router in the domain, the
shortest-path tree must be created for every router.

The shortest-path tree is a graph that has one root node (the router for which the shortest path tree is
created) and several other nodes (rest of the routers in the domain) called leaf nodes. The shortest-path
tree expresses a single and the shortest path to every other node in the tree.

The shortest-path tree is created for each router in the domain where the router for which the tree is
created is considered as a root node for that tree. To determine the shortest path for each router, the
Dijkstra algorithm is used which employs the following steps.

Initialization: Select the root node. Set the shortest distance from the root node to every other node as the
cost between the root node and that corresponding node. The shortest distance between root node to root
node is 0.

Iteration: This step is repeated until all the routers are added to the root node. This step has two sub-steps

 Add the next node: Search the next node that is not in the path of the root node and select node
with minimum cost. Add the selected node to the path.

 Update: Now update the shortest distance for the rest of the nodes in the domain using the
shortest distance of the node that we have just added to the path of step 2.

Dj = minimum (Dj, Di + cij) for all remaining nodes

Let us take an example, in the figure below, there is a topology of an AS.


We will discuss how the shortest path tree for node A. First, we will initialize node A and set the shortest
distance to its immediate neighbors.

Among the two immediate neighbors of node A, we will add a node to the path that has the shortest
distance i.e. node B with shortest distance 2.

Now search for the nodes that are not added to the path yet (C, D, E) and select the one with the shortest
distance i.e. node D.
Now, nodes B and D that we added to the path were directly connected to root node A and were at the
shortest distance as compared to any other path. Further, we have node E and node C which can be
reached by node A through node B or through node D. Let us check out which path is shortest.

Dj = minimum (Dj, Di + cij)

DE = minimum ((2+4) B, (3+5) D)

DE = minimum ((6) B, (8) D)

DE =6

Here we will choose the path for node E through node B. Similarly, we will calculate the shortest distance
for node C.

DC = minimum (Dj, Di + cij)

DC = minimum ((2+5) B, (3+5+2+4) D)

DC = minimum ((7) B, (14) D)

DC =7

Now, node E has the shortest distance so we will add node E to the path.
After adding node E to the path again explore the nodes that are not added to the path and there enlist
their cost as the distance. Again select the node with the shortest distance so we will add node C to the
path.

Now we are left with node


F and node G we will calculate the shortest distance for node F and G as we calculate for node E and C.
Now, among F and G the node with the shortest distance is node F so, we will update and add node F to
the path. Also, the root
node A can reach node G through node F with the shortest distance i.e.9. So finally we add node G.

4. Creating Routing Table

Using the shortest path tree each router creates a routing table which has three column destination, cost,
and next router. In the figure below, I have given a routing table for router A. Similarly the routing table
is created for all the routers in the domain.

So, this how the link-state routing protocol is used to route the packet in the autonomous system. The
OSPF (open shortest path first) protocol is based on the link-state routing protocol.
14(a)(ii) Consider the network shown in the following figure .Compute the shortest path from C to all
other nodes using link state algorithm. Also update the forwarding table of node C.

Network Layer: Link State Routing

In link state routing, if each node in the domain has the entire topology of the domainthe list of nodes and
links, how they are connected including the type, cost (metric), and condition of the links (up or down)-
the node can use Dijkstra's algorithm to build a routing table.

 The figure shows a simple domain with five nodes. Each node uses the same topology to create a
routing table, but the routing table for each node is unique because the calculations are based on
different interpretations of the topology. This is analogous to a city map. While each person
may have the same map, each needs to take a different route to reach her specific
destination.

 The topology must be dynamic, representing the latest state of each node and each link. If there
are changes in any point in the network (a link is down, for example), the topology must be
updated for each node.

 Link state routing is based on the assumption that, although the global knowledge about the
topology is not clear, each node has partial knowledge: it knows the state (type, condition, and
cost) of its links. In other words, the whole topology can be compiled from the partial
knowledge of each node.
 Node A knows that it is connected to node B with metric 5, to node C with metric 2, and to node
D with metric 3. Node C knows that it is connected to node A with metric 2, to node B with
metric 4, and to node E with metric 4. Node D knows that it is connected only to node A with
metric 3. And so on. Although there is an overlap in the knowledge, the overlap guarantees
the creation of a common topology-a picture of the whole domain for each node.

 Building Routing Tables : In link state routing, four sets of actions are required to ensure that
each node has the routing table showing the least-cost node to every other node.

1. Creation of the states of the links by each node, called the link state packet (LSP).

2. Dissemination of LSPs to every other router, called flooding, in an efficient and reliable
way

3. Formation of a shortest path tree for each node.

4. Calculation of a routing table based on the shortest path tree.

Q. Creation of Link State Packet (LSP)

 A link state packet can carry a large amount of information : the node identity, the list of links,
a sequence number, and age.
 The first two, node identity and the list of links, are needed to make the topology. The third,
sequence number, facilitates flooding and distinguishes new LSPs from old ones. The fourth, age,
prevents old LSPs from remaining in the domain for a long time. LSPs are generated on two
occasions :

1. When there is a change in the topology of the domain : Triggering of LSP


dissemination is the main way of quickly informing any node in the domain to update its
topology.

2. On a periodic basis : The timer set for periodic dissemination is normally in the range
of 60 min or 2 h based on the implementation. A longer period ensures that flooding
does not create too much traffic on the network.

 Flooding of LSPs : After a node has prepared an LSP, it must be disseminated to all other nodes,
not only to its neighbors. The process is called flooding and based on the following:

The creating node sends a copy of the LSP out of each interface.

A node that receives an LSP compares it with the copy it may already have. If the newly arrived LSP is
older than the one it has (found by checking the sequence number), it discards the LSP. If it is
newer, the node does the following:

1. It discards the old LSP and keeps the new one.

2. It sends a copy of it out of each interface except the one from which the packet
arrived. This guarantees that flooding stops somewhere in the domain (where a
node has only one interface).

 Formation of Shortest Path Tree: Dijkstra Algorithm


After receiving all LSPs, each node will have a copy of the whole topology. However, the
topology is not sufficient to find the shortest path to every other node; a shortest path tree is
needed.

 A tree is a graph of nodes and links; one node is called the root. All other nodes can be
reached from the root through only one single route. A shortest path tree is a tree in which the
path between the root and every other node is the shortest.

 The <="" b="" style="box-sizing: border-box;">. The algorithm divides the nodes into two
sets: tentative and permanent. It finds the neighbors of a current node, makes them tentative,
examines them, and if they pass the criteria, makes them permanent.

 The following shows the steps. At the end of each step, we show the permanent (filled circles)
and the tentative (open circles) nodes and lists with the cumulative costs.

1. We make node A the root of the tree and move it to the tentative list. Our two lists
are Permanent list: empty ; Tentative list: A(0)
2. Node A has the shortest cumulative cost from all nodes in the tentative list. We move A to the
permanent list and add all neighbors of A to the tentative list. Our new lists are Permanent list:
A(0); Tentative list: B(5), C(2), D(3)

3. Node C has the shortest cumulative cost from all nodes in the tentative list. We move C to the
permanent list. Node C has three neighbors, but node A is already processed, which makes the
unprocessed neighbors just B and E. However, B is already in the tentative list with a cumulative
cost of 5. Node A could also reach node B through C with a cumulative cost of 6. Since 5 is less
than 6, we keep node B with a cumulative cost of 5 in the tentative list and do not replace it. Our
new lists are Permanent list: A(O), e(2); Tentative list: B(5), 0(3), E(6)

4. Node D has the shortest cumulative cost of all the nodes in the tentative list. We move D to the
permanent list. Node D has no unprocessed neighbor to be added to the tentative list. Our new
lists are Permanent list: A(O), C(2), 0(3); Tentative list: B(5), E(6)

5. Node B has the shortest cumulative cost of all the nodes in the tentative list. We move B to the
permanent list. We need to add all unprocessed neighbors of B to the tentative list (this is just
node E). However, E(6) is already in the list with a smaller cumulative cost. The cumulative cost
to node E, as the neighbor of B, is 8. We keep node E(6) in the tentative list. Our new lists
are Permanent list: A(0), B(5), C(2), 0(3); Tentative list: E(6)

6. Node E has the shortest cumulative cost from all nodes in the tentative list. We move E to the
permanent list. Node E has no neighbor. Now the tentative list is empty. We stop; our shortest
path tree is ready. The final lists are Permanent list: A(0), B(5), C(2), D(3), E(6); Tentative list:
empty

Routing table for node A


Open Shortest Path First or OSPF protocol

 The Open Shortest Path First or OSPF protocol is an intradomain routing protocol based on link
state routing. Its domain is also an autonomous system

 To handle routing efficiently and in a timely manner, OSPF divides an autonomous system into
areas. An area is a collection of networks, hosts, and routers all contained within an autonomous
system. An autonomous system can be divided into many different areas. All networks inside an
area must be connected.

 Routers inside an area flood the area with routing information. At the border of an area, special
routers called area border routers summarize the information about the area and send it to other
areas. Among the areas inside an autonomous system is a special area called the backbone; all
the areas inside an autonomous system must be connected to the backbone.

 In other words, the backbone serves as a primary area and the other areas as secondary
areas. This does not mean that the routers within areas cannot be connected to each other,
however. The routers inside the backbone are called the backbone routers. Note that a
backbone router can also be an area border router.

 f, because of some problem, the connectivity between a backbone and an area is broken, a virtual
link between routers must be created by an administrator to allow continuity of the functions of
the backbone as the primary area. Each area has an area identification. The area
identification of the backbone is zero

14(b)(i). Outline the need of Distance Vector Multicast Routing Protocol(DVMRP)

The distance vector multicast routing protocol is multicast routing protocol that takes the routing decision
based upon the source address of the packet.

• This algorithm constructs the routing tree for a network.

• Whenever a router receives a packet, it forwards it to some of its ports based on the source address of
packet.

The rest of the routing tree is made by downstream routers.

• In this way, routing tree is created from destination to source.

• The protocol must achieve the following tasks:

1. It must prevent the formation of loops in the network.

It must prevent the formation of duplicate packets.

3. It must ensure that the path traveled by a packet is the shortest from its source to the router.

4. It should provide dynamic membership.

To accomplish this, the DVMR algorithm uses a process based on following decision making strategies:
. Reverse Path Forwarding (RPF)

• In this strategy, the router only forwards those packets that have traveled the shortest path from source
to destination.
• To achieve this, the router pretends that it has a packet to send to the source from where the packet has
arrived.
• In this way, the shortest path to the sender of the packet is computed.
• If the same route is followed by the received packet, it is forwarded to the next router and it is
discarded otherwise.
• The reverse path forwarding ensures that the network receives a copy of the packet without formation
of loops. A loop occurs when a packet that has left the router may come back again from another
interface or the same interface and be forwarded again.
• RPF does not guarantee that there would be no duplicate packets in the network i.e. the network may
receive two or more copies.
• The reason for this is that the routing is based on the source address and not on the destination address.
2. Reverse Path Broadcasting (RPB)

• In order to solve the problem, RPB is used.


• In this method, one parent router is defined for each network.
• The network could accept the multicast packets from this parent router only.
• This router sends packets to those ports for which it is designated as parent.
• Thus, RPB principle’ allows a router to broadcast the packet in the network.
This creates duplicate packets on the network and reduces the network efficiency.
3. Reverse Path Multicasting (RPM)

• To overcome the problem of broadcasting in RPB, Reverse Path Multicasting in used.


• In this the desired multicast network tree is created by using two different methods: Pruning and
grafting.
• A router can send a prune message to its upstream router whenever it finds that its network is not
interested in a multicast packet. In this way a router prunes (cuts) its network from multicasting.
• If a router receives prune message from all the downstream routers, it in turn, sends a prune message to
its upstream router.
• A router can also send a graft message to its upstream router if it finds that its network is again
interested in receiving the multicast packet. In this way, graft message forces the upstream router to
resume sending the multicast message. The network is again grafted (joined).
4. Multicast Open Shortest Path First (MOSPF)

• Multicast open shortest path first is the multicast version of open shortest path first protocol.
• It is an extension of OSPF that uses multicast link state routing method to create source based trees.
• The method used by MOSPF is different from DVMRP.
• The first difference is· that in this method, the tree is least cost tree instead of shortest path tree.
• The second .difference is that the tree is not made gradually. It is made immediately it is prepruned and
ready to use.

The Distance Vector Multicast Routing Protocol (DVMRP) is the extension of the Routing Information
Protocol (RIP) which is used in unicast routing. It uses the sourcebased tree approach to multicasting. It is
important to mentionin that each router in this protocol that receives a multicast packet to be forwarded
implicitly creates a source-based multicast tree in three steps:

1. The router uses an algorithm called reverse path forwarding (RPF) to simulate creating part of the
optimal source-based tree between the source and itself.
2. The router uses an algorithm called reverse path broadcasting (RPB) to create a broadcast
(spanning) tree whose root is the router itself and whose leaves are all networks in the internet.
3. The router uses an algorithm called reverse path multicasting (RPM) to create a multicast tree by
cutting some branches of the tree that end in networks with no member in the group.

Reverse Path Forwarding (RPF)

The first algorithm, reverse path forwarding (RPF), forces the router to forward a multicast packet from
one specific interface: the one which has come through the shortest path from the source to the router.

How can a router know which interface is in this path if the router does not have a shortest-path tree
rooted at the source? The router uses the first property of the shortest-path tree, which says that the
shortest path from A to B is also the shortest path from B to A. The router does not know the shortest path
from the source to itself, but it can find which is the next router in the shortest path from itself to the
source (reverse path).

The router simply consults its unicast forwarding table, pretending that it wants to send a packet to the
source; the forwarding table gives the next router and the interface the message that the packet should be
sent out in this reverse direction.

The router uses this information to accept a multicast packet only if it arrives from this interface. In
multicasting, a packet may arrive at the same router that has forwarded it. If the router does not drop all
arrived packets except the one, multiple copies of the packet will be circulating in the internet.

Reverse Path Broadcasting (RPB)

The RPF algorithm helps a router to forward only one copy received from a source and drop the rest.

However, when we think about broadcasting in the second step, we need to remember that destinations
are all the networks (LANs) in the internet.

To be efficient, we need to prevent each network from receiving more than one copy of the packet. If a
network is connected to more than one router, it may receive a copy of the packet from each router.
RPF cannot help here, because a network does not have the intelligence to apply the RPF algorithm; we
need to allow only one of the routers attached to a network to pass the packet to the network.

One way to do so is to designate only one router as the parent of a network related to a specific source.
When a router that is not the parent of the attached network receives a multicast packet, it simply drops
the packet.

There are several ways that the parent of the network related to a network can be selected; one way is to
select the router that has the shortest path to the source. If there is a tie in this case, the router with the
smaller IP address can be selected.

Reverse Path Multicasting (RPM)

RPB does not multicast the packet, it broadcasts it. This is not efficient. To increase efficiency, the
multicast packet must reach only those networks that have active members for that particular group. This
is called reverse path multicasting (RPM).

To change the broadcast shortest-path tree to a multicast shortest-path tree, each router needs to prune
(make inactive) the interfaces that do not reach a network with active members corresponding to a
particular source-group combination.

This step can be done bottom-up, from the leaves to the root. At the leaf level, the routers connected to
the network collect the membership information using the IGMP protocol. The parent router of the
network can then disseminate this information upward using the reverse shortest-path tree from the router
to the source.

When a router receives all of these membership-related messages, it knows which interfaces need to be
pruned.Since these packets are disseminated periodically, if a new member is added to some networks, all
routers are informed and can change the status of their interfaces accordingly. Joining and leaving is
continuously applied.

Distance-vector routing,for unicast, can be extended to support multicast. The resulting protocol is
called Distance Vector Multicast Routing Protocol, or DVMRP. DVMRP was the first multicast routing
protocol to see widespread use.

Recall that, in the distance-vector algorithm, each router maintains a table of _Destination, Cost,
NextHop_ tuples, and exchanges a list of _Destination, Cost_ pairs with its directly connected neighbors.

Extending this algorithm to support multicast is a two-stage process. First, we create a broadcast
mechanism that allows a packet to be forwarded to all the networks on the internet. Second, we need to
refine this mechanism so that it prunes back networks that do not have hosts that belong to the multicast
group.
Consequently, DVMRP is one of several multicast routing protocols described as flood-and-
prune protocols.

Given a unicast routing table, each router knows that the current shortest path to a given destination goes
through NextHop. Thus, whenever it receives a multicast packet from source S, the router forwards the
packet on all outgoing links (except the one on which the packet arrived) if and only if the packet arrived
over the link that is on the shortest path to S (i.e., the packet came from the NextHop associated with S in
the routing table). This strategy effectively floods packets outward from S, but does not loop packets back
toward S.

There are two major shortcomings to this approach. The first is that it truly floods the network; it has no
provision for avoiding LANs that have no members in the multicast group. We address this problem
below. The second limitation is that a given packet will be forwarded over a LAN by each of the routers
connected to that LAN. This is due to the forwarding strategy of flooding packets on all links other than
the one on which the packet arrived, without regard to whether or not those links are part of the shortest-
path tree rooted at the source.

The solution to this second limitation is to eliminate the duplicate broadcast packets that are

generated when more than one router is connected to a given LAN. One way to do this is to designate one
router as the “parent” router for each link, relative to the source, where only the

parent router is allowed to forward multicast packets from that source over the LAN. The router that has
the shortest path to source S is selected as the parent; a tie between two routers would be broken
according to which router has the smallest address. A given router can learn if it is the parent for the LAN
(again relative to each possible source) based upon the distance-vector

messages it exchanges with its neighbors.

The second stage is to propagate this “no members of G here” information up the shortest-path tree. This
is done by having the router augment the _ Destination, Cost _ pairs it sends to its neighbors with the set
of groups for which the leaf network is interested in receiving multicast packets. This information can
then be propagated from router to router, so that for each of its links, a given router knows for what
groups it should forward multicast packets.

Note that including all of this information in the routing update is a fairly expensive thing to do. In
practice, therefore, this information is exchanged only when some source starts sending packets to that
group. In other words, the strategy is to use RPB, which adds a small amount of overhead to the basic
distance-vector algorithm, until a particular multicast address becomes active. At that time, routers that
are not interested in receiving packets addressed to that group speak up, and that information is
propagated to the other routers.

15(a)(i) Suppose we want to transmit the message, 1011 0010 0111 and protect it from errors using
the CRC Polnomial x4+x2+1. Use Poynomial long division to determine the message that should be
transmitted. Suppose the leftmost lift of the message is inverted due to noise on the transmission
link.What is the result of the receiver know that an error has occurred?

(a) We take the message 1011 0010 0100 1011 , append 8 zeros
and divide by 1 0000 0111 (x8 + x2+ x1+ 1). The remainder is 1001 0011 . We transmit the original
message
with this remainder appended, resulting in
1011 0010 0100 1011 1001 0011 .
(b) Inverting the first bit gives 0011 0010 0100 1011 1001 0011 .
Dividing by 1 0000 0111 (x8 + x2+ x1 + 1) gives a a
remainder of 1011 0110.

15(b)(ii). Discuss the approach used for Error Detection in Networking.

Error is a condition when the receiver’s information does not match the sender’s information.
During transmission, digital signals suffer from noise that can introduce errors in the binary bits
traveling from sender to receiver. That means a 0 bit may change to 1 or a 1 bit may change to 0.

Data (Implemented either at the Data link layer or Transport Layer of the OSI Model) may get
scrambled by noise or get corrupted whenever a message is transmitted. To prevent such errors,
error-detection codes are added as extra data to digital messages. This helps in detecting any errors
that may have occurred during message transmission.

Types of Errors

Single-Bit Error

A single-bit error refers to a type of data transmission error that occurs when one bit (i.e., a single
binary digit) of a transmitted data unit is altered during transmission, resulting in an incorrect or
corrupted data unit.
Single-Bit Error

Multiple-Bit Error

A multiple-bit error is an error type that arises when more than one bit in a data transmission is
affected. Although multiple-bit errors are relatively rare when compared to single-bit errors, they
can still occur, particularly in high-noise or high-interference digital environments.

Multiple-Bit Error

Burst Error

When several consecutive bits are flipped mistakenly in digital transmission, it creates a burst
error. This error causes a sequence of consecutive incorrect values.

Burst Error
To detect errors, a common technique is to introduce redundancy bits that provide additional
information. Various techniques for error detection include::

1. Simple Parity Check


2. Two-dimensional Parity Check
3. Checksum
4. Cyclic Redundancy Check (CRC)

Error Detection Methods

Simple Parity Check

Simple-bit parity is a simple error detection method that involves adding an extra bit to a data
transmission. It works as:

 1 is added to the block if it contains an odd number of 1’s, and


 0 is added if it contains an even number of 1’s

This scheme makes the total number of 1’s even, that is why it is called even parity checking.

Disadvantages

 Single Parity check is not able to detect even no. of bit error.
 For example, the Data to be transmitted is 101010. Codeword transmitted to the receiver is
1010101 (we have used even parity).
Let’s assume that during transmission, two of the bits of code word flipped to 1111101.
On receiving the code word, the receiver finds the no. of ones to be even and hence no
error, which is a wrong assumption.
Two-dimensional Parity Check

Two-dimensional Parity check bits are calculated for each row, which is equivalent to a simple
parity check bit. Parity check bits are also calculated for all columns, then both are sent along with
the data. At the receiving end, these are compared with the parity bits calculated on the received
data.

Checksum

Checksum error detection is a method used to identify errors in transmitted data. The process
involves dividing the data into equally sized segments and using a 1’s complement to calculate the
sum of these segments. The calculated sum is then sent along with the data to the receiver. At the
receiver’s end, the same process is repeated and if all zeroes are obtained in the sum, it means that
the data is correct.

Checksum – Operation at Sender’s Side

 Firstly, the data is divided into k segments each of m bits.


 On the sender’s end, the segments are added using 1’s complement arithmetic to get the
sum. The sum is complemented to get the checksum.
 The checksum segment is sent along with the data segments.

Checksum – Operation at Receiver’s Side


 At the receiver’s end, all received segments are added using 1’s complement arithmetic to
get the sum. The sum is complemented.
 If the result is zero, the received data is accepted; otherwise discarded.

Disadvantages

 If one or more bits of a segment are damaged and the corresponding bit or bits of opposite
value in a second segment are also damaged.

Cyclic Redundancy Check (CRC)

 Unlike the checksum scheme, which is based on addition, CRC is based on binary division.
 In CRC, a sequence of redundant bits, called cyclic redundancy check bits, are appended to
the end of the data unit so that the resulting data unit becomes exactly divisible by a second,
predetermined binary number.
 At the destination, the incoming data unit is divided by the same number. If at this step
there is no remainder, the data unit is assumed to be correct and is therefore accepted.
 A remainder indicates that the data unit has been damaged in transit and therefore must be
rejected.
Advantages:

Increased Data Reliability: Error detection ensures that the data transmitted over the network is
reliable, accurate, and free from errors. This ensures that the recipient receives the same data that
was transmitted by the sender.

Improved Network Performance: Error detection mechanisms can help to identify and isolate
network issues that are causing errors. This can help to improve the overall performance of the
network and reduce downtime.

Enhanced Data Security: Error detection can also help to ensure that the data transmitted over the
network is secure and has not been tampered with.

Disadvantages:

Overhead: Error detection requires additional resources and processing power, which can lead to
increased overhead on the network. This can result in slower network performance and increased
latency.

False Positives: Error detection mechanisms can sometimes generate false positives, which can
result in unnecessary retransmission of data. This can further increase the overhead on the
network.

Limited Error Correction: Error detection can only identify errors but cannot correct them. This
means that the recipient must rely on the sender to retransmit the data, which can lead to further
delays and increased network overhead.
Advantages:

Increased Data Reliability: Error detection ensures that the data transmitted over the network is reliable,
accurate, and free from errors. This ensures that the recipient receives the same data that was transmitted
by the sender.

Improved Network Performance: Error detection mechanisms can help to identify and isolate network
issues that are causing errors. This can help to improve the overall performance of the network and reduce
downtime.

Enhanced Data Security: Error detection can also help to ensure that the data transmitted over the network
is secure and has not been tampered with.
Disadvantages:

Overhead: Error detection requires additional resources and processing power, which can lead to
increased overhead on the network. This can result in slower network performance and increased latency.

False Positives: Error detection mechanisms can sometimes generate false positives, which can result in
unnecessary retransmission of data. This can further increase the overhead on the network.

Limited Error Correction: Error detection can only identify errors but cannot correct them. This means
that the recipient must rely on the sender to retransmit the data, which can lead to further delays and
increased network overhead.

15(b). Elaborate the working of CSMA and CSMA-CD Protocol.


CSMA/CD, which stands for Carrier Sense Multiple Access with Collision Detection, is a MAC (media
access control) protocol. It specifies how network devices should react when two devices try

What is CSMA/CD?

The network protocol for carrier transmission known as CSMA/CD (Carrier Sense Multiple Access with
Collision Detection) runs at the Medium Access Control (MAC) layer. The shared channel for
communication is detected or heard, and transmissions are postponed until the channel is clear. By
detecting transmissions from other stations, the collision detection technique finds collisions. When a
collision is detected, the station immediately ceases transmission, broadcasts a jam signal, and thereafter
waits for a random amount of time before retransmission.

Algorithms

The CSMA/CD algorithm are:

 The transmitting station determines whether the channel is busy or idle when a frame is ready.

 If the channel is occupied, the station waits till it is free.

 The station begins transmitting and continuously scans the channel for collisions if the channel is
empty.

 The station begins the collision resolution mechanism when a collision is detected.

 After finishing frame transmission, the stations reset the retransmission counters.

The collision resolution algorithm are:

 In order to make sure that all other stations notice a collision, the station keeps transmitting the
current frame for a predetermined amount of time while also sending out a jam signal.

 The station increases the retransmission counter.

 The station stops transmission if the allotted number of retransmission attempts has been used.
 In the absence of a restart main algorithm, the station waits for a backoff period, which is often a
function of the number of collisions.

Illustration

The algorithms are summarised in the flowchart below:

 This technique does not lessen the number of collisions even though it can detect them.

 Large networks shouldn’t use it because the performance suffers rapidly as more stations are
added.

Carrier Sense Multiple Access with Collision Detection (CSMA/CD) is a network protocol for carrier
transmission that operates at the MAC. It was extensively used in the early Ethernet technology or LANs.
However, CSMA/CD is no longer used because modern Ethernet networks are designed with switches
and full-duplex connections.

An analogy

The CSMA/CD technique can be compared to a group discussion in which it would be complicated to
communicate if everyone spoke at once.

Instead, for effective communication, one person must speak after the other so that everyone can
comprehend their contribution to the topic. We should wait a predetermined amount of time after a
participant has finished talking to check if any additional participants are speaking or not. Only when
everyone else has finished should one speak again. We should pause, take a break, and try again later if
another participant speaks at the exact moment as us.

Working

For a comprehensive understanding of the working of CSMA/CD, consider the following scenario:

Three nodes connected via Ethernet for the transmission of data packets
 The illustration above shows three stations A, B, and C connected via bus topology. If A wants to
transmit data to station C, first, it must sense the carrier. If it is idle, the data will be delivered to
the corresponding station.

 A station cannot sense the entire carrier; it can only detect the point of contact. The protocol
states that any station may send data at any time, but the sole prerequisite is that it must determine
if the carrier is idle or busy.

 If A and B start transmitting their data, then the data of both stations may collide. So, both the
stations will receive inaccurate collided data.

Collision detection

For collision detection, the station must continue broadcasting the data until the transmitting station
receives the collision signal.

Consider the following scenario in which the initial bits being sent by the station are colliding. Think of
the three stations as A, B, and C. Assuming a 40 mins propagation delay from station A to station C, a
data packet bit that starts to transmit at 8 am will arrive at C at 8:40 am. This is illustrated below,
followed by a step-by-step explanation of what is taking place.

Station A and C started transmitting data

1 of 3

 Both stations, A and C, identify the carrier as available at 8 am and begin transmitting.

 If the overall propagation delay is 40 minutes, the station's first bits will meet in the middle and
collide within 20 minutes.

 Precisely at 8:20 am, a collision will occur. Collision is detected by the change in amplitude of
the signal in the wire.

 Stations A and C will receive the collision signals at 8:40 am or approximately 40 minutes after
At 8:39:59 am, station A is still transmitting data to station C, which began at 8 am.

 Station C began transmitting at this point after detecting a free carrier.

 The first bit of the data packet delivered from station C will collide with the packet sent by station
A.

 The carrier will then send the collided signal to their respective senders.

 Approximately after 40 mins, station A will receive the collided signal back.
PART – C

ANSWER ALL QUESTIONS

16..(b)(ii) Two hosts are in a CSMA/CD network and the medium has a data transfer capacity of 1Gbps.
The minimum frame length is fixed to 1,000 bits and the propogation speed is 2*108m/s.
i) What will be the distance between the hosts? (4)
ii) If it is an Ehernet network,what is the efficiency when the
Hosts have a maximum distance between them? If the distance is reduced to 1 m, does it impact the
efficiency?

Frame Size S >= 2BL/P

Where,

Cable Length L = 1KM = 1000M

Propagation Speed P = 2 x 10^8 m/sec

Bandwidth = 1 Gbps = 10^9 bps

See this for details of above formula.

S >= (2 * 10^9 * 1000) / (2 x 10^8)

>= 10000 bits

You might also like