What is the best way to make network namespaces persistant?
Hi,
Using RHEL 7.3, what would be the best way to create persistant network namespaces? I have multiple NICs on my servers and I need to place each of them in a separate netns (i.e: ip link set eth1 netns mpls1).
I can write a script that will do this at boot time, but I need to handle cases where the user might do a "systemctl restart network" and probably some other cases I didn't think about. Does RHEL support a way to do this in the networking scripts?
Responses
The network service supports /sbin/ifup-local and /sbin/ifdown-local which are run as interfaces go up and down.
NetworkManager supports dispatcher scripts which work similarly.
I don't think there's much tooling specifically around using netns on their own. The focus is on containers.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
