Anda di halaman 1dari 34

No part of this publication may be reproduced or distributed in any form or any means, electronic, mechanical,

photocopying, or otherwise without the prior permission of the author.

GATE SOLVED PAPER


Computer Science & Information Technology
Computer Network
Copyright By NODIA & COMPANY

Information contained in this book has been obtained by authors, from sources believes to be reliable. However,
neither Nodia nor its authors guarantee the accuracy or completeness of any information herein, and Nodia nor its
authors shall be responsible for any error, omissions, or damages arising out of use of this information. This book
is published with the understanding that Nodia and its authors are supplying information but are not attempting
to render engineering or other professional services.

NODIA AND COMPANY

B-8, Dhanshree Tower Ist, Central Spine, Vidyadhar Nagar, Jaipur 302039
Ph : +91 - 141 - 2101150
www.nodia.co.in
email : enquiry@nodia.co.in

GATE SOLVED PAPER - CS


COMPUTER NETWORK

Q. 1
GATE 2003

Sol. 1

Which of the following assertions is false about the internet Protocol (IP) ?
(A) It is possible for a computer to have multiple IP addresses
(B) IP packets from the same source to the same destination can take different
routes in the network
(C) IP ensures that a packet is discarded if it is unable to reach its destination
within a given number of hopes
(D) The packet source cannot set the route of an outgoing packets; the route is
determined only by the routing tables in the routers on the way.

GATE 2003

Sol. 2

GATE STUDY PACKAGE

PA

Option (D) is correct.


Option (A): False
We know that an IP address is the address of the connection or a network
interface, not the address of host or the router. So, if a host is on two networks, it
must have two IP address. However, in practice, most hosts are on once network
and thus have one IP address.
Option (B): True
Routing also depends on current network situation such as current traffic,
topology, delay, etc. So, it is possible that IP packets from the same source to the
same destination can take different routes in the network depending on routing
algorithm.
Option (C): True
In IP it is convenient for datagrams to have a life time. Once the lifetime expires,
the datagram is discarded. A simple way to implement lifetime is to use a hop
count. Hops count refer to the number of devices (router) through which a data
packet passes from source to the destination network.
Option (D): True
The source host needs no routing tables because it deliver its packet to the default
router in its local network. Similarly, destination host also needs to routing tables
because it receives the packet from its default router in its local network. Its only
intermediate routers that maintains a routing table that lists, for each possible
destination network, the next router to which the internet datagram should be
sent.

Q. 2

IA

&

Which of the following functionalities must be implemented by a transport


protocol over and above the network protocol ?
(A) Recovery from packet losses
(B) Detection of duplicate packets
(C) Packet delivery in the correct order
(D) End to end connectivity
Option (D) is correct.

Computer Science & Information Technology

GATE SOLVED PAPER - CS

COMPUTER NETWORK

The primary function of the transport layer is to provide process-to-process


communication between end hosts. It can be considered as an end-to-end trasnport
vehicle for transferring data from one point to another. The other services are
secondary.
Q. 3
GATE 2003

Sol. 3

n
i
.
o
c

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.2
(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

.
a

i
d

o
n

Option (D) is correct.


We know that, performing a bitwise logical AND operation between the IP address and
the subnet mask results in the network ID. The network ID must be same for both the
IP address which belong to same network. So we perform an AND operation between
given IP pairs in the options and subnet mast 255.255.31.0. Only Option (4) addresses
give the same network ID as shown below.

Q. 4
GATE 2003

.
w

.
w

.
a

i
d

o
n

n
i
.
o
c

A 2 km long brodcast LAN has 107 bps bandwidth and uses CSMA/CD. The
signal travels along the wire at 2 # 108 m/s. What is the minimum packet size
that can be used on this network ?
(A) 50 bytes
(B) 100 bytes
(C) 200 bytes
(D) None of the above

Sol. 4

Option (C) is correct.


Total distance for RTT = 4 Km
Transfer rate = 2 # 108 ms 1
3
Time to transfer = 4 # 108 = 2 # 10 5 sec
2 # 10
Data rate = 107 bps
Packet size = 2 # 10 5 # 107 bytes
= 200 bytes

Q. 5

Host A is sending data to host B over a full duplex link. A and B are using the
sliding window protocol for flow control. The send and receive window sizes are
5 packets each. Data packets (sent only from A to B) are all 1000 bytes long

GATE 2003

*Shipping Free*

Buy Online all GATE Books: shop.nodia.co.in

*Maximum Discount*

GATE SOLVED PAPER - CS

COMPUTER NETWORK

and the transmission time for such a packet is 50 s . Acknowledgment packets


(sent only from B to A), are very small and require negligible transmission time.
The propagation delay over the link is 200 s . What is the maximum achievable
throughput in this communication ?
(A) 7.69 # 106 bps
(B) 11.11 # 106 bps
(C) 12.33 # 106 bps
(D) 15.00 # 106 bps

n
i
.
o
c

Option (B) is correct..

Sol. 5

.
a

Data packet size


No. of packets
Total data
Propagation delay
Transmission time
Transmission time for 5 packets
Total time for 5 packets
bps

i
d

o
n

.
w

= 1000 bytes
=5
= 5 # 1000 = 5000 bytes.
= 200 s
= 50 s /Packet.

= 50 # 5 = 250 s
= 250 + 200 = 450 s
5000
Throughput (Rate) = Data =
= 11.11 # 106
Time
450 # 10 6

Group I

P.

Data link layer

Choose the best matching Group 1 and Group 2.

Q. 6
GATE 2004

Group II

Ensures reliable transport of data over a


physical point-to-point link

Q. Network layer

2.

Encodes/decodes
transmission

R. Transport layer

3.

4.

data

for

physical

.
a

i
d

o
n

.
w

(A) P-1, Q-4, R-3


(C) P-2, Q-3, R-1
Sol. 6

n
i
.
o
c

1.

Allowed-to-end communication between


two processes
Routes data from one network node to
the next
(B) P-2, Q-4, R-1
(D) P-1, Q-3, R-2

Option (A) is correct.


(P-1) The data link layer provides error-free transfer of data frames from one node to
another over the physical layer.
(Q-4) Network is responsible to implement routing of packets from one network
node to the another. Routing refers to determine the most optimum path the
packet should take from the source to the destination based on network conditions,
priority of service, and other factors.
(R-3) The fourth layer of the OSI model is the transport layer. Purpose of this
layer is to provide a reliable mechanism for the exchange of data between two
processes running on end systems.

Q. 7
GATE 2004

Which of the following is NOT true with respective to a transparent bridge and
a router ?
(A) Both bridge and router selectively farward data packets
(B) A bridge uses IP addresses while a router uses MAC addresses

GATE STUDY PACKAGE


Computer Networks &
Web Technologies

Available Books in the Series


Digital Logic

Computer Science & Information Technology


Software Engineering

GATE SOLVED PAPER - CS

COMPUTER NETWORK

(C) A bridge builds up its routing table by inspecting incoming packets


(D) A router can connect between a LAN and a WAN.
Sol. 7

Q. 8
GATE 2004

Sol. 8

Option (B) is correct.


Bridge is the device which work at data link layer whereas router works at network
layer. Both selectively forward packets, build routing table and connect between
LAN and WAN but since bridge works at data link it uses MAC addresses to
route whereas router uses IP addresses.
Option (B) is false.

GATE 2004

.
a

i
d

How many 8-bit characters can be transmitted per second over a 9600 baud serial
communication link using asynchronous mode of transmission with one start bit,
eight data bits, and one parity bit ?
(A) 600
(B) 800
(C) 876
(D) 1200

o
n

.
w

Option (B) is correct.


Baud is the unit for symbol rate or modulation rate in symbols per second or
pulses per second. It the number of times a signal changes state per second.
Total number of bits = 12
Modulation Rate = 9600 baud
Number of bit (8 bit character) transmitted = 9600 = 800
12 bits
A and B are the only two stations on an Ethernet. Each has a steady queue of
frames to send. Both A and B attempt to transmit a frame, collide, and A wins
the first backoff race, At the end of this successful transmission by A, both A
and B attempt to transmit and collide. The probability that A wins the second
backoff race is
(A) 0.5
(B) 0.625
(C) 0.75
(D) 1.0

Q. 9

n
i
.
o
c

.
a

i
d

o
n

n
i
.
o
c

Sol. 9

Option (B) is correct.


A can choose KA = 0 or 1; B can choose KB = 0, 1, 2, . A wins outright if ^KA, KB h
is among ^0, 1h, ^0, 2h, ^0, 3h, ^1, 2h, ^1, 3h. Going by the Combinations, A will have
5 chances and B has 1 chance out of 8. Rest of the two is Undecided. Hence
Probability for A in 5/8 = 0.625 .

Q. 10

The routing table of a router is shown below :

GATE 2004

Destination

.
w

Subnet Mask

Interface

128.75.43.0

255.255.255.0

Eth 0

128.75.43.0

255.255.255.128

Eth 1

192.12.17.5

255.255.255.255

Eth 3

default

Eth 2

On which interface will the router farward packets addressed to destinations


128.75.43.16 and 192.12.17.10 respectively ?
(A) Eth 1 and Eth 2
(B) Eth 0 and Eth 2
(C) Eth 0 and Eth 3
(D) Eth 1 and Eth 3

*Shipping Free*

Buy Online all GATE Books: shop.nodia.co.in

*Maximum Discount*

GATE SOLVED PAPER - CS

Sol. 10

COMPUTER NETWORK

Option (A) is correct.


The routing process involves AND operation between incoming IP address and
subnet mask. The result gives the network ID (destination). So, we perform AND
operation between given IP address and each of subnet mask.

n
i
.
o
c

.
a

i
d

Since it matches with both the entries, choose longest length subnet mask hence,
this packet is forwarded through Eth1. Now we perform the AND operation for
the another IP 192.12.17.10 and find that there is no match with any destination,
hence packet is forwarded to default destination that is Eth2.

o
n

.
w

Common Data For Q.Common Data Q. 11 & 12 are given below.

Solve the problems and choose the correct answers.


Consider three IP networks A, B and C. Host HA in network A send messages
each containing 180 bytes of application data to a host HC in network C. The
TCP layer prefixes a 20 byte header to the message. This passes through an
intermediate network B. The maximum packet size, including 20 byte IP header,
in each network is
A : 1000 bytes

n
i
.
o
c

B : 100 bytes
C : 1000 bytes
The network A and B are connected through a 1 Mbps link, while B and C are
connected by a 512 Kbps link (bps=bits per second).

Q. 11
GATE 2004

Sol. 11

i
d

o
n

.
w

.
a

Assuming that the packets are correctly delivered, how many bytes, including
headers, are delivered to the IP layer at the destination for one application
message, in the best case ? Consider only data packets.
(A) 200
(B) 220
(C) 240
(D) 260

Option (D) is correct.


It is given that Network A sends a message of size 180 byte. The maximum packet
size limit of Network B is 100 byte including 20 byte header. So, the possible
combination of sending packet from network A to C is

So the packet size = 100 + 100 + 60 = 260 byte


Q. 12
GATE 2004

What is the rate at which application data is transferred to host Hc ? Ignore


errors, acknowledgements, and other overheads.
(A) 325.5 Kbps
(B) 354.5 Kbps
(C) 409.6 Kbps
(D) 512.0 Kpps

GATE STUDY PACKAGE


Computer Networks &
Web Technologies

Available Books in the Series


Digital Logic

Computer Science & Information Technology


Software Engineering

GATE SOLVED PAPER - CS

COMPUTER NETWORK

Sol. 12

Option (B) is correct.


Overall bytes received by Network C, including TCP header and IP header is
260 bytes. Effective data transferred from Network B to Network C is 180 bytes.
Hence effective efficiency = (180/260) # 512 Kbps = 354.46 Kbps

Q. 13

Packets of the same session may be routed through different paths in


(A) TCP, but not UDP
(B) TCP and UDP
(C) UDP but not TCP
(D) Neither TCP, nor UDP

GATE 2005

n
i
.
o
c

.
a

Sol. 13

Option (C) is correct.


In UDP, the user datagrams are not numbered. Also, unlike TCP, there is no
connection establishment and no connection termination. This means that each
user datagram can travel on a different path.

Q. 14

The address resolution protocol (ARP) is used for


(A) Finding the IP address from the DNS
(B) Finding the IP address of the default gateway
(C) Finding the IP address that corresponds to a MAC address
(D) Finding the MAC address that corresponds to an IP address

GATE 2005

i
d

o
n

.
w

Sol. 14

Option (D) is correct.


ARP is used with the IP for mapping a IP address to a MAC address.

Q. 15

The maximum window size for data transmission using the selective reject protocol
with n -bit frame sequence numbers is
(A) 2n
(B) 2n 1
n2
(C) 2n 1
(D) 2

GATE 2005

n
i
.
o
c

.
a

Sol. 15

Option (D) is correct.


For selective Reject Protocol the maximum window size is 2n 1 .

Q. 16

In a network of LANs connected by bridges, packets are set 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

GATE 2005

.
w

o
n

i
d

Sol. 16

Option (B) is correct.


Spanning tree algorithm for a graph is applied to find a tree free of cycles, so in
this network we apply spanning tree algorithm to remove loops in routing paths.

Q. 17

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

GATE 2005

Sol. 17

Option (D) is correct.


Without subletting class B has 16 bits for host number. Now, to create subnets we
borrow some bits from host ID. For 64 departments (subnets) we need to borrow

*Shipping Free*

Buy Online all GATE Books: shop.nodia.co.in

*Maximum Discount*

GATE SOLVED PAPER - CS

COMPUTER NETWORK

6 bits (26 = 64 ) from host bits. Then the subnet mask will be 255.255.252.0 or
/22 (16 bits of network ID + 6 bits of subnets).
Q. 18
GATE 2005

Sol. 18

In a packet switching network, packets are routed from source to destination


along a single path having two intermediate node. If the message size is 24 bytes
and each packet contains a header of 3 bytes, then the optimum packet size is
(A) 4
(B) 6
(C) 7
(D) 9

n
i
.
o
c

.
a

Option (D) is correct.


Let packet size is x bytes. Since header size is 3 bytes, a packet can carry data
equal to x 3 bytes. Now supposes number of packet is n , so for 24 bytes of data
we have

i
d

o
n

n ^x 3h = 24
or
n = 24
x3
For optimum packet size, number of packets n must be minimum. Among given
options, for a packet size x = 9 , we have number of packets
n = 24 = 4
93
So, optimum packet size is 6 byte. We can also check that for option, (A), (B),
(C) number of packets transmitted is be more than 4 and hence network traffic
is more.

Q. 19
GATE 2005

Sol. 19

.
w

n
i
.
o
c

Suppose the round trip propagation delay for a 10 Mbps Ethernet having 48-bit
jamming signal is 46.4 s . The minimum frame size is :
(A) 94
(B) 416
(C) 464
(D) 512

.
a

i
d

Option (D) is correct.

Link speed = 10 Mbps


Delay = 46.4 s
Total bits transferred = 10 # 46.4 # 106 # 10 6 = 464 bits.
But 48 bit jamming signal also required, so
Minimum frame size = 464 + 48 = 512 bits
Q. 20
GATE 2006

o
n

.
w

For which one of the following reason: does Internet Protocol (IP) use the timeto-live (TTL) field in the IP datagram header?
(A) Ensure packets reach destination within that time
(B) Discard packets that reach later than that time
(C) Prevent packets from looping indefinitely
(D) Limit the time for which a packet gets queued in intermediate routers

Option (B) is correct.


TTL field is used to indicate the maximum number of hops the packet is allowed
to traverse in the network. Initially this field is set to some value. Each router that
processes the datagram decrements this value by one. If the value reaches zero, the
router discards the packet and sends an error message to the sender.

Sol. 20

Q. 21
GATE 2006

Station A uses 32 byte packets to transmit messages to Station B using a sliding


window protocol. The round trip delay between A and B is 80 milliseconds and

GATE STUDY PACKAGE


Computer Networks &
Web Technologies

Available Books in the Series


Digital Logic

Computer Science & Information Technology


Software Engineering

GATE SOLVED PAPER - CS

COMPUTER NETWORK

the bottleneck bankwidth on the path between A and B is 128 kbps. What is the
optimal window size that A should use ?
(A) 20
(B) 40
(C) 160
(D) 320
Sol. 21

n
i
.
o
c

Option (B) is correct.

Path bandwidth = 128 kbps


Time delay = 80 ms
Total data = 80 # 128 # 103 # 10 3 bits
= 80 # 128 = 1280 bytes
8

Q. 22
GATE 2006

i
d

o
n

1 packet size = 32 byte


No. of packets (window size) = 1280 = 40
32
Two computers C1 and C2 are configured as follows. C1 has IP address 203.
197.2.53 and netmask 255.255. 128.0. C2 has IP address 203.197.75.201 and
netmask 255.255.192.0. Which one of the following statements is true?
(A) C1 and C2 both assume they are on the same network
(B) C2 assumes C1 is on same network, but C1 assumes C2 is on a different
network
(C) C1 assumes C2 is on same network, but C2 assumes C1 is on a different
network
(D) C1 and C2 both assume they are on different networks

Sol. 22

.
a

.
w

n
i
.
o
c

Option (C) is correct.


First we perform AND operation of the given IP addresses with their respective
subnetmask and find the network addresses.
For network C1:

For network C2:

.
w

o
n

i
d

.
a

We can see that network ID are not same. We can see that network ID (starting
address of block) of computer C1s network is 203.197.0.0. Subnet mask is /17.
To find the last address, we keep the 17, leftmost bits and set the 15 rightmost
bits all to 1s. The last address in this block will be 11001011.11000101.10000000
.00000000 or 203.197.128.0. Since IP address of C2 falls under this range, so C1
assumes that C2 is on same network.
Now we find that the network ID (starting address of block) of computer
C2s network is 203.197.64.0. Subnet mask is /18. To find the last address,
we keep the 18, leftmost bits and set the 14 rightmost bits all to 1s. The
last address in this block will be 11001011.11000101.11000000.00000000 or

*Shipping Free*

Buy Online all GATE Books: shop.nodia.co.in

*Maximum Discount*

GATE SOLVED PAPER - CS

COMPUTER NETWORK

203.197.192.0. Since IP address of C1 falls under this range, so C2 assumes that


C1 is on different network.
Q. 23
GATE 2006

Sol. 23

Station A needs to send a message consisting of 9 packets to Station B using a


sliding window (window size 3) and go-back-N error control strategy. All packets
are ready and immediately available for transmission. If every 5th packet that A
transmits gets lost (but no acks from B ever get lost), then what is the number
of packets that A will transmit for sending the message to B ?
(A) 12
(B) 14
(C) 16
(D) 18

.
a

i
d

Option (A) is correct.

o
n

Sender
Time

n
i
.
o
c

.
w

Packet no.

Receiver

Time

Packet status

ACK

ACK

ACK

ACK

Lost

Discard

5 resend

ACK

10

10

11

11

12

9 resend

4
5
6
7

w
4

Total Time = 12
Hence (A) is correct option.

o
n

.
w

ACK

.
a

i
d
12

n
i
.
o
c
ACK
ACK
Lost
Lost

Common Data For Q.Statement for Linked Answer Questions 24 and 25:

Consider the diagram shown below where a number of LANs are connected by
(transparent) bridges. In order to avoid packets looping through circuits in the graph,
the bridges organize themselves in a spanning tree. First, the root bridge is identified
as the bridge with the least serial number. Next, the root sends out (one or more) data
units to enable the setting up of the spanning tree of shortest paths from the root bridge
to each bridge.
Each bridge identifies a port (the root port) through which it will forward
frames to the root bridge. Port conflicts are always resolved in favour of the
port with the lower index value. When there is a possibility of multiple bridges
forwarding to the same LAN (but not through the root port), ties are broken as
follows: bridges closest to the root get preference and between such bridges, the
one with the lowest serial number is preferred.

GATE STUDY PACKAGE


Computer Networks &
Web Technologies

Available Books in the Series


Digital Logic

Computer Science & Information Technology


Software Engineering

GATE SOLVED PAPER - CS

Q. 24
GATE 2006

Sol. 24

COMPUTER NETWORK

n
i
.
o
c

.
a

i
d

o
n

For the given connection of LANs by bridges, which one of the following choices
represents the depth first traversal of the a spanning tree of bridges?
(A) B1,B5,B3,B4,B2
(B) B1,B3,B5,B2,B4
(C) B1,B5,B2,B3,B4
(D) B1.B3.B4.B5.B2

.
w

Option (C) is correct.


Graphs of the bridge and its spanning tree is shown below.

.
w

.
a

i
d

o
n

n
i
.
o
c

In spanning tree every bridge lies in the tree, but no cycles (or loops) are formed,
hence depth first traversal is B1, B5, B2, B 3, B 4 .
Q. 25
GATE 2006

Consider the correct spanning tree for the previous question. Let host H1 send
out a broadcast ping packet. Which of the following options represents the correct
for forwarding table on B3 ?
(A)
(B)

Hosts

Ports

Hosts

Port

H1,H2,H3,H4

H1, H2

H5,H6,H9,H10

H3, H4

H7,H8,H11,H12

H5, H6

H7, H8, H9, H10

H11, H12

*Shipping Free*

Buy Online all GATE Books: shop.nodia.co.in

*Maximum Discount*

GATE SOLVED PAPER - CS

COMPUTER NETWORK

(D)

(C)

Sol. 25

Hosts

Port

Hosts

Port

H1, H2, H3, H4

H1, H2, H3, H4

H5, H6, H9, H10

H5, H7, H9, H10

H7,H8, H11, H12

n
i
.
o
c

H7, H8, H11, H12

Option (A) is correct.


From the given graphs spanning tree, we can see that port 1, 2, 3 of bridge 3 are
used to access. Becuase forwarding packets to H1, H2 through port 4 and H 3 , H 4
through port 3 forms loop. Hence for H1, H2, H 3, H 4 it should be 3, H5, H 6, H 9, H10
it should be 1, H7, H 8, H11, H12 it should be 2.

.
a

i
d

o
n

.
w

GATE 2007

In Ethernet when manchester encoding is used, the bit rate is


(A) Half the baud rate
(B) Twice the baud rate
(C) Same as the baud rate
(D) None of these

Sol. 26

Option (A) is correct.

Sol. 26

In Manchester encoding each bit is described by 2 voltage levels. The bit rate is
the half the baud rate.

Q. 27

Which one of the following uses UDP as the transport protocol?


(A) HTTP
(B) Telnet
(C) DNS
(D) SMTP

Q. 26

GATE 2007

Sol. 27

Q. 28
GATE 2007

n
i
.
o
c

Option (C) is correct.


HTTP, Telnet and SMTP uses TCP protocol only. DNS uses services of both
UDP and TCP. Domain Name System (DNS) is use to map a name onto an IP
address. The resolver sends a UDP packet to a local DNS server, which then looks
up the name and return the IP address to the resolver, which then returns it to
caller. With this IP address, the program can then establish a TCP connection
with the destination. So DNS uses services of both UDP and TCP.

i
d

o
n

.
w

.
a

There are n stations in a slotted LAN. Each station attempts to transmit with a
probability p in each time slot. What is the probability that ONLY one station
transmits in a given time slot?
(A) np (1 p) n 1
(B) (1 p) n 1
(C) p (1 p) n 1
(D) 1 (1 p) n 1

Sol. 28

Option (A) is correct.


Suppose n nodes with many frames to send, each transmits in slot with probability
p. Probability of a station not to transfer packet is ^1 p h. To get a successful
transmission for a single station, remaining n 1 stations should not transfer
a packet. Probability for n 1 station not to transfer packet will be (1 p) n 1
. Finally, the probability that only one station among n stations transmits will
be np (1 p) n 1 .

Q. 29

In a token ring network the transmission speed is 10 bps and the propagation
speed is 200 metres/ s . The 1-bit delay in this network is equivalent to;
(A) 500 metres of cable
(B) 200 metres of cable

GATE 2007

GATE STUDY PACKAGE


Computer Networks &
Web Technologies

Available Books in the Series


Digital Logic

Computer Science & Information Technology


Software Engineering

GATE SOLVED PAPER - CS

COMPUTER NETWORK

(C) 20 metres of cable


Sol. 29

Q. 30
GATE 2007

Sol. 30

Q. 31
GATE 2007

Sol. 31

(D) 50 metres of cable

Option (C) is correct.


Data Transmission speed is the number of bits per second that can be
transmitted.
1 bit
1
1 bit delay =
=
= 0.1 sec
trasmission speed 107 bit/ sec
Propagation speed is the speed at which a signal moves through a medium. So,
with propagation speed of 200 metres/ s , in 0.1 sec the distance on the cable
will be 200 # 0.1 = 20 meter .

n
i
.
o
c

.
a

i
d

The address of a class B host is to be split into subnets with a 6-bit subnet
number. What is the maximum number of subnets and the maximum number of
hosts in each subnet?
(A) 62 subnets and 262142 hosts
(B) 64 subnets and 262142 hosts
(C) 62 subnets and 1022 hosts
(D) 64 subnets and 1024 hosts

o
n

.
w

Option (C) is correct.


Class B has 14 bits for network (2 bits are reserved for special purpose) id and
16 bits for host number. Now with 6-bit subnet we can have maximum 26 = 64
subnets. But Can be made but all 0s 000000 and all 1s 111111 are used for
default and broadcasting, so only 62 subnets possible.
Similarly we have 16 6 = 10 bits for host IDs. So, the maximum number
of host in each subnet should be 210 = 1024 . Again all 0s and all 1s are not
used so 1022 hosts are possible in each subnet.

n
i
.
o
c

i
d

.
a

The message 11001001 is to be transmitted using the CRC polynomial x + 1 to


protect it from errors. The message that should be transmitted is:
(A) 11001001000
(B) 11001001011
(C) 11001010
(D) 110010010011

.
w

o
n

Option (B) is correct.


Message,
M (x ) = 11001001
Divisor Polynomial,
G (x ) = x3 + 1 & 1001
Since divisor polynomial is of degree 3, we add 3 zero bits to the lower end of
message. This gives 11001001000. Now, We divide 11001001000 by 1001 and
obtain the remainder of the division. The polynomial long division operation is
shown below

*Shipping Free*

Buy Online all GATE Books: shop.nodia.co.in

*Maximum Discount*

GATE SOLVED PAPER - CS

COMPUTER NETWORK

n
i
.
o
c

.
a

i
d

o
n

The 3 bit remainder is 011, So we transmit the original message with this remainder
appended, or 11001001011.
Q. 32
GATE 2007

Sol. 32

.
w

The distance between two stations M and N is L kilo metres. All frames are K
bits long. The propagation delay per kilo metre is t seconds Let R bits/second be
the channel capacity. Assuming that processing delay is negligible, the minimum
number of bits for the sequence number field in a frame for maximum utilization,
when the sliding window protocol is used, is;
(B) :log2 2LtR D
(A) :log2 2LtR + 2K D
K
K

(C) :log2 2LtR + K D


(D) :log2 2LtR + K D
K
2K
Option (C) is correct.
Suppose total number of frames is W . Utilization is given by
Trasnimission delay for W frames
Utilization =
Transmissiond delay + RTT
Given that propagation delay is t , transmission delat will be
Transmission delay = K
R
RTT = 2Lt
W # KR
So,
Utilization = K
R + 2Lt

.
w

.
a

i
d

o
n

n
i
.
o
c

For maximum utilization, above expression should be equal to 1. So


W # KR
=1
K
R + 2Lt
or,
W = K + 2LtR
K
Let n be number of bits for the sequence number fields, then W = 2n , or we have
2n = K + 2LtR
K
K + 2LtR
D
or,
n = :log 2
K

Q. 33
GATE 2007

Match the following:


P. SMTP
Q. BGP
R. TCP

GATE STUDY PACKAGE


Computer Networks &
Web Technologies

1. Application layer
2. Transport layer
3. Data link layer

Available Books in the Series


Digital Logic

Computer Science & Information Technology


Software Engineering

GATE SOLVED PAPER - CS

S.

COMPUTER NETWORK

PPP

4. Network layer
5. Physical layer

(A) P-2,Q-1,R-3,S-5
(B) P-1,Q-4,R-2,S-3
(C) P-1,Q-4,R-2,S-5
(D) P-2,Q-4,R-1,S-3
Sol. 33

Q. 34
GATE 2008

n
i
.
o
c

.
a

Option (B) is correct.


SMTP (Simple mail transfer Protocol) is an application layer protocol used
to to send and receive electronic mail. (P-1)
Border Gateway Protocol (BGP) is an interdomain routing protocol used at
network layer. (Q-4)
TCP (Transport Control Protocol) is a connection-oriented transport layer
protocol that provides reliable services between processes on different hosts.
(R-2)
PPP (Point to Point protocol) is data link layer based protocol. It
establishes a direct connection between two networking nodes. (S-3)

i
d

o
n

.
w

What is the maximum size of data that the application layer can pass on to the
TCP layer below?
(A) Any size
(B) 216 bytes size of TCP header

(C) 2 bytes
16

n
i
.
o
c

(D) 1500 bytes

Sol. 34

Option (B) is correct.


Application layer pass data to TCP layer. The length is of 16 bits. So total length
216 bytes. But this is not complete payload, it has header also. So actual data size
is 216 bytes Size of TCP header.

Q. 35

In the slow start phase of TCP congesting control algorithm, the size of the
congestion window
(A) Does not increase
(B) Increases linearly
(C) Increases quadratically
(D) Increases exponentially

GATE 2008

.
w

o
n

i
d

.
a

Sol. 35

Option (D) is correct.


Slow start is one of the algorithm that TCP uses to control congestion inside the
network. In slow start, the window size grows exponentially.

Q. 36

If a class B network on the Internet has a subnet mask of 255.255.248.0, what is


the maximum number of hosts per subnet?
(A) 1022
(B) 1023
(C) 2046
(D) 2047

GATE 2008

Option (C) is correct.


Default subnet mask of class B is 11111111.11111111.00000000.00000000.
Given Subnet mask
11111111.11111111.11111000.00000000.
As we know to create subnets, we borrow some bits from the host ID field to create
subnets. Here 5 bits are borrowed from host part. So now we have 16 5 = 11 bits for
host addresses. Therefore number of Hosts per subnet will be 211 2 = 2046 .

Sol. 36

*Shipping Free*

Buy Online all GATE Books: shop.nodia.co.in

*Maximum Discount*

GATE SOLVED PAPER - CS

Q. 37
GATE 2008

Sol. 37

Q. 38
GATE 2008

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

n
i
.
o
c

Option (B) is correct.


In token bucket algorithm, if we call the burst length S sec , the token bucket
capacity C bytes , the token arrival rate p bytes sec , and the maximum output rate
M bytes sec , we see that an output bursts contains a maximum of C + pS bytes .
We also know that the number of bytes in a maximum-speed burst of length S sec
is MS . Therefore, we have

.
a

i
d

o
n

.
w

C + pS = MS
or
S = C = 16 = 2 sec
M p 10 2
A client process P needs to make a TCP connection to a server Process S .
Consider the following situation; the server process S executes a socket (), a
bind() and a listen () system call in that order, following which it is preempted.
Subsequently, the client Process P executes a socket () system call followed by
connect () system call to connect to the server process S . The server process has
not executed any accept() system call. Which one of the following events could
take place?
(A) connect ( ) system call returns successfully
(B) connect ( ) system call blocks
(C) connect ( ) system call returns an error
(D) connect ( ) system call results in a core dump

Sol. 38

COMPUTER NETWORK

o
n

.
w

.
a

i
d

Option (C) is correct.

n
i
.
o
c

Since accept () call is not executed then connect () gets no response for a time
stamp to wait and then return no response server error.
Q. 39
GATE 2009

In the RSA public key cryptosystem, the private and the public keys are (e , n )
and (d , n ) respectively, where n = p) and p and q are large primes. Besides, n
is public and p and q are private. Let M be an integer such that 0 < M < n and
(n) = (p 1) (q 1). Now consider the following equations.
I. M = Me mod n

