<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Networking on Margrop Blog</title>
		<link>https://blog.margrop.net/en/tag/networking/</link>
		<description>Recent content in Networking on Margrop Blog</description>
		<generator>Hugo</generator>
		<language>en-US</language>
		
		
		
		
			<lastBuildDate>Thu, 09 Jul 2026 21:40:00 +0800</lastBuildDate>
		
			<atom:link href="https://blog.margrop.net/en/tag/networking/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Stop Buying the Wrong Alibaba Cloud Load Balancer: SLB, ALB, NLB, and CLB Explained</title>
				<link>https://blog.margrop.net/en/post/aliyun-slb-alb-nlb-clb-explained/</link>
				<pubDate>Thu, 09 Jul 2026 21:40:00 +0800</pubDate>
				<guid>https://blog.margrop.net/en/post/aliyun-slb-alb-nlb-clb-explained/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Short version&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;On Alibaba Cloud, do not treat &lt;code&gt;SLB&lt;/code&gt; as one single instance type anymore. The more accurate mental model is this: &lt;strong&gt;SLB is the Server Load Balancer product family, and the concrete choices are mainly ALB, NLB, and CLB.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;ALB&lt;/strong&gt; is the Application Load Balancer for Layer 7 traffic such as HTTP, HTTPS, QUIC, gRPC, and SSE. If you need routing by domain, path, header, cookie, method, or query string, start here.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;NLB&lt;/strong&gt; is the Network Load Balancer for Layer 4 traffic such as TCP, UDP, and TCPSSL. If you need massive connections, low latency, long-lived sessions, IoT, audio/video, or a message-service entry point, start here.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;CLB&lt;/strong&gt; is the Classic Load Balancer. It supports TCP, UDP, HTTP, and HTTPS, with solid Layer 4 capability and basic Layer 7 features. It is still useful for existing systems, but new designs should usually evaluate ALB or NLB first.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;A simple analogy: &lt;strong&gt;ALB is a receptionist who understands business rules, NLB is a high-speed toll gate, CLB is an older all-in-one service counter, and SLB is the name of the whole building.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
			</item>
			<item>
				<title>Cross-Border VPS Feels Glacial? One Kernel Sysctl Speeds International Links 20×</title>
				<link>https://blog.margrop.net/en/post/bbr-fix-china-us-vps-slow-network/</link>
				<pubDate>Thu, 02 Jul 2026 20:00:00 +0800</pubDate>
				<guid>https://blog.margrop.net/en/post/bbr-fix-china-us-vps-slow-network/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;The short version&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;You&amp;rsquo;re accessing your overseas VPS from within China. SSH feels snappy. &lt;code&gt;curl&lt;/code&gt; on a small JSON endpoint returns instantly. But downloading a 2 MB HTML file takes over a minute. Convinced it&amp;rsquo;s &amp;ldquo;peak-hour international link congestion&amp;rdquo;? Probably not — you&amp;rsquo;re being sabotaged by Linux&amp;rsquo;s default CUBIC congestion control. CUBIC treats every packet loss as &amp;ldquo;the road ahead is jammed&amp;rdquo; and immediately backs off. But international links have baseline 5–15% loss from physical-layer imperfections, not congestion. So your TCP flow gets permanently stuck in slow-mo. Switch to Google&amp;rsquo;s &lt;strong&gt;BBR&lt;/strong&gt; algorithm and the exact same physical path, same moment, same loss rate delivers &lt;strong&gt;15–24× more throughput&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This post walks through a real mesh-VPN investigation: pulling a 2.3 MB page from a US VPS across a Chinese home connection went from &lt;strong&gt;30 KB/s to 500–1000 KB/s&lt;/strong&gt; after four shell commands. It ships three one-shot scripts (Windows 11 / Ubuntu 26.04 / macOS 26), covering both manual execution and AI-agent-driven deployment. All internal IPs, hostnames, and public IPs have been redacted.&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
			</item>
			<item>
				<title>The Portainer 500 Error That Wasn&#39;t the YAML — A Two-librespeed_default-Network Story</title>
				<link>https://blog.margrop.net/en/post/portainer-500-duplicate-compose-network-enigma/</link>
				<pubDate>Sat, 13 Jun 2026 08:00:00 +0800</pubDate>
				<guid>https://blog.margrop.net/en/post/portainer-500-duplicate-compose-network-enigma/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;The short version&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;You update a stack in Portainer. The browser slaps you with a red &lt;code&gt;500 Internal Server Error&lt;/code&gt;. You assume the YAML is wrong, fix the indentation, swap the quotes, drop the image tag. You hit Update again. Same 500. And again. And again.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;The real culprit is buried at the deepest level of the HTTP response body: &lt;code&gt;network librespeed_default is ambiguous (2 matches found on name)&lt;/code&gt;.&lt;/strong&gt; Two networks with the same name exist in the same Docker engine—two IDs, two &lt;code&gt;Created&lt;/code&gt; timestamps, two &lt;code&gt;com.docker.compose.config-hash&lt;/code&gt; labels, but a single shared name. Compose asks the engine to look up that name; the engine refuses to pick between them; &lt;code&gt;compose up&lt;/code&gt; fails; Portainer wraps the error as a 500 and returns it to your browser.&lt;/p&gt;&#xA;&lt;p&gt;The fix is embarrassingly simple: &lt;strong&gt;delete one of the two orphan networks&lt;/strong&gt; (&lt;code&gt;docker network rm &amp;lt;id&amp;gt;&lt;/code&gt; or click Remove in Portainer&amp;rsquo;s Networks page), then re-run Update the stack with the exact same content. It just works.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This post is a real debugging session: a stack update that was supposed to be a 30-second mount-path change turned into a 1-hour investigation. All private details (internal addresses, registry URLs, volume paths, container names, credentials) have been replaced with &lt;code&gt;&amp;lt;PLACEHOLDER&amp;gt;&lt;/code&gt;. Only public source code, official docs, and the error text itself are preserved.&lt;/p&gt;</description>
			</item>
			<item>
				<title>The Docker Container Is Running, the Port Is Dead: A Complete Walkthrough of a Silent Host-Bind Failure</title>
				<link>https://blog.margrop.net/en/post/docker-port-bind-half-silent/</link>
				<pubDate>Sat, 13 Jun 2026 07:30:00 +0800</pubDate>
				<guid>https://blog.margrop.net/en/post/docker-port-bind-half-silent/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;docker ps&lt;/code&gt; says everything is fine. &lt;code&gt;docker inspect&lt;/code&gt;&amp;rsquo;s &lt;code&gt;HostConfig.PortBindings&lt;/code&gt; clearly says &lt;code&gt;203.0.113.14:3001:3000&lt;/code&gt;. But on the host, &lt;strong&gt;no &lt;code&gt;docker-proxy&lt;/code&gt; is listening&lt;/strong&gt;, the iptables &lt;code&gt;nat/DOCKER&lt;/code&gt; chain has &lt;strong&gt;no DNAT rule&lt;/strong&gt;, and &lt;code&gt;NetworkSettings.Networks&lt;/code&gt; and &lt;code&gt;Ports&lt;/code&gt; are both &lt;strong&gt;empty &lt;code&gt;{}&lt;/code&gt;&lt;/strong&gt;. This &amp;ldquo;container alive, port dead&amp;rdquo; state is what happens when libnetwork silently rolls back the endpoint creation because the target interface wasn&amp;rsquo;t up at attach time — and Docker doesn&amp;rsquo;t bother to tell you that the port publish never actually happened. &lt;strong&gt;The fix is a single 30-second command&lt;/strong&gt;: &lt;code&gt;docker network connect &amp;lt;net&amp;gt; &amp;lt;ctr&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
			</item>
			<item>
				<title>VPN Connected, But Internal Hostnames Won&#39;t Resolve? A Complete macOS Routing Table Walkthrough</title>
				<link>https://blog.margrop.net/en/post/macos-routing-table-vpn-troubleshooting/</link>
				<pubDate>Mon, 01 Jun 2026 18:00:00 +0800</pubDate>
				<guid>https://blog.margrop.net/en/post/macos-routing-table-vpn-troubleshooting/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;When two VPNs run side-by-side on macOS (e.g. &lt;code&gt;utun0&lt;/code&gt; and &lt;code&gt;utun15&lt;/code&gt;), an aggregate &lt;code&gt;10.0.0.0/8&lt;/code&gt; route pushed by one of them can silently &amp;ldquo;swallow&amp;rdquo; every address in the 10.x.x.x range — including the one you actually wanted to reach on the other VPN. DNS resolves fine; TCP/ICMP just hangs. &lt;strong&gt;&lt;code&gt;route -n get&lt;/code&gt; is the first knife you should reach for.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
			</item>
			<item>
				<title>You Can SSH Out, but Not Back In: A Fail2Ban False Positive That Broke Reverse Access</title>
				<link>https://blog.margrop.net/en/post/reverse-ssh-fail2ban-vpn-gateway-investigation/</link>
				<pubDate>Sat, 30 May 2026 15:45:00 +0800</pubDate>
				<guid>https://blog.margrop.net/en/post/reverse-ssh-fail2ban-vpn-gateway-investigation/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Bottom line&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The symptom looked simple: I could SSH from the local machine into a remote internal host, but the reverse SSH path failed when the remote host tried to connect back. &lt;code&gt;sshd&lt;/code&gt; was listening, the route table looked fine, and the failure still happened.&lt;/p&gt;&#xA;&lt;p&gt;The real root cause was not a broken SSH daemon. &lt;code&gt;Fail2Ban&lt;/code&gt; had banned the &lt;strong&gt;VPN gateway address&lt;/strong&gt; that represented the return path. From the local machine&amp;rsquo;s point of view, the incoming SSH session did not appear to come directly from the remote host. It appeared to come from the gateway, so the ban cut off the whole reverse path.&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
			</item>
			<item>
				<title>Home Network 1000Mbps but Games Stutter? A Complete Guide to Diagnosing and Fixing Bufferbloat</title>
				<link>https://blog.margrop.net/en/post/bufferbloat-sqm-cake-home-network-fix/</link>
				<pubDate>Sat, 30 May 2026 09:00:00 +0800</pubDate>
				<guid>https://blog.margrop.net/en/post/bufferbloat-sqm-cake-home-network-fix/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;The Short Version&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Your router has a hidden enemy called &lt;strong&gt;Bufferbloat&lt;/strong&gt; — and it&amp;rsquo;s likely the reason your games lag even when your bandwidth test shows perfect speeds. When a router buffers too aggressively, download traffic fills up the queue and real-time traffic (games, video calls) gets stuck waiting behind thousands of buffered packets. Your speedtest stays at 950Mbps, but your game ping explodes from 50ms to 500ms.&lt;/p&gt;&#xA;&lt;p&gt;In this article, I walk through the complete diagnosis and resolution of a Bufferbloat problem in a real home network environment using a multi-WAN iKuai gateway + ImmortalWrt soft router setup. The fix: deploying &lt;strong&gt;SQM (Smart Queue Management) + Cake qdisc&lt;/strong&gt; on the ImmortalWrt layer, which reduced latency under full-speed download from ~300ms+ down to a stable ~12ms with zero configuration complexity.&lt;/p&gt;&#xA;&lt;p&gt;All internal IP addresses, device hostnames, and network topologies have been sanitized for privacy.&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
			</item>
			<item>
				<title>Python App in macOS LaunchAgent Can&#39;t Reach the Internet? Here&#39;s the httpx Proxy Trap You Need to Know</title>
				<link>https://blog.margrop.net/en/post/macos-launchagent-python-httpx-proxy-no-route-to-host/</link>
				<pubDate>Sat, 30 May 2026 09:00:00 +0800</pubDate>
				<guid>https://blog.margrop.net/en/post/macos-launchagent-python-httpx-proxy-no-route-to-host/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;When a Python application using httpx with &lt;code&gt;trust_env=True&lt;/code&gt; runs inside a macOS LaunchAgent, it silently picks up the system proxy settings from &lt;code&gt;scutil --proxy&lt;/code&gt;. But the LaunchAgent process may not be able to reach that proxy server at all — resulting in &lt;code&gt;All connection attempts failed&lt;/code&gt; or &lt;code&gt;No route to host&lt;/code&gt; errors.&lt;/p&gt;&#xA;&lt;p&gt;The fix is one line: add &lt;code&gt;NO_PROXY=*&lt;/code&gt; to the LaunchAgent&amp;rsquo;s plist &lt;code&gt;EnvironmentVariables&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This article documents the full debugging journey: from discovering that my AI Agent&amp;rsquo;s WeChat Enterprise (WeCom) messages weren&amp;rsquo;t being replied to, through methodical proxy troubleshooting, to finally pinning down the root cause — macOS system proxy + LaunchAgent network isolation. We&amp;rsquo;ll dive deep into Python httpx source code, macOS proxy architecture, and the many gotchas of LaunchAgent runtime environments.&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
			</item>
			<item>
				<title>Seamless Homelab Networking: Deploying Tailscale on Ubuntu 26.04 for Effortless Remote Access</title>
				<link>https://blog.margrop.net/en/post/seamless-homelab-networking-deploy-tailscale-ubuntu-2604/</link>
				<pubDate>Tue, 26 May 2026 14:00:00 +0800</pubDate>
				<guid>https://blog.margrop.net/en/post/seamless-homelab-networking-deploy-tailscale-ubuntu-2604/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;The Short Version&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Cross-carrier connectivity, lack of public IPv4 addresses, and multi-device connection management have always been the ultimate pain points for Homelab enthusiasts and enterprise sysadmins alike. This article provides a comprehensive, step-by-step guide on how to cleanly and securely install and configure the latest version of Tailscale on the newly released Ubuntu 26.04 (Resolute Raccoon) using the modern APT Keyring standards. Beyond a clean command-line install walkthrough, we delve into the architectural design of Tailscale, Subnet Router routing, and Exit Node proxying to establish a seamless, encrypted mesh network linking your home Synology NAS, Proxmox VE hypervisors, remote laptops, and mobile devices.&lt;/p&gt;&#xA;&lt;p&gt;All setups and commands documented here have been rigorously tested on a clean Ubuntu 26.04 (Resolute Raccoon) environment. To prioritize safety and avoid leakage, all internal IP addresses, access tokens, routing tables, and server domains have been fully masked using generic placeholders.&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
			</item>
			<item>
				<title>[Transfer] Installing and Configuring an ImmortalWrt Bypass Router</title>
				<link>https://blog.margrop.net/en/post/zhuan-immortalwrt-pang-lu-you-install-config/</link>
				<pubDate>Mon, 11 May 2026 21:10:55 +0800</pubDate>
				<guid>https://blog.margrop.net/en/post/zhuan-immortalwrt-pang-lu-you-install-config/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;This article is a full English translation of Egg Targaryen&amp;rsquo;s &amp;ldquo;ImmortalWrt旁路由安装与配置&amp;rdquo;. The original article is published under the &lt;code&gt;CC BY-NC-SA 4.0&lt;/code&gt; license. The operation order and screenshots are preserved, with minor formatting adjustments for this site.&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
			</item>
	</channel>
</rss>
