Test: Ipv4, IP Packet


15 Questions MCQ Test RRB JE for Computer Science Engineering | Test: Ipv4, IP Packet


Description
This mock test of Test: Ipv4, IP Packet 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) Test: Ipv4, IP Packet (mcq) to study with solutions a complete question bank. The solved questions answers in this Test: Ipv4, IP Packet quiz give you a good mix of easy questions and tough questions. Computer Science Engineering (CSE) students definitely take this Test: Ipv4, IP Packet exercise for a better result in the exam. You can find other Test: Ipv4, IP Packet 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:
  • 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:
  • 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 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:

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:

► 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 Data Unit 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.
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 a 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 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).

Lightbox

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).
Lightbox

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:
  • The standard header that is used inIPv4IPv4 contains key information about an Internet Protocol (IP) packet. Information includes the source and destination IP addresses of the datagram, fragmentation control parameters, and packet length. Another key element of this header is the TTL field. The TTL field consists of a single byte and is capable of holding a value from 0–255.0–255.
  • Because IP is connectionless, the TTL field was included in the IP header by the original designers as a mechanism to limit the life span of packets within the network. A routing loop is the most common example used to illustrate why this functionality is required.
  • Without such a control mechanism, a routing loop could cause a packet to circle a network infinitely, depleting bandwidth and eventually destabilizing the network. As insurance against this outcome, the TTL value of an IP datagram is decremented by a value of one each time the packet is forwarded by a network device.
  • Thus, an IP packet can never be forwarded more than 254254 times, preventing the infinite packet loop problem.
QUESTION: 11

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

Solution:

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
Hence, option C is the correct answer.

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 option is used to record the internet routers that handles the datagram. It can list up to nine router addresses. It can be used for debugging and management purpose. In IPv4, options and padding 40 bytes are allotted, maximum nine routers addresses are allowed. Each IPv4 address is 32 bits or 4 bytes. So, ⇒ 4 × 9 = 36 bytes.
  • Extra byte are used for the option. Hence, the record route (RR) option field of an IPv4 header is (9).

Hence, 9 is the correct answer.

QUESTION: 15

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

Solution:

Length and checksum can be modified when IP fragmentation happens. Time To Live is reduced by every router on the route to destination.

Related tests