At 2:19 PM +0200 10/1/01, Alexander Langer wrote:
>>  alex> 15329  ??  S      0:00.02 lpd -4
>>  alex> alex@oink ~ $ lpq
>  > alex> lpd: Host name for your address 
>(fe80::250:baff:fed4:a512%xl0) unknown
>I started lpd on this machine: (with the -4 flag, see above).

>alex@oink ~ $ uname -a ; ifconfig -a
>FreeBSD 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Sat 
>Sep  1 15:25:41 CEST 2001 
>[EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  i386
>         inet netmask 0xffffff00 broadcast
>         inet6 fe80::250:baff:fed4:a512%rl0 prefixlen 64 scopeid 0x1

>This is the printcap from this machine:
>lp|local line printer:\
>         :sh:\
>         :rm=neutron:\
>         :sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:
>Note that "neutron" has:
>alex@oink ~ $ ping6 neutron
>PING6(56=40+8+8 bytes) fe80::250:baff:fed4:a512%rl0
>                    --> fe80:1::250:4ff:fe0f:5a27
>Then I just start lpd (or lpd -4, same effect), and this happens.
>when I do rm= in the printcap, I get:
>root@oink ~ $ lpq
> Warning: no daemon present
>Rank   Owner      Job  Files                       Total Size
>1st    alex       0    (standard input)            419326 bytes
>lpd: Host name for your address ( unknown
>So, this MIGHT be the reason:  The IPv4 address is nonexistent,
>but it displays the IPv6 address as error address.  However, it's
>still bad that he uses and IPv6 stuff when I specify -4
>BTW, it works if I add a PTR for

I am currently battling some kind of cold or flu, so my thinking
may be a bit confused.  Still, after reading all your messages a
few times, I think I understand what is happening.

You have a machine which is a "client", as far as printing is
concerned.  That machine is  In the printcap
file for that machine, you reference a printer on a different
machine.  That print-server machine is named neutron.

On the print *client* machine, you start lpd with '-4', meaning that
it (the client) should only accept jobs from IPv4-style connections.
Note that this flag only effects what lpd will accept, this flag has
no effect on what lpr/lpq/lprm will do when they need to connect to
a remote queue.

The print queue for 'lp' on oink refers to a remote machine that
is named neutron.  That hostname maps to an IPv6 address.  Thus,
lpq/lpr/lprm have no choice on how to connect to that remote host.
They use the IPv6 address.  (note, for instance, that your 'ping6'
knows about neutron via IPv6, not IPv4).  So, the print client
connects to the print server via IPv6.  When the print client
connects to the print server, the print server looks up the IPv6
address of the *client*, because the client made an IPv6 connection
to the server.  Again, this has nothing to do with 'lpd -4' on the
client.  The print server apparently can not find a hostname to
match the IPv6 address of the client, so it returns the first error
message, listing the IPv6 address of the client.

You change printcap to use an IPv4 address, and the client now
connects to the server using IPv4.  However, the print-server also
can not find a hostname to match that IPv4 address, so it returns
the second error message.

Assuming that all of the above is correct, then I *think* everything
is working the way it is supposed to.  However, I do not know the
finer points of how IPv6 is supposed to work.  Can a single hostname
have both an IPv4 address and an IPv6 address?  (as far as DNS is
concerned, I mean).  This I do not know.  In any case, the parameters
to 'lpd' are not going to effect how 'lpq' handles the printcap file.

It may be that lpr/lpq/lprm need some change here, but I'm not sure
what it would be.

Garance Alistair Drosehn            =   [EMAIL PROTECTED]
Senior Systems Programmer           or  [EMAIL PROTECTED]
Rensselaer Polytechnic Institute    or  [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to