Operating System - HP-UX
1832552 Members
6133 Online
110043 Solutions
New Discussion

printer moved to different network

 
Luc Monnens
Frequent Advisor

printer moved to different network

Hi all,

I have a hp-ux server with IP address 192.80.70.4 and I have an hp LaserJet 4300n with IP address 192.80.70.10. All is fine.

I changed the printer's IP address to 182.77.88.10 and adapted that in the /etc/hosts file on my server (staying on 192.80.70.4).
I have a router in between the 192 and 182 networks.
I added a route on my server so he would send all 182 traffic to that router.
I can ping my printer fine from my server.

Print jobs get queued in the spooler fine.

BUT they do not print.

What am I missing here?

Thank you for looking into this.

Kind regards,

Luc Monnens
13 REPLIES 13
Court Campbell
Honored Contributor

Re: printer moved to different network

did you use the jetdirect printer installer to add printer? If so you may want to remove it and re-add it. I have seen where the model scripts that get copied by the utility use the ip instead of the name.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Sunny Jaisinghani
Trusted Contributor

Re: printer moved to different network

Hi,

when you added your printer what name did you give to your printer. ?

assign the ip address as the printer name and try. not sure if this will work. but give it a try.

Sunny
Robert Salter
Respected Contributor

Re: printer moved to different network

You could do as stated above and use jetadmin to remove and readmin the printer or you could go to /etc/lp/interface and grep for "^PERIPH" from the printer file ( the printer you're working with) and see what the PERIPH is set for, either an IP address or the printer name. If it's the printer IP address, edit the file and change the IP address to your new one. Might want to make a copy of the file before editing to be safe.


If it's looking at the printer name and you made a change in your /etc/hosts file, chekc your /etc/nsswitch.conf to be sure you're hosts is looking at 'files' before 'dns'.

robert
Time to smoke and joke
Luc Monnens
Frequent Advisor

Re: printer moved to different network

Hi all,

I used the jetdirect printer installer to install another 182 printer on the 192 server. This time with the IP address and not the name.
It made no difference.

Hi Robert,

I checked the /etc/lp/interface for the first printer and that shows up with the name and yes I have the server check the hosts file first and then DNS.

So frankly, I don't think this has to do with using IP address and name.

I would be more inclined to think there is something wrong with the routing.
Although ping from the server works and with traceroute from the server I can see it go to my router fine and then finding the printer.

Does lp need to get soemthing back before it actually releases a print job to the printer?

Kind regards,

Luc

Court Campbell
Honored Contributor

Re: printer moved to different network

try and telnet to the printer on port 9100. Look to see if it says connected. If you can't then you may have a firewall or something blocking. If you can then there is another issue.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Court Campbell
Honored Contributor

Re: printer moved to different network

you may also try to enable the printer. Maybe it is disabled. i.e.,

# enable printer
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Luc Monnens
Frequent Advisor

Re: printer moved to different network

I cannot telnet to if from my 192 server.
I can telnet to it fine from a 182 server.

There is no firewall, just a basic router.

Yes it is enabled.
Court Campbell
Honored Contributor

Re: printer moved to different network

OK, you can ping the printer from the 192 network, and you can telnet to port 9100 on the 182 network but not the 192 network. I still think there is some sort of blocking going on with the router. There are routers that have firewall capabilities. To me a firewall is just another name for router. Just how cisco looks at routers as layer 3 switches.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Bill Hassell
Honored Contributor

Re: printer moved to different network

Note that ping could be fine but a connection from your HP-UX system using port 9100 may be blocked by your router. Test connectivity to the remote printer by using phnpadmin as in:

hpnpadmin -v 12.34.56.78

Use the IP to avoid any issues with host or DNS. You'll need to consult with your network administrators concerning port 9100 if hpnpadmin can't reach the printer.


Bill Hassell, sysadmin
Luc Monnens
Frequent Advisor

Re: printer moved to different network

Hi all,

The router is just a linux box with 2 network cards and some basic routes added. It is doing what it is supposed to be doing for all other stuff.

Hi Bill,

I can run the hpnpadmin command fine. What should I look for in the output?
Bill Hassell
Honored Contributor

Re: printer moved to different network

hpnpadmin -v will report (at the top) that the printer is a network printer and is accepting requests then followed by dozens of lines of status. That confirms that you can communicate with the printer using JetDirect protocol. So delete the current printer and add it back using addqueue as in:

addqueue -h 12.34.56.78 -q myprn

That should get the printer working.


Bill Hassell, sysadmin
Luc Monnens
Frequent Advisor

Re: printer moved to different network

Hi all who answered,

All answers helped me to look at this problem form a different angle and the commands Bill provided will come in usefull in the future, I am sure.

In the end I started again.
A. I changed the IP on the printer manually.
I made sure the default gateway pointed to the actual default gateway on the network and not to the printer's ip (as it used to do)

B.
1. I removed the printer's old ip address from my /etc/hosts file.
2. I removed the printer from the lp spooler config
3. I added the printer by ip address in the jetadmin tool and named the queue with the printername
4. I tested setup and printed a test page.

All worked fine!

All points assigned and case closed.

Thank you all for your help.

Kind regards,

Luc
Luc Monnens
Frequent Advisor

Re: printer moved to different network

See above