Trailers

An application (like FTP) sends a string of octets to

TCP which breaks it into chunks, and adds a TCP header.

TCP then sends blocks of data to IP which adds its own

headers and ships the packets over the network. All

this prepending of the data with headers causes memory

moves in both the sending and the receiving machines.

Someone got the bright idea that if packets were long

and they stuck the headers on the end (they became

trailers), the receiving machine could put the packet

on the beginning of a page boundary and if the trailer

was OK merely delete it and transfer control of the

page with no memory moves involved. The problem is

that trailers were never standardized and most gateways

don't know to look for the routing information at the

end of the block. When trailers are used, the machine

typically works fine on the local network (no gateways

involved) and for short blocks through gateways (on

which trailers aren't used). So TELNET and FTP's of

very short files work just fine and FTP's of long files

seem to hang. On BSD 4.2 trailers are a boot option

and one should make sure they are off when using the

Internet. BSD 4.3 negotiates trailers, so it uses them

on its local net and doesn't use them when going across

the network.

Hitchhiker's Guide to the Internet · 第 20 / 25 题