Computer Network TCP,UDP and IP GATE ques(3.1-3.21) pyq (2003-2005)

Q. 3.1 [2003 : 1 Mark]
Question: 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 forwarded if it is unable to reach its destination within a given number of hops
(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
Answer: (d) The packet source cannot set the route…
Explanation: This is FALSE. IP supports source routing option, source can set route. Other statements are true.

Q. 3.2 [2003 : 1 Mark]
Question: 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
Answer: (d) End to end connectivity
Explanation: Network layer provides host-to-host delivery, transport provides process-to-process end-to-end connectivity.

Q. 3.3 [2003 : 2 Marks]
Question: 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
Answer: (d) 128.8.129.43 and 128.8.161.55
Explanation: Mask 255.255.31.0 -> 11111111.11111111.00011111.00000000. So network bits are not standard. Check which pair falls in same subnet after AND with mask.

Q. 3.4 [2004 : 1 Mark]
Question: Which of the following is NOT true with respect to a transparent bridge and a router?
(a) Both bridge and router selectively forward data packets
(b) A bridge uses IP addresses while a router uses MAC addresses
(c) A bridge builds up its routing table by inspecting incoming packets
(d) A router can connect between a LAN and a WAN
Answer: (b) A bridge uses IP addresses while a router uses MAC addresses
Explanation: FALSE statement. Bridge uses MAC addresses, Router uses IP addresses. So (b) is NOT true.

Q. 3.5 [2004 : 1 Mark]
Question: Which one of the following statements is FALSE?
(a) TCP guarantees a minimum communication rate
(b) TCP ensures in-order delivery
(c) TCP reacts to congestion by reducing sender window size
(d) TCP employs retransmission to compensate for packet loss
Answer: (a) TCP guarantees a minimum communication rate
Explanation: TCP does NOT guarantee minimum rate, it is best-effort with congestion control. Other statements true.

Q. 3.6 [2004 : 1 Mark]
Question: A subnet has been assigned a subnet mask of 255.255.255.192. What is the maximum number of hosts that can belong to this subnet?
(a) 14 (b) 30 (c) 62 (d) 126
Answer: (c) 62
Explanation: Mask 192 = 11000000, so host bits =6. Total addresses=2^6=64. Usable hosts=64-2=62.

Q. 3.7 [2004 : 1 Mark]
Question: In TCP, a unique sequence number assigned to each
(a) byte (b) word (c) segment (d) message
Answer: (a) byte
Explanation: TCP is byte-stream protocol, sequence number is for each byte. Note: In your book tick is on (d) but correct answer is (a).

Q. 3.8 [2004 : 2 Marks]
Question: 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
Answer: (d) Destination port number
Explanation: Port number is part of TCP/UDP header, not IP header. IP header contains Fragment Offset, Source and Destination IP.

Q. 3.9 [2004 : 2 Marks]
Question: A TCP message consisting of 2100 bytes is passed to IP for delivery across two networks. The first network can carry a maximum payload of 1200 bytes per frame and the second network can carry a maximum payload of 400 bytes per frame, excluding network overhead. Assume that IP overhead per packet is 20 bytes. What is the total IP overhead in the second network for this transmission?
(a) 40 bytes (b) 80 bytes (c) 120 bytes (d) 160 bytes
Answer: (c) 120 bytes
Explanation: 2100 bytes TCP data + 20 IP = 2120? First network fragments into ceil(2100/1200)=2 packets: 1200+900 payload +20 each. Second network MTU 400 payload, so 1200 splits into 3 fragments (4003), 900 splits into 3 fragments (400+400+100). Total 6 packets in second network. Overhead =620=120 bytes.

Q. 3.10 [2004 : 2 Marks]
Question: Suppose that the maximum transmit window size for a TCP connection is 12000 bytes. Each packet consists of 2000 bytes. At some point of time, the connection is in slow-start phase with a current transmit window of 4000 bytes. Subsequently, the transmitter receives two acknowledgement. Assume that no packets are lost and there are no time-outs. What is the maximum possible value of the current transmit window?
(a) 4000 bytes
(b) 8000 bytes
(c) 10000 bytes
(d) 12000 bytes
Answer: (b) 8000 bytes
Explanation: Slow start – cwnd doubles per RTT, but per ack it increases by 1 MSS. Initially cwnd=4000=2 packets. On receiving 2 acks, cwnd becomes 4000+2000+2000=8000 bytes. Max limit is 12000 but after 2 acks it will be 8000.

Q. 3.11 [2004 : 2 Marks]
Question: The routing table of a router is shown below:
Destination Subnet Mask Interface
128.75.43.0 255.255.255.0 Eth0
128.75.43.0 255.255.255.128 Eth1
192.12.17.5 255.255.255.255 Eth3
default Eth2
On which interfaces will the router forward packets addressed to destinations 128.75.43.16 and 192.12.17.10 respectively?
(a) Eth1 and Eth2
(b) Eth0 and Eth2
(c) Eth0 and Eth3
(d) Eth1 and Eth3
Answer: (a) Eth1 and Eth2
Explanation: 128.75.43.16 matches both Eth0 (/24) and Eth1 (/25). Longest prefix match is /25 => Eth1. 192.12.17.10 matches only default, not 192.12.17.5/32 host route, so Eth2.

Common Data Questions Q. 3.12 & Q. 3.13
Consider three IP networks A, B and C. Host H_A in network A sends messages each containing 180 bytes of application data to a host H_C 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
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).
Diagram: Network A –1 Mbps– Network B –512 Kbps– Network C

Q. 3.12 [2004 : 2 Marks]
Question: 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
Answer: (d) 260
Explanation: Application 180 + TCP 20 =200 bytes. IP adds 20 => 220 bytes at source. MTU of B is 100 bytes including IP header. So 200 bytes TCP payload must be fragmented into 3 fragments in network B: Fragment sizes – 80 data +20 IP=100, 80+20=100, 40+20=60. Total bytes delivered to IP layer at destination = 100+100+60=260 bytes. Best case includes IP header overhead due to fragmentation.

Q. 3.13 [2004 : 2 Marks]
Question: What is the rate at which application data is transferred to host H_C? Ignore errors, acknowledgments, and other overheads.
(a) 325.5 Kbps
(b) 354.5 Kbps
(c) 409.6 Kbps
(d) 512.0 Kbps
Answer: (b) 354.5 Kbps
Explanation: Bottleneck is 512 Kbps link between B and C. But due to fragmentation overhead, effective data rate = (Application data / Total bytes on wire) * Bottleneck BW. Total = 260 bytes. Data=180. Rate = (180/260)*512 Kbps accounting for TCP/IP and fragmentation time on 1 Mbps link gives 354.5 Kbps.

Q. 3.14 [2005 : 1 Mark]
Question: 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
Answer: (b) TCP and UDP
Explanation: IP layer routing is independent of TCP/UDP. Each packet may take different path as routing decisions are per packet at IP layer, not per session.

Q. 3.15 [2005 : 1 Mark]
Question: 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
Answer: (d) Finding the MAC address that corresponds to an IP address
Explanation: ARP maps IP to MAC within local network.

Q. 3.16 [2005 : 1 Mark]
Question: 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
Answer: (d) 255.255.252.0
Explanation: Class B default /16. For 64 subnets need 6 bits (2^6=64). Borrow 6 bits from host part. Third octet becomes 11111100 =252. So mask 255.255.252.0 (/22).

Q. 3.17 [2005 : 2 Marks]
Question: In a packet switching network, packets are routed from source to destination along a single path having two intermediate nodes. 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
Answer: (d) 9
Explanation: Let packet size = p bytes, data = p-3, number of packets = 24/(p-3). Total transmission cost with store-and-forward over 3 hops = hops * packets * p. Optimum minimizes (p/(p-3)). Differentiation gives p=9 as optimum for 2 intermediate nodes.

Q. 3.18 [2005 : 2 Marks]
Question: Suppose the round trip propagation delay for a 10 Mbps Ethernet having 48-bit jamming signal is 46.4 us. The minimum frame size is:
(a) 94
(b) 416
(c) 464
(d) 512
Answer: (c) 464
Explanation: For CSMA/CD, minimum frame transmission time must be >= RTT + jamming time. Transmission time = frame size / BW. Frame size = BW * (RTT) approx. 10 Mbps * 46.4 us = 464 bits.

Q. 3.19 [2005 : 2 Marks]
Question: On a TCP connection, current congestion window size is Congestion Window = 4 KB. The window size advertised by the receiver is Advertise Window = 6 KB. The last byte sent by the sender is LastByteSent = 10240 and the last byte acknowledged by the receiver is LastByteAcked = 8192. The current window size at the sender is
(a) 2048 bytes
(b) 4096 bytes
(c) 6144 bytes
(d) 8192 bytes
Answer: (b) 4096 bytes
Explanation: Usable window = min(cwnd, rwnd) – (LastByteSent – LastByteAcked). Bytes in flight = 10240-8192=2048. min(4KB,6KB)=4096. Effective window = 4096 -0? Actually current window size at sender = min(cwnd, awnd) =4096? Alternative calculation: Allowed bytes = LastByteAcked + min(cwnd, rwnd) = 8192+4096=12288. Already sent till 10240, so remaining can send = 12288-10240=2048. But question asks current window size = min(cwnd, rwnd)=4096 bytes.

Q. 3.20 [2005 : 2 Marks]
Question: In a communication network, a packet of length L bits takes link L1 with a probability of p1 or link L2 with a probability of p2. Link L1 and L2 have bit error probability of b1 and b2 respectively. The probability that the packet will be received without error via either L1 or L2 is
(a) (1 – b1)^L p1 + (1 – b2)^L p2
(b) [1 – (b1 + b2)^L] p1 p2
(c) (1 – b1)^L (1 – b2)^L p1 p2
(d) 1 – (b1^L p1 + b2^L p2)
Answer: (a) (1 – b1)^L p1 + (1 – b2)^L p2
Explanation: Probability packet goes via L1 is p1 and received without error is (1-b1)^L (all L bits error-free). Similarly via L2 is (1-b2)^L * p2. Since paths are mutually exclusive (either L1 or L2), total probability = sum of both.

Q. 3.21 [2005 / 2006 : 2 Marks] – VLSM Question
Question: A company has a class C network address of 204.204.204.0. It wishes to have three subnets, one with 100 hosts and two with 50 hosts each. Which one of the following options represents a feasible set of subnet address/subnet mask pairs?
(a) 204.204.204.128/255.255.255.192
204.204.204.0/255.255.255.128
204.204.204.64/255.255.255.128
204.204.204.64/255.255.255.192
Answer: Need full options – photo me niche kata hai, pura bhej de
Explanation Logic: 100 hosts needs 7 host bits (2^7=128-2=126). So mask /25 (255.255.255.128) for that subnet. 50 hosts needs 6 host bits (2^6=64-2=62). So mask /26 (255.255.255.192). Must not overlap.
Feasible allocation:

  • For 100 hosts: 204.204.204.0/25 (0-127)
  • For 50 hosts: 204.204.204.128/26 (128-191)
  • For 50 hosts: 204.204.204.192/26 (192-255)
    This uses VLSM without overlapping.

Leave a Comment

Your email address will not be published. Required fields are marked *