Rename ethernet device and keep updated driver on reboot?

I had a new motherboard that had an onboard nic not supported by the default IGB kernel driver included with VyOS (3.2.10-K). I went ahead and updated the driver to the stable 5.2.5.

I have two problems:

  1. The ethernet device, instead of being named eth5, is named eth5-eth4 which does not seem to be supported by VyOS.

# ifconfig eth5-eth4 eth5-eth4 Link encap:Ethernet HWaddr 00:25:90:d3:51:9a BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Is there a way to rename this device? There were no files in the standard /etc/udev/rules.d directory.

  1. After compiling the new driver, running rmmod, and modprobe, and restarting vyatta-router, the new driver is used. However when I reboot the system, the old driver is used again and the onboard NIC is no longer detected. What can I do to make the change persistent across reboots?

I’ll post a how-to once I figure this out.

Update:

Issue 1: Resolved
Issue 2: Still unresolved

How I resolved issue 1 (renaming the device)

My /etc/udev/rules.d directory was empty. I created the file /etc/udev/rules.d/70-persistent-net.rules and placed the line:

Then I ran:

This resulted in the correct change.

Jul 15 01:01:08 vyatta zebra[2625]: interface index 11 was renamed from eth5-eth4 to eth5 Jul 15 01:01:08 vyatta ripngd[2631]: interface delete eth5-eth4 index 11 flags 0x1002 metric 1 mtu 1500 Jul 15 01:01:08 vyatta ripd[2629]: interface delete eth5-eth4 index 11 flags 0x1002 metric 1 mtu 1500

I have not yet tested if this is persistent on reboot and have yet to resolve the issue on keeping the driver persistent on reboot. I hope someone can chime in.

Hi!

You should update the initramfs, with the command

update-initramfs -u -k `uname -r`

I hope this helps.

efpe

1 Like