All questions of Computer Networks for Computer Science Engineering (CSE) Exam

Suppose that it takes 1 unit of time to transmit a packet (of fixed size) on a communication link. The link layer uses a window flow control protocol with a window size of N packets. Each packet causes an ack or a nak to be generated by the receiver, and ack/nak transmission times are negligible. Further, the round trip time on the link is equal to N units. Consider time i > N. If only acks have been received till time i(no naks), then the goodput evaluated at the transmitter at time i (in packets per unit time) is
  • a)
    1 - N/i
  • b)
     i/(N + i)
  • c)
    1
  • d)
    1 - e(i/N)
Correct answer is 'A'. Can you explain this answer?

Anushka Bose answered
In computer networks, goodput is the application level throughput, i.e. the number of useful information bits delivered by
the network to a certain destination per unit of time. (From wikipedia).
So, successful delivery of packet can be assured if ACK has been received for it.
So till time 'i' we would have transmitted 'i' packets but only (i-N) can be acknowledged as minimum time for a packet to
get Acknowledged is N (since RTT is N which is equal to the window size, there is no waiting time for the sender).
So successfully delivered packets = (i-N)
Time for transmission = i
Goodput = Successfully delivered data/ Time = (i-N)/i = 1- N/i
Therefore (A)

Can you explain the answer of this question below:

A 20 Kbps satellite link has a propagation delay of 400 ms. The transmitter employs the "go back n ARQ" scheme with n setto 10. Assuming that each frame is 100 bytes long, what is the maximum data rate possible?

  • A:

    5 Kbps

  • B:

    10 Kbps

  • C:

    15 Kbps

  • D:

    20 Kbps

The answer is b.

Rajeev Menon answered
Given Data
Bandwidth = 20 Kbps
Propogation dealy = 400 ms, so RTT = 2 * PD = 800 ms
window size = 10
frame size = 100 bytes of 800 bits
Even though bandwidth is 20kbps, we are restricted with window size here
In 1 RTT we are sending 10 * 800 bits
In 800 ms we are sending 10 * 800 bits
In 1 ms we are sending 10 bits
In 1 sec we are sending 10 * 1000 bits
In 1 sec we are sending 10 Kb
So effective bandwidth = 10 Kb/sec

Which one of the following is not a function of network layer?
  • a)
    routing
  • b)
    inter-networking
  • c)
    congestion control
  • d)
    none of the mentioned
Correct answer is option 'D'. Can you explain this answer?

Avinash Mehta answered
Network Layer :-
The network layer is responsible for the source-to-destination delivery of a packet, possibly across multiple networks (links).
Other functions of the network layer include the following :-
Logical addressing :- In order to identify each device on internetwork uniquely, network layer defines an addressing scheme.
Routing :- The network layer protocols determine which route is suitable from source to destination.

The network layer concerns with
  • a)
    bits
  • b)
    frames
  • c)
    packets
  • d)
    none of the mentioned
Correct answer is option 'C'. Can you explain this answer?

Bijoy Kapoor answered
The network layer is responsible for routing packets from the source to destination. The routing algorithm is the piece of software that decides where a packet goes next (e.g., which output line, or which node on a broadcast channel).

For connectionless networks, the routing decision is made for each datagram. For connection-oriented networks, the decision is made once, at circuit setup time.

Which of the following fields of an IP header is NOT modified by a typical IP router?
  • a)
    Check sum
  • b)
    Source address
  • c)
    Time to Live (TTL)
  • d)
    Length
Correct answer is option 'B'. Can you explain this answer?

Nilesh Jain answered
Header Fields of an IP Packet

An IP (Internet Protocol) packet consists of a header followed by the data payload. The header contains various fields that provide information about the packet and help in routing it across the network. These fields are typically modified by IP routers as the packet is forwarded from the source to the destination.

Fields Modified by a Typical IP Router

1. Checksum: The IP header includes a checksum field which is used to detect errors in the packet during transmission. The checksum is calculated by the sender and verified by each router along the path. If errors are detected, the packet is discarded. Routers may update the checksum field if modifications are made to the IP header.

