- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Changing IPs for all printers
Operating System - HP-UX
1821220
Members
3132
Online
109632
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-11-2006 05:13 AM
тАО10-11-2006 05:13 AM
We have to go onto the Corp backbone. As part of this we are changing our whole IP scheme.
One of my parts of this is all the JetDirect printers on the HP server. Is there a easier way to resign the printer config to a new IP. My first thought was just drop the printer and recreate it. Not hard to do. It seams when you are doint a mess of then there always is some thing the gets messed up.
I thought there might be a way to just find the config file and change the IP.
Each printer is assigned a static IP. I have and old and new list of IPs. I figure it might take about the same time recreating them as changing the IP.
How would one go about just changing the IP for the printer?
Marty
Oh, there is only 28 printers I need to change. All are HP printers on JetDirect serves except maybe 5-6 that different.
One of my parts of this is all the JetDirect printers on the HP server. Is there a easier way to resign the printer config to a new IP. My first thought was just drop the printer and recreate it. Not hard to do. It seams when you are doint a mess of then there always is some thing the gets messed up.
I thought there might be a way to just find the config file and change the IP.
Each printer is assigned a static IP. I have and old and new list of IPs. I figure it might take about the same time recreating them as changing the IP.
How would one go about just changing the IP for the printer?
Marty
Oh, there is only 28 printers I need to change. All are HP printers on JetDirect serves except maybe 5-6 that different.
The only thing that always remain the same are the changes.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-11-2006 05:22 AM
тАО10-11-2006 05:22 AM
Re: Changing IPs for all printers
Marty,
I would use your list of new IPs to create a little script. Something like this:
#!/bin/ksh# shut down the print spooler
#############################
/usr/lib/lpshut
#############################
# for each printer listed , ...
#############################
for PRNTR in `cat /nfs/yukon/apps/hols/bin/ts/printer_list`
do
case $PRNTR in
crlzr2_nf) IP=130.1.1.74
;;
crlzr3_nf) IP=130.1.1.72
;;
registry2) IP=130.1.7.73
;;
dairyserv1) IP=130.1.6.73
;;
dhscolor) IP=130.1.6.72
;;
sysprog1) IP=130.1.6.71
;;
billsvc) IP=130.1.5.71
esac
removequeue -f -q $PRNTR
addqueue -h $IP -q $PRNTR -b off
done
#############################
# after the last printer is added, restart the spooler
#############################
/usr/lib/lpsched
Pete
Pete
I would use your list of new IPs to create a little script. Something like this:
#!/bin/ksh# shut down the print spooler
#############################
/usr/lib/lpshut
#############################
# for each printer listed , ...
#############################
for PRNTR in `cat /nfs/yukon/apps/hols/bin/ts/printer_list`
do
case $PRNTR in
crlzr2_nf) IP=130.1.1.74
;;
crlzr3_nf) IP=130.1.1.72
;;
registry2) IP=130.1.7.73
;;
dairyserv1) IP=130.1.6.73
;;
dhscolor) IP=130.1.6.72
;;
sysprog1) IP=130.1.6.71
;;
billsvc) IP=130.1.5.71
esac
removequeue -f -q $PRNTR
addqueue -h $IP -q $PRNTR -b off
done
#############################
# after the last printer is added, restart the spooler
#############################
/usr/lib/lpsched
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-12-2006 05:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-12-2006 11:07 AM
тАО10-12-2006 11:07 AM
Re: Changing IPs for all printers
The /etc/lp/interface directory contains the base printer script. For HP JetDirect connections, the scripts are all the same except for the PERIPH= line. Unless your IT department makes a special point to setup printer hostnames, the IP address is much more reliable -- and in your case, moving to a different corporation's network probably means no DNS support for the printers.
You are correct though, remove and add will be easier than editing all those files. Make a list of the printer names (more accurately, the print queue names), then using vi, create a file with removequeue and addqueue. The only individual step would be to insert the IP new address. Something like this:
prn1
prn2
prn3
...
prn28
-----insert PATH to shorten the lines
PATH=/opt/hpnpl/bin
removequeue -q prn1
removequeue -q prn2
removequeue -q prn2
...
removequeue -q prn28
then run this script to delete the printers.
-----same file, replace with addqueue
addqueue -q prn1 -h 12.34.56.78
addqueue -q prn2 -h 12.34.56.77
addqueue -q prn3 -h 12.34.56.76
...
addqueue -q prn28 -h 12.34.56.48
And now all the printers are back with new IP addresses.
Bill Hassell, sysadmin
You are correct though, remove and add will be easier than editing all those files. Make a list of the printer names (more accurately, the print queue names), then using vi, create a file with removequeue and addqueue. The only individual step would be to insert the IP new address. Something like this:
prn1
prn2
prn3
...
prn28
-----insert PATH to shorten the lines
PATH=/opt/hpnpl/bin
removequeue -q prn1
removequeue -q prn2
removequeue -q prn2
...
removequeue -q prn28
then run this script to delete the printers.
-----same file, replace with addqueue
addqueue -q prn1 -h 12.34.56.78
addqueue -q prn2 -h 12.34.56.77
addqueue -q prn3 -h 12.34.56.76
...
addqueue -q prn28 -h 12.34.56.48
And now all the printers are back with new IP addresses.
Bill Hassell, sysadmin
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP