[Devel] Re: VRF-like use of Network Namespaces

Daniel Lezcano daniel.lezcano at free.fr
Tue Jun 8 14:06:13 PDT 2010


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
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list