From: mcr@Sandelman.OCUnix.on.ca (Michael Richardson)
Subject: [386bsd] NS8390 ethernet evaluation board 
Followup-To: comp.unix.bsd
Summary: I think it works, maybe my 3/60 doesn't?
Keywords: 8390, NE2000, 386bsd, Sun, 3/60
Organization: Sandelman Software Works, Debugging Department, Ottawa, ON
Date: Mon, 31 Aug 1992 01:54:13 GMT


  [please note the followup, and email if the have a better suggestion]
  I have two National Semiconductor (Nominal Semidestructor? cute comment)
network evaluation boards. These are 8 bit cards with 8k of ram, an 8390 and
associated logic. I have placed one in my 386 running 386bsd 0.0
(I will be going to 0.1 when my network starts working) The other is
sitting in my Amiga 2000 (via GoldenGate).
  The 386bsd's hostname is bud. (as in _Married With Children_)

  I started with the NE2000 driver and started bashing. At first,
I was amazed at how little code I actually had to modify. (Mostly
just finding all the hardwired assumptions about 32k of ram that the
NE2000 has) My board does not have a reset location, so I needed a bit more 
code to put the NIC in a known state. 

  I just saw someone's suggestion [in comp.unix.bsd] about changing the u_short 
to a u_char --- that made instant sense to me, but it didn't solve the
basic problem I have been having: ARP isn't quite working.
  The other machine in my basement is my trusty Sun 3/60 (hostname: latour). 
I can't confirm that it has ever worked on a network of any kind, but I 
suspect that it would have been diskless over two years ago (before it 
was mine)

  I have traced things (via printf) into arpinput() and arpwhohas()
[in netinet/if_ether.c]. If I start a ping from the 386, it correctly
starts sending arp packets onto the network. Using rpc.etherd and
traffic (ug! suntools. I have X11R4 not openwindows) I can confirm
that arp packets are making it onto the network. No responses are
received.

  If I ping from the 3/60 to the 386bsd, my debugging shows packets
going into arpinput() where it discovers that the request is for the
386bsd and a response is transmitted. Also, rpc.etherd says things like
"rpc.etherd: bad lnth 42 dest ffffffffffffsrc 0800200622c6"
although sometimes the src is garbled. The above src is the Sun's
ethernet address.

  Of note, if I ping in both directions at the same time, then the
386bsd system realizes that it has an ethernet address for the 3/60's
IP address and just transmits. More debugging shows that it even has
the right ethernet address. Also, traffic then reports seeing icmp
packets.

  The 3/60 also transmits period 70 byte and 202 byte packets out
the interface. These should be routing packets from gated (I have
a hardwired slip connection to the Amiga which runs AmigaNOS, and
have had dialup slip connections to friends and work, which is why
I run gated). I believe that these packets are broadcast packets.
I tried bringing up routed to see if it saw anything, but didn't spend
much time on it. 

  I'm starting to suspect that the Sun can't ARP properly. 
  I have tried adding the arp address in with arp(8) on the Sun.
386bsd 0.0 doesn't have arp, so I haven't been able to do the reverse.

  Of note is that I am trying to use a subnet --- ocunix has an
autonomous class C address that is partitioned into 16 address chunks.
I am 128-143. I have tried going with no subnets, with no difference.
I have also tried turning on trailers, and have confirmed that arp is
enabled on both machines. ifconfig says: <UP,BROADCAST,RUNNING,PROMISC>
and NOARP is added if I do ifconfig le0 -arp and goes away for ifconfig
le0 arp. PROMISC goes away when I kill rpc.etherd.
  
  Further data:
    3/60 (latour): 192.139.46.129, 08:00:20:06:22:c6
    Jolix (bud):   192.139.46.130, 08:00:17:40:0b:d4

  There are no other machines on the thinnet segment which is all of
two feet long (although six inches would do the trick)

  I may have a chance to bring my 386 to work this week (but 
work is 25km by bicycle away, so I'd rather not). We have something called 
`EtherVision' that can run on PCs, and I'm familliar with the iptracing
stuff in the RS/6000s machines that I manage. I'm also going to try and find 
a WD8013 card to borrow, but I think they are all committed.

  Does anyone have any other suggestions as to a course of action
here?

-- 
   :!mcr!:            |  The postmaster never | So much mail, 
   Michael Richardson |    resolves twice.    |  so little time.
HOME: mcr@sandelman.ocunix.on.ca     Bell: (613) 237-5629
SCHOOL: 192228@physics.carleton.ca