<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Biplab </title>
    <description>The latest articles on DEV Community by Biplab  (@biplabku).</description>
    <link>https://dev.to/biplabku</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4118833%2Fc0455353-9f42-469b-9202-918a3e978bca.png</url>
      <title>DEV Community: Biplab </title>
      <link>https://dev.to/biplabku</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/biplabku"/>
    <language>en</language>
    <item>
      <title>Protocol Divergence Localization: Finding WHERE Firewalls Block Your Traffic</title>
      <dc:creator>Biplab </dc:creator>
      <pubDate>Thu, 10 Sep 2026 20:56:39 +0000</pubDate>
      <link>https://dev.to/biplabku/protocol-divergence-localization-finding-where-firewalls-block-your-traffic-514a</link>
      <guid>https://dev.to/biplabku/protocol-divergence-localization-finding-where-firewalls-block-your-traffic-514a</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;You're debugging a connectivity issue. &lt;code&gt;ping&lt;/code&gt; works fine, but &lt;code&gt;curl&lt;/code&gt; times out.&lt;/p&gt;

&lt;p&gt;The usual approach:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run traceroute with ICMP - looks fine&lt;/li&gt;
&lt;li&gt;Run traceroute with TCP - dies at hop 6&lt;/li&gt;
&lt;li&gt;Manually compare each hop&lt;/li&gt;
&lt;li&gt;Finally identify the firewall/ACL&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What if you could see this in one command?&lt;/p&gt;

&lt;h2&gt;
  
  
  Protocol Divergence Localization
&lt;/h2&gt;

&lt;p&gt;I added this feature to &lt;a href="https://crates.io/crates/multiprobe" rel="noopener noreferrer"&gt;multiprobe&lt;/a&gt;, a Rust network probing library. It runs ICMP, TCP, and UDP traceroutes &lt;strong&gt;simultaneously&lt;/strong&gt; and identifies where protocols start behaving differently.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;multiprobe divergence problematic-host.example.com

Protocol Divergence Analysis: problematic-host.example.com &lt;span class="o"&gt;(&lt;/span&gt;203.0.113.50&lt;span class="o"&gt;)&lt;/span&gt;
Protocols: &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"ICMP"&lt;/span&gt;, &lt;span class="s2"&gt;"TCP"&lt;/span&gt;, &lt;span class="s2"&gt;"UDP"&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;

Hop        ICMP                 TCP                  UDP                  Status
&lt;span class="nt"&gt;---&lt;/span&gt; &lt;span class="nt"&gt;--------------------&lt;/span&gt; &lt;span class="nt"&gt;--------------------&lt;/span&gt; &lt;span class="nt"&gt;--------------------&lt;/span&gt; &lt;span class="nt"&gt;----------&lt;/span&gt;
  1 192.168.1.1 &lt;span class="o"&gt;(&lt;/span&gt;1.23ms&lt;span class="o"&gt;)&lt;/span&gt; 192.168.1.1 &lt;span class="o"&gt;(&lt;/span&gt;1.45ms&lt;span class="o"&gt;)&lt;/span&gt; 192.168.1.1 &lt;span class="o"&gt;(&lt;/span&gt;1.12ms&lt;span class="o"&gt;)&lt;/span&gt;          ✓
  2 10.0.0.1 &lt;span class="o"&gt;(&lt;/span&gt;5.67ms&lt;span class="o"&gt;)&lt;/span&gt;    10.0.0.1 &lt;span class="o"&gt;(&lt;/span&gt;5.89ms&lt;span class="o"&gt;)&lt;/span&gt;    10.0.0.1 &lt;span class="o"&gt;(&lt;/span&gt;5.34ms&lt;span class="o"&gt;)&lt;/span&gt;             ✓
  3 172.16.0.1 &lt;span class="o"&gt;(&lt;/span&gt;8.90ms&lt;span class="o"&gt;)&lt;/span&gt;  &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;          &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;           ⚠ DIVERGE

Summary:
  Protocol divergence detected at hop 3. Path score: 0.33
  First divergence at hop 3
  Reason: ICMP succeeded, TCP/UDP failed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Hop 3 is the culprit.&lt;/strong&gt; That's &lt;code&gt;172.16.0.1&lt;/code&gt; - probably a firewall blocking TCP/UDP but allowing ICMP.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Parallel Probing&lt;/strong&gt;: Send ICMP echo, TCP SYN, and UDP packets with increasing TTL values simultaneously&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Per-Hop Comparison&lt;/strong&gt;: At each hop, compare which protocols got responses&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Divergence Detection&lt;/strong&gt;: Calculate an "agreement score" (1.0 = all agree, 0.0 = complete disagreement)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Report&lt;/strong&gt;: Identify the first hop where protocols start behaving differently&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Library Usage
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;multiprobe&lt;/span&gt;&lt;span class="p"&gt;::{&lt;/span&gt;&lt;span class="n"&gt;analyze_divergence&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;DivergenceOptions&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;DivergenceProtocol&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;time&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Duration&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nd"&gt;#[tokio::main]&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="nn"&gt;multiprobe&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Error&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;DivergenceOptions&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;max_hops&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;timeout_per_hop&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nn"&gt;Duration&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;from_secs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="n"&gt;protocols&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nd"&gt;vec!&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
            &lt;span class="nn"&gt;DivergenceProtocol&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Icmp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nn"&gt;DivergenceProtocol&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Tcp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nn"&gt;DivergenceProtocol&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Udp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="n"&gt;tcp_port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;udp_port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;33434&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;

    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;analyze_divergence&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"example.com"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;.await&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nf"&gt;Some&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hop&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="py"&gt;.first_divergence_hop&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Divergence at hop {}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hop&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"No divergence - all protocols behave consistently"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(())&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Use Cases
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Firewall Rule Debugging&lt;/strong&gt;: Find which hop has a blocking ACL&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Middlebox Detection&lt;/strong&gt;: Identify protocol-specific traffic shaping&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ISP Troubleshooting&lt;/strong&gt;: Pinpoint where the problem is&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Network Security Audit&lt;/strong&gt;: Verify filtering rules are applied where expected&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# CLI tool&lt;/span&gt;
cargo &lt;span class="nb"&gt;install &lt;/span&gt;multiprobe

&lt;span class="c"&gt;# Library&lt;/span&gt;
cargo add multiprobe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Requires elevated privileges (raw sockets) on Linux/macOS.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Links:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://crates.io/crates/multiprobe" rel="noopener noreferrer"&gt;crates.io&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/biplabku/multiprobe" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.rs/multiprobe" rel="noopener noreferrer"&gt;Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>rust</category>
      <category>networking</category>
      <category>devops</category>
      <category>sysadmin</category>
    </item>
    <item>
      <title>Implementing Paris Traceroute in Rust: Tracing Paths Through Load Balancers</title>
      <dc:creator>Biplab </dc:creator>
      <pubDate>Thu, 10 Sep 2026 07:54:19 +0000</pubDate>
      <link>https://dev.to/biplabku/implementing-paris-traceroute-in-rust-tracing-paths-through-load-balancers-44l2</link>
      <guid>https://dev.to/biplabku/implementing-paris-traceroute-in-rust-tracing-paths-through-load-balancers-44l2</guid>
      <description>&lt;p&gt;Standard traceroute is broken on modern networks.&lt;/p&gt;

&lt;p&gt;If you've ever run &lt;code&gt;traceroute&lt;/code&gt; to debug a connectivity issue and seen wildly inconsistent hops, you've hit this problem. The culprit: Equal-Cost Multi-Path (ECMP) routing.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;ECMP load balancers distribute traffic across multiple paths based on flow identifiers — typically a hash of source IP, destination IP, source port, and destination port. Traditional traceroute changes the destination port (or ICMP sequence number) for each probe, which means each probe can take a completely different path through the network.&lt;/p&gt;

&lt;p&gt;The result? A traceroute that shows hops from multiple physical paths stitched together into one nonsensical output.&lt;/p&gt;

&lt;h2&gt;
  
  
  Paris Traceroute
&lt;/h2&gt;

&lt;p&gt;In 2006, Augustin et al. published "Avoiding traceroute anomalies with Paris traceroute" at IMC. The key insight: keep flow identifiers constant across all probes so they all traverse the same path.&lt;/p&gt;

&lt;p&gt;For UDP probes, this means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Same source port&lt;/li&gt;
&lt;li&gt;Same destination port
&lt;/li&gt;
&lt;li&gt;Vary the TTL (and checksum) only&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For ICMP, it's trickier — ICMP echo requests don't have ports. Paris Traceroute manipulates the ICMP checksum field to maintain a constant value that ECMP routers hash on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementing in Rust
&lt;/h2&gt;

&lt;p&gt;I couldn't find a pure-Rust implementation, so I built one in &lt;a href="https://crates.io/crates/multiprobe" rel="noopener noreferrer"&gt;multiprobe&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The core concept is a &lt;code&gt;FlowId&lt;/code&gt; that stays constant:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
rust
pub struct FlowId {
    pub src_port: u16,
    pub dst_port: u16,
    pub identifier: u16,
}

impl FlowId {
    pub fn udp(src: u16, dst: u16) -&amp;gt; Self {
        Self { src_port: src, dst_port: dst, identifier: 0 }
    }
}
When sending probes, we only vary the TTL:


let trace = Probe::paris("example.com")
    .flow_id(FlowId::udp(33434, 33434))
    .max_hops(30)
    .send().await?;

for hop in &amp;amp;trace.hops {
    println!("{:2}. {:15} {:.2}ms", 
        hop.ttl, 
        hop.addr.map(|ip| ip.to_string()).unwrap_or("*".into()),
        hop.rtt.as_secs_f64() * 1000.0);
}
Detecting Load Balancing
Once you can trace a single path consistently, you can also detect load balancing by sending probes with different flow IDs and comparing the paths:


let paths = discover_paths("example.com", 6, &amp;amp;Default::default()).await?;
println!("Found {} distinct paths", paths.len());
If you get multiple distinct paths, you've found an ECMP load balancer.

Results
With Paris Traceroute, you get:

Consistent paths through ECMP networks
Accurate hop-by-hop latency measurements
Load balancer detection (per-flow vs per-packet)
Try It

[dependencies]
multiprobe = "0.1"
crates.io
GitHub
docs.rs
References
Augustin, B., et al. "Avoiding traceroute anomalies with Paris traceroute." IMC 2006.
RFC 1191: Path MTU Discovery
Questions or feedback? Open an issue on GitHub or find me on [platform].



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>rust</category>
      <category>networking</category>
      <category>opensource</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
