# nmblookup --help
Usage: <NODE> ...
  -B, --broadcast=BROADCAST-ADDRESS      Specify address to use for broadcasts
  -f, --flags                            List the NMB flags returned
  -U, --unicast=STRING                   Specify address to use for unicast
  -M, --master-browser                   Search for a master browser
  -R, --recursion                        Set recursion desired in package
  -S, --status                           Lookup node status as well
  -T, --translate                        Translate IP addresses into names
  -r, --root-port                        Use root port 137 (Win95 only replies to this)
  -A, --lookup-by-ip                     Do a node status on <name> as an IP Address

Help options:
  -?, --help                             Show this help message
  --usage                                Display brief usage message

Common samba options:
  -d, --debuglevel=DEBUGLEVEL            Set debug level
  -s, --configfile=CONFIGFILE            Use alternate configuration file
  -l, --log-basename=LOGFILEBASE         Base name for log files
  -V, --version                          Print version

Connection options:
  -O, --socket-options=SOCKETOPTIONS     socket options to use
  -n, --netbiosname=NETBIOSNAME          Primary netbios name
  -W, --workgroup=WORKGROUP              Set the workgroup name
  -i, --scope=SCOPE                      Use this Netbios scope

[링크 : http://linux.die.net/man/1/nmblookup]

NetBIOS를 resolve 할 수 있는 방법인데

# nmblookup -T "SERVERNAME"
querying STREAM on 192.168.10.255
192.168.10.4 STREAM<00>

# nmblookup -A "IP ADDRESS"
Looking up status of 192.168.10.4
        STREAM          <00> -         B <ACTIVE>
        WORKGROUP       <00> - <GROUP> B <ACTIVE>
        STREAM          <20> -         B <ACTIVE>
        WORKGROUP       <1e> - <GROUP> B <ACTIVE>

        MAC Address = 00-00-00-00-00-00

# nmblookup -S "SERVERNAME"

querying STREAM on 192.168.10.255
192.168.10.4 STREAM<00>
Looking up status of 192.168.10.4
        STREAM          <00> -         B <ACTIVE>
        WORKGROUP       <00> - <GROUP> B <ACTIVE>
        STREAM          <20> -         B <ACTIVE>
        WORKGROUP       <1e> - <GROUP> B <ACTIVE>

        MAC Address = 00-00-00-00-00-00


보다시피 -S는 -A 와 -T의 조합으로 실행되고, -T를 사용하면 간편하게 아이피를 구할 수 있다.



2011.04.28 추가
헐 검색하고 나니 이미 찾았던 내용이라니 ㅠ.ㅠ
windows의 nbtstat와 유사한 기능을 가진 유틸리티이다. 
Posted by 구차니