[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: Tulip IPX support in -current unimplemented, why ?
From:       "Vasily V. Grechishnikov" <bazilio () ied-vorstu ! ac ! ru>
Date:       1997-09-29 6:25:18
[Download RAW message or body]



On Sun, 28 Sep 1997, John Hay wrote:

> > 
> >      I have the following problem: 
> > 	My FreeBSD box runs FreeBSD-current and it provides
> > IP/IPX routing between the four newtwork interfaces ( 3 NE2000 + 1 Tulip).
> > Sometime ago since the CVSup'ing of -current my tulip card couldn't assign
> > IPX address to interface by the ifconfig. I seen at /pci/if_de.c and can't
> > find implementation of IPX portion of code for ioctl requests 
> > ( SIOCSIFADDR). 
> 
> FreeBSD actually have a common handler for some (SIOCSIFADDR, SIOCGIFADDR
> and SIOCSIFMTU) ethernet ioctls called ether_ioctl() which should be
> used by the ethernet device drivers. That way they don't need to do
> anything special to support IPX. The problem is drivers like the deX
> device that actually comes from a third party and other drivers like the
> epX driver which has never been updated to use the common ether_ioctl().
	I knew it . The deX driver has it's own ioctl handler:
		tulip_ioctl().

> > 	After patching I can work with IPX on tulip but, the next
> > misteriuos thing is happen :
> > 	IPX packets to one of my networks, connected to tulip card
> > can't successfully forwards from the remote network :
> > 	 
> > 	    NET 0				  NET 1
> > 
> >          Broken IPX net.			Good IPX net.
> > 	*--------------- Tulip (             ) NE2000 ------------*  
> > 			       ( FreeBSD box )	Good IPX net
> > 		      +--------(             )NE2000--1'st if(*)2'nd if--+
> > 		      |				         NetWare 3.12    |
> > 		      |				  NET 2		         |
> > 		      |				   		         | 	
> > 		      |						       NetWare 4.1
> > 		      |  NET 3
> > 		      |
> >                   1'st if
> > 		( FreeBSD box)
> > 	          2'nd if                     NET 4
> >                       |
> > 		      +-------------NetWare 4.1 ( unreachable from tulip).
> > 			
> >   But Netware 4.1 from unreachable network can see from a NET 1-3 :-(
> 
> You don't give much information about your patch, so I can't comment on
> this. It might be that you just got it to not generate an error when
> you ifconfig it, without actually working. Then IPXrouted might pick
> up the IPX net and broadcast it on the other nets. That way they might
> learn about the broken net, without actually being able to use it.

	Here is my patch to pci/if_de.c :

************************************************
--- if_de.c.3.0	Wed Aug 13 11:52:33 1997
+++ if_de.c	Wed Aug 13 12:07:04 1997
@@ -83,6 +83,11 @@
 #include <netinet/ip.h>
 #endif
 
+#ifdef IPX
+#include <netipx/ipx.h>
+#include <netipx/ipx_if.h>
+#endif
+
 #ifdef NS
 #include <netns/ns.h>
 #include <netns/ns_if.h>
@@ -4238,6 +4243,21 @@
 		    break;
 		}
 #endif /* INET */
+
+#ifdef IPX
+                case AF_IPX: {
+                     struct ipx_addr *ina = &(IA_SIPX(ifa)->sipx_addr);
+                     if(ipx_nullhost(*ina)) {
+                        ina->x_host =
+                        *(union ipx_host*)sc->tulip_enaddr;
+                     } else {
+                        ifp->if_flags &= ~ IFF_RUNNING;
+                        bcopy((caddr_t)->ina.x_host.c_host,
+                              (caddr_t)sc->tulip_enaddr,
+                              sizeof(sc->tulip_enaddr));
+                     }         
+                }
+#endif /* IPX */
 
 #ifdef NS
 		/*


**************************************************** 
	It is very simple, trivial and dumby.

 

> But to try and figure out what is wrong, I'll have to see the patch
> that you have made and also the part of your rc.conf files that have
> to do with IPX.
	With my patch tulip driver can correctly assign right IPX address
from the ifconfig. And from broken IPX net I can reach any Netware server
in my LAN, except the 4.1 in NET4. First I think that FreeBSD 2.2BETA
at the secondary router had broken IPX support, but NET4 is reachable from
the NET1-3.And from the NET0 I can see Netware server 4.1 connected to 2'nd if
 of Netware 3.12 in NET2. 

	Here is the chunk of /etc/rc.conf :

[ ... ]

network_interfaces="de0 ed0 ed1 ed2 lo0"        # List of network interfaces (lo0 is loopback)
ifconfig_de0="inet 193.233.113.225 netmask 255.255.255.240"
ifconfig_de0_ipx="ipx 0x7"
ifconfig_ed0="inet 193.233.113.18 netmask 255.255.255.248"
ifconfig_ed0_alias0="inet 193.233.113.20 broadcast 193.233.113.23"
ifconfig_ed0_ipx="ipx 0xd"
ifconfig_ed1="inet 193.233.113.129 netmask 255.255.255.240"
ifconfig_ed1_ipx="ipx 0x330"
ifconfig_ed2="inet 193.233.113.249 netmask 255.255.255.248"
ifconfig_ed2_ipx="ipx 0x329"

ifconfig_lo0="inet 127.0.0.1"   # default loopback device configuration.

[ ... ]

ipxgateway_enable="YES"		# Set to YES to enable IPX routing.
ipxrouted_enable="YES"		# Set to YES to run the IPX routing daemon.
ipxrouted_flags="-s"		# Flags for IPX routing daemon.

[ ... ]

Thanks , Vasily .
 ***************[ FreeBSD it is coolest UNIX for PCs ! ]***************
 *  System admin/programmer, ftp/web/post master. * IM & PE of VorSTU *
 *  Home Page: http://www.ied-vorstu.ac.ru/~bazilio 	              *
 ********************************************************************** 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic