From: eirik@elf.TN.Cornell.EDU (Eirik Fuller)
Newsgroups: alt.hackers
Subject: fun with arp
Date: 28 Sep 1992 00:58:32 GMT
Organization: Cornell Theory Center
NNTP-Posting-Host: localhost


[ Oh, no, not this bozoid again, with his 150 line war stories;
what ever happened to all those wonderful test postings? ]

Sorry, I had a surplus of sarcasm that needed venting.  :-)

In an earlier posting to this group, I described a routing scheme for
my home network, in which all three machines there seem, for all
intents and purposes, to be on the same subnet as my machine at work.

Since that posting, I found one more variation on that scheme, which
allows me to accomplish something I had given up on some time ago.

The Cornell Domain Name Service is set up in such a way that, for
better or worse, some things are "not possible", meaning that they
don't fit tidily into the mechanism used to generate DNS records.  In
particular, it seems to take more bribe money than my salary and
computer habit would accommodate to get nonstandard MX records.

Some time ago, back when our business cards got printed, my machine
was named elf.TN.Cornell.EDU; at the time, there was no TC domain, and
I didn't trust the name of our central machine, tcgould.tn.cornell.edu,
to be any more stable than elf's name.  The replacement for that dinosaur
(not a Gould, happily) is called theory.TC.Cornell.EDU, but that name
came along after our business cards, as did a useful synonym,
TC.Cornell.EDU (there is no host name TN.Cornell.EDU).

I didn't really want the primary name for my 3/280 to be elf; I wanted
to name it tonttu.  Originally I wanted to name it tonto (I borrowed
money to buy it, meaning it was paid for by the loan arranger), but
when my mother (a Finn) told me tonttu means elf, that was that.

When my request for an MX record for elf.TN.Cornell.EDU was met, first
by sluggishness, then by reluctance, and finally by refusal, I decided
the next best thing was to name my 3/280 elf.  For a while I left it
at that.

More recently, it occurred to me that I have two network interfaces on
my 3/280, ie0 and dp0.  Now they are configured for different
addresses on the same subnet (with, of course, different names).  In
order for packets to get through to the dp0 address, I need another
arp entry.  At first I didn't think I needed a static route as well,
but as it turned out I did, but only when trying to connect to my dp0
address from my ie0 address; from outside, it seems to work either way.

If I set up that route through the ie0 address, it doesn't seem to
work, presumably because it's getting stuck on the subnet being the
same.  If I use the dp0 address as a route, it seems to go all the way
through the PPP link, which doesn't seem quite right either.  As it
happens, I can route to my dp0 address through my lo0 address
(localhost); that doesn't use the PPP link.


So where's the hack?  (Can you picture an irate old woman driving
around corners on two wheels asking this question?  :-)


Well, let's see ... I just took my first major excursion into the
world of SunOS STREAMS, after I got tired of the panic loop caused by
my full news feed saturating my PPP link with traffic.  This stuff is
new enough to me that I can't be sure of all the implications, but my
"fixed" kernel hasn't panicked yet, and my news backlog is still
catching up (it takes a long time to offer nearly 8000 articles, most
of them still needing delivery, through a PPP link line locked at
19200 baud).  Based on conditional calls to assfail that I added,
which did get triggered, I determined that an eight bit reference
count had rolled around, which tripped a sanity check in freeb.  I
changed my call to assfail with a call to copyb (which, if the
refcount is not ready to roll, is a call to dupb).

Credit where credit is due: there is no way I could have done any of
that without the timely assistance of a helpful member of the DP
mailing list, who made the observation that the sanity check can fail
if the reference count rolls over.  Thanks, Jim.