LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-02-2014, 11:41 PM   #1
manya
Member
 
Registered: Apr 2004
Posts: 194

Rep: Reputation: 15
Multiple NICs are flip-flopping


Hi Guys,

I have a multi NIC PC with CentOS and have built a IPtables firewall. Now the issue I noticed is NICs IP address assigned originally gets changed every reboot and they are not persistent so every time I have to trace the cables and re-sit the Patch cords to make the connection work. Even I tried setting physical HW address in /etc/sysconfig/network-script but still no luck.

Any clue why this might be happening?
 
Old 02-03-2014, 04:32 AM   #2
normanlinux
Member
 
Registered: Apr 2013
Location: S.E. England
Distribution: Arch
Posts: 161

Rep: Reputation: Disabled
It looks as though your system is out of date.

The newer systemd configurations have solved this problem - at the expense of slightly more obtuse names than etho, eth1 etc.

See http://www.freedesktop.org/wiki/Soft...nterfaceNames/
 
Old 02-03-2014, 08:56 AM   #3
akiuni
Member
 
Registered: Sep 2012
Location: France
Distribution: debian
Posts: 56

Rep: Reputation: Disabled
Hi

if normanlinux post doesn't solve your issue, you may have a look at the udev rules generator here :
/etc/udev/rules.d/70-persistent-net.rules

and try to fix the eth names by address mac addresses, like this :
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:11:22:33:AA:EE",
ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

here is a post that may help you :
https://alteeve.ca/w/Changing_the_et...Mapping_in_EL6
 
Old 02-03-2014, 10:11 PM   #4
manya
Member
 
Registered: Apr 2004
Posts: 194

Original Poster
Rep: Reputation: 15
Its rather checkpoint built linux and its a customized linux, wondering what can be done but since its built on RHEL I believe all those concepts should be applied

Linux xxxxxxxxxx 2.6.18-92cp #1 SMP Wed Jul 24 20:30:29 IDT 2013 i686 i686 i386 GNU/Linux

Currently I dont see any rules under rules.d

ls /etc/udev/rules.d/
00-OS-XX.rules 05-udev-early.rules 50-udev.rules 51-hotplug.rules 66-raid-hotplug.rules 95-pam-console.rules
 
Old 02-04-2014, 09:49 PM   #5
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Rep: Reputation: Disabled
the file probably isn't there, you need to make it new.

also, i've found i can accomplish the same thing on ARch linux with /etc/udev/rules.d/10-network.rules:

Code:
SUBSYSTEM=="net", ATTR{address}=="MA:CA:DD:RE:SS", NAME="ethWhatever"
 
Old 02-05-2014, 03:33 AM   #6
akiuni
Member
 
Registered: Sep 2012
Location: France
Distribution: debian
Posts: 56

Rep: Reputation: Disabled
Psycroptic's answer sounds good for me. I'd just like to add that if your flip flop is caused by MAC addresses changes (because you are running on a paravirtualized system or whatever...), you can also force udev to comply with the PCI plug order :

get the pci path to devices :
Code:
# ls -l /sys/class/net/eth*
lrwxrwxrwx 1 root root 0 Feb  5 09:23 /sys/class/net/eth0 -> ../../devices/pci0000:00/0000:00:03.0/net/eth0
lrwxrwxrwx 1 root root 0 Feb  5 09:23 /sys/class/net/eth1 -> ../../devices/pci0000:00/0000:00:08.0/net/eth1
lrwxrwxrwx 1 root root 0 Feb  5 09:23 /sys/class/net/eth2 -> ../../devices/pci0000:00/0000:00:09.0/net/eth2
lrwxrwxrwx 1 root root 0 Feb  5 09:23 /sys/class/net/eth3 -> ../../devices/pci0000:00/0000:00:0a.0/net/eth3
In your udev rule, force the eth names like that :
Code:
SUBSYSTEM=="net", KERNELS=="0000:00:03.0", NAME="eth0"
SUBSYSTEM=="net", KERNELS=="0000:00:08.0", NAME="eth1"
SUBSYSTEM=="net", KERNELS=="0000:00:09.0", NAME="eth2"
SUBSYSTEM=="net", KERNELS=="0000:00:0a.0", NAME="eth3"
That way, your ethernet devices order won't change if MAC addresses are not fiable.
note that the "KERNELS==" acts like a filter on the path, for example KERNELS=="03.0" would also match eth0.
 
  


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
multiple nics satish Linux - Networking 7 07-02-2008 10:38 AM
10.2 and multiple nics tlarkin SUSE / openSUSE 2 02-01-2007 10:06 AM
Intel D845GLLY + Multiple Intel Pro 100 NICs + kernel 2.6.x = NICs don't work egable Linux - Hardware 0 02-04-2005 03:30 PM
Flip Flopping Bush uses Linux? GalloperJimmy General 16 09-06-2004 03:26 PM
multiple NICs paulonline2501 Linux - Hardware 2 07-23-2002 06:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:03 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration