0

I'm managing lots of servers which runs Ubuntu 18.04 server. And it has at lest 4 NIC for each server. My server will reboot every weekend, and I always found the NIC name changed after reboot. Sometimes is onboad NIC, sometimes is PCI-e NIC, some times is all of NIC, sometimes none of theme.
I know I can fix it by config /etc/udev/rules.d/70-persistent-net.rules file, specific which MAC address corresponding which name. But I still want know why the NIC name always and how can I fix it in a easier way (edit rules file could cost me whole day or worse).
Thanks in advance.

  • What is the kernel commandline on this system? – slangasek Aug 27 at 18:25
  • The kernel cmdline is this: ` BOOT_IMAGE=/boot/vmlinuz-4.15.0-58-generic root=UUID=ae2ecb16-e274-4a3b-bf4d-081accf0330c ro nohz_full=1-11 rcu_nocbs=1-11 isolcpus=1-11 nohz=off idle=poll intel_idle.max_cstate=0 mce=ignore_ce nmi_watchdog=0 transparent_hugepage=never pcie_aspm=off audit=0 irqaffinity=0 nosoftlockup maybe-ubiquity ` – fajin yu Aug 28 at 5:06
  • Ok the reason I ask is that interface names are expected to be statelessly stable by default in Ubuntu 18.04 unless you have set 'net.ifnames=0' on the kernel commandline. What are the NIC names shown? – slangasek Aug 30 at 21:42
  • @slangasek The NIC name's format is rename<random number> – fajin yu Sep 2 at 2:51
  • Interfaces are only renamed to 'rename<N>' if there is a collision where you have asked udev to rename a device to a name already present. Do you see this behavior when you DON'T have /etc/udev/rules.d/70-persistent-net.rules on the system? Where are you telling the system to rename your network devices? – slangasek Sep 3 at 5:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.