Monday 19 October 2009

How to find a computer name on a network from the IP address

How do you find the computer name on a network from the IP address ?

The solution is actually quite simple, you just use a MS-DOS command that will query the network and return the name. The syntax is as follows :

nbtstat -a "ip address"

Walkthrough

1. Go to the Start menu
2. Click Run
3. In the Run window type, “cmd”. This will pop up a black command window.
4. Type in nbtstat -a "your IP address here".
5. Press enter

Example

 nbtstat -a "10.1.1.73"

 Example Output

Local Area Connection :

Node IpAddress: [10.1.1.72] Scope Id: []

            NetBIOS Remote Machine Name Table

        Name               Type         Status

    ---------------------------------------------

    FELIX               <00>  UNIQUE      Registered

    DOMAIN         <00>  GROUP       Registered

    FELIX              <20>  UNIQUE      Registered

    DOMAIN        <1E>  GROUP       Registered

     MAC Address = 00-15-D4-E4-3C-83

 Taking the above example the computer name for IP address 10.1.1.73  is ‘Felix’.

Additional info

Nbtstat is a MS-DOS utility that displays protocol statistics and current TCP/IP connections using NBT (NetBIOS over TCP/IP).

There are many other parameters that can be used with nsbstat and they are as follows :

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 addresses to computer NETBIOS names.
-RR(ReleaseRefresh) Sends Name Release packets to WINs and then, starts Refresh
RemoteNameRemote host machine name.
IP addressDotted decimal representation of the IP address.
intervalRedisplays selected statistics, pausing interval seconds between each display. Press Ctrl+C to stop redisplaying statistics.


No comments:

Post a Comment