LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-17-2002, 11:26 PM   #1
JHuizingh
Member
 
Registered: Jun 2001
Distribution: Gentoo 1.4
Posts: 140

Rep: Reputation: 15
Loading 2nd network card


I am trying to get a linux box set up to use IP Masquerading. RIght now I am stuck at getting both of the NIC's loaded. The first NIC is a PCI card, and this one is loaded fine at boot. The second card is an ISA card. How do I go about finding the hardware address of this card so I can load it manually?
 
Old 02-18-2002, 05:58 PM   #2
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
ISA cards are always a bit of a pain. In order to get the module to load, you'll probably have to pass it some values, usually an IRQ and an i/o setting. For instance:

insmod 3c509 irq=12

What kind of card is it? Also, cat /proc/interrupts to see what IRQs are already used.

Cheers,

Finegan
 
Old 02-18-2002, 06:12 PM   #3
JHuizingh
Member
 
Registered: Jun 2001
Distribution: Gentoo 1.4
Posts: 140

Original Poster
Rep: Reputation: 15
The Card is a 3com 3C509B card.

Anyways, when I made the first post, the PCI card was all set up, and I was able to connect to the network. Since then I have not been able to get either network card working properly. I have tried both combinations of taking a network card out and leaving the other one in. Neither of them is working. Right now it is getting really frustrating... Any suggestions????
 
Old 02-18-2002, 06:16 PM   #4
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
Wow... I guess the model, that's nifty. For the ISA card, 'insmod 3c509 irq=x', where x is an un-used number in /proc/interrupts.

Pop the PCI card back in and run netconfig, and let Slackware's cute little utility find the card.

Cheers,

Finegan
 
Old 02-18-2002, 08:35 PM   #5
JHuizingh
Member
 
Registered: Jun 2001
Distribution: Gentoo 1.4
Posts: 140

Original Poster
Rep: Reputation: 15
Netconfig is not detecting the card anymore, but it was before I posted the original post of this thread. I really have no idea why it's doing this.... What's the best way to start all over? I am really confused.
 
Old 02-19-2002, 11:26 AM   #6
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
Keep em both in there, fight them both at once!

Did the ISA card take its module?

What is the model of the PCI card?

If the PCI card worked once, its just a matter of hammering that module in again.

What is the current output of 'ifconfig' with both cards after you try to bring up eth0 and eth1? Just 'lo'?

Cheers,

Finegan
 
Old 02-19-2002, 12:39 PM   #7
JHuizingh
Member
 
Registered: Jun 2001
Distribution: Gentoo 1.4
Posts: 140

Original Poster
Rep: Reputation: 15
I'm not at the computer right now, so I'm not sure what the output of ifconfig is, but I can give you some info. When I run netconfig now, it says that it can't find any network adapters. Also, if i do lsmod, 3c509 is loaded and it is used by "0". If I do rmmod and then modprobe 3c509, and then lsmod, it says 3c509 is unused. I'll get back to you on the ifconfig output when I back to that comoputer.

Last edited by JHuizingh; 02-19-2002 at 12:43 PM.
 
Old 02-19-2002, 12:45 PM   #8
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
Okay this makes sense now. If the 3c509 module hadn't been bound to the card, either it would have said: (unused) in lsmod, or really I'm almost certain is more the case: it wouldn't have loaded at all. The module for the ISA card has loaded. To bring it up use 'ifconfig eth0 xxx.xxx.xxx.xxx up'
where the xxx's are the IP address.

This is also why netconfig is getting confused. It loads and configures the info for eth0, which you already have done, so it doesn't see the PCI card which is eth1 now... probably. Mostly this is a matter of figuring out what kind of card the PCI card is to hand load the module, edit rc.modules by hand, and then everything should come up right from now on at boot.

Cheers,

Finegan
 
Old 02-21-2002, 09:00 AM   #9
JHuizingh
Member
 
Registered: Jun 2001
Distribution: Gentoo 1.4
Posts: 140

Original Poster
Rep: Reputation: 15
Well, I've only screwed around with it a little bit the past two days, but I figured some things out. First of all, the kernel is detecting the ISA card because it loads the correct module, but something is not quite right when setting it up. How do I know what io= address to assign to it? How would I get it to set up by DHCP server instead of me giving it an IP address? Also, I'm not sure if it is calling this card eth0 or not, how do I figure that out? When I do ifconfig it only shows lo.

Also, my PCI card is a DLink 530TX+. THere are a number of versions of this card: A, B, C, D1, and D2.... A, B, and C, are all supported by drivers which come with the kernel. D1, which I have, requires that I compile a kernel module from code that comes on the cd with the card. I will work on this when I get some free time.

I'll keep you posted on my progress. Thanks for the help so far.

Last edited by JHuizingh; 02-21-2002 at 09:02 AM.
 
Old 02-21-2002, 05:38 PM   #10
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
I'm willing to bet my next smoke break that the 3com card is up and ready to go:

Try bringing up eth0 and see what happens:

'ifconfig eth0 up'

Or, to have it grab an IP via dhcp:

'dhcpcd eth0'

To deal with the Dlink card... these jokers keep changing chipsets between minor card revisions: you might want to try and modprobe via-rhine, tulip, rtl8139... I think its one of those. If it worked before, there's no reason to try and jump through the hoops of compiling their poorly hacked drivers.

