LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 04-28-2011, 10:05 AM   #1
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, CentOS, Ubuntu, Fedora, Timesys, Linux From Scratch
Posts: 1,777
Blog Entries: 20

Rep: Reputation: 115Reputation: 115
random probe order of NICs in kernel


The kernel (or probably more specifically, the drivers) will still probe network interfaces in random orders. Likely this is just race conditions of how fast the various hardware responds. Udev is supposed to help with this, but fails when MAC addresses change.

I guess I need to design a better network manager that can deal with things like this. But, before I jump into that, I should search and ask around if anyone has already done such a thing, or if others have network issues they might like to see it help solve for them.

Things that can change and not be the same:

1. Which physical NIC gets which interface name (can be reassigned).

2. Which MAC address a NIC has (because cards can be changed or the whole physical machine can be changed by moving system drives around).

3. Which LAN is plugged into which port (either at the machine or at the switch racks).

What is to be accomplished:

1. Every network that access is needed to be configured.

2. Proper routes established to other networks (routing/path protocols can help here).

DHCP is, in theory, one solution. But it doesn't handle redundancy well. For example, when 2 or more interfaces go to the same LAN, it has failed to configure all the interfaces, even though they are all up. DHCP also has some security risks which require more complex configuration to resolve.

When broadening the view to see outside the box, it seems that statically configured network addresses really should not be configured in relation to a specific interface name or MAC address, but instead, to an observable network. The kernel will already answer on one interface, an ARP query for an IP address that is bound to a different interface. I've even played with this by configuring lame IP addresses on ethernet interfaces and configured the intended IP addresses on the "lo" interface. It even worked. But I don't know all the issues with it since I have not tried to deploy it in any production use.

The scheme that really seams to make the most sense is to just listen on each network interface and see what the traffic suggests. The goal at this is to learn which LAN/subnet each interface has access to (if any). This could be based on a variety of things seen. ARP queries and answers can be one clue. DHCP probing (ask for an IP address and see what comes back) can be another. Other broadcasts on the LAN can also give some info. Once it is determined what subnet an interface has access to, then this host's configuration in relation to that subnet can now be applied to that interface.
 
Old 04-29-2011, 05:48 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 1,463

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Quote:
Originally Posted by Skaperen View Post
1. Which physical NIC gets which interface name (can be reassigned).
The name eth0 can be assigned to a card by MAC address in:
/etc/sysconfig/network-scripts/ifcfg-eth0

Quote:
2. Which MAC address a NIC has (because cards can be changed or the whole physical machine can be changed by moving system drives around).

3. Which LAN is plugged into which port (either at the machine or at the switch racks).
You want your config to stay the same even if the hardware changes. This doesn't seem possible. I think for any suggestion you can make, there are obvious things that will break it.

For example, why go to the trouble of allowing any network cable to plug into any NIC?
It isn't hard to make 3 labels: INSIDE, OUTSIDE, DMZ (or whatever) and stick them over the plugs. I've set up several firewalls this way.

As for changing hardware, NICs don't break very often. When they do, its not hard to change the MAC address in one file.

And for moving system drives around. Wow. How often do you do that? I've done brain transplants a couple of times to upgrade hardware, but not very often.

You sound like a real experimenter. Maybe I'm more from IT background where you like your hardware to stay where you put it.
 
Old 04-30-2011, 04:58 PM   #3
jefro
Guru
 
Registered: Mar 2008
Posts: 11,329

Rep: Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386
I have been thinking about this for a few days. The unknown hardware is the stinker. DCHP would be pretty easy.

It may be that some resource also on each net would be available to be used to config. One concept may be to seek some file server or such for it's config. Like let it boot to eth0,1,2 for example and then let one by one look at the lan for some resource that would have to be generic and outside of each lan. When it finds the resource it then configs the eth.
 
Old 05-02-2011, 10:34 AM   #4
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, CentOS, Ubuntu, Fedora, Timesys, Linux From Scratch
Posts: 1,777
Blog Entries: 20

Original Poster
Rep: Reputation: 115Reputation: 115
Quote:
Originally Posted by smallpond View Post
The name eth0 can be assigned to a card by MAC address in:
/etc/sysconfig/network-scripts/ifcfg-eth0
But that won't completely help because the MAC address might be different.

Quote:
Originally Posted by smallpond View Post
You want your config to stay the same even if the hardware changes. This doesn't seem possible. I think for any suggestion you can make, there are obvious things that will break it.
I want my config to relate between the perspective of how it understands the network (e.g. what IP address(es) it uses) and the actual network.

Quote:
Originally Posted by smallpond View Post
For example, why go to the trouble of allowing any network cable to plug into any NIC?
It isn't hard to make 3 labels: INSIDE, OUTSIDE, DMZ (or whatever) and stick them over the plugs. I've set up several firewalls this way.
It's not a trouble to allow it. It's more trouble to prevent it. But these are not firewalls. These are computer servers running on more than one internal LAN segment.

Quote:
Originally Posted by smallpond View Post
As for changing hardware, NICs don't break very often. When they do, its not hard to change the MAC address in one file.
It's hard to do it from remote if you can't get into the machine at all. This is about "reliability" ... e.g. the machine "must come up and be reachable" short of being broken. And just changing things around is not "broken". A system (e.g. the personality set up on the system drive) needs to be able to "just work" anywhere.

Quote:
Originally Posted by smallpond View Post
And for moving system drives around. Wow. How often do you do that? I've done brain transplants a couple of times to upgrade hardware, but not very often.
It varies. Maybe 3 to 20 times a month. It depends on what's going on. Most recent one was to swap systems between 2 machines where one at 4 cores and one at 6 cores and the system that was on the 4 core would greatly benefit from 6 cores, wheres the one on the 6 cores would not. Sometimes it even happens offsite.

Quote:
Originally Posted by smallpond View Post
You sound like a real experimenter. Maybe I'm more from IT background where you like your hardware to stay where you put it.
It's not experimenting. But I guess I will end up developing a smarter network manager.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why does Firefox open pictures in random order? newbiesforever Linux - Software 1 07-23-2010 11:04 PM
multiple NICs using e1000 module.. eth[x] order geno976 Slackware 4 04-26-2008 11:36 PM
totem plays the same play order after each song is played on random. need suggestions dateofexpiration Linux - General 1 10-11-2007 05:54 PM
Random restarts, and possible memory leak (0-order allocation failed (gfp=0x1d2/0) ) rose_bud4201 Linux - Kernel 2 07-30-2007 10:02 AM
SCSI disk probe order and 1394 disks jxh Debian 1 04-19-2007 09:55 AM


All times are GMT -5. The time now is 09:06 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration