Solved Command "ping -a" doesn't show the correct host name


Peter1954

New member
Local time
10:09 PM
Posts
4
OS
windows 11
Hi,
I hope someone can me help.
First of all I am working on Windows 11 envinroment.
I changed a network printer and when I give the command "ping -a 192.168.xxx.xxx"(printer address) from Prompt, it show me the host name of old printer,
and not the host name of new printer.
How can I do to see the new printer host name?
Thanks in advance.
 

My Computer My Computer

At a glance

windows 11
OS
windows 11
Computer type
Laptop
Hi,
I hope someone can me help.
First of all I am working on Windows 11 envinroment.
I changed a network printer and when I give the command "ping -a 192.168.xxx.xxx"(printer address) from Prompt, it show me the host name of old printer,
and not the host name of new printer.
How can I do to see the new printer host name?
Thanks in advance.
Restart the printer? Maybe the IP address is different?
 

My Computer My Computer

At a glance

Win11 Pro 25H2 Latest GA buildIntel(R) Core(TM) i9-14900KF 3.20 GHzG.Skill DDR5-5600 / PC5-44800 DDR5 SDRAM UDIMMGIGABYTE GeForce RTX 4070 Ti WINDFORCE OC 12G...
OS
Win11 Pro 25H2 Latest GA build
Computer type
PC/Desktop
Manufacturer/Model
Powerspec
CPU
Intel(R) Core(TM) i9-14900KF 3.20 GHz
Motherboard
MSI PRO Z690-A WIFI (latest BIOS)
Memory
G.Skill DDR5-5600 / PC5-44800 DDR5 SDRAM UDIMM
Graphics Card(s)
GIGABYTE GeForce RTX 4070 Ti WINDFORCE OC 12G (GV-N407TWF3OC-12GD)
Sound Card
OnBoard
Monitor(s) Displays
Dell - various (3)
Screen Resolution
1920x1080
Hard Drives
SSD/HDD/NVME
PSU
850 Watt 80+ Gold Modular
Case
PowerSpec/Lian Li ATX 205 Mesh
Cooling
Coolermaster MASTERLIQUID ML240L V2 RGB
Keyboard
Logi MX Keys S
Mouse
MX Master 3S
Internet Speed
600 mbps
Browser
various (Opera, Vivaldi, Edge, Brave, Chrome)
Antivirus
anitmalwarebytes; superantispyware; defender
Other Info
Windows Feature Experience Pack 1000.26100.36.0
IP address is the same, printer alredy restarted more times...
 

My Computer My Computer

At a glance

windows 11
OS
windows 11
Computer type
Laptop
How did you make the name change?
Printer settings, Control Panel or using a PowerShell command?

and.. doesn't the -a option use DNS?
Refreshed the local cache?
ipconfig /flushdns
 

My Computer My Computer

At a glance

Win11 Pro 25H2 Latest GA buildIntel(R) Core(TM) i9-14900KF 3.20 GHzG.Skill DDR5-5600 / PC5-44800 DDR5 SDRAM UDIMMGIGABYTE GeForce RTX 4070 Ti WINDFORCE OC 12G...
OS
Win11 Pro 25H2 Latest GA build
Computer type
PC/Desktop
Manufacturer/Model
Powerspec
CPU
Intel(R) Core(TM) i9-14900KF 3.20 GHz
Motherboard
MSI PRO Z690-A WIFI (latest BIOS)
Memory
G.Skill DDR5-5600 / PC5-44800 DDR5 SDRAM UDIMM
Graphics Card(s)
GIGABYTE GeForce RTX 4070 Ti WINDFORCE OC 12G (GV-N407TWF3OC-12GD)
Sound Card
OnBoard
Monitor(s) Displays
Dell - various (3)
Screen Resolution
1920x1080
Hard Drives
SSD/HDD/NVME
PSU
850 Watt 80+ Gold Modular
Case
PowerSpec/Lian Li ATX 205 Mesh
Cooling
Coolermaster MASTERLIQUID ML240L V2 RGB
Keyboard
Logi MX Keys S
Mouse
MX Master 3S
Internet Speed
600 mbps
Browser
various (Opera, Vivaldi, Edge, Brave, Chrome)
Antivirus
anitmalwarebytes; superantispyware; defender
Other Info
Windows Feature Experience Pack 1000.26100.36.0
No, I changed the printer, the old printer was a Epson, the new printer is a Konica Minolta,
I didn't change the host name of new printer.
Yes, I did refresh the local cache with "ipconfig /flushdns".
 

My Computer My Computer

At a glance

windows 11
OS
windows 11
Computer type
Laptop
The behavior you’re seeing is normal, and it happens because ping -a does not query the printer. It queries name‑resolution caches that still contain the old printer’s hostname. You've flushed your own DNS cache, so you need to flush the server's cache or wait 24 hours (after which it typically renews its information via network polling).
HTH,
--Ed--
 

My Computers My Computers

  • At a glance

    Windows 11i7-8650U (8th Gen/Kaby Lake)16 GBIntel UHD Graphics 620
    OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo X380 Yoga
    CPU
    i7-8650U (8th Gen/Kaby Lake)
    Motherboard
    20LH000MUS (U3E1)
    Memory
    16 GB
    Graphics Card(s)
    Intel UHD Graphics 620
    Sound Card
    Integrated Conexant SmartAudio HD
    Monitor(s) Displays
    FlexView Display
    Screen Resolution
    1920x1080
    Hard Drives
    Toshiba 1 TB PCIe x3 NVMe SSD
    external 5TB Seagate USB-C attached HDD
    PSU
    Lenovo integrated 65W power brick
    Case
    Laptop
    Cooling
    Laptop
    Keyboard
    Integrated Lenovo ThinkPad keyboard
    Mouse
    touchscreen, touchpad
    Internet Speed
    GbE (Spectrum/Charter)
    Browser
    all of em
    Antivirus
    Defender
    Other Info
    Purchased early 2019 as Windows Insider test PC
  • At a glance

    Windows 11Ryzen 5800X128 GB (4x32 DDR5-5600)NVIDIA 3070Ti
    Operating System
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    DIY
    CPU
    Ryzen 5800X
    Motherboard
    Asrock B550 Extreme4
    Memory
    128 GB (4x32 DDR5-5600)
    Graphics card(s)
    NVIDIA 3070Ti
    Sound Card
    built-in
    Monitor(s) Displays
    2xDell 2707
    Screen Resolution
    1980x1200
    Hard Drives
    2XNVMe, multiple HDDs from 3 to 12 TB
    PSU
    Seasonic 650
    Case
    NZXT Flo 6
    Cooling
    dual-fan air cooler
    Keyboard
    Logitech Wave
    Mouse
    Logitech Logi
    Internet Speed
    GbE
    Browser
    all of 'em
    Antivirus
    Defender
    Other Info
    temperamental UEFI
Look in your hosts file
C:\Windows\System32\drivers\etc\hosts

-a is a reverse resolver and it will always look at the hosts file first
 

My Computer My Computer

At a glance

Linux Mint
OS
Linux Mint
Computer type
Laptop
Manufacturer/Model
System76 Lemur Pro
@neemobeer: anybody who edits a hosts file and doesn't remember doing so will benefit from your input. But gosh, I've not touched mine in years. Thanks for pointing this out.
--Ed--
 

My Computers My Computers

  • At a glance

    Windows 11i7-8650U (8th Gen/Kaby Lake)16 GBIntel UHD Graphics 620
    OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo X380 Yoga
    CPU
    i7-8650U (8th Gen/Kaby Lake)
    Motherboard
    20LH000MUS (U3E1)
    Memory
    16 GB
    Graphics Card(s)
    Intel UHD Graphics 620
    Sound Card
    Integrated Conexant SmartAudio HD
    Monitor(s) Displays
    FlexView Display
    Screen Resolution
    1920x1080
    Hard Drives
    Toshiba 1 TB PCIe x3 NVMe SSD
    external 5TB Seagate USB-C attached HDD
    PSU
    Lenovo integrated 65W power brick
    Case
    Laptop
    Cooling
    Laptop
    Keyboard
    Integrated Lenovo ThinkPad keyboard
    Mouse
    touchscreen, touchpad
    Internet Speed
    GbE (Spectrum/Charter)
    Browser
    all of em
    Antivirus
    Defender
    Other Info
    Purchased early 2019 as Windows Insider test PC
  • At a glance

    Windows 11Ryzen 5800X128 GB (4x32 DDR5-5600)NVIDIA 3070Ti
    Operating System
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    DIY
    CPU
    Ryzen 5800X
    Motherboard
    Asrock B550 Extreme4
    Memory
    128 GB (4x32 DDR5-5600)
    Graphics card(s)
    NVIDIA 3070Ti
    Sound Card
    built-in
    Monitor(s) Displays
    2xDell 2707
    Screen Resolution
    1980x1200
    Hard Drives
    2XNVMe, multiple HDDs from 3 to 12 TB
    PSU
    Seasonic 650
    Case
    NZXT Flo 6
    Cooling
    dual-fan air cooler
    Keyboard
    Logitech Wave
    Mouse
    Logitech Logi
    Internet Speed
    GbE
    Browser
    all of 'em
    Antivirus
    Defender
    Other Info
    temperamental UEFI