2. Source Address: The source address field in the IP header specifies the IP address of the sender. As the packet is forwarded through different routers, the source address remains unchanged. It is an essential field as it helps in identifying the origin of the packet.

3. Time to Live (TTL): The TTL field in the IP header indicates the maximum number of hops or routers the packet can traverse before being discarded. Each router that processes the packet decrements the TTL value by 1. If the TTL reaches 0, the packet is dropped. Routers must update the TTL field as they forward the packet to ensure its proper handling.

Field NOT Modified by a Typical IP Router

- Length: The length field in the IP header specifies the total length of the IP packet, including both the header and the data payload. This field is set by the sender and remains unchanged throughout the routing process. Routers do not modify the length field as they forward the packet.

Conclusion

In summary, among the given options, the field that is NOT modified by a typical IP router is the source address. The checksum, TTL, and length fields may be updated or modified by routers as they process and forward the IP packet.

An organization has a class B network and wishes to form subnets for 64 departments. The subnet mask would be:
  • a)
    255.255.0.0
  • b)
    255.255.64.0
  • c)
    255.255.128.0
  • d)
    255.255.252.0
Correct answer is option 'D'. Can you explain this answer?

Yash Patel answered
Firstly, we should know, what a Class B network is and how is it different from Class A network and Class B network.
IP Address Class Network and Host Capacities
According to the formula number of subnets = 2^n
So, the subnet mask would be = 11111111.11111111.11111100.00000000
Hence, answer is 255. 255. 252. 0
You can go through the course for Computer Science Engineering chapter-wise tests: 

In the 4B/5B encoding scheme, every 4 bits of data are encoded in a 5-bit codeword. It is required that the codewords haveat most 1 leading and at most 1 trailing zero. How many such codewords are possible?
  • a)
    14
  • b)
    16
  • c)
    18
  • d)
    20
Correct answer is option 'C'. Can you explain this answer?

Rajeev Menon answered
The possible codewords should not have 00xxx or xxx00
=> Total possible combinations of 5 bits – for (00xxx or xxx00)+ (00*00) {as 00*00 is subtracted twice once each from both cases}
=> 232 – (8+8) +2 = 18

The subnet mask for a particular network is 255.255.31.0. Which of the following pairs of IP addresses could belong to this network?
  • a)
    172.57.88.62 and 172.56.87.23
  • b)
    10.35.28.2 and 10.35.29.4
  • c)
    191.203.31.87 and 191.234.31.88
  • d)
    128.8.129.43 and 128.8.161.55
Correct answer is option 'D'. Can you explain this answer?

Sanya Agarwal answered
A and C are not the answers as the second byte of IP differs and subnet mast has 255 for second byte.
Consider B, (& for bitwise AND)
10.35.28.2 & 255.255.31.0 = 10.35.28.0 (28 = 111002)
10.35.29.4 & 255.255.31.0 = 10.35.29.0 (29 = 111112)
So, we get different subnet numbers
Consider D.
128.8.129.43 & 255.255.31.0 = 128.8.1.0 (129 = 100000012)
128.8.161.55 & 255.255.31.0 = 128.8.1.0 (161 = 101000012)
The subnet number matches. So, D is the answer.

The Hamming distance between 001111 and 010011 is
  • a)
    1
  • b)
    2
  • c)
    3
  • d)
    4
Correct answer is option 'C'. Can you explain this answer?

Sanya Agarwal answered
The hamming distance is the minimum number of positions where any two legal code words differ by bit.
Hamming distance between 001111 and 010011 is 3.

Who can send ICMP error-reporting messages?
  • a)
    Routers
  • b)
    Destination hosts
  • c)
    Source host
  • d)
    Both (a) and (b)
Correct answer is option 'D'. Can you explain this answer?

Krithika Kaur answered
Both router and destination host can send ICMP error-reporting message to inform the source host about any failure or error occurred in packet.

Consider the three commands : PROMPT, HEAD and RCPT.Which of the following options indicate a correct association of these commands with protocols where these are used?
  • a)
    HTTP, SMTP, FTP
  • b)
    FTP, HTTP, SMTP
  • c)
    HTTP, FTP, SMTP
  • d)
    SMTP, HTTP, FTP
