


CMD command or IP software to view all MAC addresses on the LAN
Check the CMD command or IP of all MAC addresses of the LAN without software
::code by youxi01@bbs.bathome.cn 2008-1-7
Use @echo off and setlocal enabledelayeexpansion to disable echo from the command prompt and enable delayed expansion.
title LAN idle IP query@bbs.bathome.cn
Rem '/*========Get the IP address of this machine (LAN)=========*/
echo Obtaining the IP address of this machine, please wait...
In the given command line, use the `nbtstat -n` command to get the output and extract the third token from it, skipping the first two tokens. Finally, use a colon as a delimiter to split the output. The function of this command is to obtain the network
in Windows systemset "IP_addr=%%i"
set IP_addr=!IP_addr:~1,-1!
echo The local IP is:! IP_addr!
goto :next
)
:next
for /f "delims=. tokens=1,2,3,4" %%i in ("%IP_addr%") do set IP_fd=%%i.%%j.%%k
Rem '/*========Get the computer name============*/
echo.&echo Retrieving the computer name in the LAN, please wait...
echo The computers in network segment %IP_fd%.* are: &echo.
for /f "delims=" %%i in ('net view') do (
set "var=%%i"
rem ----------Get the computer name------------
if "!var:~0,2!"=="\\" (
set "var=!var:~2!"
echo !var!
Rem ----------ping computer name--------------
ping -n 1 !var!>nul
)
)
echo.&echo --------------------------------
Rem '/*========Extract arp cache=========*/
echo.&echo Obtaining the computer IP in the LAN, please wait...& echo.
for /f "skip=3 tokens=1,* delims= " %%i in ('arp -a') do echo IP: %%i has been used
echo.&echo --------------------------------
echo program is completed, thank you for using it!
pause>nul
==============Copy the above content=============
Welcome: bbs.bathome.cn
How to check routing IP in CMD
In CMD, use the route print command to view routes. You can add the parameter /4 to view only IPV4 routes.
The view is only to view the IP address. Use the ipconfig command and add the parameter /all to view all IP information.
Routing refers to the network-wide process of determining the end-to-end path when a packet travels from source to destination
. Routing works on the third layer of the OSI reference model - the packet forwarding device of the network layer. Routers implement network interconnection by forwarding data packets. Routers usually connect two or more logical ports identified by IP subnets or point-to-point protocols, and have at least 1 physical port. The router determines the output port and next hop address based on the network layer address in the received data packet and the routing table maintained internally by the router, and rewrites the link layer data packet header to forward the data packet. Routers maintain routing tables by dynamically maintaining routing tables to reflect the current network topology and by exchanging routing and link information with other routers on the network.
The interconnection protocol (IP) between networks is the foreign language abbreviation of Internet Protocol, and the Chinese abbreviation is "Network Association". It is a protocol designed for computer networks to connect to each other for communication. In the Internet, it is a set of rules that enable all computer networks connected to the Internet to communicate with each other. It stipulates the rules that computers should abide by when communicating on the Internet. Computer systems produced by any manufacturer can interconnect with the Internet as long as they comply with the IP protocol. IP addresses are unique and can be divided into 5 categories according to the nature of the user. In addition, IP also has meanings such as access protection, intellectual property rights, pointer registers, etc.
How to use CMD to check the number of computers or IPs being used by the LAN
1. Open the command prompt in the start menu.
2. Right-click and select Run as administrator.
3. Enter the command arp -a in the pop-up command window.
4. Press the Enter key on the keyboard to execute the command.
5. In this way, the command window can display the IP information of all users in the LAN.
Extended information:
Area network address classification:
1, 0--127. Диапазон номеров сетей класса A — 0.0.0.0—--127.0.0.0, используется для 128 сетей. Но сеть не может состоять из одних нулей, и адрес 127.0.0.0 зарезервирован для циклов.
2, 128-191. Класс B, диапазон номеров сетей составляет 128.0.0.0–191.254.0.0 для 16256 сетей.
№##3, 192--223. Класс C, диапазон номеров сети: 192.0.0.0–223.254.254.0, используется в сетях 2064512.4. Категория D. 224.0.0.0--240.255.255.255 используется для многоадресной рассылки, что позволяет экономить сетевые ресурсы.
Источник ссылки: Энциклопедия Sogou-Интранет IP
The above is the detailed content of CMD command or IP software to view all MAC addresses on the LAN. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The Steam Cloud error can be caused by many reasons. To play a game smoothly, you need to take some measures to remove this error before you launch the game. php.cn Software introduces some best ways as well as more useful information in this post.

You may see the “A connection to the Windows Metadata and Internet Services (WMIS) could not be established.” error on Event Viewer. This post from php.cn introduces how to remove the Windows Metadata and Internet Services problem.

If you have a program called PC App Store on your computer and did not purposely install it, then your PC may be infected with the malware. This post from php.cn introduces how to remove PC App Store malware.

KB5035942 update issues - crashing system commonly happens to users. Inflicted people hope to find a way out of the kind of trouble, such as crashing system, installation, or sound issues. Targeting these situations, this post published by php.cn wil

OneDrive is an online cloud storage service from Microsoft. At times, you might find OneDrive fail to upload photos to the cloud. If you are on the same boat, keep reading this post from php.cn Software to get effective solutions now!

Is Brothers: A Tale of Two Sons Remake not launching? Encountering Brothers: A Tale of Two Sons Remake black screen? Here this post on php.cn offers you tested solutions to assist you in addressing this problem.

Chris Titus Tech has a tool called Windows Utility that can help you easily create a debloated Windows 11/10 ISO to install a clean system. php.cn offers a full guide on how to do this thing using the Chris Titus tool.

Are you questioned about an issue that MSConfig keeps reverting to selective startup on your Windows? How to switch to normal startup if you require it? Try the methods explained in this php.cn post to find one that works for you.
