nfe0 link state is down. Why? (Solved)

I am running an ethernet NIC on 12.2.
The startup script link state is shown as 'down' but 'ifconfig' shows nfe0 as active.
I don't seem to have a supported NIC. I haven't been able to find the one I am using, so as to query the compatibility list. How do I do that?
I have run more /var/run/dmesg.boot but I don't know what to look for.

Code:
root@Mistletoe:~ # ifconfig
sk0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=80009<RXCSUM,VLAN_MTU,LINKSTATE>
        ether 00:13:d4:e1:cb:8e
        media: Ethernet autoselect (none)
        status: no carrier
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
nfe0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8210b<RXCSUM,TXCSUM,VLAN_MTU,TSO4,WOL_MAGIC,LINKSTATE>
        ether 00:13:d4:e1:b7:40
        inet 192.168.1.111 netmask 0xffffff00 broadcast 192.168.1.255
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

Code:
 root@Mistletoe:~ # netstat -nr
Routing tables

Internet:
Destination        Gateway            Flags     Netif Expire
default            192.168.1.1        UGS        nfe0
127.0.0.1          link#3             UH            lo0
192.168.1.0/24     link#2             U          nfe0
192.168.1.111      link#2             UHS      lo0

Internet6:
Destination                       Gateway                       Flags     Netif Expire
::/96                             ::1                           UGRS        lo0
::1                               link#3                        UH          lo0
::ffff:0.0.0.0/96                 ::1                           UGRS   lo0
fe80::/10                         ::1                           UGRS     lo0
fe80::%lo0/64                     link#3                        U     lo0
fe80::1%lo0                       link#3                        UHS   lo0
ff02::/16                         ::1                           UGRS        lo0
Code:
root@Mistletoe:~ # netstat nr
Active Internet connections
Proto Recv-Q Send-Q Local Address          Foreign Address        (state)
tcp4       0      0 192-168-1-111.tp.18238 163.171.208.94.443     CLOSED
tcp4      24      0 192-168-1-111.tp.21124 204.109.59.195.443     CLOSE_WAIT
tcp4       0      0 192-168-1-111.tp.50925 204.109.59.195.443     CLOSE_WAIT
tcp4       0      0 192-168-1-111.tp.29751 192.0.73.2.443         CLOSED
tcp4      63      0 192-168-1-111.tp.21962 hwcdn.net.443          CLOSED
tcp4       0      0 192-168-1-111.tp.18876 syd09s14-in-f2.1.443   CLOSED
tcp4       0      0 192-168-1-111.tp.18875 syd15s15-in-f14..443   CLOSED
tcp4       0      0 192-168-1-111.tp.18874 syd15s16-in-f2.1.443   CLOSED
tcp4       0      0 192-168-1-111.tp.18873 syd09s15-in-f14..443   CLOSED
tcp4       0      0 192-168-1-111.tp.18872 syd09s22-in-f3.1.443   CLOSED
tcp4       0      0 192-168-1-111.tp.18871 syd15s16-in-f3.1.443   CLOSED
tcp4       0      0 192-168-1-111.tp.18870 syd09s23-in-f4.1.443   CLOSED
tcp4       0      0 192-168-1-111.tp.18869 syd09s23-in-f4.1.443   CLOSED
tcp4       0      0 192-168-1-111.tp.51968 ec2-44-242-93-71.443   ESTABLISHED
tcp4       0      0 192-168-1-111.tp.16083 65.8.135.56.443        CLOSED
tcp4       0      0 192-168-1-111.tp.48130 82.221.107.34.bc.80    CLOSED
tcp4       0      0 192-168-1-111.tp.29392 82.221.107.34.bc.80    CLOSED


Thanks for any help.
 
I have loaded
Code:
 if_nfe0-load="YES"
in boot/loader.conf
(sko status is 'no carrier' so I have not included it in above file).
I also have etc/pf.conf that contains nfe0 & reference to 192.168.1.111 there, but the startup script still results in 'link state down' & localhost:631 is unobtainable
 
if_nfe0-load="YES"
This is not correct. You don't load individual interfaces, you load the driver, it should look like this:
Code:
if_nfe_load="YES"
But you don't need to load nfe(4) or sk(4), both are already included in the GENERIC kernel.

I also have etc/pf.conf that contains nfe0 & reference to 192.168.1.111 there, but the startup script still results in 'link state down' & localhost:631 is unobtainable.
I have no idea what you mean here. Localhost is 127.0.0.1 and ::1 and those addresses are set on the lo0 interface. This has nothing to do with nfe0 or sk0. Besides that, if you look at ifconfig nfe0 you can clearly see it's active and has an IP address assigned to it.
 
I thought, given your references to nfe(4) & sk(4), that they were central to getting this to work. So If I don't have to load anything, do I instead need to get out my crystal ball?:) I wish I understood the theory behind all of this then I wouldn't be flying completely blind most of the time!
BTW how do I become privy to what is loaded in the GENERIC kernel from version to version?
 
I thought, given your references to nfe(4) & sk(4), that they were central to getting this to work
I don't understand what's confusing for you.

The startup script link state is shown as 'down' but 'ifconfig' shows nfe0 as active.
Are you using DHCP here? That would explain the "down" message, the interface will go down then up to do a DHCP request.

I don't seem to have a supported NIC.
This the part I don't understand, your ifconfig(8) output clearly shows two network interfaces, nfe0 and sk0. And nfe0 is active and has an IP address. So what's the problem?