Correct answer is option 'D'. Can you explain this answer?

The correct answer is b.
PROMPT-  Toggles prompting. Ftp prompts during multiple file transfers to allow you to selectively retrieve or store files  //Used for FTP transfers

HEAD- The <head> element can include a title for the document, scripts, styles, meta information, and more //Used in HTML to transfer data across HTTP protocol

RCPT- You tell the mail server who the recipient of your message is by using the RCPT command //Related to mail so,SMTP

In virtual circuit network each packet contains
  • a)
    full source and destination address
  • b)
    a short VC number
  • c)
    both (a) and (b)
  • d)
    none of the mentioned
Correct answer is option 'B'. Can you explain this answer?

Raghav Joshi answered
Explanation:

Virtual Circuit Network is a type of network in which a dedicated path is established between the source and destination before transmitting the data. In this network, each packet contains a short VC (Virtual Circuit) number instead of a full source and destination address.

Advantages of using VC number:
- It reduces the overhead of routing and forwarding packets by eliminating the need for address lookup in each router along the path.
- It provides faster and more efficient packet switching as the network can quickly route the packets based on the VC number.

Disadvantages of using VC number:
- It requires a lot of resources to establish and maintain the virtual circuit path, which can result in higher latency and delay in transmission.
- It can also lead to network congestion as multiple virtual circuits may share the same physical link.

Therefore, the correct answer to the question is option 'B', which states that each packet in a virtual circuit network contains a short VC number instead of a full source and destination address.

In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400 and the fragment offset value is300. The position of the datagram, the sequence numbers of the first and the last bytes of the payload, respectively are
  • a)
    Last fragment, 2400 and 2789
  • b)
    First fragment, 2400 and 2759
  • c)
    Last fragment, 2400 and 2759
  • d)
    Middle fragment, 300 and 689
Correct answer is option 'C'. Can you explain this answer?

Arnab Desai answered
M = 0 meaning no more fragments after this. Hence, its the last fragment.
IHL = internet header length = 10 x 8 = 2400 B coz 4 is the scaling factor for this field.
Total Length = 2400 B
Payload size = Total length - Header length = 400-40 = 360B
fragment offset = = represents how many Bytes are before this. 8 is the scaling factor here.
the first byte # = 2400
Last byte # = 300 x 8 = 2400 B first byte # + total bytes in payload - 1 = 2400+360-1=2759
option C is correct

The OSI model has _______ layers.
  • a)
    4
  • b)
    5
  • c)
    6
  • d)
    7
Correct answer is option 'D'. Can you explain this answer?

Vandana Desai answered
Understanding the OSI Model
The OSI (Open Systems Interconnection) model is a conceptual framework used to understand and implement networking protocols in seven distinct layers. Each layer serves a specific function in the process of data communication.
Seven Layers of the OSI Model
The OSI model consists of the following seven layers:
  • Layer 1: Physical Layer - Deals with the physical connection between devices, including cables, switches, and other hardware.
  • Layer 2: Data Link Layer - Responsible for node-to-node data transfer and error detection/correction in frames.
  • Layer 3: Network Layer - Handles routing and forwarding of data packets across the network.
  • Layer 4: Transport Layer - Ensures reliable data transfer with error recovery and flow control through segments.
  • Layer 5: Session Layer - Manages sessions between applications, providing control over the dialogues.
  • Layer 6: Presentation Layer - Translates data formats, handles encryption, and ensures that data is in a readable format.
  • Layer 7: Application Layer - Interfaces directly with end-user applications, facilitating communication between software and the network.

Importance of the OSI Model
Understanding the OSI model is crucial for several reasons:
  • It standardizes networking protocols to ensure interoperability.
  • It helps in troubleshooting network issues by isolating problems to specific layers.
  • It provides a framework for developing and understanding new networking technologies.

In conclusion, the OSI model comprises seven layers, each serving a vital role in the communication process, making it a fundamental concept in computer networking.

A computer on a 10 Mbps network is regulated by a token bucket. The token bucket is filled at a rate of 2 Mbps. It is initially filled to capacity with 16 Megabits. What is the maximum duration for which the computer can transmit at the full 10 Mbps?
  • a)
    1.6 seconds
  • b)
    2 seconds
  • c)
    5 seconds
  • d)
    8 seconds
