Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
07-09-2005, 02:20 AM
|
#1
|
LQ Newbie
Registered: Jul 2005
Location: Mississauga, Ontario, Canada
Distribution: Slackware 10.1
Posts: 13
Rep:
|
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!
|
|
|
07-09-2005, 02:28 AM
|
#2
|
Senior Member
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145
Rep:
|
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.
|
|
|
07-09-2005, 02:54 AM
|
#3
|
LQ Newbie
Registered: Jul 2005
Location: Mississauga, Ontario, Canada
Distribution: Slackware 10.1
Posts: 13
Original Poster
Rep:
|
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.
|
|
|
07-09-2005, 04:33 AM
|
#4
|
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 6,611
|
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
|
|
|
07-09-2005, 02:25 PM
|
#5
|
LQ Newbie
Registered: Jul 2005
Location: Mississauga, Ontario, Canada
Distribution: Slackware 10.1
Posts: 13
Original Poster
Rep:
|
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").
|
|
|
07-09-2005, 03:30 PM
|
#6
|
LQ Newbie
Registered: Jul 2005
Location: Mississauga, Ontario, Canada
Distribution: Slackware 10.1
Posts: 13
Original Poster
Rep:
|
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).
|
|
|
07-09-2005, 04:19 PM
|
#7
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
just a guess...
do you have a nameserver in the /etc/resolv.conf ?
( should be smth like "nameserver <ip-of-isp> " )
egag
|
|
|
07-09-2005, 04:28 PM
|
#8
|
LQ Newbie
Registered: Jul 2005
Location: Mississauga, Ontario, Canada
Distribution: Slackware 10.1
Posts: 13
Original Poster
Rep:
|
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. :-)
|
|
|
07-09-2005, 04:29 PM
|
#9
|
LQ Newbie
Registered: Jul 2005
Location: Mississauga, Ontario, Canada
Distribution: Slackware 10.1
Posts: 13
Original Poster
Rep:
|
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.
|
|
|
07-09-2005, 04:41 PM
|
#10
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
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
|
|
|
07-09-2005, 04:48 PM
|
#11
|
LQ Newbie
Registered: Jul 2005
Location: Mississauga, Ontario, Canada
Distribution: Slackware 10.1
Posts: 13
Original Poster
Rep:
|
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... :-/ )
|
|
|
07-09-2005, 04:57 PM
|
#12
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
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
|
|
|
07-09-2005, 05:02 PM
|
#13
|
LQ Newbie
Registered: Jul 2005
Location: Mississauga, Ontario, Canada
Distribution: Slackware 10.1
Posts: 13
Original Poster
Rep:
|
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. :-/
|
|
|
07-09-2005, 05:06 PM
|
#14
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
maybe try a setup with the 3c509 only...
egag
|
|
|
07-10-2005, 05:08 PM
|
#15
|
LQ Newbie
Registered: Jul 2005
Location: Mississauga, Ontario, Canada
Distribution: Slackware 10.1
Posts: 13
Original Poster
Rep:
|
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 07:08 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|