LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-12-2016, 03:28 PM   #1
Przemas
LQ Newbie
 
Registered: Sep 2016
Posts: 10

Rep: Reputation: Disabled
can you create symlink to /sys/class/net/"devicename" ?


Can you create symlink to /sys/class/net/"devicename" in the /sys/class/net? I have an app that expects very specific name of a network interface (eth*), which on my system (not surprisingly) is a bit different ( /sys/class/net/enp11s0) - I thought that maybe a symlink would be a way to fool it.
 
Old 11-12-2016, 05:33 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: FreeBSD/Slackware-14.2+/ArcoLinux
Posts: 9,082

Rep: Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903
read this to handle your device name. You can actually change it to whatever you want to call it.

https://wiki.archlinux.org/index.php..._configuration

look for this heading Change device name about mid way in the page

Last edited by BW-userx; 11-12-2016 at 05:37 PM.
 
Old 11-13-2016, 04:43 AM   #3
Przemas
LQ Newbie
 
Registered: Sep 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
thank you BW.
Tried this one:
https://wiki.archlinux.org/index.php...l_device_names

- so I've used this command:
# ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules

Sadly it does not made any difference, I still don't have "traditional" network devices name. And I'm a bit afraid of changing /etc/udev/rules.d/10-network.rules as the wiki clearly advises against changing those to ethX as it can cause problems.
Any ideas why this symlink command didn't work in my case?
I'm on Fedora 24.
 
Old 11-13-2016, 09:31 AM   #4
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,289
Blog Entries: 9

Rep: Reputation: 1840Reputation: 1840Reputation: 1840Reputation: 1840Reputation: 1840Reputation: 1840Reputation: 1840Reputation: 1840Reputation: 1840Reputation: 1840Reputation: 1840
Try passing the kernel command net.ifnames=0 on the grub boot line.
 
Old 11-13-2016, 02:25 PM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: FreeBSD/Slackware-14.2+/ArcoLinux
Posts: 9,082

Rep: Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903
Quote:
Originally Posted by Przemas View Post
thank you BW.
Tried this one:
https://wiki.archlinux.org/index.php...l_device_names

- so I've used this command:
# ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules

Sadly it does not made any difference, I still don't have "traditional" network devices name. And I'm a bit afraid of changing /etc/udev/rules.d/10-network.rules as the wiki clearly advises against changing those to ethX as it can cause problems.
Any ideas why this symlink command didn't work in my case?
I'm on Fedora 24.
I have done this is it great, my system was using some freeBSD name instead if wan0 so I used that to change my wifi name to wan0 and it worked like a charm.

you could google how to change your name device temporally as well, this too can be done.

think about how your device gets it name. the same way you change it. so it is not going to blow up your system.

worse case scenario is that the other apps that look for what ever name it already is, will just have to be changed to the new name you give it.

which is what by the way, that this one app is looking for that cannot be modified within that app itself?

Last edited by BW-userx; 11-13-2016 at 02:32 PM.
 
Old 11-13-2016, 02:43 PM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: FreeBSD/Slackware-14.2+/ArcoLinux
Posts: 9,082

Rep: Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903Reputation: 1903
on that same link I found this:

Quote:

Device names

For computers with multiple NICs, it is important to have fixed device names. Many configuration problems are caused by interface name changing.

udev is responsible for which device gets which name. Systemd v197 introduced Predictable Network Interface Names, which automatically assigns static names to network devices. Interfaces are now prefixed with en (wired/Ethernet), wl (wireless/WLAN), or ww (WWAN) followed by an automatically generated identifier, creating an entry such as enp0s25. This behavior may be disabled by adding net.ifnames=0 to the kernel parameters.
 
  


Reply

Tags
symlinks


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 procfs "/proc/sys/net/ipv4/neigh/default" directory is on present on a network namespace, created by "ip netns add NAME" command haldermi Linux - Networking 1 07-28-2016 03:26 PM
[SOLVED] "net rpc" "failed to connect to ipc$ share on" or "unable to find a suitable server" larieu Linux - General 0 11-09-2014 12:45 AM
How to force "configure" and "Makefile" to look for dependencies in non sys folder? Dstruct0 Linux - Software 2 04-05-2011 08:01 AM
ns:"error when calling class OldSim"&tclsh:"invalid command+child process exits abn." shojaru Linux - Newbie 0 03-05-2009 04:23 AM
net working eth0 eth1 wlan0 "no connection" "no LAN" "no wi-fi" Cayitano Linux - Newbie 5 12-09-2007 07:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:23 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration