How do I get a list of the active IP-addresses, MAC-addresses and NetBIOS names on the LAN?

前端 未结 5 1148
北恋
北恋 2021-01-06 09:42

How do I get a list of the active IP-addresses, MAC-addresses and NetBIOS names on the LAN?

I\'d like to get NetBIOS name, IP and MAC addresses for every host on the

相关标签:
5条回答
  • 2021-01-06 10:04

    As Daren Thomas said, use nmap.

     nmap -sP 192.168.1.1/24
    

    to scan the network 192.168.1.*

     nmap -O 192.168.1.1/24
    

    to get the operating system of the user. For more information, read the manpage

     man nmap
    

    regards

    0 讨论(0)
  • 2021-01-06 10:09

    If you're using DHCP then the server will give you a list of all that information.

    This website has a good tutorial on using powershell to get networking information http://www.powershellpro.com/powershell-tutorial-introduction/powershell-scripting-with-wmi/

    If you neet to get quick list of computer names you can use "net view". Also have a look at nbmac although I'm unsure of it's working status under XP. Another option could be to use nbtstat -a (once you've used net view to list workstations)

    0 讨论(0)
  • 2021-01-06 10:15

    In PowerShell you can do something like:

    $computers = "server1","server2","server3"

    Get-WmiObject Win32_NetworkAdapterConfiguration -computer $computers -filter "IPEnabled ='true'" | select __Server,IPAddress,MACAddress

    0 讨论(0)
  • 2021-01-06 10:23
    arp -a
    

    That gets everything the current machine knows about on the network.

    (I'm putting this up there as a second option, since nmap isn't universally installed).

    0 讨论(0)
  • 2021-01-06 10:27

    In PowerShell:

    function Explore-Net($subnet, [int[]]$range){
        $range | % { test-connection "$subnet.$_" -count 1 -erroraction silentlycontinue} | select -Property address | % {[net.dns]::gethostbyaddress($_.address)}
    }
    

    Example:

    Explore-Net 192.168.2 @(3..10)
    
    0 讨论(0)
提交回复
热议问题