News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

Internal ethernet port on dedicated core not working as expected

Started by internix, October 31, 2008, 09:56:44 PM

Previous topic - Next topic

internix

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

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

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

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

rock your home - [url="http://www.agocontrol.com"]http://www.agocontrol.com[/url] home automation

internix

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

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

[url=http://petition.stopsoftwarepatents.eu/181001941347/][/url]

internix

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.