Also, to see if everything registered correctly:

'dmesg'

This shows the entire log of the kernel registering devices... from the RAM down to the Nic. The 3Com 509 does not need to be assigned an input/output address, it can autonegotiate that... it just needed that free IRQ, which you gave it.

Cheers,

Finegan
 
Old 02-22-2002, 02:19 AM   #11
JHuizingh
Member
 
Registered: Jun 2001
Distribution: Gentoo 1.4
Posts: 140

Original Poster
Rep: Reputation: 15
YESSS!!!!! I finally got it working. I hate to tell you this, but the root of my problems was when I took out the PCI network card, and then when I put it back in, I didn't push it in hard enough (you need to push it in really hard in this mobo), so it wasn't actually "IN" the computer. On the bright side, I did learn a whole lot about networking in linux . After all, isn't that what it's all about?

Also, one thing that was weird is that when I did "modprobe 3c509 irq=x", it would assign irq 10 to that card no matter what i put for x. After I did "insmod 3c509 irq=7", it finally worked. Some of the irq's that weren't listed in "cat /proc/interrupts" still seemed to be taken up, but 7 was free, so I'm happy.

Thanks for all your help.

One strange thing that is happening:
During the boot process, the /etc/rc.d/rc.inet1 script tries to configure eth0 (the pci card) by the command /sbin/dhcpcd, but the command times out and it doesn't get configured. It works fine after the login prompt comes up and I log in as root and run the exact same command. I put that command in /etc/rc.local and it didn't work either. Same with "ifconfig eth1 192.168.0.1 up". They both work when I type it in at the comand line though. Can you explain why it's not working on boot, and/or help explain what I can do so that it configures automatically?
 
Old 02-22-2002, 04:30 AM   #12
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
I never point out the 'check your hardware' aspect. I did once and got a flame reply... followed much later, on a different thread, with a sly apology. Its just not possible to point that out without sounding like a jackass. Something about a dead eth cable... anyway.

If its not coming up in rc.local then something's really screwy. This is how I do all net configuration as rc.local is a standard among Slack, RedHat, and Mandrake, which is about all I install these days.

First off, in order to get those card's modules loaded in bootup, look in /etc/rc.modules and un-comment (remove the '#') from infront of their modprobe line. The PCI card's line should already be uncommented by the netconfig script. You'll have to add the irq=7 bit after the 3com's entry, which is probably already there.

Second, edit /etc/modules.conf with

alias eth0 nameofmodule
alias eth1 3c509


Third, from there, by the time rc.local gets run (which is dead last), you should be able to put these lines in:

/sbin/dhcpcd eth0
/sbin/ifconfig eth1 192.168.0.1 up
<---Masq rules here--->

Hopefully that will get everything loaded that needs to be at the right times. Using rc.local is always frowned upon as a ghetto-riffic hack, but its my preferred method of network start-up. Let RedHat and the like keep building buggy scripts...

Cheers,

Finegan
 
Old 02-22-2002, 12:50 PM   #13
JHuizingh
Member
 
Registered: Jun 2001
Distribution: Gentoo 1.4
Posts: 140

Original Poster
Rep: Reputation: 15
OK, I"m making some progress. I've got it so the 3com card gets configured by rc.local with that /sbin/ifconfig call.

The "dhcpcd eth0" command is right before that, and the system just stops for about a minute (i presume because the dhcp request is timing out). When I log in and type it at the command line it works fine though...

Also, I don't think the entries in /etc/modules.conf are doing anything. I had the modules in a different order in /etc/rc.d/rc.modules, and the alias names for the cards were switched... Here's what I have
alias eth0 8139too
alias eth1 3c509

Any idea what's up?
 
Old 02-23-2002, 02:14 AM   #14
JHuizingh
Member
 
Registered: Jun 2001
Distribution: Gentoo 1.4
Posts: 140

Original Poster
Rep: Reputation: 15
I did it!!! It works without any interaction upon boot!!

I'm still not sure what's up with dhcpcd, but it only works the second time it is run. I put these lines in rc.local and now dhcpcd configures the card:

/sbin/dhcpcd eth0 -t 1
/sbin/dhcpcd eth0 -t 5
sh /sbin/startipmasq #A little script i made

Talk about your ghetto way of doing stuff .

If you have any idea what's up with the dhcpcd, let me know. Otherwise, thanks a lot for you help finegan. I guess I'm pretty happy now that it's over since everything possible went wrong, and now I know a lot about the boot process .
 
Old 02-23-2002, 02:44 AM   #15
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
That is rather odd. Go ghettoriffic!

My best rc.local is 26 lines long and kicks out about 2-3 errors before I get the login prompt... it works... beats me what's error'ing out.

Good luck, and if you want to lose folicles to networking, go wireless next!

Cheers,

Finegan
 
  


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
linux shuts down built in network card then windows tells me network card is unplugge lesmoxhaybaker SUSE / openSUSE 8 08-29-2006 05:10 PM
Network Card not loading correctly mckinleysh Linux - Networking 3 07-29-2004 11:15 PM
How do I set up a 2nd Ethernet card? socratesabroad Linux - Networking 6 05-16-2004 08:58 PM
2nd nick card tommytomato Linux - Networking 8 05-11-2004 07:09 PM
loading network card Mighty_Viking Linux - Networking 3 03-01-2003 04:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:12 PM.

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