• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.
  • The forums have been upgraded with support for dark mode. By default it will follow the setting on your system/browser. You may override it by scrolling to the end of the page and clicking the gears icon.

How to display ip address for a pc in cmd?

Joined
Feb 15, 2009
Messages
651 (0.11/day)
Location
Norway, which means Amazon is not available...
System Name Winter v3.2024
Processor Intel i7 12700K (since november 2021)
Motherboard Gigabyte Z690 Gaming X (since november 2021)
Cooling Air Liquid Freezer II 360 with LGA1700 kit (since november 2021)
Memory Crucial Ballistix 2x16gb 3600mhz C16 (since november 2021)
Video Card(s) Gigabyte RTX 3060 Ti Gaming OC Pro LHR - Rev3.0 (since july 2022)
Storage 1x 1TB WD Blue SN570 SSD, 1x Seagate 4TB SATA
Display(s) 1x 55" LG C1 4k OLED, 1x Gigabyte 32" M32Q and 2x AOC 27" CG1
Case Fractal Design Define R6 (since 2018 and still working like a charm!)
Power Supply Corsair RM850x black (since august 2022)
Mouse Razor Deathadder v2 (since december 2021)
Keyboard Varmilo VEA109 v2 MX Silent Red (since august 2022)
Software Windows 11 Pro
So, when i type ping pc-name in cmd (windows 10), it displays the long ipv6 instead of an ip address... How do i get ipv6 to show up as a regular ip4 ip address? Just wondering. Still a bit new with the whole ipv6 etc.
 
i'm still on windows 7, but with the command ipconfig it will list all ethernet connection and relative IPs. It should work in windows 10

EDIT: if is for another pc on LAN connection you can use any software like IpScanner and you will have a repost of all machines inside a lan with corrispettive IPs
 
i'm still on windows 7, but with the command ipconfig it will list all ethernet connection and relative IPs. It should work in windows 10
ipconfig do work in Windows 10.
 
So, when i type ping pc-name in cmd (windows 10), it displays the long ipv6 instead of an ip address... How do i get ipv6 to show up as a regular ip4 ip address? Just wondering. Still a bit new with the whole ipv6 etc.
Looks normal to me...
I'm not using anything IPv6 though.

1575969686159.png
 
So, when i type ping pc-name in cmd (windows 10), it displays the long ipv6 instead of an ip address... How do i get ipv6 to show up as a regular ip4 ip address? Just wondering. Still a bit new with the whole ipv6 etc.

If you are running with ipv6 addresses only, you cannot "convert" them to ipv4 addresses (apples and oranges)

ping -4 8.8.8.8 (IP v4 addresses)
ping -6 00-01-00-03-22-B2-32-97-54-EE-75-AB-70-41 (IP v6 addresses)

You have to enable IPV4 on the host computer
 
Last edited by a moderator:
Yes, it is for another pc i am trying to find the ip adress to.

Also, how to diplay the ip address of a printer when viewing list of printers? For 1 of the printers i see thr ip address to, but for the printer in my office, i see its ipv6 instead...
 
You can force IPv4 or IPv6 with ping.
Code:
ping -4 PC_NAME
you can also use nslookup. It'll most likely resolve ipv4 address, if you have ipv4 enabled on your network.

Also, how to diplay the ip address of a printer when viewing list of printers?
if you have a network printer already set-up on your PC, you can look it up in printer properties. If it has something like a CUPS web-panel, it should be under "Web services" tab or under "Ports".

You can also do both on the router. All clients, including printer, should be in DHCP client list.
 
If you are running with ipv6 addresses only, you cannot "convert" them to ipv4 addresses (apples and oranges)

ping -4 8.8.8.8 (IP v4 addresses)
ping -6 00-01-00-03-22-B2-32-97-54-EE-75-AB-70-41 (IP v6 addresses)

You have to enable IPV4 on the host computer

That did the trick! Thanks!

But... how do i display ip address for my printer then? When i view the list of printers, i see ip address for 1 printer, but my own office printer shows the ipv6 address...

You can force IPv4 or IPv6 with ping.
Code:
ping -4 PC_NAME
you can also use nslookup. It'll most likely resolve ipv4 address, if you have ipv4 enabled on your network.


if you have a network printer already set-up on your PC, you can look it up in printer properties. If it has something like a CUPS web-panel, it should be under "Web services" tab or under "Ports".

You can also do both on the router. All clients, including printer, should be in DHCP client list.

When i view ports (in printer settings) on my printer, it displays the ipv6.. I am at work, so my access is limited. How can i then get the ip address to show up?
 
I've found Angry IP scanner useful for a list of devices on my local network.


I prefer the legacy version:
 
netstat will show you all your ip connections
 
Yes, it is for another pc i am trying to find the ip adress to.

Also, how to diplay the ip address of a printer when viewing list of printers? For 1 of the printers i see thr ip address to, but for the printer in my office, i see its ipv6 instead...
Assuming you have a smartphone, try Fing or Network Analyzer, either should list all of your devices.
The useful part is that you tend to see who made the device, so there's no confusion as to what is what.
 
Last edited:
If you enter ping /? you will see the various switches (options) you can use with the ping command. From there, as silentbogo correctly noted, you can see if you add -4 switch to your command, it will "force using IPv4".

