At some point, most desktop and network support engineers will have to configure an HP or JetDirect printer on the corporate network. Even regular people at home sometimes have to configure an HP network printer. If you've ever had the misfortune of having to do this, you know how much of a pain it is to work with a tiny LED display and a limited number of buttons. The worst part of it is the lack of a numeric keypad. You have to cycle through 255 digits to configure a single octet in an IP address. Sometimes, if you cycle too fast, you'll have to cycle through another 255 times, rapidly pushing the up key.
But there is an easier way. You can save your sanity by using the telnet interface on the HP printer, finishing the job faster than someone can even open a Web browser interface.
The first thing you need to do is plug in the power and the Ethernet connection. All network-capable HP printers and JetDirect appliances will default to DHCP mode, which automatically acquires an IP address on any DHCP-enabled network. Even tiny home networks with inexpensive routers have automatic DHCP-assigned IP addresses. Once the printer comes online, it will automatically obtain the first available IP address in the DHCP pool.
Next, you need to figure out what IP address the printer automatically obtained. There are multiple ways to do this. The surest way is to get the printer to tell you what the address is by printing out a network configuration printer report. You'll have to cycle through the options on your particular HP printer to find and print the configuration report. On an HP 4250 for example, you would push Menu, Information, and then Print Configuration to get it to tell you what IP address it's sitting on. The external JetDirect appliances have a button you can press to print the configuration.
If you don't want to or can't physically touch the printer because it's in some remote location, that's not a problem. If you happen to know what the DHCP range is or you can look at the DHCP server itself, you'll quickly be able to see what IP address the printer obtained. If it's a relatively empty network, you can ping the first available IP in the DHCP range and find the printer that way.
Once you know the IP address of the printer, it would be possible to declare you're done and just print to that dynamic IP address. But from a management perspective, you may not want to do this because you want the printer on a fixed and predictable IP address. Really smart network administrators will create static DNS names for the printer and have people point to the name of the printer instead of the IP address. That way, if the printer ever needs to be moved or needs a new IP address, you won't have to change all the servers and workstations pointing to the raw IP address. You can just change the DNS entry in one place and everyone will automatically divert to the new IP address. But before you can assign any DNS entries, you must change the DHCP address.
Changing the IP address
If you want to change the IP address to something static, you can do it via Web interface or command line interface (CLI). But by the time you even start the Web interface, you could be all finished if you used the CLI. We're going to stick with the CLI here because it requires only a few quick commands.
For the purpose of this tutorial, let's say that the printer obtained an IP address of 10.1.1.10 and you want to change it to 10.1.1.100. All you need to do is open up a command prompt and type telnet 10.1.1.10. To change the IP address, type ip: 10.1.1.100.Type exit, and it will ask you whether you want to save the settings. Just press Y to apply the changes.
Let's say you want to take an existing printer that's on 10.1.1.100 and move it to a completely different subnet. Instead of following this entire procedure, just telnet in and change the IP configuration to the new settings before you power down and move the printer. Then, once you plug in the printer to the new network, it will already be ready to go and accessible.
Suppose you want to change the IP address to 10.1.2.100, the subnet mask to 255.255.255.0, and the default gateway to 10.1.2.1. You'd type the following series of commands:
That last Y key commits the changes, and you will lose the ability to access this printer until you reattach it to the 10.1.2.0/24 network. But once it's reattached, you won't have to go through the whole setup routine of determining the DHCP address and changing it because it will already be configured to 10.1.2.100.
If you need to brush up on your subnetting knowledge, check out "IP subnetting made easy."
It's also possible to configure an HP network printer to output its log files to a SYSLOG server and for SNMP management. Just type these three commands:
The first command enables SYSLOG. The second command tells the printer where your SYSLOG server is. (You need to put in the IP address of your SYSLOG server.) The third command sets your SNMP community string, which is important for basic security.
You'll also probably want to lock down that HP printer for security. Most people assume that the printer is just an appliance and don't realize that it's actually a special purpose computer running a Linux Web server. Here's an example of a U.S. Navy printer that got hacked and defaced.To lock down your HP printer, the first thing you'll want to do is put a password on it.Then, you should disable a bunch of services on your printer, like FTP, Web Server, Internet Printing Protocol, and Service Location Protocol, so they don't get hacked in the first place. To do this, you'll need to do the following commands:
The first command sets your printer password. The second command turns off Internet Printing Protocol. The third command turns off FTP. The fourth command turns off the Embedded Web Server. The fifth command turns off SNMP if you don't intend to use SNMP monitoring.