Showing posts with label GATE questions on Computer Networks. Show all posts
Showing posts with label GATE questions on Computer Networks. Show all posts

Sunday, April 15, 2018

GATE-Computer Networks-Flow Control

1 comment:

Previous GATE questions with solutions on Computer Networks (Flow Control) - CS/IT

GATE -2015
1. Since it is a network that uses switch, every packet goes through two links, one from source to switch and other from switch to destination.
Since there are 10000 bits and packet size is 5000, two packets are sent. Transmission time for each packet is 5000 / 107 seconds
Two hosts are connected via a packet switch with 107 bits per second links. Each link has a propagation delay of 20 microseconds. The switch begins forwarding a packet 35 microseconds after it receives the same. If 10000 bits of data are to be transmitted between the two hosts using a packet size of 5000 bits, the time elapsed between the transmission of the first bit of data and the reception of the last bit of the data in microseconds is _________.
(a) 1075      (b) 1575        (c) 2220         (d) 2200

Ans: option (b)
Explanation:
It is given that there are 10,000 bits and since the packet size id 5000 it means we have 2 packets to send. 
Transmission time for one packet = 5000 / 107 seconds = 500μs
Transmission time is the time taken to transmit a packet from host to the outgoing link.

It is also given that the propagation delay of links is 20μs.  Propagation delay is the time taken by a bit to reach from sender to receiver (in this case from sender to switch it is 20μs and from switch to receiver it 20μs)

Time for the first packet (P1) to reach switch =Transmission time + Propagation delay
=500μs + 20μs = 520μs
Once P1 reaches the switch, the switch will take 35μs to process the packet and then it takes 500μs to transmit it to the link and then the packet will take 20μs to reach the receiver.
Therefore Time taken by P1 to reach from switch to receiver = 35μs + 500μs+ 20μs = 555μs
Therefore time taken by P1 to reach from sender to receiver = 520μs+555μs = 1075μs

But we need to note that after 520μs the switch starts receiving second packet (P2).
i.e. At 520μs+500μs = 1020μs P2 is completely received by switch.
Now Time taken by P2 to reach from switch to receiver = 35μs + 500μs+ 20μs = 555μs
It means that at  1575μs (1020μs+555μs) P2 reaches the destination.


Gate-2015
2. Suppose that the stop-and-wait protocol is used on a link with a bit rate of 64 kilobits per second and 20 milliseconds propagation delay. Assume that the transmission time for the acknowledgement and the processing time at nodes are negligible. Then the minimum frame size in bytes to achieve a link utilization of at least 50% is_________________.
(a) 160      (b) 320      (c) 640      (d) 220      

Ans: option (b)
Explanation:
Since the link utilization should be atleast 50% it means that efficiency, η 50%
Since it is mentioned that it is a stop&wait protocol, the efficiency of the link can be calculated as below:
η =  1 /( 1 + 2a)
a = Tp/Tt (where Tp = Propagation delay & Tt = Transmission Time)
Lets see the length of the packet to achieve a link utilization of 50%
50/100 = 1 /( 1 + 2a)
1/2 = 1 /( 1 + 2a)
a = 1/2
Tp/Tt = 1/2
20/Tt=1/2
Tt = 40ms
Tt = transmission time = L/B (where L = length of packet and B = bandwidth)
L/B = 40
L =40 * B = 40 ms * 64 Kbps = 40*10-3 *64*103 = 2560 bits
Since we need to determine the frame size in bytes L = 2560/8 = 320 bytes.
Therefore, the minimum frame size in bytes to achieve a link utilization of at least 50% is 320bytes


Monday, December 31, 2012

GATE-Computer Networks-TCP/IP

17 comments:
Previous GATE questions with solutions on Computer Networks (TCP/IP) - CS/IT

GATE-2013
1. The transport layer protocols used for real time multimedia, file transfer, DNS and email, respectively are
(a) TCP, UDP, UDP and TCP
(b) UDP, TCP, TCP and UDP
(c) UDP, TCP, UDP and TCP
(d) TCP, UDP, TCP and UDP

Ans: option(c)
Explanation:
Real Time Multimedia: Data packets should be delivered faster. Also it can be unreliable. Therefore UDP.
File Transfer: For example downloading a file. It should be secure and reliable. Therefore TCP.
DNS: uses both UDP and TCP for its transport. But to acheive efficiency DNS uses UDP. To start a TCP connection a minimum of three packets are required (SYN out, SYN+ACK back, ACK out). UDP uses a simple transmission model with a minimum of protocol mechanism. UDP has no handshaking dialogues.
Email: uses SMTP protocol which uses TCP protocol.

Thursday, December 27, 2012

GATE-Computer Networks - Token Ring

1 comment:
Previous GATE questions with solutions on Computer Networks (Token Ring) - CS/IT

GATE - 2007
1. In a token ring network the transmission speed is 10bps and the propagation speed is 200 metres/ms. The 1-bit delay in this network is equivalent to:
(a) 500 metres of cable      (b) 200 metres of cable
(c) 20 metres of cable       (d) 50 metres of cable

Ans: option (c)
Explanation:
Transmission delay for 1 bit t = 1/(107) = 0.1 micro seconds.
Given that propagation speed = 200 meters/ms
That means, 200 meters can be traveled in 1 micro second.
Hence in 0.1 micro seconds, 20 meters can be traveled.

OR

1 Bit Delay = 1/B = 1/(107) = 0.1 micro seconds.
Given that propagation speed = 200 meters/ms
That means, 200 meters can be traveled in 1 micro second. 
Hence in 0.1 micro seconds, 20 meters can be traveled.

Gate - Computer Networks - Ethernet

2 comments:
Previous GATE questions with solutions on Computer Networks (Ethernet) - CS/IT

GATE-2005
1. In a network of LANs connected by bridges, packets are sent from one LAN to another through intermediate bridges. Since more than one path may exist between two LANs, packets may have to be routed through multiple bridges. Why is the spanning tree algorithm used for bridge-routing?
(a) For shortest path routing between LANs
(b) For avoiding loops in the routing paths
(c) For fault tolerance
(d) For minimizing collisions

Ans: Option (b)
Explanation:
The Spanning Tree Protocol is used by OSI Data Link Layer devices to create a spanning tree using the existing links (as the source graph) in order to avoid avoiding loops in the routing paths. 

Wednesday, December 26, 2012

GATE questions on Computer Networks - Sliding Window Protocol

27 comments:
Previous GATE questions with solutions on Computer Networks (Sliding Window Protocol) - CS/IT

GATE-2005
1.The maximum window size for data transmission using the selective reject protocol with n-bit frame sequence numbers is
a) 2n            b) 2n-1                    c) 2n-1                   d)2n-2

Ans: Option b
Explanation:
Selective Reject (or Selective Repeat) protocol is one of the automatic repeat-request (ARQ) techniques used for communications. 
In SR protocol the window size of the receiver and sender must be (N+1)/2, where N is the maximum sequence number.
If N is the maximum available sequence numbers then, the window size of both sender and receiver must be N/2.
If n is the number of bits in the frame sequence field then, the window size of both sender and receiver must be  2n-1.