Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
59 views

Assignment - 3

The document contains the answers to 5 questions related to computer networks. It discusses TCP and UDP protocols, explains the fields in a TCP header, lists quality of service parameters, works through an example of the RSA encryption algorithm, and describes TCP window management and the silly window syndrome.

Uploaded by

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

Assignment - 3

The document contains the answers to 5 questions related to computer networks. It discusses TCP and UDP protocols, explains the fields in a TCP header, lists quality of service parameters, works through an example of the RSA encryption algorithm, and describes TCP window management and the silly window syndrome.

Uploaded by

Shivam Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

ASSIGNMENT-5

COMPUTER NETWORK
SHIVAM SHARMA
ROLL NO-96
IT- (B)

Q1. Explain about the TCP header and working of TCP protocol
and differentiate between TCP and UDP with frame format.

ANS- The Transmission Control Protocol (TCP) header is the first 24 bytes
of a TCP segment that contains the parameters and state of an end-toend
TCP socket. The TCP header is used to track the state of communication
between two TCP endpoints.

working of TCP protocol-


In base terms, TCP/IP allows one computer to talk to another computer via
the Internet through compiling packets of data and sending them to right
location. For those who don't know, a packet, sometimes more formally
referred to as a network packet, is a unit of data transmitted from one
location to another.
TRANSMISSION CONTROL PROTOCOL (TCP) USER DATAGRAM PROTOCOL (UDP)

UDP is the Datagram oriented protocol.


This is because there is no overhead for
opening a connection, maintaining a
connection, and terminating a
connection. UDP is efficient for
broadcast and multicast type of network
transmission.
TCP is a connection-oriented protocol.
Connection-orientation means that the
communicating devices should establish
a connection before transmitting data
and should close the connection after
transmitting the data.

TCP is reliable as it guarantees deliveryThe delivery of data to the destination of

data to the destination router. cannot be guaranteed in UDP.

TCP provides extensive error checking UDP has only the basic error checking

mechanisms. It is because it provides mechanism using checksums.

TRANSMISSION CONTROL PROTOCOL (TCP) USER DATAGRAM PROTOCOL (UDP)

flow control and acknowledgment of


data.

Sequencing of data is a feature of

Transmission Control Protocol (TCP). There is no sequencing of data in UDP.

this means that packets arrive in-order at If ordering is required, it has to be

the receiver. managed by the application layer.


UDP is faster, simpler and more efficient
than TCP.
TCP is comparatively slower than UDP.

There is no retransmission of lost

packets in User Datagram Protocol


Retransmission of lost packets is
possible in TCP, but not in UDP. (UDP).

TCP has a (20-80) bytes variable length

header. UDP has a 8 bytes fixed length header.

Q2. The following is the dump of a TCP header in hexa decimal


format: 05320017 00000001 00000000 500207FF 00000000

(i) What is the sequence number?


ANS- 000000001 -> 1
(ii) What is the destination port number?

ANS- (2 byte) -> 0017

(iii) What is the acknowledgment number?

ANS- 00000000 -> 0

(iv) What is the window size?

ANS- 07FF
Q3. What do you understand by Quality of service, parameters?
List various Quality of service parameters.
ANS- "Quality of Service" (QOS) refers to certain characteristics of a data
link connection as observed between the connection endpoints. ... QOS
parameters that are not negotiated during connection establishment. The
values are determined or known through other methods, usually
administrative.

In the field of computer networking and other packetswitched


telecommunication networks, quality of service refers to traffic prioritization
and resource reservation control mechanisms rather than the achieved
service quality. Quality of service is the ability to provide different priorities
to different applications, users, or data flows, or to guarantee a certain level
of performance to a data flow.
Quality of service is particularly important for the transport of traffic with
special requirements. In particular, developers have introduced Voice over
IP technology to allow computer networks to become as useful as
telephone networks for audio conversations, as well as supporting new
applications with even stricter network performance requirements.

The various Quality of Service (QoS) parameters in Computer Network are


as follows:
1. Cell Loss Rate (CLR)
It is the fraction of cells that are lost during transmission.
CLR = Cell Lost / Total cells transmitted
2. Cell Delay Variation (CDV)
It defines the difference between the maximum and the minimum cell
transfer delay.
3. Cell Transfer Delay (CTD)
4. It is the average time required for cell to travel from source to
destination.
5. Cell transfer delay is affected by segmentation reassembly and
transmission delay.
6. Cell Error Ratio (CER)
This parameter defines the fraction of cells that contained errors.
CER = Error cells delivered / Total cells delivered
7. Cell Mis-insertion Ratio (CMR)
It is the number of cells inserted per second that are meant for some
other destination.
8. It is the ratio of severely error cell blocks to the total transmitted cell
blocks.
SECBR = Severely Error Cell Blocks / Total transmitted cell blocks.

Q4. Explain RSA Algorithm. Taking p=5, q=11, d=27 . Find the
value of e.?
ANS-
RSA ALGORITHM-
RSA algorithm is a public key encryption technique and is considered as
the most secure way of encryption. It was invented by Rivest, Shamir and
Adleman in year 1978 and hence name RSA algorithm.
Algorithm

The RSA algorithm holds the following features −


• RSA algorithm is a popular exponentiation in a finite field over
integers including prime numbers.
• The integers used by this method are sufficiently large making it
difficult to solve.
• There are two sets of keys in this algorithm: private key and public
key.
You will have to go through the following steps to work on RSA algorithm −

Step 1: Generate the RSA modulus

The initial procedure begins with selection of two prime numbers namely p
and q, and then calculating their product N, as shown −

N=p*q
Here, let N be the specified large number.

Step 2: Derived Number (e)

Consider number e as a derived number which should be greater than 1


and less than (p-1) and (q-1). The primary condition will be that there
should be no common factor of (p-1) and (q-1) except 1

Step 3: Public key

The specified pair of numbers n and e forms the RSA public key and it is
made public.

Step 4: Private Key

Private Key d is calculated from the numbers p, q and


e. The mathematical relationship between the numbers is as
follows −
ed = 1 mod (p-1) (q-1)
The above formula is the basic formula for Extended Euclidean Algorithm,
which takes p and q as the input parameters. Taking p=5, q=11, d=27 .
Find the value of e
Value of e=3

Q5. Discuss TCP window management in detail. Also explain


silly window syndrome and their solution.
ANS- Sliding windows, a technique also known as windowing, is used
by the Internet's Transmission Control Protocol (TCP) as a method of
controlling the flow of packets between two computers or network hosts.
TCP requires that all transmitted data be acknowledged by the receiving
host.

Sliding windows, a technique also known as windowing, is used by the


Internet's Transmission Control Protocol (TCP) as a method of controlling
the flow of packets between two computers or network hosts. TCP requires
that all transmitted data be acknowledged by the receiving host. Sliding
windows is a method by which multiple packets of data can be affirmed
with a single acknowledgment.

The silly window syndrome is created by the receiver, David D


Clark's solution is used. Clark's solution closes the window until another
segment of maximum segment size (MSS) can be received or the buffer is
half empty. There are 3 causes of SWS: When the server announces
Empty space as 0.

Example
For a real-life analogy, let's say we have a couple of moving trucks
(packets) taking furniture (data) from one house to another. If a truck
transported each piece of furniture as soon as it was taken out of the old
house, one piece at a time, clearly the operation would take forever (SWS).
If we have enough trucks in transit between locations, there's going to be a
fair bit of congestion on the route as well. The obvious and more efficient
solution is, of course, to wait until each truck is full before it drives off to the
new house to avoid the large overhead of the drive time and
loading/unloading time of each truck's trip.

You might also like