# Network interface not showing



## sgz (Jul 8, 2019)

Hello,

This is my first post here, so thanks for your patience.
I have two network PCI cards (named `re0` and `rl0`), and some days ago `re0` just disappeared after a reboot. I've been searching deeply but I'm just stuck with this.

The kernel seems to load it as seen in dmesg:

```
# dmesg | grep re0
re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet> port 0xe800-0xe8ff mem 0xfdfff000-0xfdffffff,0xfdff8000-0xfdffbfff irq 16 at device 0.0 on pci3
re0: Using 1 MSI-X message
re0: Chip rev. 0x2c000000
re0: MAC rev. 0x00200000
miibus1: <MII bus> on re0
re0: Using defaults for TSO: 65518/35/2048
re0: Ethernet address: 90:fb:a6:e2:23:29
re0: link state changed to DOWN
```

And it also shows as pci device:

```
# pciconf -lv
[...]
rl0@pci0:2:5:0:    class=0x020000 card=0x813910ec chip=0x813910ec rev=0x10 hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL-8100/8101L/8139 PCI Fast Ethernet Adapter'
    class      = network
    subclass   = ethernet
re0@pci0:3:0:0:    class=0x020000 card=0x80001025 chip=0x816810ec rev=0x06 hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller'
    class      = network
    subclass   = ethernet
```

But it does not appear in ifconfig:

```
# ifconfig
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=2008<VLAN_MTU,WOL_MAGIC>
    ether 00:e0:4c:41:0b:13
    hwaddr 00:e0:4c:41:0b:13
    inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255
    inet 192.168.1.3 netmask 0xffffff00 broadcast 192.168.1.255
    nd6 options=9<PERFORMNUD,IFDISABLED>
    media: Ethernet autoselect (100baseTX <full-duplex>)
    status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
    inet 127.0.0.1 netmask 0xff000000
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
    groups: lo
bridge0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 02:9f:d6:5f:89:00
    nd6 options=1<PERFORMNUD>
    groups: bridge
    id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
    maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
    root id 00:00:00:00:00:00 priority 0 ifcost 0 port 0
```

I've been reading about how network works in FreeBSD, and I've seen in the docs (11.5. Setting Up Network Interface Cards) that devices are named according to the drivers, but I can't find drivers such as `re` or `rl` anywhere. Nothing like that shows in `kldstat`, and I can't find any resembling name in /boot/kernel.

Any clue or reference about how can I get my interface visible again? I'd be more interesting about learning how this driver thing works than actually fixing it, thoug it'd be nice too haha.

Thanks!


----------



## SirDice (Jul 8, 2019)

Disabled in the BIOS/UEFI perhaps? Or it could be the card just decided to die. Does it show up with `pciconf -lv`?

Open the case and physically touch the big chip on the card, did you burn your finger? Then the card is dead, kaput, broken.


----------



## SirDice (Jul 8, 2019)

Both re(4) and rl(4) are built-in with the GENERIC kernel. So there's no need to load them. 

What version of FreeBSD?


----------



## sgz (Jul 8, 2019)

Ok, thanks for that info, I was just guessing that but I wasn't sure.
I'm running 11.2-STABLE.


----------



## SirDice (Jul 8, 2019)

What does `ifconfig re0` show?


----------



## sgz (Jul 8, 2019)

```
# ifconfig re0
ifconfig: interface re0 does not exist
```


----------



## sgz (Jul 8, 2019)

Just to clarify, all interfaces work correctly from a live iso (just checked again). I did some configuration with VNET in a jail, though I don't know if that could affect to this.


----------



## SirDice (Jul 8, 2019)

Did you create a custom kernel perhaps? And, can you post your rc.conf?


----------



## T-Daemon (Jul 8, 2019)

sgz said:


> I'm running 11.2-STABLE.


Not related to the problem, is there a particular reason you are running 11.2-STABLE, or is it a typo? 11.2-STABLE is not even available as snapshot anymore.

Also FreeBSD-STABLE is a development branch. It should run at all times, but it's not guaranteed. It is not recommanded for end-users, unless you are willing to carry out testing the system. You would have with a recent FreeBSD-RELEASE a production stable platform.



sgz said:


> just to clarify, all interfaces work correctly from a live iso


Which iso image?


----------



## SirDice (Jul 8, 2019)

Nothing wrong with a -STABLE version. I've been running every version since 3.0-STABLE all the way up to 12-STABLE now.


----------



## sgz (Jul 8, 2019)

T-Daemon said:


> Not related to the problem, is there a particular reason you are running 11.2-STABLE, or is it a typo? 11.2-STABLE is not even available as snapshot anymore.


Sorry if I should have mentioned this earlier. I'm using an out-of-the-box FreeNAS, but I don't really care about that platform; I', only using it as a start to learn about ZFS, jails and FreeBSD in general. This thread, I believe, is purely about FreeBSD and how network devices and the kernel works, which is my only concern, so that's why even aftrer reading the forum rules I think this is the pertinent place to make my question. But please, let me know if you think otherwise.
And no, it's not a typo, `uname -r` says 11.2-STABLE.



T-Daemon said:


> Which iso image?


archlinux-2019.06.01-x86_64.iso



SirDice said:


> Did you create a custom kernel perhaps? And, can you post your rc.conf?


