Ipv4, IP Packet - MCQ Test - 1


15 Questions MCQ Test Mock Test Series - Computer Science Engg. (CSE) GATE 2020 | Ipv4, IP Packet - MCQ Test - 1


Description
This mock test of Ipv4, IP Packet - MCQ Test - 1 for Computer Science Engineering (CSE) helps you for every Computer Science Engineering (CSE) entrance exam. This contains 15 Multiple Choice Questions for Computer Science Engineering (CSE) Ipv4, IP Packet - MCQ Test - 1 (mcq) to study with solutions a complete question bank. The solved questions answers in this Ipv4, IP Packet - MCQ Test - 1 quiz give you a good mix of easy questions and tough questions. Computer Science Engineering (CSE) students definitely take this Ipv4, IP Packet - MCQ Test - 1 exercise for a better result in the exam. You can find other Ipv4, IP Packet - MCQ Test - 1 extra questions, long questions & short questions for Computer Science Engineering (CSE) on EduRev as well by searching above.
QUESTION: 1

An IP datagram of size 1000 bytes arrives at a router. The router has to forward this packet on a link whose MTU (maximum transmission unit) is 100 bytes. Assume that the size of the IP header is 20 bytes. The number of fragments that the IP datagram will be divided into for transmission is :

Solution:

MTU = 100 bytes
Size of IP header = 20 bytes
So, size of data that can be transmitted in one fragment = 100 – 20 = 80 bytes
Size of data to be transmitted = Size of datagram – size of header = 1000 – 20 = 980 bytes
 
Now, we have a datagram of size 1000 bytes.
So, we need ceil(980/80) = 13 fragments.
 
Thus, there will be 13 fragments of the datagram.
So, D is the correct choice.

QUESTION: 2

In the TCP/IP protocol suite, which one of the following is NOT part of the IP header?

Solution:

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

QUESTION: 3

One of the header fields in an IP datagram is the Time-to-Live (TTL) field. Which of the following statements best explainsthe need for this field?

Solution:

It can be used to prevent packet looping.

QUESTION: 4

Host A (on TCP/IP v4 network A) sends an IP datagram D to host B (also on TCP/IP v4 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
iii. Fragment Offset

Solution:

The Answer is OPTION D.
Whenever an IP packet is transmitted, the value in Time to Live (TTL) field will be decremented on every single hop. Hence, TTL is changed on every hop.
Now, since TTL changes, hence the Checksum of the packet will also change.
For the Fragmentation offset, A packet will be fragmented if the packet has a size greater than the Maximum Transmission Unit (MTU) of the network. Hence, Fragmentation offset can also be changed.

QUESTION: 5

An IP router with a Maximum Transmission Unit (MTU) of 1500 bytes has received an IP packet of size 4404 bytes with an IPheader of length 20 bytes. The values of the relevant fields in the header of the third IP fragment generated by the router forthis packet are

Solution:

ip packet length is given 4404 which includes ip header of length 20
so data is 4384
now router divide this data in 3 parts
1480 1480 1424
after adding ip header in last packet packet size is 1444 and since its the last packet therefore MF =0
and offset is 2960/8=370

QUESTION: 6

Host A sends a UDP datagram containing 8880 bytes of user data to host B over an Ethernet LAN. Ethernet frames maycarry data up to 1500 bytes (i.e. MTU = 1500 bytes). Size of UDP header is 8 bytes and size of IP header is 20 bytes. Thereis no option field in IP header. How many total number of IP fragments will be transmitted and what will be the contents ofoffset field in the last fragment?

Solution:

Ans C
number of fragments = ceil(8888/1480) = 7
offset of last fragment = (1500 - 20) * 6 / 8 = 1110 (scaling factor of 8 is used in offset field).
TCP or UDP header will be added to the DataUnit received from Transport Layer to Network Layer. And fragmentation
happens at Network Layer. So no need to add TCP or UDP header into each fragment.

QUESTION: 7

Which of the following assertions is FALSE about the Internet Protocol (IP)?

Solution:

In computer networking, source routing, also called path addressing, allows a sender of a packet to partially or completely specify the route of the packet takes
through the network. In contrast, in non-source routing protocols, routers in the network determine the path based on the packet's destination.

Answer-D

QUESTION: 8

 Consider three IP networks and . Host in network sends messages each containing 180 bytes of application data to a host in network . The TCP layer prefixes 20 byte header to the message. This passes through an intermediate network . The maximum packet size, including 20 byte IP header, in each network is:
A: 1000 bytes
B: 100 bytes
C: 1000 bytes
The network and are connected through a 1 Mbps link, while and are connected by a 512 Kbps link (bps = bits per second).


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.

Solution:

Packet A sends an IP packet of 180 bytes of data + 20 bytes of TCP header + 20 bytes of IP header to B.
IP layer of B now removes 20 bytes of IP header and has 200 bytes of data. So, it makes 3 IP packets - [80 + 20, 80 +
20 + 40 + 20] and sends to C as the Ip packet size of B is 100. So, C receives 260 bytes of data which includes 60 bytes
of IP headers and 20 bytes of TCP header.
For data rate, we need to consider only the slowest part of the network as data will be getting accumulated at that sender
(data rate till that slowest part, we need to add time if a faster part follows a slower part).
So, here 180 bytes of application data are transferred from A to C and this causes 260 bytes to be transferred from B to C

QUESTION: 9

Consider three IP networks A,B and C. Host HA in network A sends messages each containing 180 bytes of application data to a host Hc in network C. The TCP layer prefixes 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).


