0
0
Computer Networksknowledge~30 mins

CIDR notation in Computer Networks - Mini Project: Build & Apply

Choose your learning style9 modes available
Understanding CIDR Notation
📖 Scenario: You are working as a network technician setting up IP addresses for a small office network. You need to understand how to write and interpret IP addresses using CIDR notation to efficiently allocate IP ranges.
🎯 Goal: Build a simple reference guide that shows how to write an IP address with its subnet mask in CIDR notation, and how to identify the network and host parts.
📋 What You'll Learn
Create a dictionary called ip_addresses with three IP addresses as keys and their subnet masks as values.
Add a variable called cidr_suffix that holds the number of bits used for the network part.
Create a new dictionary called cidr_notation that combines each IP address with the cidr_suffix to form CIDR notation strings.
Add a final dictionary entry that explains what CIDR notation means in simple terms.
💡 Why This Matters
🌍 Real World
CIDR notation is used by network engineers and IT professionals to efficiently allocate IP addresses and manage networks.
💼 Career
Understanding CIDR notation is essential for roles in network administration, cybersecurity, and cloud infrastructure management.
Progress0 / 4 steps
1
Create the IP addresses dictionary
Create a dictionary called ip_addresses with these exact entries: '192.168.1.0' with subnet mask '255.255.255.0', '10.0.0.0' with subnet mask '255.0.0.0', and '172.16.0.0' with subnet mask '255.240.0.0'.
Computer Networks
Need a hint?

Use curly braces {} to create a dictionary with the IP addresses as keys and subnet masks as values.

2
Add the CIDR suffix variable
Add a variable called cidr_suffix and set it to 24 to represent the number of bits used for the network part in CIDR notation.
Computer Networks
Need a hint?

Simply assign the number 24 to the variable cidr_suffix.

3
Create the CIDR notation dictionary
Create a new dictionary called cidr_notation that uses a for loop with variables ip and mask to iterate over ip_addresses.items(). For each IP, combine it with cidr_suffix to form a string like '192.168.1.0/24' and store it as the value in cidr_notation with the IP as the key.
Computer Networks
Need a hint?

Use a for loop to build the new dictionary by combining the IP address and the CIDR suffix with a slash.

4
Add explanation entry to the dictionary
Add a new entry to the cidr_notation dictionary with the key 'explanation' and the value 'CIDR notation shows the IP address followed by a slash and the number of bits for the network part.'
Computer Networks
Need a hint?

Use the dictionary key assignment syntax to add the explanation string.