hey guys, I have a 2-3 pc home network all running xp, I'm using an old dynalink router which is connected to a switch(cheap no brains switch) and my pc's run from there.

Is there a command line command that allows each pc to get an ip/mac address from each pc without me having to ping the machines.

At the moment I have to ping before it shows in my arp -a table, the only dynamic entry learnt by itself is the default gateway, what I would like is a command that each machine can ping the pc's network and get a return back from each one.

My router does not give this out as its old and not setup for it, so can I do thru the pc's?

Dani AI

Generated

A short technical summary and practical options (expands on points made by , , and )

ARP entries are learned only when a host actually sends or receives IP traffic to another host, so a cheap unmanaged switch plus local LAN traffic that never touches the router will leave the router’s tables sparse. Consumer routers usually expose a DHCP/lease or “attached clients” page in the web admin; the CLI command show ip route is a Cisco/privileged-exec command and won’t exist on most home boxes.

Quick, router-free approach (populate the ARP cache and read it)

  • Do a ping sweep from one machine to generate traffic, then read the ARP table and use NetBIOS/nbtstat to get names.
REM interactive at cmd.exe (single %)
for /L %i in (1,1,254) do @ping -n 1 -w 100 192.168.1.%i >nul
arp -a

REM in a .bat file (double %%)
for /L %%i in (1,1,254) do @ping -n 1 -w 100 192.168.1.%%i >nul
arp -a

After the sweep, arp -a shows IP⇄MAC. nbtstat -A 192.168.1.x will return NetBIOS name info (and the MAC line) for that IP. net view can list Windows machines but requires File and Printer Sharing and the Computer Browser service to be running.

Getting gateway and DNS for each PC

  • The default gateway is normally the router IP (same for all hosts on one LAN). Per‑host DNS/gateway requires a remote query (WMI or a remote command) or checking the router’s DHCP lease details. Example WMI template (administrative credentials and firewall/WMI access required):
wmic /node:192.168.1.10 path Win32_NetworkAdapterConfiguration where IPEnabled=true get IPAddress,DefaultIPGateway,DNSServerSearchOrder /format:list

Notes and cautions

  • GUI scanners (Angry IP Scanner, nmap, etc.) make discovery easier — this mirrors /’s suggestion without the link. Remote queries need admin rights and firewall exceptions; Windows XP is end‑of‑life so limit exposure and prefer reading the router DHCP table where possible.

Recommended Answers

All 4 Replies

Am not sure if its possible through the PC's but it can be done on your router,you can use Show ip route at the router CLI, it reveals all the addresses of connected devices.issue the command at the global configuration mode.

Hi Scooby
This program is free and might be what your looking for

The site and downloads are safe I've been using their products for years.
dock

Hi Scooby
This program is free and might be what your looking for

The site and downloads are safe I've been using their products for years.
dock

Awesome product! Works well.

Would Highly recommend it!

Cohen

how to view my all pcs ip and default gateway
i am able to view ip, mac address but not able to view gateway and preffered dns

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.