GATE Questions & Answers of IPv4/IPv6

What is the Weightage of IPv4/IPv6 in GATE Exam?

Total 18 Questions have been asked from IPv4/IPv6 topic of Computer Networks subject in previous GATE papers. Average marks 1.78.

Consider three machines M, N, and P with IP addresses,, and respectively. The subnet mask is set to for all the three machines. Which one of the following is true?

Suppose that in an IP-over-Ethernet network, a machine X wishes to find the MAC address of another machine Y in its subnet. Which one of the following techniques can be used for this?

The maximum number of IPv4 router addresses that can be listed in the record route (RR) option filed of an IPv4 header is _______. 

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 _________.

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

Consider the following routing table at an IP router.

Network No. Net Mask    Next Hop       Interface 0   Interface 1    R2   R3 Default   R4

For each IP address in Group I identify the correct choice of the next hop form Group II using the entries from the routing table above.

Group I          Group II
i)          a) Interface 0
ii)          b) Interface 1
iii)          c) R2
iv)          d) R3
           e) R4

In the network, the fourth octet (in decimal) of the last IP address of the network which can be assigned to a host is ______.

An IP machine Q has a path to another IP machine H via three IP routers R1, R2, and R3.


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?

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?

An IP router implementing Classless Inter-domain Routing (CIDR) receives a packet with address The router’s routing table has the following entries:

Prefix Output Interface
Identifier 12 3 14 5 16 2 15 1

The identifier of the output interface on which this packet will be forwarded is ______.

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 50-bit globally unique ID for this purpose. After what period (in seconds) will the identifiers generated by a host wrap around?

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

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 is 300. The position of the datagram, the sequence numbers of the first and the last bytes of the payload, respectively are

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

An Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available with it: The ISP wants to give half of this chunk of addresses to Organization A, and a quarter to Organization B, while retaining the remaining with itself. Which of the following is a valid allocation of addresses to A and B?

Suppose computers A and B have IP addresses and respectively and they both use the same net mask N. Which of the values of N given below should not be used if A and B should belong to the same network?

If a class B network on the Internet has a subnet mask of, what is the maximum number of hosts per subnet?

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?