<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>network &#8211; Yuanle&#039;s Blog</title>
	<atom:link href="https://blog2.emacsos.com/tag/network/feed" rel="self" type="application/rss+xml" />
	<link>https://blog2.emacsos.com</link>
	<description></description>
	<lastBuildDate>Tue, 13 May 2025 03:41:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://blog2.emacsos.com/wp-content/uploads/2025/05/favicon-150x150.png</url>
	<title>network &#8211; Yuanle&#039;s Blog</title>
	<link>https://blog2.emacsos.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Linux IPv6 debug checklist</title>
		<link>https://blog2.emacsos.com/linux-ipv6-debug-checklist.html</link>
		
		<dc:creator><![CDATA[sylecn]]></dc:creator>
		<pubDate>Tue, 13 May 2025 03:31:08 +0000</pubDate>
				<category><![CDATA[Linux Server and Sysadmin]]></category>
		<category><![CDATA[IPv6]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[sysadmin]]></category>
		<guid isPermaLink="false">https://blog2.emacsos.com/?p=82</guid>

					<description><![CDATA[If IPv6 is not working properly in Linux, here are steps you can follow to debug the issue. check kernel [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>If IPv6 is not working properly in Linux, here are steps you can follow to debug the issue.</p>



<h2 class="wp-block-heading">check kernel boot param</h2>



<ol class="wp-block-list"></ol>



<p>Check these two files</p>



<pre class="wp-block-code"><code>cat /proc/cmdline
cat /etc/default/grub</code></pre>



<p>If <code>ipv6.disable=1</code> is set, the kernel IPv6 stack will be disabled. If <code>ipv6.disable_ipv6=1</code> is set, the kernel keeps the IPv6 stack functional but will not assign IPv6 addresses to any of your network devices.</p>



<p>Make sure you do not use any of these kernel options if you want to use IPv6.</p>



<h2 class="wp-block-heading">check interface disable_ipv6 settings</h2>



<pre class="wp-block-code"><code>sysctl net.ipv6.conf.lo.disable_ipv6
sysctl net.ipv6.conf.eno1.disable_ipv6
# -r list all values matching this pattern
sysctl -r 'net.ipv6.conf.*.disable_ipv6' net.ipv6.conf</code></pre>



<p>Make sure all of the interfaces that you want to have ipv6 enabled has <code>disable_ipv6=0</code>. Specifically, you SHOULD also enable ipv6 on <code>lo</code> interface. You should also enable IPv6 on Linux bridge and the physical interface that it is connected to.</p>



<h2 class="wp-block-heading">check interface RA settings if you use SLAAC</h2>



<p>RA stands for router advertisement. It is a broadcast packet that allow configuration of IP address and routing. SLAAC relies on RA to work.</p>



<pre class="wp-block-code"><code>sysctl net.ipv6.conf.all.accept_ra
# replace vmbr0 with your interface
sysctl net.ipv6.conf.vmbr0.accept_ra</code></pre>



<p>It should be 1 or 2 depending on your device.<br>If it&#8217;s 0, you need to set this at boot time. e.g. in <code>/etc/network/interfaces</code></p>



<p><a href="https://www.kernel.org/doc/html/latest/networking/ip-sysctl.html">To learn more about <code>accept_ra</code> param, see Linux kernel document.</a> Search <code>accept_ra</code> in that page.</p>



<p>For example, on one of my promox VE node, I have</p>



<pre class="wp-block-code"><code>auto vmbr0
iface vmbr0 inet static
        address 192.168.2.47/24
        gateway 192.168.2.1
        bridge-ports eno1
        bridge-stp off
        bridge-fd 0
iface vmbr0 inet6 auto
        accept_ra 2</code></pre>



<p>If you doubt whether RA is working properly, run <code>tcpdump</code> to capture the packet and view it in wireshark.</p>



<pre class="wp-block-code"><code># replace INTERFACE with your interface name
sudo tcpdump -i INTERFACE -w /tmp/ra_packets.pcap 'icmp6 and (ip6&#91;40] = 134 or ip6&#91;40] = 133)'</code></pre>



<h2 class="wp-block-heading">check lo ip6-loopback ping</h2>



<pre class="wp-block-code"><code>ping6 ::1<br>ping6 ip6-loopback</code></pre>



<h2 class="wp-block-heading">check local hostname is ipv6 resolvable</h2>



<p>in <code>/etc/hosts</code><br>::1 entry should include your fqdn</p>



<h2 class="wp-block-heading">check whether ipv6 address is assigned on interface</h2>



<pre class="wp-block-code"><code>ip -6 a<br>ip -6 a vmbr0</code></pre>



<p>If your IPv6 network use <a href="https://howdoesinternetwork.com/2013/slaac">SLAAC</a>, IP address should be assigned automatically. One interface usually has one public IPv6 address (starts with <code>2x:xx:xx</code>) and more than one private IPv6 address (starts with <code>fx:xx:xx</code>).</p>



<p>If your IPv6 network use DHCPv6 only, you should config DHCP in <code>/etc/network/interface</code> or corresponding RHEL config file or Network Manager config file. To just test DHCPv6 is working, you can run:</p>



<pre class="wp-block-code"><code>dhclient -6 INTERFACE</code></pre>



<h2 class="wp-block-heading">check ipv6 routes is added</h2>



<pre class="wp-block-code"><code>ip -6 r
ip -6 r | grep default</code></pre>



<p>IPv6 routes are added by clients via RA (router advertisement).</p>



<p>Make sure the default route either has no expire field or has a good expire field. In <a href="https://openwrt.org/">openwrt</a> default config, default route expire should be between 1200s and 1800s. If it&#8217;s less than 1200s, RA is not properly received and processed by host.</p>



<p>In some home server, if you enable IPv6 on IPMI/SBC/iLO/iDrac and use the shared network port, host OS will no longer receive the RA packet. You may see low expire on default route or missing a default route. In that case, you should disable IPv6 on IPMI.</p>



<h2 class="wp-block-heading">check IPv6 neighbors for nodes in the same LAN</h2>



<pre class="wp-block-code"><code>ip -6 n show|grep -v -E '(FAILED|STALE)'</code></pre>



<p>At least one router should be listed when IPv6 is working. You can compare results on different nodes in the same LAN.</p>



<h2 class="wp-block-heading">check you can visit other IPv6 nodes on the Internet</h2>



<pre class="wp-block-code"><code>ping6 aliyun.com
curl -6 https://aliyun.com
curl -I -6 https://mirrors.tuna.tsinghua.edu.cn/
# test whether your OS prefer IPv6 or IPv4 when both are available
curl test.ipw.cn</code></pre>



<p></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
