Re: Tap device problem on FreeBSD 14.2-RELEASE

From: Bakul Shah <bakul_at_iitbombay.org>
Date: Sat, 07 Dec 2024 22:45:10 UTC
$ uname -v
FreeBSD 14.2-RELEASE releng/14.2-n269506-c8918d6c7412 GENERIC
$ kldstat |grep 'if_.*tap'
$ kldstat -v |grep 'if_.*tap'
                388 if_tap
                386 if_tuntap
$ ifconfig tap5
ifconfig: interface tap5 does not exist
$ ls -l /dev/tap5
ls: /dev/tap5: No such file or directory
$ sudo ls -l /dev/tap5
crw-------  1 uucp dialer 0x89 Dec  7 14:40 /dev/tap5
$ ifconfig tap5
tap5: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=80000<LINKSTATE>
        ether 58:9c:fc:10:ff:80
        groups: tap
        media: Ethernet 1000baseT <full-duplex>
        status: no carrier
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

/dev/tap<n> is created on access (if you have the permission to do so)
and then ifconfig works. You may be able to trigger this by adding tap
related lines to /etc/devfs.conf such as

own	tap0	$user:$group	# replace with user and group you want
...

> On Dec 7, 2024, at 1:37 PM, Thomas Laus <lausts@acm.org> wrote:
> 
> I used FreeBSD-update to go from 14.1-RELEASE to 14.2-RELEASE and there is an issue with creating and using the tap device.  The device doesn't get created during the boot process and can't be created or used after the system is up.  The UPDATING file has just one entry concerning the tap device and that is change the 'tap' name in all configuration files with 'tuntap'. I did that and get an invalid device reply.  I installed the latest package for vm-bhyve which did not make any difference.  I also deleted /usr/obj/* and checked out a fresh /usr/src and rebuilt FreeBSD-14.2-RELEASE from source without anything working differently.
> 
> If anyone has a working tap device using FreeBSD 14.2-RELEASE, I would appreciate you sharing your bhyve portions of /etc/rc.conf, /etc/sysctl.conf and /boot/loader.conf files.
> 
> Thanks
> 
> Tom
> 
> 
> -- 
> Public Keys:
> PGP KeyID = 0x5F22FDC1
> GnuPG KeyID = 0x620836CF
> 
>