Netwwork interface changed name after hardware change

My network interface changed name after an hardware change.

I need it to be named enp6s0 , but it is now named enp7s0

so far i managed to rename it with this

procedure… but i need tho recreate the file after every update.

Is there a way to make the name persistent across updates ?

Sure, configure the interface properly, through the TrueNAS interface–either the console menu (probably easiest) or the web UI.

why are you assuming i didn’t configure it properly ? to my knoledge the name of the interface is assigned automatically and cannot be modified from gui or cli.

Because you’re talking about needing to recreate a file after every update. If you’re creating files to manage your interfaces, you’re doing it very wrong.

Why? What are you doing that depends on a particular interface name?

1 Like

The apps stop working if the name of the interface change.

…and you can’t configure them to use the new interface name?

This isn’t going to happen very often, is it? You aren’t planning on swapping out motherboards or NICs frequently, I take it, and those are the only things that would result in the interface name changing. So if it happens again, update the apps settings again.

Or if you think it is something that would happen often (though I have no idea why that would be the case), create a bridge interface, tell the apps to use br0, and you can then adjust the members of br0 whenever the interface name changes.

1 Like

You moved the NIC from PCIe slot 6 to slot 7 right? :wink:

I like the br0 sugggestion if you don’t want to update the apps NIC setting.