Questions tagged [veth]

29 questions
15
votes
3 answers

How to find the network namespace of a veth peer ifindex?

Task I need to unambiguously and without "holistic" guessing find the peer network interface of a veth end in another network namespace. Theory ./. Reality Albeit a lot of documentation and also answers here on SO assume that the ifindex indices of…
TheDiveO
  • 1,187
  • 1
  • 10
  • 24
6
votes
2 answers

Linux bridge: what does master mean in the "ip link set"?

In the following diagram, each color stands for a network namespace, which is connected by a Linux bridge v-net-0. veth-red and veth-red-br are a pair of veth. veth-blue and veth-blue-br are a pair of veth. v-net-0 is a linux bridge. what does…
Ryan Lyu
  • 194
  • 1
  • 10
5
votes
0 answers

Opening /proc//net/dev prevents network namespace from expiring, is this expected?

I'm looking for input whether the following observation related to network namespace expiration is expected, or should be reported as bug? When some process opens /proc//net/dev it can prevent/delay the expiration of the other process's…
5
votes
1 answer

veth interfaces performance problem

On a fast AWS machine (m5.2xlarge), I am creating around 600 veth interfaces, each one having a little server (with socat) running on a port. I then start sending around 7kb/second of data per server. When sending to about 500 servers everything…
4
votes
0 answers

Limit on number of virtual interfaces in linux?

I am running some automated tests with docker containers, and this includes creating a lot of veth interfaces (about 2 per container, ~1000 containers). Whenever I do this, the system shuts down. Reading the log in /var/log/messages tells me to…
devil0150
  • 651
  • 3
  • 7
  • 14
4
votes
0 answers

Is there a thing like "veth", but without link-level headers?

When I use separate network namespace, I often set up networking there using veth: ip link add type veth ip link set veth0 netns 1 ifconfig veth1 192.168.60.2 ip route add default via 192.168.60.1 This includes unnecessary random MAC addresses for…
Vi.
  • 5,528
  • 7
  • 34
  • 68
3
votes
1 answer

I can ping across namespaces, but not connect with TCP

I'm trying to set up two network namespaces to communicate with eachother. I've set up two namespaces, ns0 and ns1 that each have a veth pair, where the non-namespaced side of the veth is linked to a bridge. I set it up like this: ip link add veth0…
2
votes
1 answer

Root network namespace as transit between 2 other net namespaces

I am trying to communicate between two network namespaces that are connected through the root namespaces using veth pairs as seen in the diagram. I am unable to perform a ping from netns A to netns B. Additionally I can ping from root namespace to…
2
votes
1 answer

How to setup veth with 9000 MTU to simulate sending and receiving large UDP multicast packets on the same host?

The sender needs to transmit large data packets to the receiver (which is on the same host with 1500 MTU) and I think this can be simulated using veth with 9000 MTU, from my reading on it. But I'm not able to figure out how exactly to do that - most…
Anand
  • 23
  • 2
2
votes
2 answers

Identifying physical network devices using /sys/class/net/

I wanted to know if there is a way to differentiate physical and virtual network devices. ip a doesn't have an option. So I am trying /sys/class/net/. There are 2 attributes addr_assign_type and type, but type only tells Ethernet or loopback…
Dinesh Gowda
  • 121
  • 3
2
votes
1 answer

Is it possible to send packets between network namespaces using only TUN/TAP interfaces?

I am trying to understand the difference between different types of (virtual) interfaces (e.g. TUN/TAP, veth etc.) and was studying some of these types within the context of containers. Is it possible to send packets between a container (in its own…
2
votes
1 answer

Identify if a network interface is a `veth` using `/sys/class/net`?

Is it possible to unambiguously identify that a given network interface, such as eth1, is actually a type veth network interface? Please note that in containers, their network interface names typically start with eth* instead of veth* and one cannot…
TheDiveO
  • 1,187
  • 1
  • 10
  • 24
2
votes
1 answer

veth between two network process namespaces?

I created two namespaces: unshare -mnpf bash --norc -is host1 (& host2) At the prompt of host1, I run: ip link add name host1-eth0 type veth peer name host2-eth0 netns But it fails with RTNETLINK answers: No such process How could I…
trung
  • 21
  • 1
2
votes
1 answer

Using a VPN for certain applications via a network namespace

I am trying to use a network namespace for VPN-specific traffic, using this guide: https://schnouki.net/posts/2014/12/12/openvpn-for-a-single-application-on-linux/ on Debian. Everything works with regard to setting up the namespace, and the bride,…
jamesmcm
  • 41
  • 5
1
vote
1 answer

Relationship between bridge and veth for Docker network

On my Ubuntu 22.04 host, I've created a Docker network with the bridge driver and started up a container within that network. Running ip addr on my host, I see these two interfaces: 5: br-fc7599764562: mtu 1500…
Daniel Walker
  • 635
  • 1
  • 7
  • 29
1
2