<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Home Lab Cluster Project on This Isn&#39;t Science</title>
    <link>https://coffee-anon.com/tags/home-lab-cluster-project/</link>
    <description>Recent content in Home Lab Cluster Project on This Isn&#39;t Science</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 17 Sep 2023 05:52:03 +0000</lastBuildDate>
    <atom:link href="https://coffee-anon.com/tags/home-lab-cluster-project/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>CLI debug tools for OpenWrt routing</title>
      <link>https://coffee-anon.com/posts/cli-debug-tools-for-openwrt-routing/</link>
      <pubDate>Sun, 17 Sep 2023 05:52:03 +0000</pubDate>
      <guid>https://coffee-anon.com/posts/cli-debug-tools-for-openwrt-routing/</guid>
      <description>A quick list of helpful commands to use when trying to debug the OpenWrt routing tables.</description>
      <content:encoded><![CDATA[<p>Using OpenWrt version 22.03.4</p>
<p>Here&rsquo;s a quick list of helpful commands to use when trying to debug the OpenWrt routing tables. I ran across some issues recently where a cluster running metallb in L2 mode was failing to get traffic, and the first place I looked was the router. Here are a few commands that ended up being very helpful - in my case to prove that the router was completely fine.</p>
<h3 id="print-all-of-the-firewall-rules-on-uci">Print all of the firewall rules on uci</h3>
<pre tabindex="0"><code>uci show firewall
</code></pre><h3 id="print-all-of-the-traffic-rules">Print all of the traffic rules</h3>
<pre tabindex="0"><code>fw4 print
</code></pre><p><code>fw4</code> is sort of like iptables but less ancient.</p>
<blockquote>
<p>Note: <code>fw4 print</code> also does some basic validation of whether the config are valid, since uci can add parameters that are invalid which will cause those config sections to be ignored. BUT there ARE some changes that are valid in UCI but will be considered invalid by fw4! like <code>log_limit</code></p>
</blockquote>
<h3 id="manually-edit-the-uci-firewall-rules">Manually edit the uci firewall rules</h3>
<pre tabindex="0"><code>vi /etc/config/firewall
</code></pre><p>This can be very helpful in order to add logging (and log limits) to specific rules to see when they&rsquo;re triggered.</p>
<h3 id="reload-the-firewall-config-manually">Reload the firewall config manually</h3>
<pre tabindex="0"><code>/etc/init.d/firewall reload
</code></pre><blockquote>
<p>Manual reload of the config is only really necessary when editing the firewall config by hand</p>
</blockquote>
<h3 id="run-ip-neigh-to-test-arp-route">Run <code>ip neigh</code> to test ARP route</h3>
<p>Install the package</p>
<pre tabindex="0"><code>opkg install ip-full
opkg install iputils-arping
</code></pre><p>And then check if the ARP list is correct</p>
<pre tabindex="0"><code>ip neigh
</code></pre><p>The traffic for the ARP on a host can also be watched with</p>
<pre tabindex="0"><code>sudo tcpdump -i wlp3s0 -n -e -vvv arp
</code></pre><p>(replace <code>wlp3s0</code> with whatever your network interface is called.)</p>
<p>If the ARP list isn&rsquo;t right, it&rsquo;s possible to add a permanent entry with <code>ip neigh replace</code>, but it&rsquo;s worth considering whether this is a workable solution long-term.</p>
<p>In my case, just knowing that the ARP list was wrong led me to find that one of my network cards just wasn&rsquo;t responding properly to ARP requests. Rather than add a manual entry, I specified a preferred node for managing my metallb load balancer that didn&rsquo;t have this problem.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
