If you have any queries please leave a message here
Your Message

Question 1 :

a) The datalink layers of Ethernet consists of LLC sublayer and MAC sublayer. Describe functions of these sub layers.

Answer : - The data link layer is often conceptually divided into two sublayers : Logical Link Control (LLC) and Media Access Control (MAC). The upper sub-layer, termed as LLC, interacts with the network layer and the lower sub-layer, termed as MAC, interacts with the physical layer.

LLC is responsible for handling multiple Network Layer (Layer-3) protocols and link services like reliability and flow control, where as the MAC is responsible for framing and media access control for broadcast media.

The primary responsibilities of LLC are :

The MAC sub-layer interacts with the physical layer and is primarily responsible for framing/de-framing and collision resolution.

b) Explain the advantages and disadvantages of any two types of guided media and two types of unguided media transfer in computer networks.

Answer : -

Guided Media

Guided transmission media are more commonly known as the wired communication or bounded transmission media.

twisted-pair Cable

Coaxial Cable

Unguided Media

The unguided media is also called wireless communication.

Radio Waves


c) Explain in detail, how communication is taking place starting from connection establishment, data transfer and connection termination in Circuit switching and in Packet switching.

Answer : -

Circuit Switching

A circuit-switched communication system involves three phases : circuit establishment (setting up dedicated links between the source and destination); data transfer (transmitting the data between the source and destination); and circuit disconnect (removing the dadicated links).

In circuit switching network dedicated channel has to be established before the call is made between users. The channel is reserved between the users till the connection is active. For half duplex communication, one channel is allocated and for full duplex communication, two channels are allocated. It is mainly used for voice communication.

Packet Switching

Packet switching is a digital network transmission process in which data is broken into suitable-sized pieces or blocks for fast and efficient transfer via different network devices. When a computer attempts to send a file to another computer, the file is broken into packets so that it can be sent across the network in the most efficient way. These packets are then routed by network devices to the destination.

Question 2 :

a) Explain in details about the access method and frame format used in Ethernet and token ring. Also, explain the CSMA/CD method of Ethernet.

Answer : -

Ethernet Frame Format

Field Name Size (bytes) Description
This is a stream of bits used to allow the transmitter and reciever to synchronize their communication. The preamble is an alternating pattern of binary 56 ones and zeroes.
Start Frame Delimiter
This is always 10101011 and is used to indicate the beginning of the frame information.
Destination Address
It contain the physical address (MAC Address) of the receiver.
Source Address
It contain the physical address (MAC Address) of the sender.
Length of Data Field
It indicates the number of bytes present in "Data" field.
0 To 1454
The data is inserted here. This is where the IP header and data is placed if you are running IP over Ethernet.
This field size can be 0 to 46 bytes long. This is required if, the data size is less than 46 bytes.
Frame Checksum
This field contains the Frame Check Sequence (FCS) which is calculated using a Cyclic Redundancy Check (CRC). The FCS allows Ethernet to detect errors in the Ethernet frame and reject the frame if it appears damaged.

Minimum frame length = 64 bytes
Maximum frame length = 1518 bytes
Minimum length or lower limit for frame length is defined for normal operation of CSMA/CD.
An ethernet frame has a minimum size because anything that is shorter than the 64 byte minimum is interpreted by receiving stations as a collision.
A transmitting station will begin transmission when it can sense that there is no other transmitting stations (carrier sense). The transmitting station will not know of a collision in transmission until the collision is detected by another receiving station. This receiving station will then transmit a jam sequence and the transmitting station will receive this and break off transmission before it has actually transmitted the first 64 bytes of its ethernet packet.
This allows all receiving stations to interpret any transmission that is less than 64 bytes as a collision, and thus ignore it.

CSMA/CD Method

Carrier Sense Multiple Access or CSMA is a Media Access Control (MAC) protocol that is used to control the flow of data in a transmission media so that packets do not get lost and data integrity is maintained. There are two modifications to CSMA, the CSMA/CD (CSMA/Collision Detection) and CSMA/CA (CSMA/Collision Avoidance), each having its own strengths.

CSMA operates by sensing the state of the medium in order to prevent or recover from a collision. A collision happens when two transmitters transmit at the same time. The data gets scrambled, and the receivers would not be able to discern one from the other thereby causing the information to get lost. The lost information needs to be resent so that the receiver will get it.

CSMA/CD operates by detecting the occurrence of a collision. Once a collision is detected, CSMA/CD immediately terminates the transmission so that the transmitter does not have to waste a lot of time in continuing. The last information can be retransmitted. In comparison, CSMA/CA does not deal with the recovery after a collision. What it does is to check whether the medium is in use. If it is busy, then the transmitter waits until it is idle before it starts transmitting. This effectively minimizes the possibility of collisions and makes more efficient use of the medium.

CSMA/CD is used mostly in wired installations because it is possible to detect whether a collision has occurred. With wireless installations, it is not possible for the transmitter to detect whether a collision has occurred or not. That is why wireless installations often use CSMA/CA instead of CSMA/CD.

b) What are the three main elements of distance vector algorithms. Explain the distance vector routing algorithm. Also, Mention the limitations of distance vector routing algorithm.

Answer : - A distance-vector routing algorithm, also called a Bellman-Ford algorithm is one where routes are selected based on the distance between networks. The distance metric is something simple-usually the number of hops, or routers, between them.

Routers using this type of protocol maintain information about the distance to all known networks in a table. They regularly send that table to each router they immediately connect with (their neighbors or peers). These routers then update their tables and send those tables to their neighbors. This causes distance information to propagate across the internetwork, so that eventually, each router obtains distance information about all networks on the internetwork.

Distance Vector Algorithm

  1. A router transmits its distance vector to each of its neighbors in a routing packet.

  2. Each router receives and saves the most recently received distance vector from each of its neighbors.

  3. A router recalculates its distance vector when :

    • It receives a distance vector from a neighbor containing different information than before.
    • It discovers that a link to a neighbor has gone down.

The Distance Vactor calculation is based on minimizing the cost to each destination.


Initial Distances Stored at Each Router

Information Stored on RoutersDistance to Reach Other Routers

We can represent each node's knowledge about the distances to all other nodes as a table like the one given above.

  1. Every node sends a message to its directly connected neighbors containing its personal list of distance.
    For example, R3 sends its information to its neighbors R4 and R6.

  2. If any of the recipients of the information from R3 find that R3 is advertising a path shorter than the one they currently know about, they update their list to give the new path length and note that they should send packets for that destination through R3.
    For example, router R6 learns from R3 that router R4 can be reached at a cost of 1; R6 also knows it can reach R3 at a cost of 1, so it adds these to get the cost of reaching R4 by means of R3. R6 records that it can reach R4 at a cost of 2 by going through R3.

  3. After every router has exchanged a few updates with its directly connected neighbors, all routerss will know the least-cost path to all the other routers.

  4. In addition to updating their list of distances when they receive updates, the nodes need to keep track of which node told them about the path that they used to calculate the cost, so that they can create their forwarding table.
    For example, R6 knows that it was R3 who said "I can reach R4 in one hop" and so R6 puts an entry in its table that says "To reach R4, use the link to R3".

Question 3 :

a) Explain the working of 3 bit sliding window protocol with suitable example.

Answer : -

b) Why congestion control is an important activity of networking. Explain Leaky bucket and Token bucket algorithm.

Answer : -

Question 4 :

a) Explain the working of RSA algorithm with the help of an example. Explain each step of encryption and decryption.

Answer : -

Generate two large random prime numbers, p and q.

Calculate n = p * q. For strong unbreakable encryption, let n be a large number, typically a minimum of 512 bits.

Choose an integer e, which must be greater than 1 and less than (p − 1)(q − 1). There must be no common factor for e and (p − 1)(q − 1) except for 1. In other words two numbers e and (p – 1)(q – 1) are coprime.

Calculate the private key d , where 1 < d < (p - 1)(q - 1) and d * e = 1 mod ((p - 1)(q - 1))       Or, d = e-1 mod ((p - 1)(q - 1))

RSA Encryption
Suppose the sender wish to send some text message to someone whose public key is (n , e). The sender then represents the plaintext message as a positive integer m which less than n.
Computes the ciphertext as C = me mod n.

RSA Decryption
The receiver uses his private key (n , d) to compute m and extracts the plaintext from it.
(m = Cd mod n)


Select two prime numbers, p = 7 and q = 17
Calculate n = p * q = 7 * 17 = 119 and (p - 1)(q - 1) = (7 - 1)(17 - 1) = 6 * 16 = 96
Let e = 5 So, d = 77       [ (77 * 5) mod 96 = 1 ]
Therefore the public key is = [119, 5] and the private key is = [119, 77]

Encryption -
Let m = 19 [plaintext message]
So the cipher text C = (me mod n) = (195 mod 119) = (2476099 mod 119) = 66

Decryption -
m = (Cd mod n) = (6677 mod 119) = 19

b) Explain the use of different fields of UDP and TCP header format. Also, draw a diagram to illustrate the header format of TCP and UDP.

Answer : -

TCP Header Format

