Native support for L2TPv3 (e.g. "pseudo-wire") has been added to recent kernels. While Documentation/networking/l2tp.txt on those kernels states that the "ip" tool in the iproute2-package supports new commands to support setting up tunnel devices accordingly, the patches in question have been rejected by the maintainer of iproute2, Stephen Hemminger. Instead, he proposed a new tool, "l2tpv3tun", which was written by James Chapman of openl2tp.org. Find attached an ebuild for this utility. It behaves exactly as the "ip l2tp" commands which are to be found in the aforementioned part of the linux kernel documentation. Reproducible: Always
Created attachment 267959 [details] l2tpv3tun-0.2.ebuild
Created attachment 275401 [details] l2tpv3tun-0.2.ebuild Here is somewhat enhanced ebuild: 1) Check for minimal kernel version. 2) Check for required kernel config options. 3) Depend on libnl>=1.0, because libnl1 is required on fedora. 4) Honor user CFLAGS and LDFLAGS, remove -g and -Werror from defaults. I'd like to see this package finally in the tree, but openl2tpd itself (bug 195461) is hanging on bugzilla for more than three years, so little hope is left. I currently maintain up-to-date version of openl2tpd in bircoph overlay, so this package will go there as well until better times :).
Created attachment 275403 [details, diff] l2tpv3tun-0.2-makefile.patch Patch makefile to honor system *FLAGS, sanitize defaults and to install in /usr/sbin.
Now sys-apps/iproute2-3.3 support l2tp tunnel operation, i.e : ip l2tp Usage: ip l2tp add tunnel remote ADDR local ADDR tunnel_id ID peer_tunnel_id ID [ encap { ip | udp } ] [ udp_sport PORT ] [ udp_dport PORT ] Usage: ip l2tp add session tunnel_id ID session_id ID peer_session_id ID [ cookie HEXSTR ] [ peer_cookie HEXSTR ] [ offset OFFSET ] [ peer_offset OFFSET ] ip l2tp del tunnel tunnel_id ID ip l2tp del session tunnel_id ID session_id ID ip l2tp show tunnel [ tunnel_id ID ] ip l2tp show session [ tunnel_id ID ] [ session_id ID ] Where: NAME := STRING ADDR := { IP_ADDRESS | any } PORT := { 0..65535 } ID := { 1..4294967295 } HEXSTR := { 8 or 16 hex digits (4 / 8 bytes) }
Yeah, l2tpv3tun is needed no longer (though it was just incorporated in iproute2).