Author Topic: Dual NIC cards but only one works at a time  (Read 8788 times)

jph

  • Newbie
  • *
  • Posts: 14
    • View Profile
Dual NIC cards but only one works at a time
« on: February 27, 2012, 07:26:55 pm »
There two RTL811/8168BB NIC cards installed both running the r6168 driver.  I have changed /etc/network/interfaces file to reflect two nics (eth0 external DHCP and eth1 static).  In the Advance/Network/settings , Linuxmce recognizes only eth1 and it creates a virtual NIC at eth1:1.  My changes to etc/network/interface get re-wrtten on re-boot to eth1 and eth1:1 consistent with the settings in  Advanced/Network/Settings.  Both cards are functional as verfied by switching eth0 and eth1 in /etc/udev/rules'/rules.d/70-persistent-net.rules.  What step am I missing?
« Last Edit: February 27, 2012, 10:22:53 pm by jph »

pigdog

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1105
    • View Profile
Re: Dual NIC cards but only one works at a time
« Reply #1 on: February 27, 2012, 08:10:34 pm »
Hi,

Is there an on-board NIC and an installed card?  What's the hardware arrangement?

Thanks.

jph

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Dual NIC cards but only one works at a time
« Reply #2 on: February 27, 2012, 08:18:01 pm »
Its an ASUS AT5IONT-I motherboard with one integrated NIC and a second NIC installed on the PCI-e slot.

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Dual NIC cards but only one works at a time
« Reply #3 on: February 27, 2012, 08:36:00 pm »
Something went wrong during setup, and the database holds the belief that you only have one nic. I will see if I can figure out how to fool it into believing the truth.

For now, make your interfaces file reflect the proper interface names (eth0 eth1), however make them reflect the opposite function (put your internet on internal and vise versa), go into webadmin, advanced/networking and at the bottom of the page choose "swap interfaces", and see if that does not write the change.
I never quit... I just ping out.

jph

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Dual NIC cards but only one works at a time
« Reply #4 on: February 27, 2012, 09:41:21 pm »
I made eth0 internal and eth1 external in the interfaces file.  When I swapped the NIC cards using WebAdmin, it caused the system to reboot.  The system then overwrote the interface file to eth1:1 to dhcp (external) and eth1 to static.

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Dual NIC cards but only one works at a time
« Reply #5 on: February 27, 2012, 10:35:37 pm »
Can I please see the output of cat /etc/udev/rules.d/70-persistent-net.rules
I never quit... I just ping out.

jph

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Dual NIC cards but only one works at a time
« Reply #6 on: February 28, 2012, 12:31:40 am »

Thanks for you asisstance:  Here is the output:

# This file maintains persistent names for network interfaces.
# See udev(7) for syntax.
#
# Entries are automatically added by the 75-persistent-net-generator.rules
# file; however you are also free to add your own entries.

# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="bc:ae:c5:9a:1a:7a", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0a:cd:1e:64:6c", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"



coley

  • Guru
  • ****
  • Posts: 492
    • View Profile
Re: Dual NIC cards but only one works at a time
« Reply #7 on: February 28, 2012, 12:35:28 pm »
Maybe you've hit a similar problem to one I had, if set-up didn't complete successfully with two nics, as l3mce said you may have incorrect info in the db.
See http://forum.linuxmce.org/index.php/topic,11576.0.html you may have two conflicting records on the network info expected in your install.

-Coley.

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: Dual NIC cards but only one works at a time
« Reply #8 on: February 28, 2012, 04:27:22 pm »
Just so I understand this right,...

Because I've been messing around with MythTV settings, playback configuration user setting, etc., before getting to the network configuration...

Q: Which nic should the Internet connection be on, and which should the internal network be on,... ? (onboard versus card)

Q: And can LinuxMCE be connected to a router which Does DHCP for any direct connectly devices?
(Specifically, I have a Micsaverde Vera v.1, and my Iconia A500 tablet does not like my other wireless router)
... and have LinuxMCE do DHCP for anything connected to IT for internet and internal cross talk?

