From: Eric W. Biederman Date: Thu, 17 Jan 2013 14:47:47 +0000 (+0000) Subject: iproute2: Fill in the ip-netns.8 manpage X-Git-Tag: v3.8.0~3^2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e9014a7a684dbb3d54f5e061dbbb77cf115efe2;p=thirdparty%2Fiproute2.git iproute2: Fill in the ip-netns.8 manpage Document ip netns monitor. Add a few senteces describing each command. The manpage was looking very scrawny. Signed-off-by: "Eric W. Biederman" --- diff --git a/man/man8/ip-netns.8 b/man/man8/ip-netns.8 index 349ee7e67..ff08232ad 100644 --- a/man/man8/ip-netns.8 +++ b/man/man8/ip-netns.8 @@ -1,4 +1,4 @@ -.TH IP\-NETNS 8 "20 Dec 2011" "iproute2" "Linux" +.TH IP\-NETNS 8 "16 Jan 2013" "iproute2" "Linux" .SH NAME ip-netns \- process network namespace management .SH SYNOPSIS @@ -23,6 +23,9 @@ ip-netns \- process network namespace management .BR "ip netns exec " .I NETNSNAME command ... +.ti -8 +.BR "ip netns monitor" + .SH DESCRIPTION A network namespace is logically another copy of the network stack, with its own routes, firewall rules, and network devices. @@ -54,11 +57,52 @@ bind mounting all of the per network namespace configure files into their traditional location in /etc. .SS ip netns list - show all of the named network namespaces + +This command displays all of the network namespaces in /var/run/netns + .SS ip netns add NAME - create a new named network namespace + +If NAME is available in /var/run/netns/ this command creates a new +network namespace and assigns NAME. + .SS ip netns delete NAME - delete the name of a network namespace + +If NAME is present in /var/run/netns it is umounted and the mount +point is removed. If this is the last user of the network namespace the +network namespace will be freed, otherwise the network namespace +persists until it has no more users. ip netns delete may fail if +the mount point is in use in another mount namespace. + .SS ip netns exec NAME cmd ... - Run cmd in the named network namespace +This command allows applications that are network namespace unaware +to be run in something other than the default network namespace with +all of the configuration for the specified network namespace appearing +in the customary global locations. A network namespace and bind mounts +are used to move files from their network namespace specific location +to their default locations without affecting other processes. + +.SS ip netns monitor - Report as network namespace names are added and deleted + +This command watches network namespace name addition and deletion events +and prints a line for each event it sees. + .SH EXAMPLES +.PP +ip netns list +.RS +Shows the list of current named network namespaces +.RE +.PP +ip netns add vpn +.RS +Creates a network namespace and names it vpn +.RE +.PP +ip netns exec vpn ip link set lo up +.RS +Bring up the loopback interface in the vpn network namespace. +.RE .SH SEE ALSO .br