'nbtstat'에 해당되는 글 2건

  1. 2009.09.28 nmblookup
  2. 2009.09.28 nbtstat
# 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 구차니

댓글을 달아 주세요

Microsoft/Windows2009.09.28 16:19
C:\>nbtstat /?

Displays protocol statistics and current TCP/IP connections using NBT(NetBIOS over TCP/IP).

NBTSTAT [ [-a RemoteName] [-A IP address] [-c] [-n] [-r] [-R] [-RR] [-s] [-S] [interval] ]

  -a   (adapter status) Lists the remote machine's name table given its name
  -A   (Adapter status) Lists the remote machine's name table given its IP address.
  -c   (cache)          Lists NBT's cache of remote [machine] names and their IP addresses
  -n   (names)          Lists local NetBIOS names.
  -r   (resolved)       Lists names resolved by broadcast and via WINS
  -R   (Reload)         Purges and reloads the remote cache name table
  -S   (Sessions)       Lists sessions table with the destination IP addresses
  -s   (sessions)       Lists sessions table converting destination IP ddresses to computer NETBIOS names.
  -RR  (ReleaseRefresh) Sends Name Release packets to WINS and then, starts Refresh

  RemoteName   Remote host machine name.
  IP address   Dotted decimal representation of the IP address.
  interval     Redisplays selected statistics, pausing interval seconds
               between each display. Press Ctrl+C to stop redisplaying

nbtstat는 윈도우 내장된 NetBIOS 도우미 프로그램중에 하나이다.
-c 를 하면 현재 reolve된 녀석들의 목록이 나오고
-R 을 reolve table을 Purge 하고 다시 불러온다.

[링크 : http://cc10.net/gag/2110]
신고
Posted by 구차니
TAG nbtstat

댓글을 달아 주세요