LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 07-27-2023, 10:37 AM   #1
Johncc330
Member
 
Registered: Mar 2007
Posts: 101

Rep: Reputation: 19
Adding new network (USB 802.11n dongle) clobbers 'persistent naming'


I'm trying to understand the persistent naming system to be able to add a new wlan dongle (802.11n). When I add the dongle it seems to change the ethxx assignments.

The system has two net-cards (because the motherboard lan broke down). rc.inet1.conf has eth0 and eth1 defined.

From the dmesg I extracted:

Code:
[    7.711543] r8169 0000:01:00.0 eth0: RTL8168h/8111h, xx:9d:02, XID 541, IRQ 33
[    7.713256] r8169 0000:01:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
[    7.719698] r8169 0000:03:00.0 eth1: RTL8168e/8111e, xx:78:55, XID 2c2, IRQ 34
[    7.721402] r8169 0000:03:00.0 eth1: jumbo features [frames: 9194 bytes, tx checksumming: ko]
...
[    9.585174] r8169 0000:03:00.0 eth125: renamed from eth1
[    9.591230] r8169 0000:03:00.0 rename_eth125: renamed from eth125
[    9.758219] r8169 0000:01:00.0 eth126: renamed from eth0
[    9.770258] r8169 0000:01:00.0 eth2: renamed from eth126
[    9.802604] r8169 0000:03:00.0 eth0: renamed from rename_eth125
(I shortened the MAC addresses a bit)

and from /etc/udev/rules.d/70-persistent-net.rules:
Code:
# Disabled because the motherboard LAN failed
# SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:9e:bf", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

# PCI Express device 0x10ec:/sys/devices/pci0000:00/0000:00:03.1/0000:01:00.0 (r8169)
# tp-link TG-3468(UN)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:78:55", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI Express device 0x10ec:/sys/devices/pci0000:00/0000:00:03.1/0000:01:00.0 (r8169)
# tp-link TG-3468(UN)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:9d:02", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
From this I tried to reason where the actual eth assignment comes from:
Code:
Time            Card 0                  Card 1
                xx:9d:02                xx:78:55
7.711543        -> eth0                                     Initial assignment (by driver or rules?)
7.719698                                -> eth1             Initial assignment (by driver or rules?)
9.585174                                -> eth125           Who does this?
9.591230                                -> rename_eth125    Who does this?
9.758219        -> eth126                                   Who does this?
9.770258        -> eth2                                     Who does this?
9.802604                                -> eth0             Who does this?
I adapted the firewall and other items to eth0/eth2. Now, if I insert the 802.11n
dongle, these addresses get all mixed up. eth2 even disappears (is this because of the lack of eth2 definition in rc.inet.conf?).

Q1: How can I add the dongle without changing the above assignations (or at least so that in the future I really have 'persistent' assignments?

Q2: I'd like to understand what I'm doing here - anyone know a document which explains clearly what is going on? I've found some explanations, but they're for Redhat, and other distros.

Last edited by Johncc330; 07-27-2023 at 10:41 AM. Reason: shortened the MAC addresses a bit for readability
 
Old 07-28-2023, 09:58 PM   #2
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,818
Blog Entries: 1

Rep: Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068
Not a direct answer, but what I've been doing is:
  1. including net.ifnames=0 on on all kernel cmdlines in order to use legacy naming;
  2. exclusively using systemd-networkd for network configuration; and
  3. configuring static addresses according to MAC address
/etc/udev/rules.d/70-persistent-net.rules is thus ignored if present.
 
1 members found this post helpful.
Old 07-29-2023, 10:44 AM   #3
Johncc330
Member
 
Registered: Mar 2007
Posts: 101

Original Poster
Rep: Reputation: 19
I'm so sorry - I _did_ send you a reply yesterday, but I don't see it here. (The 'helpful' click _was_ received, it seems)

I will try your suggestions later today. The laptop I was working on forgot how to boot. It doesn't list the Linux partition in the BIOS anymore. In fact, it doesn't even lists a bootable pendrive, so I can't boot to run repair tools.

John
 
  


Reply

Tags
configuration, devices, network, slackware



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
Worse than expected throughput on an 802.11n wireless network, with a WLE600VX/hostapd/Slackware-14.2 based access point maxf130 Linux - Networking 10 03-12-2017 05:27 AM
Wanted: 802.11n usb wifi adapter dongle for linux jdkaye Linux - Hardware 12 11-18-2013 02:53 AM
Persistent persistent Persistent Going Nuts Here Fcukinyahoo Linux - Newbie 6 11-17-2011 09:56 PM
D-Link DWA-140 802.11n USB (with Ralink RT2870 chispet) driver probs andywest Linux - Hardware 2 06-12-2008 12:40 PM
drivers for 802.11n usb adapters - are there any robertson1953 Linux - Wireless Networking 1 08-29-2007 07:29 AM

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

All times are GMT -5. The time now is 08:10 PM.

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