[sf-lug] network laser printer
Rick Moen
rick at linuxmafia.com
Fri May 21 12:38:25 PDT 2010
Quoting Alex Kleider (a_kleider at yahoo.com):
> Following the protocol recommended (and actually carried out) by Rick,
> I decided upon an HP Laserjet 4100N offered on Craigs List for $50.
>
> It was sold to me by a nice Russian guy called Paul, who swaps out
> hardware for large companies and he has a ware house full of printers
> (lots more of these as well.) His contact info is 650-996-5829,
> vitalxs at gmail.com. His place is in Mountain View just off 101 at the
> hwy85/Shoreline exit.
>
> The printer is now up and running 'serving' my network.
>
> {One small thing that I learned: for the network (tcp/ip)
> configuration options to appear on the EIO configuration menu, the
> printer has to be already connected to the network during power up.
> The options didn't show up after my first power up because I hadn't
> plugged in my ethernet cable until afterwards. A power cycle solved
> the problem.
>
> I have been assuming that a print server must have a fixed IP but now
> I'm not so sure. This one has a DHCP client (which I disabled) but I'm
> now beginning to think that CUPS can 'find' it's printer by means
> other than knowing its IP address (part of the IPP protocol
> probably.)}
I'm going to give you the general, complex overview, and then narrow
down to specifics, so hold on, OK?
The General Picture:
Whether a fixed IP address is _necessary_ for a print server or for any
other sort of network functionality depends on how you intend to get
to the service in question.
First of all, IP-based networking isn't the only type people use in the
first place. As it happens, HP printers equipped with a JetDirect
ethernet interface (as shown by the EIO config menu) will happily
support any or all of the following network stacks -- as many of them as
you choose to enable:
TCP/IP
IPX/SPX - used to be typical of Novell networks
DLC/LLC aka NetBIOS over NBF - used to be typical of Microsoft/IBM networks
AppleTalk/LocalTalk - used to be typical of Apple networks
You'll see mention of all of those in the front panel's EIO Menu
display.
As you may have gathered, IP-based networking has largely supplanted
everything else. But what is layered on _top_ of IP and TCP differs,
which is what I'll cover next.
Second, consider the types of printing that work over TCP/IP: IPP
(which is what you almost certainly should use), LPD (obsolescent
printing protocol from the Unix world, being joyfully discarded in
favour of IPP), NetBIOS over TCP/IP aka NBT aka NetBT (Microsoft-style
printing over TCP/IP, part of SMB aka CIFS and thus what Samba uses for
printing). In all of those cases, however, the printer's being
addressed needs to resolve down to an IP address, so the printer's IP
needs to either remain fixed _or_ whatever's deciding how to talk to it
needs to get advised whenever its IP changes and revise its addressing
accordingly.
So, for example, imagine that the printer's being addressed by hostname,
and the hostname is defined at a home gateway appliance like a Linksys
router that is doing _both_ local DNS and DHCP services for the LAN.
It might have those two services integrated so that when the dhcpd
changes the printer from IP 10.0.0.5 to 10.0.0.6, the local nameservice
for "livingroom-printer" gets repointed to the new IP.
In that case, it would not be _necessary_ for the printer to have a
fixed IP, because the hostname used to refer to it always automagically
resolves to the correct albeit dynamic IP.
Third, a lot of casual use of TCP/IP in small networks, these days, is
moving to ZeroConf (http://en.wikipedia.org/wiki/ZeroConf), a TCP/IP
management protocol that lets devices autoconfigure their own IP
addresses and let devices discover nearby services without the need for
either DHCP or more-formal DNS.
You seem to be saying that CUPS 'found' the printer even though you
turned off the printer's DHCP client and didn't configure a static IP on
it. That implies either that CUPS did ZeroConf discovery or perhaps
that the printer just fell back on a default IP address and CUPS probed
it. Either way, you might want to be a little more in charge.
For one thing, ZeroConf is handy but not all that reliable.
Your Specific Situation:
You have a newly bought (used) HP Laserjet 4100N on your network.
You've recently disabled its DHCP client functionality via its front
panel, and want to configure CUPS on some workstation to print to it.
The simplest way to do this is to configure the 4100N to use a fixed
IP address you select. Then, configure the 4100N to publish either IPP
or LPD printing services (and, if you wish, NetBIOS over TCP). Then,
configure each computer on your LAN to print directly to the printer's
IP address.
Use an IP address not likely to be grabbed by anything else, e.g., not
in your DHCP server's dynamic range. (I'll get back to that point
below.)
The 4100N has an embedded Web server that you can contact across the LAN
to configure its IP address and its printing services. See page 251-254
of the manual:
http://h20000.www2.hp.com/bizsupport/TechSupport/CoreRedirect.jsp?redirectReason=DocIndexPDF&prodSeriesId=83436&targetPage=http%3A%2F%2Fbizsupport2.austin.hp.com%2Fbc%2Fdocs%2Fsupport%2FSupportManual%2Fbpl10335%2Fbpl10335.pdf
Since I _believe_ HP printers default to being DHCP clients, you might
want to configure your local DHCP server to hand out the desired IP
address to it if, say, the printer loses its configuration and reverts
to factory-default settings. I'm not sure what you're using for a DHCP
server: In the standard Linux package, ISC's DHCPD, you would do this:
In /etc/dhcpd.conf
host livingroom-printer {
hardware ethernet 00:24:ed:73:c2:8e;
fixed-address 10.0.0.253;
}
You would have looked at your DHCP server's configuration and found
that, say, it uses IP addresses 10.0.0.1 through 10.0.0.100 for its
dynamic range. So, cool, anything above 100 should be free, so pick
253. And that would then be a reasonable IP to configure the printer
itself to use as a static IP.
Making the printer use a static IP (instead of DHCP), and having it
publish printing services directly (instead of via a workstation's print
server software) has the advantage of making its printing services be
standalone, not dependent on anything else working properly. Which is
A Good Thing.
_And_, if nothing else, you should go into your workstation's CUPS
configuration and _determine_ how it's talking to the printer, just so
you know.
More information about the sf-lug
mailing list