23

I need to know the ip address of my printer from OSX to be able to configure it in my daughters Windows laptop. I tried the solution suggested in How do you get a printer's IP in lion? but I only get: dnssd://AL-CX11-08F61E._printer._tcp.local./auto, and I cannot ping AL-CX11-08F61E._printer._tcp.local. because it does not resolve. Still, I can print. How do I get the actual IP address?

Edit: why doesn't it resolve from the commandline, but still OSX can print?

raarts
  • 372
  • 1
    Is the printer actually on the network, or is it connected directly to your Mac? – Tetsujin Jul 29 '15 at 19:53
  • The printer is on the network, not directly connected. – raarts Jul 29 '15 at 21:41
  • Is the IP address of your printer defined manually or through DHCP? If its IP address is dynamically attributed through DHCP, you won't have a stable configuration on Windows if you use an IP address. The correct method starts by defining a name and a static IP address to your printer on your router (ex.: snow-white 192.168.1.128). Then you will be able to configure it from MacOS X and Windows with its network name (ex.: snow-white.local). – dan Jul 29 '15 at 21:42
  • 1
    Please clarify your comment n°2: how is your printer accessing the network? Add this info at the beginning of your question: this is a key detail. – dan Jul 29 '15 at 21:45
  • Is it awake? Mine doesn't respond to arp or nmap if it's asleep, though it will wake & print if it's an already-known device for that machine. – Tetsujin Jul 29 '15 at 21:53
  • so you do not actually want to know the IP, you want to know how to get it within the OS X. – Ruskes Jul 29 '15 at 21:54
  • The printer is likely added in via Bonjour/policy, which would use a different name than the IP. Try the following: 1) Launch Network Utility (can be accessed via Spotlight, magnifying glass in upper-right or Space+Command). 2) Go to Lookup in NU. 3) Enter the following address: AL-CX11-08F61E.local 4) Click Lookup and see if you receive a response. If this works, I'll post it as an answer below. The system does an IP lookup based on the printers' name across the network and should return its IP. – smoooosher Jul 29 '15 at 22:00
  • @smoooosher: I accepted the answer given by Kent, but your answer also provided valuable information: the fact that you can ping the printer by removing _printer._tcp from the hostname. Thank you for that. – raarts Jul 30 '15 at 07:14
  • I don't know why my question was downvoted? It did show research effort, and how my printer is accessing the network was implied in the question. Why would I need to find the ip address if it is directly connected? – raarts Jul 30 '15 at 07:17
  • You should be able to "ping AL-CX11-08F61E.local." (not "ping AL-CX11-08F61E._printer._tcp.local." !) – Kurt Pfeifle May 16 '19 at 10:02

5 Answers5

42

Use http://localhost:631/printers/ to see the list of printers available. The page shows both printer model and its IP/name under the Printers tab. To enable the cups page, run cupsctl WebInterface=yes in terminal.

If it does not directly show an IP address, click on the printer, where usually there is a connection entry like in this example:

Example entry for an auto-detected OKI MC342 printer

Afterwards run cupsctl WebInterface=no in the terminal.

If the above still does not resolve to an IP-address, then try dns-sd as explained in How can I list the IP addresses of all the AirPrint printers on a network?; search for "_ipp._tcp" in that post.

For that to work you MUST be on the same network as the printer: it does not work if you are on a different network (for instance when on the road and the discovered printer is at home).

Example of a printer not showing the IP address:

enter image description here

  • 4
    This should be the accepted answer... no cruft to install, simple to use. – Mike Williamson Oct 24 '17 at 16:03
  • 1
    This does not show the IP for my printer. The column Location is empty :-( – alpipego Apr 27 '18 at 08:53
  • 2
    @alpipego My Location is a user entered field to show where the printer is physically located. I don't think you'll see an ip address there. – tim.rohrer Jun 03 '18 at 02:40
  • 1
    @alpipego click on a printer; most printer drivers will show a "Connection" that in one form or the other has an IP address for the printer. I'll add a screenshot to the answer. – Jeroen Wiert Pluimers Oct 31 '18 at 06:48
  • https://apple.stackexchange.com/questions/175241/how-can-i-list-the-ip-addresses-of-all-the-airprint-printers-on-a-network really helped me figure it out, thanks! – Alex May 24 '19 at 09:27
11

Open the Terminal application in Applications/Utilities

type

lpstat -s

Followed by pressing return. You should see a list of all your installed printers. In a common setup, printers have been setup using the Line Printer Daemon protocol. If that's the case where you are, the number after lpd:// is the IP address.

Unless you are using a print server, in which case you’ll see the print server’s fully qualified domain name there.

  • This is not necessarily true. What if the printer's connection does not use the LPD (Line Printer Daemon) protocol, but IPP (Internet Printing Protocol) instead? Or DNSSD ("dnssd://...)" or AppSocket ("socket://...")? And then, during setup of the queue not the IP address was used, but the hostname?? – Kurt Pfeifle May 16 '19 at 09:59
  • Would you like me to edit my answer? – jasonology May 17 '19 at 05:16
9

There is a tool Bonjour Browser which will show you the connected devices on the current network. The connection types are sorted, and you can usually find the printers in Print Spooler (_printer._tcp.) or Internet Printing Protocol (_ipp._tcp.) sections. Each device will list its IP address, among other information.

Kent
  • 6,192
  • 1
    Thanks. This tool indeed shows the ip address as well as other useful info. – raarts Jul 30 '15 at 07:10
  • 2
    This tool is now called "Discovery" and is available in the Mac app store. Also, as of today, there is a link to the Mac app store page on the website provided in this answer. – Joseph Hansen Dec 30 '19 at 16:19
  • Bonjour Browser does not run on macOS versions newer than Mojave. – fferri May 06 '21 at 16:54
4

All modern networkable printers (which have a display) have an option to set and display the IP address. Often times you hold the "go button" down for 15 seconds, or while powering up the printer. Sometimes you need a utility that goes with the printer to set and/or view it. Check your manual or find one online.

  • 1
    This is correct, but does not answer the question. I want to get it from OSX, not from the printer. – raarts Jul 29 '15 at 21:40
3

You should be able to

 ping -c 1  AL-CX11-08F61E.local. | grep PING

(NOT ping AL-CX11-08F61E._printer._tcp.local.).

The line you see then should reveal the IP address of the printer.