From owner-freebsd-stable Wed Nov 26 11:03:40 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA09982 for stable-outgoing; Wed, 26 Nov 1997 11:03:40 -0800 (PST) (envelope-from owner-freebsd-stable) Received: from zibbi.mikom.csir.co.za (zibbi.mikom.csir.co.za [146.64.24.58]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id LAA09970 for ; Wed, 26 Nov 1997 11:03:32 -0800 (PST) (envelope-from jhay@zibbi.mikom.csir.co.za) Received: (from jhay@localhost) by zibbi.mikom.csir.co.za (8.8.8/8.8.7) id VAA13202; Wed, 26 Nov 1997 21:00:30 +0200 (SAT) From: John Hay Message-Id: <199711261900.VAA13202@zibbi.mikom.csir.co.za> Subject: Re: IPX router problems In-Reply-To: from Mark at "Nov 26, 97 01:59:07 pm" To: mark.wild@cableinet.co.uk (Mark) Date: Wed, 26 Nov 1997 21:00:30 +0200 (SAT) Cc: freebsd-stable@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Mark, > > One problem might be because the FreeBSD IPX code only supports > > Ethernet_II framing, which is not the default for Netware servers. > > The default for Netware 3.x is 802.3 framing and I think for v4.x > > it is 802.2SNAP, but I'm not 100% sure. The easiest if you only > > have W95 machines will be to change the server to use Ethernet_II > > framing. (The default 95 setup will sense that automatically.) If > > you have older Win3.X machines and diskless machines it won't be > > that easy. If you can't do Ethernet_II framing, I do have a patch > > to enable 802.3 framing on the FreeBSD box. > > I was incorrectly told that Ethernet II was being used, but infact it's > 802.3 (Netware 3.12). I also have the requirement of forwarding IP > packets across the two interfaces and I gather from your previous > postings on this subject that it's not currently possible to have > two frame types on the same interface. Is this still the case? > Unfortunately there's no chance of moving to Eth. II. FreeBSD currently can't do more than one IPX frame type on an interface. You can use this patch to be able to do 802.3 on FreeBSD. It provides a sysctl to switch between Ethernet_II (default) and 802.3. Remember that it will switch it for IPX on all the interfaces. John -- John Hay -- John.Hay@mikom.csir.co.za --- if_ethersubr.c.v2.2.org Wed Jul 2 07:56:33 1997 +++ if_ethersubr.c Sun Jul 27 10:18:58 1997 @@ -101,6 +101,11 @@ extern u_char aarp_org_code[ 3 ]; #endif NETATALK +SYSCTL_NODE(_net_link_ether, PF_IPX, ipx, CTLFLAG_RW, 0, ""); +static int ipx8023; /* Should we do Ethernet_II framing for IPX? */ +SYSCTL_INT(_net_link_ether_ipx, OID_AUTO, framing8023, CTLFLAG_RW, + &ipx8023, 0, ""); + u_char etherbroadcastaddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; #define senderr(e) { error = (e); goto bad;} @@ -177,7 +182,10 @@ { struct ifaddr *ia; - type = htons(ETHERTYPE_IPX); + if (ipx8023) + type = htons(m->m_pkthdr.len); + else + type = htons(ETHERTYPE_IPX); bcopy((caddr_t)&(((struct sockaddr_ipx *)dst)->sipx_addr.x_host), (caddr_t)edst, sizeof (edst)); for (ia = ifp->if_addrlist; ia != NULL; ia = ia->ifa_next) @@ -467,8 +475,13 @@ #endif #ifdef IPX case ETHERTYPE_IPX: - schednetisr(NETISR_IPX); - inq = &ipxintrq; + if (ipx8023 == 0) { + schednetisr(NETISR_IPX); + inq = &ipxintrq; + } else { + m_freem(m); + return; + } break; #endif #ifdef NS @@ -489,6 +502,18 @@ return; #endif NETATALK default: +#ifdef IPX + { + struct ipx *ipxp = mtod(m, struct ipx *); + + if (ipx8023 && (ipxp->ipx_sum == 0xffff) && + (ntohs(ipxp->ipx_len) <= m->m_pkthdr.len)) { + schednetisr(NETISR_IPX); + inq = &ipxintrq; + break; + } + } +#endif #ifdef NS checksum = mtod(m, ushort *); /* Novell 802.3 */