Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
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.
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?
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.
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????
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.
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.
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.
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.
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.
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?
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...
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
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 .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.