LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-09-2005, 02:20 AM   #1
Staedtler
LQ Newbie
 
Registered: Jul 2005
Location: Mississauga, Ontario, Canada
Distribution: Slackware 10.1
Posts: 13

Rep: Reputation: 0
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!
 
Old 07-09-2005, 02:28 AM   #2
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
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.
 
Old 07-09-2005, 02:54 AM   #3
Staedtler
LQ Newbie
 
Registered: Jul 2005
Location: Mississauga, Ontario, Canada
Distribution: Slackware 10.1
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by gbonvehi
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.
I gave exactly what you suggested a try, but after rebooting, "ifconfig -a" still shows eth1 as having no IP address. eth1 isn't even up.

I'm still not convinced DHCP is the core of the problem, since manually configuring eth1 doesn't give me any Internet access.
 
Old 07-09-2005, 04:33 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,611

Rep: Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889
I would edit /etc/modules.conf (for kernel 2.4)
or /etc/modprobe.conf (for kernel 2.6) and add :
Code:
alias eth0 3c503
alias eth1 3c509
Then I would make sure /etc/rc.d/rc.inet1.conf contains :
Code:
IPADDR[0]="192.168.1.1"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""

IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]="yes"
DHCP_HOSTNAME[1]=""
...
GATEWAY="<provider's gateway>"
Then I would attempt a /etc/rc.d/rc.inet1 stop and
/etc/rc.d/rc.inet1 start
 
Old 07-09-2005, 02:25 PM   #5
Staedtler
LQ Newbie
 
Registered: Jul 2005
Location: Mississauga, Ontario, Canada
Distribution: Slackware 10.1
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by keefaz
I would edit /etc/modules.conf (for kernel 2.4)
or /etc/modprobe.conf (for kernel 2.6) and add :
Code:
alias eth0 3c503
alias eth1 3c509
Hm... what does the "alias" line do?

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"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]="no"
DHCP_HOSTNAME[0]=""

IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]="yes"
DHCP_HOSTNAME[1]=""

GATEWAY="70.x.y.129"
(Naturally, "x" and "y" are real numbers in the file)

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"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]="no"
DHCP_HOSTNAME[0]=""

IPADDR[1]="70.x.y.151"
NETMASK[1]="255.255.255.128"
USE_DHCP[1]="no"
DHCP_HOSTNAME[1]=""

GATEWAY="70.x.y.129"
When I do a start/stop on rc.inet1, both eth0 and eth1 come up with the desired IP addresses. However, I can't ping the gateway ("destination host unreachable").
 
Old 07-09-2005, 03:30 PM   #6
Staedtler
LQ Newbie
 
Registered: Jul 2005
Location: Mississauga, Ontario, Canada
Distribution: Slackware 10.1
Posts: 13

Original Poster
Rep: Reputation: 0
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).
 
Old 07-09-2005, 04:19 PM   #7
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
just a guess...
do you have a nameserver in the /etc/resolv.conf ?
( should be smth like "nameserver <ip-of-isp> " )

egag
 
Old 07-09-2005, 04:28 PM   #8
Staedtler
LQ Newbie
 
Registered: Jul 2005
Location: Mississauga, Ontario, Canada
Distribution: Slackware 10.1
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by egag
just a guess...
do you have a nameserver in the /etc/resolv.conf ?
( should be smth like "nameserver <ip-of-isp> " )

egag
resolv.conf doesn't contain any nameservers. I didn't think that would be necessary, since I've only been dealing with numeric IP addresses thus far. If my thinking is wrong, let me know. :-)
 
Old 07-09-2005, 04:29 PM   #9
Staedtler
LQ Newbie
 
Registered: Jul 2005
Location: Mississauga, Ontario, Canada
Distribution: Slackware 10.1
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 07-09-2005, 04:41 PM   #10
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
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
 
Old 07-09-2005, 04:48 PM   #11
Staedtler
LQ Newbie
 
Registered: Jul 2005
Location: Mississauga, Ontario, Canada
Distribution: Slackware 10.1
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by egag
don't you have to login at your ips ?
( loginname & passwrd. )
i have a router that's doing that for me...

egag
Well, this is a cable modem, so (as I understand) it's just TCP/UDP from here to the provider. You might be talking about PPPoE using a DSL modem; that usually requires a user/pass to set up the PPP connection.

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... :-/ )
 
Old 07-09-2005, 04:57 PM   #12
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
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
 
Old 07-09-2005, 05:02 PM   #13
Staedtler
LQ Newbie
 
Registered: Jul 2005
Location: Mississauga, Ontario, Canada
Distribution: Slackware 10.1
Posts: 13

Original Poster
Rep: Reputation: 0
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. :-/
 
Old 07-09-2005, 05:06 PM   #14
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
maybe try a setup with the 3c509 only...

egag
 
Old 07-10-2005, 05:08 PM   #15
Staedtler
LQ Newbie
 
Registered: Jul 2005
Location: Mississauga, Ontario, Canada
Distribution: Slackware 10.1
Posts: 13

Original Poster
Rep: Reputation: 0
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shared Internet access, same box, dual boot, win xp and rh9 provri Red Hat 2 06-21-2005 01:36 AM
Slack 10 has problem with SMC nic Phaete Linux - Networking 1 03-10-2005 12:45 AM
How to share internet in dual fedora box lumba Linux - Newbie 7 01-31-2005 07:02 AM
I have problem with installing ISA NIC on a slackware8.0 box senthilkumaran Linux - Hardware 1 12-20-2003 11:35 AM
One linux box and nic card, two high-speed internet connections ajnunes Linux - Networking 3 10-24-2002 05:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration