Network)
Network)
Declaration
I declare that this assignment is my individual work .I have not copied from
any other student’s work or from any other source except where due acknowledgement in
made explicitly in the text not has any part become written for me by any other person.
Evaluater’s comments____________________
Que1: A sender needs to send the four data items Ox3456, OxABCC, Ox02BC, and
OxEEEE.
data is corrupted
d. Find the checksum at the receiver site if the second data item is changed to
OxABCE and the third data item is changed to Ox02BA.
ANS:
Bit stuffing
Inserting bits in data in order to break up a bit pattern that may cause the transmission to go out
of synchronization. For example, in T1 lines, timing is maintained by detecting a change from 0
to 1. If too many zero bits are transmitted consecutively, the receiving end may lose
synchronization because too much time has passed without sensing voltage. Therefore, in long
strings of zeros, a set of bits that begins with a 1 and functions as a timing signal is "stuffed" into
the stream of zeros at certain intervals.
A protocol which guarantees the receiver of synchronous data can recover the sender's clock.
When the data stream sent contains a large number of adjacent bits which cause no transition of
the signal, the receiver cannot adjust its clock to maintain proper synchronised reception. To
eliminate the possibility of such a pathological case, when a preset number of transitionless bits
have been transmitted, a bit which does cause a transition is "stuffed" (transmitted) by the sender.
The receiver follows the same protocol and removes the stuffed bit after the specified number of
transitionless bits, but can use the stuffed bit to recover the sender's clock.
The advantage of bit stuffing is that only a bit (not a byte) is inserted in the data stream, and that
only when the content of the data stream fails to provide a timing signal to the receiver. Thus
very nearly 100% of the bits transported are useful data. In contrast, asynchronous transmission
of data "throws away" a start bit and one or more stop bits for each data byte sent.
Byte stuffing
Although using characters to mark the beginning and end of each frame has advantages, most
computer networks cannot afford to reserve characters for use by the network. Instead, the
network permits an application to transfer arbitrary data values across the network. In particular,
an application may choose to send data that contains one or more occurrences of characters like
soh and eot that are used for framing. In general, to distinguish between data being sent and
control information such as frame delimiters, network systems arrange for the sending side to
change the data slightly before it is sent, and then arrange for the receiving side to restore the
original data before passing it to the receiving application.
Thus, although applications using the network can transfer arbitrary data, the network system
never confuses data with control information. Because network systems usually insert bits or
bytes to change data for transmission, the technique is known as data stuffing. The terms
character stuffing and byte stuffing refer to data stuffing used with character oriented hardware,
and bit stuffing which is more common, refers to data stuffing used with bit oriented hardware.
To implement byte stuffing, a sender must scan an entire data block and perform the mapping
before any data is sent. Byte stuffing can solve the problem by reserving a third character to
mark occurrences of special characters in the data.
bit stuffing technique is used in bit oriented protocols
byte stuffing technique is used in byte-oriented protocols.
Que3 :Draw the sender and receiver windows for a system using go-back –n ARQ given the
following:-
Frame 0 is sent ; frame 0 is acknowledged
Frame 1 & 2 are sent; frames 1 and 2 are acknowledged
Frames 3,4, 5 are sent; NAK 4 is received
Frames 4, 5,6,7 are sent, frames 4 through 7 are acknowledged
ANS:
(a) Frame 0 is sent ; frame 0 is acknowledged
A B
frame0
ack 0
A B
frame 1
ack 1
frame 2
ack 2
(c) Frames 3,4, 5 are sent; NAK 4 is received
A B
frame 3
ack 3
frame 4
L
frame 5
ack 5
A B
frame 4
ack 4
frame 5
ack 5
frame 6
ack 6
frame 7
ack 7
Que4: Computer A uses stop-and-wait ARQ protocol to send packets to compute B . If the
distance between A and B is 4000km, how long does it take computer A to receive
acknowledgement for a packet? Use the speed of light for propagation speed and assume
time between receiving & sending acknowledgment is 0.
PART B
Q1:A message is broken up into three pieces .Discuss the transmission of packets using
switched virtual circuits
Ans:
In telecommunications and computer networks, a virtual circuit (VC), synonymous with virtual
connection and virtual channel, is a connection oriented communication service that is delivered
by means of packet mode communication. After a connection or virtual circuit is established
between two nodes or application processes, a bit stream or byte stream may be delivered
between the nodes. A virtual circuit protocol hides the division into segments, packets or frames
from higher level protocols.
Virtual circuit communication resembles circuit switching, since both are connection oriented,
meaning that in both cases data is delivered in correct order, and signalling overhead is required
during a connection establishment phase. However, circuit switching provides constant bit rate
and latency, while these may vary in a virtual circuit service because of reasons such as:
• varying packet queue lengths in the network nodes,
• varying bit rate generated by the application,
• varying load from other users sharing the same network resources by means of statistical
multiplexing, etc.
Many virtual circuit protocols, but not all, provide reliable communication service, by means of
data retransmissions because of error detection and automatic repeat request (ARQ).
Switched virtual circuits (SVCs) are generally set up on a per-call basis and are disconnected
when the call is terminated; however, a permanent virtual circuit (PVC) can be established as an
option to provide a dedicated circuit link between two facilities. PVC configuration is usually
preconfigured by the service provider. Unlike SVCs, PVC are usually very seldom
broken/disconnected.
A switched virtual circuit (SVC) is a virtual circuit that is dynamically established on demand
and is torn down when transmission is complete, for example after a phone call or a file
download. SVCs are used in situations where data transmission is sporadic and/or not always
between the same data terminal equipment (DTE) endpoints.
A permanent virtual circuit (PVC) is a virtual circuit established for repeated/continuous use
between the same DTE. In a PVC, the long-term association is identical to the data transfer phase
of a virtual call. Permanent virtual circuits eliminate the need for repeated call set-up and
clearing.
Frame relay is typically used to provide PVCs. ATM provides both switched virtual connections
and permanent virtual connections, as they are called in ATM terminology. X.25 provides both
SVCs and PVCs, although not all X.25 service providers or DTE implementations support PVCs
as their use was much less common than SVCs.
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
(N-1) frame slot, so total waiting time is N+2(N-1)d bit slots.
As an example of the worst case scenario with the Mok and Ward protocol, consider 8
stations arranged in virtual priority order of A, B, C, D, E, F, G, S with priority
(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.. After each countdown, oneframe will be transmitted. So in total, S
will have to wait through N contention countdowns and N-1 frame transmissions of length d bits
as each other station goes ahead of S
With Pure Aloha, stations are allowed access to the channel whenever they have data to transmit.
Because the threat of data collision exists, each station must either monitor its transmission on
the rebroadcast or await an acknowledgment from the destination station. By comparing the
transmitted packet with the received packet or by the lack of an acknowledgement, the
transmitting station can determine the success of the transmitted packet. If the transmission was
unsuccessful it is resent after a random amount of time to reduce the probability of re-collision.
Advantages:
Disadvantages:
By making a small restriction in the transmission freedom of the individual stations, the
throughput of the Aloha protocol can be doubled. Assuming constant length packets,
transmission time is broken into slots equivalent to the transmission time of a single packet.
Stations are only allowed to transmit at slot boundaries. When packets collide they will overlap
completely instead of partially. This has the effect of doubling the efficiency of the Aloha
protocol and has come to be known as Slotted Aloha.
Advantages:
Disadvantages:
Q4.Problem that can arise if receiving of frames is slower at receiver end as compare to
sending of frames at sender end? How it can be resolved?
Ans:
The asynchronous problem arise between sender and receiver. this problem can be resolved by
the flow control.
In computer networking, flow control is the process of managing the rate of data transmission
between two nodes to prevent a fast sender from outrunning a slow receiver. It provides a
mechanism for the receiver to control the transmission speed, so that the receiving node is not
overwhelmed with data from tranceiving nodes. Flow control should be distinguished from
congestion control, which is used for controlling the flow of data when congestion has actually
occurred. Flow control mechanisms can be classified by whether or not the receiving node sends
feedback to the sending node.
Flow control is important because it is possible for a sending computer to transmit information at
a faster rate than the destination computer can receive and process them. This can happen if the
receiving computers have a heavy traffic load in comparison to the sending computer, or if the
receiving computer has less processing power than the sending computer.
Q5.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?
Ans:
Every station in a token ring network is either an active monitor (AM) or standby monitor (SM)
station. However, there can be only one active monitor on a ring at a time. The active monitor is
chosen through an election or monitor contention process.
The active monitor performs a number of ring administration functions. The first function is to
operate as the master clock for the ring in order to provide synchronization of the signal for
stations on the wire. Another function of the AM is to insert a 24-bit delay into the ring, to
ensure that there is always sufficient buffering in the ring for the token to circulate. A third
function for the AM is to ensure that exactly one token circulates whenever there is no frame
being transmitted, and to detect a broken ring. Lastly, the AM is responsible for removing
circulating frames from the ring.