TechKnowSurge
CompTIA Network+ 3.4 Cisco CCNA 1.8 Cisco CCST Networking 3.4 Cisco CCST Networking 5.3
VideoNetworkFree

DEMO: Static IPv6 Addresses on Linux

Covers how to assign a static IPv6 address to a network interface on a Raspberry Pi by editing the DHCP configuration file and verifying connectivity with a ping test.

Complete this video to capture a CTF flag worth 1 point.

About this video

Configuring a static IPv6 address on a Raspberry Pi follows a process similar to IPv4 static assignment, using the same /etc/dhcpcd.conf configuration file edited with elevated privileges. The static ip6_address directive is uncommented within the ethernet interface block and updated with a chosen address in the fc00 to fd00 range, which is reserved for unique local addressing. While best practice recommends randomizing the host portion of the address to avoid conflicts during network merges, a simplified sequential value works for lab and learning environments. Once the file is saved, the new address does not take effect immediately. A system reboot is the most reliable way to apply the changes, after which ifconfig can be used to confirm that the ethernet interface displays the newly assigned IPv6 address alongside its IPv4 and link-local addresses. Connectivity can then be validated by pinging the address from another machine on the network, confirming that the static IPv6 configuration is fully functional.

What you'll learn

What's covered

IPv6 Static Address on Raspberry Pi

Aligned to

CompTIA Network+
3.4 Given a scenario, implement IPv4 and IPv6 network services.
Cisco CCNA
1.8 Configure and verify IPv6 addressing and prefix
Cisco CCST Networking
3.4 Demonstrate how to set up and check network connectivity
5.3 Run basic diagnostic commands and interpret the results

Key terms

Dynamic Host Configuration Protocol
DHCP
A network protocol that automatically assigns IP addresses and other configuration parameters to devices on a network.
IP Address
A numerical label assigned to each device connected to a network that uses the Internet Protocol.
Internet Control Message Protocol
ICMP
A network layer protocol used to send error messages and operational information about network conditions.
Static IPv6 Address
A manually assigned, fixed IPv6 address configured on a network interface that does not change over time.
ifconfig
A command-line utility on Linux systems used to display and configure network interface parameters.
Network Interface
A hardware or software component that connects a device to a network, identified by a name such as eth0 or wlan0.

Topics

Ipv6 Static Ip Addressing Linux Network Configuration Dhcp Client Raspberry Pi Networking

Transcript

We're going to jump on our Raspberry Pi and assign an IPv6 static address to our network interface.

Editing the Configuration File

What I have here is I've already brought up a terminal window, and then within the terminal window I am going to bring up that same configuration file that we used to configure an IPv4 address. This does need elevated permission, so I did my sudo command in here, and then I'm using nano to configure this file. I navigate to the /etc/dhcpcd.conf file, so I'll hit enter here.

I'm going to scroll down where we have those static assignments to the different interfaces. I have both the wireless LAN I've got set up here, and the ethernet 0. Ethernet 0 is the one that we're going to want to configure. I already have a static address statement right here, I'm just going to uncomment it. Remember, those comments mean that it's not going to look at that line if it's got that pound sign at the beginning of it, that hashtag at the beginning of it. So I delete that and now it's uncommented, and so now it has activated this line. It says static ip6_address= and then it gives the address that it just has set up by default on here.

Choosing the Address

I want to create my own, and so I'm going to have to do it somewhere within the fc to fd range here, colon. And then what they do is they recommend that these last network bits are random. The reason why they recommend it's random is because if you ever merge with another company, or set up some sort of other connections with other devices, if you go sequentially there could be a chance that the other network that you're merging with has gone sequentially as well, and you'll have overlap in your networks. So creating something random is actually a really good thing.

For the simplicity of what we're doing here, I actually want to make this real simple, so that way we understand — or, well, one, it's just easier to type in, but two, we're going to actually get into different networks in the future. And so I'm just going to assign this to the fc-001 network. So that's the network, and then colon colon, and then the address that I'm going to assign to this. I'm going to line it up with the address that I assigned to eth0, so I'm going to do three, so this is just the third host on this network, just like I did with the IP version 4 address here.

In reality, once again, you probably want to mix it up and do something a little more random. In fact, in reality a lot of times we don't even assign a static address to these machines, but in this case right here I've assigned the static address.

Saving and Rebooting

Then I'm going to exit this, so I'll do a control X. Do I want to save? Yes, I do. And then, where do I want to save it to? I want to save it to that same file. I hit enter, and now it is. So the next time that this service gets rebooted, or I reboot the machine, then this static address will take effect.

Once we've saved our file, then we're going to need to make the changes take effect to the machine. Just like we did with IPv4, we're going to have to restart the interface, we're going to have to restart the service, or we just reboot the machine. I find a lot of times it's just easier to go and hit log out on these and then hit reboot, and let it reboot.

Verifying the Address

Once the machine is rebooted, we can get in here and open up a terminal and type in ifconfig to see if the changes have taken effect. I open this up, we're looking at ether0, and we see the IPv4 address, we see the link local address here, and then we also see the IPv6 address that I've assigned to this interface.

So now that we know that we have an IPv6 address set up on our Pi, let's see if we can ping it. I've jumped over to my demo laptop now and I'm going to pull up a command prompt to do this. So bring up a command prompt, and then I'm going to ping the address we just set up: ping fc00:1::. Then I'll hit enter, and sure enough we have a ping, so therefore we verified that this is actually set up.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →