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.
Distribution: Mandriva, Mandriva, Mandriva. (Three different releases depending on the computer)
Posts: 665
Rep:
Adding a second Ethernet Card
Hi folks,
I've added a second Ethernet card to my Mandrake box (which has been working with a single card for a couple of years on different versions of Mandrake). When I go to command centre it can only see the original card. I expected to find some graphical tool for adding the new card (either manually or by scanning) but there doesn't seem to be anything.
Do I need to run something from the command line? If so, could anyone point me in the right direction please?
You need to add the driver for the 2nd card to /etc/modules.conf. You will find an alias for your existing eth0 in there, you need to add one for eth1.
If you have no idea which driver to pick, post the output of lspci and your current /etc/modules.conf and we'll be able to help you.
Distribution: Mandriva, Mandriva, Mandriva. (Three different releases depending on the computer)
Posts: 665
Original Poster
Rep:
Thanks for all the seggestions. :-)
The plot thickens. When lspci (neat command that!) didn't list the second Ethernet card, I rebooted to see what the BIOS was detecting. Sure enough, only one network card. So, I opened up the computer and the card itself wasn't quite pushed far enough into the PCI slot.
Now I can see both cards and the second one is loaded (automatically) into modules.conf. Great.
Weird things is I can *only* get on the LAN with eth1 now! eth0 refuses to let me do as much as ping! I assume I should be able to use both to access the LAN...
It would appear that Linux has no problem with autodetecting networks cards anyway!
No, that's not correct. From your statement that you didn't have to do anything to the modules.conf file I take it that the 2nd card has the same driver as your original one. Unless you take special action, the naming (which one is eth0 and which is eth1) is determined by the position of the card on the bus. Now only one card can be the one that talks to your LAN; that seems to be eth1. You would want to have two cards in order to route the internet trafic to your private LAN (say, eth0 connects to your cable/DSL modem and the other card serves your home-internal network). You cannot simply connect both cards to the same network, if that's what you have done.
Please post the output of your ifconfig command and tell us which IP you pinged successfully.
Distribution: Mandriva, Mandriva, Mandriva. (Three different releases depending on the computer)
Posts: 665
Original Poster
Rep:
Ah, having run ifconfig, I only get eth0 - and also on bootup, it only brings up eth0 as it lists everything that's being loaded/brought up. Certainly both cards have Realtek RTL8139 devices on them, I'm guessing the driver *should* be the same. It's certainly what modules.conf indicates.
I can ping 192.168.0.x - where x is is any valid address on my LAN.
Ok. I'm still at a loss what you want to use the eth1 for. The eth0 is brought up because (I guess) there's a configuration file for it. It would be in /etc/sysconfig/network-scripts/ifcfg-eth0. Unless there's also a ifcfg-eth1 with the specific settings, eth1 will be left alone. You can either use your favorite editor to write such a file, or use one of the configuration tools to do it.
By default, ifconfig shows only interfaces which are up, so you would need to do ifconfig eth1 to see it (and find it down). Again, eth0 presumably got configured at the time you installed the OS.
Now you can go and run yet another LAN off eth1...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.