Ethical Hacking MCQs [4]

1) The maximum number of hosts that are possible in a class C network is _


Answer: 254


Solution: For a class C network, 8 bits are provided to specify the host. The all-0 and all-
1 combinations cannot be used as host addresses. Therefore, the maximum number of hosts possible is 28 – 2 = 254.


Advertisements

2) What is the purpose of the sequence number field in the TCP header?


a. Used for reliable delivery of message.
b. Used to keep track of the number of connections.
c. Used to keep track of number of packets successfully delivered.
d. None of these.


Answer: a


Solution: All bytes in a TCP connection are numbered, beginning at a randomly chosen initial sequence number (ISN). The SYN packets consume one sequence number, so actual data will begin at ISN+1. The sequence number of the byte number of the first byte of data in the TCP segment sent. This is used to check whether some portions of data are missing, and request for explicit retransmission if so. It is therefore used for reliable message delivery.


Advertisements

3) What is the subnet address if the destination IP address is 144.16.34.124 and the subnet mask
is 255.255.240.0?


a. 144.16.32.0
b. 144.16.34.0
c. 144.16.0.0
d. None of these


Answer: a


Solution: Let us express the two numbers in binary:
144.16.34.124 = 10010000 00010000 00100010 01111100
255.255.240.0 = 11111111 11111111 11110000 00000000
If we take bit-by-bit AND, we shall get the subnet address as
10010000 00010000 00100000 0000 = 144.16.32.0


Advertisements

4) What is a TCP half-open connection in the context of connection establishment using 3-way
handshake?


a. The first transaction in the 3-way handshake does not complete.
b. The second transaction in the 3-way handshake does not complete.
c. The last transaction in the 3-way handshake does not complete.
d. None of these.


Answer: c


Solution: In the TCP protocol, connection establishment is carried out using a 3-way
handshake protocol. When the third transaction in the 3-way handshake does not complete, it
is referred to as a half-open connection.


Advertisements

5) An IP packet arrives at a router with the first eight bits as 01001000. How many bytes are there
in the OPTIONS field?


a. 4
b. 8
c. 12
d. None of these


Answer: c


Solution: The first four bits (0100) is the IP version, and the next four bits (1000) is the
header length. The header length of 8 indicates 8 x 4 = 32 bytes of header. The basic IP header
is 20 bytes long. Hence, the size of the OPTIONS field will be 32 – 20 = 12 bytes.

One thought on “Ethical Hacking MCQs [4]

Add yours

Leave a Reply

Up ↑

%d bloggers like this: