| 1 |
.\" Copyright 2017, Michael Kerrisk <[email protected]> |
| 2 |
.\" Copyright, the authors of the Linux man-pages project |
| 3 |
.\" |
| 4 |
.\" SPDX-License-Identifier: Linux-man-pages-copyleft |
| 5 |
.\" |
| 6 |
.TH network_namespaces 7 2026-02-08 "Linux man-pages 6.18" |
| 7 |
.SH NAME |
| 8 |
network_namespaces \- overview of Linux network namespaces |
| 9 |
.SH DESCRIPTION |
| 10 |
Network namespaces provide isolation of the system resources associated |
| 11 |
with networking: network devices, IPv4 and IPv6 protocol stacks, |
| 12 |
IP routing tables, firewall rules, the |
| 13 |
.I /proc/net |
| 14 |
directory (which is a symbolic link to |
| 15 |
.IR /proc/ pid /net ), |
| 16 |
the |
| 17 |
.I /sys/class/net |
| 18 |
directory, various files under |
| 19 |
.IR /proc/sys/net , |
| 20 |
port numbers (sockets), and so on. |
| 21 |
In addition, |
| 22 |
network namespaces isolate the UNIX domain abstract socket namespace (see |
| 23 |
.BR unix (7)). |
| 24 |
.P |
| 25 |
A physical network device can live in exactly one |
| 26 |
network namespace. |
| 27 |
When a network namespace is freed |
| 28 |
(i.e., when the last process in the namespace terminates), |
| 29 |
its physical network devices are moved back to the |
| 30 |
initial network namespace |
| 31 |
(not to the namespace of the parent of the process). |
| 32 |
.P |
| 33 |
A virtual network |
| 34 |
.RB ( veth (4)) |
| 35 |
device pair provides a pipe-like abstraction |
| 36 |
that can be used to create tunnels between network namespaces, |
| 37 |
and can be used to create a bridge to a physical network device |
| 38 |
in another namespace. |
| 39 |
When a namespace is freed, the |
| 40 |
.BR veth (4) |
| 41 |
devices that it contains are destroyed. |
| 42 |
.P |
| 43 |
Use of network namespaces requires a kernel that is configured with the |
| 44 |
.B CONFIG_NET_NS |
| 45 |
option. |
| 46 |
.\" FIXME .SH EXAMPLES |
| 47 |
.SH SEE ALSO |
| 48 |
.BR nsenter (1), |
| 49 |
.BR unshare (1), |
| 50 |
.BR clone (2), |
| 51 |
.BR veth (4), |
| 52 |
.BR proc (5), |
| 53 |
.BR sysfs (5), |
| 54 |
.BR namespaces (7), |
| 55 |
.BR user_namespaces (7), |
| 56 |
.BR brctl (8), |
| 57 |
.BR ip (8), |
| 58 |
.BR ip\-address (8), |
| 59 |
.BR ip\-link (8), |
| 60 |
.BR ip\-netns (8), |
| 61 |
.BR iptables (8), |
| 62 |
.BR ovs\-vsctl (8) |