LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   no eth0 but ifcfg-enp2s0 (https://www.linuxquestions.org/questions/linux-newbie-8/no-eth0-but-ifcfg-enp2s0-4175538454/)

sigint-ninja 04-01-2015 02:27 PM

no eth0 but ifcfg-enp2s0
 
hi guys,

on my centos 7 machine i was looking for

/etc/sysconfig/network-scripts/ifcfg.eth0 file

but there is only ifcfg-enp2s0

what is enp2s0? thought i had a standard ethernet card

T3RM1NVT0R 04-01-2015 02:30 PM

You might want to have a look at this: https://esuareznotes.wordpress.com/2...dora-19-above/

They have changed the naming convention. If you want to switch back to traditional naming convention you can follow the link.

sigint-ninja 04-09-2015 01:40 PM

thats grand...if its just naming convention i will get used to it...tanks!!!

T3RM1NVT0R 04-09-2015 01:53 PM

You're welcome. Please mark the thread as solved!

Enjoy Linux!!!

jefro 04-09-2015 03:04 PM

We may all need to learn this BSD way of naming sooner or later. Good question.

Madhu Desai 04-10-2015 01:35 AM

Previously I was also using the same technique T3RM1NVT0R has suggested. But one of my senior suggested, the better way is to rename only the interface you want to... So I follow this trick..

Code:

# vim /etc/udev/rules.d/10-network.rules
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="xx:xx:xx:xx:xx:xx", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="yy:yy:yy:yy:yy:yy", NAME="eth1"

# mv /etc/sysconfig/network-scripts/ifcfg-enpXxX /etc/sysconfig/network-scripts/ifcfg-eth0
# mv /etc/sysconfig/network-scripts/ifcfg-enpYyY /etc/sysconfig/network-scripts/ifcfg-eth1

Replace enpXxX with eth0 in ifcfg-eth0 file. Same for eth1 also

and finally reboot. Done.


All times are GMT -5. The time now is 11:54 PM.