network_namespaces(7)
๐ network_namespaces โ bestie's guide to Linux network namespaces ๐
okay so this is a page from Miscellaneous Information Manual (section 7, the "overview" girlies), and it's literally all about <cyan>network_namespaces</cyan> โ the Linux kind. come sit with me, we're gonna get you fluent. ๐ซถ
โจ NAME โจ
network_namespaces โ an overview of Linux network namespaces ๐
๐ธ DESCRIPTION ๐ธ
so. network namespaces are giving isolation, and specifically they isolate all the system resources that have anything to do with networking. like:
- network devices ๐
- the IPv4 and IPv6 protocol stacks
- IP routing tables
- firewall rules ๐ฅ
- the
/proc/netdirectory (which, plot twist, is a symbolic link to/proc/pid/net) - the
/sys/class/netdirectory - various files under
/proc/sys/net - port numbers (sockets) ๐งฆ
- and so on, you get the vibe
and as if that wasn't enough, network namespaces also isolate the UNIX domain abstract socket namespace (go read unix(7) for that one, bestie).
๐ physical devices, one home only
a physical network device can live in exactly one network namespace. no polyamory, no sharing, one device one namespace. periodt.
and when a network namespace gets freed โ which happens when the last process in that namespace terminates โ its physical network devices get moved back to the initial network namespace. and here's the important bit, don't let anyone gaslight you: they go to the initial namespace, not to the namespace of the parent of the process. that distinction is iconic and also very easy to get wrong. ๐
๐ฆ veth pairs, the tunnel girlies
a virtual network (veth(4)) device pair is basically a pipe-like abstraction. it's the blueprint for:
- creating tunnels between network namespaces ๐ณ๏ธ
- creating a bridge to a physical network device that's sitting in another namespace
and the tragic part: when a namespace is freed, the veth(4) devices it contains are destroyed. gone. no forwarding address. ๐
๐ kernel requirements (the vibe check)
using network namespaces requires a kernel that's configured with the CONFIG_NET_NS option. no option, no namespaces, no slay. that's the rules. ๐ญ
โญ SEE ALSO โญ
the whole friend group, go say hi:
nsenter(1)unshare(1)clone(2)veth(4)proc(5)sysfs(5)namespaces(7)user_namespaces(7)brctl(8)ip(8)ip-address(8)ip-link(8)ip-netns(8)iptables(8)ovs-vsctl(8)
and that's the whole page, bestie!! ๐ฅณ this was Linux man-pages 6.20, dated 2026-02-08 โ so when you cite this in your essay you know exactly which era of the lore we're in. k bye, go ip netns something, love u ๐๐ง
๐ฆ where this page comes from
- arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- ๐ the page's license: Linux-man-pages-copyleft
- Copyright 2017, Michael Kerrisk <mtk.manpages@gmail.com>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms