In Linux I want to install a HP LaserJet 1320n that needs to be power up and down. It will get a new IP-address every time it's powercycled. How can I install the printer on a Linux machine and not be dependent on that the printer gets the same IP-address every time it's switched on?
Even in my Huawei CPE B593 home router/4G-modem there was the opportunity to bundle a device to a MAC-address as suggested by Tom Klino above. I think this is the best solution if it's possible.
First find out the IP of the printer:
user@PetaspeedBeaver:~$ lpstat -a laserjet1320_killeberg accepting requests since ons 10 jun 2015 20:22:56 user@PetaspeedBeaver:~$ lpstat -v laserjet1320_killeberg device for laserjet1320_killeberg: hp:/net/hp_LaserJet_1320_series?ip=100.100.1.5
Then find out the MAC-address of the printer. On the HP LaserJet 1320n it's not listed on the machine, but you can access it through telnet if you connect to the printer:
root@PetaspeedBeaver:~# telnet 100.100.1.5 Trying 100.100.1.5... Connected to 100.100.1.5. Escape character is '^]'. HP JetDirect Password is not set Please type "menu" for the MENU system, or "?" for help, or "/" for current settings. > menu ===JetDirect Telnet Configuration=== HP JetDirect : J7958A Firmware Version : V.28.05 Manufacturing ID : 25014523F02501 Hardware Address : 00:13:21:C3:E1:4F System Up Time : 0:05:09
MAC-address listed as "Hardware Address" above.
Then just bundle it to the IP in the router. In the Huawei CPE B593 it's under LAN-DHCP Settings. Click apply to restart the DHPC-server and it should work!