# nfe0? resolv.conf? error network !!



## BeastieLabs (Oct 21, 2019)

I have been a user of freebsd for +3 years and I have previously modified everything that I am going to list below. Now I changed the computer that has an integrated nvidia nforce network card, my previous computer had integrated the intel network card and had no problems, apparently the nfe driver (nfe0) is causing me this type of error. I could not install / update anything on the system through binaries (pkg), it does not connect to the pkg.freebsd.org repositories server

It is very similar to this error:








						Unable to connect to the network
					

I'm running 10.3-RELEASE on a Dell rack mount server.  1. rc.conf   hostname="neocoilss04" ifconfig_nfe0="inet 192.168.1.213 netmask 255.255.255.0" defaultrouter="192.168.1.1" sshd_enable="YES" ntpd_enable="YES" dumpdev="AUTO" zfs_enable="YES"   2. loader.conf   kern.geom.label.gptid.enable="0"...




					forums.freebsd.org
				




checks:

1. Cannot download the pkg package to update / install via binaries in the system
2. I can update the system base using the freebsd-update fetch / install command correctly. I could upgrade to my current version of fbsd is 12.0-p10
3. When pinging eg: ping -c3 www.google.com works correctly. Pinging pkg.freebsd.org works correctly.
4. Adding the DNS in the resolv.conf file saves the changes but when I restart the netif resolv.conf service it returns to the original values leaving a copy of the resolv.conf.bak in which are the changes I made before.
5. I tried to activate local_unbound service in rc.conf, and save and keep the changes by modifying the resolv.conf file but the connection error continues and the pkg package cannot be downloaded to update / install.
6. I have configured ipv4 / ipv6 correctly in rc.conf
7. I have installed the system 3 times performing multiple combinations in the configurations without making it work.
8. the netstat -nr command responds correctly

*The error generated:*





2 hours Later nothing happen ...

my rc.conf file:

```
hostname="seven"
ifconfig_nfe0="DHCP" # the SYNCDHCP command does not work either
ifconfig_nfe0_ipv6="inet6 accept_rtadv" # I also did it without ipv6 just with ipv4 activated
defaultrouter="192.168.1.1"
# local_unbound_enable="YES"
sshd_enable="YES"
ntpd_enable="YES"
dumpdev="AUTO"
```
my resolv.conf file modified for me with DNS google servers:

```
# Generated by resolvconf
search www.duckduckgo.com
nameserver 8.8.8.8
nameserver 8.8.4.4
```

*original resolv.conf file*

```
# Generated by resolvconf
search www.tendawifi.com
nameserver 192.168.1.1
```
thanks for your help !!


----------



## SirDice (Oct 21, 2019)

Remove `defaultrouter` and let DHCP set it. Remove the `search` line from resolv.conf, you're using it wrong, it's not a search engine. See resolv.conf(5). Don't edit resolv.conf at all, let DHCP do it.


----------



## Dies_Irae (Oct 21, 2019)

In my system (with nfe card) I have to put these lines in /boot/loader.conf:


```
hw.nfe.msi_disable="1"
hw.nfe.msix_disable="1"
```

otherwise network goes down after a few minutes with a "watchdog: timeout".

As a side note, from here (Italy) today I can ping pkg.freebsd.org but `pkg upgrade` is horribly slow (~30 K/s) and often stops with a network timeout.


----------



## BeastieLabs (Oct 22, 2019)

SirDice said:


> Remove `defaultrouter` and let DHCP set it. Remove the `search` line from resolv.conf, you're using it wrong, it's not a search engine. See resolv.conf(5). Don't edit resolv.conf at all, let DHCP do it.


thanks for your answer. removing the defaultrouter line also does not work, I cannot modify the resolv.conf file as I said before making any changes and restarting the netif service over write the file to its original configuration. Only when I activate local_unbound is that it allows me to change the values but it doesn't work either. I have made many configurations and none works for me.


----------



## BeastieLabs (Oct 22, 2019)

Dies_Irae said:


> In my system (with nfe card) I have to put these lines in /boot/loader.conf:
> 
> 
> ```
> ...


Thanks for your answer. Can you install programs using the pkg command?


----------



## SirDice (Oct 22, 2019)

Make sure you can ping for example 8.8.8.8. There's no point in looking for resolver issues if you're not connected to the internet.


----------



## BeastieLabs (Oct 22, 2019)

SirDice said:


> Make sure you can ping for example 8.8.8.8. There's no point in looking for resolver issues if you're not connected to the internet.



Google DNS





resolv.conf actuallly: remember that dont let me chang it later -- netif restart -- over write the file

*changed:*

View attachment 7064

service netif restart again: *Original: here dhclient 


*






what's going on? Why does the resolv.conf file not save the changes?


----------



## SirDice (Oct 22, 2019)

v4nhelsing said:


> what's going on? Why does the resolv.conf file not save the changes?


You're using DHCP, that keeps overwriting your /etc/resolv.conf with information received from your DHCP server. Is there any reason why you do not want the DNS servers DHCP is giving you?


----------



## BeastieLabs (Oct 22, 2019)

SirDice said:


> You're using DHCP, that keeps overwriting your /etc/resolv.conf with information received from your DHCP server. Is there any reason why you do not want the DNS servers DHCP is giving you?


ok, as it is by default we see that there is an internet connection, there is an answer using the ping in several sites, the problem is that when trying to connect to the freebsd repositories nothing happens, when trying to download / install pkg it does not connect to the repo , I think I will make a little video or gif to have more clarity about this error and maybe you can help me better, I am desperate I have even used an atheros wireless card disabling the nfe0 interface (nforce ethernet nvida) without success.


----------



## SirDice (Oct 22, 2019)

Leave resolv.conf as is, assume your DHCP server is configured correctly and the information it's giving is correct.

Run `host pkg.freebsd.org`. If that provides an answer then your DNS resolving works.


----------



## BeastieLabs (Oct 23, 2019)

SirDice said:


> Leave resolv.conf as is, assume your DHCP server is configured correctly and the information it's giving is correct.
> 
> Run `host pkg.freebsd.org`. If that provides an answer then your DNS resolving works.





SirDice said:


> Leave resolv.conf as is, assume your DHCP server is configured correctly and the information it's giving is correct.
> 
> Run `host pkg.freebsd.org`. If that provides an answer then your DNS resolving works.


it works now !! but I have noticed that we are now in version 12-p11, before it was in version 12-p10 is it possible that this is the reason for the failure? When running the host command pkg.freebsd.org I got a response from the server then I tried to download / install pkg and after a few seconds it worked perfectly as it always worked!


----------



## SirDice (Oct 23, 2019)

v4nhelsing said:


> but I have noticed that we are now in version 12-p11, before it was in version 12-p10 is it possible that this is the reason for the failure?


Probably not, p11 was an update for timezones; FreeBSD-EN-19:18.tzdata


----------



## BeastieLabs (Oct 23, 2019)

SirDice I've always had a question to ask you, sorry in advance if it bothers you, are you a person behind a nickname? or a nickname with several people behind? How can you stay in the community for so long?


----------



## SirDice (Oct 23, 2019)

v4nhelsing said:


> are you a person behind a nickname?


There's only one of me, and yes I am real.



v4nhelsing said:


> How can you stay in the community for so long?


I love FreeBSD and love helping people.


----------



## BeastieLabs (Oct 23, 2019)

SirDice said:


> There's only one of me, and yes I am real.
> 
> 
> I love FreeBSD and love helping people.


My regards to you, good man. Someday I will also be a freebsd maintainer and developer.


----------

