Disabling and Re-enabling NetBIOS

NetBIOS provides the following three services:

Name Service

The name service is for name registration and resolution and utilizes UDP port 137.

Datagram Service

The datagram service is for connectionless registration communication over a network. It allows for message broadcasts to all computers on a network and receipt of mailslot messages in order to locate domain controllers via NetBIOS-based discovery. The datagram service utilizes UDP port 138.

Session Service

The session service enables two computers to establish a connection for SMB traffic. The session service utilizes UDP port 139.

NetBIOS services are enabled by default. If you want to disable NetBIOS services, set the value of the netbios_enable property to false.

You should disable NetBIOS services if all of the following conditions are met:

  • No SMB clients use NetBIOS over TCP/IP (NBT) as the transport layer.

  • NetBIOS is not used for name resolution. NetBIOS can be used for name resolution if DNS is not supported or is not working on the local network.

  • NetBIOS is not used for domain controller discovery.

By default, the first label of the fully qualified AD domain name is the NetBIOS domain name. If a non-default NetBIOS domain name is specified for AD domain join, then Oracle Solaris will perform NetBIOS-based domain controller discovery as part of the domain join process. To eliminate the dependency on NetBIOS-based domain controller discovery, use fully qualified AD domain names.

The netbios_enable property enables or disables all NetBIOS services. A value of true (the default) enables NetBIOS name (UDP port 137), datagram (UDP port 138), and session (TCP port 139) services and enables the ability to locate domain controllers via NetBIOS-based discovery. A value of false disables all of these services and capabilities.

Use the sharectl command to change the value of the netbios_enable property. The default value is true:

$ sharectl get -p netbios_enable smb
netbios_enable=true

To disable NetBIOS services, set the value of the netbios_enable property to false:

$ sharectl set -p netbios_enable=false smb
$ sharectl get -p netbios_enable smb
netbios_enable=false

To re-enable NetBIOS services, set the value of the netbios_enable property to true:

$ sharectl set -p netbios_enable=true smb
$ sharectl get -p netbios_enable smb
netbios_enable=true