Correct answer is option 'B'. Can you explain this answer?

New tokens are added at the rate of r bits/sec which is
2Mbps in the given question.
Capacity of the token bucket (b) = 16 Mbits
Maximum possible transmission rate (M) = 10Mbps
So the maximum burst time = b/(M-r) = 16/(10-2) = 2 seconds
here is the animation for token bucket hope this will help us to understand the concept.

In the waveform (a) given below, a bit stream is encoded by Manchester encoding scheme. The same bit stream is encoded in a different coding scheme in wave form (b). The bit stream and the coding scheme are
  • a)
    1000010111 and Differential Manchester respectively
  • b)
    0111101000 and Differential Manchester respectively
  • c)
    1000010111 and Integral Manchester respectively
  • d)
    0111101000 and Integral Manchester respectively
Correct answer is option 'B'. Can you explain this answer?

In simple language, Manchester encoding has +A to -A transition for the clock cycle for which bit is ‘1’ and transition from -A to +A for the cycle when bit is ‘0’ (A is the amplitude).

The amplitudes are bipolar in Differential manchester encoding same as manchester encoding just that it toggles at ‘1’. When bit is ‘1’ we get transition from +A to -A and it remains the same until next ‘1’ arrives. The output changes to opposite transition (-A to +A) when next ‘1’ arrives.

The second encoding resembles the differential manchester code for the given number.

An IP packet has arrived with the first 8 bits as 0100 0010. Which of the following is correct ?
  • a)
    The number of hops this packet can travel is 2
  • b)
    The total number of bytes in header is 16 bytes.
  • c)
    The upper layer protocol is ICMP
  • d)
    The receiver rejects the packet
Correct answer is option 'D'. Can you explain this answer?

Abhiram Goyal answered
Understanding the IP Header
An IP packet begins with a header that includes critical information. The first 8 bits of the header signify the version and the header length. In this case, the bits are "0100 0010".
Bit Analysis
- The first four bits (0100) indicate the version of the IP protocol. Here, it is IPv4 (as 0100 corresponds to version 4).
- The second four bits (0010) represent the header length. This is calculated as 2 multiplied by 4 bytes, which equals 8 bytes.
Evaluation of Options
- Option A: The number of hops this packet can travel is 2.
- Incorrect. The number of hops is determined by the Time to Live (TTL) field, not the header length.
- Option B: The total number of bytes in header is 16 bytes.
- Incorrect. The header length is 8 bytes, which is derived from the second four bits of the first byte.
- Option C: The upper layer protocol is ICMP.
- Incorrect. The upper layer protocol is identified in the Protocol field, but this information isn’t provided in the first 8 bits.
- Option D: The receiver rejects the packet.
- Correct. If the header length is misinterpreted or if there are issues in the header, the receiver may reject the packet. Given that the header length indicates 8 bytes, if the actual packet length does not match this, it would result in rejection.
Conclusion
Thus, the correct answer is option D, as various factors can lead to packet rejection based on header information.

Traceroute reports a possible route that is taken by packets moving from some host A to some other host B. Which of the following options represents the technique used by traceroute to identify these hosts
  • a)
    By progressively querying routers about the next router on the path to B using ICMP packets, starting with the first router
  • b)
    By requiring each router to append the address to the ICMP packet as it is forwarded to B. The list of all routers en - route to B is returned by B in an ICMP reply packet
  • c)
    By ensuring that an ICMP reply packet is returned to A by each router en-route to B, in the ascending order of their hop
    distance from A
  • d)
    By locally computing the shortest path from A to B
Correct answer is option 'A'. Can you explain this answer?

A) Traceroute works by sending packets with gradually increasing TTL value, starting with TTL value of 1. The first router receives the packet, decrements the TTL value and drops the packet because it then
has TTL value zero. The router sends an ICMP Time Exceeded message back to the source. The next set of packets are given a TTL value of 2, so the first router forwards the packets, but the second router
drops them and replies with ICMP Time Exceeded. Proceeding in this way, traceroute uses the returned ICMP Time Exceeded messages to build a list of routers that packets traverse, until the destination is
reached and returns an ICMP Echo Reply message

