Subnetting and supernetting

  • IP Address: A unique identifier for devices on a network (e.g., 192.168.1.1).
  • IPv4: 32-bit address divided into 4 octets (e.g., 192.168.0.1).
  • IPv6: 128-bit address (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334).
  • Classes of IP Addresses (IPv4):
  • Class A: 0.0.0.0 to 127.255.255.255 (Large networks)
  • Class B: 128.0.0.0 to 191.255.255.255 (Medium networks)
  • Class C: 192.0.0.0 to 223.255.255.255 (Small networks)
  • Class D: 224.0.0.0 to 239.255.255.255 (Multicast)
  • Class E: 240.0.0.0 to 255.255.255.255 (Experimental)

2. Subnetting

  • Definition: Dividing a large network into smaller sub-networks (subnets).
  • Purpose:
  • Efficient IP address management.
  • Enhanced security.
  • Reduced broadcast traffic.
  • Key Concepts:
  • Subnet Mask: Determines the network and host portions of an IP address.
    • Example: 255.255.255.0 (/24) means 24 bits for the network.
  • CIDR Notation: Specifies the subnet mask in “slash” notation (e.g., /24).
  • Formula:
    • Number of subnets: 2^borrowed bits.
    • Hosts per subnet: 2^(remaining bits) – 2 (to account for network and broadcast addresses).
  • Example:
  • IP: 192.168.1.0/24.
  • Borrow 2 bits for subnetting: /26.
  • Subnets: 4 (2^2).
  • Hosts per subnet: 62 (2^(32-26) – 2).

3. Steps for Subnetting

  1. Identify the network IP and subnet mask.
  2. Determine how many subnets/hosts are needed.
  3. Calculate the new subnet mask and number of bits to borrow.
  4. Divide the IP address range into subnets.
  5. Assign subnets to devices/networks.

4. Supernetting

  • Definition: Combining multiple networks into a larger network (opposite of subnetting).
  • Purpose:
  • Reduce routing table size.
  • Efficient use of IP addresses.
  • Used in Classless Inter-Domain Routing (CIDR).
  • Key Concepts:
  • Networks must be contiguous (e.g., 192.168.0.0/24 and 192.168.1.0/24).
  • Combine by reducing the prefix length (e.g., 192.168.0.0/23).
  • Example:
  • Combine 192.168.0.0/24 and 192.168.1.0/24.
  • New supernet: 192.168.0.0/23.
  • Host range: 192.168.0.1 to 192.168.1.254.

5. Key Differences

FeatureSubnettingSupernetting
DefinitionDivides a networkCombines networks
PurposeEfficient IP usageSimplify routing
Prefix LengthIncreasesDecreases
Used ForInternal network designInternet routing (ISPs)

6. Common Exam Formulas

  • Subnetting:
  • Subnets: 2^borrowed bits.
  • Hosts per subnet: 2^(remaining bits) – 2.
  • Supernetting:
  • Combine N networks with 2^n hosts.

7. Quick Tips to Remember

  • Binary Conversion: Learn to convert between decimal and binary quickly.
  • CIDR Blocks:
  • /8 = 16,777,216 addresses.
  • /16 = 65,536 addresses.
  • /24 = 256 addresses.
  • Wildcard Mask: Subnet mask inverse (e.g., 255.255.255.0 = 0.0.0.255).

8. Practice Questions

  1. Subnet 192.168.10.0/24 into 4 subnets. What are the subnet masks and ranges?
  2. Combine 192.168.1.0/24 and 192.168.2.0/24 into a supernet. What is the CIDR notation?
  3. Calculate the number of subnets and hosts for a network 10.0.0.0/16 divided into /20.

9. Real-World Applications

  • Subnetting: Used in organizations to manage internal IPs.
  • Supernetting: Used by ISPs to aggregate routes and improve internet routing.

MCQ

What is the subnet mask for a /29 network?
A) 255.255.255.248
B) 255.255.255.240
C) 255.255.255.224
D) 255.255.255.192

A

How many usable hosts are available in a /26 subnet?
A) 62
B) 126
C) 30
D) 14

A

What is the broadcast address for the network 10.1.1.64/26?
A) 10.1.1.127
B) 10.1.1.255
C) 10.1.1.128
D) 10.1.1.63

A

How many subnets can be created from a /24 network if 4 bits are borrowed?
A) 16
B) 8
C) 32
D) 64

A

Which of the following is the correct subnet mask for creating 8 subnets?
A) 255.255.255.224
B) 255.255.255.240
C) 255.255.255.192
D) 255.255.255.248

A

For the IP address 192.168.10.0/24, what is the subnet mask if it is divided into 4 subnets?
A) 255.255.255.224
B) 255.255.255.192
C) 255.255.255.240
D) 255.255.255.128

B

What is the primary reason for subnetting a network?
A) Increase broadcast domain size
B) Improve security and reduce broadcast traffic
C) Increase the size of the network
D) Eliminate routing tables

B

How many usable hosts are available in a /30 subnet?
A) 4
B) 6
C) 2
D) 0

C

Which IP address is the network address for the subnet 172.16.1.128/25?
A) 172.16.1.255
B) 172.16.1.0
C) 172.16.1.128
D) 172.16.1.64

C

What is the default subnet mask for a Class B address?
A) 255.255.0.0
B) 255.255.255.0
C) 255.255.255.255
D) 255.0.0.0

A


What is supernetting?
A) Dividing a network into smaller networks
B) Combining multiple networks into one
C) Creating more IP addresses
D) Eliminating subnet masks

B

Which of the following conditions must be met for networks to be supernetted?
A) Networks must have the same prefix length.
B) Networks must be contiguous.
C) Networks must be Class C addresses.
D) Networks must have different subnet masks.

B

What is the CIDR notation when combining two /25 networks?
A) /26
B) /24
C) /23
D) /22

C

What is the purpose of supernetting?
A) Reduce the size of routing tables.
B) Increase the number of subnets.
C) Enhance network security.
D) Reduce host availability.

A

Which of the following IP address ranges can be supernetted into a single network?
A) 192.168.0.0/24, 192.168.1.0/24
B) 10.0.0.0/8, 10.1.0.0/16
C) 172.16.0.0/12, 172.17.0.0/12
D) 192.168.1.0/24, 192.168.3.0/24

A

What is the prefix length of a supernet that combines eight /24 networks?
A) /20
B) /21
C) /19
D) /18

A

How many IP addresses are covered by a /22 supernet?
A) 1024
B) 2048
C) 512
D) 256

A

Which IP address range belongs to the supernet 192.168.0.0/22?
A) 192.168.0.0 to 192.168.3.255
B) 192.168.0.0 to 192.168.0.255
C) 192.168.1.0 to 192.168.2.255
D) 192.168.0.0 to 192.168.1.255

A

How many networks are combined to create a supernet with a /20 prefix?
A) 8
B) 16
C) 4
D) 2

B

What is the minimum prefix length required to combine two /26 networks into a single supernet?
A) /25
B) /24
C) /23
D) /22

A