> On Oct 9, 2015, at 13:00, Dan Williams <[email protected]> wrote: > > On Fri, 2015-10-09 at 12:53 -0700, Johannes Ernst wrote: >> man systemd-nspawn, section on --network-veth >> "The container side of the Ethernet link will be named >> <literal>host0</literal>." >> >> container> ip link >> ... >> 2: host0@if9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel >> state UP mode DEFAULT group default qlen 1000 >> link/ether ce:d3:4f:6c:44:5f brd ff:ff:ff:ff:ff:ff link-netnsid 0 >> >> Where does the @if9 come from, and what’s the naming scheme here? > > It comes from /sbin/ip. What's after the @ is the interface index of > the veth peer, so "if9" == interface index 9 and that tells you what the > peer link will be outside the container/namespace. The stuff after the > @ isn't controlled by systemd/udev, the "if" prefix is hardcoded > in /sbin/ip.
This is actually cool, and as far as I can find, entirely undocumented :-) I put a paragraph on the Arch wiki: https://wiki.archlinux.org/index.php/Systemd-nspawn#Virtual_Ethernet_interfaces based on your information. Thank you! Cheers, Johannes. _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
