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.

Filter by
Sorted by
Tagged with
0
votes
1answer
45 views

Run docker in an existing network namespace?

Would it be possible to run a docker container inside an existing namespace ? I created a namespace using: ip netns add client Now I want to run a container (with a bridge or host network, whatever is ...
0
votes
0answers
16 views

Can't reach outside or host from a CNI network namespaced veth/tap pair

I have a hypervisor (Firecracker) using the bridge cni plugin with tc-redirect-tap (https://github.com/firecracker-microvm/firecracker-go-sdk/tree/master/cni/cmd/tc-redirect-tap). When it sets up the ...
1
vote
1answer
953 views

Inter-Guest Network in KVM without a Bridge

I would like to have a psuedo-wire between two guests in KVM. I cannot use a bridge of any type as the guest VMs are actually virtual switches themselves. Conceptually, it seems that a veth-pair is ...
0
votes
0answers
135 views

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 ...
0
votes
1answer
34 views

Weird issue with linux network namespace switching

I'm writing a small prometheus exporter in Go to publish network metrics for docker containers. There is a goroutine which gathers the values in the following way: 1. Get all docker containers using ...
2
votes
2answers
96 views

Unable to reach network namespace through master

I'm trying to create an isolated lab using network namespaces. It works correctly, that is, only the machines in the network namespace can talk. But now I want reach the machines by localhost using v-...
0
votes
1answer
35 views

ping server in namespace from remote machine

If I run web server in default namespace of SERVER machine I can curl it from REMOTE machine doing that: curl http://SERVER:80/ Now I put web server in namespace nested with providing veth peered ...
0
votes
1answer
49 views

How to access the files present inside namespace to the outside in Linux Machine?

I have linux system where i created network namespace "BLUE_NAME", requirement to access the /var/tmp files present in the BLUE_NAME network space to outside of the name space (Host Machine).Request ...
3
votes
1answer
1k views

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 ...
1
vote
1answer
228 views

Ping not working in network namespace

If I do: sudo ip link add l4 type veth sudo ip addr add "7.7.7.7/24" dev l4 ping 7.7.7.7 PING 7.7.7.7 (7.7.7.7) 56(84) bytes of data. 64 bytes from 7.7.7.7: icmp_seq=1 ttl=64 time=0.023 ms 64 bytes ...
2
votes
1answer
810 views

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. ...
0
votes
2answers
2k views

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 ...
1
vote
1answer
1k views

How to run a program in the context of a VRF in Linux

I have created a VRF and I have added interfaces and routes to my VRF. My VRF is as shown below. My VRF is names wan1: [root@host ~]# ip route list vrf wan1 default via 12.12.12.12 dev enp1s0.4025 ...
0
votes
0answers
47 views

Two physically different devices on different interfaces with the same IP

I have two GoPro cameras that I am trying to connect to simultaneously. They each act as routers, which my two wireless cards connect to. The problem is, they both have IP 10.5.5.9, and I want to be ...
0
votes
0answers
350 views

Forward Traffic between Namespaces

I have 3 interfaces: eth0 eth1 eth2: eth0 is directly connected to the Internet. eth1 and eth2 are connected to an external switch with no Internet connectivity. My goal was to connect eth1 and eth2 ...
0
votes
0answers
89 views

Restore namespace for adapters lost to LXC

First, is there any method to list all adapters on a host even when held in another namespace, and second, how can I restore them if they don't automatically come back when a container is destroyed? ...
0
votes
1answer
316 views

Linux netns: run different commands with different IP's on one physical interface [closed]

I have a Debian Stretch VPS with 4 IPv4 addresses. I want to run several programs, binding them to specific IP addresses (To make outgoing HTTP requests from different IP's). So for example command ~$...
2
votes
2answers
733 views

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 ...
0
votes
2answers
519 views

Adding vrf interface to a network namespace

I am trying to add a VRF interface to a network namespace in Linux. I am getting RTNETLINK answers: invalid argument. Kernel version I am using is 4.15.0 from kernel.org Below is the exact list of ...
0
votes
1answer
575 views

ifconfig up does not execute from cron

I'm attempting to combine Scott Lowe's guide to creating a namespace with this answer on forwarding traffic between two interfaces. I have this script that runs on each reboot using the cron @reboot ...
2
votes
1answer
831 views

Inter namespace communication over linux bridge

So I have the following scenario: I have a server with 1 physical network interface. On this server I want to create 2 networking namespaces (NS_NASty and NS_MongoDB). Both namespaces should be able ...
1
vote
0answers
515 views

How does non-namespace specific sysctl variables work in the context of network namespaces?

Let's assume the systctl variables net.ipv4.tcp_wmem and net.ipv4.tcp_rmem. To my understanding, these variables can not be set per-namespace (but very soon apparently). My understanding is that ...
1
vote
0answers
121 views

Run nscd in multiple network namespaces

How to run an instance of nscd daemon per network namespace? I did the following: ip netns exec <network_namespace> /usr/sbin/nscd However, it threw output /usr/sbin/nscd: already running ...
3
votes
0answers
525 views

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 ...
0
votes
1answer
273 views

Linux transparent bridge: dhclient kills all traffic

I'm encountering a very odd situation with Hypriot OS. Network configuration: +--------+ +------+-----+------+ +---------------------+ +-------+ + laptop +--+ eth0 + br0 + eth1 +--+ router @ 10....
1
vote
0answers
232 views

Linux namespace networking

I am trying to allow internet connectivity from a network namespace. I tried doing this with the docker0 bridge running in the global namespace based on this talk. If I try to ping within the new ...
2
votes
1answer
1k views

openvpn post-up script fails with “Operation not permitted” if and only if openvpn is run by systemd

I have this post-up script that is run by openvpn: #!/bin/bash echo "I am: `whoami`" echo "Moving interface into the netns" ip link set dev "$1" up netns hydrogenvpn mtu "$2" echo "Listing" ip netns ...
1
vote
2answers
79 views

using ethernet ipv4 as internal bus while allowing the full ipv4 address range for the external interface

We have designed a device to be used as one device, but using ethernet ipv4 inside to communicate with internal not linux-based ipv4-speaking peripherals, juste like what we could do using pci or usb, ...
1
vote
1answer
3k views

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 ...
6
votes
2answers
6k views

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.
3
votes
0answers
248 views

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 ...
10
votes
3answers
14k views

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 (...
3
votes
1answer
2k views

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 ...
1
vote
0answers
702 views

How to allow applications in network namespace access to global filesystem?

I have several applications that are potentially high-risk and high-throughput (like bind, ntpd, etc.). I plan on having a "management domain" for OS tasks, updates, SNMP, automation, etc. and a "...
0
votes
2answers
2k views

How to connect custom network namespace to root network namespace?

I would like to connect the root network namespace to my custom network namespace in my Ubuntu box. Here is my network diagram: Basically my custom network namespace is the one who control the vm ...
2
votes
2answers
4k views

How to configure a Linux network namespace that allows UDP broadcast

I'm trying to use the ip netns family of commands in Linux to create a network namespace in which I can run a program that uses UDP broadcast. I do not need access to the Internet, or any interface on ...
2
votes
1answer
3k views

Linux kernel bug w/ netns and/or Xen guest - “unregister_netdevice: waiting for lo to become free”

I am running a web crawler in a Xen-based VM (on Linode); it makes heavy use of network namespaces to control use of VPNs on a per-crawl-process basis. It's been running mostly continuously for the ...
-1
votes
1answer
635 views

Hosts cannot ping in two name spaces using Open Vswitch

I have two name spaces red and blue. Red is connected to host1, and blue is connected to host2, but these two hosts cannot ping each other. Here is the commands that I put: ip link add host1 type ...
14
votes
3answers
17k views

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: ...
1
vote
1answer
196 views

process group A default route tun0, B default route tun1, etc

I have a Linux box with N tunnel interfaces, tun0, tun1, and so on. I want to set things up so that a particular group of processes, A, has its default (and only) route pointed at tun0. Meanwhile, a ...
4
votes
2answers
5k views

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 ...
1
vote
1answer
7k views

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 +--------+ +--------...
3
votes
1answer
4k views

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 <...