I don't feel confident enough to say if my installation has a custom kernel. Is there any command that could tell me that? The missing network interface worked before and I'm sure I didn't build a new kernel afterwards.

My rc.conf:

```
#!/bin/sh

# This file is explicitly in the public domain.  You may do with it
# anything you like.

# Fallback settings for FreeNAS.  This file is read in first and is
# then overidden by the values in the database.

# XXX need to clean this up

hostname="dante"
openssh_enable="YES"

sendmail_enable="NONE"    # Run the sendmail inbound daemon (YES/NO).

background_fsck="NO"
fsck_y_enable="YES"

synchronous_dhclient="YES"    # Start dhclient directly on configured

ntpd_enable="YES"
ntpd_sync_on_start="YES"

# open-vm-tools
vmware_guest_vmblock_enable="YES"
vmware_guest_vmhgfs_enable="YES"
vmware_guest_vmmemctl_enable="YES"

devfs_system_ruleset="usbrules"

# System's run from memory disks.
clear_tmp_X="NO"

# Do not mark to autodetach otherwise ZFS gets very unhappy.
geli_autodetach="NO"

# We set dumpdev and run savecore in middleware.  The savecore rc script
# just errors out by the time it runs, and setting dumpdev to AUTO causes
# the dump device to be changed from the one we actually wanted to use.
savecore_enable="NO"
dumpdev="NO"
dumpdir="/data/crash"
ix_textdump_enable="YES"

# A set of storage supporting kernel modules, they must be loaded before ix-fstab.
early_kld_list="geom_mirror geom_multipath"

# A set of kernel modules that can be loaded after mounting local filesystems.
kld_list="dtraceall hwpmc t3_tom t4_tom"

dbus_enable="YES"
mdnsd_enable="YES"

# Turbo boost
performance_cpu_freq="HIGH"

# Add our rc.d scripts to load path
local_startup="/etc/ix.rc.d /usr/local/etc/rc.d"

# Make sure ix scripts run early enough
early_late_divider="*"

# ZFS
root_rw_mount="YES"

# syslog-ng
syslogd_enable="NO"
# Silence syslogd about missing files
# syslogd_flags="-s -C"
syslog_ng_enable="YES"

nginx_enable="YES"
nginx_login_class="nginx"

# Do not log DEVD events below LOG_NOTICE
devd_flags="-q"

# /var is a tmpfs, there is no need to clean it every boot
cleanvar_enable="NO"

# Skip check against sshd
openssh_skipportscheck="YES"

inadyn_flags="--continue-on-error"
```


----------



## SirDice (Jul 8, 2019)

sgz said:


> I'm using an out-of-the-box FreeNAS,


PC-BSD, FreeNAS, XigmaNAS, and all other FreeBSD Derivatives



sgz said:


> archlinux-2019.06.01-x86_64.iso


FreeBSD is not Linux. The fact it works with Linux is irrelevant for FreeBSD.


----------



## T-Daemon (Jul 8, 2019)

I presume you have copied the FreeNAS rc.conf to the 11.2 installation. I dont see any network ifconfig configuration. Have you saved the original rc.conf file ? I suggest you put the original in place and copy the settings you wish from the FreeNAS rc.conf. You could also run `bsdconfig` to configure the nic's.


sgz said:


> ...but I can't find drivers such as re or rl anywhere. Nothing like that shows in `kldstat`


If you run `kldstat -v` you will see the drivers.


----------



## T-Daemon (Jul 8, 2019)

SirDice said:


> Nothing wrong with a -STABLE version. I've been running every version since 3.0-STABLE all the way up to 12-STABLE now.


I see. I have the impression OP sgz is new to FreeBSD, using STABLE might be more learn intensive then a RELEASE, e.x. updating the system.


----------



## sgz (Jul 8, 2019)

T-Daemon said:


> I suggest you put the original in place and copy the settings you wish from the FreeNAS rc.conf. You could also run `bsdconfig` to configure the nic's.



Thanks! Those commands were useful for me to understand things a little better. I will try restoring rc.conf and perhaps I will try a clean FreeBSD RELEASE install now that I'm a little more familiar with the OS.

And thank you SirDice for your patience.


----------



## darmokandjalad (Dec 14, 2019)

I am having a very similar problem on a small form-factor machine. I've had it for years, and FreeBSD 12.1-RELEASE is the first FreeBSD release under which I've gotten it to boot.

I installed 12.1-RELEASE a few days ago, and found the system boots nominally. However, I wasn't able to configure the NICs at install, and neither of them are brought up at boot. As in the OP's case,  `/var/run/dmesg.boot` clearly shows that my two NICs are being identified at boot, and `pciconf` shows both devices. One is the onboard RealTek gigabit ethernet card, shown as re0, and the other is a one-NIC Intel gigabit ethernet PCI expansion card, shown as em0. (I'd share output, but I'm having to work off of another machine!). When I try raising both interfaces in bsdconfig, I'm given the message "No network interfaces detected."

I've been struggling to find documentation that helps me troubleshoot this problem. Can I trouble someone to point me to the next hop, or can sgz post the solution he/she found?

Thank you!


----------



## tsidilin (May 20, 2020)

Hi! 
I stucked with similar problem after upgrade from FreeBSD 9.3 to 10.0. 
I was found simple solution in some bsd-forum. I did forgot to make "freebsd-update install" after reboot. May be it will help you too!


----------

