11

When creating a namespace with ip netns add <namespace> the namespace and its related config are deleted on reboot along with created interfaces like veth pairs. What is the correct way to:

  1. Create network namespaces on boot (or create persistent namespace configuration if that's a more correct way to put it?)

  2. Create veth pairs on boot, set them to the appropriate namespace, bring them up and configure IP address?

  3. Bring a physical interface up without assigning it an IP address so I can add it to an Open vSwitch (I have added iface <name> inet manual to /etc/network/interface, is this the right way?)

Any help would be appreciated along with references to proper documentation or explanations.

4
  • Which distro are you running? Commented May 16, 2016 at 15:47
  • Ubuntu server 16.04 Commented May 19, 2016 at 8:12
  • 1
    I do not know specifically about Ubuntu but all distributions allow you normally to attach hooks to interfaces/network being put up or down, so you should use that to run a script of yours that would setup the namespace on the other things you need. Commented Nov 26, 2017 at 16:38
  • See How to create permanent linux network namespace on ServerFault. Commented Jan 24, 2024 at 17:11

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.