How to get printer IP address via command line?

Discussion in 'Printers' started by JJ, Apr 12, 2011.

  1. JJ

    JJ Guest

    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
     
    JJ, Apr 12, 2011
    #1
    1. Advertisements

  2. JJ

    me Guest

    On Tue, 12 Apr 2011 12:43:28 -0400, "JJ"
    <> wrote:

    >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


    nslookup printername

    include the whole domain name if not set as the default on your
    system.
     
    me, Apr 12, 2011
    #2
    1. Advertisements

  3. JJ

    JJ Guest

    "me" <> wrote in message
    news:...

    > 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
     
    JJ, Apr 12, 2011
    #3
  4. JJ

    Bob Eager Guest

    On Tue, 12 Apr 2011 15:30:43 -0400, me wrote:

    > On Tue, 12 Apr 2011 12:43:28 -0400, "JJ"
    > <> wrote:
    >
    >>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

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


    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
     
    Bob Eager, Apr 12, 2011
    #4
  5. JJ

    me Guest

    On Tue, 12 Apr 2011 16:01:00 -0400, "JJ"
    <> wrote:

    >"me" <> wrote in message
    >news:...
    >
    >> 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


    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, Apr 12, 2011
    #5
  6. JJ

    me Guest

    On 12 Apr 2011 20:02:07 GMT, Bob Eager <> 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?
     
    me, Apr 12, 2011
    #6
  7. JJ

    Bob Eager Guest

    On Tue, 12 Apr 2011 18:44:04 -0400, me wrote:

    > On 12 Apr 2011 20:02:07 GMT, Bob Eager <> 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.



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

    *lightning protection* - a w_tom conductor
     
    Bob Eager, Apr 12, 2011
    #7
  8. JJ

    JJ Guest

    "me" <> wrote in message
    news:...
    >
    > 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, Apr 13, 2011
    #8
  9. JJ

    JJ Guest

    "Bob Eager" <> wrote in message
    news:...
    > On Tue, 12 Apr 2011 18:44:04 -0400, me wrote:
    >
    >> On 12 Apr 2011 20:02:07 GMT, Bob Eager <> 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
     
    JJ, Apr 13, 2011
    #9
  10. In article <io1vfg$d2i$>,
    "JJ" <> 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
     
    Fred McKenzie, Apr 14, 2011
    #10
  11. JJ

    JJ Guest

    "Fred McKenzie" <> wrote in message
    news:...

    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
     
    JJ, Apr 14, 2011
    #11
  12. JJ

    JJ Guest

    "Lon" <> wrote in message
    news:...

    >
    > 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
     
    JJ, Apr 18, 2011
    #12
  13. "JJ" <> writes:

    > "Lon" <> wrote in message
    > news:...
    >
    >>
    >> 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


    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
     
    Gernot Hassenpflug, Apr 20, 2011
    #13
  14. JJ

    JJ Guest

    "Gernot Hassenpflug" <> wrote in message
    news:...
    >
    > 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
     
    JJ, Apr 20, 2011
    #14
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tom
    Replies:
    5
    Views:
    676
    Gary Tait
    Oct 19, 2003
  2. Stefan Meissner

    HP USB Printer Access via LAN

    Stefan Meissner, Feb 4, 2004, in forum: Printers
    Replies:
    2
    Views:
    402
    Stefan Meissner
    Feb 5, 2004
  3. entropic
    Replies:
    0
    Views:
    776
    entropic
    Oct 5, 2004
  4. Replies:
    0
    Views:
    283
  5. Replies:
    2
    Views:
    1,851
Loading...

Share This Page