Skip to main content

Questions tagged [veth]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
18 views

Is it possible to use a veth created in a user namespace as a regular user in a practical way?

This question hints that it is possible to create a veth (which normally requires root) from inside a user and network namespace, and indeed: user@host$ unshare --user --net -r =bash root@namespace# ...
F.X.'s user avatar
  • 329
2 votes
1 answer
142 views

What is the reason why creating a veth requires root?

I recently became aware of solutions like slirp4netns or passt/pasta which essentially work around the fact that you can't create a pair of veth network interfaces without root (or CAP_NET_ADMIN). ...
F.X.'s user avatar
  • 329
0 votes
1 answer
108 views

Debian: Can you define veth in /etc/network/interfaces?

I found the following documentation for Ubuntu. Does Debian have a similar page? I'm looking for something comprehensive-- not just a few random examples. I can create veth using the ip command, so I ...
David's user avatar
  • 3
0 votes
0 answers
33 views

Connecting network namespaces indirectly through host by veth pairs

I am trying to connect two network namespaces indirectly by connecting each namespace to my host through a veth pair like below picture. This is my script: #! /bin/bash sudo ip netns add NS1 sudo ip ...
M.S.'s user avatar
  • 1
0 votes
0 answers
48 views

DHCP server can not receive my client in virtual interface

I'm writing a DHCP server and my own client using socket in Python3. My client: def client(self): print("DHCP client is starting...\n") dest = ('<broadcast>', ...
anhbe58's user avatar
2 votes
1 answer
442 views

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. ...
Rahul Raj Purohit's user avatar
1 vote
1 answer
3k views

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:...
Daniel Walker's user avatar
1 vote
0 answers
237 views

Which app create the veth in my os?

Show network interface which named as vethf2842c3: ifconfig | grep veth -A 7 vethf2842c3: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC> mtu 1500 inet 169.254.83.218 netmask 255....
newview's user avatar
  • 205
1 vote
0 answers
1k views

Network routing through veth0 / bridge for userspace QEMU VM?

I would like to filter and capture traffic from a virtual machine. This VM must run in userspace. Capturing requires root, I know (though I hope to minimise root activity needed later). The easiest ...
Ned64's user avatar
  • 8,984
0 votes
1 answer
309 views

ipv4 forwarding breaks bridges and veths

I've successfully gotten the following to work: ip netns add quarantine ip link add eth0-q type veth peer name veth-q ip link add br0 type bridge ip link set veth-q master br0 ip link set br0 up ip ...
Arno's user avatar
  • 1
6 votes
2 answers
8k views

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 ...
Ryan Lyu's user avatar
  • 204
1 vote
0 answers
204 views

Why I have so many veth interfaces in firewalld Zone

I have a server that runs docker and firewalld, everything works fine but I cannot reload firewalld with the command firewall-cmd --reload One thing that I notice is in the result of this command [...
Federal Reserve's user avatar
2 votes
1 answer
3k views

Why two bridged veth cannot ping each other?

I need to set up a network environment where two veth interfaces is attached to one bridge and they need to be able to communicate with each other. So I execute the following commands in a clean ...
Entropy Xu's user avatar
2 votes
1 answer
1k views

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 ...
Anand's user avatar
  • 23
1 vote
1 answer
6k views

How to set up a bridge interface, add eth0 to it, and have internet connection

I am trying to set up br0 with eth0 and veth1 on a headless server where I am logged in via ssh. I am doing this as a preparation to run a systemd service in a special namespace. This namespace will ...
bomben's user avatar
  • 509
1 vote
1 answer
1k views

cant connect tap interface with eth

I wrote a simple c program which can send and receive ether net frames using /dev/net/tun and I connected the tap interface with my ethernet nic using both the virtual bridge and veth pair. I expected ...
KingKoopa's user avatar
0 votes
0 answers
356 views

How would I manually set an interfaces type in networkmanager?

At the moment I have been playing around with some VMs and networking recently (just for the learning experiance), at the moment I have an interface on the host called "veth0" connected to ...
Sol33t303's user avatar
  • 123
0 votes
1 answer
81 views

Are virtual network interfaces useful outside of container usage?

My networking background is limited. I've been trying to understand more about VETHs, TUN/TAP, etc virtual network interfaces. So far it seems that they make sense from a container perspective, but ...
lucidquiet's user avatar
  • 2,949
0 votes
0 answers
69 views

Veth and Cisco nx-os

Ok, so I've been toying with veth links for my Cisco routers and they have been working fine. However when you throw in a virtual switch like the Cisco nx-osv or vios l2 image, using veth interfaces ...
Heath C's user avatar
6 votes
0 answers
666 views

Opening /proc/<pid>/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/<pid>/net/dev it can ...
Arne Welzel's user avatar
5 votes
1 answer
975 views

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....
Pierre Allix's user avatar
4 votes
1 answer
2k views

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 ...
Lee Avital's user avatar
2 votes
2 answers
3k views

Identifying physical network devices using /sys/class/net/<iface>

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/<iface>. There are 2 attributes ...
Dinesh Gowda's user avatar
0 votes
1 answer
1k views

No ICMP response for veth devices in same namespace

I have created a veth device pair as follows in Ubuntu 16.04: $ sudo ip link add veth1 type veth peer name veth2 $ sudo ip link set dev veth1 up $ sudo ip link set dev veth2 up $ sudo ip address add ...
Jake's user avatar
  • 1,393
2 votes
1 answer
848 views

Is veth layer 2 or layer 3 device?

Veth device pairs allow creation of a virtual ethernet tunnel on a linux system. I want to ask whether a veth device should be considered a layer 2 or layer 3 device ? Based on my understanding veth ...
Jake's user avatar
  • 1,393
0 votes
1 answer
2k views

Route from netns through a veth link

I have created a network namespace (with ip netns add) and a pair of veth links, virt-a and virt-b. The physical link in the root namespace is named eth0. virt-a is in the root namespace and virt-b is ...
user10387080's user avatar
2 votes
1 answer
3k views

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 ...
dippynark's user avatar
  • 327
2 votes
1 answer
2k views

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 ...
TheDiveO's user avatar
  • 1,337
17 votes
3 answers
18k views

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 ...
TheDiveO's user avatar
  • 1,337
4 votes
0 answers
3k views

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. ...
devil0150's user avatar
  • 681
2 votes
1 answer
245 views

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 <host2-pid> But it ...
trung's user avatar
  • 21
-1 votes
1 answer
686 views

Bridging two virtual machines on difference bridges

I have two VMs: vm1 & vm2. The host and VMs both are Ubuntu 14.04 LTS. Each VM "connects" to a bridge which connects to a virtual ethernet interface and end up at eth0 i.e. vm1 (192.168.0.23) -&...
a_fan's user avatar
  • 115
2 votes
1 answer
729 views

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 ...
jamesmcm's user avatar
5 votes
0 answers
770 views

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 ...
Vi.'s user avatar
  • 5,853