Name

nmblookup — NetBIOS 名を検索する NetBIOS over TCP/IP クライアント

Synopsis

nmblookup [-M] [-R] [-S] [-r] [-A] [-h] [-B <broadcast address>] [-U <unicast address>] [-d <debug level>] [-s <smb config file>] [-i <NetBIOS scope>] [-T] [-f] {name}

解説

このツールは samba(7) の一部である。

nmblookup は、NetBIOS over TCP/IP が使われているネットワークにおいて、NetBIOS 名の問い合わせや、IP アドレスへの変換に使われる。オプションを設定することで、 特定のブロードキャストアドレスや特定のマシンに対して名前の問い合わせを 行なう事ができる。全ての問い合わせは、UDP を使って行なわれる。

オプション

-M

タイプ 0x1d の NetBIOS 名、name に問い合わせることで、 マスタブラウザの検索をおこなう。name が "-" の場合、特殊な名前である __MSBROWSE__ の検索を行う。 もし name に "-" を使用したいのなら、"-" が引数として扱われない ように注意しなければならない。使用例: nmblookup -M -- -

-R

再帰検索を行なう為に、パケット中の 再帰要求ビットを設定する。これは、WINS サーバが動作している マシンに対して問い合わせを行ない、WINS サーバに名前を 問い合わせたいときに使用する。このビットが設定されていない場合、 通常の(ブロードキャスト応答による) NetBIOS 名の応答処理が 行われる。詳細は RFC1001 および RFC1002 を参照の事。

-S

名前問い合わせで IP アドレスが返却された場合、 ノードステータスの問い合わせも行なう。 ノードステータスの問い合わせは、そのホストが登録している NetBIOS 名の一覧を返却する。

-r

UDP のポート 137 を使って、UDP データグラムを送受信する。このオプションは、 Windows 95 がパケットの送信元のポートを無視して UDPのポート 137 にしか応答を返却しないというバグに対応する為のものである。 しかし、ほとんどの UNIX システムで、このポートを使用するには root 権限が必要であり、更に、nmbd(8) デーモンが動作している場合、 このポートを使用している。

-A

name を IP アドレスとして解釈して、ノードステータスの問い合わせを このアドレスに行なう。

-n|--netbiosname <primary NetBIOS name>

This option allows you to override the NetBIOS name that Samba uses for itself. This is identical to setting the parameter in the smb.conf file. However, a command line setting will take precedence over settings in smb.conf.

-i|--scope <scope>

This specifies a NetBIOS scope that nmblookup will use to communicate with when generating NetBIOS names. For details on the use of NetBIOS scopes, see rfc1001.txt and rfc1002.txt. NetBIOS scopes are very rarely used, only set this parameter if you are the system administrator in charge of all the NetBIOS systems you communicate with.

-W|--workgroup=domain

Set the SMB domain of the username. This overrides the default domain which is the domain defined in smb.conf. If the domain specified is the same as the servers NetBIOS name, it causes the client to log on using the servers local SAM (as opposed to the Domain SAM).

-O|--socket-options socket options

TCP socket options to set on the client socket. See the socket options parameter in the smb.conf manual page for the list of valid options.

-h|--help

Print a summary of command line options.

-B <broadcast address>

指定されたブロードキャストアドレスに対し 問い合わせを送信する。このオプションを指定しない場合の nmblookup のデフォルト動作は、問い合わせを ネットワークインタフェースのブロードキャストアドレスに送信する。 ネットワークインタフェースのブロードキャストアドレスは、 自動検出に任せるか smb.conf(5) の interfaces パラメータで指定する。

-U <unicast address>

指定されたアドレスもしくは unicast address で指定したホストに 対して、ユニキャストの問い合わせを行なう。このオプションは、 (-R オプションと共に) WINS サーバに問い合わせを行なう時には必須である。

-d|--debuglevel=level

level is an integer from 0 to 10. The default value if this parameter is not specified is 0.

The higher this value, the more detail will be logged to the log files about the activities of the server. At level 0, only critical errors and serious warnings will be logged. Level 1 is a reasonable level for day-to-day running - it generates a small amount of information about operations carried out.

Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic.

Note that specifying this parameter here will override the parameter in the smb.conf file.

-V|--version

Prints the program version number.

-s|--configfile <configuration file>

The file specified contains the configuration details required by the server. The information in this file includes server-specific information such as what printcap file to use, as well as descriptions of all the services that the server is to provide. See smb.conf for more information. The default configuration file name is determined at compile time.

-l|--log-basename=logdirectory

Base directory name for log/debug files. The extension ".progname" will be appended (e.g. log.smbclient, log.smbd, etc...). The log file is never removed by the client.

-T

このパラメータは、問い合わせ中に発見した あらゆる IP アドレスについて DNS の逆引きを行うことで、 DNS 名を取得し、標準的な表示である

IPアドレス .... NetBIOS名

の組の前に表示する。

-f

検索した名前に適用されているフラグを表示させる。 フラグには Response(レスポンス)、 Authoritative(権威がある)、Recursion_Desired、 Recursive_available、Broadcast(ブロードキャスト)などがある。

name

これは問合せ対象の NetBIOS 名である。 オプションの指定によっては、NetBIOS 名の場合もあれば、IP アドレスの場合もある。NetBIOS 名の場合は、名前の最後に '#<type>' を追加する事で名前のタイプを指定する事ができる。 名前として「*」を指定することもでき、その場合はブロードキャストの範囲内に登録されている全ての名前が返却される。