A 1 Mbps satellite link connects two ground stations. The altitude of the satellite is 36,504 km and speed of the signal is 3 ×108 m/s. What should be the packet size for a channel utilization of 25% for a satellite link using go-back-127 sliding window protocol? Assume that the acknowledgment packets are negligible in size and that there are no errors during communication.
  • a)
    120 bytes
  • b)
    60 bytes
  • c)
    240 bytes
  • d)
    90 bytes
Correct answer is option 'A'. Can you explain this answer?

To determine the packet size for a channel utilization of 25% using the go-back-127 sliding window protocol, we need to consider the transmission time, propagation time, and window size.

Transmission Time:
The transmission time is the time it takes to send a packet from one ground station to the other through the satellite link. We can calculate the transmission time using the formula:

Transmission time = Packet size / Transmission rate

Since the transmission rate is given as 1 Mbps (1 million bits per second), we need to convert it to bytes per second:

Transmission rate = 1 Mbps = 1,000,000 bits per second = 125,000 bytes per second

To achieve a channel utilization of 25%, we need to send packets 25% of the time. Therefore, the transmission time should be 4 times the propagation time (1 - 0.25 = 0.75).

Propagation Time:
The propagation time is the time it takes for a signal to travel from one ground station to the other through the satellite link. We can calculate the propagation time using the formula:

Propagation time = Distance / Speed of signal

The distance is twice the altitude of the satellite (since the signal needs to travel up to the satellite and then back down to the other ground station):

Distance = 2 * Altitude = 2 * 36,504 km = 73,008 km = 73,008,000 meters

The speed of the signal is given as 3 * 10^8 m/s.

Propagation time = 73,008,000 / (3 * 10^8) = 0.24336 seconds

Window Size:
The go-back-127 sliding window protocol allows for a maximum window size of 127 packets.

Calculating Packet Size:
Now that we have the transmission time (0.75 * propagation time) and the window size (127), we can calculate the packet size using the formula:

Packet size = (Transmission time - Propagation time) / (Window size - 1)

Packet size = (0.75 * 0.24336) / (127 - 1) = 0.18252 / 126 ≈ 0.00145 seconds

Since the transmission rate is given in bytes per second, we need to convert the packet size from seconds to bytes:

Packet size = 0.00145 seconds * 125,000 bytes per second ≈ 181.25 bytes

Therefore, the packet size for a channel utilization of 25% using the go-back-127 sliding window protocol is approximately 181.25 bytes, which rounds up to option 'A': 120 bytes.

A packet-switching network
  • a)
    Is free
  • b)
    Can reduce the cost of using an information utility
  • c)
    Allows communications channels to be shared among more than one user
  • d)
    Both (b) and (c)
Correct answer is option 'D'. Can you explain this answer?

Niti Basu answered
A packet-switching network:

Packet-switching is a method of transmitting data over a network in which messages are divided into small packets. These packets are then individually sent across the network and reassembled at the destination. This approach is different from circuit-switching, where a dedicated communication path is established for the entire duration of the transmission.

Advantages of a packet-switching network:

A packet-switching network offers several advantages over other networking approaches, such as:

1. Reduced cost: Packet-switching networks can significantly reduce the cost of using an information utility. This is because they allow multiple users to share the same communication channels, resulting in more efficient use of network resources.

2. Shared channels: In a packet-switching network, communications channels can be shared among more than one user. This means that multiple users can send packets simultaneously over the same channel, increasing the overall network capacity and improving efficiency.

3. Flexibility: Packet-switching networks are highly flexible and can handle various types of data, including voice, video, and text. This versatility makes them suitable for a wide range of applications and allows for efficient transmission of different types of information.

4. Error detection and correction: Packet-switching networks often incorporate error detection and correction mechanisms. Each packet is typically accompanied by checksums or other error detection codes, which allow the receiver to verify the integrity of the data. If errors are detected, the receiver can request retransmission of the affected packets, ensuring reliable data transmission.

