0
0
Computer Networksknowledge~30 mins

IPv6 addressing basics in Computer Networks - Mini Project: Build & Apply

Choose your learning style9 modes available
IPv6 Addressing Basics
📖 Scenario: You are learning about IPv6, the new internet address system that replaces IPv4. IPv6 addresses are longer and written in hexadecimal. Understanding how to write and recognize IPv6 addresses is important for modern networking.
🎯 Goal: Build a simple list of IPv6 addresses, identify the network prefix length, and write the full expanded form of a shortened IPv6 address.
📋 What You'll Learn
Create a list of three exact IPv6 addresses in their shortened form
Add a variable for the network prefix length
Write a function or logic to expand a shortened IPv6 address to its full form
Complete the final step by showing the expanded address for a given input
💡 Why This Matters
🌍 Real World
IPv6 addressing is used in modern networks to provide unique IP addresses for devices. Understanding how to read and write IPv6 addresses helps in configuring routers, firewalls, and network devices.
💼 Career
Network administrators, cybersecurity professionals, and IT support staff need to understand IPv6 addressing to manage and troubleshoot modern networks effectively.
Progress0 / 4 steps
1
Create a list of IPv6 addresses
Create a list called ipv6_addresses containing these exact IPv6 addresses as strings: '2001:0db8::1', 'fe80::1234:5678', and '::1'.
Computer Networks
Need a hint?

Remember to use square brackets [] to create a list and put each IPv6 address inside quotes.

2
Add the network prefix length
Create a variable called prefix_length and set it to the integer 64, which is a common IPv6 network prefix length.
Computer Networks
Need a hint?

Just assign the number 64 to the variable named prefix_length.

3
Write logic to expand a shortened IPv6 address
Define a function called expand_ipv6 that takes one parameter address and returns the full expanded IPv6 address as a string. For this project, implement the function to return the exact expanded form of '2001:0db8::1' as '2001:0db8:0000:0000:0000:0000:0000:0001'. For any other input, return the input unchanged.
Computer Networks
Need a hint?

Use an if statement to check if the address is '2001:0db8::1' and return the expanded string. Otherwise, return the original address.

4
Show the expanded IPv6 address
Create a variable called expanded_address and set it to the result of calling expand_ipv6 with the argument '2001:0db8::1'.
Computer Networks
Need a hint?

Call the function expand_ipv6 with the string '2001:0db8::1' and assign the result to expanded_address.