<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>vifino&#x27;s ramblings - the blinken life</title>
    <subtitle>vifino&#x27;s ramblings - attempt #34</subtitle>
    <link rel="self" type="application/atom+xml" href="/atom.xml"/>
    <link rel="alternate" type="text/html" href="/"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2024-10-25T00:00:00+00:00</updated>
    <id>/atom.xml</id>
    <entry xml:lang="en">
        <title>blinken.life - vifino&#x27;s Blog</title>
        <published>2024-10-25T00:00:00+00:00</published>
        <updated>2024-10-25T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              vifino
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="/about/"/>
        <id>/about/</id>
        
        <content type="html" xml:base="/about/">&lt;h1 id=&quot;hey-i-m-vifino&quot;&gt;Hey! I&#x27;m vifino.&lt;a class=&quot;zola-anchor&quot; href=&quot;#hey-i-m-vifino&quot; aria-label=&quot;Anchor link for: hey-i-m-vifino&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;This is my (current) blog where I post everything that I consider worthy of sharing.
I have a tendency to forget about it even existing.&lt;&#x2F;p&gt;
&lt;p&gt;Mostly filled with random guides or experiences doing things I&#x27;m not supposed to be doing.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;interests&quot;&gt;Interests&lt;a class=&quot;zola-anchor&quot; href=&quot;#interests&quot; aria-label=&quot;Anchor link for: interests&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;LED Matrices, Showlasers, DMX&#x2F;sACN&#x2F;ArtNet.. Blinken dot Life, hello!?&lt;&#x2F;li&gt;
&lt;li&gt;Networking and Notworking. BGP, IS-IS, MPLS, 100G and beyond..&lt;&#x2F;li&gt;
&lt;li&gt;Modern tech. PCIe&#x2F;CXL, NVMe over Fabrics, Virtualization..&lt;&#x2F;li&gt;
&lt;li&gt;Long forgotten and obscure Technology. Retrocomputing, ISDN, X.25..&lt;&#x2F;li&gt;
&lt;li&gt;Audio Engineering. PA systems, Live Sound, room correction, Dante..&lt;&#x2F;li&gt;
&lt;li&gt;Video Engineering. Broadcasting, SDI, Projection Mapping..&lt;&#x2F;li&gt;
&lt;li&gt;Electronics. Metrology, GPIB, KiCAD..&lt;&#x2F;li&gt;
&lt;li&gt;Timekeeping. NTP, PTP, DCF77, Rubidium Clocks..&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;That non-exhaustive list was pretty exhausting to write. Chances are, if it involves the Thinking Sand, I&#x27;m mildly intrigued.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;contact&quot;&gt;Contact&lt;a class=&quot;zola-anchor&quot; href=&quot;#contact&quot; aria-label=&quot;Anchor link for: contact&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;You can find or reach me on the following platforms:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;@vifino:letsjust.chat&quot;&gt;@vifino:letsjust.chat&lt;&#x2F;a&gt; via Matrix&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;chaos.social&#x2F;@vifino&quot;&gt;@vifino@chaos.social&lt;&#x2F;a&gt; on the Fediverse&#x2F;Mastodon&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;vifino&quot;&gt;@vifino&lt;&#x2F;a&gt; on GitHub&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Other methods are to be considered legacy. Don&#x27;t.&lt;&#x2F;p&gt;
&lt;p&gt;You can often spot me at CCC-related Events.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Updating Crucial P3 Plus NVMe Firmware on Linux</title>
        <published>2024-09-11T00:00:00+00:00</published>
        <updated>2024-09-11T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              vifino
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="/crucial-p3plus-fw/"/>
        <id>/crucial-p3plus-fw/</id>
        
        <content type="html" xml:base="/crucial-p3plus-fw/">&lt;h1 id=&quot;ssd-firmware-is-still-firmware&quot;&gt;SSD firmware is still firmware&lt;a class=&quot;zola-anchor&quot; href=&quot;#ssd-firmware-is-still-firmware&quot; aria-label=&quot;Anchor link for: ssd-firmware-is-still-firmware&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Like all firmware, NVMe SSD firmware also has a big chance to contain bugs, missed optimisations and other quirky behaviour.&lt;&#x2F;p&gt;
&lt;p&gt;Many vendors just let you download new firmware for non-OEM devices - Intel, Samsung and Kioxia are in that group. Bootable ISOs!&lt;&#x2F;p&gt;
&lt;p&gt;Crucial also lets you update the firmware, but some drives only get newer firmware via a Windows-only utility called Crucial Storage Executive.
The Crucial P3 Plus counts to that group.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;finding-the-firmware&quot;&gt;Finding the Firmware&lt;a class=&quot;zola-anchor&quot; href=&quot;#finding-the-firmware&quot; aria-label=&quot;Anchor link for: finding-the-firmware&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Running Crucial Storage Executive with Fiddler Classic running yields the requests sent to Crucials&#x27; servers.&lt;&#x2F;p&gt;
&lt;p&gt;When the software checks for newer firmware, it sends a request like this:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;https:&#x2F;&#x2F;www.orderingmemory.com&#x2F;firmware&#x2F;firmware.aspx?key=P3Plus&amp;amp;fw=P9CR40A&amp;amp;fwType=CR&amp;amp;os=Windows&amp;amp;lang=en-GB&amp;amp;oem=false&amp;amp;formFactor=&amp;amp;capacity=1000&amp;amp;toolVer=10.07.072024.01
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The JSON answer that comes back tells us what we want to know.&lt;&#x2F;p&gt;
&lt;p&gt;After a bit of fiddling with the query parameters, you can minimize it only to the necessary ones for your drive and get the manual update package:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt; curl&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; -s &lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;https:&#x2F;&#x2F;www.orderingmemory.com&#x2F;firmware&#x2F;firmware.aspx?key=P3Plus&amp;amp;fw=P9CR40A&amp;amp;fwType=CR&lt;&#x2F;span&gt;&lt;span&gt;&amp;#39; | &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;jq &lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;{
&lt;&#x2F;span&gt;&lt;span&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;CurrentFW&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;: &lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;P9CR40A&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;,
&lt;&#x2F;span&gt;&lt;span&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;latestFW&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;: &lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;P9CR40D&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;,
&lt;&#x2F;span&gt;&lt;span&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;result&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;: &lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;Update available&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;,
&lt;&#x2F;span&gt;&lt;span&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;error&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;: &lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;,
&lt;&#x2F;span&gt;&lt;span&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;release_date&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;: &lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&amp;quot;,
&lt;&#x2F;span&gt;&lt;span&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;manualurl&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;: &lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;https:&#x2F;&#x2F;content.crucial.com&#x2F;content&#x2F;dam&#x2F;crucial&#x2F;support&#x2F;ssd&#x2F;firmware&#x2F;ssdtool&#x2F;p3plus&#x2F;p9cr40d.zip&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;,
&lt;&#x2F;span&gt;&lt;span&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;releasenotes&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;: &lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;It contains the following improvements: &amp;lt;ul&amp;gt;  &amp;lt;li&amp;gt;Update to resolve BIOS enumeration issue on Lenovo ThinkPad platforms.&amp;lt;&#x2F;li&amp;gt;  &amp;lt;li&amp;gt;Error handling enhancement.&amp;lt;&#x2F;li&amp;gt;&amp;lt;&#x2F;ul&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;}
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;code&gt;manualurl&lt;&#x2F;code&gt; is what we want.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;update-flow-on-linux&quot;&gt;Update flow on Linux&lt;a class=&quot;zola-anchor&quot; href=&quot;#update-flow-on-linux&quot; aria-label=&quot;Anchor link for: update-flow-on-linux&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;em&gt;Insert standard disclaimer here&lt;&#x2F;em&gt;: If you break it, it&#x27;s not my fault. If you don&#x27;t have a P3 Plus, this is not the right firmware. Additionally, this drive only has a single firmware slot, so if it&#x27;s fucked, it&#x27;s fucked.&lt;&#x2F;p&gt;
&lt;p&gt;Fetch the &lt;code&gt;manualurl&lt;&#x2F;code&gt; and unzip it:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt; curl&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; -LOJ&lt;&#x2F;span&gt;&lt;span&gt; https:&#x2F;&#x2F;content.crucial.com&#x2F;content&#x2F;dam&#x2F;crucial&#x2F;support&#x2F;ssd&#x2F;firmware&#x2F;ssdtool&#x2F;p3plus&#x2F;p9cr40d.zip
&lt;&#x2F;span&gt;&lt;span&gt;  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
&lt;&#x2F;span&gt;&lt;span&gt;                                 &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;Dload&lt;&#x2F;span&gt;&lt;span&gt;  Upload   Total   Spent    Left  Speed
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;100&lt;&#x2F;span&gt;&lt;span&gt; 2216k    0 2216k    0     0  9879k      0 --:--:-- --:--:-- --:--:-- 9894k
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt; unzip p9cr40d.zip
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;Archive:&lt;&#x2F;span&gt;&lt;span&gt;  p9cr40d.zip
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;extracting:&lt;&#x2F;span&gt;&lt;span&gt; firmware.properties
&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;inflating:&lt;&#x2F;span&gt;&lt;span&gt; P9CR40D&#x2F;1.bin
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Updating the drive firmware with &lt;code&gt;nvme-cli&lt;&#x2F;code&gt; is quite simple:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt; sudo nvme list
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;Node&lt;&#x2F;span&gt;&lt;span&gt;                  Generic               SN                   Model                                    Namespace  Usage                      Format           FW Rev
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;---------------------&lt;&#x2F;span&gt;&lt;span&gt; --------------------- -------------------- ---------------------------------------- ---------- -------------------------- ---------------- --------
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;&#x2F;dev&#x2F;nvme0n1&lt;&#x2F;span&gt;&lt;span&gt;          &#x2F;dev&#x2F;ng0n1            XXXXXXXXXXXX         KXG6AZNV1T02 TOSHIBA                     0x1          1.02  TB &#x2F;   1.02  TB    512   B +  0 B   5108AGLA
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;&#x2F;dev&#x2F;nvme1n1&lt;&#x2F;span&gt;&lt;span&gt;          &#x2F;dev&#x2F;ng1n1            XXXXXXXXXXXX         CT4000P3PSSD8                            0x1          4.00  TB &#x2F;   4.00  TB      4 KiB +  0 B   P9CR40A
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;$ &lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# Update the right drive, yeah?
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt; sudo nvme fw-download&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; --fw&lt;&#x2F;span&gt;&lt;span&gt;=P9CR40D&#x2F;1.bin &#x2F;dev&#x2F;nvme1
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;Firmware&lt;&#x2F;span&gt;&lt;span&gt; download success
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt; sudo nvme fw-commit&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; -v --action&lt;&#x2F;span&gt;&lt;span&gt;=3 &#x2F;dev&#x2F;nvme1
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;Success&lt;&#x2F;span&gt;&lt;span&gt; committing firmware action:3 slot:0
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt; echo 1 | &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span&gt; tee &#x2F;sys&#x2F;class&#x2F;nvme&#x2F;nvme1&#x2F;reset_controller
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;1
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt; sudo nvme fw-log &#x2F;dev&#x2F;nvme1
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;Firmware&lt;&#x2F;span&gt;&lt;span&gt; Log for device:nvme1
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;afi&lt;&#x2F;span&gt;&lt;span&gt;  : 0x1
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;frs1&lt;&#x2F;span&gt;&lt;span&gt; : 0x44303452433950 (P9CR40D.)
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Tada! Now the firmware is P9CR40D. I love NVMe!&lt;&#x2F;p&gt;
&lt;p&gt;Updating via &lt;code&gt;fwupdtool&lt;&#x2F;code&gt; should also be possible, judging from &lt;a href=&quot;https:&#x2F;&#x2F;nullr0ute.com&#x2F;2022&#x2F;06&#x2F;using-fwupdmgr-to-update-nvme-firmware&#x2F;&quot;&gt;this blog post&lt;&#x2F;a&gt;. I haven&#x27;t tried, but it mentioned the similarly named &lt;code&gt;1.bin&lt;&#x2F;code&gt; blob we also have here.&lt;&#x2F;p&gt;
&lt;p&gt;According to my own unscientific &quot;benchmarks&quot; and &lt;a href=&quot;https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;thinkpad&#x2F;comments&#x2F;1bch2ab&#x2F;updated_firmware_on_crucial_p3_ssd_to_amazing&#x2F;#lightbox&quot;&gt;a random reddit user&lt;&#x2F;a&gt;, the P3 Plus has gotten noticably faster.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;letter-to-crucial&quot;&gt;Letter to Crucial&lt;a class=&quot;zola-anchor&quot; href=&quot;#letter-to-crucial&quot; aria-label=&quot;Anchor link for: letter-to-crucial&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Dear Crucial,&lt;&#x2F;p&gt;
&lt;p&gt;if you would just list the firmware binary on your site or produce a bare-minimum flasher ISOs, I would be very happy. Clearly, the updates have a point.&lt;&#x2F;p&gt;
&lt;p&gt;You have nothing to lose, but a bunch of potential support cases could be solved by simply delivering the fixes you already made.&lt;&#x2F;p&gt;
&lt;p&gt;If you&#x27;re actually interested in getting those updates widely applied on Linux devices, look into &lt;a href=&quot;https:&#x2F;&#x2F;fwupd.org&#x2F;&quot;&gt;LVFS&lt;&#x2F;a&gt;. Updating NVMe devices is well supported and update submission is probably easily integrated into your workflow.&lt;&#x2F;p&gt;
&lt;p&gt;Thank you.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Crossflashing the Logitech Brio 4K Stream Edition (2017)</title>
        <published>2024-08-14T00:00:00+00:00</published>
        <updated>2024-08-16T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              vifino
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="/logitech-brio-stream/"/>
        <id>/logitech-brio-stream/</id>
        
        <content type="html" xml:base="/logitech-brio-stream/">&lt;h1 id=&quot;a-tale-of-two-webcams&quot;&gt;A Tale of Two Webcams&lt;a class=&quot;zola-anchor&quot; href=&quot;#a-tale-of-two-webcams&quot; aria-label=&quot;Anchor link for: a-tale-of-two-webcams&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Ah, webcams. Plug &#x27;em in, show your face.
