To configure a static IPv6 address on a device, the steps may vary depending on the operating system. Below are instructions for configuring a static IPv6 address on Windows, Linux, and macOS.
Windows
-
Open Network Connections:
- Press
Win + R, typencpa.cpl, and press Enter.
- Press
-
Select Network Adapter:
- Right-click on the network adapter you want to configure and select
Properties.
- Right-click on the network adapter you want to configure and select
-
Select Internet Protocol Version 6 (TCP/IPv6):
- In the list, find and select
Internet Protocol Version 6 (TCP/IPv6), then clickProperties.
- In the list, find and select
-
Configure Static IPv6 Address:
- Select
Use the following IPv6 address. - Enter the desired IPv6 address, subnet prefix length (e.g., 64), and default gateway.
- Optionally, enter DNS server addresses.
- Select
-
Save Settings:
- Click
OKto save the settings, then close the properties window.
- Click
Linux (Using Terminal)
-
Open Terminal.
-
Edit Network Configuration:
- Depending on your Linux distribution, you may need to edit the network configuration file. For example, on Ubuntu, you can use:
sudo nano /etc/netplan/01-netcfg.yaml - Add the following configuration (adjust the interface name and addresses accordingly):
network: version: 2 ethernets: eth0: dhcp4: no dhcp6: no addresses: - 2001:db8::1/64 gateway6: 2001:db8::fffe nameservers: addresses: - 2001:4860:4860::8888 - 2001:4860:4860::8844
- Depending on your Linux distribution, you may need to edit the network configuration file. For example, on Ubuntu, you can use:
-
Apply Changes:
- Save the file and apply the changes:
sudo netplan apply
- Save the file and apply the changes:
macOS
-
Open System Preferences:
- Click on the Apple menu and select
System Preferences.
- Click on the Apple menu and select
-
Select Network:
- Click on
Network.
- Click on
-
Select Network Interface:
- Choose the network interface (e.g., Wi-Fi or Ethernet) you want to configure.
-
Configure IPv6:
- Click on the
Advancedbutton, then go to theTCP/IPtab. - From the
Configure IPv6dropdown, selectManually. - Enter the desired IPv6 address, subnet prefix length, and router address.
- Click on the
-
Save Settings:
- Click
OK, thenApplyto save the changes.
- Click
Verification
After configuring the static IPv6 address, you can verify the configuration:
-
Windows: Open Command Prompt and run:
ipconfig -
Linux: Use the command:
ip -6 addr show -
macOS: Use the command:
ifconfig
This will display the configured IPv6 addresses for your network interfaces.
