From: David Shwatrz <hidden> Date: 2012-11-28 14:39:51
Hello,
How to I move an interface back to the original namespace ?
I created three namespaces:
ip netns add namespace1
ip netns add namespace2
ip netns add namespace3
And move eth0 to namespace1:
ip link set eth0 netns namespace1
How do I return it back to the original, default network namespace ? (init_net)
Regards,
DS
Hello,
How to I move an interface back to the original namespace ?
I created three namespaces:
ip netns add namespace1
ip netns add namespace2
ip netns add namespace3
And move eth0 to namespace1:
ip link set eth0 netns namespace1
How do I return it back to the original, default network namespace ? (init_net)
# ip link set eth0 netns 1
The 'netns' argument can be either a netns name or a process ID (pid).
Providing a pid, you'll be moving the interface to the netns of the
given process, which is the initial network namespace for pid = 1 (the
init process).
--
Renato Westphal
From: David Shwatrz <hidden> Date: 2012-11-28 15:31:16
Renato,
Thanks a lot!
I have an additional question if I may on network namespaces.
I have a machine with two different nics, with two different drivers,
r8169 and 8139too (both RealTek nics).
I have eth0 on the initial network namespace and
no interface on namespace1. (8139too module is not loaded).
But when I run "modprobe 8139too" on namespace1, a device named "eth1"
is created on the initial network namespace and not on namesapce1.
I expected that in such a case, a device named "eth0" will be created
on namespace1, since it was called from namespace1. Or maybe modprobe
does
not consider the namespace from which it was called ?
regards,
DS
On Wed, Nov 28, 2012 at 5:01 PM, Renato Westphal
[off-list ref] wrote:
From: Eric W. Biederman <hidden> Date: 2012-11-28 16:28:51
David Shwatrz [off-list ref] writes:
But when I run "modprobe 8139too" on namespace1, a device named "eth1"
is created on the initial network namespace and not on namesapce1.
I expected that in such a case, a device named "eth0" will be created
on namespace1, since it was called from namespace1. Or maybe modprobe
does
not consider the namespace from which it was called ?
modprobe has no concept of the namespace from which it was called.
Eric