GATE STUDY PACKAGE


Computer Networks &
Web Technologies

Available Books in the Series


Digital Logic

Computer Science & Information Technology


Software Engineering

GATE SOLVED PAPER - CS

M= M
II ed /
III ed /
IV M = Me

COMPUTER NETWORK

n
n
n

n
M= M
n
Which of the above equations correctly represent RSA cryptosystem ?
(A) I and II
(B) I and III
(C) II and IV
(D) III and IV

n
i
.
o
c

Sol. 39

Q. 40
GATE 2009

Sol. 40

Q. 41
GATE 2009

.
a

i
d

Option (B) is correct.


1. RSA uses two exponents e and d , where e is public and d is private.
2. The RSA scheme is a block cipher. Each plaintext block is an integer
between 0 and n 1 for some n , which leads to a block size # log 2 ^n h.
3. The typical size for n is 1024 bits. The steps of procedure are given below
Pick two large prime numbers p and q , p ! q
Calculate n = p # q
Calculate ^n h = ^p 1h^q 1h
Pick e , so that gcd ^e, ^n hh = 1, 1 < e < ^n h,
Calculate d , so that d : e mod ^n h = 1, i.e., d is the multiplicative inverse of
e in mod ^n h
Get public key as KU = "e, n ,
Get private key as KR = "d, n ,
4. Encryption: For plaintext block M < n , its ciphertext M l = M e mod n .
5. Decryption: For ciphertext block Ml, its plaintext is M = ^M lhd mod n

