My goal is to share my cable/modem internet connection with a linux box as a firewall / gateway, and a couple of windows machines acting as clients.
I've read tons of posts on this site on how to do this and even the articles outlining how its done.......for the life of me I can't get it to work. I then tested to see if I could at least ping other machines within the LAN.
This is what I have on my linux machine:
Redhat 7
IBM 300PL
On board NIC (Intel PCI EtherExpress Pro 100)
Aopen ALN 325C (RealTek chipset)
I also have a LinkSys 10/100 hub
My first experiment was to just install a second network card in the linux box (Aopen), set static IP's for both card's
onboard NIC 192.168.0.1 -------> eth0
Aopen 192.168.0.2 -------> eth1
and try to ping other machine's on the lan.
I hardcoded a win2k IP to 192.168.0.3
Connecting eth0 (onboard NIC) into the hub, I can ping my win2k machine. Likewise, when eth0 is connected, from win2k I can ping both 192.168.0.1 and 192.168.0.2 (should I be able to do this?? seeing as only eth0 is connected to the hub).
When I connect eth1 into the hub (disconnecting eth0) and try to ping the win2k machine, it doesn't work....likewise from win2k I can't ping the linux machine.
I'm stumped at this point. I even tried replacing the Aopen NIC with an Edimax NIC (same Realtek chipset), same results too however.
When linux boots, both eth0 and eth1 get the [ OK ], so I'm not sure what the problem could be.
figc
01-08-2003, 01:31 PM
Let me elaborate as to how I got to this point.....
My specs:
Redhat 7
On board NIC (Intel PCI EtherExpress Pro 100)
Aopen ALN 325C (RealTek chipset)
Cable Modem internet connection which uses DHCP
Seeing as I want my linux box to act as a gateway for my internet connection, I installed a second NIC in the linux box.
With NETCFG (under GNOME) I set the following parameters for my NIC's
Aopen (eth1)
IPADDRESS : 192.168.0.2 or 192.168.0.1
protocol : none or static
NETMASK : 255.255.255.0
etc.....
In the ROUTING tab of NETCFG I listed 2 DNS servers, enabled ipv4 forwarding, and under default gateway, I listed the IP address my cable modem company lists as the default gateway.
I found this out by running IPCONFIG /all on my win2k machine which originally was connected to the internet via cable modem.
Default gateway device was listed as eth0.
At this point, I'm not worried about networking my various machines.....I just want to get an internet connection for the linux box. So, I connect my cable modem to eth0, reboot, and as soon as linux gets to eth0, it waits for about a minute then fails, saying it cant get a connection. What am I doing wrong???
Rickdog
01-08-2003, 02:04 PM
Did you power down the modem and restart it with the linux box booted? It happens all the time that the ISP server needs to find the mac of the nic this way. (At least that's what I read somewhere once.) And that's what I had to do with my cable modem setup.
I highly recommend using firestarter for gnome (it works in KDE too). Run the gui and it will do everything for you. You can set up NAT (internet connection sharing) and firewall all in one. http://firestarter.sourceforge.net/ With luck you could even download the file onto a windows floppy and install it on the linux box and get everything configured. I haven't tried this, but I will D/L it just to see. I hate to keep saying it, but firestarter makes it so easy to get networking/sharing working, it's funny it's not part of the distribution.
figc
01-08-2003, 02:18 PM
>Did you power down the modem and restart it with the linux >box booted? It happens all the time that the ISP server needs >to find the mac of the nic this way. (At least that's what I read >somewhere once.)
Thats one thing I haven't tried........and at this point I'll try it.
So basically I shut down linux, and with the cable modem plugged into the nic, I disconnect the power cable to it.....wait for a minute, then boot up linux and then plug the modem back in??
One's things for sure, linux will fail when it gets to eth0 (the one connected to the cable modem).
thanks,
Rickdog
01-08-2003, 02:19 PM
No, leave the linux box booted up and running so the server and modem can talk to it and connect. Just power down the modem for 20 seconds or so, then power it back up again, it just might work.
figc
01-08-2003, 02:30 PM
>No, leave the linux box booted up and running so the server >and modem can talk to it and connect. Just power down the >modem for 20 seconds or so, then power it back up again, it >just might work.
I'll try that.......thanks for the help
Rickdog
01-08-2003, 02:33 PM
I'm not familiar with the built in nic you're using, but I have done lots of internet configs with the RLT 8139, among others. Is it a pretty new nic? If it is, the 7.0 kernel may not support it. OK, I found your nic at the aopen site. It is supported, there is even a linux driver you can download there, so it should be ok.
BTW, the driver is here http://www.aopen.com/tech/download/network/aln325c.htm
figc
01-08-2003, 02:41 PM
>I'm not familiar with the built in nic you're using, but I have done >lots of internet configs with the RLT 8139, among others. Is it a >pretty new nic? If it is, the 7.0 kernel may not support it.
No, its not a new NIC. I have an IBM 300PL with 300MHz processor, so I imagine its a few years old. The NIC itself is an onboard card. According to the driver NETCFG lists for it
(eth0 = eepro100), the NIC is an Intel PCI EtherExpress Pro 100 series
Linux initializes it fine on bootup (static IP).
When I give it a static IP and try to ping other machines on the LAN it works no problem.
Rickdog
01-08-2003, 02:50 PM
OK, sorry, I found the info for you other nic. It's ok to know that though. I would just for the heck of it try using the other nic to connect to the internet. Set it to dhcp. I have seen on one of my systems with built in lan where it only like to use one of the nics to find the internet for some odd reason. Restart the modem again too, because it will be on another mac address.
Rickdog
01-08-2003, 02:53 PM
I forgot to mention that your also have linuxconf at you disposal in case you didn't know that. It's a pretty helpful tool.
Here is a document that is probably more helpful than I can be right now.http://redhat.pacific.net.au/redhat/linux/7.0/en/doc/HOWTOS/Cable-Modem I'll check back later.
How about one of the networking gurus giving a hand?
figc
01-08-2003, 03:02 PM
>I forgot to mention that you also have linuxconf at you disposal >in case you didn't know that. It's a pretty helpful tool.
I'll try your earlier suggestion with alternating the NIC cards for an internet connection.
And yes, I knew about linuxconf.....I've been alternating between both netcfg and linuxconf.
figc
01-08-2003, 03:14 PM
>OK, I found your nic at the aopen site.
>It is supported, there is even a linux driver
>you can download there, so it should be ok.
Yes, thanks, I've already been to the Aopen site and found this driver for it. Unfortunately I have to compile it. Fortunately, the NIC uses the RealTek chip for which Linux has a driver for it.....rl8139.
One question though:
When I set static IP's to both NIC's and try to ping my LAN
ie:
onboard NIC eth0 192.168.0.1
Aopen eth1 192.168.0.2
With eth0 plugged into the hub I can ping my LAN and likewise a win2k machine can ping linux......
with eth1 plugged into the hub, I can't ping my LAN......any suggestions??
Rickdog
01-08-2003, 07:02 PM
"With eth0 plugged into the hub I can ping my LAN and likewise a win2k machine can ping linux......
with eth1 plugged into the hub, I can't ping my LAN......any suggestions??"
Here's what's starting to gel in my little brain. Your on board lan eth0 must at least be functional (not defective). Your eth1 seems to be somewhat functional but is either not configured correctly or has a driver mismatch. (There are oodles of nics based on the 8139 chip, not all use the same module/driver.) To make it worse there are at least three or four versions of the 8139 chip itself a,b,c etc.
At Red Hat I read in the 7.0 docs that you should not try to use both netconfig and linuxconf to make network settings as it somehow can screw things up. This is something to keep in mind. I would try to stick with one configurator.
I would try to stick with one nic and just get the internet working without networking for a couple of reasons. It's easier to get one thing working without confusing things with another device you are unsure of, having internet working will give you a tremendous advantage getting help and posting screen output. It will allow you to download firestarter. Firestarter will set things up like ipchains and NAT and actually configure both nics so that you can share internet with the hub.
You might want to try setting a pure ethernet connection to your cable modem with no dns numbers, IP addresses, or anything, just enable dhcp, actually that's how I ran my linux router. Those things might already be taken care of by the ISP dhcp server. Either that, or just use the dns numbers and dhcp. Sometimes a hostname is necessary, sometimes not.
When you boot linux, do you see a line go by showing ipchains being activated?
One more thing, when you installed, did you set up the dhcp, dns in the installation gui?
figc
01-08-2003, 10:39 PM
>When you boot linux, do you see a line go by showing ipchains >being activated?
Here's an output of the relevant boot information from LINUX
==========================================
Linux version 2.2.16-22 (root@porky.devel.redhat.com) (gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)) #1 Tue Aug 22 16:49:06 EDT 2000
Detected 348488 kHz processor.
Memory: 126808k/130048k available (1048k kernel code, 412k reserved, 1716k data, 64k init, 0k bigmem)
CPU: Intel Pentium II (Deschutes) stepping 02
PCI: PCI BIOS revision 2.10 entry at 0xfd85c
PCI: Using configuration type 1
PCI: Probing PCI hardware
Linux NET4.0 for Linux 2.2
IP Protocols: ICMP, UDP, TCP, IGMP
eepro100.c:v1.09j-t 9/29/99 Donald Becker http://cesdis.gsfc.nasa.gov/linux/drivers/eepro100.html
eepro100.c: $Revision: 1.20.2.10 $ 2000/05/31 Modified by Andrey V. Savochkin <saw@saw.sw.com.sg> and others
The PCI BIOS has not enabled this device! Updating PCI command 0103->0107.
eth0: OEM i82557/i82558 10/100 Ethernet, 00:04:AC:EB:0B:AD, I/O at 0x7c60, IRQ 11.
Board assembly 000001-000, Physical connectors present: RJ45
Primary interface chip i82555 PHY #1.
General self-test: passed.
Serial sub-system self-test: passed.
Internal registers self-test: passed.
ROM checksum self-test: passed (0x24c9f043).
Receiver lock-up workaround activated.
The PCI BIOS has not enabled the device at 0/160! Updating PCI command 0103->0107.
rtl8139.c:v1.07 5/6/99 Donald Becker http://cesdis.gsfc.nasa.gov/linux/drivers/rtl8139.html
eth1: RealTek RTL8139 Fast Ethernet at 0x7800, IRQ 10, 00:60:67:72:e7:93.
==========================================
>when you installed, did you set up the dhcp, dns in the >installation gui?
I believe I installed them both......errr....how would I know if they're both installed?
Rickdog
01-09-2003, 04:57 AM
when you installed, did you set up the dhcp, dns in the >installation gui?
I believe I installed them both......errr....how would I know if they're both installed?
It was just something I was curious about. I have installed linux probably a hundred times, and it always seems to connect better if you set up the ethernet parameters during the installation.
Anyways, here are some commands you may have already used but should help to see if ipchains is being activated, how the ethernet cards are being recognized, and general network info.
#netstat gives lots of info on the network
#dmesg gives you access to the boot info
What happens when you ping your ISP? Try #ping myisp.com, it should give you the ip address. Or try to ping the DNS address of your ISP. If you can ping them, that's a good sign.
* Here's what I would do. Go to http://firestarter.sourceforge.net/index.php download the rpm for your version of gnome, install firestarter. As root run #firestarter. Go through the setup in the gui check dhcp for eth0, read the manual at their site, it's good. Get the internet up, then use the firestarter gui to set up nat and sharing to the lan. You can download the Redhat 7-8 rpm onto a windows floppy and install it with the package manager from there or copy wherever you like so you can find it . It should get all this business straightened out.
figc
01-09-2003, 06:14 AM
>What happens when you ping your ISP? Try #ping myisp.com, it >should give you the ip address. Or try to ping the DNS address >of your ISP. If you can ping them, that's a good sign.
I wish I could do this.....My linux box has no internet connection....that's the problem. I already have the DNS IP's and all the other IP's of my ISP.....(that sounds funny ;-), but the point is I can't connect with linux even with these parameters set in my ethernet cards.....and according to dmesg, ifconfig, everything seems to be working.
I appreciate all your time and help. I think though that I've screwed around so much with the net configuration that its probably screwed my system up as well. I'm going to reinstall again (ya I know...sounds awful) and if that doesn't work, then I'll go back to microsoft.....kidding ;-)
I'll also look into firestarter.
justlinux.com
Copyright Internet.com Inc. All Rights Reserved.