2026-04-24 | linux · networking | #netns #network-namespace #struct-net #container-networking #veth #nsproxy #pernet-operations #isolation #bpftrace
容器网络的一切隔离能力,都建立在网络命名空间之上。本文从 Linux 6.6 内核源码拆解 struct net 的完整布局、possible_net_t 与 RCU 访问模式、pernet_operations 子系统注册与生命周期回调、copy_net_ns() 命名空间创建路径、per-netns 路由表/netfilter/socket 隔离机制,以及 veth pair 跨命名空间数据转发的 skb->dev 切换原理。
2026-04-03 | linux · networking | #veth #bridge #tun #tap #macvlan #ipvlan #network-namespace #virtual-network
五种 Linux 虚拟网络设备的内核实现原理、数据流路径、性能代价与适用场景,附手工实验验证。