BTW how do I become privy to what is loaded in the GENERIC kernel from version to version?
Look at the source code: https://cgit.freebsd.org/src/tree/sys/amd64/conf/GENERIC?h=releng/13.0
 
DHCP was setup when I installed 12.2.
I understand that I have two working interfaces & that nfe0 is active & has an IP address but what is needed to make it work?
You seem to be saying it should work automatically. Is there a diagnostic to see what is going on?
If we put an index label on what I am trying to achieve here what would it be in terms of the users' handbook or the Administrator's networking handbook.
 
Make what work? You keep saying something doesn't work without explaining what doesn't work.
Well if nfe wasn't there something wouldn't work (you would know that), otherwise it would be superfluous, unless of course there are a multitude of networking things it could affect & you want to know which it is.
In my case localhost:631 doesn't work!
Your references to nfe(4) said to load it in boot/loader.conf That turns out to be a wild goose chase given your later advice that is not necessary because it's already in the kernel. I can now see it in the generic kernel that you have provided.
 
In my case localhost:631 doesn't work!
That has nothing to do with your network cards. As I explained earlier localhost is a special hostname, it always refers to the 127.0.0.1 (IPv4) and ::1 (IPv6) IP addresses. And those are always bound to the lo0 interface. That lo0 interface is there, it's not a "real" interface.
 
on this test machine I have;
Code:
 cups_enable="YES"
in etc/rc.conf & my printer is seen as a usb connection in the startup script.
I have also setup /etc/pf.conf to allow the lan to talk to cups on my machine. This approach worked with em0 on my main machine.
What more do I need to activate localhost:631 to setup my printer?
 
You seem to be missing some basic TCP/IP knowledge. That localhost or 127.0.0.1 IP address always refers to the host itself. A network service that is bound to 127.0.0.1 cannot be accessed from outside that host. Every host will have a 127.0.0.1 address and this will always point to itself.

Code:
[A]----[B]
Simple network, with host A and host B. Host A has 192.168.10.1 and host B is 192.168.10.2. localhost or 127.0.0.1 on host A refers to itself; i.e. host A. 127.0.0.1 on host B also refers to itself; host B. If your network service runs on host A on 127.0.0.1 you cannot access it from host B. If you need to access that service on host A from host B you will need to bind that service to the address 192.168.10.1. Then you can access it from B by addressing the IP address of A.
 
You seem to be missing some basic TCP/IP knowledge. That localhost or 127.0.0.1 IP address always refers to the host itself. A network service that is bound to 127.0.0.1 cannot be accessed from outside that host. Every host will have a 127.0.0.1 address and this will always point to itself.
Is there a diagnostic I can run & then post it here for assessment?
 
What's there to diagnose? A ping localhost will always work (there's something seriously wrong if that doesn't work) because you're basically pinging yourself. You can ping(8) host A from B and vice versa but that will only tell you both hosts can talk to each other.
 
TCP/IP is universal. If you don't understand TCP/IP on FreeBSD you're not going to understand it on Windows either. At least on FreeBSD you get all the tools and documentation to play with and learn from for free with the OS.
 
The startup script link state is shown as 'down' but 'ifconfig' shows nfe0 as active.
It is quite normal for a configured (you know, one you want to use and therefore have configured it in /etc/rc.conf) network interface to show state "down" during startup, one of the things the startup scripts does is to set your configured network interfaces up (and also add any other configurations from /etc/rc.conf). So if you pay close attention, you will see that the network interface changes state from "down" to "active" during startup.
 
Dear dalpets,
for playing with TC/IP you might want to try the examples in the "Client/Server" section of nc(1). If I am not wrong the tool with the long name netcat is available in all standard FreeBSD installations because it lives in /usr/bin/nc. You will need two console sessions. One for the server and one for the client. It is most convenient to see both at the same time. Therefore it is best to try it using X with two terminals as xterm(1) or any other terminal emulator.
 
TCP/IP is universal. If you don't understand TCP/IP on FreeBSD you're not going to understand it on Windows either. At least on FreeBSD you get all the tools and documentation to play with and learn from for free with the OS.
I understand that you think most of us want to be hand fed & you act accordingly & hold back your answers with a hard resolve.

Printers in Windows normally provide drivers out of the box. You don't, as a rule, have to understand TCP/IP to get a printer working in Windows. The difference here is that Unix requires you to understand minutae to get things working properly. Some people enjoy that, but it is generally acknowledged that Unix, for most, is a very complicated animal to learn. I don't have a problem with that, but I expect to be reasonably facilitated in the learning process & not to be blind sided with technicalities. Complexity can come down the track, once there is some maturity. A baby doesn't walk straight out of the womb! And it can't understand adult (unix) speak then, either.
A technocrat, as a teacher, needs to understand the tenets of learning & that everybody has different needs & abilities, facets that are difficult to assess outside the face to face classroom, like here ! But let's try, eh!
 
Last edited:
It is quite normal for a configured (you know, one you want to use and therefore have configured it in /etc/rc.conf) network interface to show state "down" during startup, one of the things the startup scripts does is to set your configured network interfaces up (and also add any other configurations from /etc/rc.conf). So if you pay close attention, you will see that the network interface changes state from "down" to "active" during startup.
Please see thread 3 above
 
Make what work? You keep saying something doesn't work without explaining what doesn't work.
I asked you for a label to indicate the process I am trying to use to get localhost:631 working. You didn't answer!
How can I follow it up in documentation if you don't specify it with a label that I can follow through with?
It simply remains murky without one!
 
Back
Top