Chat LIVE With Programming Experts! There Are 23 Online Right Now...

Welcome to Dream.In.Code
Become an Expert!

Join 244,297 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 862 people online right now. Registration is fast and FREE... Join Now!




Convert LAN IP to Netbios Name

 
Reply to this topicStart new topic

Convert LAN IP to Netbios Name

homemade-jam
17 Nov, 2008 - 09:06 AM
Post #1

eee Guru
Group Icon

Joined: 17 Mar, 2008
Posts: 1,243



Thanked: 4 times
Dream Kudos: 50
My Contributions
Right, so I have a stream running on my lan and want to be able to conver the lan IP address' to the netbios names as I want to find out their identity, I've tried nbtstat -A 192.168.28.32 to no avail... icon_up.gif

User is offlineProfile CardPM
+Quote Post


no2pencil
RE: Convert LAN IP To Netbios Name
17 Nov, 2008 - 10:17 PM
Post #2

Unix Ronin
Group Icon

Joined: 10 May, 2007
Posts: 10,438



Thanked: 198 times
Dream Kudos: 2725
Expert In: Goofing Off

My Contributions
Assuming that you are on Linux, you could check your arp tables, & get the MAC address. You should be able to cross reference that with any networking devices (routers, hubs) that are logging connections on the lan.

I don't know of another way, sorry. Would be interesting to see what others suggest.
User is offlineProfile CardPM
+Quote Post

homemade-jam
RE: Convert LAN IP To Netbios Name
17 Nov, 2008 - 11:31 PM
Post #3

eee Guru
Group Icon

Joined: 17 Mar, 2008
Posts: 1,243



Thanked: 4 times
Dream Kudos: 50
My Contributions
Unfortunately I'm actually on windows here...

I can do it the other way around by pinging the netbios name and it resolves it to the ip address and tells me which is really annoying.
User is offlineProfile CardPM
+Quote Post

baavgai
RE: Convert LAN IP To Netbios Name
18 Nov, 2008 - 06:12 AM
Post #4

Dreaming Coder
Group Icon

Joined: 16 Oct, 2007
Posts: 3,572



Thanked: 268 times
Dream Kudos: 525
Expert In: C, C++, Java, C#, ASP.NET, PHP, Perl, Python, Oracle, SQL Server, MySql, HTML, JavaScript, Lua, Cheese

My Contributions
I don't believe the name you get back from ping is strictly netbios. Its supposed to be DNS, but has failover. With windows it's confusing, because you also have wins and depending on the setup, everyone will get registered in a windows DNS server. Or some service that's functioning as such.

Another tool windows has is nslookup. It's, ahem, a little cryptic but can theoretically find the info you want.

I'd say try nmap; not standard windows, but you can install it.

User is offlineProfile CardPM
+Quote Post

homemade-jam
RE: Convert LAN IP To Netbios Name
23 Nov, 2008 - 10:22 AM
Post #5

eee Guru
Group Icon

Joined: 17 Mar, 2008
Posts: 1,243



Thanked: 4 times
Dream Kudos: 50
My Contributions
Good point, I think Autoscan has the same feature iirc.

Got it: nslookup and then set type=ANY then ip address.

This post has been edited by homemade-jam: 23 Nov, 2008 - 10:27 AM
User is offlineProfile CardPM
+Quote Post

dbasnett
RE: Convert LAN IP To Netbios Name
25 Nov, 2008 - 06:11 AM
Post #6

D.I.C Head
**

Joined: 1 Oct, 2008
Posts: 224



Thanked: 13 times
My Contributions
what happened when you did nbtstat? it works on my pc.
User is offlineProfile CardPM
+Quote Post

homemade-jam
RE: Convert LAN IP To Netbios Name
8 Dec, 2008 - 12:05 PM
Post #7

eee Guru
Group Icon

Joined: 17 Mar, 2008
Posts: 1,243



Thanked: 4 times
Dream Kudos: 50
My Contributions
Actually they both work on my home network but when I try it on the larger college network it doesn't seem to have the same effect.

The queries seem to be stopping at some sort of server and resolving as untracable. I think is because communicating across the subnets is explicitly banned on the network.

This post has been edited by homemade-jam: 8 Dec, 2008 - 12:05 PM
User is offlineProfile CardPM
+Quote Post

danny_kay1710
RE: Convert LAN IP To Netbios Name
10 Dec, 2008 - 06:51 AM
Post #8

D.I.C Head
Group Icon

Joined: 27 Apr, 2008
Posts: 153



Thanked: 10 times
Dream Kudos: 50
My Contributions
If it resolves from the NETBIOS name then you will have a DNS Server correct?

Basically i think you just you need to set up a reverse lookup zone in DNS.

This is relatively simple to do in windows server 2000/2003 and after all the computers are restarted (e.g. the computer re-register themselves with the DNS Server) if it is an Active directory integrated zone then they should automatically create themselves an entry in the reverse lookup zone to save you the hassle.

After that you should be able to retrieve hostnames from their IP addresses.

The other options i THINK is WINS but i have never used this and know nothing about it

This post has been edited by danny_kay1710: 11 Dec, 2008 - 03:47 AM
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic

Time is now: 7/4/09 04:44PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month