LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 02-17-2011, 08:38 AM   #1
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 542

Rep: Reputation: 74
Slack 13.1 : /etc/udev/rules.d70-persistent-net.rules


I am kind of curious, in /etc/udev/rules.d/ is a file 70-persistent-net.rules where eth0 is being renamed to eth1

Is there any good, sane reason to do so? I know for a fact that Skype used to choke on this in the past (prior to the current version) and the installation generates settings for eth0, which will not exist, since this eth1 rule is created.

I usually rename the eth1 to eth0 (should actually delete this file) and reboot to fix this, but it's actually soemthing that has made me wonder since Slackware 13.0 (this is where this rule first showed up, and now that I installed a virtual machine I -once again- stumbled on this behaviour.)
 
Old 02-17-2011, 08:55 AM   #2
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,379

Rep: Reputation: 824Reputation: 824Reputation: 824Reputation: 824Reputation: 824Reputation: 824Reputation: 824
In your case you can edit the file so that your interface is assigned to eth0.

This rule file is useful if you have more than one interface in your computer. It guarantees that each interface card is assigned the same device name on reboot.
Otherwise it causes merry havoc if you reboot your machine and find that your interfaces have been reassigned. (e.g. your external interface that gets an IP by DHCP is now assigned an internal static IP address, Samba shares are lost, port forwards are lost)
 
Old 02-17-2011, 09:12 AM   #3
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 542

Original Poster
Rep: Reputation: 74
I do actually do what you describe, but hadn't thought of the situation where your various interfaces may become available in a different order; Good point.

Then again: is there any reason why the interface count starts at eth1 instead of the expected eth0?
 
Old 02-17-2011, 09:18 AM   #4
Martinezio
Member
 
Registered: May 2009
Location: Warsaw, Poland
Distribution: Slackware64-current
Posts: 191

Rep: Reputation: 32
Do You have changed Your networking device after Slack installation?
 
Old 02-17-2011, 09:21 AM   #5
GazL
Senior Member
 
Registered: May 2008
Posts: 3,324

Rep: Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881
It starts at 0 on mine.
Code:
 PCI device 0x8086:0x10c0 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:xx:xx:xx:xx:xx", 
ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

Last edited by GazL; 02-17-2011 at 09:23 AM.
 
Old 02-17-2011, 09:59 AM   #6
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 542

Original Poster
Rep: Reputation: 74
Quote:
Do You have changed Your networking device after Slack installation?
Nope, it's the same device that I used during installation and was equally visible at install-time etc.

Quote:
It starts at 0 on mine.
Mine does read like that as well, but only after I edited the the persistent-net rules.

I'm not new, so the technical solutions are not my issue; The question I have is about the why it starts listing at eth1; that and it being the only network device I have put on this machine. I realize such rules are indeed practical as allend stated, I had skipped the possibility of having multiple ethernet cards.

If I put in a different ethernet card (different MAC), I would assume that both devices would be listed in this file, unless there is some hidden process that secretly edits this file :-) This (virtual) machine is not the first time I encountered this behaviour, I never bothered much about it, as I would just go and edit the rule. The first time I noticed this was back in the days that I had upgraded to Slackware 13.0 and tried to run Skype, which -back then- could not cope with the absense of eth0. It's an eternity ago, so I don't have all facts straight about it, but I reckon that my /etc/rc.d/rc.inet1.conf had both eth0 and eth1 enabled for dhcp, so that I did have network on the machine; Again: it's from a long time ago for my memory to recall such things... :-o

Anyway, I encountered it again today and I thought I'd ask about the reasons, if anyone knows.
 
Old 02-18-2011, 05:55 AM   #7
rouvas
Member
 
Registered: Aug 2006
Location: Greece
Distribution: Slackware.12.2
Posts: 76
Blog Entries: 2

Rep: Reputation: 6
Pretty annoying stuff.
I got rid of it with

Code:
exit 0
on the start of /lib/udev/write_net_rules

At least on Slackware.12.2.
 
Old 02-18-2011, 07:08 AM   #8
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,373

Rep: Reputation: 164Reputation: 164
Mine starts at "eth0" also. I have never edited or deleted this file.
 
Old 02-18-2011, 09:47 AM   #9
fskmh
Member
 
Registered: Jun 2002
Location: South Africa
Distribution: Slackware64-current multilib
Posts: 235

Rep: Reputation: 55
Quote:
Originally Posted by Ramurd View Post
I do actually do what you describe, but hadn't thought of the situation where your various interfaces may become available in a different order; Good point.

Then again: is there any reason why the interface count starts at eth1 instead of the expected eth0?
Many server and high-end motherboards come with two onboard GbE devices, so having a setting like this that survives a reboot is eminently sensible.

I do a fair amount of image deployment using clonezilla and I usually take care to delete this file before creating the image, otherwise the newly detected ethernet device gets added as eth1. Bottom line, just delete the file and reboot or restart udev and your device will go back to eth0.
 
Old 02-18-2011, 09:52 AM   #10
fskmh
Member
 
Registered: Jun 2002
Location: South Africa
Distribution: Slackware64-current multilib
Posts: 235

Rep: Reputation: 55
While we're on the subject, I don't know how many of you have seen this article:

Almost like freebsd's network-device naming scheme, but not quite. Can't say I'm looking forward to it :-/.

Last edited by fskmh; 02-18-2011 at 09:54 AM.
 
Old 02-18-2011, 09:56 AM   #11
the_penguinator
Member
 
Registered: Jan 2009
Location: Canada
Distribution: slackware -current, OpenBSD, OSX
Posts: 161

Rep: Reputation: 20
Quote:
Originally Posted by Ramurd View Post
Anyway, I encountered it again today and I thought I'd ask about the reasons, if anyone knows.
I don't have an answer, just similar experience. I have 28 laptops running 13, 13.1 and some current, in my class for my students. The Dell D600's in particular have occasionally booted with the interfaces renamed/swapped in the file you're speaking of. I don't think I have a definitive answer as to why. Sometimes the kids inadvertently hit Fn +F2 which shuts off the wireless card, other times who knows...generally a reboot sorts things out.
 
  


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
70-persistent-net.rules DebianUser Linux - Networking 1 08-07-2010 07:09 AM
[SOLVED] Changes to 70-persistent-net.rules not reflected in ifconfig until reboot Potatos Linux - Networking 3 06-18-2010 12:40 PM
cat: /etc/udev/rules.d/70-persistent-net.rules: No such file or directory rcg1984 Linux From Scratch 2 09-17-2008 07:02 AM
Slack 11, udev 97 Palm Pilot rules shepper Slackware 1 11-11-2006 11:04 PM
need help fixing my udev rules or ivman rules hedpe Linux - Hardware 2 03-18-2006 10:07 AM


All times are GMT -5. The time now is 12:37 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