Hello, I have a local Ethernetwork of several Macs, and would like to use one of them (an old Power Mac 7300 running SuSE Linux 7.0) as gateway/ firewall to the wide world. I understand from the IP-Masquerade HOWTO that this requires the 7300 to have *two* Ethernet ports: iMac iMac \ / \ / Hub ---------------- 7300 --- Modem --- WEB. / \ / \ iBook printer (See http://www.linuxdoc.org/HOWTO/IP-Masquerade-HOWTO-7.html#ss7.26. Only the 7300 would stay "on" 24/7.) 1) Do I understand correctly? 2) If yes, I need to add a Network card in one the 7300's PCI slots. What's a good choice? (Price, SuSE 7.0 support,...) Thanks in advance for any and all suggestions, hysterion
On Mon, Jun 04, hysterion wrote:
Hub ---------------- 7300 --- Modem --- WEB.
You dont need two ethernet cards, you need two interfaces. Hub ---- eth0 -7300- ppp0 - Modem --- Web. So you have to MASQ the ppp0 interface. This eth0 is the gateway for all iMacs. Gruss Olaf -- $ man clone BUGS Main feature not yet implemented...
Olaf Hering wrote:
On Mon, Jun 04, hysterion wrote:
Hub ---------------- 7300 --- Modem --- WEB.
You dont need two ethernet cards, you need two interfaces.
Hub ---- eth0 -7300- ppp0 - Modem --- Web.
So you have to MASQ the ppp0 interface. This eth0 is the gateway for all iMacs.
Thanks, and my apologies for not being clearer: by modem I meant a *cable* modem, hence the perceived need for a second Ethernet card on this (Power Mac) 7300. Now I'm trying to follow this suggestion (from comp.os.linux.powerpc): Brian Victor writes:
1) Do I understand correctly?
Yes. Your diagram could be put in a textbook. ;)
2) If yes, I need to add a Network card in one the 7300's PCI slots. What's a good choice? (Price, Linux support,...)
I had success with the $20 Netgear FA311. http://lists.linuxppc.org/listarcs/linuxppc-user/200105/msg00158.html
I got the card yesterday, and have been trying to get it recognized today... to no avail yet. Not sure where the crux lies, so I've tried to include all relevant messages below. Further help would be greatly appreciated - I have 14 days to get this card working, or return it and try another. (Suggestions still welcome!) Thanks again, hysterion ========================== Kernel: 2.2.16 from SuSE Linux 7.0 PPC. Machine: Power Mac 7300/180. Netgear FA311 installed in one of the PCI slots. Goal: get it recognized as eth1 (eth0 is the built-in card). 1) Following http://www.scyld.com/network/updates.html (section "Drivers may be updated individually..."), I downloaded these to a directory /usr/src/modules/: natsemi.c kern_compat.h pci-scan.c pci-scan.h I do have the necessary file /usr/include/linux/version.h . 2) Compilation produces natsemi.o and pci-scan.o, but with these warnings: $ gcc -DMODULE -Wall -Wstrict-prototypes -O6 -c natsemi.c In file included from natsemi.c:107: /usr/include/linux/string.h:28: warning: conflicting types for built-in function `memset' /usr/include/linux/string.h:29: warning: conflicting types for built-in function `memcpy' /usr/include/linux/string.h:32: warning: conflicting types for built-in function `memcmp' $ gcc -DMODULE -D__KERNEL__ -DEXPORT_SYMTAB -Wall -Wstrict-prototypes -O6 -c pci-scan.c In file included from /usr/include/linux/signal.h:64, from /usr/include/linux/sched.h:23, from /usr/include/linux/mm.h:4, from pci-scan.c:60: /usr/include/linux/string.h:28: warning: conflicting types for built-in function `memset' /usr/include/linux/string.h:29: warning: conflicting types for built-in function `memcpy' /usr/include/linux/string.h:32: warning: conflicting types for built-in function `memcmp' 3) "Testing the module": pci-scan.o loads, but *not* natsemi.o: $ insmod -v pci-scan.o Using pci-scan.o Symbol version prefix '' $ insmod -v natsemi.o Using natsemi.o Symbol version prefix '' natsemi.o: init_module: Device or resource busy Hint: this error can be caused by incorrect module parameters, including invalid IO or IRQ parameters $ lsmod Module Size Used by pci-scan 3408 0 ipv6 121832 -1 (autoclean) memstat 1960 0 (unused) $ dmesg (...) natsemi.c:v1.07 1/9/2001 Written by Donald Becker <becker@scyld.com> http://www.scyld.com/network/natsemi.html 4) At no point does the card trigger an LED on my hub, nor appear in ifconfig nor in cat /proc/net/dev. On reboot I get boot messages like these: (...) eth0: MACE at 00:05:02:a8:78:12, chip revision 25.64 (...) Setting up network device eth0 done Setting up network device eth1 SIOCSIFADDR: No such device eth1: unknown interface: No such device SIOCSIFBRDADDR: No such device eth1: unknown interface: No such device SIOCSIFNETMASK: No such device eth1: unknown interface: No such device failed (...) 5) For the record, I have config files as follows: $ more /etc/rc.config (...) # networking # # number of network cards: "_0" for one, "_0 _1 _2 _3" for four cards # NETCONFIG="_0 _1" (...) IPADDR_0="192.168.0.99" IPADDR_1="192.168.0.100" (...) NETDEV_0="eth0" NETDEV_1="eth1" (...) IFCONFIG_0="192.168.0.99 broadcast 192.168.0.255 netmask 255.255.255.0 up" IFCONFIG_1="192.168.0.100 broadcast 192.168.0.255 netmask 255.255.255.0 up" (...) $ more /etc/modules.conf (...) # Aliases - specify your hardware alias eth0 off alias eth1 off (...) ==========================
On Thu, Jun 07, hysterion wrote:
Olaf Hering wrote:
On Mon, Jun 04, hysterion wrote:
Hub ---------------- 7300 --- Modem --- WEB.
You dont need two ethernet cards, you need two interfaces.
Hub ---- eth0 -7300- ppp0 - Modem --- Web.
So you have to MASQ the ppp0 interface. This eth0 is the gateway for all iMacs.
Thanks, and my apologies for not being clearer: by modem I meant a *cable* modem, hence the perceived need for a second Ethernet card on this (Power Mac) 7300. Now I'm trying to follow this suggestion (from comp.os.linux.powerpc):
These drivers are not neccessary ready for non-i386. Did you try 2.4.2? It has natsemi.o ftp.suse.com/pub/suse/ppc/kernel/2.4.2/k_deflt-2.4.2-11.ppc.rpm You can also try 2.4.5: ftp.suse.com/pub/suse/ppc/update/BETA/kernel/k_deflt.rpm 2.4 has a lot endian fixes for network cards, so it may work much better than 2.2. Gruss Olaf -- $ man clone BUGS Main feature not yet implemented...
Olaf Hering wrote:
These drivers are not neccessary ready for non-i386. Did you try 2.4.2? It has natsemi.o
Thanks, yes I will try this ultimately. But, call me stubborn, I'm still attempting to get that card to work with 2.2.16. If Don Becker's driver (a 40kB download) could save me the download of 2.4.2 (9.3MB)... I've made progress... after pulling the Netgear FA311 card out of its PCI slot and putting it back in. (Don't ask why.) Now the hub's LED lights up, my Power Mac 7300 loads the natsemi kernel module, and the card gets recognized as eth1 (in addition to the built-in eth0). Also it gets recognized at bootup, after changing a line in modules.conf to: alias eth1 natsemi HOWEVER: While I can telnet, ftp and http into the box from my iMac using eth0 (192.168.0.99), nothing happens if instead I use eth1 (192.168.0.100). See relevant info below. What am I doing wrong? hysterion ============== Boot messages: (...) Setting up network device eth0 done Setting up network device eth1 done Setting up routing (using /etc/route.conf) done Starting RPC portmap daemon done (...) Starting service httpd done (...) Starting INET services (inetd) done (...) ============== $ dmesg (...) natsemi.c:v1.07 1/9/2001 Written by Donald Becker <becker@scyld.com> http://www.scyld.com/network/natsemi.html The PCI BIOS has not enabled the device at 0/104! Updating PCI command 0004->0006. eth1: NatSemi DP83815 at 0xc481e000, 00:02:e3:05:93:ed, IRQ 23. eth1: Transceiver status 0x7869 advertising 0000. IPv6 v0.8 for NET4.0 IPv6 over IPv4 tunneling driver eth1: no IPv6 routers present eth1: no IPv6 routers present eth0: no IPv6 routers present eth0: no IPv6 routers present ============== $ lspci -tv -[00]-+-0b.0 Apple Computer Inc. Bandit PowerPC host bridge +-0d.0 National Semiconductor Corporation: Unknown device 0020 \-10.0 Apple Computer Inc. Grand Central I/O ============== $ lsmod Module Size Used by ipv6 121832 -1 (autoclean) natsemi 11332 1 (autoclean) pci-scan 3424 0 (autoclean) [natsemi] memstat 1960 0 (unused) ============== $ ifconfig eth0 Link encap:Ethernet HWaddr 00:05:02:A8:78:12 inet addr:192.168.0.99 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::5:2a8:7812/10 Scope:Link inet6 addr: fe80::205:2ff:fea8:7812/10 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:48 dropped:0 overruns:0 carrier:96 collisions:0 eth1 Link encap:Ethernet HWaddr 00:02:E3:05:93:ED inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::2:e305:93ed/10 Scope:Link inet6 addr: fe80::202:e3ff:fe05:93ed/10 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:16 errors:0 dropped:0 overruns:0 frame:0 TX packets:14 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:3924 Metric:1 RX packets:32 errors:0 dropped:0 overruns:0 frame:0 TX packets:32 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 ============== $ route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.0 * 255.255.255.0 U 0 0 0 eth0 192.168.0.0 * 255.255.255.0 U 0 0 0 eth1 loopback * 255.0.0.0 U 0 0 0 lo ============== P.S.: If really I must upgrade to kernel 2.4.2 1) Will k_deflt-2.4.2-11.ppc.rpm contain all I need? Looking at http://lxr.linux.no/source/Documentation/Changes?a=ppc#L38 ("Current Minimal Requirements"), I guess not all 10 items are relevant to me, but I'm worried about o util-linux 2.10o (my SuSE 7.0 has 2.10m) o modutils 2.4.2 (don't seem to have this) o e2fsprogs 1.19 (I have 1.18) 2) If yes, will the following procedure be about right? (I'm going by http://sdb.suse.de/en/sdb/html/ftpkernel.html and http://sdb.suse.de/en/sdb/html/olh_ppc_64_kernel_update.html): 1. Download the package to your hard disk 2. Save your old kernel and if necessary also your old initrd. cp /boot/vmlinux /boot/vmlinux.old 3. Install the new package by issuing the following command: rpm -Uhv k_deflt.rpm 4. copy the kernel from Linux to the MacOS side: o open a root shell with the command " su - " o mount the MacOS partition with " hmount /dev/macospartitionN " o copy the file /boot/vmlinux onto the Mac partition: hcopy /boot/vmlinux : o unmount the MacOS partition with " humount /dev/macospartitionN" o Boot into MacOS and copy the file to the correct place, e.g. your System folder. Make sure that you boot that new kernel, it must be active in the BootX window.
I wrote:
HOWEVER: While I can telnet, ftp and http into the box from my iMac using eth0 (192.168.0.99), nothing happens if instead I use eth1 (192.168.0.100).
See relevant info below. What am I doing wrong?
Just for the record (and so that nobody spend more time on this), I got this working thanks to kind help on the newsgroups. IIUC my error was to have put eth1 in the same subnet as eth0; calling it 192.168.1.99 instead of 192.168.0.100 fixed the problem. Ergo: the $20 Netgear FA311 does work with SuSE 7.0 PPC kernel 2.2.16 and Don Becker's natsemi driver. On to the next hurdle :-) hysterion
participants (2)
-
hysterion
-
Olaf Hering