5. Scalability: Packet-switching networks can easily accommodate a growing number of users and increasing data traffic. As more users join the network, additional packets can be transmitted simultaneously, providing scalability and adaptability to changing network demands.

6. Efficient use of network resources: Packet-switching networks make efficient use of network resources by dynamically allocating bandwidth to users as needed. This allows for optimal utilization of available resources and prevents underutilization or congestion.

In conclusion, a packet-switching network offers numerous benefits, including reduced cost, shared channels, flexibility, error detection and correction, scalability, and efficient use of network resources. These advantages make packet-switching networks a preferred choice for modern communication systems.

During normal IP packet forwarding by routers which of the following packet fields are updated?
  • a)
    IP header source address
  • b)
    IP header destination address
  • c)
    IP header TTL
  • d)
    IP header check sum
Correct answer is option 'C'. Can you explain this answer?

During forwarding of an IP packet by routers, the packet fields namely IP header source address and IP header destination address remains same whereas check own and TTL are updated.

In the TCP/IP protocol suite, which one of the following is NOT part of the IP header?
  • a)
    Fragment Offset
  • b)
    Source IP address
  • c)
    Destination IP address
  • d)
    Destination port number
Correct answer is option 'D'. Can you explain this answer?

Rounak Chavan answered
D.) Destination Port number.
Why? Because the IP header has nothing to do with the port number.
Port numbers are used by the transport layer to ensure process to process delivery.

Let us consider a statistical time division multiplexing of packets. The number of sources is 10. In a time unit, a source transmits a packet of 1000 bits. The number of sources sending data for the first 20 time units is 6, 9, 3, 7, 2, 2, 2, 3, 4, 6,1, 10, 7, 5, 8, 3, 6, 2, 9, 5 respectively. The output capacity of multiplexer is 5000 bits per time unit. Then the average number of back logged of packets per time unit during the given period is
  • a)
    5
  • b)
    4.45
  • c)
    3.45
  • d)
    0
Correct answer is option 'B'. Can you explain this answer?

Answer is B
Here we can spent at max 5 packets per Time unit 5000 /1000.
So Whatever which is not sent is backlog.
So First Time Unit => 6 ,
Backlog in First time unit => 6-5 => 1 This one gets added to next Time units load
Second time unit => 9 + 1 (One from Previous Time Unit)
Backlog in Second time Unit = 10-5 => 5 (This one gets added to next Time Units load.)
Total Backlog this way = 1+5+3+5+2+0+0+0+0+1+0+5+7+7+10+8+9+6+10+10=89
Avg Backlog=89/20=4.45
The average number of backlogged of packets per time unit during the given period is 4.45 , (Option B) .

Multidestination routing
  • a)
    is same as broadcast routing
  • b)
    contains the list of all destinations
  • c)
    data is not sent by packets
  • d)
    none of the mentioned
Correct answer is option 'C'. Can you explain this answer?

Anirban Khanna answered
Algorithms for effectively routing messages from a source to multiple destination nodes in a store-and-forward computer network are studied. The focus is on minimizing the network cost (NC), which is the sum of weights of the links in the routing path.

Internet Control Message Protocol (ICMP) has been designed to compensate _________
  • a)
    Error-reporting
  • b)
    Error-correction
  • c)
    Host and management queries
  • d)
    All of the mentioned
Correct answer is option 'D'. Can you explain this answer?

Shubham Sharma answered
Introduction:
The Internet Control Message Protocol (ICMP) is an integral part of the Internet Protocol Suite. It is used to report errors, perform diagnostics, and exchange control messages between network devices. ICMP has been designed to compensate for various functionalities, including error reporting, error correction, and host and management queries.

Error Reporting:
ICMP provides error reporting capabilities to network devices. Whenever an error occurs during the transmission or processing of IP packets, ICMP messages are generated and sent to the source IP address. These error messages help to identify and diagnose network issues, allowing for timely resolution.

Error Correction:
ICMP also facilitates error correction mechanisms. For example, when a packet encounters an error during transmission, such as a time-to-live (TTL) exceeded or destination host unreachable, ICMP messages are sent back to the source IP address to inform the sender about the error. This allows the sender to take corrective actions, such as retransmitting the packet or choosing an alternative route.

Host and Management Queries:
In addition to error reporting and correction, ICMP supports host and management queries. ICMP messages can be used to query network devices for information or perform diagnostic tasks. For instance, the Internet Control Message Protocol Echo Request (ICMP Echo Request) is commonly known as a "ping" request. It is used to check the reachability and response time of a network host. ICMP also provides other query messages, such as Address Mask Request, Timestamp Request, and Router Solicitation, which serve various network management and troubleshooting purposes.

Conclusion:
In conclusion, the Internet Control Message Protocol (ICMP) has been designed to compensate for error reporting, error correction, and host and management queries. It plays a crucial role in maintaining network stability, diagnosing issues, and facilitating communication between network devices. The various ICMP messages ensure that errors are reported, corrected, and that network devices can query each other for information or perform diagnostic tasks.

The DHCP server can provide the _______ of the IP addresses.
  • a)
    dynamic allocation
  • b)
    automatic allocation
  • c)
    static allocation
  • d)
    all of the mentioned
Correct answer is option 'D'. Can you explain this answer?

Raghav Joshi answered
Dynamic allocation, automatic allocation, and static allocation are the three ways in which the DHCP server can provide IP addresses. Let us discuss each of these in detail.

Dynamic Allocation:
When a DHCP server is configured to use dynamic allocation, it assigns an IP address to a device for a limited period of time. Once the lease time expires, the device must request a new IP address from the DHCP server. This method is useful in situations where there are more devices than available IP addresses, as it allows for the efficient use of IP addresses. Dynamic allocation also allows for easier IP address management, as the DHCP server can track which addresses are in use and which are available.

Automatic Allocation:
In automatic allocation, the DHCP server assigns a permanent IP address to a device based on its MAC address. This method is useful for devices that require a fixed IP address, such as servers or printers. Automatic allocation eliminates the need for manual IP address configuration and ensures that the device always has the same IP address.

Static Allocation:
Static allocation is when the network administrator manually assigns a fixed IP address to a device. This method is useful for devices that require a fixed IP address, such as servers or printers. However, static allocation can be time-consuming and error-prone, especially in large networks.

Conclusion:
In summary, the DHCP server can provide IP addresses through dynamic allocation, automatic allocation, and static allocation. Dynamic allocation is useful for situations where there are more devices than available IP addresses, automatic allocation is useful for devices that require a fixed IP address, and static allocation is useful for devices that require a fixed IP address and can be manually assigned by the network administrator.

Transmission control protocol ___________
  • a)
    is a connection-oriented protocol
  • b)
    uses a three way handshake to establish a connection
  • c)
    receives data from application as a single stream
  • d)
    all of the mentioned
Correct answer is option 'D'. Can you explain this answer?

Prateek Khanna answered
Transmission Control Protocol (TCP) is a fundamental protocol in the Internet Protocol Suite. It provides reliable, ordered, and error-checked delivery of data between applications running on hosts connected via an IP network. TCP is a connection-oriented protocol that breaks data into packets and reassembles them at the destination.

- TCP is a connection-oriented protocol: TCP establishes a connection between the sender and receiver before data transmission. This connection ensures that data is delivered reliably and in the correct order. It also handles flow control, congestion control, and error recovery.

- Three-way handshake: TCP uses a three-way handshake process to establish a connection. The handshake involves three steps: SYN, SYN-ACK, and ACK. The sender initiates the handshake by sending a SYN packet to the receiver. The receiver responds with a SYN-ACK packet, and finally, the sender acknowledges the receipt with an ACK packet. This handshake ensures that both the sender and receiver are ready to transmit and receive data.

- Single stream of data: TCP treats data from the application as a continuous stream. It breaks down the stream into smaller packets and adds a header to each packet for routing and identification purposes. At the receiving end, TCP reassembles the packets into the original stream of data.

- All of the mentioned: The correct answer is option 'D' because all the statements (a, b, and c) are true. TCP is indeed a connection-oriented protocol, it uses a three-way handshake to establish a connection, and it receives data from the application as a single stream.

