Questions tagged [network-namespace]

A network namespace is an isolated software implementation of a network stack with its own devices, routes and firewall rules within a Linux operating system.

71 questions
18
votes
4 answers

How can I switch from a custom linux network namespace back to the default one?

With ip netns exec you can execute a command in a custom network namespace - but is there also a way to execute a command in the default namespace? For example, after executing these two commands: sudo ip netns add test_ns sudo ip netns exec test_ns…
Martin
  • 282
  • 1
  • 2
  • 8
13
votes
3 answers

How can I move an interface out of a network namespace?

If I move an interface temporarily into a netns with ip link set eth10 netns myns then it no longer is visible in the root, only within the namespace myns. How do I move it back, something like (these obviously don't exist): ip link unset eth10 or…
deitch
  • 545
  • 1
  • 4
  • 15
7
votes
2 answers

Run a systemd unit in a specified network namespace

I would like to instruct systemd to 'run a unit' in a specified, pre-existing network namespace, in particular to start the unit's process(es) in the namespace.
A__A__0
  • 393
  • 2
  • 6
  • 16
6
votes
1 answer

Cannot create nested network namespace

Is seems that one is not able to create a network namespace from a network namespace. It results in "Error: Peer netns reference is invalid.". Is this a bug or is there some kind of limitation that I am not aware of? Below is my cmd trace of the…
6
votes
0 answers

Windows equivalent of Linux Network Namespace

Does windows have an equivalent of the Linux Network Namespace? I want to create a new interface and have that interface only accessible to specific applications, that interface would not be listening on the standard windows ports (139 445…
Rowan Smith
  • 161
  • 2
5
votes
2 answers

Is it possible to do Linux network namespaces (netns) on MacOS?

Context - I'm trying to get a docker cluster running on MacOSX. Part of the install process for getting docker running is to install pipework. Pipework relies on /var/run/netns My question is: Is there an equivalent of netns for Mac OS X?
Hawkeye
  • 2,669
  • 9
  • 30
  • 34
4
votes
1 answer

Unable to add interface to network namespace on boot

I have problem with adding a phyisical ethernet interface to a predefined namespace , adding that to interfaces file in pre-up/post-up event do not work. It adds eth to namespace, but ip address and LOWER_UP state never appear. Removing namespace…
Swift
  • 141
  • 5
3
votes
1 answer

Netstat and ss doesn't see connection

I'm trying to find which application running on Kubernetes cluster is using a specific port to communicate with RabbitMQ cluster. On RabbitMQ I see that connection is coming from 192.168.1.10:34226. 192.168.1.10 is one of Kubernetes nodes. After…
QkiZ
  • 475
  • 2
  • 7
  • 18
3
votes
2 answers

How to run a command in another process's network namespace?

There is a process running in its own network namespace. I would like to telnet to the machine and run a command in this process network namespace, something like that (17543 is the pid of the process with its own network namespace): # ip netns exec…
wulujey
  • 131
  • 1
  • 2
3
votes
2 answers

Secondary IP in its own netns namespace

Is there a way I can move a secondary IP into its own namespace while keeping the primary IP on the original device? If I have 10.0.0.1 and 10.0.0.2 on device eth0, but I want 10.0.0.2 to be in its own netns test, the closest I've come to that…
pilcrow
  • 449
  • 5
  • 19
3
votes
1 answer

How to create permanent linux network namespace

I know that ip netns add xxx command can be used to create a linux network namespace, but it is not permanent, meaning after server reboot the created namespace will be gone. Then how can I create a permanent one which can survive server reboot?
Zii
  • 31
  • 1
  • 3
3
votes
0 answers

Linux device route without broadcast

I have the following setup: A network namespace, ns1 A pair of virtual interfaces, ns_ext1 and ns_int1. ns_ext exists in the global namespace, and ns_int1 exists in ns1. A GRE device, gre1, which exists in ns1. None of these devices are assigned IP…
joshlf
  • 119
  • 6
3
votes
1 answer

cannot ping linux network namespace within the same subnet

Here is a quick summary of the issue. I cannot communicate with a linux network namespace within the same subnet. I am running Ubuntu 14.04.1 LTS on a headless server. I have been troubleshooting this for about a week, so thanks in advanced for any…
David Custer
  • 51
  • 1
  • 6
3
votes
1 answer

Linux network namespaces - ping fails on specific veth

I just started to exploring network namespaces. I try to implement the following simple setting following the article in http://www.opencloudblog.com/?p=42 +--------+ +-----------+ +--------+ | …
Vasilis
  • 283
  • 1
  • 4
  • 13
3
votes
1 answer

Howto query and change network namespace on linux?

I was wondering if there is a way to Query the network namespace the current shell is in Change the current network namespace of the current shell I know I can do things like sudo ip netns exec to execute a certain…
Isaac
  • 1,195
  • 3
  • 25
  • 43
1
2 3 4 5