o
n

.
w

n
i
.
o
c

i
d

.
a

While opening a TCP connection, the initial sequence number is to be derived


using a time-of-day (ToD) clock that keeps running even when the host is down.
The low order 32 bits of the counter of TOD clock is to be used for the initial
sequence numbers. The clock counter increments once per millisecond. The
maximum packet lifetime is given to be 64s.
Which one of the choices given below is closet to the minimum permissible rate at
which sequence numbers used for packets of a connection can increase ?
(A) 0.015/s
(B) 0.064/s
(C) 0.135/s
(D) 0.327/s

.
w

o
n

Option (B) is correct.


Wraparound time of sequence numbers should not be less than life period of the
packet.
Packet life time = 64 sec
Increment time = 1 ms
So rate of generation of packets = 64 = 0.064 /sec
1
LetG (x) be the generator polynomial used for CRC checking. What is the condition
that should be satisfied by G (x) to detect odd number of bits in error ?
(A) G (x) contains more than two terms
(B) G (x) does not divide 1 + xk , for any k not exceeding the frame length
(C) 1 + x is a factor of G (x)

*Shipping Free*

Buy Online all GATE Books: shop.nodia.co.in

*Maximum Discount*

GATE SOLVED PAPER - CS

COMPUTER NETWORK

(D) G (x) has an odd number of terms


Sol. 41

Option (C) is correct.


No polynomial with an odd number of terms has 1 + x as a factor in modulo 2
system. By making 1 + x a factor of G (x), we can catch all errors consisting of an
odd number of inverted bits.

n
i
.
o
c

Common Data For Q.Common Data For Q. 42 & 43

.
a

Frames of 1000 bits are sent over a 106 bps duplex link between two hosts. The
propagation time is 25 ms. Frames are to be transmitted into to maximally pack
them in transit (within the link).
Q. 42
GATE 2009

Sol. 42

i
d

o
n

What is the minimum number of bits (l) that will be required to represent the
sequence numbers distinctly ? Assume that no time gap needs to be given between
transmission of two frames.
(A) l = 2
(B) l =
(C) l =
(D) l = 5

.
w

Option (D) is correct.


The link is a Duplex hence we need not wait for twice the propagation time for
sending the frame belonging to next window. If the sender window is of size N .
Link capacity = 106 bps

n
i
.
o
c

Propagation time = 25 ms
Total data = 106 # 25 # 10 3 = 25 kb
Frame size = 1000 bits
No. of frames (N ) = 25 # 1000 = 25 = 25
1000
So minium number of bits required to represent 25 frames distinctly is l = 5 bits.
Q. 43
GATE 2009