As if it wasn&#x27;t bad enough that we still have to pay absurd sums of money for webcams that barely manage to output 1080p30, using sensors even a no-name smartphone manufacturer wouldn&#x27;t dare to put in their device, even if you actually pay the premium and get a &lt;em&gt;4K&lt;&#x2F;em&gt; webcam, you&#x27;re still getting fucked over.&lt;&#x2F;p&gt;
&lt;p&gt;In particular, I am talking about the Logitech Brio 4K and Brio 4K Stream Edition, released in 2017. Logitech decided that, while physically identical, one would be decidedly more gamery and includes a one-year XSplit license. Contrary to the typical gamer&#x2F;streamer tax, this one is &lt;em&gt;cheaper&lt;&#x2F;em&gt; than the non-streaming edition on retailers such as Amazon.&lt;&#x2F;p&gt;
&lt;p&gt;Cheaper &lt;em&gt;and&lt;&#x2F;em&gt; value-added benefits? Sounds too good to be true, and it is.&lt;&#x2F;p&gt;
&lt;p&gt;You are, in fact, getting shafted.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;it-s-the-firmware&quot;&gt;It&#x27;s the Firmware!&lt;a class=&quot;zola-anchor&quot; href=&quot;#it-s-the-firmware&quot; aria-label=&quot;Anchor link for: it-s-the-firmware&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Like almost all electronic devices, it runs software, firmware in particular. Like most other software, it gets developed as &lt;em&gt;Bananaware&lt;&#x2F;em&gt;, it ripens at the customer. Bugs and programming mistakes happen, nobody is getting paid enough to test their crappy products, therefore publishing fixed and improved software as fast as possible is very, very valuable.&lt;&#x2F;p&gt;
&lt;p&gt;Returning to our two webcams, there is a distinct difference between the two: One is getting updates, the other was forgotten.
Both being equal physically, there is no excuse and it comes down to negligance.&lt;&#x2F;p&gt;
&lt;p&gt;The Brio 4K Stream Edition had its last update pushed in 2019, a nowadays harder to find &lt;code&gt;LogiBrioStreamFWUpdate_1.3.14.exe&lt;&#x2F;code&gt; given that Logitech seems to have wiped its existance from their website(s). That updater contains &lt;code&gt;VIDEO&lt;&#x2F;code&gt; firmware version &lt;code&gt;v2.0.2&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The non-gamer edition? Still got stand-alone downloadable updates in March of 2022, &lt;code&gt;FWUpdateBRIO_2.9.76.0.exe&lt;&#x2F;code&gt;. &lt;code&gt;VIDEO&lt;&#x2F;code&gt; firmware version &lt;code&gt;v2.0.58&lt;&#x2F;code&gt;. And there are further updates being published Logitech&#x27;s Logi Tune software.&lt;&#x2F;p&gt;
&lt;p&gt;Yeah, that&#x27;s a bit of a difference, if you ask me.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;what-firmware&quot;&gt;What Firmware?&lt;a class=&quot;zola-anchor&quot; href=&quot;#what-firmware&quot; aria-label=&quot;Anchor link for: what-firmware&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Given that the hardware is identical, what is to stop us from loading the new-and-improved firmware on the Stream Edition?
Nothing that can&#x27;t be circumvented if you can risk the loss of the camera for questionable benefits!&lt;&#x2F;p&gt;
&lt;p&gt;If you open the (Windows) flashers, you can tell that they are practically the same. If you press the info button, it will tell you the target version.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Brio 4K Stream Edition
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;VIDEO&lt;&#x2F;code&gt;: 2.0.2&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;EEPROM&lt;&#x2F;code&gt;: 1.22&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&quot;BRIO ULTRA-HD PRO BUSINESS-WEBCAM&quot;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;VIDEO&lt;&#x2F;code&gt;: 2.0.58&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;EEPROM&lt;&#x2F;code&gt;: 1.18&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The firmware is split into two parts: &lt;code&gt;VIDEO&lt;&#x2F;code&gt; and &lt;code&gt;EEPROM&lt;&#x2F;code&gt;. &lt;code&gt;VIDEO&lt;&#x2F;code&gt; is the main firmware, what is &lt;code&gt;EEPROM&lt;&#x2F;code&gt;? Given that it&#x27;s versioned and flashed during update, it probably isn&#x27;t calibration data, but simply product information.&lt;&#x2F;p&gt;
&lt;p&gt;This tracks: The Stream Edition was probably just a simple offshoot of the main business webcam. The EEPROM has been versioned up as it had changes made.&lt;&#x2F;p&gt;
&lt;p&gt;So, why not just crossflash it?&lt;&#x2F;p&gt;
&lt;h1 id=&quot;crossflashing&quot;&gt;Crossflashing&lt;a class=&quot;zola-anchor&quot; href=&quot;#crossflashing&quot; aria-label=&quot;Anchor link for: crossflashing&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;em&gt;WARNING: This could void your warranty, burn down your house, etc... If you decide to follow these instructions and get an expensive paperweight, it&#x27;s your fault and I bear no responsibility. You have been warned.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;After setup&#x2F;installation of the firmware flashers, you can look in &lt;code&gt;C:\Program Files (x86)\Common Files\LogiShrd&lt;&#x2F;code&gt; to find the &lt;em&gt;actual&lt;&#x2F;em&gt; flashers. The Stream Edition flasher won&#x27;t find the Pro webcam and vice versa, so a simple one-click crossflash is out of the question.&lt;&#x2F;p&gt;
&lt;p&gt;I opened both of the flashers in &lt;a href=&quot;https:&#x2F;&#x2F;www.angusj.com&#x2F;resourcehacker&#x2F;&quot;&gt;Resource Hacker&lt;&#x2F;a&gt; and looked around. There is an &lt;code&gt;RCData&lt;&#x2F;code&gt; with a small binary resource named &lt;code&gt;EEPROM&lt;&#x2F;code&gt; and a chonky boy called &lt;code&gt;VIDEO&lt;&#x2F;code&gt;. Could it be this easy?&lt;&#x2F;p&gt;
&lt;p&gt;Yes. Yes, it could be.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Open &lt;code&gt;FWUpdateBRIO.exe&lt;&#x2F;code&gt; in Resource Hacker.&lt;&#x2F;li&gt;
&lt;li&gt;Save &lt;code&gt;VIDEO&lt;&#x2F;code&gt; and &lt;code&gt;EEPROM&lt;&#x2F;code&gt; as bin.&lt;&#x2F;li&gt;
&lt;li&gt;Open &lt;code&gt;FWUpdateLogi4KStreamEdition.exe&lt;&#x2F;code&gt; in Resource Hacker.&lt;&#x2F;li&gt;
&lt;li&gt;Replace &lt;code&gt;VIDEO&lt;&#x2F;code&gt; and &lt;code&gt;EEPROM&lt;&#x2F;code&gt; with the previously extracted binaries.&lt;&#x2F;li&gt;
&lt;li&gt;Save modified exe.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Running the modified flasher will update the &lt;code&gt;VIDEO&lt;&#x2F;code&gt; firmware, but leave the &lt;code&gt;EEPROM&lt;&#x2F;code&gt; data at its current version as it is newer. This will get you all the bugfixes, but Logitech software will be a bit confused as it&#x27;s something inbetween.&lt;&#x2F;p&gt;
&lt;p&gt;During my investigation, it turns out there is a magic &lt;code&gt;-force&lt;&#x2F;code&gt; flag to the exe which has no issues with downgrading firmware! Simply run the modified flasher with that flag and let it downgrade the &lt;code&gt;EEPROM&lt;&#x2F;code&gt;. This will make the webcam for all intents and purposes a Brio Pro.&lt;&#x2F;p&gt;
&lt;p&gt;After it finally gets recognized as a Brio Pro, you can use Logitech&#x27;s Logi Tune to update it further to &lt;code&gt;2.0.64&lt;&#x2F;code&gt; which is current as of August 2024.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;summary&quot;&gt;Summary&lt;a class=&quot;zola-anchor&quot; href=&quot;#summary&quot; aria-label=&quot;Anchor link for: summary&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;It is surprisingly easy to crossflash the Stream Edition to the Pro variant. It yielded me fixes for problems I probably don&#x27;t have and a warm fuzzy feeling!&lt;&#x2F;p&gt;
&lt;p&gt;There seems to be at least fixes regarding the autofocus and Windows Hello, both of which I don&#x27;t use, as my camera is in a &lt;a href=&quot;https:&#x2F;&#x2F;www.kurokesu.com&#x2F;shop&#x2F;BRIO_REWORK_KIT2&quot;&gt;Kurokesu BRIO Rework Kit&lt;&#x2F;a&gt;, which trades the IR Emitters, IR Camera and the lens - including the focus mechanism - for a sleek full-metal enclosure and CS-mount replacable lenses. Unaffiliated, but I&#x27;ve bought this in 2019 and I don&#x27;t regret it one bit.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Hidden Poetry in Juniper&#x27;s Junos</title>
        <published>2022-06-12T00:00:00+00:00</published>
        <updated>2022-06-13T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              vifino
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="/juniper-hidden-poetry/"/>
        <id>/juniper-hidden-poetry/</id>
        
        <content type="html" xml:base="/juniper-hidden-poetry/">&lt;h1 id=&quot;oh-junos-oh-junos-show-me-your-poems&quot;&gt;Oh Junos, oh Junos! Show me your poems!&lt;a class=&quot;zola-anchor&quot; href=&quot;#oh-junos-oh-junos-show-me-your-poems&quot; aria-label=&quot;Anchor link for: oh-junos-oh-junos-show-me-your-poems&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Much like many other bored programmers slaving away at their keyboards,
