Computer Networks MCQs - Subnetting, CIDR, IPv6 and NAT (Set 4)

Computer Networks MCQs - Subnetting, CIDR, IPv6 and NAT (Set 4) - CodingHumans

Subnetting questions show up in GATE, CCNA-style interviews and campus placement tests, and they are easy marks once you know the method. This set covers subnet masks, network and broadcast addresses, CIDR summarisation, private and special addresses, IPv6 basics and NAT, with a worked explanation for every calculation.

How to practise: read each question and tap the option you think is correct. You will see right away whether you got it, along with a short explanation, and your score is tracked at the bottom of the screen. This set has 15 questions.

Computer Networks MCQ series: Set 1: OSI, TCP/IP and IP Addressing | Set 2: Data Link Layer | Set 3: Transport, Routing and Application | Set 4: Subnetting, CIDR, IPv6 and NAT

Topics covered in this set

  • Subnet masks and prefix lengths
  • Usable hosts, network and broadcast addresses
  • Number of subnets and choosing the right prefix
  • CIDR route summarisation
  • Private, APIPA and loopback addresses
  • IPv6 address format and header, NAT and PAT

Computer Networks MCQs with answers and explanations

Q1. How many usable host addresses are there in a /26 subnet?

a) 126

b) 64

c) 62

d) 30

Q2. What is the subnet mask for a /27 prefix?

a) 255.255.255.224

b) 255.255.255.240

c) 255.255.255.128

d) 255.255.255.192

Q3. What is the network address of the host 192.168.10.77/26?

a) 192.168.10.76

b) 192.168.10.128

c) 192.168.10.0

d) 192.168.10.64

Q4. What is the broadcast address of the host 172.16.5.130/25?

a) 172.16.5.127

b) 172.16.5.255

c) 172.16.5.128

d) 172.16.255.255

Q5. How many /28 subnets can be created from a single /24 network?

a) 8

b) 16

c) 14

d) 32

Q6. Which of these is a private IPv4 address?

a) 192.169.1.1

b) 172.32.1.1

c) 11.0.0.1

d) 172.20.1.1

Q7. A network needs 500 hosts in one subnet. What is the smallest prefix that fits?

a) /23

b) /22

c) /25

d) /24

Q8. The networks 192.168.0.0/24, 192.168.1.0/24, 192.168.2.0/24 and 192.168.3.0/24 can be summarised as:

a) 192.168.0.0/16

b) 192.168.0.0/23

c) 192.168.0.0/22

d) 192.168.0.0/21

Q9. A Windows or Linux host that cannot reach a DHCP server may give itself an address from which range?

a) 127.0.0.0/8

b) 224.0.0.0/4

c) 10.0.0.0/8

d) 169.254.0.0/16

Q10. How long is an IPv6 address?

a) 128 bits

b) 256 bits

c) 32 bits

d) 64 bits

Q11. Which type of address does NOT exist in IPv6?

a) Multicast

b) Anycast

c) Broadcast

d) Unicast

Q12. What is the correct shortened form of 2001:0db8:0000:0000:0000:0000:0000:0001?

a) 2001:db8:::1

b) 2001:db8::1

c) 2001:db8:0:1

d) 2001::db8::1

Q13. What does the IPv6 address ::1 represent?

a) The loopback address

b) The unspecified address

c) A multicast group

d) The default route

Q14. What is the size of the fixed IPv6 base header?

a) 60 bytes

b) 32 bytes

c) 20 bytes

d) 40 bytes

Q15. Port Address Translation (PAT), also called NAT overload, lets many private hosts share one public IP address by:

a) Broadcasting packets to all hosts

b) Giving each host a different MAC address

c) Tracking the connections by source port number

d) Using IPv6 tunnels

Quick revision notes

  • Usable hosts = 2^(32 - prefix) - 2; subnets created = 2^(borrowed bits).
  • Block size = 256 - mask octet; use it to find the network and broadcast addresses quickly.
  • Private ranges: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16; APIPA is 169.254.0.0/16.
  • Summarising 2^n contiguous networks removes n bits from the prefix.
  • IPv6: 128-bit addresses, a 40-byte base header, no broadcast; ::1 is loopback and :: may appear only once.
  • PAT (NAT overload) uses port numbers so many private hosts can share one public IP.

Frequently asked questions

What is the fastest way to solve subnetting questions?

Find the block size from the interesting octet (256 minus the mask value). List the multiples of the block size, find the one the host falls into, and that gives the network address; the next block minus one is the broadcast address.

Why do we subtract 2 when counting usable hosts?

The first address in a subnet identifies the network and the last one is the broadcast address, so neither can be given to a host. The exceptions are /31 point-to-point links and /32 single-host routes.

Does IPv6 still need NAT?

Usually not. IPv6 has so many addresses that every device can have a globally unique one, so firewalls rather than NAT are used for protection.

Comments

Answered 0/0Correct 0