.
a

i
d

Suppose that the sliding window protocol is used with the sender window size of 2l
, where l is the number of bits identified in the earlier part and acknowledgements
are always piggy backed. After sending 2l frames, what is the minimum time the
sender will have to wait before starting transmission of the next frame ? (Identify
the closest choice ignoring the frame processing time)
(A) 16 ms
(B) 18 ms
(C) 20 ms
(D) 22 ms

.
w

o
n

Sol. 43

Option (B) is correct.


Time taken to send 106 bits = 1 sec
Time taken to send 1 bits = 1 6 sec
10
Sequence number field l = 5 , so there are 32 frames, each frame having 1000 bits.
So,
Time taken to send 32 frames = 1 6 # 32 # 1000 = 32 ms
10
Time taken for the first frame to be acknowledged = 2 # RTT
= 25 # 2 = 50 ms
Hence minimum time sender has to wait to transfer next set of packets will be
50 32 = 18 ms .

Q. 44

One of the header fields in an IP datagram is the Time-to-Live (TTL) field.

GATE 2010

GATE STUDY PACKAGE


Computer Networks &
Web Technologies

Available Books in the Series


Digital Logic

Computer Science & Information Technology


Software Engineering

GATE SOLVED PAPER - CS

COMPUTER NETWORK

Which of the following statements best explains the need for this field ?
(A) It can be used to prioritize packets
(B) It can be used to reduce delays
(C) It can be used to optimize throughput
(D) It can be used to prevent packet looping
Sol. 44

Q. 45
GATE 2010

Sol. 45

GATE 2010

Sol. 46

.
a

i
d

Which one of the following is not a client-server application ?


(A) Internet chat
(B) Web browsing
(C) E-mail
(D) Ping

o
n

.
w

Option (D) is correct.


Internet chat is maintained by chat servers, web browsing is sustained by web
servers, E-mails are stored at mail servers, but ping is a utility which is used to
identify connection between any two computer. One can be client, other can be
client or server anything but aim is to identify whether connection exists or not
between the two.

Q. 46

n
i
.
o
c

Option (D) is correct.


Time to live field in IP datagram signifies the time stamp for which that packet
is valid, if it reaches to a particular hop late than this time stamp it needed to be
discarded. This prevents looping of packets.

Suppose computers A and B have IP addresses 10.105.1.113 and 10.105.1.91


respectively and they both use the same netmask N. Which of the values of N
given below should not be used if A and B should belong to the same network ?
(A) 225.255.255.0
(B) 255.255.255.128
(C) 255.255.255.192
(D) 255.255.255.224

n
i
.
o
c

.
a

Option (D) is correct.


The AND operation between IP address and Subnet mask gives the network ID
or subnet ID. If both the computers are on same network the result will be same.
So we perform AND operations of given IP addresses with the given subnet masks
in the options. We find the subnet mask given in Options (A), (B) and (C) when
ANDED with given IPs will give same network ID. Only mask in option (D),
gives two different network IDs as shown in Figure.

.
w

o
n

i
d

Common Data For Q.Common Data For Q. 47 & 48


Consider a network with 6 routers R1 and R6 connected with links having weights
as shown in the following diagram.

*Shipping Free*

Buy Online all GATE Books: shop.nodia.co.in

*Maximum Discount*

GATE SOLVED PAPER - CS

Q. 47
GATE 2010

Sol. 47

COMPUTER NETWORK

n
i
.
o
c

.
a

All the routers use the distance vector based routing algorithm to update their
routing tables. Each starts with its routing table initialized to contain an entry
for each neighbour with the weight of the respective connecting link. After all
the routing tables stabilize, how many links in the network will never be used for
carrying any data ?
(A) 4
(B) 3
(C) 2
(D) 1

i
d

o
n

.
w

Option (C) is correct.


The routing table are as shown below:

.
w

.
a

i
d

o
n

n
i
.
o
c

From the routing tables, we can conclude followings:

will never be used as we have alternative short routes with


a weight of 5. See highlighted entry in Table for R1.

Similarly
never be used as we have alternative short routes
with a weight of 5 See highlighted entry in table for R4.
So, after all the routing tables stabilize, these two links never be used for carrying
data.

GATE STUDY PACKAGE


Computer Networks &
Web Technologies

Available Books in the Series


Digital Logic

Computer Science & Information Technology


Software Engineering

GATE SOLVED PAPER - CS

Q. 48
GATE 2010

COMPUTER NETWORK

Suppose the weights of all unused links in the previous question are changed to 2
and the distance vector algorithm is used again until all routing tables stabilize.
How many links will now remain unused ?
(A) 0
(B) 1
(C) 2
(D) 3

n
i
.
o
c

Option (B) is correct.


Network graph with new weights is shown in Figure below

Sol. 48

.
a

i
d

o
n

.
w

Now we construct the routing tables again as shown below:

.
w

.
a

i
d

o
n

n
i
.
o
c

We can see that link


is not used as we have alternative short
routes with a weight of 3. See highlighted entry in Table for R5. So, only one link
not used.
Q. 49
GATE 2011

A layer-4 firewall (a device that can look at all protocal headers up to the transport
layer) CANNOT
(A) block entire HTTP traffic during 9:00 pm and 5:00 am
(B) block all ICMP traffic
(C) stop incoming traffic from a specific IP address but allow outgoing traffic to
the same IP address
(D) Block TCP traffic from a specific user on a multi-user system during 9:00
pm and 5:00 am

*Shipping Free*

Buy Online all GATE Books: shop.nodia.co.in

*Maximum Discount*

GATE SOLVED PAPER - CS

COMPUTER NETWORK

Sol. 49

Option (A) is correct.


HTTP is an application layer protocol. Since firewal is at layer 4, it cannot block
HTTP data.

Q. 50

Consider different activities related to email


m1 : Send an e-mail from a mail client to a mail server
m2 : Download an e-mail from mailbox server to a mail client
m3 : Checking e-mail in a web browser
Which is the application layer protocol used in each activity ?
(A) m1:HTTP m2:SMTP m3:POP
(B) m1:SMTP m2:FTP
m3:HTTP
(C) m1:SMTP m2:POP
m3:HTTP
(D) m1:POP
m2:SMTP m3:IMAP

GATE 2011

Sol. 50

n
i
.
o
c

.
a

i
d

o
n

.
w

Option (C) is correct.


Simple Mail Transfer Protocol (SMTP) is a protocol to send electronic mail.
SMTP transfers messages from senders mail servers to the recipients mail
servers using TCP connections.
For a variety of reasons, SMTP is not used for the process of accessing
a mailbox, but rather a special set of protocols and methods designed
specifically for electronic mail access and retrieval. There are two primary
protocols used by email client applications to retrieve email from mail
servers: the Post Office Protocol (POP) and the Internet Message Access
Protocol (IMAP).
Finaly HTTP is used to display mail.

n
i
.
o
c

.
a

Common Data For Q.Linked Data Questions 51 & 52

i
d

Consider a network with five nodes, N1 to N5, as shown below.

.
w

o
n

The network uses a Distance Vector Routing protocol. Once the routes have stabilized,
the distance vectors at different nodes are following.
N1 : (0, 1, 7, 8, 4)
N2 : (1, 0, 6, 7, 3)
N3 : (7, 6, 0, 2, 6)
N4 : (8, 7, 2, 0, 4)
N5 : (4, 3, 6, 4, 0)
Each distance vector is the distance of the best known path at that instance to nodes,
N1 to N5, where the distance to itself is 0. Also, all links are symmetric and the cost
is identical in both directions. In each round, all nodes exchange their distance vectors
with their respective neighbors. Then all nodes update their distance vecotrs. In
betweeen two rounds, any change in cost of a link will cause the two incident nodes to
change only that entry in their distance vectors.

GATE STUDY PACKAGE


Computer Networks &
Web Technologies

Available Books in the Series


Digital Logic

Computer Science & Information Technology


Software Engineering

GATE SOLVED PAPER - CS

Q. 51
GATE 2011

Sol. 51

COMPUTER NETWORK

The cost of link N2-N3 reduces to 2(in both directions). After the next round of
updates, what will be the new distance vector at node, N3?
(A) (3, 2, 0, 2, 5)
(B) (3, 2, 0, 2, 6)
(C) (7, 2, 0, 2, 5)
(D) (7, 2, 0, 2, 6)

n
i
.
o
c

Option (A) is correct.


New graph of the network is shown below:

.
a

i
d

o
n

.
w

Now, we construct the routing Table for N3 as shown below

n
i
.
o
c

i
d

.
a

So the distance vector for N3 is (3, 2, 0, 2, 5).

o
n

Q. 52

After the update in the previous question, the link N1-N2 goes down. N2 will
reflect this change immediately in its distance vector as cost 3. After the NEXT
ROUND of update, what will be the cost to N1 in the distance vector of N3 ?
(A) 3
(B) 9
(C) 10
(D) 3

Sol. 52

Option (C) is correct.


In the next round, N3 will receive distance from N2 to N1 as infinite. It will
receive distance from N4 to N1 as 8. So it will update distance to N1 as 8 + 2=10.

Q. 53

The Protocol Data Unit (PDU) for the application layer in the Internet stack is
(A) Segment
(B) Datagram
(C) Message
(D) Frame

GATE 2012

.
w

Sol. 53

Option (C) is correct.


Message " Application layer
Segment " Transport layer
Datagram " Network layer
Frame " Data link layer

Q. 54
GATE 2012

Which of the following transport layer protocols is used to support electronic

*Shipping Free*

Buy Online all GATE Books: shop.nodia.co.in

*Maximum Discount*

GATE SOLVED PAPER - CS

COMPUTER NETWORK

mail?
(A) SMTP
(C) TCP

(B) IP
(D) UDP

Sol. 54

Option (C) is correct.


E-mail uses SMTP as application layer protocol. SMTP uses TCP as transport
layer protocol.

Q. 55

In the IPv4 addressing format, the number of networks allowed under Class C
addresses is
(A) 214
(B) 27
(C) 221
(D) 224

GATE 2012

n
i
.
o
c

.
a

i
d

o
n

Sol. 55

Option (C) is correct.


Class C has 21 bits for network id and 8 bits for host number. This means there
can be 221 class C networks and each of them can have 28 = 256 hosts.

Q. 56

An Internet Service Provider (ISP) has the following chunk of CIDR-based IP


addresses available with it: 245.248.128.0/20. The ISP wants to give half of this
chunk of addresses to Organization A, and a quarter of Organization B , while
retaining the remaining with itself. Which of the following is a valid allocation of
addresses to A and B ?
(A) 245.248.136.0/21 and 245.248.128.0/22
(B) 245.248.128.0/21 and 245.248.128.0/22
(C) 245.248.132.0/22 and 245.248.132.0/21
(D) 245.248.136.0/24 and 245.248.132.0/21

GATE 2012

Sol. 56

GATE 2012

n
i
.
o
c

.
a

Option (A) is correct.


It has 20 bit mask, so total no. of hosts are 212 = 4096 . Now half of the addresses
(2048) are assigned to organization A. This means the suffix length is 11 (
211 = 2048 ). The prefix length is then 32 11 = 21. So the CIDR notation for
Organization As allocation is /21. Organization B is assigned a quarter of
the total addresses that is 1024 addresses. This means the suffix length is 10 (
210 = 1024 ).The prefix length is then 32 22 = 10 . So the CIDR notation for
Organization As allocation is /22.
Now we check all the options and find that only options (A) and (B)
macth with these prefixes. Now we need to choose from option (A) and (B).
To assign addresses to organization A, ISP needs to take first 20 bits from
245.248.128.0 and fix the 21st bit as 0 or 1. Similarly, ISP needs to fix 21st and
22nd bits for organization B. If we take a closer look at the options (A) and
(B), we can see the 21st and 22nd bits for organization B are considered as 0
in both options. So 21st bit of organization A must be 1. Now take the first 20
bits from 245.248.128.0 and 21st bit as 1, we get addresses for organization A as
245.248.136.0/21

Q. 57

.
w

o
n

.
w

i
d

Consider a source computer (S ) transmitting a file of size 106 bits to a destination


computer (D ) over a network of two routers (R1 and R2 ) and three links (L1 , L2
and L 3 ). L1 connects S to R1; L2 connects R1 to R2 ; and L 3 connects R2 to D . Let
each link be of length 100 km. Assume signals travel over each link at a speed of
108 meters per second. Assume that the link bandwidth on each link is 1 Mbps.
Let the file be broken down into 1000 packets each of size 1000 bits. Find the total

GATE STUDY PACKAGE


Computer Networks &
Web Technologies

Available Books in the Series


Digital Logic

Computer Science & Information Technology


Software Engineering

GATE SOLVED PAPER - CS

COMPUTER NETWORK

sum of transmission and propagation delays in transmitting the file from S to D ?


(A) 1005 ms
(B) 1010 ms
(C) 3000 ms
(D) 3003 ms
Sol. 57

Option (A) is correct.

n
i
.
o
c

.
a

Propagation delay to travel from S to R2,


dP1 = dis tan ce
link speed

i
d

o
n

dP1 = 100 #8 10 = 1 ms
10
Total prorogation delay to travel from S to D

.
w

dP = 3dP1 = 3 ms
Total transmission delay for 1 packet
dT = 3 # Number of bits
Bandwidth
dT = 3 # 1006 = 3 ms
10
The first packet will take dP + dT = 6 ms to reach D. While first packet was
reaching D, other packets must have been processing in parallel. So D will receive
remaining packets 1 packet per 1 ms from R2. So remaining 999 packets will take
999 ms. And total time will be 999 + 6 = 1005 ms.

Q. 58
GATE 2012

Sol. 58

n
i
.
o
c

Consider an instance of TCPs Additive Increase Multiplicative Decrease (AIMD)


algorithm where the windows size at the start ofthe slow start phase is 2 MSS
and the threshold at the start of the first transmission is 8 MSS. Assume that a
time-out occurs during the fifth transmission. Find the congestion window size at
the end of the tenth transmission.
(A) 8 MSS
(B) 14 MSS
(C) 7 MSS
(D) 12 MSS

.
w

o
n

i
d

.
a

Option (B) is correct.


Since Slow Start is used, window size is increased by the number of segments
successfully sent. This happens until either threshold value is reached or time out
occurs.
In both of the above situations AIMD is used to avoid congestion. If threshold is
reached, window size will be increased linearly. If there is timeout, window size
will be reduced to half.

Window size for 1st transmission = 2 MSS


Window size for 2nd transmission = 4 MSS
Window size for 3rd transmission = 8 MSS
threshold reached, increase linearly (according to AIMD)
Window size for 4th transmission = 9 MSS
Window size for 5th transmission = 10 MSS
time out occurs, resend 5th with window size reduced to half (according to AIMD)
Window size for 5th transmission = 5 MSS

*Shipping Free*

Buy Online all GATE Books: shop.nodia.co.in

*Maximum Discount*

GATE SOLVED PAPER - CS

COMPUTER NETWORK

Window size for 6th transmission = 10 MSS


threshold reached, now increase linearly (according to AIMD)
Window size for 7th transmission = 11 MSS
Window size for 8th transmission = 12 MSS
Window size for 9th transmission = 13 MSS
Window size for 10th transmission = 14 MSS
Q. 59
GATE 2013
2 MARKS

Sol. 59

Q. 60
GATE 2013
2 MARK

Sol. 60

n
i
.
o
c

Determine the maximum length of the cable (in km) for transmitting data at a
rate of 500 Mbps in an Ethernet LAN with frames of size 10,000 bits. Assume the
signal speed in the cable to be 2,00,000 km/s.
(A) 1
(B) 2
(C) 2.5
(D) 5

.
a

i
d

o
n

Option (B) is correct.


For maximum length
Propagation Time = 2 # Transmission Time
Frame Size =
2 # dis tan ce
Bandwidth
Propogation Speed
10000 bit
2#L
=
6
500 # 10 bits/ sec
2 # 105 km/ sec
L = 2 km
So, the maximum length of the cable (in Km) is 2 Km.

.
w

n
i
.
o
c

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 if 300. 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

.
a

i
d

Option (C) is correct.


Since More Fragment bit (M -bit) is set to 0, it means this is the last fragment.
It defines the total length of IP header in multiples of 4 bytes. So HLEN = 10
means that total length of header is 10 # 4 = 40 bytes
Length of data (Payload) = total length header length

o
n

.
w

= 400 40 = 360
Fragmentation offset field indicates the location of a fragments in its whole
datagram. The value measures the offset in units of 8 bytes. The data length of
each fragment, except the last one, must be a multiple of eight bytes. Therefore,
the sequence number of the first byte of payload is 300 # 8 = 2400
Since the length of the data is 360 Bytes, so sequence number of last byte on this
datagram will be 2400 + 359 = 2759

Q. 61
GATE 2013
1 MARK

Sol. 61

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
Option (C) is correct.

GATE STUDY PACKAGE


Computer Networks &
Web Technologies

Available Books in the Series


Digital Logic

Computer Science & Information Technology


Software Engineering

GATE SOLVED PAPER - CS

Q. 62
GATE 2013
1 MARK

TCP is connection-oriented protocol which provides reliable, ordered and


secured data transfer, but its comparatively slow. Example of TCP uses are:
World Wide Web (Apache TCP port 80), e-mail (SMTP TCP port 25 Postfix
MTA), File Transfer Protocol (FTP port 21) and Secure Shell (OpenSSH port
22) etc.
UPD is a connection-less protocol, it does not provide reliability and ordered
delivery of packets. All it cares about is fast transmission. UDP is used for
transfer of certain data type which do not require reliable delivery and extra
overhead. Real-time traffic for example, needs to be transported in an efficient
way without error correction and retransmission mechanisms. Some of the
uses of UDP are: Domain Name System (DNS UDP port 53), streaming
media applications such as IPTV or movies, Voice over IP (VoIP), Trivial File
Transfer Protocol (TFTP) and online multiplayer games etc.

