Author Topic: Internal ethernet port on dedicated core not working as expected  (Read 3721 times)

internix

  • Newbie
  • *
  • Posts: 12
    • View Profile
I've finally  taken the plunge to go for a dedicated core. I set it up with the 64-bit DVD on an Intel machine as a hybrid so it is easier to debug. Later on I will switch off the MD functions. Seemed to work fine. Until I wanted to hook it up to the rest of the network. I have an NVIDIA chipset on my mainboard with an integrated ethernet controller. I added an additional pci card for the second ethernet  port. The added interface is 100Mb so I connected this to my router and internet. This works fine. The integrated ethernet port is 1Gb and should interface to the rest of my network.

When I go into KDE and have look at the ethX ports I see the eth0 ports as expected. Instead of an eth1 port I saw at first an eth2 port, which was disabled. I could enable it and send traffic over it. Offcourse there were no DHCP services as de DHCPD expected to work with the eth1 port. The funny thing is I can configure everything around this eth2 port and I did, but when I rebooted the eth2 interface was lost in the woods. Instead I had now an eth3 port. At every reboot the number goes up by one.

Does anyone of you an idea were to look for a solution?

Thnx in advance

Internix

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Internal ethernet port on dedicated core not working as expected
« Reply #1 on: October 31, 2008, 10:12:15 pm »
You are right that eth0 must be the external and eth1 must be the internal or it won't work. Almost certainly the set up is getting confused when initialising the eth ports because it is expecting the integrated port to be eth0 and the card to be eth1. I'm sure you could hack it to correct this assumption, but the simplest way to force the correct names is to use a udev rule.

http://forum.linuxmce.org/index.php?topic=3959.msg22578#msg22578

This will sort it out for you..

merkur2k

  • Addicted
  • *
  • Posts: 513
    • View Profile
Re: Internal ethernet port on dedicated core not working as expected
« Reply #2 on: October 31, 2008, 10:38:34 pm »
ubuntu maintains a list of ethernet devices it has seen in /etc/iftab. Whenever it detects a new device that it hasnt seen before, it grabs the next available eth device and writes a line to that file, permanantly associating that eth device with the mac address. You can hand edit this file and tell it which interface should be associated with each eth device though. Its a pretty simple file, the format should be obvious.

internix

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Internal ethernet port on dedicated core not working as expected
« Reply #3 on: October 31, 2008, 10:53:32 pm »
Thnx for your good advice. I just tried the iftab route. As it turns out, the driver forcedeth, which handles my eth port, seems to have a bug in getting the mac address from the device. Instead it returns a random address of its own making. This defeats keeping the mac addresses in iftab. I'll try the udev route next and report back.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Internal ethernet port on dedicated core not working as expected
« Reply #4 on: October 31, 2008, 11:12:07 pm »
those nvidia NICs are *cough* crappy.

br, Hari
rock your home - http://www.agocontrol.com home automation

internix

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Internal ethernet port on dedicated core not working as expected
« Reply #5 on: November 01, 2008, 12:23:18 am »
They're crappy indeed, but the trick with udev worked. I made a file in /etc/udev/rules.d with the name "ethernet.rules". In it I have the following two lines:

KERNEL=="eth*", SYSFS{address}=="00:50:da:4f:11:51", NAME="eth0"
KERNEL=="eth*", SYSFS{address}!="00:50:da:4f:11:51", NAME="eth1"

This works because I only have two ethernet interfaces in the machine. One, eth0, is always correctly identified. The other has a mac address which is different from the first one and will be called eth1.

I rebooted and lo and behold the whole house had internet access through the core. I was able to install orbiters on my other PC's and control everything connected to the core. Tomorrow I'll try remote booting a MD.

Guys, thanx a lot for the quick assistance. It saved a bundle of time. Once I'm done with the setup I will create a description of the whole process in the wiki.



Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: Internal ethernet port on dedicated core not working as expected
« Reply #6 on: November 02, 2008, 12:08:16 am »
instead of creating a new file, just edit /etc/udev/rules.d/70-persistent-net.rules as that's what the file is for.
"Change is inevitable. Progress is optional."
-- Anonymous


internix

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Internal ethernet port on dedicated core not working as expected
« Reply #7 on: November 03, 2008, 11:03:31 pm »
I will do that once I find out how to modify the image in a persistent way. Right now I found I have to re-edit whenever I regenerate the MD.