Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!amdcad!rpw3 From: rpw3@amdcad.AMD.COM (Rob Warnock) Newsgroups: comp.protocols.tcp-ip Subject: Re: A 'horror story' for the books Summary: tutorial material on "trailers" Message-ID: <22891@amdcad.AMD.COM> Date: 10 Sep 88 08:19:11 GMT References: <10208@s.ms.uky.edu> Reply-To: rpw3@amdcad.UUCP (Rob Warnock) Organization: [Consultant] San Mateo, CA Lines: 58 In article <10208@s.ms.uky.edu> david@ms.uky.edu (David Herron) writes: +--------------- | ... A check found that sure 'nuff we had some machines with trailers | and some without. Switching off trailers on the interface made the | applications work again. | I've got a couple of questions... | 1. Why did things continue to sort-of work between the conflicting | machines? I haven't looked at the code yet, but my understanding | of the rfc is that ALL packets will be trailer-ified when going | out a trailer link... +--------------- Close. The trailer protocol is only used when the data portion of the packet is an exact multiple of 512 bytes. The trailer protocol actually uses a separate Ethernet type field value for each such multiple of 512. From 4.3's "vaxif/if_il.c" (the comment marked with [!] has a bug, it says "first packet" when it should say "first mbuf"): /* * Ethernet output routine. * Encapsulate a packet of type family for the local net. * Use trailer local net encapsulation if enough data in first [!]==> * packet leaves a multiple of 512 bytes of data in remainder. */ iloutput(ifp, m0, dst) { ... off = ntohs((u_short)mtod(m, struct ip *)->ip_len) - m->m_len; if (usetrailers && off > 0 && (off & 0x1ff) == 0 && m->m_off >= MMINOFF + 2 * sizeof (u_short)) { type = ETHERTYPE_TRAIL + (off>>9); ... } ... This counts the "data" part of the packet only because the headers fit entirely within the first mbuf, which happens (!) to be the case for all protocols supported by the standard code ({UDP,TCP}/IP & XNS). So... if you are doing something with short or odd-sized packets, like a line-by-line Telnet or *very* small mail, you can still communicate between a trailer and non-trailer implementation. Plus, you can always send data from the non-trailer hosts *to* the trailer host, since s are small and thus never get trailerized. In fact, you should have been able to watch your SMTP mail on a packet monitor and seen the entire "HELO", etc., dialog go along just fine up to the point that the trailer-using host blasted its first full-sized packet at the non-trailer host... whereupon the trailer'd packet would be periodically retransmitted until the connection timed out. Rob Warnock Systems Architecture Consultant UUCP: {amdcad,fortune,sun}!redwood!rpw3 ATTmail: !rpw3 DDD: (415)572-2607 USPS: 627 26th Ave, San Mateo, CA 94403