Q. 63
GATE 2013
1 MARK

.
a

i
d

o
n

.
w

n
i
.
o
c

.
a

Option (D) is correct.


In public key cryptography, the sender encrypts the message using a public
key and the receiver decrypts using a secret (or private) key.
In a digital signature, the signer uses her private key to sign a document.
The verifier, on the other hand, uses the public key of the signer to verify the
document.
By combining above two, we can conclude that message is digitally signed and
encrypted by using Xs private key followed by Ys public key. On receiving the
encrypted message, Y will decrypt it using its private key and Xs public key for
signature. So (D) is the correct answer.

.
w

o
n

i
d

Assume that source S and destination D are connected through two intermediate
routers labels R. Determine how many times each packet has to visit the network
layer and the data link layer during a transmission from S to D .

(A)
(B)
(C)
(D)
Sol. 63

n
i
.
o
c

Using public key cryptography, X adds a digital signature to message M,


encrypts < M , >, and sends it to Y, where it is decrypted. Which one of the
following sequence of keys is used for the operations?
(A) Encryption : Xs private key followed by Ys private key; Decryption : Xs
public key followed by Ys public key
(B) Encrytion : Xs private key followed by Ys private key; Decryption : Xs
public key followed by Ys private key
(C) Encryption : Xs public key followed by Ys private key; Decryption : Ys
public key followed by Xs private key
(D) Encryption : Xs private key followed by Ys public key; Decryption : Ys
private key followed by Xs public key

Sol. 62

COMPUTER NETWORK

Network
Network
Network
Network

layer
layer
layer
layer

- 4 times and Data link layer -4 times


-4 times and Data link layer - 3 times
-4 times and Data link layer - 6 times
- 2 times and Data link layer - 6 times

Option (C) is correct.


In the layered architecture sender and receiver uses all the 5 layers and router do

*Shipping Free*

Buy Online all GATE Books: shop.nodia.co.in

*Maximum Discount*

GATE SOLVED PAPER - CS

COMPUTER NETWORK

processing upto the network layer. The layers accessed by sender, receiver, routers
and links are shown in Figure below.

n
i
.
o
c

.
a

i
d

We can seen that network layer is visited 4 times and data link layer is visited 6
times.
Q. 64
GATE 2014
1 MARK

Sol. 64

Q. 65
GATE 2014
1 MARK

Sol. 65

o
n

.
w

Consider the following three statements about link state and distance vector
routing protocols, for a large network with 500 network nodes and 4000 links.
S1: The computational overhead in link state protocols is higher than in distance
vector protocols.
S2: A distance vector protocol (with split horizon) avoids persistent routing loops,
but not a link state protocol.
S3: After a topolgy change, a link sate protocol will converge faster than a distance
vector protocol.
Which one of the following is correct about S1, S2, and S3?
(A) S1, S2, and S3 are all true.
(B) S1, S2, and S3 are all false.
(C) S1 and S2 are true, but S3 is false.
(D) S1 and S3 are ture, but S2 is false.

n
i
.
o
c

.
a

Option (D) is correct.


S1 (True): In link state routing, each router floods information about the state
of the links that connect it to its neighbors. The amount of information
stored at each node can be quite large, therefore, computational overhead
in link state protocols is higher than in distance vector protocols.
S2 (False): In distance vector routing, measures like split horizon and poison
reverse are employed to avoid routing loops.
S3 (True): In link state, each router is allowed construct a map of the entire
network and from this map derive the routing table using the Dijkstra
Algorithm. If the state of the link changes, the router detecting the change
will flood the new information throughout the network. Thus, link-state
routing typically converges faster than distance vector routing.

o
n

.
w

i
d

Which of the following are used to generate a message digest by the network
security protocols?
(P) RSA
(Q) SHA-1
(R) DES
(S) MD5
(A) P and R only
(B) Q and R only
(C) Q and S only
(D) R and S only
Option (C) is correct.
A Message Digest is a digitally created hash (fingerprint) created from a plaintext
block. All the information of the message is used to construct the Message Digest

GATE STUDY PACKAGE


Computer Networks &
Web Technologies

Available Books in the Series


Digital Logic

Computer Science & Information Technology


Software Engineering

GATE SOLVED PAPER - CS

COMPUTER NETWORK

hash, but the message cannot be recovered from the hash. For this reason,
Message Digests are also known as one way hash functions. There are serval hash
algorithms such as MD2, MD4, and MD5, where MD stands for Message Digest.
MD hash algorithms was insecure, so another hash algorithm was invented called
Secure Hash Algorithm (SHA). It has serval versions.
Q. 66
GATE 2014
1 MARK

n
i
.
o
c

Which one of the following is TRUE about the interior gateway routing protocols
Routing Information Protocol (RIP) and Open Shortest Path First (OSPF)
(A) RIP uses distance vector routing and OSPF uses link state routing
(B) OSPF uses distance vector routing and RIP uses link state routing
(C) Both RIP and OSPF use link state routing
(D) Both RIP and OSPF use distance vector routing

.
a

i
d

o
n

.
w

Sol. 66

Option (A) is correct.


Routing Information Protocol (RIP) is a simple intradomain protocol used by
routers to exchange routing information. It is based on distance vector algorithm.
The OSPF routing protocol is another intradomain routing protocol. It uses link
state routing algorithm.

Q. 67

An IP machine Q has a path to another IP machine H via three IP routers R1,


R2, and R3.
QR1R2R3H
H acts as an HTTP server, and Q connects to H via HTTP and downloads a file.
Session layer encryption is used, with DES as the shared key encryption protocol,
Consider the following four pieces of information:
[I1] The URL of the file downloaded by Q
[I2] The TCP port numbers at Q and H
[I3] The IP addresses of Q and H
[I4] The link layer addresses of Q and H
Which of I1, I2, I3, and I4 can an intruder learn through sniffing at R2 alone?
(A) Only I1 and I2
(B) Only 11
(C) Only 12 and 13
(D) Only 13 and 14

GATE 2014
2 MARK

Sol. 67

GATE 2014
1 MARK

.
w

.
a

i
d

o
n

n
i
.
o
c

Option (C) is correct.


[I1] URLs and Download are related to the Application layer of OSI Model,
therefore, an Intruder cant learn through sniffing at R2 with this information.
[I2] Since TCP port numbers are encapsulated in the payload field of IP
datagram, an Intruder can learn through sniffing at R2.
[I3] Since IP addresses and routers are functioned at network layer of OSI
Model, an Intruder can learn through sniffing at R2.
[I4] An Intruder cant learn through sniffing at R2 because it is related to
Data Link Layer of OSI Model.

Q. 68

In the following pairs of OSI protocol layer/sub-layer and its functionality, the
INCORRECT pair is
(A) Network layer and Routing
(B) Data Link Layer and Bit synchronization
(C) Transport layer and End-to-end process communication
(D) Medium Access Control sub-layer and Channel sharing

*Shipping Free*

Buy Online all GATE Books: shop.nodia.co.in

*Maximum Discount*

GATE SOLVED PAPER - CS

COMPUTER NETWORK

Sol. 68

Option (B) is correct.


Bit synchronization is done in physical layer.

Q. 69

A bit-stuffing based framing protocol uses an 8-bit delimiter pattern of 01111110.


If the output bit-string after stuffing is 01111100101, then the input bit-string is
(A) 0111110100
(B) 0111110101
(C) 0111111101
(D) 0111111111

GATE 2014
1 MARK

Sol. 69

Option (B) is correct.


8-bit delimiter pattern: 01111110

n
i
.
o
c

.
a

i
d

Output bit-string after stuffing : Fig MS


Input string : 0111110101

o
n

.
w

After five consecutive 1s in the input, bit 0 is inserted.


Q. 70
GATE 2014
2 MARK

Sol. 70

Consider a token ring network with a length of 2 km having 10 stations including


a monitoring station. The propagatin speed of the signal is 2 # 108 m/s and the
token transmission time is ignored. If each station is allowed to hold the token for
2 sec , the minimum time for which the monitoring station should wait (in sec
) before assuming that the token is lost is ______.

Correct answer is 30.

n
i
.
o
c

3
Propagation delay = dis tan ce = 2 # 108 = 10 sec
speed
2 # 10
Since, each station is allowed to hold the token for 2 sec , total interface delay
would be 10 # 2 = 20 sec . Minimum time for which the monitoring station
should wait before assuming that the token is lost is the latency. So
Ring latency = Propagation delay + Interface delay
Ring latency = 10 + 20 = 30 sec

Q. 71
GATE 2014
2 MARK

Sol. 71

GATE 2014
2 MARK

Sol. 72

i
d

o
n

Let the size of congestion window of a TCP connection be 32 KB when a timeout


occurs. The round trip time of the connection is 100 msec and the maximum
segment size used is 2 KB. The time taken (in msec) by the TCP connection to
get back to 32 KB congestion window is ______.

.
w

Correct answer is 1200


