LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 05-31-2008, 09:50 AM   #1
ricky_cardo
Member
 
Registered: Feb 2006
Location: Syracuse, NY
Distribution: Slackware64-Current
Posts: 210

Rep: Reputation: 76
2 Ethernet ports and controlling which is eth0/1 in Slack12.1 (networking)


I have 2 ethernet ports on my MB.
Eth0 and Eth1 appear on ifconfig.

My question is can I control which one is Eth0 and Eth1 by the MAC address?

In Slack 12 I was modifying /etc/udev/rules.d/40-network.rules

to something like this:
KERNEL=="eth?", ATTR{address}=="00:19:db:d1:43:52", NAME="eth0"
KERNEL=="eth?", ATTR{address}=="00:19:db:d0:fb:93", NAME="eth1"

So that 00:19:db:d1:43:52 was eth0 and :93 was eth1.

Now in 12.1 the udev.rules for network looks different:
[cat /etc/udev/rules.d/90-network.rules]

# This file will be overwritten in next upgrade. Please put your
# custom rules somewhere else (90-local.rules is a good idea)

SUBSYSTEM=="net", NAME=="?*", ACTION=="add", RUN+="nethelper.sh $env{INTERFACE} start"
SUBSYSTEM=="net", NAME=="?*", ACTION=="remove", RUN+="nethelper.sh $env{INTERFACE} stop"


----So my question is where should I set which ethernet port is eth0 and which is eth1.

Thanks
Rich
 
Old 05-31-2008, 10:01 AM   #2
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,443

Rep: Reputation: 73
I think you have a couple of options. You could modify
/etc/udev/rules.d/70-persistent-net.rules
or create a ##-local.rules file. The local.rules file is less likely to get overwritten accidentally in the future.

Also, be sure to remember the udev notes in CHANGES_AND_HINTS.TXT.

Quote:
Originally Posted by CHANGES_AND_HINTS.TXT
udev was upgraded - don't forget to move/merge all of the associated *.new
files into place or you will have problems. We are now using as much of
the upstream udev rules as possible (and efforts are underway to further
unify us with other distributions), so you'll notice a lot more udev rules
files in that directory. Be sure to heed the warnings about not editing
the included rules files, as they will be overwritten if/when the udev
package is upgraded.
If you have more than one network card and have been using the
75-network-devices.rules file, it is now called 70-persistent-net.rules
(and is generated from 75-persistent-net-generator.rules).
Rules for optical devices are now located in 70-persistent-cd.rules (and
are generated from 75-cd-aliases-generator.rules).
You will need to remove the old rules files (75-optical-devices.rules and
75-network-devices.rules) so that they don't conflict.

As stated above, Slackware's udev implementation will automatically create
rules files for your optical devices and network interfaces on first boot.
If you add/remove/replace any of this hardware, and/or you "clone" a system
to another hard drive for deployment, you will need to either remove these
two rules files (so that udev will regenerate them to reflect the new or
changed hardware) or edit them accordingly.
 
  


Reply



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
controlling ports other than 80 with squid hacidayi Linux - Networking 1 09-08-2006 12:37 PM
Ethernet ports not working on new system aaronvegh Linux - Networking 8 06-30-2006 06:18 AM
Controlling XMMS over ethernet theonebeyond Linux - Software 0 09-27-2004 07:04 AM
Wireless network on eth1 diabled Ethernet eth0 and eth0 never comes back tadatoshi Linux - Wireless Networking 4 09-23-2004 05:57 PM
howto delete existing static ip of ethernet(eth0)& reconf multiple ips on eth0 viveku Linux - Networking 2 02-02-2004 01:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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