Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to get printer IP address via command line?

988 views
Skip to first unread message

JJ

unread,
Apr 12, 2011, 12:43:28 PM4/12/11
to
Hello:

Another question for you printer experts out there! ;-)

We have several networked printers on the system and I'm trying to find a
way to get their IP addresses via a command (DOS) line command. Like Ping
for example. I was told that should work and it does if I ping the actual
IP address. But if I ping the printer's "name" in the system, it doesn't
work.

I get the following message (PR34 is the printer's name):

"Ping reqeust could not find host PR34. Please check the name and try
again."

I need a way to get the IP address from the "name" of the printer if that's
even possible. I know someone who can do this with their printer on their
network, but not sure why it's not working on ours.

Thx in advance, JJ


me

unread,
Apr 12, 2011, 3:30:43 PM4/12/11
to

nslookup printername

include the whole domain name if not set as the default on your
system.

JJ

unread,
Apr 12, 2011, 4:01:00 PM4/12/11
to
"me" <m...@mine.net> wrote in message
news:s0a9q6hea1pq02vlj...@4ax.com...

> nslookup printername
>
> include the whole domain name if not set as the default on your
> system.

Thanks, I should have mentioned that I tried that command. It does return
an IP but not the right one. When I then take that IP and enter into a
browser, it doesn't connect to the printer. When I look at Control Panel,
Printers..., select the printer, look at Properties, Port, Config Port...the
IP address there is different.

Why would that be do you know? That IP address *will* work in a browser,
bringing up the printer's browser based command screen. That's what I'm
trying to get at, *that* IP address...

Odd. Thx, JJ


Bob Eager

unread,
Apr 12, 2011, 4:02:07 PM4/12/11
to

I suspect the printers haven't been put into DNS at all.

--
Use the BIG mirror service in the UK:
http://www.mirrorservice.org

*lightning protection* - a w_tom conductor

me

unread,
Apr 12, 2011, 6:41:20 PM4/12/11
to

I would think this points to DNS/host table issues since nslookup is
going to get it's info from here. If the name has the incorrect IP
address associated with it then that's a real problem. What method is
used to assign IP addresses on your network?

I'm quickly coming to the limits of my knowledge here.

me

unread,
Apr 12, 2011, 6:44:04 PM4/12/11
to
On 12 Apr 2011 20:02:07 GMT, Bob Eager <rd...@spamcop.net> wrote:


>I suspect the printers haven't been put into DNS at all.

Look at the reply to my suggestion. nslookup gets an IP address that
appears to be different from the one the PC has for the port connected
to this printer. Something is not right in Denmark?

Bob Eager

unread,
Apr 12, 2011, 6:53:06 PM4/12/11
to

You wonder if the network has a series of computers with names and IPs in
DNS. And each printer attached to a computer has been given the (Windows
network) name of that computer, which is in a different namespace and
doesn't have a domain part.

It would be interesting to do a reverse lookup on that IP address (the
real one) to see if it has any kind of name associated with it.

JJ

unread,
Apr 13, 2011, 6:38:54 AM4/13/11
to
"me" <m...@mine.net> wrote in message
news:svk9q69pk4c4tk42h...@4ax.com...

>
> I would think this points to DNS/host table issues since nslookup is
> going to get it's info from here. If the name has the incorrect IP
> address associated with it then that's a real problem. What method is
> used to assign IP addresses on your network?
>
> I'm quickly coming to the limits of my knowledge here.

Well, you are w-a-y beyond my limited knowledge here! :-) The printer
works fine and is accessible from many systems...I don't know how the IP was
assigned. I'll have to ask the network folks. They, so far, have also been
unable to help me do this...but it what it is. Thx again! JJ


JJ

unread,
Apr 13, 2011, 6:44:33 AM4/13/11
to
"Bob Eager" <rd...@spamcop.net> wrote in message
news:90k3eh...@mid.individual.net...

