# Wake On lan ; how  to avoid "nfe0 up and down"



## Blanche (Nov 25, 2018)

Hello all;

I would like to wake on line my freenas (freebdd 11.1), it works but after wake up I always have to go in the shell and type
*                 ifconfig nfe0 down
                 ifconfig nfe0 up*
before i can connect to the server. I have this message :
"discard frame w/o leading ethernet header (len 0 pkt len 0) in loop

There is few setup files :
# ifconfig
nfe0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=82008<VLAN_MTU,WOL_MAGIC,LINKSTATE>
        ether 00:17:31:83:9c:57
        hwaddr 00:17:31:83:9c:57
        inet 192.168.1.101 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 0x2
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        groups: lo

dmesg | grep nfe0
nfe0: discard frame w/o leading ethernet header (len 4294967295 pkt len 4294967295)
nfe0: discard frame w/o leading ethernet header (len 0 pkt len 0)
....
nfe0: link state changed to DOWN
nfe0: link state changed to UP
nfe0: link state changed to DOWN
nfe0: link state changed to UP

I try this :
https://forums.freebsd.org/threads/...-frame-without-leading-ethernet-header.28475/
but without success. 

Anyone have an idea of what to do ?


----------



## ShelLuser (Nov 25, 2018)

First of all: FreeNAS is not the same as FreeBSD, your version is even outdated; currently the only supported FreeBSD release is 11.2.

Alas, my theory is that the whole up/down cycle isn't the actual problem but merely a symptom. I assume you connected the machine to a router of some sort? Probably one which supports auto negotiation, and that's where things sometimes go wrong: both the router and the server try to negotiate the right values and as a result the system detects that the interface goes down and back up.

Obviously I can't be fully sure of this, but your ifconfig output does hint in this direction because your media type is auto selected.

Therefor my suggestion would be to force your ethernet adapter to use a specific media type (probably 100baseTX and full duplex), see nfe(4) for more details on that. Then check if this has an effect on the looping behavior.


----------



## Blanche (Nov 25, 2018)

Thanks a lot for reply,
I discovered freenas (and Freebsd)  few days ago. I'm sorry not to be in the right place.  

My router is a personnal standard box  on which i put a static IP for the server.
Is it right if I do :
 # ifconfig nfe0 media 100baseTX mediaopt full-duplex
in file
/etc/rc.conf.
then
# service netif restart
before reboot ?


----------

