2.2.3.2 Creating Lmhosts Entries for Specific NetBIOS Names

A ComputerName in the LMHOSTS file can be up to 15 bytes in length. Names shorter than 15 bytes are padded with spaces.

However, it might be necessary to resolve a specific 16-byte NetBIOS name to a NetBIOS application running on a remote computer. Any arbitrary 16-byte NetBIOS name can be configured in the LMHOSTS file by using the following syntax.

IPv4Address "<Name><SpacePadding>\0xNN"

In which:

  • IPv4Address is the IPv4 address to which this NetBIOS name is resolved.

  • <Name> is the first part of the NetBIOS name (up to 15 bytes).

  • <SpacePadding> is needed to ensure that the full NetBIOS name is 16 bytes. If the Name portion has fewer than 15 bytes, it MUST be padded with spaces up to 15 bytes.

  • \0xNN indicates the two-digit hexadecimal representation of the 16th byte of the NetBIOS name. The syntax \0xNN can represent any byte in the NetBIOS name but is most often used for the 16th character.