25.3. USB Device Mode Network Interfaces
Prev | Chapter 25. USB Device Mode / USB OTG | Next

## 25.3. USB Device Mode Network Interfaces

Virtual network interfaces support is provided by templates number 1, 8, and 10. Note that none of them works with Microsoft Windows. Other host operating systems work with all three templates. Both usb_template(4) and if_cdce(4) kernel modules must be loaded.

Make sure the necessary modules are loaded and the correct template is set at boot by adding those lines to `/boot/loader.conf`, creating it if it does not already exist:

    if_cdce_load="YES"
    hw.usb.template=1

To load the module and set the template without rebooting use:

    # kldload if_cdce
    # sysctl hw.usb.template=1

Prev | Up | Next
25.2. USB Virtual Serial Ports | Home | 25.4. USB Virtual Storage Device

All FreeBSD documents are available for download at https://download.freebsd.org/ftp/doc/

Questions that are not answered by the documentation may be sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.