Juniper Developers that work on Junos decided to add a few easter eggs.&lt;&#x2F;p&gt;
&lt;p&gt;One of which is rather commonly known, but one I believe to have found that isn&#x27;t widely known, if known at all.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;show-version-and-haiku&quot;&gt;&lt;code&gt;show version and haiku&lt;&#x2F;code&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#show-version-and-haiku&quot; aria-label=&quot;Anchor link for: show-version-and-haiku&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;This one is the well known one.
Just log on to any Junos device and and run that command and you&#x27;ll be greeted with something like the following:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;vifino@asprey.dh.blinken.space&amp;gt; show version and haiku
&lt;&#x2F;span&gt;&lt;span&gt;Hostname: asprey.dh.blinken.space
&lt;&#x2F;span&gt;&lt;span&gt;Model: srx345
&lt;&#x2F;span&gt;&lt;span&gt;Junos: 22.1R1.10
&lt;&#x2F;span&gt;&lt;span&gt;JUNOS Software Release [22.1R1.10]
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;        IS-IS screams,
&lt;&#x2F;span&gt;&lt;span&gt;        BGP peers are flapping:
&lt;&#x2F;span&gt;&lt;span&gt;        I want my mommy!
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Heh! I feel that.&lt;&#x2F;p&gt;
&lt;p&gt;Run it again, get a different &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Haiku&quot;&gt;Haiku&lt;&#x2F;a&gt;!&lt;&#x2F;p&gt;
&lt;p&gt;How many are there? Certainly not gonna brute force that.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;where-are-the-haikus&quot;&gt;Where are the Haikus?&lt;a class=&quot;zola-anchor&quot; href=&quot;#where-are-the-haikus&quot; aria-label=&quot;Anchor link for: where-are-the-haikus&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Finding all of them wasn&#x27;t that easy, actually.&lt;&#x2F;p&gt;
&lt;p&gt;First, I started by looking where the strings are located. That part&#x27;s easy!&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span&gt;% grep&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; -R &lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;IS-IS screams&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot; &#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;snip&amp;gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;Binary&lt;&#x2F;span&gt;&lt;span&gt; file &#x2F;usr&#x2F;lib&#x2F;dd&#x2F;libjunos-actions-impl.so matches
&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;snip&amp;gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Argh. &lt;em&gt;Of course it&#x27;s compiled into a binary.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;After a minute long look with &lt;a href=&quot;https:&#x2F;&#x2F;rada.re&#x2F;n&#x2F;radare2.html&quot;&gt;radare2&lt;&#x2F;a&gt;, I figured out that they were just plain strings in the binary,
stored line by line. After failing to find the reference to that string because I held radare wrong,
I passed the binary over to a close friend of mine, &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;fridtjof&quot;&gt;Fridtjof&lt;&#x2F;a&gt;, because he &lt;em&gt;actually&lt;&#x2F;em&gt; knows what he&#x27;s doing.
Though he used IDA, which made the whole thing rather painless.&lt;&#x2F;p&gt;
&lt;p&gt;The interesting part is just a bunch of pointers in an array named &lt;code&gt;haiku_text&lt;&#x2F;code&gt;.
Three elements per Haiku, one for each line. Duh.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;displaying-quotes-the-unix-waytm&quot;&gt;Displaying quotes The UNIX Way™!&lt;a class=&quot;zola-anchor&quot; href=&quot;#displaying-quotes-the-unix-waytm&quot; aria-label=&quot;Anchor link for: displaying-quotes-the-unix-waytm&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;After reading through all of them and laughing very hard,
I decided that I wanna put the haikus in a more accessible format.&lt;&#x2F;p&gt;
&lt;p&gt;Luckily, there is just the program for that: &lt;a href=&quot;https:&#x2F;&#x2F;man.openbsd.org&#x2F;fortune&quot;&gt;fortune(6)&lt;&#x2F;a&gt;!
First appearing in Version 7 UNIX, it&#x27;s been showing people quotes, jokes and poetry since 1979!&lt;&#x2F;p&gt;
&lt;p&gt;It&#x27;s using a simple database generated by &lt;a href=&quot;https:&#x2F;&#x2F;www.unix.com&#x2F;man-page&#x2F;freebsd&#x2F;8&#x2F;strfile&#x2F;&quot;&gt;strfile(8)&lt;&#x2F;a&gt;, which you can find in &lt;code&gt;&#x2F;usr&#x2F;src&#x2F;games&#x2F;fortune&#x2F;strfile&lt;&#x2F;code&gt; on OpenBSD,
as instructed by &lt;a href=&quot;https:&#x2F;&#x2F;man.openbsd.org&#x2F;fortune&quot;&gt;fortune(6)&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The format is quite simple! It&#x27;s just text, seperated by lines with just &lt;code&gt;%&lt;&#x2F;code&gt; in it.&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;vifino: mind if i quote you as an example of... quotes?
&lt;&#x2F;span&gt;&lt;span&gt;Stary: do it
&lt;&#x2F;span&gt;&lt;span&gt;vifino: thx
&lt;&#x2F;span&gt;&lt;span&gt;%
&lt;&#x2F;span&gt;&lt;span&gt;android is just boneless linux
&lt;&#x2F;span&gt;&lt;span&gt;                -- Stary, 2022
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Afterwards, you can punch this theoretical &lt;code&gt;my_quotes&lt;&#x2F;code&gt; file through &lt;a href=&quot;https:&#x2F;&#x2F;www.unix.com&#x2F;man-page&#x2F;freebsd&#x2F;8&#x2F;strfile&#x2F;&quot;&gt;strfile(8)&lt;&#x2F;a&gt; and you get &lt;code&gt;my_quotes.dat&lt;&#x2F;code&gt;.
Then you can just run &lt;code&gt;fortune my_quotes&lt;&#x2F;code&gt; while being in that directory or
install it to directory that contains the other fortune databases, on OpenBSD it is &lt;code&gt;&#x2F;usr&#x2F;share&#x2F;games&#x2F;fortune&#x2F;&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;fortune-ized-haikus&quot;&gt;Fortune-ized Haikus&lt;a class=&quot;zola-anchor&quot; href=&quot;#fortune-ized-haikus&quot; aria-label=&quot;Anchor link for: fortune-ized-haikus&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;After a little bit of magic with &lt;a href=&quot;https:&#x2F;&#x2F;rada.re&#x2F;n&#x2F;radare2.html&quot;&gt;radare2&lt;&#x2F;a&gt;, I came up with the following command.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;r2 -a&lt;&#x2F;span&gt;&lt;span&gt; x86&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; -b&lt;&#x2F;span&gt;&lt;span&gt; 32&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; -qq &lt;&#x2F;span&gt;&lt;span&gt;\
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;    -c &lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;s &lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\`&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;is ~ haiku_text[2]&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\`&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;; ps @@= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\`&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;pxWq &lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\$&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;fl-4&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\`&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot; \
&lt;&#x2F;span&gt;&lt;span&gt;    libjunos-actions-impl.so | \
&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;awk -v&lt;&#x2F;span&gt;&lt;span&gt; n=3 &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;1; NR % n == 0 { printf &lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;\t\t-- Junos &amp;#39;show version and haiku&amp;#39;\n%\n&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt; }&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot; \
&lt;&#x2F;span&gt;&lt;span&gt;    &amp;gt; junos_haiku
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;strfile&lt;&#x2F;span&gt;&lt;span&gt; junos_haiku
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Yeah, it&#x27;s not that easy, but basically, the following happens:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Open libjunos-actions-impl.so as x86 32bit. (I stole this binary from a Juniper MX)&lt;&#x2F;li&gt;
&lt;li&gt;Seek (&lt;code&gt;s&lt;&#x2F;code&gt;) to the address of symbol &lt;code&gt;haiku_text&lt;&#x2F;code&gt; (&lt;code&gt;is ~ haiku_text[2]&lt;&#x2F;code&gt;).
It&#x27;s an array with a fixed length containing pointers to strings, as mentioned earlier.&lt;&#x2F;li&gt;
&lt;li&gt;Print a Zero-Terminated string (&lt;code&gt;ps&lt;&#x2F;code&gt;) located at every address described by the hex word dump (&lt;code&gt;pxWq&lt;&#x2F;code&gt;)
from the current address (where we seeked to) for the length of the flag (&lt;code&gt;$fl&lt;&#x2F;code&gt;).&lt;&#x2F;li&gt;
&lt;li&gt;With &lt;a href=&quot;https:&#x2F;&#x2F;man.openbsd.org&#x2F;awk&quot;&gt;awk(1)&lt;&#x2F;a&gt;, print a small quote origin text followed by the seperator &lt;code&gt;%&lt;&#x2F;code&gt; every three lines.&lt;&#x2F;li&gt;
&lt;li&gt;Convert it into a database &lt;a href=&quot;https:&#x2F;&#x2F;man.openbsd.org&#x2F;fortune&quot;&gt;fortune(6)&lt;&#x2F;a&gt; can use with &lt;a href=&quot;https:&#x2F;&#x2F;www.unix.com&#x2F;man-page&#x2F;freebsd&#x2F;8&#x2F;strfile&#x2F;&quot;&gt;strfile(8)&lt;&#x2F;a&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Now, this is everything but intiuitive, however with the steep learning curve from both
&lt;a href=&quot;https:&#x2F;&#x2F;man.openbsd.org&#x2F;awk&quot;&gt;awk(1)&lt;&#x2F;a&gt; and (even more so) &lt;a href=&quot;https:&#x2F;&#x2F;rada.re&#x2F;n&#x2F;radare2.html&quot;&gt;radare2&lt;&#x2F;a&gt; comes great rewards like this.&lt;&#x2F;p&gt;
&lt;p&gt;And as &lt;a href=&quot;https:&#x2F;&#x2F;www.unix.com&#x2F;man-page&#x2F;freebsd&#x2F;8&#x2F;strfile&#x2F;&quot;&gt;strfile(8)&lt;&#x2F;a&gt; proudly explains, there are 37 Haikus in Junos 22.1:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;&amp;quot;junos_haiku.dat&amp;quot; created
&lt;&#x2F;span&gt;&lt;span&gt;There were 37 strings
&lt;&#x2F;span&gt;&lt;span&gt;Longest string: 133 bytes
&lt;&#x2F;span&gt;&lt;span&gt;Shortest string: 85 bytes
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;But wait, there is more!&lt;&#x2F;p&gt;
&lt;h2 id=&quot;show-version-and-limerick&quot;&gt;&lt;code&gt;show version and limerick&lt;&#x2F;code&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#show-version-and-limerick&quot; aria-label=&quot;Anchor link for: show-version-and-limerick&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;While looking for the haikus, we actually found a lot more interesting strings.&lt;&#x2F;p&gt;
&lt;p&gt;In addition to &lt;code&gt;haiku_text&lt;&#x2F;code&gt;, there is &lt;code&gt;lim_text&lt;&#x2F;code&gt;. It didn&#x27;t take me long to add that up.&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;vifino@asprey.dh.blinken.space&amp;gt; show version and limerick
&lt;&#x2F;span&gt;&lt;span&gt;Hostname: asprey.dh.blinken.space
&lt;&#x2F;span&gt;&lt;span&gt;Model: srx345
&lt;&#x2F;span&gt;&lt;span&gt;Junos: 22.1R1.10
&lt;&#x2F;span&gt;&lt;span&gt;JUNOS Software Release [22.1R1.10]
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;        there once was a tool named CLI
&lt;&#x2F;span&gt;&lt;span&gt;        that terminal users would try
&lt;&#x2F;span&gt;&lt;span&gt;        they&amp;#39;d type out commands
&lt;&#x2F;span&gt;&lt;span&gt;        while wringing their hands
&lt;&#x2F;span&gt;&lt;span&gt;        and yell &amp;quot;it&amp;#39;s pronounced C-L-I&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;A &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Limerick_(poetry)&quot;&gt;Limerick&lt;&#x2F;a&gt;! And a nice one, too.&lt;&#x2F;p&gt;
&lt;p&gt;Seemingly unknown to the internet, &lt;code&gt;show version and limerick&lt;&#x2F;code&gt; exists.
Hereby, I claim to be the first one to announce finding it, 2022-06-12. :)&lt;&#x2F;p&gt;
&lt;p&gt;And thus, like with the &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Haiku&quot;&gt;Haiku&lt;&#x2F;a&gt; array, the same thing for limericks, only with 5 lines per limerick:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;r2 -a&lt;&#x2F;span&gt;&lt;span&gt; x86&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; -b&lt;&#x2F;span&gt;&lt;span&gt; 32&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; -qq &lt;&#x2F;span&gt;&lt;span&gt;\
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;    -c &lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;s &lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\`&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;is ~ lim_text[2]&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\`&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;; ps @@= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\`&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;pxWq &lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\$&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;fl-4&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\`&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot; \
&lt;&#x2F;span&gt;&lt;span&gt;    libjunos-actions-impl.so | \
&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;awk -v&lt;&#x2F;span&gt;&lt;span&gt; n=5 &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;1; NR % n == 0 { printf &lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;\t\t-- Junos &amp;#39;show version and limerick&amp;#39;\n%\n&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt; }&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot; \
&lt;&#x2F;span&gt;&lt;span&gt;    &amp;gt; junos_limerick
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;strfile&lt;&#x2F;span&gt;&lt;span&gt; junos_limerick
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And with the last line, &lt;a href=&quot;https:&#x2F;&#x2F;www.unix.com&#x2F;man-page&#x2F;freebsd&#x2F;8&#x2F;strfile&#x2F;&quot;&gt;strfile(8)&lt;&#x2F;a&gt; announces there are 13 limericks hidden in Junos 22.1!&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;&amp;quot;junos_limerick.dat&amp;quot; created
&lt;&#x2F;span&gt;&lt;span&gt;There were 13 strings
&lt;&#x2F;span&gt;&lt;span&gt;Longest string: 195 bytes
&lt;&#x2F;span&gt;&lt;span&gt;Shortest string: 153 bytes
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;so-long-and-thanks-for-all-the-fish&quot;&gt;So long, and thanks for all the fish!&lt;a class=&quot;zola-anchor&quot; href=&quot;#so-long-and-thanks-for-all-the-fish&quot; aria-label=&quot;Anchor link for: so-long-and-thanks-for-all-the-fish&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Without a doubt there are more eastereggs in Junos. And I hope they keep adding more poetry! :)&lt;&#x2F;p&gt;
&lt;p&gt;Again, &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;fridtjof&quot;&gt;Fridtjof&lt;&#x2F;a&gt; was a huge help in all of this. Without him, this would&#x27;ve taken a lot longer.
You&#x27;re awesome!&lt;&#x2F;p&gt;
&lt;p&gt;And &lt;a href=&quot;https:&#x2F;&#x2F;9net.org&#x2F;&quot;&gt;Stary&lt;&#x2F;a&gt; for letting me quote them, mainly. You&#x27;re also awesome.&lt;&#x2F;p&gt;
&lt;p&gt;EDIT:
Yes, Kate, you are awesome too.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Using Old Cisco Routers as Console Servers</title>
        <published>2022-05-11T00:00:00+00:00</published>
        <updated>2022-05-11T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              vifino
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="/cisco-serial-server/"/>
        <id>/cisco-serial-server/</id>
        
        <content type="html" xml:base="/cisco-serial-server/">&lt;h1 id=&quot;serial-ports&quot;&gt;Serial Ports&lt;a class=&quot;zola-anchor&quot; href=&quot;#serial-ports&quot; aria-label=&quot;Anchor link for: serial-ports&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Ah, yes, the network admin&#x27;s best friend. A Serial Port.&lt;&#x2F;p&gt;
&lt;p&gt;While serial ports come in many varieties, the most common standard is &lt;code&gt;RS-232&lt;&#x2F;code&gt; (or rather the modern variant of it).
It describes communication between a DTE (Data Terminal Equipment) and DCE (Data Communication Equipment).&lt;&#x2F;p&gt;
&lt;p&gt;The distinction is important as the wiring for the &lt;code&gt;DB-25M&lt;&#x2F;code&gt; or &lt;code&gt;DE-9M&lt;&#x2F;code&gt; differed for each end.
However, at some point, someone (probably &lt;a href=&quot;https:&#x2F;&#x2F;yost.com&#x2F;computers&#x2F;RJ45-serial&#x2F;&quot;&gt;Yost&lt;&#x2F;a&gt;) came up with a way to use &lt;code&gt;8P8C&lt;&#x2F;code&gt; connectors have it all use the same pinout.
These cables and adapters have been called many things:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Rollover cable&lt;&#x2F;li&gt;
&lt;li&gt;Cisco Cable&lt;&#x2F;li&gt;
&lt;li&gt;Yost Cable&lt;&#x2F;li&gt;
&lt;li&gt;(Cisco) Console Cable&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;You can connect two &lt;code&gt;8P8C&lt;&#x2F;code&gt; serial ports between anything together without worring what function it is.&lt;&#x2F;p&gt;
&lt;p&gt;Nowadays, the &quot;DTE&quot; will be a laptop with a serial dongle and the &quot;DCE&quot; will be a router&#x2F;switch&#x2F;...
Pretty much all serial ports will be &lt;code&gt;8P8C&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Oh, don&#x27;t plug in your ethernet port into an &lt;code&gt;8P8C&lt;&#x2F;code&gt; serial port. &lt;em&gt;Bzzzt&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;serial-data&quot;&gt;Serial Data&lt;a class=&quot;zola-anchor&quot; href=&quot;#serial-data&quot; aria-label=&quot;Anchor link for: serial-data&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;First, the most important thing: Almost everything is &lt;code&gt;8N1&lt;&#x2F;code&gt; nowadays:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;8 Databits&lt;&#x2F;li&gt;
&lt;li&gt;No Parity&lt;&#x2F;li&gt;
&lt;li&gt;1 Stop bit&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Usually, serial consoles have one of the following two common speeds: &lt;code&gt;9600&lt;&#x2F;code&gt; or &lt;code&gt;115200&lt;&#x2F;code&gt; Baud.
Here are some general guidelines:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Cisco, Juniper, HP, Ubiquiti.. consoles usually run at 9600 Baud.&lt;&#x2F;li&gt;
&lt;li&gt;Mallanox (and Linux) consoles run at &lt;code&gt;115200&lt;&#x2F;code&gt; Baud quite often.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;When in doubt, try &lt;code&gt;9600&lt;&#x2F;code&gt; first, then &lt;code&gt;115200&lt;&#x2F;code&gt;, then look at the manual. :)&lt;&#x2F;p&gt;
&lt;h1 id=&quot;attaching-serial-consoles-to-cisco-routers&quot;&gt;Attaching Serial Consoles to Cisco Routers&lt;a class=&quot;zola-anchor&quot; href=&quot;#attaching-serial-consoles-to-cisco-routers&quot; aria-label=&quot;Anchor link for: attaching-serial-consoles-to-cisco-routers&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;There are several ways to attach another device with a serial port to a cisco router.
These are the ones I recommend:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;AUX&lt;&#x2F;code&gt; port: 1 port (usually)&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;This is undoubtedly the simplest choice.&lt;&#x2F;li&gt;
&lt;li&gt;Simply connect the &lt;code&gt;AUX&lt;&#x2F;code&gt; port to other &lt;code&gt;8P8C&lt;&#x2F;code&gt; console ports.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;&lt;code&gt;HWIC-8A&lt;&#x2F;code&gt; + &lt;code&gt;CAB-ASYNC-8&lt;&#x2F;code&gt;&#x2F;&lt;code&gt;CAB-HD8-ASYNC&lt;&#x2F;code&gt;: 8 ports per HWIC&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Good option if you have a router that takes (E)HWIC cards and you find it cheap.&lt;&#x2F;li&gt;
&lt;li&gt;8 ports are okay, but the following option is more &quot;future proof&quot;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;&lt;code&gt;HWIC-16A&lt;&#x2F;code&gt; + 2x &lt;code&gt;CAB-ASYNC-8&lt;&#x2F;code&gt;&#x2F;&lt;code&gt;CAB-HD8-ASYNC&lt;&#x2F;code&gt;: 16 ports per HWIC slot&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Excellent option if you have a router that can take (E)HWIC cards.&lt;&#x2F;li&gt;
&lt;li&gt;One module gets you 16 serial ports, so a single card should be more than enough for homelab purposes.&lt;&#x2F;li&gt;
&lt;li&gt;Can buy one &lt;code&gt;CAB-ASYNC-8&lt;&#x2F;code&gt;&#x2F;&lt;code&gt;CAB-HD8-ASYNC&lt;&#x2F;code&gt; at a time for 8 ports per.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;4&quot;&gt;
&lt;li&gt;&lt;code&gt;SM-32A&lt;&#x2F;code&gt; + 4x &lt;code&gt;CAB-ASYNC-8&lt;&#x2F;code&gt;&#x2F;&lt;code&gt;CAB-HD8-ASYNC&lt;&#x2F;code&gt;: 32 ports per NM slot&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;If you have one of those chonkers with a Network Module slot.&lt;&#x2F;li&gt;
&lt;li&gt;A whopping 32 serial ports! And rather cheap, too.&lt;&#x2F;li&gt;
&lt;li&gt;Can buy one &lt;code&gt;CAB-ASYNC-8&lt;&#x2F;code&gt;&#x2F;&lt;code&gt;CAB-HD8-ASYNC&lt;&#x2F;code&gt; at a time for 8 ports per.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;5&quot;&gt;
&lt;li&gt;&lt;code&gt;NIM-16A&lt;&#x2F;code&gt; + 2x &lt;code&gt;CAB-ASYNC-8&lt;&#x2F;code&gt;&#x2F;&lt;code&gt;CAB-HD8-ASYNC&lt;&#x2F;code&gt;: 16 ports per NIM slot&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;If you have more modern equipment, this is an option.&lt;&#x2F;li&gt;
&lt;li&gt;Not quite cheap.&lt;&#x2F;li&gt;
&lt;li&gt;Can buy one &lt;code&gt;CAB-ASYNC-8&lt;&#x2F;code&gt;&#x2F;&lt;code&gt;CAB-HD8-ASYNC&lt;&#x2F;code&gt; at a time for 8 ports per.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;6&quot;&gt;
&lt;li&gt;&lt;code&gt;NIM-24A&lt;&#x2F;code&gt; + 3x &lt;code&gt;CAB-ASYNC-8&lt;&#x2F;code&gt;: 16 ports per NIM slot&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Like the above, but one more slot.&lt;&#x2F;li&gt;
&lt;li&gt;Even less cheap and requires the new cables to fit all three.&lt;&#x2F;li&gt;
&lt;li&gt;Can buy one &lt;code&gt;CAB-ASYNC-8&lt;&#x2F;code&gt; at a time for 8 ports per.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;You definitly want something with not-stone-age IOS for modern crypto.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;line-config&quot;&gt;Line Config&lt;a class=&quot;zola-anchor&quot; href=&quot;#line-config&quot; aria-label=&quot;Anchor link for: line-config&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;You&#x27;re gonna need to configure the serial ports first.
The following is on an ISR G2, specifically the 2901, with the &lt;code&gt;HWIC-16A&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;cisco&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-cisco &quot;&gt;&lt;code class=&quot;language-cisco&quot; data-lang=&quot;cisco&quot;&gt;&lt;span&gt;! AUX port config. 115200 8N1 on rotary 10 with DCD.
&lt;&#x2F;span&gt;&lt;span&gt;line aux 0
&lt;&#x2F;span&gt;&lt;span&gt; login local
&lt;&#x2F;span&gt;&lt;span&gt; modem Host
&lt;&#x2F;span&gt;&lt;span&gt; rotary 1
&lt;&#x2F;span&gt;&lt;span&gt; no exec
&lt;&#x2F;span&gt;&lt;span&gt; transport input ssh
&lt;&#x2F;span&gt;&lt;span&gt; transport output none
&lt;&#x2F;span&gt;&lt;span&gt; stopbits 1
&lt;&#x2F;span&gt;&lt;span&gt; speed 115200
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;! HWIC slot 0, first cable, first port. 9600 (default) 8N1 on rotary 100 with DCD.
&lt;&#x2F;span&gt;&lt;span&gt;line 0&#x2F;0&#x2F;0
&lt;&#x2F;span&gt;&lt;span&gt; login local
&lt;&#x2F;span&gt;&lt;span&gt; modem Host
&lt;&#x2F;span&gt;&lt;span&gt; rotary 100
&lt;&#x2F;span&gt;&lt;span&gt; no exec
&lt;&#x2F;span&gt;&lt;span&gt; transport input ssh
&lt;&#x2F;span&gt;&lt;span&gt; transport output none
&lt;&#x2F;span&gt;&lt;span&gt; stopbits 1
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;! HWIC slot 0, second cable, first port. 9600 (default) 8N1 on rotary 108 with DCD.
&lt;&#x2F;span&gt;&lt;span&gt;line 0&#x2F;0&#x2F;8
&lt;&#x2F;span&gt;&lt;span&gt; login local
&lt;&#x2F;span&gt;&lt;span&gt; modem Host
&lt;&#x2F;span&gt;&lt;span&gt; rotary 108
&lt;&#x2F;span&gt;&lt;span&gt; no exec
&lt;&#x2F;span&gt;&lt;span&gt; transport input ssh
&lt;&#x2F;span&gt;&lt;span&gt; transport output none
&lt;&#x2F;span&gt;&lt;span&gt; stopbits 1
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You might also need to exchange &lt;code&gt;login local&lt;&#x2F;code&gt; with &lt;code&gt;login authentication default&lt;&#x2F;code&gt; depending on your device.&lt;&#x2F;p&gt;
&lt;p&gt;Cisco IOS also supports autobaud functionality. I couldn&#x27;t get it to work decently.
Instead, just configure it when you need it.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;reverse-ssh&quot;&gt;(Reverse) SSH&lt;a class=&quot;zola-anchor&quot; href=&quot;#reverse-ssh&quot; aria-label=&quot;Anchor link for: reverse-ssh&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Make sure to configure SSH sanely:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;cisco&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-cisco &quot;&gt;&lt;code class=&quot;language-cisco&quot; data-lang=&quot;cisco&quot;&gt;&lt;span&gt;! Generate keys if you haven&amp;#39;t already.
&lt;&#x2F;span&gt;&lt;span&gt;crypto key generate rsa modulus 3072
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;! If using the Loopback interface, make sure it uses it.
&lt;&#x2F;span&gt;&lt;span&gt;ip ssh source-interface Loopback0
&lt;&#x2F;span&gt;&lt;span&gt;ip ssh logging events
&lt;&#x2F;span&gt;&lt;span&gt;ip ssh version 2
&lt;&#x2F;span&gt;&lt;span&gt;ip ssh dh min size 2048
&lt;&#x2F;span&gt;&lt;span&gt;ip ssh server algorithm mac hmac-sha2-512
&lt;&#x2F;span&gt;&lt;span&gt;ip ssh server algorithm encryption aes256-ctr
&lt;&#x2F;span&gt;&lt;span&gt;ip scp server enable
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;That&#x27;ll make the whole thing less crappy security-wise at the cost of slightly longer initial handshake.
If you have to impress your friends with your big keys, you can also choose &lt;code&gt;4096&lt;&#x2F;code&gt; bit instead of &lt;code&gt;3072&lt;&#x2F;code&gt; for neglible benefits, but this thing&#x27;s probably a security nightmare anyway.&lt;&#x2F;p&gt;
&lt;p&gt;If you want to configure an SSH key - which you do - keep in mind that it only really supports RSA, no Ed25519.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Fetch your legacy RSA key&#x27;s public key and wrap it below the 254 byte line limit IOS has. In this case, I chose 70 characters, like OpenSSH private keys, but 128 works as well.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre data-lang=&quot;sh&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;cat&lt;&#x2F;span&gt;&lt;span&gt; .ssh&#x2F;id_legacy_rsa.pub | &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;sed -En &lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;s&#x2F;^ssh-rsa ([^ ]+).*$&#x2F;\1&#x2F;p&lt;&#x2F;span&gt;&lt;span&gt;&amp;#39; | &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;fold -b -w70
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;Enter the right mode to save it in the config.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre data-lang=&quot;cisco&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-cisco &quot;&gt;&lt;code class=&quot;language-cisco&quot; data-lang=&quot;cisco&quot;&gt;&lt;span&gt;stale(config)#ip ssh pubkey-chain
&lt;&#x2F;span&gt;&lt;span&gt;stale(conf-ssh-pubkey)#username vifino
&lt;&#x2F;span&gt;&lt;span&gt;stale(conf-ssh-pubkey-user)#key-string
&lt;&#x2F;span&gt;&lt;span&gt;stale(conf-ssh-pubkey-data)# &amp;lt;PASTE LINES HERE &amp;gt;
&lt;&#x2F;span&gt;&lt;span&gt;stale(conf-ssh-pubkey-data)#exit
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If you&#x27;re using something above &lt;code&gt;12.3&lt;&#x2F;code&gt;, say &lt;code&gt;15.0&lt;&#x2F;code&gt;, you can use the feature described in &lt;a href=&quot;https:&#x2F;&#x2F;www.cisco.com&#x2F;c&#x2F;en&#x2F;us&#x2F;td&#x2F;docs&#x2F;ios-xml&#x2F;ios&#x2F;sec_usr_ssh&#x2F;configuration&#x2F;15-s&#x2F;sec-usr-ssh-15-s-book&#x2F;sec-rev-ssh-enhanmt.pdf&quot;&gt;Reverse SSH Enhancements&lt;&#x2F;a&gt;.
&lt;code&gt;tl;dr&lt;&#x2F;code&gt;: You can slap the &lt;code&gt;rotary&lt;&#x2F;code&gt; number behind the username instead of selecting a specific SSH port.&lt;&#x2F;p&gt;
&lt;p&gt;If that&#x27;s not available, you don&#x27;t like it or want more choice, you can configure seperate SSH ports for each of the rotaries:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;cisco&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-cisco &quot;&gt;&lt;code class=&quot;language-cisco&quot; data-lang=&quot;cisco&quot;&gt;&lt;span&gt;! Enable rotary 1 on port 9001, rotary 2 on 9002, etc.. for *all* rotaries.
&lt;&#x2F;span&gt;&lt;span&gt;ip ssh port 9001 rotary 1 127
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h1 id=&quot;use-it&quot;&gt;Use it!&lt;a class=&quot;zola-anchor&quot; href=&quot;#use-it&quot; aria-label=&quot;Anchor link for: use-it&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;After you configured the ports with their rotary group, you can use it with the following two ways:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;ssh -u myuser -p 9100 serialbox&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;This accesses port 9100 via SSH, 9100 in my example maps to &lt;code&gt;rotary 100&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;I prefer this. Target port gets closed if the line is in use - instant disconnect.&lt;&#x2F;li&gt;
&lt;li&gt;It&#x27;ll also not be available if the line is down.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;&lt;code&gt;ssh -u myuser:$PORT serialbox&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;This accesses port 22 via SSH, but uses the &lt;a href=&quot;https:&#x2F;&#x2F;www.cisco.com&#x2F;c&#x2F;en&#x2F;us&#x2F;td&#x2F;docs&#x2F;ios-xml&#x2F;ios&#x2F;sec_usr_ssh&#x2F;configuration&#x2F;15-s&#x2F;sec-usr-ssh-15-s-book&#x2F;sec-rev-ssh-enhanmt.pdf&quot;&gt;Reverse SSH Enhancements&lt;&#x2F;a&gt; to access the line instead of a specific port.&lt;&#x2F;li&gt;
&lt;li&gt;What is &lt;code&gt;$PORT&lt;&#x2F;code&gt;? Well.
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;N&lt;&#x2F;code&gt; to dial line &lt;code&gt;N&lt;&#x2F;code&gt; (see &lt;code&gt;show line&lt;&#x2F;code&gt; for the mapping)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;rotaryN&lt;&#x2F;code&gt; to dial &lt;code&gt;rotary N&lt;&#x2F;code&gt; (e.g. &lt;code&gt;rotary100&lt;&#x2F;code&gt;)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;You get spicy and confusing error messages!
&lt;ul&gt;
&lt;li&gt;Wrong line number? &lt;code&gt;Received disconnect from &amp;lt;addr&amp;gt; port 22:2: Non-assigned port!&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Line in use? &lt;code&gt;Received disconnect from &amp;lt;addr&amp;gt; port 22:2:  Requested line not found!&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Personally, I prefer the former. Just my regular username, no special stuff except the target port.
Either is fine, but I suggest using rotary groups in either case for less hassle when moving things around.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;summary&quot;&gt;Summary&lt;a class=&quot;zola-anchor&quot; href=&quot;#summary&quot; aria-label=&quot;Anchor link for: summary&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Apart from the quirks in the config and the slow speed of the SSH handshake with decent crypto, this works very well!&lt;&#x2F;p&gt;
&lt;p&gt;With modem signals enabled (DCD), you can even trigger automatic logout on the target devices.
For example, in Junos, you can configure the console port to do that:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;junos&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-junos &quot;&gt;&lt;code class=&quot;language-junos&quot; data-lang=&quot;junos&quot;&gt;&lt;span&gt;set system ports console log-out-on-disconnect
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Plus, if you&#x27;re into retrocomputing, you can enable &lt;code&gt;X.25&lt;&#x2F;code&gt; and use PAD features to dial into the same rotaries.
Maybe I&#x27;ll write a post about &lt;code&gt;X.25&lt;&#x2F;code&gt; in general. Fun!&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Failing to install OpenBSD 7.1 on Oracle Cloud Infrastructure</title>
        <published>2022-04-29T00:00:00+00:00</published>
        <updated>2022-04-29T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              vifino
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="/oci-obsd/"/>
        <id>/oci-obsd/</id>
        
        <content type="html" xml:base="/oci-obsd/">&lt;h1 id=&quot;oracle-cloud-infrastructure-oci&quot;&gt;Oracle Cloud Infrastructure (OCI)&lt;a class=&quot;zola-anchor&quot; href=&quot;#oracle-cloud-infrastructure-oci&quot; aria-label=&quot;Anchor link for: oracle-cloud-infrastructure-oci&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;em&gt;sigh&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Every major (Internet) Company has something with &quot;Cloud&quot; in its portfolio nowadays. Oracle is - of course - no exception.&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;ve never heard of their OCI until recently and only because they offer FREE STUFF!!&lt;&#x2F;p&gt;
&lt;p&gt;Their [Free Tier] includes quite a bit of resources, of the current offering, the most relevant to me are the following:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Two AMD Compute VMs
&lt;ul&gt;
&lt;li&gt;1&#x2F;8th OCPU, 1 OCPU is &quot;2 vCPU&quot;, so you&#x27;ll get a quarter of a Thread? Whack.&lt;&#x2F;li&gt;
&lt;li&gt;1GB RAM.&lt;&#x2F;li&gt;
&lt;li&gt;0.48Gbit&#x2F;s networking... ???&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Arm-based Ampere A1 cores and 24 GB of memory usable as 1 VM or up to 4 VMs with 3,000 OCPU hours and 18,000 GB hours per month
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;tl;dr&lt;&#x2F;code&gt;: that comes down to the following:
&lt;ul&gt;
&lt;li&gt;1 VM with 4 A1 cores and 24GB RAM.&lt;&#x2F;li&gt;
&lt;li&gt;2 VMs with 2 A1 cores and 12GB RAM.&lt;&#x2F;li&gt;
&lt;li&gt;4 VMs with 1 A1 core and 6GB RAM.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;2x Virtual Cloud Networks
&lt;ul&gt;
&lt;li&gt;Basically switch&#x2F;router combinations.&lt;&#x2F;li&gt;
&lt;li&gt;Site to Site VPNs with IPSec.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Not sure if that&#x27;s gonna last, but it&#x27;s interesting enough to not pass up.&lt;&#x2F;p&gt;
&lt;p&gt;Keep in mind that - for now - this experiment failed and it caused me suffering. Lots of it.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;attempted-openbsd-installation-on-x86-64-instances&quot;&gt;Attempted OpenBSD Installation on x86_64 Instances&lt;a class=&quot;zola-anchor&quot; href=&quot;#attempted-openbsd-installation-on-x86-64-instances&quot; aria-label=&quot;Anchor link for: attempted-openbsd-installation-on-x86-64-instances&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Right, so the lower spec x86_64 instances are still useful for a bunch of things. Small websites, maybe a mail server.
Anyhow, I&#x27;m not keen on using Oracle Linux (but maybe Solaris...), so I attempted to get &lt;a href=&quot;https:&#x2F;&#x2F;www.openbsd.org&#x2F;&quot;&gt;OpenBSD&lt;&#x2F;a&gt; running on it instead.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;creating-the-install-image&quot;&gt;Creating the Install Image&lt;a class=&quot;zola-anchor&quot; href=&quot;#creating-the-install-image&quot; aria-label=&quot;Anchor link for: creating-the-install-image&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;I started with the following:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.openbsd.org&#x2F;&quot;&gt;OpenBSD&lt;&#x2F;a&gt;&#x27;s &lt;code&gt;install71.img&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;An &lt;a href=&quot;https:&#x2F;&#x2F;www.openbsd.org&#x2F;&quot;&gt;OpenBSD&lt;&#x2F;a&gt; machine with &lt;code&gt;qemu&lt;&#x2F;code&gt; package installed.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol&gt;
&lt;li&gt;Get the &lt;code&gt;install71.img&lt;&#x2F;code&gt; to the &lt;a href=&quot;https:&#x2F;&#x2F;www.openbsd.org&#x2F;&quot;&gt;OpenBSD&lt;&#x2F;a&gt; machine in a directory of your choice and &lt;code&gt;cd&lt;&#x2F;code&gt; to it.&lt;&#x2F;li&gt;
&lt;li&gt;Set up &lt;code&gt;vnd0&lt;&#x2F;code&gt; device with &lt;code&gt;install71.img&lt;&#x2F;code&gt; and mount its root partition.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;vnconfig&lt;&#x2F;span&gt;&lt;span&gt; vnd0 install71.img
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;mount&lt;&#x2F;span&gt;&lt;span&gt; &#x2F;dev&#x2F;vnd0a &#x2F;mnt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;4&quot;&gt;
&lt;li&gt;Set up the serial port in &lt;a href=&quot;https:&#x2F;&#x2F;man.openbsd.org&#x2F;boot.8&quot;&gt;boot(8)&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;printf &lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;stty com0 115200\nset tty com0\n&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot; &amp;gt;&amp;gt; &#x2F;mnt&#x2F;etc&#x2F;boot.conf
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;5&quot;&gt;
&lt;li&gt;Unmount and detach &lt;code&gt;vnd0&lt;&#x2F;code&gt; device.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;umount&lt;&#x2F;span&gt;&lt;span&gt; &#x2F;mnt
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;vnconfig -u&lt;&#x2F;span&gt;&lt;span&gt; vnd0
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;6&quot;&gt;
&lt;li&gt;Convert &lt;code&gt;install71.img&lt;&#x2F;code&gt; to qcow2 image with &lt;code&gt;qemu-img&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;qemu-img&lt;&#x2F;span&gt;&lt;span&gt; convert&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; -O&lt;&#x2F;span&gt;&lt;span&gt; qcow2 install71.img install71.qcow2
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Tada! You have an OpenBSD install image with serial connection enabled.
Easy, right?&lt;&#x2F;p&gt;
&lt;h3 id=&quot;creating-a-custom-image-on-oci&quot;&gt;Creating a &lt;code&gt;Custom Image&lt;&#x2F;code&gt; on OCI&lt;a class=&quot;zola-anchor&quot; href=&quot;#creating-a-custom-image-on-oci&quot; aria-label=&quot;Anchor link for: creating-a-custom-image-on-oci&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;And here the pain starts. But don&#x27;t worry, you&#x27;ll ease into it with this step.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Create an Object Storage Bucket if you don&#x27;t have one. I named mine &lt;code&gt;OS&lt;&#x2F;code&gt;. It&#x27;s under &lt;code&gt;Storage -&amp;gt; Buckets&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Upload your created &lt;code&gt;install71.qcow2&lt;&#x2F;code&gt;, I prefixed it with &lt;code&gt;amd64&lt;&#x2F;code&gt; for clarity.&lt;&#x2F;li&gt;
&lt;li&gt;Go to &lt;code&gt;Compute -&amp;gt; Custom Images&lt;&#x2F;code&gt; and click &lt;code&gt;Import Image&lt;&#x2F;code&gt;. I named it &lt;code&gt;OpenBSD 7.1 (amd64)&lt;&#x2F;code&gt;. Choose the object name for the &lt;code&gt;install71.qcow2&lt;&#x2F;code&gt; you just uploaded, select QCOW2 and Paravirtualized Mode.&lt;&#x2F;li&gt;
&lt;li&gt;Wait a long time. In my case it took a little over 10 Minutes. Get a coffee.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;You&#x27;re stuck with BIOS boot, by the way. Whatever.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;create-a-virtual-cloud-network&quot;&gt;Create a &lt;code&gt;Virtual Cloud Network&lt;&#x2F;code&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#create-a-virtual-cloud-network&quot; aria-label=&quot;Anchor link for: create-a-virtual-cloud-network&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;This is where the urge to burn it all down started to grow.&lt;&#x2F;p&gt;
&lt;p&gt;To save you some pain, I recommend first creating a VCN, because the creation of it during the instance creation just sucks.
Why? You can&#x27;t really choose the subnet. Or enable IPv6.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;code&gt;Networking -&amp;gt; Virtual Cloud Networks&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Create a VCN. Name it. &lt;code&gt;vcn-01&lt;&#x2F;code&gt; was my choice. Creative, I know.&lt;&#x2F;li&gt;
&lt;li&gt;Pick a rather big IPv4 subnet, like a &lt;code&gt;&#x2F;16&lt;&#x2F;code&gt; as recommended in the example text. That&#x27;ll let you change the second octet as compared to the instance creation wizard.&lt;&#x2F;li&gt;
&lt;li&gt;Tick &lt;code&gt;Assign an Oracle allocated IPv6 &#x2F;56 prefix&lt;&#x2F;code&gt; and confirm.&lt;&#x2F;li&gt;
&lt;li&gt;Click on the newly created VCN.&lt;&#x2F;li&gt;
&lt;li&gt;Click create Subnet, give it a name.&lt;&#x2F;li&gt;
&lt;li&gt;Enter the smaller subnet contained within the earlier one. A &lt;code&gt;&#x2F;24&lt;&#x2F;code&gt; for example.&lt;&#x2F;li&gt;
&lt;li&gt;Tick &lt;code&gt;Assign an Oracle allocated IPv6 &#x2F;64 prefix&lt;&#x2F;code&gt; and confirm.&lt;&#x2F;li&gt;
&lt;li&gt;Click on &lt;code&gt;Internet Gateways&lt;&#x2F;code&gt; and create one. You have to give it a name once again.&lt;&#x2F;li&gt;
&lt;li&gt;Click on  &lt;code&gt;Route Tables&lt;&#x2F;code&gt; and select the default.&lt;&#x2F;li&gt;
&lt;li&gt;Add two Route rules, one IPv4 for &lt;code&gt;0.0.0.0&#x2F;0&lt;&#x2F;code&gt; and one IPv6 for &lt;code&gt;::&#x2F;0&lt;&#x2F;code&gt;, both pointing to an Internet Gateway. Select the one you just created.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Honestly, this couldn&#x27;t be more clumsy. In the end you end up with 1:1 NAT for your public V4. And V6 needs more steps, later.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;create-an-instance&quot;&gt;Create an Instance&lt;a class=&quot;zola-anchor&quot; href=&quot;#create-an-instance&quot; aria-label=&quot;Anchor link for: create-an-instance&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;Time to actually create the instance you wanted in the first place.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;code&gt;Compute -&amp;gt; Instances&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Create a new Instance. Name? I named mine &lt;code&gt;fux86-01&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Click &lt;code&gt;Edit&lt;&#x2F;code&gt; on &lt;code&gt;Image and Shape&lt;&#x2F;code&gt;. Select &lt;code&gt;Change Image&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Change &lt;code&gt;Image Source&lt;&#x2F;code&gt; to &lt;code&gt;Custom images&lt;&#x2F;code&gt;. Select your custom image and confirm.&lt;&#x2F;li&gt;
&lt;li&gt;Networking should automatically select the VCN and subnet you configured earlier. But who the fuck knows? Double check.&lt;&#x2F;li&gt;
&lt;li&gt;Select &lt;code&gt;No SSH keys&lt;&#x2F;code&gt; because it does not know how to put it there, anyway.&lt;&#x2F;li&gt;
&lt;li&gt;Under &lt;code&gt;Advanced Options&lt;&#x2F;code&gt; at the bottom, disable &lt;code&gt;Oracle Cloud Agent&lt;&#x2F;code&gt; because it doesn&#x27;t work.&lt;&#x2F;li&gt;
&lt;li&gt;Confirm and wait. Doesn&#x27;t take that long, but get something alcoholic, perhaps?&lt;&#x2F;li&gt;
&lt;li&gt;Click on &lt;code&gt;Attached VNICs&lt;&#x2F;code&gt; and select the only one.&lt;&#x2F;li&gt;
&lt;li&gt;Click &lt;code&gt;IPv6 Addresses&lt;&#x2F;code&gt; and &lt;code&gt;Assign IPv6 Address&lt;&#x2F;code&gt;. It&#x27;ll show you a weird form where you can complete a half typed V6 address, I entered &lt;code&gt;:10&lt;&#x2F;code&gt;. If you don&#x27;t, you&#x27;ll get something random.&lt;&#x2F;li&gt;
&lt;li&gt;Get back to the instance and click &lt;code&gt;Console Connection&lt;&#x2F;code&gt; and &lt;code&gt;Launch Cloud Shell&lt;&#x2F;code&gt; because Oracle:&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Didn&#x27;t understand how Host Key Identification works, rotates keys &quot;regularly&quot; and tells users that if they get a &lt;code&gt;Host key verification failed&lt;&#x2F;code&gt; to just remove the offending key. Don&#x27;t trust me? &lt;a href=&quot;https:&#x2F;&#x2F;docs.oracle.com&#x2F;en-us&#x2F;iaas&#x2F;Content&#x2F;Compute&#x2F;References&#x2F;serialconsole.htm#Connecti2&quot;&gt;Making a Local Connection to the Serial Console&lt;&#x2F;a&gt;. Idiots.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;Launch Cloud Shell&lt;&#x2F;code&gt; spins up more virtual machines and costs Oracle money.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;You&#x27;ll be greeted with the installer. You can run through it, hostname, networking, etc..&lt;&#x2F;p&gt;
&lt;p&gt;However, you&#x27;ll end up at the point where you&#x27;re supposed to select the disk.&lt;&#x2F;p&gt;
&lt;p&gt;There won&#x27;t be one.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;failure&quot;&gt;Failure&lt;a class=&quot;zola-anchor&quot; href=&quot;#failure&quot; aria-label=&quot;Anchor link for: failure&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;I first tried the Paravirtualized Mode. Networking worked fine, but disk didn&#x27;t.
The &lt;code&gt;scsibus0&lt;&#x2F;code&gt; at &lt;code&gt;vioscsi0&lt;&#x2F;code&gt; &lt;em&gt;should&lt;&#x2F;em&gt; have the boot disk - which &lt;a href=&quot;https:&#x2F;&#x2F;man.openbsd.org&#x2F;boot.8&quot;&gt;boot(8)&lt;&#x2F;a&gt; successfully boots from by the way - but the kernel does not find it.&lt;&#x2F;p&gt;
&lt;p&gt;I attempted again with Emulated Mode, which gives me IDE instead. It, too, does not get found by &lt;a href=&quot;https:&#x2F;&#x2F;www.openbsd.org&#x2F;&quot;&gt;OpenBSD&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;No boot disk. No boot disk, no installation.&lt;&#x2F;p&gt;
&lt;p&gt;There is a &lt;a href=&quot;https:&#x2F;&#x2F;marc.info&#x2F;?l=openbsd-tech&amp;amp;m=164582037527253&amp;amp;w=2&quot;&gt;Patch That Fixes The Missing Disk&lt;&#x2F;a&gt; in Paravirtualized Mode, but it hasn&#x27;t been applied and is over a year old by now. Yuck.
I tried applying it anyway, it dnd&#x27;t work. Updating it seems like a lot of work at least for me, given that I don&#x27;t know my way around the scsi subsystem of OpenBSD.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;a class=&quot;zola-anchor&quot; href=&quot;#summary&quot; aria-label=&quot;Anchor link for: summary&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;This failed. I couldn&#x27;t get OpenBSD installed.&lt;&#x2F;p&gt;
&lt;p&gt;Honestly, the whole experience was very painful. The UX sucks.&lt;&#x2F;p&gt;
&lt;p&gt;I can&#x27;t complain about the price of free. But I should send Oracle a bill for wasting my time.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>The Odd World of the DFZ - Fundamentals</title>
        <published>2022-04-14T00:00:00+00:00</published>
        <updated>2022-04-24T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              vifino
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="/odd-world-fundamentals/"/>
        <id>/odd-world-fundamentals/</id>
        
        <content type="html" xml:base="/odd-world-fundamentals/">&lt;h1 id=&quot;foreword&quot;&gt;Foreword&lt;a class=&quot;zola-anchor&quot; href=&quot;#foreword&quot; aria-label=&quot;Anchor link for: foreword&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;This is probably going to be a series of regularly updated posts trying to pass some knowledge about how to do your best at being a member of the Internet.
These posts are also explicitly talking about eBGP with other networks instead of internal routing, though some information might still be applicable.&lt;&#x2F;p&gt;
&lt;p&gt;As I learn more about that myself, I&#x27;ll update this post with some general advice. There will be other posts describing routing platforms&#x2F;vendors and their quirks.&lt;&#x2F;p&gt;
&lt;p&gt;Be warned however that you need to know some basic networking terminology, for example what Network Prefixes and Routes are.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;trash-or-treasure&quot;&gt;Trash or Treasure?&lt;a class=&quot;zola-anchor&quot; href=&quot;#trash-or-treasure&quot; aria-label=&quot;Anchor link for: trash-or-treasure&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;The millions of routes covering &quot;the whole internet&quot; are what make up the &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Default-free_zone&quot;&gt;DFZ&lt;&#x2F;a&gt; - the Default-free Zone.
When a router in the &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Default-free_zone&quot;&gt;DFZ&lt;&#x2F;a&gt; needs to forward a packet to a destination it doesn&#x27;t know about, it can&#x27;t simply forward it to another one.
Thus, getting all of the routes is crucial to ensure reachability.&lt;&#x2F;p&gt;
&lt;p&gt;Adjacent networks (&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Autonomous_system_(Internet)&quot;&gt;ASN&lt;&#x2F;a&gt;s) announce to each other a subset of routes they know about and receive the same.
Sometimes just a few routes they are resonsible for, sometimes all routes they know about.&lt;&#x2F;p&gt;
&lt;p&gt;However, to make that work, the Internet is built on varying degrees of mutual trust.
This mesh relies heavily on the idea that almost every given route information is correct, up to date and not maliceous.
If that&#x27;s not the case, traffic towards some destinations might be slower than it has to be, doesn&#x27;t reach the destination or even gets intercepted.&lt;&#x2F;p&gt;
&lt;p&gt;When you are a network operator in the &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Default-free_zone&quot;&gt;DFZ&lt;&#x2F;a&gt;, you&#x27;ll most likely end up with an &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Autonomous_system_(Internet)&quot;&gt;ASN&lt;&#x2F;a&gt; and &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Border_Gateway_Protocol&quot;&gt;BGP&lt;&#x2F;a&gt; to route your prefixes.
It does not matter if you are a big global ISP - like &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Lumen_Technologies&quot;&gt;Lumen&lt;&#x2F;a&gt; or &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Deutsche_Telekom&quot;&gt;DTAG&lt;&#x2F;a&gt; - or a small research network (like me, &lt;a href=&quot;https:&#x2F;&#x2F;bgp.tools&#x2F;as&#x2F;213342&quot;&gt;AS213342&lt;&#x2F;a&gt;).&lt;&#x2F;p&gt;
&lt;p&gt;Trusting is nice, but mistakes happen. And sometimes, &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;BGP_hijacking&quot;&gt;Route Hijacking&lt;&#x2F;a&gt; happens on purpose.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;trust-but-verify&quot;&gt;Trust but Verify.&lt;a class=&quot;zola-anchor&quot; href=&quot;#trust-but-verify&quot; aria-label=&quot;Anchor link for: trust-but-verify&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;It is clear that it is probably not a good idea to let anyone pretend to be anyone.
Luckily for all Netizens, it is not quite Wild West out there.&lt;&#x2F;p&gt;
&lt;p&gt;Thanks to the &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Internet_Routing_Registry&quot;&gt;IRR&lt;&#x2F;a&gt; and &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Regional_Internet_registry&quot;&gt;RIRs&lt;&#x2F;a&gt;, it&#x27;s rather clear who owns what prefixes.
Clearly we need to apply &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Route_filtering&quot;&gt;Route Filtering&lt;&#x2F;a&gt; to make sure the implicit trust given to us by others is not violated.
We don&#x27;t want mistakes to be propagated to others. That&#x27;s what stops misconfiguration from becoming &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;BGP_hijacking&quot;&gt;Route Hijacking&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;route-filtering&quot;&gt;Route Filtering&lt;a class=&quot;zola-anchor&quot; href=&quot;#route-filtering&quot; aria-label=&quot;Anchor link for: route-filtering&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;When a &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Border_Gateway_Protocol&quot;&gt;BGP&lt;&#x2F;a&gt; peer announces a prefix to another, there are a lot of reasons why it may be incorrect or not desired.&lt;&#x2F;p&gt;
&lt;p&gt;Some reasons why a route announcement may be &quot;incorrect&quot; in the &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Default-free_zone&quot;&gt;DFZ&lt;&#x2F;a&gt; are listed below.
This is not the everything, it&#x27;s really just meant as general examples to help you get started.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;invalid-next-hops&quot;&gt;Invalid Next-Hops&lt;a class=&quot;zola-anchor&quot; href=&quot;#invalid-next-hops&quot; aria-label=&quot;Anchor link for: invalid-next-hops&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Sometimes a router might announce routes with invalid next-hops to you. Say, internal IP addresses that you have no way to reach.&lt;&#x2F;p&gt;
&lt;p&gt;If your router receives a route that says &lt;code&gt;X.Y.Z.0&#x2F;24&lt;&#x2F;code&gt; is reachable via &lt;code&gt;A.B.C.5&lt;&#x2F;code&gt;, it has to resolve that last IP to a MAC address to forward the Layer 3 information to it.
When it can&#x27;t figure out a way to reach the last IP, that route is invalid.&lt;&#x2F;p&gt;
&lt;p&gt;Most platforms will reject it or hide it and simply not consider it a valid route. This should be automatic.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;enforcing-first-as&quot;&gt;Enforcing first AS&lt;a class=&quot;zola-anchor&quot; href=&quot;#enforcing-first-as&quot; aria-label=&quot;Anchor link for: enforcing-first-as&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Unless you&#x27;re peering with a Route Server on an IXP or something similar, routes announced to you via eBGP will contain the AS of the network that announced that route to you.&lt;&#x2F;p&gt;
&lt;p&gt;This makes a lot of sense, as the traffic will flow through that network to reach the routes announced to you.&lt;&#x2F;p&gt;
&lt;p&gt;However, routers being designed for flexibility and not knowing what type of peer you&#x27;re peering with, usually don&#x27;t default to enforcing that.
Turn it on for any eBGP peering sessions that isn&#x27;t to a Route Server, as routes announced to you that don&#x27;t have the peer AS prepended in that case are most likely accidental and&#x2F;or invalid.&lt;&#x2F;p&gt;
&lt;p&gt;The option is usually called &lt;code&gt;enforce-first-as&lt;&#x2F;code&gt; or a variation of that.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;default-routes&quot;&gt;Default Routes&lt;a class=&quot;zola-anchor&quot; href=&quot;#default-routes&quot; aria-label=&quot;Anchor link for: default-routes&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;This might seem obvious that the &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Default-free_zone&quot;&gt;DFZ&lt;&#x2F;a&gt; - the Default-free Zone - shouldn&#x27;t have defaults.
In the grand scheme of things, this is correct!&lt;&#x2F;p&gt;
&lt;p&gt;However, upstreams may announce a Default Route in addition to a &lt;a href=&quot;https:&#x2F;&#x2F;bgp.potaroo.net&#x2F;index-bgp.html&quot;&gt;Full Table&lt;&#x2F;a&gt; or instead of one or another.
And there are several reasons why you might want that!&lt;&#x2F;p&gt;
&lt;p&gt;Perhaps you just want a default route from a transit provider and peerings in addition to that.
This might be the case when you only have one upstream or two &quot;equal&quot; feeds.
Or when you are using a Layer 3 Switch or Router with a small &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Forwarding_information_base&quot;&gt;FIB&lt;&#x2F;a&gt; instead of a full blown router, capable of carring the millions of routes.&lt;&#x2F;p&gt;
&lt;p&gt;But, to save you some time, if you can accept a &lt;a href=&quot;https:&#x2F;&#x2F;bgp.potaroo.net&#x2F;index-bgp.html&quot;&gt;Full Table&lt;&#x2F;a&gt;, you probably should.&lt;&#x2F;p&gt;
&lt;p&gt;This ensures that you have the best chance at finding the best path to a network instead of just a reasonable one.
If you don&#x27;t have feeds from the same ISP twice - limiting your capabilities in terms of redundancy and high availability - it is highly likely that one has better routes to some network than the other.
If you plan on becoming an upstream, not carrying the entire &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Default-free_zone&quot;&gt;DFZ&lt;&#x2F;a&gt; becomes unfeasable as well.
Therefore, if you&#x27;re serious about that Internet thing, probably a wise choice to carry a &lt;a href=&quot;https:&#x2F;&#x2F;bgp.potaroo.net&#x2F;index-bgp.html&quot;&gt;Full Table&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Note that when you do so, you essentially become your own source of the Default Routes, which you can advertise to your own internal equipment or customers if they so desire.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;bogon-prefixes&quot;&gt;Bogon Prefixes&lt;a class=&quot;zola-anchor&quot; href=&quot;#bogon-prefixes&quot; aria-label=&quot;Anchor link for: bogon-prefixes&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Bogon_filtering&quot;&gt;Bogon Filtering&lt;&#x2F;a&gt; is a common practice and when filtering, kind of a low hanging fruit.
There are lots of network prefixes that are not supposed to be carried through the Internet.&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;[edit]
&lt;&#x2F;span&gt;&lt;span&gt;vifino@core1.fra1.de.as208431.net# show policy-options prefix-list BOGONS_V4
&lt;&#x2F;span&gt;&lt;span&gt;apply-flags omit;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC1122 &amp;#39;this&amp;#39; network *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;0.0.0.0&#x2F;8;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC1918 Private-Use *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;10.0.0.0&#x2F;8;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC6598 Shared Address Space&#x2F;CGNAT *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;100.64.0.0&#x2F;10;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC1122 Loopback *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;127.0.0.0&#x2F;8;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC3927 Link Local *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;169.254.0.0&#x2F;16;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC1918 Private-Use *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;172.16.0.0&#x2F;12;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC6333 DS-Lite&#x2F;IETF Protocol Assignments *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;192.0.0.0&#x2F;29;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC5737 TEST-NET-1 *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;192.0.2.0&#x2F;24;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC7526 6to4 Relay Anycast *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;192.88.99.0&#x2F;24;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC1918 Private-Use *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;192.168.0.0&#x2F;16;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC2544 Benchmarking *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;198.18.0.0&#x2F;15;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC5737 TEST-NET-2 *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;198.51.100.0&#x2F;24;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC5737 TEST-NET-3 *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;203.0.113.0&#x2F;24;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC5771 Multicast *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;224.0.0.0&#x2F;4;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC1112 Reserved *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;240.0.0.0&#x2F;4;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC8190 Limited Broadcast *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;255.255.255.255&#x2F;32;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;[edit]
&lt;&#x2F;span&gt;&lt;span&gt;vifino@core1.fra1.de.as208431.net# show policy-options prefix-list BOGONS_V6
&lt;&#x2F;span&gt;&lt;span&gt;apply-flags omit;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC4291 IPv4-compatible, loopback, et al *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;::&#x2F;8;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC6666 Discard-Only Address Block *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;0100::&#x2F;8;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC4048 OSI NSAP IPv6 mapping *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;0200::&#x2F;7;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC4291 Reserved by IETF *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;0400::&#x2F;6;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC4291 Reserved by IETF *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;0800::&#x2F;5;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC4291 Reserved by IETF *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;1000::&#x2F;4;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC4380 Teredo *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;2001::&#x2F;32;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC5180 Benchmarking *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;2001:2::&#x2F;48;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC7450 Automatic Multicast Tunneling *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;2001:3::&#x2F;32;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC4843 ORCHID *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;2001:10::&#x2F;28;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC7343 ORCHIDv2 *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;2001:20::&#x2F;28;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC3849 Documentation *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;2001:db8::&#x2F;32;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC7526 6to4 Relay Anycast *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;2002::&#x2F;16;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC2471 6bone *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;3ffe::&#x2F;16;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC4193 Unique Local Unicast *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;fc00::&#x2F;7;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC4291 Link Local Unicast *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;fe80::&#x2F;10;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC3879 old site local unicast *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;fec0::&#x2F;10;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC4291 Multicast *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;ff00::&#x2F;8;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;These are not to be announced and not to be routed into the &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Default-free_zone&quot;&gt;DFZ&lt;&#x2F;a&gt;. Never. Always invalid.&lt;&#x2F;p&gt;
&lt;p&gt;Well, with the exception of &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Teredo_tunneling&quot;&gt;Teredo&lt;&#x2F;a&gt;, depending on your understanding, but honestly, that ship has sunk. Reject it when coming from external sources.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;bogon-asns&quot;&gt;Bogon ASNs&lt;a class=&quot;zola-anchor&quot; href=&quot;#bogon-asns&quot; aria-label=&quot;Anchor link for: bogon-asns&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Like Bogon Prefixes, Bogon ASNs are &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Autonomous_system_(Internet)&quot;&gt;ASN&lt;&#x2F;a&gt; that are not supposed to be in the &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Default-free_zone&quot;&gt;DFZ&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;instituut.net&#x2F;~job&#x2F;&quot;&gt;Job Snijders&lt;&#x2F;a&gt; has done the Internet a favour and compiled Bogon ASN Filter examples for several vendors.
See &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;as2914&#x2F;bogon-asn-filters&quot;&gt;bogon-asn-filters&lt;&#x2F;a&gt; for up to date examples.&lt;&#x2F;p&gt;
&lt;p&gt;Another Juniper example:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;[edit]
&lt;&#x2F;span&gt;&lt;span&gt;vifino@core1.fra1.de.as208431.net# show policy-options as-path-group BOGON_ASNS
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC7607 *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;as-path zero &amp;quot;.* 0 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC4893 AS_TRANS *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;as-path AS_TRANS &amp;quot;.* 23456 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC5398 Documentation&#x2F;Example ASNs *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;as-path examples1 &amp;quot;.* [64496-64511] .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;as-path examples2 &amp;quot;.* [65536-65551] .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC6996 Private ASNs *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;as-path reserved1 &amp;quot;.* [64512-65534] .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;as-path reserved2 &amp;quot;.* [4200000000-4294967294] .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC6996 Last 16-bit ASN *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;as-path last16 &amp;quot;.* 65535 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* RFC6996 Last 32-bit ASN *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;as-path last32 &amp;quot;.* 4294967295 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;* IANA Reserved ASNs *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;as-path iana-reserved &amp;quot;.* [65552-131071] .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;When you receive a route with them in the path, you should reject them.
You should also make sure your announcements strip all your private ASNs, but don&#x27;t do it for your customers or peers.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;too-big-or-small-networks&quot;&gt;Too Big or Small Networks&lt;a class=&quot;zola-anchor&quot; href=&quot;#too-big-or-small-networks&quot; aria-label=&quot;Anchor link for: too-big-or-small-networks&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Some prefix sizes just have no business in the &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Default-free_zone&quot;&gt;DFZ&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;For IPv4, a longer prefix length than a &lt;code&gt;&#x2F;24&lt;&#x2F;code&gt; is not considered routable. So anything &lt;code&gt;&#x2F;25-&#x2F;32&lt;&#x2F;code&gt; has no business being advertised.
A shorter prefix length than a &lt;code&gt;&#x2F;8&lt;&#x2F;code&gt; does not make much sense either. So anything &lt;code&gt;&#x2F;1-&#x2F;7&lt;&#x2F;code&gt; should be rejected.&lt;&#x2F;p&gt;
&lt;p&gt;For IPv6, a longer prefix than a &lt;code&gt;&#x2F;48&lt;&#x2F;code&gt; is not considered routable. So anything &lt;code&gt;&#x2F;49-&#x2F;128&lt;&#x2F;code&gt; belongs in the trash.
Defining the shortest prefix length to accept is a bit more difficult. &lt;code&gt;&#x2F;12&lt;&#x2F;code&gt;s are the largest blocks assigned to &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Regional_Internet_registry&quot;&gt;RIRs&lt;&#x2F;a&gt;, so that&#x27;s a very safe bet.
&lt;code&gt;&#x2F;29&lt;&#x2F;code&gt;s are pretty much the shortest prefix length blocks they will allocate.
I chose &lt;code&gt;&#x2F;19&lt;&#x2F;code&gt;, because there are currently only two prefixes announced with that size. &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Deutsche_Telekom&quot;&gt;DTAG&lt;&#x2F;a&gt;&#x27;s &lt;code&gt;2003::&#x2F;19&lt;&#x2F;code&gt; and Orange S.A.&#x27;s Opentransit &lt;code&gt;2a01:c000::&#x2F;19&lt;&#x2F;code&gt;.
There is only one prefix I know of that is bigger: &lt;code&gt;2002::&#x2F;16&lt;&#x2F;code&gt;, the 6to4 prefix, which I chose to reject anyway. See the Bogon Prefixes.
So, I&#x27;ll reject any IPv6 prefix &lt;code&gt;&#x2F;1-&#x2F;17&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Keep in mind that I explicitly left out &lt;code&gt;&#x2F;0&lt;&#x2F;code&gt; prefixes - the default routes.
That one has its own section.&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;[edit]
&lt;&#x2F;span&gt;&lt;span&gt;vifino@core1.fra1.de.as208431.net# show policy-options policy-statement REJECT_ODD_SIZE_V4
&lt;&#x2F;span&gt;&lt;span&gt;term too-small {
&lt;&#x2F;span&gt;&lt;span&gt;    from {
&lt;&#x2F;span&gt;&lt;span&gt;        route-filter 0.0.0.0&#x2F;0 prefix-length-range &#x2F;25-&#x2F;32;
&lt;&#x2F;span&gt;&lt;span&gt;    }
&lt;&#x2F;span&gt;&lt;span&gt;    then reject;
&lt;&#x2F;span&gt;&lt;span&gt;}
&lt;&#x2F;span&gt;&lt;span&gt;term too-big {
&lt;&#x2F;span&gt;&lt;span&gt;    from {
&lt;&#x2F;span&gt;&lt;span&gt;        route-filter 0.0.0.0&#x2F;0 prefix-length-range &#x2F;1-&#x2F;7;
&lt;&#x2F;span&gt;&lt;span&gt;    }
&lt;&#x2F;span&gt;&lt;span&gt;}
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;[edit]
&lt;&#x2F;span&gt;&lt;span&gt;vifino@core1.fra1.de.as208431.net# show policy-options policy-statement REJECT_ODD_SIZE_V6
&lt;&#x2F;span&gt;&lt;span&gt;term too-small {
&lt;&#x2F;span&gt;&lt;span&gt;    from {
&lt;&#x2F;span&gt;&lt;span&gt;        route-filter ::&#x2F;0 prefix-length-range &#x2F;49-&#x2F;128;
&lt;&#x2F;span&gt;&lt;span&gt;    }
&lt;&#x2F;span&gt;&lt;span&gt;    then reject;
&lt;&#x2F;span&gt;&lt;span&gt;}
&lt;&#x2F;span&gt;&lt;span&gt;term too-big {
&lt;&#x2F;span&gt;&lt;span&gt;    from {
&lt;&#x2F;span&gt;&lt;span&gt;        route-filter ::&#x2F;0 prefix-length-range &#x2F;1-&#x2F;18;
&lt;&#x2F;span&gt;&lt;span&gt;    }
&lt;&#x2F;span&gt;&lt;span&gt;    then reject;
&lt;&#x2F;span&gt;&lt;span&gt;}
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;reject-transit-asns&quot;&gt;Reject Transit ASNs&lt;a class=&quot;zola-anchor&quot; href=&quot;#reject-transit-asns&quot; aria-label=&quot;Anchor link for: reject-transit-asns&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;When not peering with a transit provider, you usually don&#x27;t expect huge Transit ASNs to appear in the path.
If you don&#x27;t expect it, it is most likely a Transit Leak!&lt;&#x2F;p&gt;
&lt;p&gt;In practice, if you peer with a route server of an IXP and you receive a path containing a big Transit network, it&#x27;ll either be announcing itself or it&#x27;s a leak.
If it&#x27;s just a regular peering session with some random network, it most definitly is a leak.&lt;&#x2F;p&gt;
&lt;p&gt;This is the as-path regex list I came up with:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;&#x2F;* List of ASNs to filter when peering with RS or not-T1s *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;as-path-group TRANSIT_LEAKS {
&lt;&#x2F;span&gt;&lt;span&gt;    as-path cogent &amp;quot;.* 174 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path centurylink &amp;quot;.* 209 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    &#x2F;* Verizon&#x2F;UUNET is at IXPs, doesn&amp;#39;t peer with RS *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path verizon &amp;quot;.* 701 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    &#x2F;* Vodafone iss at IXPs, never peers with RS *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path vodafone &amp;quot;.* 1273 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path arelion &amp;quot;.* 1299 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    &#x2F;* Verizon is at IXPs, doesn&amp;#39;t peer with RS *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path verizon &amp;quot;.* 2828 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    &#x2F;* NTT is at IXPs, never peers with RS *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path ntt &amp;quot;.* 2914 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    &#x2F;* GTT is at IXPs, never peers with RS *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path gtt &amp;quot;.* 3257 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    &#x2F;* DTAG is barely at IXPs, never peers with RS *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path dtag &amp;quot;.* 3320 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    &#x2F;* Lumen is at IXPs, doesn&amp;#39;t peer with RS *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path lumen &amp;quot;.* 3356 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    &#x2F;* PCCW is at IXPs, never peers with RS *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path pccw &amp;quot;.* 3491 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    &#x2F;* ChinaNet peers with RS *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path chinanet &amp;quot;[^4134]+ 4134 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    &#x2F;* Telsta peers with RS *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path telsta &amp;quot;[^4637]+ 4637 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    &#x2F;* ChinaNet peers with RS *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path chinanet2 &amp;quot;[^4809]+ 4809 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    &#x2F;* Orange is at IXPs, doesn&amp;#39;t peer with RS *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path orange &amp;quot;.* 5511 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path tata &amp;quot;.* 6453 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    &#x2F;* Zayo peers with RSes *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path zayo &amp;quot;[^6461]+ 6461 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    &#x2F;* Seabone is at IXes, but doesn&amp;#39;t peer with RS *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path ti-seabone &amp;quot;.* 6762 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    &#x2F;* LG is at IXPs, never peers with RS *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path libertyglobal &amp;quot;.* 6830 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    &#x2F;* HE peers with RS *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path hurricane &amp;quot;[^6939]+ 6939 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path atnt &amp;quot;.* 7018 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    &#x2F;* Singtel is at IXPs, doesn&amp;#39;t peer with RS *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path singtel &amp;quot;.* 7473 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path comcast &amp;quot;.* 7922 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    &#x2F;* ReTN is at IXPs and with RS! *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path retn &amp;quot;[^9002]+ 9002 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;    &#x2F;* Telxius is at IXes, but doesn&amp;#39;t peer with RS *&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;    as-path telxius &amp;quot;.* 12956 .*&amp;quot;;
&lt;&#x2F;span&gt;&lt;span&gt;}
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;It drops some routes with carriers in the list that never peer with a route server, plus big networks that would only announce itself.&lt;&#x2F;p&gt;
&lt;p&gt;I doubt I&#x27;ll ever get the chance to do settlement free peering with most of these on that list and if that happens, I&#x27;ll most likely classify it as &quot;transit&quot; anyway.
That way I don&#x27;t fully overload my poor QFXes that just do default routes + peers.&lt;&#x2F;p&gt;
&lt;p&gt;Keep in mind that this is for &lt;em&gt;my network&lt;&#x2F;em&gt;. The list might be different, you might have sensible additions or changes.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rpki&quot;&gt;RPKI&lt;a class=&quot;zola-anchor&quot; href=&quot;#rpki&quot; aria-label=&quot;Anchor link for: rpki&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Oh boy, this one is great! This is about RFC6480.&lt;&#x2F;p&gt;
&lt;p&gt;A bunch of people realized that while there are a bunch of measures against bad announcements, none of them were easily deployable or maintainable.
Mostly before RPKI, the best way to filter were prefix lists generated from &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Internet_Routing_Registry&quot;&gt;IRR&lt;&#x2F;a&gt; data with tools like &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;bgp&#x2F;bgpq4&quot;&gt;bgpq4&lt;&#x2F;a&gt;. Another thing &lt;a href=&quot;https:&#x2F;&#x2F;instituut.net&#x2F;~job&#x2F;&quot;&gt;Job Snijders&lt;&#x2F;a&gt; has helped with.&lt;&#x2F;p&gt;
&lt;p&gt;While feasable for filtering &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Eyeball_network&quot;&gt;Eyeball Networks&lt;&#x2F;a&gt; that generally have a fixed list of prefixes and stick to them for a while, for huge service providers this list changes very often.
At some point, there is at least some degree of necessary trust or you&#x27;ll risk not being able to reach a lot of prefixes.&lt;&#x2F;p&gt;
&lt;p&gt;If say, Amazon would announce a prefix of Google, I&#x27;m sure there are a bunch of routers that&#x27;d accept it.&lt;&#x2F;p&gt;
&lt;p&gt;RPKI is meant to solve issues like this by implementing a cryptographically verifyable way to assert ownership of resources.
Much like Root DNS servers, &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Regional_Internet_registry&quot;&gt;RIRs&lt;&#x2F;a&gt; enable a signed certificate trust chain for proof of origin. Thus, it is much harder to fake.&lt;&#x2F;p&gt;
&lt;p&gt;Thanks to software support, it is also much easier to keep this information up to date and offloading the &quot;knowing the ownership of all resources in the internet&quot; to another server.
This lets routers just ask that server on-demand instead of having to keep that entire ownership information in memory at all times.&lt;&#x2F;p&gt;
&lt;p&gt;The thing that does the most impact in todays world is rejecting RPKI Invalid prefixes.
We can also consider accepting RPKI Valid prefixes even if they are not in our generated prefix list for a peer.&lt;&#x2F;p&gt;
&lt;p&gt;While I hope for a future where every prefix is signed, we are unfortunately not at that point.
When RPKI does not know about a prefix, we&#x27;ll just have to rely on prefix lists once again.
All I can do to do my part is to ensure all my customers have RPKI records and it&#x27;s valid.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;maximum-as-path-length&quot;&gt;Maximum AS_PATH Length&lt;a class=&quot;zola-anchor&quot; href=&quot;#maximum-as-path-length&quot; aria-label=&quot;Anchor link for: maximum-as-path-length&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Sometimes there are really ridiculous paths being advertised thanks to path prepending being used as a traffic shaping mechanism.&lt;&#x2F;p&gt;
&lt;p&gt;Realistically, you&#x27;d only see a maximum AS_PATH length of somewhere around 10 for like 99.9% of the routes.
It&#x27;s probably safe to drop routes with an AS_PATH length of 20 or more. That&#x27;d give it a 10 AS safety margin.&lt;&#x2F;p&gt;
&lt;p&gt;A BIRD example for this could look something like this:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;function reject_long_aspath() {
&lt;&#x2F;span&gt;&lt;span&gt;    if (bgp_path.len &amp;gt; 20) then {
&lt;&#x2F;span&gt;&lt;span&gt;        print &amp;quot;Reject: AS_PATH too long: &amp;quot;, net, &amp;quot; &amp;quot;, bgp_path, &amp;quot; protocol: &amp;quot;, proto;
&lt;&#x2F;span&gt;&lt;span&gt;        reject;
&lt;&#x2F;span&gt;&lt;span&gt;    }
&lt;&#x2F;span&gt;&lt;span&gt;}
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Cisco has &lt;code&gt;bgp maxas-limit&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;maximum-prefix-limit&quot;&gt;Maximum Prefix Limit&lt;a class=&quot;zola-anchor&quot; href=&quot;#maximum-prefix-limit&quot; aria-label=&quot;Anchor link for: maximum-prefix-limit&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;While not strictly filtering routes itself, it is the last line of defense: The dreaded Maximum Prefix Limit.&lt;&#x2F;p&gt;
&lt;p&gt;Intended as a way to bring down peering sessions forcibly when the other side is clearly misconfigured, it stops just that.
If the other side is trying to send you a &lt;a href=&quot;https:&#x2F;&#x2F;bgp.potaroo.net&#x2F;index-bgp.html&quot;&gt;Full Table&lt;&#x2F;a&gt; and you expect a few dozen prefixes instead, this might overload your router and kill it!
Or you end up routing to it but it&#x27;ll just drop the packets.&lt;&#x2F;p&gt;
&lt;p&gt;Either way, it&#x27;s just one less thing to worry about. Usually your peering partners mention a sane limit either directly or have it somewhere, for example on &lt;a href=&quot;https:&#x2F;&#x2F;peeringdb.com&quot;&gt;PeeringDB&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;packet-filtering&quot;&gt;Packet Filtering&lt;a class=&quot;zola-anchor&quot; href=&quot;#packet-filtering&quot; aria-label=&quot;Anchor link for: packet-filtering&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Route Filtering is only half the story. You need to filter the actual traffic, too.&lt;&#x2F;p&gt;
&lt;p&gt;Just because you only announce certain routes does not mean you don&#x27;t get packets that are destined for others.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;discarding-bogons&quot;&gt;Discarding Bogons&lt;a class=&quot;zola-anchor&quot; href=&quot;#discarding-bogons&quot; aria-label=&quot;Anchor link for: discarding-bogons&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Like I mentioned in the Bogon Prefixes section, Bogons are not welcome in the Internet. They must be discarded.
You can do this in a plethora of ways, important is that they are welcome neither as source nor destination.&lt;&#x2F;p&gt;
&lt;p&gt;Dropping packets destined for bogons is simple enough. On Junos and other routing platforms, you simply install discard routes for the prefixes.&lt;&#x2F;p&gt;
&lt;p&gt;Packets with bogon as source address vary more between vendors. With Junos, you simply set up &lt;a href=&quot;https:&#x2F;&#x2F;www.juniper.net&#x2F;documentation&#x2F;us&#x2F;en&#x2F;software&#x2F;junos&#x2F;interfaces-ethernet-switches&#x2F;topics&#x2F;ref&#x2F;statement&#x2F;rpf-loose-discard-edit-forwarding-options.html&quot;&gt;rpf-loose-mode-discard&lt;&#x2F;a&gt;, enable uRPF loose and it discards packets whose source address points to a &lt;code&gt;discard&lt;&#x2F;code&gt; next-hop.
See the next section.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;unicast-reverse-path-forwarding-urpf&quot;&gt;Unicast Reverse-Path Forwarding (uRPF)&lt;a class=&quot;zola-anchor&quot; href=&quot;#unicast-reverse-path-forwarding-urpf&quot; aria-label=&quot;Anchor link for: unicast-reverse-path-forwarding-urpf&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Reverse-path_forwarding#Unicast_RPF&quot;&gt;Unicast Reverse-Path Forwarding&lt;&#x2F;a&gt; is a way to prevent IP address spoofing.&lt;&#x2F;p&gt;
&lt;p&gt;uRPF has three modes, two of them are commonly implemented:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Strict Mode&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Each incoming packet&#x27;s source is checked against the FIB, which contains only the best path.&lt;&#x2F;li&gt;
&lt;li&gt;If the FIB doesn&#x27;t contain an entry for the source or it points to a different interface than the one you received it on, the packet gets discarded.&lt;&#x2F;li&gt;
&lt;li&gt;This only works in symmetric routing, so only applicable for your own infrastructure or &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Eyeball_network&quot;&gt;Eyeball Networks&lt;&#x2F;a&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;Feasable-Paths Mode&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Each incoming packet&#x27;s source is checked against the FIB, which carries all sane paths, not just the best one.&lt;&#x2F;li&gt;
&lt;li&gt;If the FIB doesn&#x27;t contain an entry for the source or if no entry points to the interface the packet was received on, the packet gets discarded.&lt;&#x2F;li&gt;
&lt;li&gt;This works with asymmetric routing, however, it is not always implemented on lower-grade routers.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;Loose mode&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Each incoming packet&#x27;s source is checked against the FIB.&lt;&#x2F;li&gt;
&lt;li&gt;If the FIB doesn&#x27;t contain an entry for the source (or points to a discard interface on some platforms), the packet gets discarded.&lt;&#x2F;li&gt;
&lt;li&gt;This shouldn&#x27;t cause trouble to implement but doesn&#x27;t help that much (except for bogon filtering).&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;These all help in some degree, strict mode being the most helpful but only sometimes applicable and loose mode being only generally useful if discard routes get honored.
General recommendation from me is the following:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Transit gets uRPF loose.&lt;&#x2F;li&gt;
&lt;li&gt;Peers get uRPF feasable-paths if supported or uRPF loose otherwise.&lt;&#x2F;li&gt;
&lt;li&gt;Customers get uRPF feasable-paths if supported or strict.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Note that this will only go well for customers who actually export you their prefixes and not just send traffic to you. Tell them about it, mention that they can add &lt;code&gt;no-export&lt;&#x2F;code&gt; communities, etc..&lt;&#x2F;p&gt;
&lt;p&gt;They are usually set on a per-interface basis, but some vendors&#x2F;platforms might allow you to set loose mode globally.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;remote-triggered-black-hole-rtbh&quot;&gt;Remote Triggered Black Hole (RTBH)&lt;a class=&quot;zola-anchor&quot; href=&quot;#remote-triggered-black-hole-rtbh&quot; aria-label=&quot;Anchor link for: remote-triggered-black-hole-rtbh&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;RTBH is a way to route a specific prefix (usually a more specific) explicitly to the void. Usually when that prefix is targeted by DDoS as a last measure when mitigation is not otherwise possible.&lt;&#x2F;p&gt;
&lt;p&gt;Sometimes this is signalled by attaching the well known blackhole community to a route and is usually an option on Route Servers on an IXP or on peerings with bigger providers.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;inbound-filtering&quot;&gt;Inbound Filtering&lt;a class=&quot;zola-anchor&quot; href=&quot;#inbound-filtering&quot; aria-label=&quot;Anchor link for: inbound-filtering&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;When accepting routes from your upstreams and peers, there are some things you should always reject, like the Bogons, too big&#x2F;small networks and RPKI Invalids.
Depending on your needs, you should also filter for your desired default route behaviour. Discard Bogons.&lt;&#x2F;p&gt;
&lt;p&gt;Doing any more filtering on your upstreams is a loosing battle. If you see them announcing RPKI Invalids, do tell them, though. :)&lt;&#x2F;p&gt;
&lt;p&gt;Filtering peers that don&#x27;t provide you a &lt;a href=&quot;https:&#x2F;&#x2F;bgp.potaroo.net&#x2F;index-bgp.html&quot;&gt;Full Table&lt;&#x2F;a&gt; is much more feasable. You can generate prefix lists with &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;bgp&#x2F;bgpq4&quot;&gt;bgpq4&lt;&#x2F;a&gt; for example for their &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Autonomous_system_(Internet)&quot;&gt;ASN&lt;&#x2F;a&gt; or AS-SET of their choosing.
Make sure to update that regularly though.
AIf you can&#x27;t generate prefix-lists or keep them up to date for whatever reason, make sure to at least drop Bogons, too big&#x2F;small, RPKI Invalids and transit leaks.
Configure the Maximum Prefix Limit to something sane, too.&lt;&#x2F;p&gt;
&lt;p&gt;Filtering routes from your downstream customers is the best case for you.
You should filter strict with a prefix list, possibly (only) allowing RPKI Valids anyway and maybe apply uRPF feasable-paths&#x2F;strict (but think about it).&lt;&#x2F;p&gt;
&lt;p&gt;If they complain, ask them why. If they don&#x27;t have a good answer, tell them to Do Things Correctly™: They are either abusing you or doing things they almost certainly shouldn&#x27;t.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;outbound-filtering&quot;&gt;Outbound Filtering&lt;a class=&quot;zola-anchor&quot; href=&quot;#outbound-filtering&quot; aria-label=&quot;Anchor link for: outbound-filtering&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;&quot;Right, after making clear that there is a bunch we can&#x27;t accept, what stops me from just announcing my prefixes statically? After all, I know what my prefixes are!&quot;&lt;&#x2F;p&gt;
&lt;p&gt;Well, nothing! If you don&#x27;t provide upstream to another &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Autonomous_system_(Internet)&quot;&gt;ASN&lt;&#x2F;a&gt;, that&#x27;s just fine.
But, once that changes, you&#x27;ll probably need to do some dynamic filtering or you could interfer with the operations of your downstream.&lt;&#x2F;p&gt;
&lt;p&gt;After filtering your downstreams inbound - accepting only what you know to be correct - and making sure you&#x27;re allowed to announce the prefixes according to the &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Internet_Routing_Registry&quot;&gt;IRR&lt;&#x2F;a&gt; and RPKI,
you can announce that to your peers and upstreams.
One of the simplest way to do that is to attach a BGP Community to it of some kind and making your outbound policies ensure it is attached to a route before announcing it.
You should also make sure you filter it when it comes from external sources. Unless you wanna become a free upstream provider, that is.&lt;&#x2F;p&gt;
&lt;p&gt;If you provide someone downstream the &lt;a href=&quot;https:&#x2F;&#x2F;bgp.potaroo.net&#x2F;index-bgp.html&quot;&gt;Full Table&lt;&#x2F;a&gt; of yours, you should make sure you did your best to filter your inbound routes first and don&#x27;t announce internal or invalid routes alongside.&lt;&#x2F;p&gt;
&lt;p&gt;So be a good egg in the chicken coop, make sure you don&#x27;t announce crap and RPKI sign all your routes.
You should also tell others to set a sane Maximum Prefix Limit (usually 10x the actual number of prefixes expected to be announced for that safety margin), just in case.&lt;&#x2F;p&gt;
&lt;p&gt;Make sure to not route Bogon sources or destinations and only route packets for destinations your peers announce.
Best way to ensure sane outgoing traffic is to discard bad incoming traffic.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;notes&quot;&gt;Notes&lt;a class=&quot;zola-anchor&quot; href=&quot;#notes&quot; aria-label=&quot;Anchor link for: notes&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Again, this is not complete and just my understanding of best practices mixed in with my own opinion. If you have suggestions, feel free to contact me.&lt;&#x2F;p&gt;
&lt;p&gt;FYI: I mentioned a lot of RFCs here, I wanted to generate markdown footnotes for the references to those, but failed to realize that in code blocks, they don&#x27;t work.
Here&#x27;s what I attempted regardless.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# Unify RFC references and delete old ones. Breaks thanks to codeblocks.
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;sed -Ei -e &lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;s&#x2F;\[?RFC ?([0-9]+)\]?&#x2F;[RFC\1]&#x2F;ig&lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; -e &lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&#x2F;^\[RFC&#x2F;d&lt;&#x2F;span&gt;&lt;span&gt;&amp;#39; content&#x2F;odd-world-fundamentals.md
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# Generate the references. This part works, but with no links to point to it, rather useless.
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;sed -En &lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;s@.*(RFC ?)([0-9]+).*@[\1\2]: https:&#x2F;&#x2F;datatracker.ietf.org&#x2F;doc&#x2F;html&#x2F;rfc\2@igp&lt;&#x2F;span&gt;&lt;span&gt;&amp;#39; content&#x2F;odd-world-fundamentals.md | &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;uniq &lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt; content&#x2F;odd-world-fundamentals.md
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;So I undid that. Sorry!&lt;&#x2F;p&gt;
&lt;p&gt;Hope you can make some sense of this and it helped you.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;update-2022-04-18&quot;&gt;Update 2022-04-18&lt;a class=&quot;zola-anchor&quot; href=&quot;#update-2022-04-18&quot; aria-label=&quot;Anchor link for: update-2022-04-18&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;On Twitter &lt;a href=&quot;https:&#x2F;&#x2F;twitter.com&#x2F;DaryllSwer&quot;&gt;Daryll Swer&lt;&#x2F;a&gt; pointed out that I didn&#x27;t mention traffic filtering at all and suggested some things.&lt;&#x2F;p&gt;
&lt;p&gt;Initially, I didn&#x27;t want to touch this subject as this post was basically inspired by a colleague who wanted to know more about BGP filtering, but not mentioning it seems negligent.
So, I added some sections.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;update-2022-04-24&quot;&gt;Update 2022-04-24&lt;a class=&quot;zola-anchor&quot; href=&quot;#update-2022-04-24&quot; aria-label=&quot;Anchor link for: update-2022-04-24&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Mention filtering of Transit Leaks and add my own as-path filter list. Does drop some routes, but you should have better routes to those anyway.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>OpenBSD 6.9 time server with Meinberg clocks</title>
        <published>2021-07-28T00:00:00+00:00</published>
        <updated>2021-08-02T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              vifino
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="/obsd-msts/"/>
        <id>/obsd-msts/</id>
        
        <content type="html" xml:base="/obsd-msts/">&lt;h1 id=&quot;tick-tock-tick-tock&quot;&gt;Tick. Tock. Tick. Tock.&lt;a class=&quot;zola-anchor&quot; href=&quot;#tick-tock-tick-tock&quot; aria-label=&quot;Anchor link for: tick-tock-tick-tock&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;Time is important.
Debugging between machines will become a pain if the timestamps are incorrect.&lt;&#x2F;p&gt;
&lt;p&gt;With &lt;a href=&quot;https:&#x2F;&#x2F;www.openbsd.org&#x2F;&quot;&gt;OpenBSD&lt;&#x2F;a&gt;, a serial port and a Meinberg clock module, like the &lt;a href=&quot;https:&#x2F;&#x2F;www.meinberg.de&#x2F;german&#x2F;products&#x2F;din-rail-dcf77-uhr.htm&quot;&gt;DCF600HS&lt;&#x2F;a&gt; (or older &lt;a href=&quot;https:&#x2F;&#x2F;www.meinberg.de&#x2F;german&#x2F;archive&#x2F;com52hs.htm&quot;&gt;COM52HS&lt;&#x2F;a&gt;),
you can create your own stratum 1 time server, receiving the &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;DCF77&quot;&gt;DCF77&lt;&#x2F;a&gt; longwave time signal!&lt;&#x2F;p&gt;
&lt;p&gt;If you do not have a good serial port, a USB FTDI adapter will do as well.
Not sure if there is a big difference between different USB serial chips or vendors. YMMV.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;step-1-prepare-the-hardware&quot;&gt;Step 1: Prepare the Hardware&lt;a class=&quot;zola-anchor&quot; href=&quot;#step-1-prepare-the-hardware&quot; aria-label=&quot;Anchor link for: step-1-prepare-the-hardware&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;You need a serial port (preferrably not USB) of your machine wired to a Meinberg module with a straight cable.
The module itself probably needs its antenna attached and pointing to &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Mainflingen&quot;&gt;Mainflingen&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Well, unless you are there on vacation, then you just need to hold the module at the right angle. Tested that for you! ;)&lt;&#x2F;p&gt;
&lt;h3 id=&quot;step-2-temporary-timedelta&quot;&gt;Step 2: Temporary Timedelta&lt;a class=&quot;zola-anchor&quot; href=&quot;#step-2-temporary-timedelta&quot; aria-label=&quot;Anchor link for: step-2-temporary-timedelta&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;While the Meinberg Standard Time String is, well, standard on all Meinberg clocks,
it is not always on the same serial setup.&lt;&#x2F;p&gt;
&lt;p&gt;In my case, my &lt;a href=&quot;https:&#x2F;&#x2F;www.meinberg.de&#x2F;german&#x2F;archive&#x2F;com52hs.htm&quot;&gt;COM52HS&lt;&#x2F;a&gt; outputs a 9600 Baud, 7-databit, 2 stop-bit signal with even parity.&lt;&#x2F;p&gt;
&lt;p&gt;To make &lt;a href=&quot;https:&#x2F;&#x2F;www.openbsd.org&#x2F;&quot;&gt;OpenBSD&lt;&#x2F;a&gt; aware of the clock, we need to attach a serial line discipline to it. Specifically, &lt;a href=&quot;https:&#x2F;&#x2F;man.openbsd.org&#x2F;msts.4&quot;&gt;msts(4)&lt;&#x2F;a&gt;:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# dmesg | grep ucom
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;ucom0&lt;&#x2F;span&gt;&lt;span&gt; at uftdi0 portno 1
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# ldattach -7e2s 9600 msts cuaU0 # attach the line discipline
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# sysctl hw.sensors.msts0   # check hw.sensors node for first msts sensor
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;hw.sensors.msts0.percent0&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;100.00&lt;&#x2F;span&gt;&lt;span&gt;% (&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;Signal&lt;&#x2F;span&gt;&lt;span&gt;), OK
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;hw.sensors.msts0.timedelta0&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;0.005555 &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;secs&lt;&#x2F;span&gt;&lt;span&gt; (MSTS)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; OK, Mon Aug  2 00:38:11.004
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;I attached the line discipline with &lt;a href=&quot;https:&#x2F;&#x2F;man.openbsd.org&#x2F;ldattach.8&quot;&gt;ldattach(8)&lt;&#x2F;a&gt; on &lt;code&gt;cuaU0&lt;&#x2F;code&gt;, which is the call out device of &lt;code&gt;ttyU0&lt;&#x2F;code&gt;,
which is provided by &lt;code&gt;ucom0&lt;&#x2F;code&gt; attached to the &lt;code&gt;uftdi0&lt;&#x2F;code&gt; driver. Phew.&lt;&#x2F;p&gt;
&lt;p&gt;The &lt;code&gt;hw.sensors&lt;&#x2F;code&gt; framework has &lt;code&gt;timedelta&lt;&#x2F;code&gt; sensors, which is what you are seeing here.
This &lt;code&gt;timedelta0&lt;&#x2F;code&gt; shows that the last received &lt;a href=&quot;https:&#x2F;&#x2F;man.openbsd.org&#x2F;msts.4&quot;&gt;msts(4)&lt;&#x2F;a&gt; string contained a timestamp
which was ahead of the local clock by 5.555 milliseconds.&lt;&#x2F;p&gt;
&lt;p&gt;In an unsyncronized state, the offset might be a lot more than that.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;step-3-make-it-persistent&quot;&gt;Step 3: Make it persistent&lt;a class=&quot;zola-anchor&quot; href=&quot;#step-3-make-it-persistent&quot; aria-label=&quot;Anchor link for: step-3-make-it-persistent&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;Since we now know that it works, it&#x27;s time to make it permanent.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# tail -n 5 &#x2F;etc&#x2F;ttys
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;ttyTZ&lt;&#x2F;span&gt;&lt;span&gt;   none                            network
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# Clocks
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;ttyU0 &lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&#x2F;sbin&#x2F;ldattach -7e2s 9600 msts&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot; unknown on softcar
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This line in &lt;a href=&quot;https:&#x2F;&#x2F;man.openbsd.org&#x2F;ttys.5&quot;&gt;ttys(5)&lt;&#x2F;a&gt; calls the &lt;a href=&quot;https:&#x2F;&#x2F;man.openbsd.org&#x2F;ldattach.8&quot;&gt;ldattach(8)&lt;&#x2F;a&gt; command on attach.
Note that we used &lt;code&gt;ttyU0&lt;&#x2F;code&gt; instead of &lt;code&gt;cuaU0&lt;&#x2F;code&gt; here because of a note in &lt;a href=&quot;https:&#x2F;&#x2F;man.openbsd.org&#x2F;ldattach.8&quot;&gt;ldattach(8)&lt;&#x2F;a&gt;.
(Both work, YMMV.)&lt;&#x2F;p&gt;
&lt;p&gt;Reboot and the &lt;code&gt;msts(4)&lt;&#x2F;code&gt; sensor should still exist. Yay!&lt;&#x2F;p&gt;
&lt;h3 id=&quot;step-4-ntp&quot;&gt;Step 4: NTP&lt;a class=&quot;zola-anchor&quot; href=&quot;#step-4-ntp&quot; aria-label=&quot;Anchor link for: step-4-ntp&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;Now that we have a persistent timedelta sensor, it&#x27;s time to configure &lt;a href=&quot;https:&#x2F;&#x2F;man.openbsd.org&#x2F;ntpd.8&quot;&gt;ntpd(8)&lt;&#x2F;a&gt;,
better known as &lt;code&gt;OpenNTPD&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-sh &quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# cat &#x2F;etc&#x2F;ntpd.conf
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# To get a baseline correct time, configure a few NTP server.
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;#server ptbtime1.ptb.de                # Stratum 1, PTB also provides the source for the DCF77 senders in Germany.
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;#server rustime01.rus.uni-stuttgart.de # Stratum 1 hosted by the uni stuttgart.
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;server&lt;&#x2F;span&gt;&lt;span&gt; 10.20.0.1                       &lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# Internal, synced to the above and more.
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;server&lt;&#x2F;span&gt;&lt;span&gt; time.cloudflare.com             &lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# Cloudflare&amp;#39;s time service. Pretty good latency, stratum 3. I use this as fallback.
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# We want to attach msts0 with the standard refid DCF, correct it with a known 1ms delay.
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# Given a weight of 2, this has higher priority than a single other clock. (which have weight 1)
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;sensor&lt;&#x2F;span&gt;&lt;span&gt; msts0 refid DCF correction 1000 weight 2
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# To get more safety that we are indeed not too far from the truth,
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# configure some constraints that certain services should always work.
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# *sigh*
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;constraint&lt;&#x2F;span&gt;&lt;span&gt; from &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;9.9.9.9&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;              &lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# quad9 v4 without DNS
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;constraint&lt;&#x2F;span&gt;&lt;span&gt; from &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;2620:fe::fe&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;          &lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# quad9 v6 without DNS
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;constraints&lt;&#x2F;span&gt;&lt;span&gt; from &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;www.google.com&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;      &lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# intentionally not 8.8.8.8
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# Now that we are certain we have decent time, lets share it.
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;listen&lt;&#x2F;span&gt;&lt;span&gt; on *                            &lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# Bind to all interfaces. Make sure you want this.
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# rcctl enable ntpd
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# rcctl start ntpd
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;ntpd&lt;&#x2F;span&gt;&lt;span&gt;(ok)
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;# # wait some time
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;step-5-profit&quot;&gt;Step 5: Profit&lt;a class=&quot;zola-anchor&quot; href=&quot;#step-5-profit&quot; aria-label=&quot;Anchor link for: step-5-profit&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;Now that you have waited a while, it&#x27;s time to check the results.&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;# ntpctl -s all
&lt;&#x2F;span&gt;&lt;span&gt;2&#x2F;2 peers valid, 1&#x2F;1 sensors valid, constraint offset -1s, clock synced, stratum 1
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;peer
&lt;&#x2F;span&gt;&lt;span&gt;   wt tl st  next  poll          offset       delay      jitter
&lt;&#x2F;span&gt;&lt;span&gt;162.159.200.1 time.cloudflare.com
&lt;&#x2F;span&gt;&lt;span&gt;    1 10  3  110s  766s         8.585ms    11.372ms     2.557ms
&lt;&#x2F;span&gt;&lt;span&gt;10.20.0.1
&lt;&#x2F;span&gt;&lt;span&gt;    1 10  2  383s  772s        13.309ms     5.773ms     8.913ms
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;sensor
&lt;&#x2F;span&gt;&lt;span&gt;   wt gd st  next  poll          offset  correction
&lt;&#x2F;span&gt;&lt;span&gt;msts0  DCF
&lt;&#x2F;span&gt;&lt;span&gt; *  2  1  0    8s   15s        -1.485ms     1.000ms
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Even though the clock is attached via a shoddy USB serial cable,
&lt;a href=&quot;https:&#x2F;&#x2F;man.openbsd.org&#x2F;ntpd.8&quot;&gt;ntpd(8)&lt;&#x2F;a&gt; seems to like it more than NTP servers. Yay!
With a real PCI&#x2F;PCIe serial port, the offset should be smaller as there
is a lot less jitter.&lt;&#x2F;p&gt;
&lt;p&gt;Whew.
Now you just need to point any NTP client to your box and.. &lt;em&gt;TADA&lt;&#x2F;em&gt;!&lt;&#x2F;p&gt;
&lt;h3 id=&quot;future&quot;&gt;Future&lt;a class=&quot;zola-anchor&quot; href=&quot;#future&quot; aria-label=&quot;Anchor link for: future&quot;&gt;§&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;There are a couple of ways to improve this setup.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Using a hardware serial port will result in better timekeeping,
as mentioned above.
Curiosity will probably get the best of me and I&#x27;ll build a latency testing setup.
Or maybe I&#x27;ll just graph drift with multiple devices attached to the same clock.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Adding another time source.
Whether it is another Meinberg clock or a &lt;a href=&quot;https:&#x2F;&#x2F;man.openbsd.org&#x2F;nmea.4&quot;&gt;nmea(4)&lt;&#x2F;a&gt;-compatible GNSS receiver, you will get a lot more reliable
time source if you have more than one.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Not using OpenBSD but Linux. Ouch! :(
This is because OpenBSD has &lt;a href=&quot;https:&#x2F;&#x2F;man.openbsd.org&#x2F;ntpd.8&quot;&gt;ntpd(8)&lt;&#x2F;a&gt; but not &lt;a href=&quot;https:&#x2F;&#x2F;chrony.tuxfamily.org&#x2F;index.html&quot;&gt;chrony&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;chrony.tuxfamily.org&#x2F;index.html&quot;&gt;chrony&lt;&#x2F;a&gt; lets you compensate local oscillator drift by using a temperature sensor.
It also has some improvements in the NTP protocol which improves accuracy.
Cloudflare runs it, seems to work well for them.&lt;&#x2F;p&gt;
&lt;p&gt;I wish someone would port it to OpenBSD and integrate the sensor framework.
Maybe I will.
Or I&#x27;ll attempt to make &lt;a href=&quot;https:&#x2F;&#x2F;man.openbsd.org&#x2F;ntpd.8&quot;&gt;ntpd(8)&lt;&#x2F;a&gt; do some of those tricks.
I&#x27;ve also been wondering if I can make this janky setup more reliable using software.&lt;&#x2F;p&gt;
&lt;p&gt;Seemingly all timedelta sensors update once every second, &lt;a href=&quot;https:&#x2F;&#x2F;man.openbsd.org&#x2F;ntpd.8&quot;&gt;ntpd(8)&lt;&#x2F;a&gt; polls every 15 seconds.
Maybe if I change it to poll every second and average more values, I&#x27;ll get a less jumpy clock offset.&lt;&#x2F;p&gt;
&lt;p&gt;We&#x27;ll see.&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
