Configuring Two ULA Addresses on One Interface: A Guide to IPv6 Networking in Linux

Abstract: Assign two Unique Local Addresses to a single Linux network interface for internal routing and segmentation using ip commands or Netplan.

Created: 2026-09-14 by

You can assign two Unique Local Addresses (ULA) to a single network interface in Linux by using the ip command line tool or by configuring static network configuration files. This setup allows multiple subnets on one physical link, enabling flexible internal routing and segmentation without requiring additional hardware interfaces.

Understanding ULA Addressing

Unique Local Addresses (ULA) are defined in RFC 4193 and are designed for local communication within an organization. They use the prefix fc00::/7, though currently only fd00::/8 is actively used for dynamically assigned addresses. Unlike Global Unicast Addresses (GUA), ULAs are not routable on the public internet, making them ideal for internal services, testing environments, or isolated network segments. When you need to configure two ULA addresses on one interface, such as eth0, you are essentially creating a secondary subnet on that same physical connection. This is common in scenarios where you have multiple VLANs trunked over a single link, or when you want to separate traffic streams logically while keeping them on the same wire. It is important to note that this differs from having multiple global IPv6 addresses, which might be generated via SLAAC or DHCPv6. For manual control over specific ULA prefixes, static assignment is often preferred. For more details on resolving discrepancies between expected and actual IPv6 configurations, see Why is my public IPv6 address different from the one listed in Linux?.

Temporary Configuration Using the IP Command

The most immediate way to add a second ULA address is using the ip addr command. This method is non-persistent; if the system reboots, the address will disappear unless scripted into a startup process. This approach is excellent for testing or temporary adjustments. First, identify your interface name using ip link show. Assume the interface is eth0. To add a primary ULA, you might already have something like fd12:3456:789a::1/64. To add a secondary ULA, choose a different prefix, such as fd98:7654:3210::1/64. Execute the following command to add the secondary address:
sudo ip addr add fd98:7654:3210::1/64 dev eth0
Verify the addition by running ip -6 addr show eth0. You should now see two inet6 entries with the scope global and type local. The kernel will automatically handle routing for both prefixes. If you need to remove it later, replace add with del in the command. This method gives you instant feedback but requires manual intervention after every reboot. For persistent configurations, you must edit network manager files or Netplan YAML files depending on your distribution.

Persistent Configuration with Netplan

Modern Ubuntu systems use Netplan for network configuration. Netplan generates backend configurations for either NetworkManager or systemd-networkd. To assign two ULA addresses persistently, you edit the YAML file located in /etc/netplan/. Open your configuration file, typically named 01-netcfg.yaml or similar. Inside the interface definition, under the addresses list, you can specify multiple IPv6 addresses. Each address is written in CIDR notation.
network:
  version: 2
  ethernets:
    eth0:
      dhcp6: no
      addresses:
        - fd12:3456:789a::1/64
        - fd98:7654:3210::1/64
      routes:
        - to: default
          via: fd12:3456:789a::ff
      nameservers:
        addresses:
          - fd12:3456:789a::2
After saving the file, apply the changes with sudo netplan apply. If errors occur, check the syntax using sudo netplan try, which rolls back if the new configuration fails connectivity tests. If you are assigning labels to these addresses for policy routing, refer to Netplan - Add Secondary IP Address and Assign a Label.

Persistent Configuration with Systemd-networkd

For distributions using systemd-networkd, such as Fedora or Arch Linux, you create a .network file in /etc/systemd/network/. Create a file named 10-eth0.network and define the addresses under the [Address] sections. Each address gets its own section block. This structure makes it clear which IP belongs to which logical segment.
[Match]
Name=eth0

[Network]
DNS=fd12:3456:789a::2

[Address]
Address=fd12:3456:789a::1/64

[Address]
Address=fd98:7654:3210::1/64
Reload the daemon and restart the network service:
sudo systemctl reload systemd-networkd
sudo systemctl restart systemd-networkd
Check status with systemctl status systemd-networkd to ensure no errors were logged during startup.

Routing Considerations

Adding multiple ULA addresses does not automatically create complex routing tables. By default, the Linux kernel uses the source address selection algorithm (RFC 6724) to pick the best source IP for outgoing connections. When communicating with a destination, it prefers a source address from the same prefix as the destination. If you have two ULAs, say fd12::/64 and fd98::/64, and you ping a host in fd12::/64, the kernel will likely use fd12::1 as the source. For hosts in fd98::/64, it will use fd98::1. This behavior is usually desirable. However, if you need specific traffic to exit via a specific ULA regardless of the destination, you must set up policy routing. This involves creating separate routing tables and rules based on the source IP. Without policy routing, both addresses share the main routing table, and reachability depends on the upstream router knowing how to route those specific ULA prefixes. Ensure your switch or router has static routes pointing to your Linux host's MAC address for both prefixes if they are on different VLANs or subnets at the layer 3 boundary. Be aware that some applications may bind to only one IPv6 address by default. If you experience issues connecting to services, check which address the service is listening on using ss -tuln | grep ipv6. For deeper insights into debugging routing issues with multiple interfaces, consult Debugging IPv6 Routing with Multiple Interfaces on a Linux Server with IPSec (Libreswan) Installed.

Troubleshooting Common Issues

One common issue is the "ADDRCONF" messages repeating in logs. This often indicates that the link state is flapping or that there is a conflict in address assignment. Check your journal logs for repeated warnings about duplicate address detection (DAD). Another issue arises when external IPv6 connectivity works but internal ULA communication fails. This is often due to firewall rules blocking the specific ULA ports or incorrect subnet masks. Verify that your iptables or nftables rules allow traffic on the new ULA prefix. Also, ensure that your default gateway is correctly configured for the primary ULA, as secondary ULAs do not automatically inherit the default route unless explicitly added. Finally, remember that ULA addresses are not globally unique. If you merge networks from different sites, you risk prefix collisions. Always document your ULA prefixes and use a consistent generation method, such as hashing the MAC address, to minimize collision risks.

Frequently Asked Questions

Can I use the same ULA prefix for both addresses?

No, each address must belong to a distinct subnet to avoid routing conflicts. While you can technically assign two IPs from the same /64 to one interface, it provides no logical separation and complicates routing decisions unnecessarily. Use different /64 prefixes within the fd00::/8 range for true segmentation.

Does adding a second ULA affect performance?

Adding a second address has negligible impact on CPU or memory usage. The kernel handles multiple addresses efficiently. The only slight overhead comes from increased Duplicate Address Detection (DAD) processes during initialization and slightly larger neighbor cache entries, which are insignificant for modern systems.

How do I verify which ULA is being used for outbound traffic?

You can use the ip -6 route get command followed by a target IP. For example, ip -6 route get fd98:7654:3210::1 will show the selected source address. Alternatively, use tcpdump or wireshark on the sending machine to inspect the source IP in the IPv6 header of outgoing packets.

What happens if I lose connectivity to one ULA subnet?

The other ULA address remains active and usable. Linux treats each address independently regarding link-local reachability. However, if the underlying physical link goes down, all addresses on that interface become unreachable. Policy routing can help isolate failures, ensuring traffic switches to the remaining viable path if available.

Is it safe to mix ULA and Global Unicast Addresses on one interface?

Yes, it is standard practice. Most Linux servers have both a GUA (for internet access) and one or more ULAs (for internal services). The kernel manages source selection intelligently, preferring ULAs for internal destinations and GUAs for external ones, preventing accidental exposure of internal services to the public internet.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More