Computer Networks GATE 2018 Solved Questions

Ques 1: Match the following:

GATE 2018 Q no 13

FieldLength in bits
P. UDP Header’s Port Number
Q. Ethernet MAC Address
R. IPv6 Next Header
S. TCP Header’s Sequence Number
I. 48
II. 8
III. 32
IV. 16

(A) P-III, Q-IV, R-II, S-I

(B) P-II, Q-I, R-IV, S-III

(C) P-IV, Q-I, R-II, S-III

(D) P-IV, Q-I, R-III, S-II

Ans: (C) P-IV, Q-I, R-II, S-III

Solution:

UDP header – 16 bits

MAC address: 48 bits

IPv6 next header: 8 bits

TCP Sequence No.: 32 bits

Ques 2: Consider the following statements regarding the slow start phase of the TCP congestion control algorithm. Note that cwnd stands for the TCP congestion window and MSS window denotes the Maximum Segments Size:

GATE 2018 Q no 14

  1. The cwnd increases by 2 MSS on every successful acknowledgment
  2. The cwnd approximately doubles on every successful acknowledgment
  3. The cwnd increases by 1 MSS every round trip time
  4. The cwnd approximately doubles every round trip time

Which one of the following is correct?

(A) Only (ii) and (iii) are true

(B) Only (i) and (iii) are true

(C) Only (iv) is true

(D) Only (i) and (iv) are true

Ans: (C) Only (iv) is true

Solution: Each time an ACK is received by the sender, the congestion window is increased by 1 segment: CWND=CWND+1

CWND increases exponentially on every RTT.

Ques 3: Consider a long-lived TCP session with an end-to-end bandwidth of 1Gbps(=109 bits-per-second). The session starts with a sequence number of 1234. The minimum time (in seconds, rounded to the closet integer) before this sequence number can be used again is _________.

GATE 2018 Q no 25

Ans: 34 – 35

Solution: Tminimum = Twrap-around = (232 ∗ 8)/109 = 34.35 s

Ques 4: Consider an IP packet with a length of 4,500 bytes that includes a 20-byte IPv4 header and 40-byte TCP header. The packet is forwarded to an IPv4 router that supports a Maximum Transmission Unit (MTU) of 600 bytes. Assume that the length of the IP header in all the outgoing fragments of this packet is 20 bytes. Assume that the fragmentation offset value stored in the first fragment is 0.

GATE 2018 Q no 54

The fragmentation offset value stored in the third fragment is ________.

Ans: 144

Solution: Packet Length = 4500 B

IP Payload  = 4500−20 = 4480

MTU = 600B

MTU Payload = 600B−20B = 580B

But payload should be multiple of 8 so number nearest to 580 and multiple of 8 is 576, so MTU payload = 576 B

IP Packet size = 576 B + 20 B = 596 B

Size of Offset = 576/8 = 72

  • 1st fragment offset  = 0
  • 2nd fragment offset  = 72
  • 3rd fragment offset  = 144

Ques 5: Consider a simple communication system where multiple nodes are connected by a shared broadcast medium (like Ethernet or wireless). The nodes in the system use the following carrier-sense based medium access protocol. A node that receives a packet to transmit will carrier-sense the medium for 5 units of time. If the node does not detect any other transmission, it starts transmitting its packet in the next time unit. If the node detects another transmission, it waits until this other transmission finishes, and then begins to carrier-sense for 5 time units again. Once they start to transmit, nodes do not perform any collision detection and continue transmission even if a collision occurs. All transmissions last for 20 units of time. Assume that the transmission signal travels at the speed of 10 meters per unit time in the medium.

GATE 2018 Q no 55

Assume that the system has two nodes P and Q, located at a distance d meters from each other. P start transmitting a packet at time t=0 after successfully completing its carrier-sense phase. Node Q has a packet to transmit at time t=0 and begins to carrier-sense the medium.

The maximum distance d (in meters, rounded to the closest integer) that allows Q to successfully avoid a collision between its proposed transmission and P’s ongoing transmission is _______.

Ans: 50

Solution: P starts transmission at t=0.

If P’s first bit reaches Q within Q’s sensing window, then Q won’t transmit and there shall be no collision.

Q senses carrier till t = 5.  At t = 6 it starts its transmission.

If the first bit of P reaches Q by t=5, collision can be averted.

Since signal speed is 10  m/time (given), So, max distance between P and Q can be 50 meters.

error: You can only copy the programs code and output from this website. You are not allowed to copy anything else.