Ubuntu 22.04: How to Permanently Accept IPv6 Auto Configuration via Router Advertisement Messages

Abstract: Resolve IPv6 connectivity issues on Ubuntu 22.04 by permanently enabling Router Advertisement acceptance via sysctl configuration.

Created: 2026-08-14 by
To permanently accept IPv6 auto configuration via Router Advertisement messages on Ubuntu 22.04, you must modify the system’s kernel networking parameters. This is achieved by adjusting the accept_ra setting within the /etc/sysctl.conf file or dedicated configuration files in /etc/sysctl.d/. These changes ensure that your network interfaces automatically obtain IPv6 addresses and routing information from local routers without manual intervention, persisting across reboots.

Understanding Router Advertisements

Router Advertisement (RA) messages are part of the ICMPv6 protocol suite. They are broadcast by routers on a local network segment to announce their presence and provide essential configuration parameters to hosts. These parameters typically include the default gateway, DNS server addresses, and the prefix for stateless address autoconfiguration (SLAAC). By default, modern Linux distributions, including Ubuntu 22.04, may disable the acceptance of these advertisements for security reasons, particularly if the system is configured as a potential router itself.

If your machine is not acting as a router but rather as an end-host, disabling RA acceptance can lead to connectivity issues where the device fails to acquire an IPv6 address or route. The kernel parameter responsible for this behavior is accept_ra. When set to 0, the kernel ignores RA messages. Setting it to 1 allows the host to process these messages and configure its network interface accordingly.

Checking Current Configuration

Before making any changes, it is prudent to verify the current state of the accept_ra parameter for your specific network interfaces. You can check the runtime value using the sysctl command. For example, to check the setting for the primary Ethernet interface, often named eth0 or enp0s3, you would run:

sysctl net.ipv6.conf.eth0.accept_ra

This command returns either 0 or 1. If it returns 0, your system is currently ignoring Router Advertisements. Note that some systems may have different settings per interface, so you should also check the global default setting:

sysctl net.ipv6.conf.default.accept_ra

If you are experiencing issues with IPv6 connectivity, such as the repeating IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready message repeating every minute, ensuring that RAs are accepted is a critical troubleshooting step. Additionally, if you are running a virtual machine, refer to guides on Ubuntu 22.04 VM internet connection issues to rule out hypervisor-level networking misconfigurations.

Modifying Sysctl Configuration

To make the change permanent, you need to edit the sysctl configuration files. While editing the main /etc/sysctl.conf file is possible, it is often cleaner to create a dedicated file in the /etc/sysctl.d/ directory. This prevents your custom settings from being overwritten during system updates or package installations that might touch the main configuration file.

  1. Create a new configuration file: Use a text editor like nano or vim to create a file named 99-ipv6-ra.conf in the /etc/sysctl.d/ directory. This naming convention ensures it is processed last among the drop-in files.
sudo nano /etc/sysctl.d/99-ipv6-ra.conf
  1. Add the necessary parameters: Inside the new file, add the following lines. The first line enables RA acceptance globally for all interfaces. The second line specifically targets your primary network interface (replace eth0 with your actual interface name if different).
# Enable IPv6 Router Advertisement acceptance
net.ipv6.conf.all.accept_ra = 1
net.ipv6.conf.default.accept_ra = 1
net.ipv6.conf.eth0.accept_ra = 1

Using all and default ensures that both existing and future interfaces inherit this behavior. Specifying the interface explicitly guarantees that even if defaults change, your active connection remains configured correctly. Be cautious when setting accept_ra to 1 on systems that also function as routers, as this could expose them to routing loops or unauthorized route injections.

  1. Save and exit: Save the file and close the editor.

Applying the Changes

After saving the configuration file, you must apply the changes to the running kernel. You can do this by reloading the sysctl configuration using the following command:

sudo sysctl --system

This command reads all configuration files in /etc/sysctl.d/ and applies them immediately. You can verify that the changes took effect by running the sysctl commands mentioned earlier again. The output should now show = 1 for the relevant interfaces.

Once the parameters are applied, your network interface will begin processing Router Advertisement messages. You may need to renew your DHCP lease or restart the networking service to trigger the immediate acquisition of IPv6 settings. On Ubuntu 22.04, which uses Netplan for network configuration, you can restart the network manager:

sudo systemctl restart NetworkManager

Alternatively, if you are using a static IP configuration managed directly by the OS rather than NetworkManager, you might need to bring the interface down and up again. Check your IP assignment with ip -6 addr show to confirm that an IPv6 address has been assigned via SLAAC.

Troubleshooting and Verification

If you still do not receive an IPv6 address after applying these settings, there are several diagnostic steps you can take. First, ensure that your router is actually sending RA messages. You can use tcpdump to listen for ICMPv6 packets on your interface:

sudo tcpdump -i eth0 icmp6

If you see outgoing RA messages from the router, the issue might be related to firewall rules blocking ICMPv6 traffic. Unlike IPv4, IPv6 relies heavily on ICMP for core functionality, so blocking it can break networking entirely. Also, verify that your network interface is indeed configured to use DHCPv6 or SLAAC. If you are using ifconfig and IPv4 addresses for verification, remember that ifconfig is deprecated and may not display IPv6 details accurately; prefer using the ip command suite.

Finally, ensure that your network switch or upstream router is not filtering multicast traffic, as RAs are sent to the all-nodes multicast address (::1). If you are in a complex network environment, consult your network administrator to confirm that IPv6 is enabled and properly configured at the layer 2 and layer 3 boundaries.

Frequently Asked Questions

Will enabling accept_ra compromise my security?

Enabling accept_ra on a standard end-host generally does not compromise security, as it simply allows the host to learn routes from trusted local routers. However, on systems that also act as routers, accepting RAs can lead to routing loops or man-in-the-middle attacks if untrusted sources send malicious advertisements. It is recommended to keep this disabled on multi-purpose router devices.

How do I revert these changes if they cause issues?

To revert the changes, you can either delete the custom file created in /etc/sysctl.d/ or comment out the lines you added. Afterward, reload the sysctl configuration with sudo sysctl --system or reboot the system. The default behavior of Ubuntu 22.04 will then be restored.

Why is my IPv6 address showing as tentative?

An IPv6 address in the "tentative" state indicates that Duplicate Address Detection (DAD) is currently in progress. This is a normal part of the SLAAC process where the host checks if the address is already in use on the network. Once DAD completes successfully, the status will change to "preferred" or "valid".

Can I enable accept_ra for only one specific interface?

Yes, you can target specific interfaces by specifying the interface name in the sysctl configuration, such as net.ipv6.conf.eth0.accept_ra = 1. This allows you to maintain stricter controls on other interfaces while enabling auto-configuration only on the desired network adapter.

Does this setting affect IPv4 configuration?

No, the accept_ra parameter is specific to IPv6 and ICMPv6 protocols. It has no impact on IPv4 address configuration, which is handled separately through DHCPv4 or static assignments. Your IPv4 connectivity will remain unaffected by changes to this sysctl key.

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