V
V
Vi2016-06-20 23:53:17
linux
Vi, 2016-06-20 23:53:17

Why do network interfaces have different names?

I deal mainly with Centos 7, I often find out why the interface names are different enp4s0, em1, eno1, eth0. (these names appear after the standard install)
where do they come from, and how can I make them the same by default? eth0 eth1 eth2 etc

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey, 2016-06-21
@alsopub

Why and why - https://www.freedesktop.org/wiki/Software/systemd/...
Where do they come from - https://github.com/systemd/systemd/blob/master/src...

B
Blackrim, 2016-06-21
@Blackrim

1. In GRUB add - net.ifnames=0
2. Rewrite the kernel - sudo grub2-mkconfig -o /boot/grub2/grub.cfg
3. Create a naming rule. Edit /etc/udev/rules.d/70-persistent-net.rules
Add SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00 :27:a9:7a:e1", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
Where ATTR{address}== Interface MAC address, NAME= Interface name
4. We restart the car.

L
Lindon_cano, 2016-06-21
@Lindon_cano

Привыкать к новым нотациям.
Почитать https://www.freedesktop.org/wiki/Software/systemd/... и узнать почему так случилось. Оценить
Names incorporating the interfaces's MAC address (example: enx78e7d1ea46da), например.
Ну либо быть ретроградом типа меня и выполнить рекомендации по откручиванию всего назад.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question