lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 21 May 2014 19:21:48 +0200 (SST)
From:	Peter Fassberg <>
To:	Rami Rosen <>,
	Nicolas Dichtel <>
cc:	Netdev <>
Subject: Re: Default network namespace name

Hi Rami,

This was very interesting.

How does "ip link set" distinguish between PID 1 and a namespace named "1"?

Nicolas proposed a very useful solution, which was exactly what I was looking for:
touch /var/run/netns/default
mount --bind /proc/1/ns/net /var/run/netns/default

It work like a charm!

Thank you all!



On Wed, 21 May 2014, Rami Rosen wrote:

> Hi,
> The default, initial network namespace does not have a name. In fact,
> according to the kernel implementation, all namespaces (and in
> particular, the network namespace) do not have names. The names of the
> network namespaces are created and deleted by the userspace "ip netns"
> command.
> You can move network interfaces to the initial namespace using pid 1,
> for example:
> ip netns add myns2
> ip link set p4p1 netns myns2
> #start bash in myns2
> ip nents exec myns2 bash
> #move p4p1 from myns2 to the default network namespace
> ip link set p4p1 netns 1
> Regards,
> Rami Rosen
> On Wed, May 21, 2014 at 9:36 AM, Peter Fassberg <> wrote:
>> Hi!
>> Is there a name of the default network namespace?
>> I would like to execute a command in the default network namespace while
>> running a shell in a non-default namespace.
>> Like this: ip netns exec "" ip link
>> Or this:   ip netns exec . ip link
>> That command end up with a mis-spelled error message: :)
>> seting the network namespace "" failed: Invalid argument
>> Regards,
>> Peter

To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists