Home Work-3: CAP306: Computer Networks
Home Work-3: CAP306: Computer Networks
Home Work-3: CAP306: Computer Networks
Student’s Signature
surendra
Evaluator’s comments:
_____________________________________________________________________
PART A
Que1: A sender needs to send the four data items Ox3456, OxABCC,
Ox02BC, and OxEEEE.
1010101011001100
01010111100
1 1 10 1 1 1 0 1 1 1 0 1 1 1 0
1 10 0 0 1 0 0 1 0 1 0 0 1 0 0
at receiver:
if there is no error then it means all bits are 0’s
1 1100101110
1010101011001100
01010111100
1 1 10 1 1 1 0 1 1 1 0 1 1 1 0
checksum = 0 0 1 1 1 0 1 1 0 1 0 1 1 0 1 1
1111 111111111111
ANSWER:
byte-stuffing bit-stuffing
1. Also referred to as character stuffing. ASCII 1. Each frame begins and ends with a
characters are used as framing delimiters special bit pattern called a flag byte
[01111110].
(e.g. DLE STX and DLE ETX)
2. Whenever sender data link layer
2. The problem occurs when these character encounters five consecutive ones in the
patterns occur within the “transparent” data. data stream, it automatically stuffs a 0
Solution: sender stuffs an extra DLE into the bit into the outgoing stream.
data stream just before each occurrence of
an“accidental” DLE in the data stream.
3. When the receiver sees five consecutive
3, The data link layer on the receiving end incoming ones followed by a 0 bit, it
automatically dyestuffs the 0 bit before
unstuffs the DLE before giving the data to the
sending the data to the network layer.
network layer.
The ddcmp frame is simpler than of bsc. Each ddcmp frame is assigned a unique number, and
crc-16 protocol is used for error detection. The ARQ technique is used for error recovery (i.e.
error correction ).
Que3 :Draw the sender and receiver windows for a system using go-back –n
ARQ given the following:-
ANSWER:
distance=speed x time=>time=speed/distance
Answer :
(The message in this case has been broken into three parts labeled 1-3)
Before the data transfer begins, the source and destination identify a suitable path for the virtual
circuit. All intermediate nodes between the two points put an entry of the routing in their routing
table for the call. Additional parameters, such as the maximum packet size, are also exchanged
between the source and the destination during call setup. The virtual circuit is cleared after the
data transfer is completed.
Packets are delivered in order, since they all take the same route;
The overhead in the packets is smaller, since there is no need for each packet to contain the full
address;
network resources are allocated at call setup so that even during times of congestion, provided
that a call has been setup, the subsequent packets should get through;
Billing is easier, since billing records need only be generated per call and not per packet.
2. How long does a stations, have to wait in the worst case before it can start
transmitting its frame over a LAN that uses
ii) Mok and Ward’s Protocol with permuting Virtual station Numbers?
ANSWER:
(1)
The worst case would be when a station wants to transmit (just after its bit slot is
passed), and all of the other stations are transmitting. Then, on the next pass all the
stations are transmitting again, and station, s, is the very last station on the map. So first it
has to wait for (N-1) frame slot, then entire N bit-slot (contention period), and another
(2)
As an example of the worst case scenario with the Mok and Ward protocol, consider 8
(7,6,5,4,3,2,1,0). The worst case will occur when every station wants to transmit a frame.
The protocol will allow every station in front of S to transmit, shifting S towards the front
of the line one step at a time. So S will be forced to wait through N contention
countdowns, each of which takes é Nù 2 log bits to complete. After each countdown, one
countdowns and N-1 frame transmissions of length d bits as each other station goes ahead
The ALOHA protocol is an OSI layer 2 protocol for LAN networks with broadcast topology.
Pure Aloha had a maximum throughput of about 18.4%. This means that about 81.6% of the
total available bandwidth was essentially wasted due to losses from packet collisions. The basic
throughput calculation involves the assumption that the aggregate arrival process follows a
Poisson distribution with an average number of arrivals of 2G arrivals per 2X seconds.
Therefore, the lambda parameter in the Poisson distribution becomes 2G. The mentioned peak is
reached for G = 0.5 resulting in a maximum throughput of 0.184, i.e. 18.4%.
With Slotted Aloha, a centralized clock sent out small clock tick packets to the outlying stations.
Outlying stations were only allowed to send their packets immediately after receiving a clock
tick. If there is only one station with a packet to send, this guarantees that there will never be a
collision for that packet. On the other hand if there are two stations with packets to send, this
algorithm guarantees that there will be a collision, and the whole of the slot period up to the next
clock tick is wasted. With some mathematics, it is possible to demonstrate that this protocol does
improve the overall channel utilization, by reducing the probability of collisions by a half.
An improvement to the original Aloha protocol was Slotted Aloha, which introduced discrete
timeslots and increased the maximum throughput to 36.8%. A station can send only at the
beginning of a timeslot, and thus collisions are reduced. In this case, the average number of
aggregate arrivals is G arrivals per 2X seconds. This leverages the lambda parameter to be G.
The maximum throughput is reached for G = 1. Slotted Aloha is used on low bandwidth
tactical Satellite communications networks by the US Military, subscriber based Satellite
communications networks, and contactless RFID technologies.
So it should be noted that Aloha's characteristics are still not much different from those
experienced today by Wi-Fi, and similar contention-based systems that have no carrier sense
capability. There is a certain amount of inherent inefficiency in these systems. For instance
802.11b sees about a 2-4 Mbit/s real throughput with a few stations talking, versus its theoretical
maximum of 11 Mbit/s. It is typical to see these types of networks' throughput break down
significantly as the number of users and message burstiness increase.
ANSWER:
When the frames sending speed is greater at end of sender compare to the receiving of frames at
the end of receiver. Then the request of the sender to send the frames to receiver is going to the
waiting state. And the frames are stored in the transmission media i.e. buffer of the receiver end.
4. What conditions would have to hold for a corrupted frame to circulate
forever on a token ring without a monitor? How does the monitor fix
the problem?