LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Why my NIC name change after reboot the centos 7 server (https://www.linuxquestions.org/questions/linux-newbie-8/why-my-nic-name-change-after-reboot-the-centos-7-server-4175611911/)

ajoysys 08-14-2017 01:43 AM

Why my NIC name change after reboot the centos 7 server
 
Hi,

I am new to centos. I just install centos 7 server In my server i hav two Onboard NIC now when i start the server and put the command Ip a it shows eno1 and eth1 but when i reboot the server and put the command ip a it shows eno1 and eth0.

Please help me on that.

jsbjsb001 08-14-2017 02:31 AM

Quote:

Originally Posted by ajoysys (Post 5748007)
Hi,

I am new to centos. I just install centos 7 server In my server i hav two Onboard NIC now when i start the server and put the command Ip a it shows eno1 and eth1 but when i reboot the server and put the command ip a it shows eno1 and eth0.

Please help me on that.

I think your talking about a bug in systemd that, renames network interfaces, for whatever bizarre reason(s).

Do you see any similar lines in your kernel log to the following?

Code:

e1000e 0000:00:19.0 eno1: renamed from eth0

Jjanel 08-14-2017 02:57 AM

Welcome to LQ, ajoysys! &welcome back jsb; missed you!

LP doesn't 'do' "bugs". Period. Only *features*:D
Web-searching drowns me in possible keywords:
e.g.: https://fedoraproject.org/wiki/Featu...InterfaceNames (&worse!)
The concept is: what IF you add/move NICs? config files BREAK:eek:
(careful: is it en {oh,zero} 1: o/0? www mentions both! Even Ubu too)

dejank 08-14-2017 04:50 AM

Link about predictable network interface names: https://www.freedesktop.org/wiki/Sof...nterfaceNames/.

If you are talking about "bug", it is certainly not bug that eno1 exists as a name, but that second interface was not assigned "proper" name and changed name between reboots. If you do not like this feature of systemd, you can turn it off, at bottom of that page you have possible 3 methods for that.

ajoysys 08-14-2017 08:00 AM

Quote:

Originally Posted by jsbjsb001 (Post 5748017)
I think your talking about a bug in systemd that, renames network interfaces, for whatever bizarre reason(s).

Do you see any similar lines in your kernel log to the following?

Code:

e1000e 0000:00:19.0 eno1: renamed from eth0

Hi thanks for reply. I notice that when i power up my server first time and put the command "ip a" it shows eth0 and eno1 and when i chech the /etc/sysconfig/network-scripts there are two files "eth1" and "eno1"

When i rboot the server then in ip a shows "eth1" "eno1"

Please check the logs:

ocalhost kernel: igb: Intel(R) Gigabit Ethernet Network Driver - version 5.3.0-k
localhost kernel: igb 0000:02:00.0: added PHC on eth0
localhost kernel: igb 0000:02:00.0: Intel(R) Gigabit Ethernet Network Connection
localhost kernel: igb 0000:02:00.0: eth0: (PCIe:2.5Gb/s:Width x1) 00:1e:67:a0:0c:8c
localhost kernel: igb 0000:02:00.0: eth0: PBA No: 102100-000
localhost kernel: igb 0000:03:00.0: added PHC on eth1
localhost kernel: igb 0000:03:00.0: Intel(R) Gigabit Ethernet Network Connection
localhost kernel: igb 0000:03:00.0: eth1: (PCIe:2.5Gb/s:Width x1) 00:1e:67:a0:0c:8d
localhost kernel: igb 0000:03:00.0: eth1: PBA No: 102100-000
localhost systemd-udevd: Error changing net interface name 'eth1' to 'eno1': File exists
localhost systemd-udevd: could not rename interface '3' from 'eth1' to 'eno1': File exists
localhost systemd-udevd: Error changing net interface name 'eth1' to 'eno1': File exists
localhost systemd-udevd: could not rename interface '3' from 'eth1' to 'eno1': File exists
localhost NetworkManager[740]: <info> [1502715453.7620] ifcfg-rh: new connection /etc/sysconfig/network-scripts/ifcfg-eth1 (52eea4ab-79f6-4c98-86db-93a1640422df,"eth1")
localhost NetworkManager[740]: <info> [1502715453.7620] ifcfg-rh: new connection /etc/sysconfig/network-scripts/ifcfg-eth1 (52eea4ab-79f6-4c98-86db-93a1640422df,"eth1")
localhost NetworkManager[740]: <info> [1502715453.8444] Loaded device plugin: NMVethFactory (internal)
localhost NetworkManager[740]: <info> [1502715453.8444] Loaded device plugin: NMEthernetFactory (internal)
localhost NetworkManager[740]: <info> [1502715453.8583] manager: (eno1): new Ethernet device (/org/freedesktop/NetworkManager/Devices/1)
localhost NetworkManager[740]: <info> [1502715453.9062] manager: (eth1): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
localhost NetworkManager[740]: <info> [1502715453.9062] manager: (eth1): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
localhost NetworkManager[740]: <info> [1502715453.9067] device (eth1): state change: unmanaged -> unavailable (reason 'managed') [10 20 2]

ajoysys 08-14-2017 08:11 AM

Quote:

Originally Posted by dejank (Post 5748048)
Link about predictable network interface names: https://www.freedesktop.org/wiki/Sof...nterfaceNames/.

If you are talking about "bug", it is certainly not bug that eno1 exists as a name, but that second interface was not assigned "proper" name and changed name between reboots. If you do not like this feature of systemd, you can turn it off, at bottom of that page you have possible 3 methods for that.


Hi thanks for reply. I notice that when i power up my server first time and put the command "ip a" it shows eth0 and eno1 and when i chech the /etc/sysconfig/network-scripts there are two files "eth1" and "eno1"

When i rboot the server then in ip a shows "eth1" "eno1"

Please check the logs:

ocalhost kernel: igb: Intel(R) Gigabit Ethernet Network Driver - version 5.3.0-k
localhost kernel: igb 0000:02:00.0: added PHC on eth0
localhost kernel: igb 0000:02:00.0: Intel(R) Gigabit Ethernet Network Connection
localhost kernel: igb 0000:02:00.0: eth0: (PCIe:2.5Gb/s:Width x1) 00:1e:67:a0:0c:8c
localhost kernel: igb 0000:02:00.0: eth0: PBA No: 102100-000
localhost kernel: igb 0000:03:00.0: added PHC on eth1
localhost kernel: igb 0000:03:00.0: Intel(R) Gigabit Ethernet Network Connection
localhost kernel: igb 0000:03:00.0: eth1: (PCIe:2.5Gb/s:Width x1) 00:1e:67:a0:0c:8d
localhost kernel: igb 0000:03:00.0: eth1: PBA No: 102100-000
localhost systemd-udevd: Error changing net interface name 'eth1' to 'eno1': File exists
localhost systemd-udevd: could not rename interface '3' from 'eth1' to 'eno1': File exists
localhost systemd-udevd: Error changing net interface name 'eth1' to 'eno1': File exists
localhost systemd-udevd: could not rename interface '3' from 'eth1' to 'eno1': File exists
localhost NetworkManager[740]: <info> [1502715453.7620] ifcfg-rh: new connection /etc/sysconfig/network-scripts/ifcfg-eth1 (52eea4ab-79f6-4c98-86db-93a1640422df,"eth1")
localhost NetworkManager[740]: <info> [1502715453.7620] ifcfg-rh: new connection /etc/sysconfig/network-scripts/ifcfg-eth1 (52eea4ab-79f6-4c98-86db-93a1640422df,"eth1")
localhost NetworkManager[740]: <info> [1502715453.8444] Loaded device plugin: NMVethFactory (internal)
localhost NetworkManager[740]: <info> [1502715453.8444] Loaded device plugin: NMEthernetFactory (internal)
localhost NetworkManager[740]: <info> [1502715453.8583] manager: (eno1): new Ethernet device (/org/freedesktop/NetworkManager/Devices/1)
localhost NetworkManager[740]: <info> [1502715453.9062] manager: (eth1): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
localhost NetworkManager[740]: <info> [1502715453.9062] manager: (eth1): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
localhost NetworkManager[740]: <info> [1502715453.9067] device (eth1): state change: unmanaged -> unavailable (reason 'managed') [10 20 2]

jsbjsb001 08-14-2017 08:21 AM

Quote:

Originally Posted by ajoysys (Post 5748105)
Hi thanks for reply. I notice that when i power up my server first time and put the command "ip a" it shows eth0 and eno1 and when i chech the /etc/sysconfig/network-scripts there are two files "eth1" and "eno1"

When i rboot the server then in ip a shows "eth1" "eno1"

Please check the logs:

ocalhost kernel: igb: Intel(R) Gigabit Ethernet Network Driver - version 5.3.0-k
localhost kernel: igb 0000:02:00.0: added PHC on eth0
localhost kernel: igb 0000:02:00.0: Intel(R) Gigabit Ethernet Network Connection
localhost kernel: igb 0000:02:00.0: eth0: (PCIe:2.5Gb/s:Width x1) 00:1e:67:a0:0c:8c
localhost kernel: igb 0000:02:00.0: eth0: PBA No: 102100-000
localhost kernel: igb 0000:03:00.0: added PHC on eth1
localhost kernel: igb 0000:03:00.0: Intel(R) Gigabit Ethernet Network Connection
localhost kernel: igb 0000:03:00.0: eth1: (PCIe:2.5Gb/s:Width x1) 00:1e:67:a0:0c:8d
localhost kernel: igb 0000:03:00.0: eth1: PBA No: 102100-000
localhost systemd-udevd: Error changing net interface name 'eth1' to 'eno1': File exists
localhost systemd-udevd: could not rename interface '3' from 'eth1' to 'eno1': File exists
localhost systemd-udevd: Error changing net interface name 'eth1' to 'eno1': File exists
localhost systemd-udevd: could not rename interface '3' from 'eth1' to 'eno1': File exists
localhost NetworkManager[740]: <info> [1502715453.7620] ifcfg-rh: new connection /etc/sysconfig/network-scripts/ifcfg-eth1 (52eea4ab-79f6-4c98-86db-93a1640422df,"eth1")
localhost NetworkManager[740]: <info> [1502715453.7620] ifcfg-rh: new connection /etc/sysconfig/network-scripts/ifcfg-eth1 (52eea4ab-79f6-4c98-86db-93a1640422df,"eth1")
localhost NetworkManager[740]: <info> [1502715453.8444] Loaded device plugin: NMVethFactory (internal)
localhost NetworkManager[740]: <info> [1502715453.8444] Loaded device plugin: NMEthernetFactory (internal)
localhost NetworkManager[740]: <info> [1502715453.8583] manager: (eno1): new Ethernet device (/org/freedesktop/NetworkManager/Devices/1)
localhost NetworkManager[740]: <info> [1502715453.9062] manager: (eth1): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
localhost NetworkManager[740]: <info> [1502715453.9062] manager: (eth1): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
localhost NetworkManager[740]: <info> [1502715453.9067] device (eth1): state change: unmanaged -> unavailable (reason 'managed') [10 20 2]

I'm not sure what I'm 'checking' your log for?

If you mean any lines, that show systemd is renaming your network interfaces, it's in bold.

I'm not trying to be rude but, others have provided some links to stop systemd renaming your network interfaces (posts #3 & #4).

Good luck with it!

dejank 08-14-2017 09:28 AM

Quote:

Hi thanks for reply. I notice that when i power up my server first time and put the command "ip a" it shows eth0 and eno1 and when i chech the /etc/sysconfig/network-scripts there are two files "eth1" and "eno1"

When i rboot the server then in ip a shows "eth1" "eno1"
Is one of those cards attached as USB device? There was some bug because systemd insisted on assigning predictable names based on mac address of device and it could not be done for USB devices, or something like that. Anyway, reverting to unpredictable names should solve your problem. Or/and, bug report it.

ajoysys 08-14-2017 10:13 AM

Quote:

Originally Posted by jsbjsb001 (Post 5748112)
I'm not sure what I'm 'checking' your log for?

If you mean any lines, that show systemd is renaming your network interfaces, it's in bold.

I'm not trying to be rude but, others have provided some links to stop systemd renaming your network interfaces (posts #3 & #4).

Good luck with it!

As per your reply I did

i add "net.ifnames=0" and "biosdevname=0" in "/etc/sysconfig/grub" and in line of "GRUB_CMDLINE_LINUX and reboot the server and still getting the error and now in "ip a" shows "eno1" and "eth0' and /etc/sysconfig/network-script have "ifcfg-eth1" and "ifcfg-eno1" find below the logs:

localhost kernel: igb: Intel(R) Gigabit Ethernet Network Driver - version 5.3.0-k
localhost kernel: igb 0000:02:00.0: added PHC on eth0
localhost kernel: igb 0000:02:00.0: Intel(R) Gigabit Ethernet Network Connection
localhost kernel: igb 0000:02:00.0: eth0: (PCIe:2.5Gb/s:Width x1) 00:1e:67:a0:0c:8c
localhost kernel: igb 0000:02:00.0: eth0: PBA No: 102100-000
localhost kernel: igb 0000:03:00.0: added PHC on eth1
localhost kernel: igb 0000:03:00.0: Intel(R) Gigabit Ethernet Network Connection
localhost kernel: igb 0000:03:00.0: eth1: (PCIe:2.5Gb/s:Width x1) 00:1e:67:a0:0c:8d
localhost kernel: igb 0000:03:00.0: eth1: PBA No: 102100-000
localhost systemd-udevd: Error changing net interface name 'eth0' to 'eno1': File exists
localhost systemd-udevd: could not rename interface '2' from 'eth0' to 'eno1': File exists
localhost systemd-udevd: Error changing net interface name 'eth0' to 'eno1': File exists
localhost systemd-udevd: could not rename interface '2' from 'eth0' to 'eno1': File exists
localhost NetworkManager[739]: <info> [1502723061.9225] ifcfg-rh: new connection /etc/sysconfig/network-scripts/ifcfg-eth1 (52eea4ab-79f6-4c98-86db-93a1640422df,"eth1")
localhost NetworkManager[739]: <info> [1502723061.9225] ifcfg-rh: new connection /etc/sysconfig/network-scripts/ifcfg-eth1 (52eea4ab-79f6-4c98-86db-93a1640422df,"eth1")
localhost NetworkManager[739]: <info> [1502723061.9985] Loaded device plugin: NMVethFactory (internal)
localhost NetworkManager[739]: <info> [1502723061.9986] Loaded device plugin: NMEthernetFactory (internal)
localhost NetworkManager[739]: <info> [1502723062.0122] manager: (eth0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/1)
localhost NetworkManager[739]: <info> [1502723062.0122] manager: (eth0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/1)
localhost NetworkManager[739]: <info> [1502723062.0132] settings: (eth0): created default wired connection 'Wired connection 1'
localhost NetworkManager[739]: <info> [1502723062.0138] device (eth0): state change: unmanaged -> unavailable (reason 'managed') [10 20 2]

ajoysys 08-14-2017 10:16 AM

Quote:

Originally Posted by dejank (Post 5748138)
Is one of those cards attached as USB device? There was some bug because systemd insisted on assigning predictable names based on mac address of device and it could not be done for USB devices, or something like that. Anyway, reverting to unpredictable names should solve your problem. Or/and, bug report it.

The LAN cards are onboard NIC and it is a inter Server Board.

i add "net.ifnames=0" and "biosdevname=0" in "/etc/sysconfig/grub" and in line of "GRUB_CMDLINE_LINUX and reboot the server and still getting the error and now in "ip a" shows "eno1" and "eth0' and /etc/sysconfig/network-script have "ifcfg-eth1" and "ifcfg-eno1" find below the logs:


localhost kernel: igb: Intel(R) Gigabit Ethernet Network Driver - version 5.3.0-k
localhost kernel: igb 0000:02:00.0: added PHC on eth0
localhost kernel: igb 0000:02:00.0: Intel(R) Gigabit Ethernet Network Connection
localhost kernel: igb 0000:02:00.0: eth0: (PCIe:2.5Gb/s:Width x1) 00:1e:67:a0:0c:8c
localhost kernel: igb 0000:02:00.0: eth0: PBA No: 102100-000
localhost kernel: igb 0000:03:00.0: added PHC on eth1
localhost kernel: igb 0000:03:00.0: Intel(R) Gigabit Ethernet Network Connection
localhost kernel: igb 0000:03:00.0: eth1: (PCIe:2.5Gb/s:Width x1) 00:1e:67:a0:0c:8d
localhost kernel: igb 0000:03:00.0: eth1: PBA No: 102100-000
localhost systemd-udevd: Error changing net interface name 'eth0' to 'eno1': File exists
localhost systemd-udevd: could not rename interface '2' from 'eth0' to 'eno1': File exists
localhost systemd-udevd: Error changing net interface name 'eth0' to 'eno1': File exists
localhost systemd-udevd: could not rename interface '2' from 'eth0' to 'eno1': File exists
localhost NetworkManager[739]: <info> [1502723061.9225] ifcfg-rh: new connection /etc/sysconfig/network-scripts/ifcfg-eth1 (52eea4ab-79f6-4c98-86db-93a1640422df,"eth1")
localhost NetworkManager[739]: <info> [1502723061.9225] ifcfg-rh: new connection /etc/sysconfig/network-scripts/ifcfg-eth1 (52eea4ab-79f6-4c98-86db-93a1640422df,"eth1")
localhost NetworkManager[739]: <info> [1502723061.9985] Loaded device plugin: NMVethFactory (internal)
localhost NetworkManager[739]: <info> [1502723061.9986] Loaded device plugin: NMEthernetFactory (internal)
localhost NetworkManager[739]: <info> [1502723062.0122] manager: (eth0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/1)
localhost NetworkManager[739]: <info> [1502723062.0122] manager: (eth0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/1)
localhost NetworkManager[739]: <info> [1502723062.0132] settings: (eth0): created default wired connection 'Wired connection 1'
localhost NetworkManager[739]: <info> [1502723062.0138] device (eth0): state change: unmanaged -> unavailable (reason 'managed') [10 20 2]

AwesomeMachine 08-14-2017 12:17 PM

Well, systemd is supposed to ensure that network interface names don't change across reboots. If that is what is occurring, then it's working. I don't quite understand what the problem is. Is it that you want "eth0" and "eth1" as interface names? Because systemd doesn't always use those anymore.

I would check out the link posted by: dejank in #4.


All times are GMT -5. The time now is 12:32 PM.