So if you enter ping computername -4, it will display your IPv4 IP address.
What specific command should i type to reveal my printers ip address?
You can look in your printer properties, print out a Printer Status Report (HP's term) from your printer's front panel, or just go into your router's admin menu and look at the "connected devices".

BTW, I recommend setting a static (fixed) IP address for networked printers and NAS devices so IP assignments don't get shoveled around in the event of an extended power outage on your network. Just make sure you pick an IP address that is well above the number of computers you have. For example, if you have 6 computers (including cell phones, smart TVs, streamers, etc.) you might assigned 192.168.1.20 to your printer.
 
BTW, I recommend setting a static (fixed) IP address for networked printers and NAS devices so IP assignments don't get shoveled around in the event of an extended power outage on your network. Just make sure you pick an IP address that is well above the number of computers you have. For example, if you have 6 computers (including cell phones, smart TVs, streamers, etc.) you might assigned 192.168.1.20 to your printer.

Sorry, not wanting to be a besserwisser, but static IP addresses shouldn't be used. If you want something to use a fixed IP address, you should use DHCP address reservation (sometimes called static lease) in the router.
 
Sorry, not wanting to be a besserwisser, but static IP addresses shouldn't be used. If you want something to use a fixed IP address, you should use DHCP address reservation (sometimes called static lease) in the router.

Static IPs in the DHCP address pool shouldn't be used. There is nothing wrong with using static IPs if done correctly.
 
Huh? Its the same difference. Static lease = address reservation = static IP address. The only difference is how it is managed. Regardless if the printer asks for a specific address, or the router always assigns the same address to the printer, the point remains the same.

Static by definition means "fixed" as in permanent, it does not move or change. That is the opposite of "dynamic", which means it can move or change.

Note I did NOT say to use static IP addresses for every connected device. That said, there is absolutely no harm in doing that either - other than it is much less convenient than going with dynamic assignments.

Static IPs in the DHCP address pool shouldn't be used.
This is also not a problem, if done correctly. This is exactly why I specifically said to pick a number "well above the number of computers you have." That is specifically to avoid IP conflicts. And it works.

We've been assigning static (reserved or whatever you choose to call it) for networked printers for year on all our corporate, small business, and home network clients, as well as DHCP assignments for our permanently attached PCs and mobiles devices that come and go - and never had a problem.

That is, we have never seen a case where a printer asked for one IP address but the router insisted on assigning a different one. But again, we always assign addresses that will be well above the number of connected computers and other connected devices.

If mixing DHCP and static IP assignments caused problems, why would Cisco, Netgear, Linksys, D-Link, ASUS, Buffalo, TP-Link, Huawei, Belkin, Apple and others all include those options in their routers?
 
Its the same difference. Static lease = address reservation = static IP address. The only difference is how it is managed. Regardless if the printer asks for a specific address, or the router always assigns the same address to the printer, the point remains the same.

Not really. In a lot of instances, if you set the static IP address on the device itself, it just uses that address but does not make the DHCP server aware that the IP is in use. DHCP servers work passively. They don't actively scan for IPs that are in use on the network. A DHCP server received a request for an IP, looks at what addresses it hasn't given from the pool, picks one that it hasn't assigned yet, and assigns it to the device. If the device never makes the request, and most don't when assigned a static IP, then the DHCP server has no way of knowing that IP is in use and can assign it to another device. This is how IP conflicts happen.

In the networking world, Static Lease = Static Reservation, but Static IP means something different. A Static Lease or Static Reservation is set at the DHCP server. A Static IP is set at the device, not at the DHCP server. I think that is where you're confusion is. A Static IP is not the same as a Static Reservation as far as the networking world is concerned.

This is also not a problem, if done correctly. This is exactly why I specifically said to pick a number "well above the number of computers you have." That is specifically to avoid IP conflicts. And it works.

This does not always work. A lot of DHCP servers don't hand out IPs in sequential order. I've seen some that hand out completely random IPs and I've seen ones that hand out IPs as far apart as possible. For example, if the IP pool is .100-.200, the first IP assigned would be .100 then the second would be .200 then the third would be .150 then the forth would be .125 then the fifth would be .175, and so on.

You can not always count on the DHCP server not giving out an IP address in the pool just because it is high up in the pool range or away from addresses currently in use. That is why it is best practice to assign static IPs on devices that are outside of the DHCP pool. I'm not saying assigning addresses in the pool won't work, but there is a chance it won't, so it is best to just avoid the possibility.
 
:( I'm not going to argue over such minutia when the whole point of my initial comment what a simple way to avoid IP address assignments for printing devices from shifting during power outages.

I could care less which method is used to ensure the printer always gets the same address.

Here's a thought. Read your router's user guide. It's in there, and I'm outta here.
 
:( I'm not going to argue over such minutia when the whole point of my initial comment what a simple way to avoid IP address assignments for printing devices from shifting during power outages.

I could care less which method is used to ensure the printer always gets the same address.

Here's a thought. Read your router's user guide. It's in there, and I'm outta here.
Look, you're trying to teach people how to do things, so maybe it's better to teach them the right way, instead of the not recommended way?
Seriously dude, you need to stop taking everything personally.
 
I did not take it personally. I merely was suggesting an option to deal with shifting IP addresses with networked printers. I didn't want to get into yet another argument over what amounts to semantics and which is the best method to accomplish essentially the same thing, and drive yet another OP away with OT minutia.
 
Back
Top