[Devel] Re: VRF-like use of Network Namespaces
On 06/08/2010 05:23 PM, Mathieu Peresse wrote: Hi all, I saw this post from Oct 2008: https://lists.linux-foundation.org/pipermail/containers/2008-October/013917.html, discussing how to manipulate network namespaces like we do with VRFs on Cisco routers (e.g. using normal network commands, plus appending vrf vrf_name at the end to manipulate the desired VRF), without the need to have processes bound to network namespaces. Are there any activities on this subject ? There is a prototype here: git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/linux-2.6.33-nsfd-v5.git The description of what it does: http://git.kernel.org/?p=linux/kernel/git/ebiederm/linux-2.6.33-nsfd-v5.git;a=commit;h=9c2f86a44d9ca93e78fd8e81a4e2a8c2a4cdb054 I don't know what is the status of this patchset and if Eric is willing to push it for the next kernel version. Thanks -- Daniel ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers ___ Devel mailing list Devel@openvz.org https://openvz.org/mailman/listinfo/devel
[Devel] Re: VRF-like use of Network Namespaces
On 06/08/2010 07:12 PM, Mathieu Peresse wrote: Looks good, thanks ! Has anyone worked to make 'ip' use these facilities ? If I understand correctly, from a network resource configuration perspective: - Creating a persisting namespace ('VRF') is equivalent to: create a namespace (using clone()), which creates a proc entry for that namespace, and then bind mount the file so that it stays open. From the same process, unshare (using unshare()), open /proc/self/ns/net, store the fd, unshare again, open /proc/self/ns/net, store the fd, ... A single process handles by this way several network namespaces. To switch from one namespace to another, just use the setns syscall. Well this is one example to use it, AFAIK you are looking for this very specific usage no ? Thanks -- Daniel ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers ___ Devel mailing list Devel@openvz.org https://openvz.org/mailman/listinfo/devel