<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Troubleshooting on 0x2142 | Networking Nonsense</title>
    <link>https://0x2142.com/tags/troubleshooting/</link>
    <description>Recent content in Troubleshooting on 0x2142 | Networking Nonsense</description>
    <image>
      <title>0x2142 | Networking Nonsense</title>
      <url>https://0x2142.com/logo.jpg</url>
      <link>https://0x2142.com/logo.jpg</link>
    </image>
    <generator>Hugo -- 0.143.1</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 04 Mar 2021 10:28:00 +0000</lastBuildDate>
    <atom:link href="https://0x2142.com/tags/troubleshooting/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Old Computer Fails to Discover SSID nor Connect to Home Network [Solved]</title>
      <link>https://0x2142.com/old-pc-wireless-failure/</link>
      <pubDate>Thu, 04 Mar 2021 10:28:00 +0000</pubDate>
      <guid>https://0x2142.com/old-pc-wireless-failure/</guid>
      <description>A new Comcast xFi Gateway caused issues with older wireless devices. Here&amp;rsquo;s how to troubleshoot</description>
      <content:encoded><![CDATA[<p><sup>The post below was contributed by guest author: <a href="https://twitter.com/NikkiMegaplaza">Nicole Henry</a></sup></p>
<hr>
<p>Hey folks.
So, we got a new <a href="https://www.xfinity.com/support/articles/broadband-gateways-userguides?ref=0x2142.com">Comcast xFi Gateway 3rd Generation</a> at my parent&rsquo;s house, and all the devices were able to discover our SSIDs &amp; connect to the internet at both 2.4Gz &amp; 5Ghz &hellip;<em>except</em> my personal computer. My personal computer was listing networks not associated with our house, yet it wasn&rsquo;t showing OUR networks. What gives?!</p>
<p><em>First off, System Information about my computer&hellip;</em></p>
<ul>
<li>OS: Windows 10 Home</li>
<li>Manufacturer &amp; Model: Dell Inspiron 5558</li>
<li>Wireless adapter: Intel(R) Dual Band Wireless-AC 3160</li>
<li>xFi Gateway models numbers: CGM4331COM or TG4482A</li>
</ul>
<p>Back to the goods&hellip;</p>
<p>I restarted my computer twice. Turned on &amp; off the wi-fi on my computer. Played around with  network settings on my computer. Still no luck.</p>
<p>So of course I headed to Twitter and asked for assistance. You can read the tweet and read the <a href="https://twitter.com/NikkiMegaplaza/status/1357775486622044165?ref=0x2142.com">replies here</a>. I got many different tips from people: update the wi-fi drivers, buy a USB Wi-fi Dongle, etc. But my friend Pat ( <a href="https://twitter.com/battle_nerd_1?ref=0x2142.com">@Battle_Nerd_1</a> ) messaged me and suggested that I look into what wi-fi standards  (802.11 b,a,g,n,ac) are associated with my wi-fi adapter.</p>
<p>Let’s walk through how to do that, why don’t we?</p>
<h2 id="1-look-at-the-advanced-properties-of-the-wifi-adapter-i-have-a-windows-10-device">1. Look at the Advanced properties of the wifi adapter. (I have a Windows 10 device)</h2>
<p>Go to <em>Start</em> -&gt; <em>Device Manager</em> -&gt; <em>Network Adapters</em> -&gt; Right click the adapter name -&gt; click <em>Properties</em> -&gt; then <em>Advanced</em></p>
<p><img alt="image" loading="lazy" src="https://lh3.googleusercontent.com/c8p5Mq8fJ_8HQ0qVN4HzFKLDa0cZnx9X5SHqXLmapvHLF225dBakkQNUFTdBegw4FTxnkfAVwS0TFiJyxMvdZA4_N_PkaLGE7M422b4OC2oa5dgbkbRv5A7DoMBBer9wSMZ3pfGe#center"></p>
<p>The Advanced network properties of the computer’s wi-fi adapter is what we need to review. Notice in the “Property” field; the wi-fi standard displays 802.1b/g for my computer. This is an important detail.</p>
<h2 id="2-compare--change-the-settings">2. Compare &amp; Change the settings</h2>
<p>(I use modem and router interchangeably. That’s probably not good practice, but oh well lol)</p>
<p>Login to your router (*** I’ll add instructions below how to do this) &amp; start clicking around until you find the Wi-fi Mode settings. Here’s the settings for our router at 2.4GHz.</p>
<p><img alt="image" loading="lazy" src="https://lh4.googleusercontent.com/UIzJonJKr3tKEt_MVHqES3D9EijSJlGYm2-GUhRvd93HzKCQz6wQ1e5mvtinoydqQPgr7GXbZefdlJcpNr4Zl6fxBW5k_W77b1ob2wiLTjMAhcbOfrST5RvxVNREekC-3__PybS3#center"></p>
<p>From the same page, here are the Mode options of our router:</p>
<p><img alt="image" loading="lazy" src="https://lh6.googleusercontent.com/ahIvGYY2f6-pxcI86hjH_NZ19LSoaQ4M8-dSb-qPt_SmkSIuwaU8kcA472GOsMQN5MhPjYMXAa06UQXK6QhC2Ga15-9StMt3OO_xrhFsEwN8HYgUcgCfXSbuO8sSjEhugrgyQGXQ#center"></p>
<h2 id="3-compare--change-the-settings">3. Compare &amp; Change the settings</h2>
<p>Remember, my wi-fi standard for my computer’s wi-fi adapter is 802.1b/g.
Initially the modem’s Wi-fi Mode was set to 802.11 g/n/ax, then Pat told me to change it to 802.11 g/n because the new ax isn’t supported by a lot of wireless drivers; it’s Wi-Fi 6. Once I changed the Mode to 802.11 g/n, IMMEDIATELY my computer recognized the 2.4GHz network and connected!! Yay Pat!!</p>
<h2 id="how-to-log-in-to-your-routermodem">How to Log in to your Router/Modem</h2>
<p>(These instructions are for Windows devices )</p>
<h3 id="1-find-your-gatewayroutermodems-ip-address">1. Find your Gateway/Router/Modem’s IP address</h3>
<ul>
<li>Go to Start and type cmd for Command Prompt.</li>
<li>Type ipconfig, then hit Enter</li>
<li>Scroll down until the Wi-fi section, &amp; take note of the default gateway IP address.</li>
<li>This number will most likely look like 10.x.x.x or 192.168.x.x</li>
</ul>
<p><img alt="image" loading="lazy" src="https://lh3.googleusercontent.com/HB9clf7oDj3HTMbeIm1LTwNuTnK4QaiKm38R4ZHoe0BXsPj81QlV7B2NymoBndynJpyWfTgHAGVI1ATo0Fau8wbZ2q7sAtvjml_zyunesY6sYhcVCWrMOLicUAbCWW8SHzOkgdZw#center"></p>
<h3 id="2-log-into-your-routermodem">2. Log into your Router/Modem</h3>
<p>Next open up a web browser and type in the aforementioned IP address, then hit Enter.</p>
<p><img alt="image" loading="lazy" src="https://lh5.googleusercontent.com/JH4fpN0nfcz4aZNtlCds4eue5sWDdUlvA4jOXmf5cFOsBAAwGzbgtDomZGEaQpkGtW489uFClGIo-I7QPenKoXCkLlLPDPosF79Px3PG4p1391NKX6H62s3OYiqnEwq4MitVcUil#center"></p>
<p>Once prompted for a Username and password; try Admin for username &amp; Password for password. Also, It’s good practice to change the default password, so definitely do that :)</p>
<p>So now you know how to find the IP address, log into, &amp; change the password of your Gateway/Router/Modem. Yay you! Now you can go back to Step 2 and learn how to view your Router/Modem’s wi-fi settings.</p>
<p>So thanks to my Twitter friend, Pat, for walking me through how to find info about my computer’s wi-fi adapter and how to change the modem/router’s wi-fi settings; also he saved me from having to spend money on a new computer! In the 5GHz Mode settings, there is no 802.11 b/g option, therefore my computer can only connect at the 2.4GHz frequency, which is not an issue for me. I can now connect to a home network &amp; have internet access on my personal computer.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Autonegotiation issues on Nexus QSFP Ports</title>
      <link>https://0x2142.com/autonegotiation-issues-on-nexus-qsfp-ports/</link>
      <pubDate>Tue, 20 Feb 2018 08:00:14 +0000</pubDate>
      <guid>https://0x2142.com/autonegotiation-issues-on-nexus-qsfp-ports/</guid>
      <description>Interoperability issues between Nexus QSFP modules can cause autonegotiation to fail</description>
      <content:encoded><![CDATA[<p>Over the past two years we have made a ton of progress shifting datacenter infrastructure from 1G to 10G+. A majority of this has been through a vendor migration back to Cisco for switching - and specifically using the Nexus 9372 line. These boxes come with 48 ports of 1G/10G SFP+ and another 6 QSFP ports that hit 40G.</p>
<p>Late last year we placed an order to expand our 10G+ coverage in one of our larger datacenters. After meeting with our local Cisco reps and talking through options, we settled on a pair of Nexus 93180YC-EX switches. The new toys offer additional flexibility, by providing 48 SFP+ ports capable of 1G/10G/25G and the 6 QSFP ports are 40/100G.</p>
<p>A week or two ago we worked during a planned maintenance window to try and bring the new 93180s online. The new switches are just directly connected back to the 9372s using four QSFP-40G-CR4 cables. The time comes, we turn up the ports - and they don&rsquo;t come up. We know the cable types definitely work, since we&rsquo;re using them for all of our current interconnects between the 9372s. Unfortunately, due to tight timelines on <a href="/how-does-maintenance-scheduling-affect-your-network/">maintenance windows</a> - we have to turn down the ports and move on to other task.</p>
<p>So we go down the normal line of troubleshooting. Reseat cables - still nothing. Remove port-channel/VPC configurations - nothing. Test the QSFP cables by cabling in between just the new 93180s - yeah, ports come up and the cables are good. One of my teammates, who is running with this task, is almost at the point of opening up a support case with TAC. I double checked the switch port configurations - but everything looks good. My first thought was that maybe there is a speed/autonegotiation issue - since the QSFP ports on the 9372s are fixed 40G, while the 93180s are 40/100G.</p>
<p>We scheduled another quick no-downtime maintenance window to test out the theory. Each of the ports on both sides of the connection gets the following configuration changes:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Switch(config)# interface x/x
</span></span><span class="line"><span class="cl">Switch(config-if)# no negotiate auto
</span></span><span class="line"><span class="cl">Switch(config-if)# duplex full
</span></span><span class="line"><span class="cl">Switch(config-if)# speed 40000
</span></span></code></pre></div><p>The time comes - and sure enough the ports come online.</p>
<hr>
<p>Just wanted to throw this out there in case anyone else runs across the same problem. The fix is surely easy enough, but you don&rsquo;t always think of autonegotiation issues - especially in such a simplistic configuration as this.</p>
<p>I also wanted to say thanks to the great people in the <a href="https://communities.cisco.com/groups/cisco-champions">#CiscoChampions</a> DataCenter group. I was able to run the problem through them, and they suggested the same potential root cause. It&rsquo;s always great to have a second opinion to provide some confidence, especially when there are strict time constraints for maintenance.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Devil in the Defaults</title>
      <link>https://0x2142.com/devil-in-the-defaults/</link>
      <pubDate>Tue, 03 Oct 2017 08:00:28 +0000</pubDate>
      <guid>https://0x2142.com/devil-in-the-defaults/</guid>
      <description>It&amp;rsquo;s always the simple details that come back to haunt us&amp;hellip;</description>
      <content:encoded><![CDATA[<p>Default settings are the worst. Every systems has them, and they&rsquo;re great until they&rsquo;re not.
For whatever reasons in the past, my predecessors decided to purchase a bunch of bare-bones HP servers and install Check Point&rsquo;s firewall software on them. The HP servers were significantly cheaper than buying Check Point&rsquo;s branded appliances, but unfortunately they come with a different set of risks. For example, you have to work on estimating max throughput yourself, rather than knowing exactly what the appliance is rated for.</p>
<p>Over the past few weeks, we have been lightly troubleshooting an issue between a VMware vCenter server and the ESX hosts that it manages. ESX hosts were randomly showing up as disconnected for a brief moment, then would reconnect. It was nothing extremely impacting, but a mild annoyance for the server guys. A couple of people on my team had taken a quick look on the network side, and turned up empty handed. Due to some upcoming maintenance work the server team needed to perform, I was asked to spend some time trying to isolate the root cause of this issue.</p>
<p>First thing was digging through the logs from the two different sets of firewalls between these systems. The first firewall set showed that traffic was passing normally as I would expect. However, I started seeing some unexpected logs for the second firewall set, a CheckPoint cluster. The logs showed that vCenter was opening connections out to the ESX hosts for a short while, then the CheckPoint would log a &ldquo;TCP Packet out of state&rdquo; error.  The details of this log would show that vCenter sent a non-SYN packet to the ESX host (usually a PSH ACK).</p>
<p>Seeing an error like that indicates that something is killing the TCP connection before vCenter is finished using it. vCenter still believes that the connection is open, which is why it sends packets with incorrect flags. Since we were already aware that this particular CheckPoint cluster has some issues, we began examining this cluster first. Sure enough, the IPS logs on the device showed that the cluster was often reaching &gt;80% of it&rsquo;s maximum concurrent connections and then enabling the &ldquo;Aggressive Aging&rdquo; feature.</p>
<p>Aggressive Aging is a CheckPoint protection which prevents the cluster from running out of memory and potentially crashing. By default, this is set to take effect whenever the cluster exceeds 80% of it&rsquo;s available memory or concurrent connections. This protection will continue to be enabled until the cluster drops below another threshold, which is below 78% by default. Seems like a helpful feature to have, right? Yeah - but there are some considerations with how this protection works. When Aggressive Aging is activated, the cluster significantly reduces all of the normal TCP timeout values. For example, <a href="https://sc1.checkpoint.com/documents/R76/CP_R76_IPS_AdminGuide/12857.htm#o12861">CheckPoint&rsquo;s documentation</a> shows that new TCP sessions are given only 5 seconds to establish, instead of the normal 25 seconds. This also changes how long a TCP session can be open from 1 hour to 10 minutes. In order to help drop below the 78% threshold, Aggressive Aging will evaluate and terminate 10 connections for <em>every individual new connection</em> that is established.</p>
<p>As I stated previously, this cluster was already pretty busy - often hitting CPU limits mostly. However, through the brief research I completed, it looks like increasing the concurrent connections table mostly affects RAM utilization more than anything else. This system has over 20G of RAM and is typically only using around 4GB. I was still concerned that an increase in total concurrent connections could mean more CPU usage, because that means more connections for the IPS to process. Unfortunately, CheckPoint has no publicly available utilities to help calculate what to set your max concurrent connection limit to. In fact, when I opened a support ticket with them, I was told to &ldquo;just keep increasing it, until you hit a point where the cluster is no longer triggering Aggressive Aging. Then add about 10-20k above that to set the new maximum concurrent connection limit&rdquo;. That&rsquo;s not really an acceptable answer to me, but I wasn&rsquo;t able to get anything more out of them.</p>
<p>So in order to change the maximum concurrent connections (Using R77.xx), you need to open SmartDashboard and open the cluster object. Then find <strong>Optimizations</strong> in the left-hand menu. Here you can set a new manually-defined limit, or allow the cluster to automatically scale the maximum connections. If this cluster was significantly less busy, I might be tempted to enable the automatic limit for a bit and try to get a baseline. However, I would rather not open myself up to the chance of crashing the cluster - so I manually increased the limit from 25,000 to 50,000. Install the policy for the configuration to take effect. You can see the current concurrent connections by either looking at the <strong>Overview</strong> page in SmartDashboard, or logging into the cluster CLI and using the <strong>cpview</strong> utility.</p>
<p>In my case - the new connections almost immediately started ramping up to ~35,000. Within a day we started encountering the Aggressive Aging protection again, but it was happening significantly less often than before. This also resolved our ESX host disconnection problem, which proved my theory that the Aggressive Aging feature was causing our problem. I&rsquo;ve been slowly monitoring and increasing the concurrent connections limit since, and I think we have finally stabilized around 90,000. Just think of how many connections were denied or terminated early because this limit was in place!</p>
<p>Moral of the story here: Understand the systems that you own. This firewall cluster had been in place years before I was hired, and all of the settings were left at their defaults. Default settings probably work for most cases, but they also come with their own problems. This setting had likely been the cause of multiple problems in the past, however no one truly understood they system enough to find out what was happening.
Ever have a scenario where a default setting caused problems? Share it in the comments!</p>
]]></content:encoded>
    </item>
    <item>
      <title>SRX High CPU: httpd</title>
      <link>https://0x2142.com/srx-httpd-high-cpu/</link>
      <pubDate>Tue, 05 Sep 2017 08:00:12 +0000</pubDate>
      <guid>https://0x2142.com/srx-httpd-high-cpu/</guid>
      <description>How to manage stuck httpd sessions that are causing 100% CPU utilization</description>
      <content:encoded><![CDATA[<p>Over the past few years of my Juniper SRX adventures, I&rsquo;ve run into a few cases where the Routing Engine (RE) CPU is pegged at 100%. From what I&rsquo;ve seen so far, this is typically one of three causes: high traffic (spike in IPS inspection), logging using event mode, or a stuck web management session.</p>
<p>In a few occasional cases, the CPU issue doesn&rsquo;t resolve itself and someone needs to manually investigate the cause. Luckily, the httpd issue is pretty easy to spot and fix - so I wanted to cover that briefly today. This issue can crop up randomly after someone uses the JWeb GUI to administer an SRX firewall. You could avoid this issue entirely by disabling the web interface entirely - but that&rsquo;s not always possible.</p>
<p>So the first thing we want to do is log into our SRX firewall and check the current CPU utilization for our RE processor:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">{primary:node0}
</span></span><span class="line"><span class="cl">root@test-srx&gt; show chassis routing-engine node 0 
</span></span><span class="line"><span class="cl">node0:
</span></span><span class="line"><span class="cl">--------------------------------------------------------------------------
</span></span><span class="line"><span class="cl">Routing Engine status:
</span></span><span class="line"><span class="cl">    Temperature                  41 degrees C / 105 degrees F
</span></span><span class="line"><span class="cl">    CPU temperature              70 degrees C / 158 degrees F
</span></span><span class="line"><span class="cl">    Total memory               4096 MB Max 1556 MB used ( 38 percent)
</span></span><span class="line"><span class="cl">      Control plane memory     2976 MB Max 804 MB used ( 27 percent)
</span></span><span class="line"><span class="cl">      Data plane memory        1120 MB Max 773 MB used ( 69 percent)
</span></span><span class="line"><span class="cl">    5 sec CPU utilization:
</span></span><span class="line"><span class="cl">      User                       41 percent
</span></span><span class="line"><span class="cl">      Background                  0 percent
</span></span><span class="line"><span class="cl">      Kernel                     59 percent
</span></span><span class="line"><span class="cl">      Interrupt                   0 percent
</span></span><span class="line"><span class="cl">      Idle                        0 percent
</span></span><span class="line"><span class="cl">    Model                           RE-SRX345
</span></span><span class="line"><span class="cl">    Serial ID                       XX1000XX0002
</span></span><span class="line"><span class="cl">    Start time                      2016-09-01 02:49:50 UTC
</span></span><span class="line"><span class="cl">    Uptime                          351 days, 13 hours, 28 minutes, 47 seconds
</span></span><span class="line"><span class="cl">    Last reboot reason              0x1:power cycle/failure
</span></span><span class="line"><span class="cl">    Load averages:                  1 minute   5 minute   15 minute
</span></span><span class="line"><span class="cl">                                        1.29       1.27        1.10
</span></span></code></pre></div><p>So we can see that over the past 5 seconds, there is 0% idle CPU - It&rsquo;s all split between User and Kernel. Some higher-end SRX models will also show utilization for 1 minute, 5 minutes, and 15 minutes.</p>
<p>Next, we want to confirm which process is consuming that CPU:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">{primary:node0}
</span></span><span class="line"><span class="cl">root@test-srx&gt; show system processes extensive node 0
</span></span><span class="line"><span class="cl">node0:
</span></span><span class="line"><span class="cl">--------------------------------------------------------------------------
</span></span><span class="line"><span class="cl">last pid: 25330;  load averages:  1.16,  1.24,  1.10  up 351+13:29:51    16:19:11
</span></span><span class="line"><span class="cl">165 processes: 21 running, 132 sleeping, 12 waiting
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Mem: 354M Active, 191M Inact, 1253M Wired, 585M Cache, 112M Buf, 1595M Free
</span></span><span class="line"><span class="cl">Swap:
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  PID USERNAME     THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU COMMAND
</span></span><span class="line"><span class="cl">1635 root           7  76    0  1192M   113M RUN    0    ??? 281.93% flowd_octeon_hm
</span></span><span class="line"><span class="cl">14607 nobody         3  76    0 14848K  6308K ucondt 0  25:03 83.45% httpd
</span></span><span class="line"><span class="cl">   21 root           1 171   52     0K    16K RUN    0 6952.9  0.00% idle: cpu0
</span></span><span class="line"><span class="cl"> 1679 root           1  76    0 48580K 24476K select 0  90.2H  0.00% mib2d
</span></span><span class="line"><span class="cl"> 1715 root           1  76    0 35264K 19520K select 0  49.0H  0.00% snmpd
</span></span><span class="line"><span class="cl">   23 root           1 -20 -139     0K    16K RUN    0  29.9H  0.00% swi7: clock
</span></span><span class="line"><span class="cl"> 1681 root           1   4    0   101M 68284K kqread 0  28.0H  0.00% rpd
</span></span><span class="line"><span class="cl">   22 root           1 -40 -159     0K    16K WAIT   0  26.0H  0.00% swi2: netisr 0
</span></span><span class="line"><span class="cl">  &lt;-- Output Truncated --&gt;
</span></span></code></pre></div><p>In this case it&rsquo;s pretty clear that httpd is the top offender for CPU usage. You might also notice the process named &lsquo;flowd_octeon_hm&rsquo;. This is part of the firewall processes, so don&rsquo;t be surprised if this process is also one of the top. It&rsquo;s pretty normal for this process to show &gt;100% CPU, so this is safe to ignore. If you see eventd as a top consumer, then you might have your logging configured to use event mode rather than stream mode - which I&rsquo;ll cover in another post.</p>
<p>So how do we fix the httpd problem? Reboot the SRX? Well, yeah that would probably fix it - but there is an easier way:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">{primary:node0}
</span></span><span class="line"><span class="cl">root@test-srx&gt; restart web-management
</span></span><span class="line"><span class="cl">Web management gatekeeper process started, pid 25343
</span></span></code></pre></div><p>One quick command and we&rsquo;ve restarted all of the web management processes, including httpd. So now you&rsquo;ll want to give the SRX a few seconds to recover itself - then run the <em>show system processes extensive</em>command again:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">{primary:node0}
</span></span><span class="line"><span class="cl">root@test-srx&gt; show chassis routing-engine node 0
</span></span><span class="line"><span class="cl">node0:
</span></span><span class="line"><span class="cl">--------------------------------------------------------------------------
</span></span><span class="line"><span class="cl">Routing Engine status:
</span></span><span class="line"><span class="cl">    Temperature                 41 degrees C / 105 degrees F
</span></span><span class="line"><span class="cl">    CPU temperature             69 degrees C / 156 degrees F
</span></span><span class="line"><span class="cl">    Total memory              4096 MB Max  1556 MB used ( 38 percent)
</span></span><span class="line"><span class="cl">      Control plane memory    2976 MB Max   804 MB used ( 27 percent)
</span></span><span class="line"><span class="cl">      Data plane memory       1120 MB Max   773 MB used ( 69 percent)
</span></span><span class="line"><span class="cl">    5 sec CPU utilization:
</span></span><span class="line"><span class="cl">      User                       6 percent
</span></span><span class="line"><span class="cl">      Background                 0 percent
</span></span><span class="line"><span class="cl">      Kernel                     3 percent
</span></span><span class="line"><span class="cl">      Interrupt                  0 percent
</span></span><span class="line"><span class="cl">      Idle                      91 percent
</span></span><span class="line"><span class="cl">    Model                          RE-SRX345
</span></span><span class="line"><span class="cl">    Serial ID                      XX1000XX0002
</span></span><span class="line"><span class="cl">    Start time                     2016-09-01 02:49:50 UTC
</span></span><span class="line"><span class="cl">    Uptime                         351 days, 13 hours, 32 minutes, 52 seconds
</span></span><span class="line"><span class="cl">    Last reboot reason             0x1:power cycle/failure
</span></span><span class="line"><span class="cl">    Load averages:                 1 minute   5 minute  15 minute
</span></span><span class="line"><span class="cl">                                       0.35       0.99       1.04
</span></span></code></pre></div><p>Looks much better, with 91% idle CPU!</p>
<p>Even though this issue can be annoying, its a quick fix - I recommend that you perform some sort of CPU monitoring/alerting on your SRX clusters (I use <a href="http://www.observium.org">Observium</a> for this). This will help to identify the issue quickly and then get it resolved quickly. If this issue is left unchecked, it can sometimes cause some latency and performance issues.</p>
<p>Hope this helps!</p>
]]></content:encoded>
    </item>
    <item>
      <title>Odd Behavior of Protected Switchports</title>
      <link>https://0x2142.com/odd-behavior-of-protected-switchports/</link>
      <pubDate>Tue, 22 Aug 2017 08:00:29 +0000</pubDate>
      <guid>https://0x2142.com/odd-behavior-of-protected-switchports/</guid>
      <description>Some thoughts on an interesting issue I ran into with older Cisco switches &amp;amp; protected port configuration</description>
      <content:encoded><![CDATA[<p>I ran into an interesting issue recently, which was caused by use of the <code>switchport protected</code> command.
So I use a pair of Cisco 2960-8TC-L switches at home, for both my home network and lab. A few months back I ran a bunch of ethernet cabling within my house, which all terminated in a patch panel in the basement. I was able to migrate/consolidate enough of my ports so that I could dedicate one of the 2960s to the patch panel. I had eight ports on my switch, and eight ethernet drops in my house - one of which ran back to my lab network for internet.</p>
<p>Usually when I configure something like this, I want to try and take security into consideration as much as possible. I have a Synology NAS on my home network, which contains enough of my personal backups that I would want to keep this inaccessible from a typical house-guest. So by default, I made the following configuration standards on the ports connected to my patch panel:</p>
<ul>
<li>Any unconnected ports were added to my guest VLAN (which only has internet access)</li>
<li>Any ports that needed to be in my home VLAN were configured with port security, sticky MAC, and maximum 1 MAC allowed</li>
<li>All ports were configured as <code>switchport protected</code> (except the uplink)</li>
</ul>
<p>The concept of protected switchports should be fairly simple: Any port configured with <code>switchport protected</code> is not permitted to communicate with any other port configured with <code>switchport protected</code>. A protected switchport is only permitted to communicate with a non-protected port (in this case, my uplink/trunk to my other 2960). I added this mostly as a safeguard against a potentially malicious house-guest.</p>
<p>However, once I actually began to use my patch panel ports, I began to experience a very interesting issue. For example, I purchased a home security camera which by default used a wireless connection. The location of the camera unfortunately made the wifi connection a bit more unreliable than I would like for a security camera. So I went ahead and ran a cable to the nearest ethernet drop.</p>
<p>The IP camera uses my Synology NAS as a backend storage for any recordings. It was able to connect and stream video on the wireless connection, but the video was choppy. Once I plugged in the ethernet cable the connection actually got worse than it already was. From my Synology - the camera would become unresponsive for a while, then you could reach it again for a few moments, then back to unresponsive (about 60-70% packet loss). If I disabled the wireless NIC entirely, the camera would be completely unresponsive. However, this whole time I was able to reach the camera with no issues from my laptop which was connected via wireless (my AP uses the same switch as the Synology).</p>
<p>The NAS is connected to the 2960 in my lab, which is connected to the patch-panel-2960 via a single trunk port. From the Synology, I could still see ARP entries for my wired camera - I just couldn&rsquo;t reach it via ping or http. I spent a good hour or two trying a number of things: clearing ARP entries, double checking my trunk port configs, and I also upgraded the firmware on the IP camera. Nothing seemed to work. It made even less sense that anything else connected to the Synology-side switch could hit the camera with no problems.</p>
<p>It&rsquo;s worth noting that no ports on the Synology-side 2960 were configured with <em>switchport protected</em> - only the ports on the patch panel side. So I finally tried removing the <code>switchport protected</code> command off of the IP camera port - and magically it all started working.</p>
<p>The protected switchport config worked exactly as I would have expected for traffic between ports on the same switch - however, it seemed to act against what I would have expected once it crossed a trunk to another switch. It was especially odd that it only seemed to crop up between the Synology and the IP camera.
Oh well, I guess the only way you really learn something is by breaking it, right? I hope this might help someone who finds themselves in a similar situation.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Tracking Latency and Packet Loss with SmokePing</title>
      <link>https://0x2142.com/tracking-latency-and-packet-loss-with-smokeping/</link>
      <pubDate>Tue, 25 Apr 2017 08:53:04 +0000</pubDate>
      <guid>https://0x2142.com/tracking-latency-and-packet-loss-with-smokeping/</guid>
      <description>Why should you use SmokePing - and a quick look at how to interpret the graphs it generates</description>
      <content:encoded><![CDATA[<p>&ldquo;The network is slow&rdquo; - Sound like something you&rsquo;ve heard before? What does &lsquo;slow&rsquo; mean anyway? And is it different from yesterday? Sometimes tracking down network &lsquo;slowness&rsquo; can be pretty difficult, especially when you don&rsquo;t have a good baseline of what is normal. This kind of goes back to one of the tips I shared earlier in &lsquo;<a href="/a-little-bit-of-magic/">A Little Bit of Magic</a>&rsquo; - having a baseline and understanding of what is normal on your network will help you find issues much more quickly.</p>
<p>When I started working for a cloud service provider a few years ago, the first thing to start coming up extremely often is network latency and performance issues. These are things I never had to worry too much about previously, as most of my jobs had been with enterprise environments where everyone is on the same LAN (or at least within one state). However, when you get into hosting a Software-as-a-Service cloud on a global scale, then slight performance issues begin to mean big slowdowns for your customers.</p>
<p>I was amazed at the current network infrastructure monitoring that was in place when I began working for the SaaS provider:  A few bare-bones Cacti instances, completely unmanaged by anyone, and not configured to monitor any relevant ports or data. Today that situation is vastly different - I have installed a few different applications that allow us to get alerted on network variances and quickly determine exactly where the issue is. One of the tools that has helped us get to this point is called <a href="http://oss.oetiker.ch/smokeping/">SmokePing</a>, which I would like to talk about today.</p>
<h2 id="setup-and-installation">Setup and Installation</h2>
<p>I won&rsquo;t get into the details of installing SmokePing, as there are already a number of good tutorials out there (like <a href="http://pingpros.com/linux-network-tools/centos/6-x/installing-smokeping-on-centos/">this one</a> or <a href="http://www.wedebugyou.com/2012/11/how-to-install-and-configure-smokeping-on-centos-6">this one</a>). If you have a decent familiarity with Linux, then the process should be fairly straightforward. Keep in mind that your SmokePing graphs will show latency and packet loss between the machine you have SmokePing installed on and the targets you define. So make sure that you plan out where you deploy your SmokePing machine(s) to provide beneficial information.</p>
<p>Once you have SmokePing installed and setup, it&rsquo;s time to start defining targets to monitor. We have over a dozen points of presence globally, so I&rsquo;ve installed SmokePing on a single machine in each location. Each instance has ping targets defined for every network segment within it&rsquo;s own datacenter, network segments in every other datacenter, and some public IP space of every datacenter. So we accomplish latency and packet loss monitoring within the datacenter, across the site-to-site VPNs between each datacenter, and the general internet connections between each datacenter. For certain customers, particularly those who have dedicated MPLS circuits to us, we are also monitoring latency/packet loss to customer endpoints.</p>
<p>SmokePing also supports deployment in a controller/worker configuration, where you have a single primary configuration/management point and several workers to perform testing. I really want to test this out for our environment, but I haven&rsquo;t quite had the time to dedicate to it. If you&rsquo;re interested though, you can find the details on that <a href="http://oss.oetiker.ch/smokeping/doc/smokeping_master_slave.en.html">here</a>.</p>
<h2 id="interpreting-the-graphs">Interpreting the graphs</h2>
<p>The graphs created by Smokeping might not seem clear the first time you see them. For example, take a look at this:</p>
<p><img alt="image" loading="lazy" src="/content/images/2017/04/smokeping-ex1.png#center"></p>
<p>This graph is the result of a standard latency test - 20 pings every 5 minutes. So for every step on the graph, SmokePing draws out the range of responses in those 20 pings - shown by the gray &lsquo;smoke&rsquo;. The darker the gray area, the more pings came back with that response time - and similarly the lighter areas mean that fewer pings had that response time. The solid colored part of the line marks the average response across all 20 pings, and also gives an indication of percentage of packets lost.</p>
<p>So the first thing I would notice about this graph is that the average response time is varying quite significantly between about 15ms and 200ms. In a normal healthy network, you should not expect to see such a drastic change in response times like that - some variation is normal, but not to this extreme. Two other things to note from this graph: The time of each latency jump seems to line up almost every 30 minutes, and towards the end we begin seeing some slight packet loss.</p>
<p>After being informed that there was a performance issue between a few different systems, I opened up SmokePing immediately to start looking for anything that jumped out - like the graph above. In this case, this was a 200Mb dedicated MPLS circuit used only for replication traffic between data centers. Every 30 minutes, a replication job was kicking off and saturating the line for a few minutes - which in turn was causing excessive jumps in latency and some minor packet loss.</p>
<p>As another example:</p>
<p><img alt="image" loading="lazy" src="/content/images/2017/04/smokeping-ex2.png#center"></p>
<p>The first thing you probably notice about the graph above is the sudden stabilization of latency. This graph monitors traffic between two data centers over an IPsec VPN tunnel - and we happened to be suspecting that one of the two peer firewalls was having performance issues. We swapped out to new hardware on one side of the connection, and the latency immediately started flat-lining. A consistent 85ms is way better than averaging anywhere from 90-180ms. (And if you happened to notice the slight packet loss after the new device was implemented - that was actually due to an unrelated upstream provider issue). My point with this graph is really just to show how helpful it is to have the historical data available. It would have been extremely difficult to prove that  the one firewall was the root cause of our problems if I didn&rsquo;t have a way to track the issue.</p>
<hr>
<p>So that&rsquo;s a bit about SmokePing and how I&rsquo;ve deployed it within a cloud provider&rsquo;s environment. It&rsquo;s only been up and running for a few months, but I&rsquo;ve already found it to be extremely helpful in troubleshooting performance and latency issues. SmokePing is also extensible via scripting, which can help to collect additional data at the time of an issue. I&rsquo;ve written a few quick scripts to run extended traceroutes during packet loss events, which I might post up here in the future.</p>
<p>Have you installed SmokePing in your environment? How do you use it? Has it helped you with performance issues?</p>
<p>Comment below!</p>
]]></content:encoded>
    </item>
    <item>
      <title>Juniper SRX VPN Issues</title>
      <link>https://0x2142.com/post/2017/juniper-srx-vpn-issues/</link>
      <pubDate>Tue, 18 Apr 2017 08:00:02 +0000</pubDate>
      <guid>https://0x2142.com/post/2017/juniper-srx-vpn-issues/</guid>
      <description>After running IPSec VPNs on Juniper SRX for years, this post explores some of the common issues I&amp;rsquo;ve run into</description>
      <content:encoded><![CDATA[<p>Last year we began migrating from our old Juniper SSG firewalls to the new SRX line. After a few months, I&rsquo;ve honestly really started to enjoy working with them - so much that we&rsquo;ve decided to start standardizing our firewall platforms by ditching everything else. So far I&rsquo;ve had the opportunity to install ten SRX 1500s, six SRX 345s, and one SRX 340. Some have been completely new installs for a new location and some have been migrations from other devices. But while most of the process has been surprisingly smooth - there is one thing that keeps coming back up: VPN issues. (Oh, and the fact that pre-15.1X49-D60 doesn&rsquo;t support In-service-upgrades - but don&rsquo;t get me started on that one&hellip;)</p>
<p>We run multiple locations around the world, and unfortunately have to keep full mesh VPN connectivity due to the way our systems have been deployed. Today each SRX cluster has around 15 different VPN peers, which are made up of other SRXs, older SSGs, CheckPoint firewalls, Cisco ASAs, and Watchguard firewalls. This is still an on-going process - but I wanted to throw out some of the issues I&rsquo;ve run into so far, and what I&rsquo;ve been able to do to fix them or work around them..</p>
<h2 id="issue-1---vpn-is-up-but-no-traffic-is-flowing-across-it">Issue #1 - VPN is up, but no traffic is flowing across it</h2>
<p>This one initially took me a minute to figure out. All of our tunnels are route-based, using secure tunnel interfaces. So each VPN is configured with a <code>set security ipsec vpn vpn_name bind-interface st0.x</code> command. I had a set of VPN tunnels between two locations that were not passing traffic, even though a <code>show security ipsec sa</code> showed the tunnels as established. For reference, here is what the config looked like:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">root@SRX-SITE-A&gt; show configuration security ike
</span></span><span class="line"><span class="cl">respond-bad-spi 1;
</span></span><span class="line"><span class="cl">proposal ike-aes256 {
</span></span><span class="line"><span class="cl"> authentication-method pre-shared-keys;
</span></span><span class="line"><span class="cl"> dh-group group2;
</span></span><span class="line"><span class="cl"> authentication-algorithm sha-256;
</span></span><span class="line"><span class="cl"> encryption-algorithm aes-256-cbc;
</span></span><span class="line"><span class="cl"> lifetime-seconds 28800;
</span></span><span class="line"><span class="cl">}
</span></span><span class="line"><span class="cl">policy ikepolAES256 {
</span></span><span class="line"><span class="cl"> mode main;
</span></span><span class="line"><span class="cl"> proposals ike-aes256;
</span></span><span class="line"><span class="cl"> pre-shared-key ascii-text xxxxxxxxx; ## SECRET-DATA
</span></span><span class="line"><span class="cl">}
</span></span><span class="line"><span class="cl">gateway gateway-siteB {
</span></span><span class="line"><span class="cl"> ike-policy ikepolAES256;
</span></span><span class="line"><span class="cl"> address XXX.XXX.XXX.XXX;
</span></span><span class="line"><span class="cl"> no-nat-traversal;
</span></span><span class="line"><span class="cl"> external-interface reth0.0;
</span></span><span class="line"><span class="cl">}
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">root@SRX-SITE-A&gt; show configuration security ipsec
</span></span><span class="line"><span class="cl">proposal ipsec-aes256 {
</span></span><span class="line"><span class="cl"> protocol esp;
</span></span><span class="line"><span class="cl"> authentication-algorithm hmac-sha1-96;
</span></span><span class="line"><span class="cl"> encryption-algorithm aes-256-cbc;
</span></span><span class="line"><span class="cl"> lifetime-seconds 28800;
</span></span><span class="line"><span class="cl">}
</span></span><span class="line"><span class="cl">policy ipsecpolAES256 {
</span></span><span class="line"><span class="cl"> perfect-forward-secrecy {
</span></span><span class="line"><span class="cl"> keys group2;
</span></span><span class="line"><span class="cl"> }
</span></span><span class="line"><span class="cl"> proposals ipsec-aes256;
</span></span><span class="line"><span class="cl">}
</span></span><span class="line"><span class="cl">vpn vpn-to-SITE-B {
</span></span><span class="line"><span class="cl"> bind-interface st0.1;
</span></span><span class="line"><span class="cl"> df-bit clear;
</span></span><span class="line"><span class="cl"> ike {
</span></span><span class="line"><span class="cl"> gateway gateway-siteB;
</span></span><span class="line"><span class="cl"> ipsec-policy ipsecpolAES256;
</span></span><span class="line"><span class="cl"> }
</span></span><span class="line"><span class="cl"> establish-tunnels immediately;
</span></span><span class="line"><span class="cl">}
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">root@SRX-SITE-A&gt; show configuration interfaces st0
</span></span><span class="line"><span class="cl">unit 1 {
</span></span><span class="line"><span class="cl"> description vpn-to-SITE-B;
</span></span><span class="line"><span class="cl">}
</span></span></code></pre></div><p>The config on both sides practically matched, but there was one thing missing that was preventing the tunnel from passing traffic. Under the st0 configuration, unit 1 (or whichever tunnel interface you might be using) needs to have <code>family inet</code> configured. Even though I&rsquo;m using an unnumbered tunnel interface, this command still needs to exist to tell the SRX that the interface is used for IPv4 traffic. Quick fix, but it&rsquo;s easy to miss.</p>
<h2 id="issue-2---vpn-drops-every-2-4-hours-and-doesnt-re-establish-for-another-2-4-hours-or-manual-sa-clearing">Issue #2 - VPN drops every 2-4 hours and doesn&rsquo;t re-establish for another 2-4 hours (or manual SA clearing)</h2>
<p>The original SRXs that I installed were running JunOS 15.1X49-D40.6. I had at least half a dozen of these devices interconnected with full mesh VPNs, and experienced no issues. However, when I picked up a new set of SRX 1500s a few months back, Juniper had just released 15.1X49-D70.3 - so I upgraded before these were put into production. Strangely enough, when I began migrating tunnels to the new cluster we started to see the VPNs to remote SRXs drop sporadically. The first remote sites to migrate were less of a priority to keep connectivity established, so I took this opportunity to spend a little time figuring out what was going on.</p>
<p>The initial issue seemed to be that the VPNs would establish, but only for about 2-4 hours. Then they would drop and not re-establish for 2-4 hours. This seemed a bit weird to me, because the re-key interval was set for 8 hours - which means that re-key wasn&rsquo;t playing into this. Even more weird, whenever the issue occurred - one of the two SRX clusters would always still show the IPSec tunnel as up, while the peer SRX would just keep logging errors about bad SPIs. Clear the stale IPSec security association, and the tunnels re-establish immediately.</p>
<p>In order to resolve this, I had to configure both Dead-Peer-Detection and Juniper&rsquo;s VPN monitoring on both sides of the connection - so that each SRX would more actively monitor the tunnel status. <a href="https://www.juniper.net/documentation/en_US/junos/topics/concept/ipsec-dead-peer-detection-understanding.html">Juniper&rsquo;s documentation</a> states that they enable DPD by default, but in an &lsquo;optimized&rsquo; method which only sends a DPD R-U-THERE message under certain conditions. I had to change this to force the SRX to send the DPD messages at regular intervals. Here are the changes I made to fix the issues:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">root@SRX-SITE-A# set security ike gateway gateway-SITE-B dead-peer-detection always-send
</span></span><span class="line"><span class="cl">root@SRX-SITE-A# set security ipsec vpn vpn-SITE-B vpn-monitor optimized
</span></span></code></pre></div><p>After these changes were in place, I stopped experiencing the issue. Again, these had to be implemented on BOTH sides of the connection. These weren&rsquo;t necessary on the tunnels in-between the SRX clusters on the older firmware version - so there may be some sort of bug between those and the newer firmware.</p>
<h2 id="issue-3---vpn-between-srx-and-checkpoint-duplicates-ipsec-sa-on-re-key-sometimes-causes-tunnel-to-stop-passing-traffic">Issue #3 - VPN between SRX and CheckPoint duplicates IPSec SA on re-key (sometimes causes tunnel to stop passing traffic)</h2>
<p>This issue was a complete mess - mostly because of the effort involved in trying to coordinate two separate vendors to work on an issue. New SRX clusters (on 15.1X49D40.6 at the time) had been deployed and all of them had to connect back into our existing CheckPoint locations via IPsec tunnels. All was great, until about two weeks after installation we started seeing some weird tunnel drops. After some troubleshooting on my end, I discovered that watching what happened during the regularly scheduled re-key interval was helpful to see what was going on. Right at the eight hour re-key, the tunnels would try to re-establish but couldn&rsquo;t - and sometimes this led to uni-directional traffic flows across the VPN.</p>
<p>The SRX tries to start a soft reset process prior to the re-key interval, so that it can gracefully migrate traffic to the new SPIs. However, something was happening that was causing the SRX to never terminate the old SPIs - so after a while the SRX would try to begin the soft reset process and fail because it had already reached its maximum SPIs for a given peer. Once the re-key interval was reached, the SRX would initiate the hard reset process on the tunnel. The CheckPoint side typically wouldn&rsquo;t notice that anything was going on, and would keep sending traffic down the bad (expired) SPIs. A quick <code>clear security ipsec sa</code> and <code>clear security ike sa</code> would bring the tunnels back up.</p>
<p>I worked with some great guys on the Advanced JTAC team - but ultimately the SRX configuration and behavior seemed to be exactly what was expected. The only thing we couldn&rsquo;t figure out is why the SRX was holding onto the old IPSec SPIs. So we opened a support case with CheckPoint to see what they had to say. After a few troubleshooting sessions and running a bunch of debugs, the CheckPoint engineer seemed to believe that the issue was on their side. All of our CheckPoint clusters were running R77.10 at the time, but we also tried upgrading to R77.30 which still experienced the issue.</p>
<p>Ultimately, the CheckPoint guy pointed to <a href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;solutionid=sk97746">SK97746</a>, which states that CheckPoint has interoperability issues due to the way it handles the tunnel renegotiation between other vendors. Essentially, as soon as the Phase 1 IKE tunnel re-negotiates, the CheckPoint deletes the Phase 2 tunnel immediately (even when we are working in a tunnel soft reset). This means that the SRX would have believed the tunnel has re-established and keep using the old one until the hard re-key time. However, the CheckPoint had already deleted the old tunnel - which caused the traffic drops.  This is fixed using CheckPoint&rsquo;s GUI DB editor tool and making the modifications listed in the support article linked above.</p>
<p>While the CheckPoint side seemed to be responsible, it&rsquo;s still odd that the SRX was never clearing the old SPIs. It might be that it kept them open because the old tunnels were never gracefully closed with the CheckPoint.</p>
<p>So there you have it - I hope that these might help someone out who is currently banging their head against a SRX VPN issue. If you&rsquo;ve run into similar issues, drop a comment below!</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