I know my Linksys WRT54GS running Gargoyle can be set to allow for other DHCP connections,... and turn off DHCP.
I don't know how easily the Vera can be configured to do the same.

Until I get a chance to reconfigure the network, Vera connects first, then the other router to it, and currently then to all other machines including my LinuxMCE Core.

I briefly tried; Cable modem to LinuxMCE Core to Vera to Linksys, but everything lost its Internet connection but the Core (The Vera may have been running DHCP, but the Linksys had it turned off).

I intend to move my Gargoyle-powered router inside, with LinuxMCE sitting between the Vera and the Linksys. So, it would be; Cable Modem to Vera to LinuxMCE Core to Linksys/Gargoyle router (with DHCP turned off) to everything else.

Will the above work,... or do I have to get more aggressive with the setup of the Vera?
See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

jph

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Dual NIC cards but only one works at a time
« Reply #9 on: February 28, 2012, 05:56:25 pm »
When I first loaded the system, I originally had an Intel Gigbit NIC card.  After LinuxMCE installation and connecting a NAS to the internal NIC I realised that the NIC was'nt recoginized since the system failed to acknowledge the NAS.  On giving up getting that card to work , I installed the Realtek NIC.  I know this card is functional. 

How do I correct the database?.  Specifically how do I log into the database and what SQL statements do I need to execute? (The link did'nt provide enough information).

coley

  • Guru
  • ****
  • Posts: 492
    • View Profile
Re: Dual NIC cards but only one works at a time
« Reply #10 on: February 28, 2012, 06:14:44 pm »
I ran it via phpMyAdmin, I ran the query via the web interface.

or you can do the following and see if you come back with more than one record.
from a terminal
Code: [Select]
mysql -u root -D pluto_main <enter>next at the mysql> prompt
Code: [Select]
SELECT IK_DeviceData FROM Device_DeviceData WHERE FK_DeviceData=32; <enter>does it come back with just entries for eth0 and eth1

-Coley.

jph

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Dual NIC cards but only one works at a time
« Reply #11 on: February 29, 2012, 01:07:57 am »
The query returns:
eth1:1,dhcp|eth1,192.168.80.1,255.255.255.0
one row in set

coley

  • Guru
  • ****
  • Posts: 492
    • View Profile
Re: Dual NIC cards but only one works at a time
« Reply #12 on: February 29, 2012, 01:11:20 pm »
ok as expected your db has the incorrect info, that first entry needs to point to eth0 not eth1:1.

Does the command "ip addr" return the expected results? two cards eth0 and eth1?

-Coley.

jph

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Dual NIC cards but only one works at a time
« Reply #13 on: March 01, 2012, 12:16:49 am »
Here is the result of ip addr:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0a:cd:1e:64:6c brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.20/24 brd 192.168.1.255 scope global eth1
    inet6 fe80::20a:cdff:fe1e:646c/64 scope link
       valid_lft forever preferred_lft forever
3: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether bc:ae:c5:9a:1a:7a brd ff:ff:ff:ff:ff:ff
    inet 192.168.80.1/24 brd 192.168.80.255 scope global eth0
4: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
    link/ether be:6c:94:6d:9a:5f brd ff:ff:ff:ff:ff:ff

/jph

coley

  • Guru
  • ****
  • Posts: 492
    • View Profile
Re: Dual NIC cards but only one works at a time
« Reply #14 on: March 01, 2012, 01:20:32 pm »
you should be able to re-run the script to detect the actual network setup and have this info inserted into the db.
If you run
Code: [Select]
sudo /usr/pluto/bin/Network_Config.sh --ext-dhcpthis script should insert the appropriate info into the record and restart your network services with the new settings.
You can verify you now have two cards detected via the webadmin and they have the info as expected.

-Coley.