TCP is widely used in various applications that require reliable data delivery, such as web browsing, email, file transfer, and real-time communication. By providing reliable transmission and error recovery mechanisms, TCP ensures the integrity and accuracy of data exchanged between hosts on the internet.

Header size of the ICMP message is _________
  • a)
    8-bytes
  • b)
    8-bits
  • c)
    16-bytes
  • d)
    16-bits
Correct answer is option 'A'. Can you explain this answer?

Dhruba Goyal answered
Header size of the ICMP message is 8-bytes

ICMP (Internet Control Message Protocol) is a network protocol used for error reporting, diagnostic, and informational purposes in IP networks. It is primarily used by network devices to communicate error messages, such as unreachable hosts or network congestion, back to the source IP address.

The ICMP message consists of two parts: the ICMP header and the ICMP data. The ICMP header contains essential information about the message, while the ICMP data carries additional details or payload.

Let's explore the header size of the ICMP message:

1. ICMP Header
The ICMP header has a fixed size of 8 bytes (64 bits). It includes the following fields:

- Type (8 bits): Specifies the type of ICMP message, such as echo request (ping), echo reply, destination unreachable, time exceeded, etc.
- Code (8 bits): Further categorizes the ICMP message type. For example, for the destination unreachable type, the code field specifies the reason for the unreachable destination.
- Checksum (16 bits): A checksum is used to detect errors in the ICMP message header and data.
- Rest of Header (32 bits): Reserved for future use and should be set to zero.

2. ICMP Data
The ICMP data field varies in size depending on the ICMP message type. It carries additional information related to the specific ICMP message. For example, in an echo request (ping) message, the data may include a payload that is sent to the destination and returned in the echo reply message.

Summary
In summary, the header size of the ICMP message is 8 bytes (64 bits). The ICMP header contains the type, code, checksum, and reserved fields, while the ICMP data carries additional information specific to the ICMP message type.

Note: It's important to note that the total size of the ICMP message, including both the header and data, may vary depending on the specific ICMP message type and the payload it carries.

A link of capacity 100 Mbps is carrying traffic from a number of sources. Each source generates an on-off traffic stream;
when the source is on, the rate of traffic is 10 Mbps, and when the source is off, the rate of traffic is zero. The duty cycle,
which is the ratio of on-time to off-time, is 1 : 2. When there is no buffer at the link, the minimum number of sources that can be multiplexed on the link so that link capacity is not wasted and no data loss occurs is S1. Assuming that all sources are synchronized and that the link is provided with a large buffer, the maximum number of sources that can be multiplexed so that no data loss occurs is S2. The values of S1 and S2 are, respectively,
  • a)
    10 and 30
  • b)
    12 and 25
  • c)
    5 and 33
  • d)
    15 and 22
Correct answer is option 'A'. Can you explain this answer?

Mahi Yadav answered
Since there is no buffer.. and constraint given is there should not be any data lost, and no wastage of capacity as well..
Since data should not be lost, we calculate for the extreme case when all sources are on-time (that is transmitting)..
10 Mbps * n-station 100 Mbps
n-station = 10..
In the next part of the question it is given that the link is provided with large buffer and we are asked to find out large no. of stations..
for that we'll calculate expected value of bandwidth usage (if more data comes we store in buffer and due to expectation,
the buffer will be emptied soon):
E = 1/3 * 10 + 1/3 * 10 +...n-station times 100 Mbps [ total time is (1+2) = 3 then on time is 1 so 1/3 of BW]
=> 1/3 * 10 * n-station 100 Mbps
=> n-station = 30
so, option (A)

Chapter doubts & questions for Computer Networks - GATE Computer Science Engineering(CSE) 2026 Mock Test Series 2026 is part of Computer Science Engineering (CSE) exam preparation. The chapters have been prepared according to the Computer Science Engineering (CSE) exam syllabus. The Chapter doubts & questions, notes, tests & MCQs are made for Computer Science Engineering (CSE) 2026 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests here.

Chapter doubts & questions of Computer Networks - GATE Computer Science Engineering(CSE) 2026 Mock Test Series in English & Hindi are available as part of Computer Science Engineering (CSE) exam. Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.

Top Courses Computer Science Engineering (CSE)