Problem getting Internet on dual-NIC Slack 10.1 box
I'm trying to turn an older PC into a router/web server to use with my cable modem. I'll be hooking two Windows PCs into it through a hub. I used to do this with Redhat, and then FreeBSD ages ago, but they were giving me horrible hardware problems this time around, so here I am using Slackware 10.1.
The box has two NICs: eth0 -- a 3c503 card, and eth1 -- a 3c509 card. I'm going to make eth0 my "internal" interface, and eth1 the "external" interface. Therefore, I want to assign 192.168.1.1 to eth0, and set up eth1 using DHCP through my cable Internet provider. I successfully set up the Ethernet driver modules for the two cards, and they are successfully detected on boot-up. They show up just fine using "ifconfig -a". Here is where the problem begins. I started by setting up /etc/rc.d/rc.inet1.conf to assign a static IP to eth0, and DHCP to eth1 (I also left the gateway blank). When I do "rc.inet1 restart", I can see that a DHCP search runs automatically. If I use "ifconfig -a", I find that eth0 looks great, but eth1 has nothing assigned to it. If I use "dhcpcd eth1", it runs for about two minutes and returns to the prompt without any output. (I should also point out that the cable modem is connected to the right port on my Slack box. :-) ) Since DHCP was acting up, I decided to assign a static IP to eth1 (and a gateway address). I took the DHCP values from my Windows box and plugged them into rc.inet1.conf. I ran "rc.inet1 restart", then "ifconfig -a", and both interfaces had the right IP addresses. At this point, I can ping 192.168.1.1 successfully, and my "external" IP address successfully (the one normally assigned by my provider using DHCP: 70.x.x.x), but I can't ping the Internet (ie. the provider's gateway, DNS servers, web servers, etc.). So now I'm asking for help. :-) Sorry this is so long-winded, but I wanted to provide as much info as I can. Let me know if any more info would be helpful. (And right now I don't care about routing or even DHCP, I just want to get my Slack box talking to the Internet) Thanks! |
I'm pretty sure you did this, but just in case, did you turn off/on the modem before booting into Linux? That should make DHCP ask for a new lease.
|
Quote:
I'm still not convinced DHCP is the core of the problem, since manually configuring eth1 doesn't give me any Internet access. |
I would edit /etc/modules.conf (for kernel 2.4)
or /etc/modprobe.conf (for kernel 2.6) and add : Code:
alias eth0 3c503 Code:
IPADDR[0]="192.168.1.1" /etc/rc.d/rc.inet1 start |
Quote:
Anyways, I did what you suggested -- I added those lines to /etc/modules.conf (it was empty before), and here is what my /etc/rc.d/rc.inet1.conf looks like: Code:
IPADDR[0]="192.168.1.1" I ran "/etc/rc.d/rc.inet1 stop", and I got a message that dhcpcd was not running, then returned to the prompt. Then I ran "/etc/rc.d/rc.inet1 start", got a message that dhcpcd was working, and after 15 seconds came to the prompt. When I run "ifconfig -a", I see that eth0 is up with an address of 192.168.1.1, but eth1 has no IP address and is down. Here's the alternative rc.inet1.conf I've also tried, based on the settings my Windows box gets from DHCP: Code:
IPADDR[0]="192.168.1.1" |
To try simplifying things, I've removed the 3c509 card from my system. Now I'm only using a 3c503, which appears as eth0. I've removed the 3c509 module from the kernel.
Still, I get the same problem. DHCP just won't work on eth0, and if I specify the right IP info, eth0 will be up, but won't talk to the gateway or the Internet. I can ping my own IP address just fine, and the traffic LED on the back of the card itself blinks happily, but there's a roadblock happening somewhere. I considered an IRQ conflict, but using "cat /proc/interrupts" shows that eth0 is on IRQ 5, which isn't conflicting with anything (I have no sound card). |
just a guess...
do you have a nameserver in the /etc/resolv.conf ? ( should be smth like "nameserver <ip-of-isp> " ) egag |
Quote:
|
By the way, thanks to everyone who has made suggestions so far. I really appreciate the input, and I hope that more might be able to help me out here.
|
well...if you tried only numerical ip adresses you're right.
but allow me another guess... :) don't you have to login at your ips ? ( loginname & passwrd. ) i have a router that's doing that for me... egag |
Quote:
Ultimately, my Windows box doesn't require giving a user/pass, or even specifying any particular host name, to access the Internet. (Boy, I hope this cable modem doesn't have some kind of anti-Linux detection going on... :-/ ) |
yip, i was thinking that way.
but if you normally connect without name&pwrd, it should all be ok. i also remember reading smth. about the linux dhcpcd client being different from the win. one. ? ( not sure about what was the prob. or solution then ) your prob. might be related to not being able to use dhcp. Slackware also has dhclient, and i believe that's an alternative to dhcpcd. but i never used it. maybe take a look at that... egag |
Another update:
I've connected both my Windows box and Linux box to a hub. Both link up fine. I set the Linux box to 192.168.1.1/255.255.255.0, and the Windows box to 192.168.1.2/255.255.255.0. Neither box can see the other. Pings from Windows to 192.168.1.1 fails, as do pings from Linux to 192.168.1.2. So more and more it looks like the NIC in my Linux box just isn't working. :-/ |
maybe try a setup with the 3c509 only...
egag |
I've tried with jut the 3c503, 3c509, and with just a PCI Realtek 8139 card, but I get the same results with all of them.
Is it possible Slackware is running some kind of default network filter or firewall? |
All times are GMT -5. The time now is 03:25 AM. |