Is there anyone using a VPN with a tapX device?

Is there anyone using a VPN with a tap device ?

I could not make out if a tap device has tun_flags or tap_flags as the documentation does not spell that out: https://www.kernel.org/doc/html/latest/networking/tuntap.html

If someone could post the result of ls -l /sys/class/net/tap0 that would be highly appreciated.

Thank you :smiley:

From the link you gave:

  1. What is the difference between TUN driver and TAP driver?

TUN works with IP frames. TAP works with Ethernet frames.

  1. Does TAP driver support kernel Ethernet bridging?

Yes. Linux and FreeBSD drivers support Ethernet bridging.

So you can't put a tun device in a bridge, but you can put a tap device in a bridge. Sorry if this doesn't answer your question directly but I assume it's a way to derive an answer to it.

Lets assume I should have elaborated more. Let me rephrase: I'm modifying a script.

Currently it looks for /sys/class/net/tun0/tun_flags, but what I want to know is since I do not use tap, if one is created does it have:

/sys/class/net/tap0/tun_flags
or
/sys/class/net/tap0/tap_flags

fine ! haha

# ip tuntap add mode tap tap0
# cat /sys/class/net/tap0/tap_flags
cat: /sys/class/net/tap0/tap_flags: No such file or directory
# cat /sys/class/net/tap0/tun_flags
0x1802
# ip link del tap0
# ip tuntap add mode tun tap0
# cat /sys/class/net/tap0/tap_flags
cat: /sys/class/net/tap0/tap_flags: No such file or directory
# cat /sys/class/net/tap0/tun_flags
0x1801

Looks like it's tun_flags even when specifying a tap device

1 Like

Thank mate, you saved me a couple of hours of frustration :grin:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.