<?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>Tcpdump on n3s0 || notes</title>
    <link>https://notes.n3s0.tech/tags/tcpdump/</link>
    <description>Recent content in Tcpdump on n3s0 || notes</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Tue, 09 Apr 2024 14:44:01 -0500</lastBuildDate><atom:link href="https://notes.n3s0.tech/tags/tcpdump/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Troubleshooting DHCP Server On Linux With Tcpdump</title>
      <link>https://notes.n3s0.tech/posts/20240409144401/</link>
      <pubDate>Tue, 09 Apr 2024 14:44:01 -0500</pubDate>
      
      <guid>https://notes.n3s0.tech/posts/20240409144401/</guid>
      <description>Some fun with TCP Dump.</description>
      <content:encoded><![CDATA[<p>The following command will filter ports 67 and 68 on the specified
interface. Providing a brief summary of what&rsquo;s going on with BOOTP or
DHCP traffic.</p>
<p>While I generally run this on the server coupled by renewing the DHCP
lease on the client side. This command can also be executed on the
client side to make sure everything is running the way it&rsquo;s supposed to.
It&rsquo;s useful if you&rsquo;re certain DHCP is running. But, you&rsquo;re unsure if
it&rsquo;s handing out IP addresses.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">tcpdump -i &lt;interface&gt; port <span class="m">67</span> or port <span class="m">68</span>
</span></span></code></pre></div><p>The output doesn&rsquo;t do much other then indicate clients are requesting IP
addresses and the DHCP server is issuing them out. In this case the
command is capturing traffic on the eth0 interface of the server. This
was plucked while troubleshooting a very annoying DHCP issue that turned
out to be the ip relay on the switch was broke. All is well now though.
Considering the ISC DHCP Server doesn&rsquo;t have the greatest logging out of
the box. The tcpdump(1) command is a really good way verify that traffic
is coming in.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">listening on eth0, link-type EN10MB <span class="o">(</span>Ethernet<span class="o">)</span>, snapshot length <span class="m">262144</span> bytes
</span></span><span class="line"><span class="cl">13:50:41.905942 IP 172.16.30.254.bootps &gt; til-inf-03.bootps: BOOTP/DHCP, Request from 5b:d7:1c:3d:56:40 <span class="o">(</span>oui Unknown<span class="o">)</span>, length <span class="m">300</span>
</span></span><span class="line"><span class="cl">13:50:42.908259 IP til-inf-03.bootps &gt; 172.16.30.254.bootps: BOOTP/DHCP, Reply, length <span class="m">300</span>
</span></span><span class="line"><span class="cl">13:50:42.918159 IP 172.16.30.254.bootps &gt; til-inf-03.bootps: BOOTP/DHCP, Request from 5b:d7:1c:3d:56:40 <span class="o">(</span>oui Unknown<span class="o">)</span>, length <span class="m">300</span>
</span></span><span class="line"><span class="cl">13:50:42.919622 IP til-inf-03.bootps &gt; 172.16.30.254.bootps: BOOTP/DHCP, Reply, length <span class="m">300</span>
</span></span><span class="line"><span class="cl">13:50:45.222814 IP 172.16.30.254.bootps &gt; til-inf-03.bootps: BOOTP/DHCP, Request from 5b:d7:1c:3d:56:40 <span class="o">(</span>oui Unknown<span class="o">)</span>, length <span class="m">300</span>
</span></span><span class="line"><span class="cl">13:50:45.223309 IP til-inf-03.bootps &gt; 172.16.30.254.bootps: BOOTP/DHCP, Reply, length <span class="m">300</span>
</span></span><span class="line"><span class="cl">13:50:45.232177 IP 172.16.30.254.bootps &gt; til-inf-03.bootps: BOOTP/DHCP, Request from 5b:d7:1c:3d:56:40 <span class="o">(</span>oui Unknown<span class="o">)</span>, length <span class="m">300</span>
</span></span><span class="line"><span class="cl">13:50:45.232473 IP til-inf-03.bootps &gt; 172.16.30.254.bootps: BOOTP/DHCP, Reply, length <span class="m">300</span>
</span></span><span class="line"><span class="cl">14:02:28.445824 IP til-adm-01.1rti.com.bootpc &gt; til-inf-03.bootps: BOOTP/DHCP, Request from 5b:d7:1c:3d:56:40 <span class="o">(</span>oui Unknown<span class="o">)</span>, length <span class="m">300</span>
</span></span><span class="line"><span class="cl">14:02:35.879440 IP 172.16.30.254.bootps &gt; til-inf-03.bootps: BOOTP/DHCP, Request from 5b:d7:1c:3d:56:40 <span class="o">(</span>oui Unknown<span class="o">)</span>, length <span class="m">300</span>
</span></span><span class="line"><span class="cl">14:02:36.880550 IP til-inf-03.bootps &gt; 172.16.30.254.bootps: BOOTP/DHCP, Reply, length <span class="m">300</span>
</span></span><span class="line"><span class="cl">14:02:36.899829 IP 172.15.30.254.bootps &gt; til-inf-03.bootps: BOOTP/DHCP, Request from 5b:d7:1c:3d:56:40 <span class="o">(</span>oui Unknown<span class="o">)</span>, length <span class="m">300</span>
</span></span><span class="line"><span class="cl">14:02:36.900899 IP til-inf-03.bootps &gt; 172.16.30.254.bootps: BOOTP/DHCP, Reply, length <span class="m">300</span>
</span></span><span class="line"><span class="cl">14:02:52.465805 IP til-adm-01.bootpc &gt; til-inf-03.bootps: BOOTP/DHCP, Request from 5b:d7:1c:3d:56:40 <span class="o">(</span>oui Unknown<span class="o">)</span>, length <span class="m">300</span>
</span></span><span class="line"><span class="cl">14:05:18.110124 IP 172.16.30.254.bootps &gt; til-inf-03.bootps: BOOTP/DHCP, Request from 1d:4e:bb:57:0e:be <span class="o">(</span>oui Unknown<span class="o">)</span>, length <span class="m">300</span>
</span></span><span class="line"><span class="cl">14:05:19.111404 IP til-inf-03.bootps &gt; 172.16.30.254.bootps: BOOTP/DHCP, Reply, length <span class="m">300</span>
</span></span><span class="line"><span class="cl">14:05:19.142840 IP 172.16.30.254.bootps &gt; til-inf-03.bootps: BOOTP/DHCP, Request from 1d:4e:bb:57:0e:be <span class="o">(</span>oui Unknown<span class="o">)</span>, length <span class="m">327</span>
</span></span><span class="line"><span class="cl">14:05:19.144987 IP til-inf-03.bootps &gt; 172.16.30.254.bootps: BOOTP/DHCP, Reply, length <span class="m">300</span>
</span></span><span class="line"><span class="cl">14:05:51.014590 IP 172.16.30.254.bootps &gt; til-inf-03.bootps: BOOTP/DHCP, Request from 1d:4e:bb:57:0e:be <span class="o">(</span>oui Unknown<span class="o">)</span>, length <span class="m">300</span>
</span></span><span class="line"><span class="cl">14:05:51.015139 IP til-inf-03.bootps &gt; 172.16.16.33.bootpc: BOOTP/DHCP, Reply, length <span class="m">300</span>
</span></span></code></pre></div>]]></content:encoded>
    </item>
    
  </channel>
</rss>
