printer problem [ SOLVED ]

vu pham vu at sivell.com
Thu Dec 4 04:32:01 PST 2008


Vu Pham wrote:
> 
> I have a network printer using LPD. When I *manually* telnet to that 
> printer at LPD port, then the printer does ACK to my SYN packet and 
> start receiving data.
> 
> When I use CUPS to print, then the printer does not acknowledge the tcp 
> SYN packets at all.
> 
> They are just TCP connections, how does the printer know ? :(
> Below is my tcpdump:
> All packets before 14:24:54 are from my manual telnet.
> All packets after 14:25:06 are from CUPS.
> Pluto is my server, 192.168.1.110 is the printer
> 
> As you can see, CUPS attempted to send SYN packets but does not get ACKED.
> 
> I can only see the difference of the source ports, but does the printer 
> care about that ?
> 
> -------------- start of tcpdump -------
> [root at jetco ~]# tcpdump host 192.168.1.110
> tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
> listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
> 14:24:50.555796 IP pluto.51602 > 192.168.1.110.printer: S 
> 3462708113:3462708113(0) win 5840 <mss 1460,nop,nop,sackOK,nop,wscale 2>
> 14:24:50.764192 IP 192.168.1.110.printer > pluto.51602: S 
> 3520144456:3520144456(0) ack 3462708114 win 4096 <mss 1452,nop,wscale 0>
> 14:24:50.764207 IP pluto.51602 > 192.168.1.110.printer: . ack 1 win 1460
> 14:24:54.396898 IP pluto.51602 > 192.168.1.110.printer: F 1:1(0) ack 1 
> win 1460
> 14:24:54.409157 IP 192.168.1.110.printer > pluto.51602: . ack 2 win 4380
> 14:24:54.409700 IP 192.168.1.110.printer > pluto.51602: F 1:1(0) ack 2 
> win 4380
> 14:24:54.409714 IP pluto.51602 > 192.168.1.110.printer: . ack 2 win 1460
> 
> 
> 
> 14:25:06.560950 IP pluto.731 > 192.168.1.110.printer: S 
> 3473251429:3473251429(0) win 5840 <mss 1460,nop,nop,sackOK,nop,wscale 2>
> 14:25:09.560695 IP pluto.731 > 192.168.1.110.printer: S 
> 3473251429:3473251429(0) win 5840 <mss 1460,nop,nop,sackOK,nop,wscale 2>
> 14:25:15.560267 IP pluto.731 > 192.168.1.110.printer: S 
> 3473251429:3473251429(0) win 5840 <mss 1460,nop,nop,sackOK,nop,wscale 2>
> -------------- end of tcpdump -------
> 

While I still not know why the printer refuses the connection from cups, 
I found out that this printer also supports JetDirect. Changed cups' 
type of this printer to jetdirect and I could see tcp packets exchanged 
between cups and the printer. It ACKed to cups ( and my manual telnet ) 
with Jetdirect.

Then another problem arose : small files less than about 1200 bytes are 
printed fine and larger files just stuck in the print queue for a while 
and then disappeared. tcpdump showed the printer stops responding to 
packet with about more then 1200 bytes of data. So I changed the mss on 
the router to 1200. This fixes the problem.

Vu




More information about the Linux-users mailing list