> On Tue, 12 Apr 2011 18:44:04 -0400, me wrote:
>
>> On 12 Apr 2011 20:02:07 GMT, Bob Eager <rd...@spamcop.net> wrote:
>>
>>
>>>I suspect the printers haven't been put into DNS at all.
>>
>> Look at the reply to my suggestion. nslookup gets an IP address that
>> appears to be different from the one the PC has for the port connected
>> to this printer. Something is not right in Denmark?
>
> You wonder if the network has a series of computers with names and IPs in
> DNS. And each printer attached to a computer has been given the (Windows
> network) name of that computer, which is in a different namespace and
> doesn't have a domain part.
>
> It would be interesting to do a reverse lookup on that IP address (the
> real one) to see if it has any kind of name associated with it.

I'm not sure how to do this...and I'm confused now! Very easy to to for me
with this network stuff! ;-) It's odd for sure. I appreciate the input
from everyone. JJ


Moe Trin

unread,
Apr 13, 2011, 3:36:23 PM4/13/11
to
On Wed, 13 Apr 2011, in the Usenet newsgroup comp.periphs.printers, in article
<io3ufv$rlu$1...@speranza.aioe.org>, JJ wrote:

>"me" <m...@mine.net> wrote

]> nslookup printername

]Thanks, I should have mentioned that I tried that command. It does


]return an IP but not the right one. When I then take that IP and
]enter into a browser, it doesn't connect to the printer.

Who ever set up the DNS has their head up-and-locked

]When I look at Control Panel, Printers..., select the printer, look at


]Properties, Port, Config Port...the IP address there is different.

]Why would that be do you know?

The people who set up the DNS are not the ones who set up the printer
OR either/both groups don't know what they are doing, and failed to
click on the right icons and finish the setup.

]That IP address *will* work in a browser, bringing up the printer's


]browser based command screen. That's what I'm trying to get at,
]*that* IP address...

Sounds as if you'll have to look at the control panel setup for each
printer your computer knows about and write down the name/IP for your
own use. Note that the addresses _may_ change each time things are
re-booted/crash.

>> I would think this points to DNS/host table issues since nslookup
>> is going to get it's info from here. If the name has the incorrect
>> IP address associated with it then that's a real problem.

Exactly

>> What method is used to assign IP addresses on your network?

Good question - sounds like DHCP that isn't talking to DNS.

>> I'm quickly coming to the limits of my knowledge here.

Well, yeah - it's not exactly a printer/printing problem.

>Well, you are w-a-y beyond my limited knowledge here! :-) The
>printer works fine and is accessible from many systems...I don't know
>how the IP was assigned.

It may not have been - it sounds as if your network is running some
form of windoze, and who ever set it up is depending on ad-hoc
networking, without having the first clue about network setup.

>I'll have to ask the network folks. They, so far, have also been
>unable to help me do this...but it what it is

Two reasons - either they don't know (and this sounds more likely)
and are just as lost as you are, OR they know, but have no desire
to allow you to know for policy/sanity reasons.

By the way, the reason the 'ping' won't work is because the nslookup
won't work - they both depend on the same basic information.

Old guy

Fred McKenzie

unread,
Apr 13, 2011, 9:08:10 PM4/13/11
to
In article <io1vfg$d2i$1...@speranza.aioe.org>,
"JJ" <jefferson...@hotmail.com> wrote:

> We have several networked printers on the system and I'm trying to find a
> way to get their IP addresses via a command (DOS) line command. Like Ping
> for example. I was told that should work and it does if I ping the actual
> IP address. But if I ping the printer's "name" in the system, it doesn't
> work.

JJ-

Some installations use printer servers. Your computer sends a print job
to the server, where it is placed in the print queue. The server sends
each print job in the queue on to the printer, one at a time in the
order they were received.

When you attempt to find the printer's IP address, you may actually be
getting the IP address of the server. If that is the case, one way you
can find the IP address of a printer is from the printer's control panel
as has been suggested. Otherwise, you would need to access the server's
setup program to see the IP address where each printer name is routed.
Unless you are the boss, the people who manage your network may not let
you do that!

