Q: 1 A block of addresses is granted to a small organization. We know that one of the addresses is 205.16.37.39/28. What is the last address in the block?
205.16.37.32
205.16.37.47
205.16.37.39
205.16.37.0
[ Option B ]
When an IP address is written with CIDR notation, such as 205.16.37.39/28, it tells us that the first 28 bits represent the network part, and the remaining 4 bits represent the host part of the address.
Since 4 bits are reserved for hosts, the total number of addresses in this subnet is 24=16. These addresses include both the network address and the broadcast address.
To find the exact block range, we must identify where the given IP (205.16.37.39) falls. Subnets with a /28 prefix have a block size of 16, and the subnets start at multiples of 16 in the last octet. Thus, the valid subnet ranges in the fourth octet are 0–15, 16–31, 32–47, 48–63, and so on. The number 39 lies between 32 and 47, which means the network address is 205.16.37.32.
Since the subnet contains 16 addresses, they run sequentially from 205.16.37.32 to 205.16.37.47. The first address 205.16.37.32 is reserved as the network address, and the last address 205.16.37.47 is reserved as the broadcast address for this subnet.
| PROPERTY | VALUE |
|---|---|
| Given IP | 205.16.37.39/28 |
| Subnet Mask | 255.255.255.240 |
| Network Address | 205.16.37.32 |
| First Usable Host | 205.16.37.33 |
| Last Usable Host | 205.16.37.46 |
| Broadcast Address | 205.16.37.47 |
Q: 2 An IPv4 datagram arrives with the following Header values: In Fragment Offset and Flag field respectively Fragment Offset = 0, MF = 0. What does this imply?
The packet was fragmented and this is the last fragment.
The packet is the first fragment of a fragmented datagram.
The packet was not fragmented at all.
The packet is a middle fragment.
[ Option C ]
In IPv4, when a packet is too large to be transmitted in one piece, it may be fragmented into smaller packets. Each fragment carries two important fields:
If a packet has Fragment Offset = 0 and MF = 0, it means that there are no fragments before or after it. A Fragment Offset of 0 shows it is the first fragment, but since MF = 0 indicates no more fragments, the packet must be unfragmented and sent as a single complete datagram.
Q: 3 What does /24 denote in CIDR?
24 bits are used for network portion.
24 addresses are available in the subnet.
24 subnets are created.
24 bits are used for host portion.
[ Option A ]
In CIDR (Classless Inter-Domain Routing) notation, the suffix “/24” denotes that 24 bits are used for the network part of the IP address. This means that the first 24 bits out of the total 32 bits in an IPv4 address identify the network, while the remaining 8 bits are used for host addresses within that network.
The "/24" notation corresponds to a subnet mask of 255.255.255.0 in traditional dotted decimal format. It essentially tells how many bits are fixed for the network prefix, allowing flexible subnetting and efficient allocation of IP address space.
Q: 4 An organization has a Class B network and wishes to form subnets for 64 departments. The subnet mask would be –
255.255.0.0
255.255.252.0
255.255.64.0
255.255.128.0
[ Option B ]
To create subnets in a Class B network, we start with the default subnet mask 255.255.0.0. The organization wants 64 departments, which means they need 64 subnets. To find how many bits are needed for subnetting, we check powers of two, i.e., 2n ≥ 64.
When we try 26, we get 64, which matches the requirement. This means the network must borrow 6 bits from the host portion to create the subnets.
In a Class B address, the subnetting begins in the third octet. When we borrow 6 bits, the first 6 bits of the third octet become 1s. In binary, these 6 ones followed by two zeros give the value 252.
255.255.11111100.00000000
So, the subnet mask becomes, 255.255.252.0
Q: 5 IP address 172.16.123.213 is found to be residing on a sub-network with the following subnet mask 255.255.255.240. What is the network address of this subnet?
172.16.123.213
172.16.123.240
172.16.123.245
172.16.123.208
[ Option D ]
To find the network address of the subnet where:
IP address 172.16.123.213
Subnet Mask 255.255.255.240
First, convert the subnet mask to binary 255.255.255.240 corresponds to: 11111111.11111111.11111111.11110000
The last octet’s binary mask is 11110000, meaning the subnet block size is 256−240=16.
Find the subnet block where 213 belongs:
| Subnet | Range |
|---|---|
| 0 | 0–15 |
| 1 | 16–31 |
| 2 | 32–47 |
| 3 | 48–63 |
| 4 | 64–79 |
| 5 | 80–95 |
| 6 | 96–111 |
| 7 | 112–127 |
| 8 | 128–143 |
| 9 | 144–159 |
| 10 | 160–175 |
| 11 | 176–191 |
| 12 | 192–207 |
| 13 | 208–223 |
| 14 | 224–239 |
| 15 | 240–255 |
213 falls in 208–223, so, network address is 172.16.123.208
Another alternative solution to find the network address for IP 172.16.123.213 with subnet mask 255.255.255.240 is to perform a bitwise AND operation between the IP address and the subnet mask.
IP: 172.16.123.213, last octet binary : 213=11010101
Subnet Mask: 255.255.255.240 last octet binary 240=11110000
Perform bitwise AND between IP and subnet mask
IP : 1 1 0 1 0 1 0 1
Mask: 1 1 1 1 0 0 0 0
Bitwise AND: 1 1 0 1 0 0 0 0
Decimal of binary 11010000 is 208. So, combine with first three octets 172.16.123. Finally the network address is 172.16.123.208
Q: 6 Which of the following is not a part of IPv4 datagram header?
Time to live
Fragmentation Offset
Source IP address
Recursion field
[ Option D ]
An IPv4 datagram header contains crucial information that helps routers deliver packets from the source to the destination across networks. Each field in the header has a specific role, such as identifying the packet, handling fragmentation, or limiting its lifetime in the network.
The IPv4 header is typically 20 bytes minimum it can grow up to 60 bytes. It contains fields like version, header length, type of service, total length, identification, flags, fragmentation offset, time to live (TTL), protocol, header checksum, source IP, and destination IP.
| FIELD NAME | SIZE |
|---|---|
| Version | 4 bits |
| IHL (Internet Header Length) | 4 bits |
| DSCP (Differentiated Services Code Point) | 6 bits |
| ECN (Explicit Congestion Notification) | 2 bits |
| Total Length | 16 bits |
| Identification | 16 bits |
| Flags | 3 bits |
| Fragment Offset | 13 bits |
| Time To Live (TTL) | 8 bits |
| Protocol | 8 bits |
| Header Checksum | 16 bits |
| Source IP Address | 32 bits |
| Destination IP Address | 32 bits |
| Options (if present) | Variable Length |
| Padding (if options present) | Variable Length |
IHL stands for Internet Header Length. It is a 4-bit field in the IPv4 header that specifies the length of the IPv4 header in 32-bit words.
The minimum value is 5 (5 × 32 bits = 20 bytes, when there are no options) and the maximum is 15 (15 × 32 bits = 60 bytes, when options are present). To get the header size in bytes, multiply the IHL value by 4.
Q: 7 If a Class B network on the internet has a subnet mask of 255.255.248.0, what is the maximum number of hosts per subnet?
1023
1022
1024
2046
[ Option D ]
A Class B network has a default subnet mask of 255.255.0.0, meaning the first two octets (16 bits) represent the network portion. The given subnet mask is 255.255.248.0. To interpret this:
The number of usable host addresses per subnet is calculated as 211−2, which equals 2046.
We subtract 2 because one address is the Network Address and one is the Broadcast Address, which cannot be assigned to hosts.
Q: 8 How many subnets and valid hosts are provided by network address 172.16.0.0/19?
7 subnets, 2,046 hosts each
7 subnets, 8,190 hosts each
8 subnets, 2,046 hosts each
8 subnets, 8,190 hosts each
[ Option D ]
The IP address 172.16.0.0/19 belongs to Class B, where the default subnet mask is /16 (255.255.0.0). Here, /19 means 3 extra bits are borrowed for subnetting (19 − 16 = 3).
Number of subnets = 23 = 8 subnets
Number of host bits = 32 − 19 = 13 bits
Therefore, the number of valid hosts per subnet is 213 − 2 = 8190, where 2 is subtracted for the network and broadcast addresses. Hence, the network 172.16.0.0/19 provides 8 subnets, each containing 8190 valid hosts.
Thank you so much for taking the time to read my Computer Science MCQs section carefully. Your support and interest mean a lot, and I truly appreciate you being part of this journey. Stay connected for more insights and updates! If you'd like to explore more tutorials and insights, check out my YouTube channel.
Don’t forget to subscribe and stay connected for future updates.