What is the rate at which application data is transferred to host ? Ignore errors, acknowledgements, and other overheads.

Solution:

Packet A sends an IP packet of 180 bytes of data + 20 bytes of TCP header + 20 bytes of IP header to B.
IP layer of B now removes 20 bytes of IP header and has 200 bytes of data. So, it makes 3 IP packets - [80 + 20, 80 + 20 , 40 + 20] and sends to C as the Ip packet size of B is 100. So, C receives 260 bytes of data which includes 60 bytes of
IP headers and 20 bytes of TCP header.
For data rate, we need to consider only the slowest part of the network as data will be getting accumulated at that sender (data rate till that slowest part, we need to add time if a faster part follows a slower part).
So, here 180 bytes of application data are transferred from A to C and this causes 260 bytes to be transferred from B to C.
Time to transfer 260 bytes from B-C = 260 * 8/(512 * 1000) = 65/16000 = 13/3200
So, data rate = 180 * 3200 / 13 = 44.3 kBps = 354.46 kbps

QUESTION: 10

For which one of the following reasons does internet protocol(IP) use the time-to-live(TTL) field in IP datagram header?

Solution:
QUESTION: 11

In the IPv4 addressing format, the number of networks allowed under Class C addresses is

Solution:

Answer is (c)

We have 32 bits in the IPV4 network

Class A = 8 network bits + 24 Host bits
Class B = 16 network bits + 16 Host bits
Class C = 24 network bits + 8 host bits.
Now for class C we have 3 bits reserved for the network id... Hence remaining bits are 21. Therefore total number of networks possible are 2 21.
Similarly in Class B we have 2 bits reserved... Hence total number of networks in class B are 214.
And we have 1 bit reserved in Class A, therefore there are 27 networks.
And a better reasoning for the bit reservation is given here. have a look.

QUESTION: 12

In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400 and the fragment offset value is300. The position of the datagram, the sequence numbers of the first and the last bytes of the payload, respectively are

Solution:

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

QUESTION: 13

The data field can carry which of the following?

Solution:

 Data field usually has tranaport layer segment, but it can also carry ICMP messages.

*Answer can only contain numeric values
QUESTION: 14

The maximum number of IPv4 router addresses that can be listed in the record route (RR) option field of an IPv4 header is______


Solution:

A record-route (RR) option is used to record the Internet routers that handle the datagram. It is listed in OPTIONS of IPv4.According to RFC 791, there are two cases for the format of an option:Case 1: A single octet of option-type.Case 2: An option-type octet, an option-length octet, and the actual option-data octets.In both the cases, first 16 bits of OPTIONS field is used. Therefore, out off 40 Bytes only 38 Bytes are remaining for storing IPv4 addresses. In 38 Bytes we can store 9 IPv4 addresses as each IPv4 address is of 4 Bytes.9 should be answer.

Diagram from Forouzan :

QUESTION: 15

Which of the following fields of an IP header is NOT modified by a typical IP router?

Solution:

Similar Content

Related tests