LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Two Network cards, same module Slackware (https://www.linuxquestions.org/questions/slackware-14/two-network-cards-same-module-slackware-4175511539/)

taichi135 07-18-2014 02:56 PM

Two Network cards, same module Slackware
 
Hi all,

Is there any way to load the same module for two network cards in the same PC running Slackware 64 14.1? Or load it twice, so that I can actually use both network cards?

I have two Intel gigabit network cards - one onboard for Intel motherboard DG33BU, and another Intel Gigabit CT Desktop Adapter, PCIe x1. They both need the same module: e1000e

I'm using the stock kernel vmlinux-huge-3.10.17.

For whatever reason the onboard nic can be loaded and assigned an IP, but the second nic cannot.

I can see this in the /etc/udev/rules.d/70-persisten-net.rules. (I've even deleted this file, for a fresh file to be written on reboot)

Dmesg reflects the same information, both nics are present.

Finally, "ifconfig" output only shows eth0, but "ifconfig -a" shows eth0 and eth1.

If I enter the command "ifconfig eth1 up", ifconfig then shows both eth0 and eth1, but it disappears after I restart the network interface(s) "/etc/rc.d/rc.inet1 restart" I have both interfaces set to DHCP, and there is a DHCP server running on both networks.

There must be a simple fix for this that I cannot figure out.

I google searched many times as well as searched the forums, but was unable to find an answer.

many thanks!

number22 07-18-2014 03:06 PM

modules will only be loaded once, it will works as many same nic cards allowed at same time in your hardware setup.
in your 70-persistent-net.rules file, modify mac address:
ATT{adress}=="xx:xx:xx:xx:xx", NAME="eth0"
ATT{adress}=="xx:xx:xx:xx:xx", NAME="eth1"

then modify /etc/rc.d/rc.inet1.conf file according to your network setup. I don't understand your DHCP setup, but custom routing setup can be add in your rc.local file.

taichi135 07-18-2014 03:17 PM

Quote:

Originally Posted by number22 (Post 5206085)
modules will only be loaded once,
in your 70-persistent-net.rules file, modify mac address:
ATT{adress}=="xx:xx:xx:xx:xx", NAME="eth0"
ATT{adress}=="xx:xx:xx:xx:xx", NAME="eth1"

then modify /etc/rc.d/rc.inet1.conf file according to your network setup.


The Mac addresses are already unique (and reflect each network cards MAC address). Below is my 70-persistent-net.rules file, but I replaced some of the address with xx:xx.... Can I somehow force the module to be loaded according to pci address?


# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:19.0 (e1000e)SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1c:xx:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:1c.3/0000:04:00.0 (e1000e)SUBSYSTEM=="net",
ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:xx:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1

thanks!

number22 07-18-2014 03:21 PM

No, you don't need to reload modules.
make sure your rc.inet1.conf file is properly edited.

using 2 dhcp improperly will mess up your default gateway.

taichi135 07-18-2014 04:13 PM

Nevermind... Sigh, it's a case of PEBKAC.

I didn't edit the second interface properly in /etc/rc.d/rc.inet1.conf

Sorry guys.

taichi135 07-18-2014 04:19 PM

Quote:

Originally Posted by number22 (Post 5206096)
No, you don't need to reload modules.
make sure your rc.inet1.conf file is properly edited.

using 2 dhcp improperly will mess up your default gateway.

One interface isn't quite true dchp - my employer uses dhcp to bind each MAC, a static address. (for security reasons - so you can't as easily plug in non-registered network interface into the network.) Yes, you can spoof MAC's etc - but that's not the point.

thanks again! Much appreciated. I'm glad I figured it out - rookie mistake though. :(


All times are GMT -5. The time now is 10:28 AM.