1 .TH IP\-NETNS 8 "20 Dec 2011" "iproute2" "Linux"
3 ip netns \- process network namespace management
12 .RI " { " COMMAND " | "
16 .BR "ip netns" " { " list " } "
19 .BR "ip netns" " { " add " | " delete " } "
24 .I NETNSNAME command ...
27 A network namespace is logically another copy of the network stack,
28 with it's own routes, firewall rules, and network devices.
30 By convention a named network namespace is an object at
31 .BR "/var/run/netns/" NAME
32 that can be opened. The file descriptor resulting from opening
33 .BR "/var/run/netns/" NAME
34 refers to the specified network namespace. Holding that file
35 descriptor open keeps the network namespace alive. The file
36 descriptor can be used with the
38 system call to change the network namespace associated with a task.
40 The convention for network namespace aware applications is to look
41 for global network configuration files first in
42 .BR "/etc/netns/" NAME "/"
45 For example, if you want a different version of
47 for a network namespace used to isolate your vpn you would name it
48 .BR /etc/netns/myvpn/resolv.conf.
51 automates handling of this configuration, file convention for network
52 namespace unaware applications, by creating a mount namespace and
53 bind mounting all of the per network namespace configure files into
54 their traditional location in /etc.
56 .SS ip netns list - show all of the named network namespaces
57 .SS ip netns add NAME - create a new named network namespace
58 .SS ip netns delete NAME - delete the name of a network namespace
59 .SS ip netns exec NAME cmd ... - Run cmd in the named network namespace
68 Original Manpage by Eric W. Biederman