Some printers have a built-in server. An example is the HP JetDirect
server built into the printer's network interface card. For those that
do not, you could screw something up if you tried printing directly to
the printer's IP address when someone else was printing via the server.

Fred

JJ

unread,
Apr 14, 2011, 6:45:40 AM4/14/11
to
"Fred McKenzie" <fm...@aol.com> wrote in message
news:fmmck-E7A3F3....@5ad64b5e.bb.sky.com...

Hi Fred,

> JJ-
>
> Some installations use printer servers. Your computer sends a print job
> to the server, where it is placed in the print queue. The server sends
> each print job in the queue on to the printer, one at a time in the
> order they were received.
>
> When you attempt to find the printer's IP address, you may actually be
> getting the IP address of the server. If that is the case, one way you
> can find the IP address of a printer is from the printer's control panel
> as has been suggested. Otherwise, you would need to access the server's
> setup program to see the IP address where each printer name is routed.
> Unless you are the boss, the people who manage your network may not let
> you do that!

I think this is exactly it. I get the same IP address for two printers on
this system. Makes sense. We do have a print-server, so that's probably
what is happening.

> Some printers have a built-in server. An example is the HP JetDirect
> server built into the printer's network interface card. For those that
> do not, you could screw something up if you tried printing directly to
> the printer's IP address when someone else was printing via the server.

Yeah, wouldn't be trying to do that. Thx! This has been an education. I
appreciate the help. JJ


Lon

unread,
Apr 17, 2011, 8:13:53 PM4/17/11
to

Is the printer connected to a print server that may service multiple
printers?

If so, you MIGHT be able to get to the printer with \\ipaddress from the
printers menu if the admins allow listing printers off the print server.

I take it you already tried letting your client print menu just scan for
printers.


JJ

unread,
Apr 18, 2011, 6:56:17 AM4/18/11
to
"Lon" <lon.s...@comcast.net> wrote in message
news:WKmdnc0woOffHzbQ...@giganews.com...

>
> Is the printer connected to a print server that may service multiple
> printers?

I think so yes. We have many printers connected.

> If so, you MIGHT be able to get to the printer with \\ipaddress from the
> printers menu if the admins allow listing printers off the print server.

I can connect to it just fine using the IP address through a browser or
"ping" command. What I'm trying to do is find a printer's IP address from
it's "name" like PRnn.

> I take it you already tried letting your client print menu just scan for
> printers.

I can see the printers by name, but can't seem to "extract" their IP
addresses that way. The only way I can get their IPs is manually in Control
Panel. I'm looking for a way to get a printer's IP from its name at the
*command line*. Thx for the input. JJ


Gernot Hassenpflug

unread,
Apr 20, 2011, 3:18:44 AM4/20/11
to
"JJ" <jefferson...@hotmail.com> writes:

Interesting! I had a quick Google and came up with these pages (I'm a
linux user but have a Windows desktop at work), so I might try some of
these things as well in the near future.

Go to C:\Windows\System32 and then run:

cscript prnmngr.vbs -l

This will list all printer and their details, including IP address.

Looks promising for further play:
http://www.robvanderwoude.com/2kprintcontrol.php


--
Gernot Hassenpflug

JJ

unread,
Apr 20, 2011, 7:39:55 AM4/20/11
to
"Gernot Hassenpflug" <ger...@coda.ocn.ne.jp> wrote in message
news:yolaafl...@asahi-net.or.jp...

>
> Interesting! I had a quick Google and came up with these pages (I'm a
> linux user but have a Windows desktop at work), so I might try some of
> these things as well in the near future.
>
> Go to C:\Windows\System32 and then run:
>
> cscript prnmngr.vbs -l
>
> This will list all printer and their details, including IP address.
>
> Looks promising for further play:
> http://www.robvanderwoude.com/2kprintcontrol.php
>
>
> --
> Gernot Hassenpflug

Thanks for the input. I tried that command. Still not getting any IP
addresses but it works otherwise. I appreciate it! I'll have to check out
the link as well. Appreciate it, JJ


0 new messages