Given that at the time of Time Out, Congestion Window Size is 32KB and
RTT is 100ms. When Time Out occurs, for the next round of Slow Start,
Threshold will be half of Congestion window i.e. Threshold is 16 KB.
2 " 4 " 8 " 16 " 18 " 20 " 22 " 24 " 26 " 28 " 30 " 32
Note that after 16 KB (threshold), additive multiple starts.
Time taken to reach 32 KB = 12 segments # 100 m sec = 1200 m sec

Q. 72

.
a

Consider a selective repeat sliding window protocol that uses a frame size of 1 KB
to send data on a 1.5 Mbps link with a one way latency of 50 msec. To achieve
a link utilization of 60%, the minimum number of bits required to represent the
sequence number field is ______.
Correct answer is 5
We first calculate the average round-trip time (RTT) and the number of packets.
Average RTT = 2 # propogation delay

GATE STUDY PACKAGE


Computer Networks &
Web Technologies

Available Books in the Series


Digital Logic

Computer Science & Information Technology


Software Engineering

GATE SOLVED PAPER - CS

COMPUTER NETWORK

= 2 # 50 = 100 ms
The bandwidth-delay product = 1.5 Mbps # 100 ms = 150000 bits
packets

150000
Maximum No. of packets = 150000 bits =
= 18.75
1 KB
1 # 8 # 103 bit

n
i
.
o
c

Since link utilization of 60%, number of packets is 18.75 # 0.6 = 11.25 . We know
that the (window size) # ^2m 1h or 11.25 # ^2m 1h. This means that we need to
choose ^m 1h to be at least 4 or m = 5 .
Q. 73
GATE 2014
1 MARK

.
a

Which one of the following socket API functions converts an unconnected active
TCP socket into a passive socket?
(A) connect
(B) bind
(C) listen
(D) accept

i
d

o
n

.
w

Sol. 73

Option (C) is correct.


Listen() is the socket API function that converts an unconnected active TCP
socket into a passive socket.

Q. 74

In the diagram shown below, L1 is an Ethernet LAN and L2 is a Token-Ring


LAN. An IP packet originates from sender S and Traverses to R, as shown. The
links within each ISP and across the two ISPs, are all point-to-point optical links.
The initial value of the TTL field is 32. The maximum possible value of the TTL
field when R receives the datagram is _____.

GATE 2014
1 MARK

Sol. 74

Correct answer is 26

.
w

.
a

i
d

o
n

n
i
.
o
c

TTL is used to indicate the maximum number of hops the packet is allowed to
traverse in the network. Initially this field is set to some value. Each router that
processes the datagram decrements this value by one. From the above Figure, we
can see that there are 5 visits at 5 routers and one visit at receiver, so maximum
possible value of TTL is 32 6 = 26 .

Q. 75
GATE 2014
2 MARK

Consider the store and forward packet switched network given below. Assume
that the bandwidth of each link is 106 bytes/sec. A user on host A sends a file of
size 103 bytes to host B through routers R1 and R2 in three different ways. In
the first case a single packet containing the complete file is transmitted from A
to B . In the second case, the file is split into 10 equal parts, and these packets
are transmitted from A to B . In the third case, the file is split into 20 equal parts
and these packets are sent from A to B . Each packet contains 100 bytes of header
information along with the user data. Consider only transmission time and ignore
processing, queuing and propagation delays. Also assume that there are no errors

*Shipping Free*

Buy Online all GATE Books: shop.nodia.co.in

*Maximum Discount*

GATE SOLVED PAPER - CS

COMPUTER NETWORK

during transmission. Let T1, T2 and T3 be the times taken to transmit the file
in the first, second and third case respectively. Which one of the following is
CORRECT?

(A) T1 < T2 < T3


(C) T2 = T3, T3 < T1

n
i
.
o
c

Sol. 75

.
a

(B) T1 > T2 > T3


(D) T1 = T3, T3 > T2

i
d

Option (D) is correct.


Bandwidth: 106 bytes/ sec ; Packet size: 1000 bytes
Case I:
File size = 103 Bytes = 1000 Bytes

o
n

.
w

Header = 100 Bytes


Total frame size = 1000 + 100 = 1100 Bytes
# 8 = 1.1 ms
Transmission time = total frame size = 1100
6
bandwidth
10 # 8
There are three links between A and B, So
Total transmission time, T1 = 3 # 1.1 = 3.3 ms
Case II:
File size = 1000 = 100 Bytes
10
Header = 100 Bytes
Total frame size = 100 + 100 = 200 Bytes
Transmission time for one packet = 2006 # 8 = 0.2 ms
10 # 8
Transmission time for 10 packets = 0.2 # 10 = 2 ms
It uses store and forward so when 10 th packet is transmitted from A, B receives
8 th packet. So,
Total transmission time, T2 = 2 + 0.2 + 0.2 = 2.4 ms
Case II:
Size of one packet = 1000 = 50 Bytes
20
Header = 100 Bytes
Total frame size = 50 + 100 = 150 Bytes

.
w

.
a

i
d

o
n

n
i
.
o
c

Transmission time for one packet = 1506 # 8 = 0.15 ms


10 # 8
Transmission time for 10 packets = 0.15 # 20 = 3 ms
It uses store and forward so when 10 th packet is transmitted from A, B receives
8 th packet. So,
Total transmission time, T3 = 3 + 0.15 + 0.15 = 3.3 ms
Q. 76
GATE 2014
1 MARK

Host A (on TCP/IPv4 network A) sends an IP datagram D to host B (also on


TCP/IPv4 network B ). Assume that no error occurred during the transmission of
D . When D reaches B , which of the following IP header field(s) may be different
from that of the original datagram D ?
(i) TTL
(ii) Checksum

GATE STUDY PACKAGE


Computer Networks &
Web Technologies

Available Books in the Series


Digital Logic

Computer Science & Information Technology


Software Engineering

GATE SOLVED PAPER - CS

COMPUTER NETWORK

(iii) Fragment Offset


(A) (i) only
(C) (ii) and (iii) only

(B) (i) and (ii) only


(D) (i), (ii) and (iii)

n
i
.
o
c

Sol. 76

Option (D) is correct.


TTL changes from one hop to the next. Check sum changes on each hop due to
TTL change. Fragment offset may be computed again. So we can say that while
an IP Datagram is transferring from one host to another host, TTL, Checksum
and Fragmentation Offset may change.

Q. 77

An IP router implementing Classless Interdomain Routing (CIDR) receives a


packet with address 131.23.151.76. The routers routing table has the following
entries:

GATE 2014
2 MARK

.
a

i
d

o
n

.
w

Prefix

Output Interface Identifier

131.16.0.0/12

131.28.0.0/14

131.19.0.0/16

131.22.0.0/15
1
The identifier of the output interface on which this packet will be forwarded is
___.
Sol. 77

Q. 78
GATE 2014
2 MARK

Sol. 78

Correct answer is 1
From the given options we can see that only possible prefix are 131.16.0.0/12 and
131.22.0.0. By using longest prefix match
131.23.151.76 = 10000011.00010111.10010111.01001100
131.16.0.0/12 = 10000011.00010000.00000000.00000000
131.22.0.0/15 = 10000011.00010110.00000000.00000000
Longest prefix match is: 131.22.0.0/15 which corresponds to Interface 1.

GATE 2014
2 MARK

i
d

.
a

Every host in an IPv4 network has a 1-second resolution real-time clock with
battery backup. Each host needs to generate up to 1000 unique identifiers per
second. Assume that each host has a globally unique IPv4 address. Design a 50bit globally unique ID for this purpose. After what period (in seconds) will the
identifiers generated by a host wrap around?

.
w

o
n

Correct answer is 256


We need to create globally unique ID of 50 bits. Since IPv4 addresses is a 32 bit
address, so we have 50 32 = 18 bits combinations for this globally unique ID.
1000 unique Ids = 1 sec
8
28 unique Ids = 2 = 256
1000
An IP router with a Maximum Transmission Unit (MTU) of 1500 bytes has
received an IP packet of size 4404 bytes with an IP header of length 20 bytes. The
values of the relevant fields in the header of the third IP fragment generated by
the router for this packet are
(A) MF bit: 0, Datagram Length: 1444; Offset: 370
(B) MF bit: 1, Datagram Length: 1424; Offset: 185
(C) MF bit: 1, Datagram Length: 1500; Offset: 370
(D) MF bit: 0, Datagram Length: 1424; Offset: 2960

Q. 79

n
i
.
o
c

*Shipping Free*

Buy Online all GATE Books: shop.nodia.co.in

*Maximum Discount*

GATE SOLVED PAPER - CS

Sol. 79

COMPUTER NETWORK

Option (A) is correct.


Given that,
MTU = 1500 bytes
Header length = 20 bytes
Packet size = 4404 bytes
Size of the First Fragment : 1480 + 20
Size of the Second Fragment: 1480 + 20
Size of the Third Fragment: 1444 + 20
Datagram length for third IP fragment = 1444
MF bit = 0
Offset = 1480 = 370
4

i
d

o
n

GATE STUDY PACKAGE


Computer Networks &
Web Technologies

.
a

.
w

n
i
.
o
c

.
a

i
d

o
n

.
w

n
i
.
o
c

Available Books in the Series


Digital Logic

Computer Science & Information Technology


Software Engineering

Anda mungkin juga menyukai