ifconfig(4) name and tap(4)'s character special device name

Harry Schmalzbauer freebsd at omnilan.de
Fri Jun 2 11:08:20 UTC 2017


renaming vmnet/tap(4) interfaces, defined in rc.conf(5) via
"cloned_interfaces" e.g, isn't prohibited by rc(8)-network.subr nor by
If such a interface is renamed, the Ethernet device shows up correctly,
with the new name and ifconfig(8) also reports the new name if it's
created and renamed in the same invocation.
Problem is, the control device isn't renamed, it will keep it's initial
creation name like tap0 and I found no userland way to determine the
corresponding Ethernet IF name.

Several solutions come to my mind:
– Prohibit renaming of Ethernet-group tap (and tun?) interface types.
– Extend ifconfig(8) to alter the character special device name.
Either rename or create symlink?
– Let rc(8)-network.subr alter character special device name.
Either rename or create symlink?

Has anybody else thought about that problem?
The last mentioned possibility of course wouldn't cover manual CLI
renaming, so most likely isn't feasable.

Otoh, there's some magic I haven't discovered yet:
Defining ifconfig_bridge0_name="br0" in rc.conf(5), but _not_ listing
bridge0 in cloned_interfaces, leads to run-time auto-renaming as soon as
I manually invoke 'ifconfig bridge0 create' (result is ifconfig(8) lists
br0, although I haven't invoked 'ifconfig bridge0 name br0')!
Haven't found any traces in devd.conf(5) and haven't really inspected
rc(8)-network.subr careful enough to know why/how that happens!
But maybe this method could also be utilized to handle the
vmnet/tap-character-special-device renaming?


More information about the freebsd-stable mailing list