1. Run the following script to view the computer name and IP address in the LAN, save the following text to notepad, and change the suffix to bat.
Color 0acls @ echo offtitle: Send @ echo off & setlocal enabledelayedexpansionecho is obtaining the local IP address. Please wait... for/F "tokens = 3 skip = 2 delims =:" % I in ('nbtstat-n') Do (Set "IP = % I" set IP =! IP :~ 1,-1! Echo local IP :! IP address! Goto: Next): nextfor/F "delims =. tokens = 1, 2, 4 "% I in (" % IP % ") do set range = % I. % J. % kecho. & Echo is obtaining the names of other online computers in this section. Please wait... echo this section [% range %. *]: For/F "delims =" % I in ('net view') Do (Set "Var = % I ":: query the online computer name if "! VaR :~ 0, 2! "=" \ "(Set" Var =! VaR :~ 2! "Echo! VaR! Ping-N 1! VaR!> Nul) echo. ECHO is obtaining the IP addresses of other online computers in this section. Please wait... for/F "Skip = 3 tokens = 1, * delims =" % I in ('Arp-a') Do echo IP: % I is using echo. after the echo query is completed, press any key to exit... pause> NUL
2. You can also enter the nbtstat-a ip address in cmd to obtain the MAC address, computer name, and Working Group of the corresponding IP address. Note: Disable the firewall and 360 security guard
View the computer name and IP address of other computers on the LAN