ifupdown helper scripts for network namespaces Based on https://github.com/m0kct/debian-netns
Find a file
Benjamin Collet df8cf3553c Readme update
2018-04-07 22:05:36 +02:00
if-down.d Initial commit 2018-04-07 21:40:38 +02:00
if-pre-up.d Initial commit 2018-04-07 21:40:38 +02:00
if-up.d Initial commit 2018-04-07 21:40:38 +02:00
LICENSE Initial commit 2018-04-07 21:40:38 +02:00
README.md Readme update 2018-04-07 22:05:36 +02:00

ifupdown-netns

Some simple scripts to simplify configuring network namespaces on Debian-like systems. Copy them into the corresponding directories under /etc/network.

To configure an interface in a namespace:

auto eth1
iface eth1 inet manual
  netns myns

On invocation of ifup:

  • if the namespace doesn't exist it will be created
  • if the folders if-down.d, if-post-down.d, if-pre-up.d and if-up.d under /etc/netns/<namespace>/network don't exist, they will be created
  • if the /etc/netns/<namespace>/network/interfaces file doesn't exist a blank one will be created
  • if it does and the interface is configured the the script will invoke ifup for this interface inside the namespace.