Field Name Size (bits) Description
Source Port
16 bits
The 16-bit port number of the process that originated the TCP segment on the source device. This will normally be an ephemeral (client) port number for a request sent by a client to a server, or a well-known/registered (server) port number for a reply from a server to a client.
Destination Port
16 bits
The 16-bit port number of the process that is the ultimate intended recipient of the message on the destination device. This will usually be a well-known/registered (server) port number for a client request, or an ephemeral (client) port number for a server reply.
Sequence Number
32 bits
TCP refers to each byte of data individually and uses sequence numbers to keep track of which bytes have been sent and received. Stated differently, 32 bit number used for byte level numbering of TCP segments. If you are using TCP, each byte of data is assigned a sequence number. Since the sequence number refers to a byte count process of a message. In practical, a segment of a message contains many bytes of data and it is not possible to adding sequence number field for each byte of a segment. In this case TCP calculate the last byte's sequence number of a segment, adding the segment size with the sequence number.
Acknowledgement Number
32 bits
This is used by the sender to acknowledge the received data. It is a 32 bit number field which indicates the next sequence number that the sending device is expecting from the receiving device. The receiver generates Acknowledgement Number, adding 1 with the last byte's sequence number of a receiving packet.
Header Length
4 bits
This field provides the length of the IP header. The length of the header is represented in 32 bit words. This length also includes IP options (if any). Since this field is of 4 bits so the maximum header length allowed is 60 bytes. Usually when no options are present then the value of this field is 5. here 5 mean five 32 bit words that is 5*4=20 bytes.
6 bits
This 6 bit field is reserved for future use. The value set in this field must be zero.
Control Flag
6 bits
This field contains six different control flags that can control certain aspects of the TCP connections such as connection establishment, connection termination and flow control. (See Control Flags Table)
16 bits
This indicates the number of octets of data the sender of this segment is willing to accept from the receiver at one time. This normally corresponds to the current size of the buffer allocated to accept data for this connection. In other words, this field is the current receive window size for the device sending this segment, which is also the send window for the recipient of the segment.
16 bits
This is a 16-bit checksum for data integrity protection, computed over the entire TCP datagram, plus a special pseudo header of fields. It is used to protect the entire TCP segment against errors in transmission as well as errors in delivery. Optional alternate checksum methods are also supported.
Urgent Pointer
16 bits
One or more of several types of options may be included after the standard headers in certain IP datagrams.
If one or more options are included, and the number of bits used for them is not a multiple of 32, enough 0 bits are added to pad out the header to a multiple of 32 bits (four bytes).
This is the data that will be transmitted in the datagram. It is either an entire higher-layer message or a fragment of one.

Control Flags Table

Subfield Name Size (bits) Description
Urgent Pointer (URG)
1 bit
When set to 1, indicates that the current segment contains urgent (or high-priority) data
Acknowledgement (ACK)
1 bit
When set to 1, indicates that this segment is carrying an acknowledgment, and the value of the Acknowledgment Number field is valid and carrying the next sequence expected from the destination of this segment.
Push (PSH)
1 bit
The sender of this segment is using the TCP push feature, requesting that the data in this segment be immediately pushed to the application on the receiving device. It is useful for transmitting small units of data.
Reset (RST)
1 bit
The sender has encountered a problem and wants to reset the connection.
Synchronize (SYN)
1 bit
This segment is a request to synchronize sequence numbers and establish a connection; the Sequence Number field contains the Sequence Number of the sender of the segment.
Finish (FIN)
1 bit
The sender of the segment is requesting that the connection be closed.

UDP Header Format

Field Name Size (bits) Description
Source Port
16 bits
The 16-bit port number of the process that originated the TCP segment on the source device. This will normally be an ephemeral (client) port number for a request sent by a client to a server, or a well-known/registered (server) port number for a reply from a server to a client.
Destination Port
16 bits
The 16-bit port number of the process that is the ultimate intended recipient of the message on the destination device. This will usually be a well-known/registered (server) port number for a client request, or an ephemeral (client) port number for a server reply.
16 bits
The length of the entire UDP datagram, including both header and Data fields.
16 bits
An optional 16-bit checksum computed over the entire UDP datagram plus a special pseudo header of fields
The encapsulated higher-layer message that will be sent.


QuestionSolves.com is an educational website that helps worldwide students in solving computer education related queries.

Also, different software like Visual Studio, SQL Server, Oracle etc. are available to download in different versions.

Moreover, QuestionSolves.com provides solutions to your questions and assignments also.


Windows Command

UNIX Command

IGNOU Assignment Solution

IGNOU Question Paper Solution


Website Devlopment


Home Learning

Provide BCA, MCA Projects

Provide Assignment & Question Paper Solution


Follow Us