Did you try:

netsh int ip reset
 

My Computer My Computer

At a glance

WinDOS 25H2Intel & AMDSO-DIMM SK Hynix 15.8 GB Dual-Channel DDR4-26...nVidia RTX 2060 6GB Mobile GPU (TU106M)
OS
WinDOS 25H2
Computer type
Laptop
CPU
Intel & AMD
Memory
SO-DIMM SK Hynix 15.8 GB Dual-Channel DDR4-2666 (2 x 8 GB) 1329MHz (19-19-19-43)
Graphics Card(s)
nVidia RTX 2060 6GB Mobile GPU (TU106M)
Sound Card
Onbord Realtek ALC1220
Screen Resolution
1920 x 1080
Hard Drives
1x Samsung PM981 NVMe PCIe M.2 512GB / 1x Seagate Expansion ST1000LM035 1TB
@neemobeer: my hosts file is the original, I never changed it
@neves: I tried the command you suggested, nothing, but after turning the printer off and on again for the umpteenth time,
the host name appeared!!!!

@Ed Tittel: I waited from Monday to Thursday, but the host name was always the same as the old printer,
I don't know if the solution is due to an exaggerated renewal time or to the command given
or to a combination of the two, the important thing is that now the correct name appears

Thank you so much everyone
 

My Computer My Computer

At a glance

windows 11
OS
windows 11
Computer type
Laptop
Glad you found a solution. The ways of Windows can be mysterious.
Cheers!
--Ed--
 

My Computers My Computers

  • At a glance

    Windows 11i7-8650U (8th Gen/Kaby Lake)16 GBIntel UHD Graphics 620
    OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo X380 Yoga
    CPU
    i7-8650U (8th Gen/Kaby Lake)
    Motherboard
    20LH000MUS (U3E1)
    Memory
    16 GB
    Graphics Card(s)
    Intel UHD Graphics 620
    Sound Card
    Integrated Conexant SmartAudio HD
    Monitor(s) Displays
    FlexView Display
    Screen Resolution
    1920x1080
    Hard Drives
    Toshiba 1 TB PCIe x3 NVMe SSD
    external 5TB Seagate USB-C attached HDD
    PSU
    Lenovo integrated 65W power brick
    Case
    Laptop
    Cooling
    Laptop
    Keyboard
    Integrated Lenovo ThinkPad keyboard
    Mouse
    touchscreen, touchpad
    Internet Speed
    GbE (Spectrum/Charter)
    Browser
    all of em
    Antivirus
    Defender
    Other Info
    Purchased early 2019 as Windows Insider test PC
  • At a glance

    Windows 11Ryzen 5800X128 GB (4x32 DDR5-5600)NVIDIA 3070Ti
    Operating System
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    DIY
    CPU
    Ryzen 5800X
    Motherboard
    Asrock B550 Extreme4
    Memory
    128 GB (4x32 DDR5-5600)
    Graphics card(s)
    NVIDIA 3070Ti
    Sound Card
    built-in
    Monitor(s) Displays
    2xDell 2707
    Screen Resolution
    1980x1200
    Hard Drives
    2XNVMe, multiple HDDs from 3 to 12 TB
    PSU
    Seasonic 650
    Case
    NZXT Flo 6
    Cooling
    dual-fan air cooler
    Keyboard
    Logitech Wave
    Mouse
    Logitech Logi
    Internet Speed
    GbE
    Browser
    all of 'em
    Antivirus
    Defender
    Other Info
    temperamental UEFI
How can I do to see the new printer host name?
nslookup is the correct command to use to check DNS records.

ping should only be used to check to see if a host is up or down. As Ed correctly pointed out, ping will lie to you because it prefers cached data.

Just because ping has the ability to resolve hostnames does not mean you should use it for that exclusively. ;-)
 

My Computer My Computer

At a glance

Windows 11
OS
Windows 11
Back
Top Bottom