The first thing you do is, obviously, put your card into your system and set the IRQ and address jumper. Take note of the settings on each card. You must have the modules installed for your card. (by default, Red Hat 5.0 has the modules for most cards). After you have your modules installed and know the name of it, type /sbin/insmod (modName), where (modName) is the module's name.
For example, when I type /sbin/insmod smc-ultra I get a message saying "eth1 loaded" along with my card's IRQ and I/O address. By default, the kernel already detects one of your cards on bootup, then you go to your /etc/ directory ( cd /etc) and edit lilo.conf (pico lilo.conf). After that, insert the following line after the "label" line:
append = "ether=(IRQ),(IO),0,0,eth0 ether=(IRQ),(IO),0,0,eth1"
Here's what it might look like:
image=/boot/vmlinuz-2.0.32 label=linux ---> append = "ether=3,0x280,0,0,eth0 ether=10,0x300,0,0,eth1" <-- root=/dev/sda2 initrd=/boot/initrd-2.0.32.img read-write
Then you want to edit the conf.modules file in the /etc/ directory (pico /etc/config.modules). Add the lines:
alias eth0 (modName) alias eth1 (modName)
It might look something like this:
alias eth0 smc-ultra alias eth1 wd
This sets the module's name to the ethernet card interface (eth0,eth1).
Now you want to make sure your network file is set propperly. Go to the /etc/sysconfig and edit the network file (pico /etc/sysconfig/network).
NETWORKING=yes FORWARD_IPV4=yes HOSTNAME=my.domain.name.com DOMAINNAME=domain.name.com GATEWAY=XXX.XXX.XXX.XXX your gateway GATEWAYDEV=eth0 <-- the interface you want to use for this gateways (or ethernet card)
Now you go into your /etc/sysconfig/network-scripts directory and copy the ifcfg-eth0 file to ifcfg-eth1 (cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1). Edit both files and set your IP address accordingly (I use eth0 to connect to the cable modem so the ifcfg-eth0 file should have its IP address set for the cable (pico /etc/sysconfig/network-scripts/ifcfg-eth0).
It should look something like this:
DEVICE=eth0 <-- says wha ethernet card is using this setting IPADDR=XXX.XXX.XXX.XXX <--- your IP address setting for your Cable modem NETMASK=255.255.255.0 NETWORK=XXX.XXX.XXX.0 the XXX,s should be the same as your IP address above BROADCAST=XXX.XXX.XXX.255 ONBOOT=yes BOOTPROTO=bootp USERCTL=no
Now edit the ifcfg-eth1 file (pico /etc/sysconfig/network-scripts/ifcfg-eth1).
DEVICE=eth1 <-- says wha ethernet card is using this setting IPADDR=192.168.1.X <--- your IP address setting for your local network) NETMASK=255.255.255.0 NETWORK=XXX.XXX.XXX.0 the XXX,s should be the same as your IP address above BROADCAST=XXX.XXX.XXX.255 ONBOOT=yes BOOTPROTO=bootp USERCTL=no
Now reboot and look to see if both card are initialized. A way to find this out is to run the "ifconfig" command after you have rebooted. Type /sbin/ifconfig as any user.
If you see both eth0 and eth1 settings there, your cards are working. It's a step in the right direction. Thats about as far as I made it but I'm still working on it.
By the way, you must set your other computers' IP address. The gateway you will be using for those are the same IP address that you assigned your linux machine. Make the IP address for your Windows machine something like 192.168.1.5 and gateway 192.168 .1.X (whatever you told it to be in the ifcfg-eth1 file).
Now, some quick IP masquerade instructions. Just cut and paste them to see if it works for you.
echo "1" > /proc/sys/net/ipv4/ip_forward [hit enter] /sbin/depmod -a [hit enter] /sbin/modprobe ip_masq_ftp [press enter] /sbin/modprobe ip_masq_raudio [press enter] /sbin/modprobe ip_masq_irc [press enter] /sbin/modprobe ip_masq_cuseeme [press enter] /sbin/modprobe ip_masq_vdolive [press enter] ipfwadm -F -p deny [press enter] ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0 [hit enter] ipfwadm -I -a accept -S 0/0 68 -D 0/0 67 -W bootp_clients_net_if_name -P udp [hit enter]
I know this works if you have a dialup connection to the Internet and a LAN setup already. With this you should be able to connect to the Linux box and go on the Internet at the same time. I am currently writing steps on getting this method to work wit h a cable modem.
Comments, questions, suggestions? Send them to Matrix at matrix@moon.jic.com.
Copyright © 1997-1998 Matrix (matrix@moon.jic.com). All rights reserved. Permission to use, distribute, and copy this document is hereby granted. You may modify this document as long as credit to me is given.