How to remove a network interface (that can't be disabled from BIOS)

Ciprian

Cadet
Joined
Jan 2, 2021
Messages
5
Hi.

I'm sorry if this is a noob question but I don't know how to completely disable a network interface from Truenas (FreeBSD).

I am running a Ryzen 1200 with B450 MB and I just can't disable the Realtek NIC from BIOS (this option doesn't exist in BIOS). For networking needs, I use an Intel NIC in a PCI slot so I don't need the onboard NIC.

The reason I'm asking this is the fact that my Truenas freezes (completely unresponsive) on a daily basis (no data in the logs, etc) and I'm trying to test different settings and see if I can find the culprit. One of these settings is disabling the NIC interface completely.

I had a TrueNas on an X370 MB with Ryzen 7 3700x and it worked fine. But, on that NAS I was able to disable the onboard NIC....

As a summarized question: what do I need to do for the onboard NIC interface not to load with Truenas.

Thanks.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
If your Realtek NIC uses the re driver, try creating a loader tunable if_re_load=NO in System->Tunables, and then rebooting.
 

Ciprian

Cadet
Joined
Jan 2, 2021
Messages
5
Thanks.

I did try but it doesn't work.

I added the tunable if_re_load (variable) NO (for value) and type LOADER.

Rebooted and the interface (yes, it is re0) is still showing up in the Dashboard.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
OK, then try creating an Init/Shutdown Task that runs at startup with the command ifconfig destroy re0.
 

Ciprian

Cadet
Joined
Jan 2, 2021
Messages
5
Still doesn't work :(

I also tried to run the command from Shell as root.

When I do
ifconfig destroy re0
result is:
ifconfig: interface destroy does not exist

So I tried:
ifconfig re0 destroy
the result is:
ifconfig: ioctl (SIOCDIFADDR): can't assign requested address
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Running out of ideas here: what about kldunload if_re?
 

Ciprian

Cadet
Joined
Jan 2, 2021
Messages
5
Nope :)
The result is:

can't find file if_re

PS: is it important if the re0 interface status is Down? As it is enabled but it's not connected to anything.
 
Joined
Jul 2, 2019
Messages
648
I don't think it matters. I have an interface that I do not use (it is connected but no IPs/bridges/VLANs are attached) and I do not see any issues.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Running out of ideas here: what about kldunload if_re?
As I just wrote in another thread: iXsystems like to compile the drivers statically.
 

schwarci

Cadet
Joined
Nov 9, 2014
Messages
4
On Supermicro motherboards you have jumper to disable interface. Check if you have jumper on your motherboard for disabling interface too.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Try a tunable:

Type: loader
Variable: hint.re.0.disabled
Value: 1
 
Top