[SOLVED] NetworkManager does not set my custom DNS 27 November 2018, 01:16:00 I've set a custom DNS in my network manager because by default it doesn't seem to resolve most addresses when I use NetworkManager instead of some wpa_supplicant scripts. For example:Code: [Select][rocky@cassini ~]$ ping asdf.omping: asdf.om: Name or service not knownMy /etc/resolv.conf:Code: [Select]# Generated by NetworkManagernameserver fda6:ec2c:8511::1Thanks Last Edit: 07 December 2018, 15:17:41 by nous
Re: NetworkManager does not set my custom DNS Reply #1 – 27 November 2018, 11:44:20 Quote from: rockybulwinkle – on 27 November 2018, 01:16:00I've set a custom DNS in my network manager because by default it doesn't seem to resolve most addresses when I use NetworkManager instead of some wpa_supplicant scripts. For example:Code: [Select][rocky@cassini ~]$ ping asdf.omping: asdf.om: Name or service not knownMy /etc/resolv.conf:Code: [Select]# Generated by NetworkManagernameserver fda6:ec2c:8511::1Thanksare you using a dhcp server? There is not enough information here. All DNS is custom....
Re: NetworkManager does not set my custom DNS Reply #2 – 27 November 2018, 17:19:45 I'm using DHCP on my router. The script I mentioned use use wpa_supplicant and dhcpcd to connect and get an IP.Those scripts set up my router as my DNS. Since NetworkManager wasn't working out of the box (I could access, say, google.com but not asdf.com) I tried setting the DNS in the IPv4 settings to 1.1.1.1 and my /etc/resolv.conf still only had that ipv6 address and websites still weren't resolving.I can give more information when I get home, this computer isn't in front of me right now.Thanks
Re: NetworkManager does not set my custom DNS Reply #3 – 27 November 2018, 18:59:57 You should specify always when presenting an issue if you are running on OpenRC or Runit.# ip ashould show you what interfaces you have and if they are activeOther than dhcpcd you need dhcpcd-runit/openrc and activate them.# dhcpcdWill start it anyhow.One of the reasons I stopped using nm is because it loves to rewrite my settings to its own, and dns was part of my problem.I also use net-tools and ifconfig in particular to activate intefaces and deactivate them.example:# ifconfig eth0 up# ifconfig wlan0 down
Re: NetworkManager does not set my custom DNS Reply #4 – 27 November 2018, 19:12:46 Quote from: fungalnet – on 27 November 2018, 18:59:57You should specify always when presenting an issue if you are running on OpenRC or Runit.# ip ashould show you what interfaces you have and if they are activeOther than dhcpcd you need dhcpcd-runit/openrc and activate them.# dhcpcdWill start it anyhow.One of the reasons I stopped using nm is because it loves to rewrite my settings to its own, and dns was part of my problem.I also use net-tools and ifconfig in particular to activate intefaces and deactivate them.example:# ifconfig eth0 up# ifconfig wlan0 downDHCPCD is vixies DHCPCD FWIW and network manager usually uses dhcpclientFWIW, 1.1.1.1 is a dns server outside of your network owned by digital ocean if I am not mistaken. Aside from the problems involved with depending on them, the fact that you are not reaching them seems to me tat your routing is messed up, and possibly the wifi if you are using it.
Re: NetworkManager does not set my custom DNS Reply #5 – 28 November 2018, 03:19:04 I'm using openrc. I have installed the init scripts for Network Manager already.I think the topic name might be misleading. All I really want is my DNS to work. I had tried to set it manually to cloudflare's (1.1.1.1) but it didn't work.Other devices on my network are working fine including a phone and nintendo switch on wifi as well as an Artix desktop on ethernet. The only thing not working right now is my laptop when I use networkmanager.Networkmanager is configuring the ipv6 DNS correctly to point at my router. The ipv4 dns entry is missing from resolv.conf. My phone, nintendo switch, and desktop all are getting their ipv4 DNS set to the router correctly so it isn't a problem with the router.
Re: NetworkManager does not set my custom DNS Reply #6 – 28 November 2018, 04:59:39 If I manually run dhclient after NetworkManager has finished getting an ipv6 lease I get an ipv4 lease and my dns and gateway is set right.This is sounding suspiciously like this issue over at Manjaro: https://forum.manjaro.org/t/no-ipv4-with-wifi/13359/16
Re: NetworkManager does not set my custom DNS Reply #7 – 28 November 2018, 05:07:33 The second response here worked for me! https://bugzilla.redhat.com/show_bug.cgi?id=1468358The one about changing the dhcp client identifier:QuoteDoes it work if you change the client-identifier of the connection to a type+mac one? i.e.: nmcli connection mod <connection-name> ipv4.dhcp-client-id 01:xx:xx:xx:xx:xx:xx nmcli connection up <connection-name>where xx:xx:xx:xx:xx:xx is a MAC address?Why isn't it doing this by default? *edit* or is this simply masking a problem? Last Edit: 28 November 2018, 05:19:19 by rockybulwinkle
Re: NetworkManager does not set my custom DNS Reply #8 – 28 November 2018, 15:01:01 Quote from: rockybulwinkle – on 28 November 2018, 03:19:04I'm using openrc. That is not relaventQuoteI have installed the init scripts for Network Manager already.That should have been installed with the OS installation. Why this needs to be done by hand is a puzzle.QuoteI think the topic name might be misleading. All I really want is my DNS to work. I had tried to set it manually to cloudflare's (1.1.1.1) but it didn't work.If you have no network you can't get DNS and DNS is often set by a DHCP application, either by networkmanger or by the init scripts directlyYou also must be on the broadcast leg of the network that has the DHCP server, or your are shouting into the wind.QuoteOther devices on my network are working fine including a phone and nintendo switch on wifi as well as an Artix desktop on ethernet. I'm tempted to say I don't care, but I will be polite and say it doesn't matter.QuoteThe only thing not working right now is my laptop when I use networkmanager.FWIW, the most likely point of failure here is the wifi connection. Check the network with ifconfigQuoteNetworkmanager is configuring the ipv6 DNS correctly to point at my router.How do you know that?Quote The ipv4 dns entry is missing from resolv.conf. My phone, nintendo switch, and desktop all are getting their ipv4 DNS set to the router correctly so it isn't a problem with the router.Is network manager started?
Re: NetworkManager does not set my custom DNS Reply #9 – 28 November 2018, 15:03:06 BTW - I always start dhcpcd by hand because I hate playing with Networkmanger. It has enough trouble just keeping the wifi up..
Re: NetworkManager does not set my custom DNS Reply #10 – 28 November 2018, 15:38:18 Quote from: mrbrklyn – on 28 November 2018, 15:01:01That is not relaventfungalnet asked.Quote from: mrbrklyn – on 28 November 2018, 15:01:01That should have been installed with the OS installation. Why this needs to be done by hand is a puzzle.I installed only the base system and then cinnamon. I never said I needed to install it by hand.Quote from: mrbrklyn – on 28 November 2018, 15:01:01If you have no network you can't get DNS and DNS is often set by a DHCP application, either by networkmanger or by the init scripts directlyYeah, figured that out alreadyQuote from: mrbrklyn – on 28 November 2018, 15:01:01I'm tempted to say I don't care, but I will be polite and say it doesn't matter.Other devices work fine. That was my point, refuting that my router was the issue. Saying "I'll be polite" doesn't make it polite.Quote from: mrbrklyn – on 28 November 2018, 15:01:01FWIW, the most likely point of failure here is the wifi connection. Check the network with ifconfigddQuote from: mrbrklyn – on 28 November 2018, 15:01:01How do you know that?See my /etc/resolv.conf in my first post.Quote from: mrbrklyn – on 28 November 2018, 15:01:01Is network manager started?Of course it is, otherwise I wouldn't even have gotten that far.Did you not read my last post? Setting the DHCP client id fixed it. Last Edit: 28 November 2018, 16:27:14 by rockybulwinkle
Re: NetworkManager does not set my custom DNS Reply #11 – 29 November 2018, 03:04:45 Can we move this thread to Configurations please .... sorry for the Meta discussion.
Re: NetworkManager does not set my custom DNS Reply #12 – 29 November 2018, 03:07:36 Quote from: rockybulwinkle – on 28 November 2018, 15:38:18Did you not read my last post? Setting the DHCP client id fixed it.Yes, I did read it. It is often the case that it works when you run it by hand. I think the question you have now is why Network manager doesn't do it automatically, or do you consider the issue solved now?
Re: NetworkManager does not set my custom DNS Reply #13 – 29 November 2018, 03:10:58 Quote from: rockybulwinkle – on 28 November 2018, 15:38:18See my /etc/resolv.conf in my first post.I read that and to me it just looked broken with an IP6 address. What is the address of the DNS that it is supposed to point to?
Re: NetworkManager does not set my custom DNS Reply #14 – 29 November 2018, 05:51:22 Is moving the thread something I need to do or does a mod need to do it?Sorry, this post might feel a bit disjointed. It's getting late here.I think I found the problem, same as this person's: https://forum.artixlinux.org/index.php/topic,701.msg5433.html#msg5433When I set my dbus machine-id, networkmanager sets the ipv4 dns correctly without my setting the dhcp client id. It isnt' automatically setting it to the 01:<mac address>, it's still not set like it did without machine-id. My best guess is that it is trying to talk to dhclient over dbus and it can't without the machine-id being set.For whatever reason the dbus install scripts don't set /etc/machine-id or /var/lib/dbus/machine-id. dbus-uuidgen > /etc/machine-id. I had a similar problem with KDE plasma a week ago but I must have accidentally reverted that fix at some point.So I guess the real question is, why isn't the dbus machine-id getting set? I think this is the answer: https://www.reddit.com/r/archlinux/comments/6kwt61/systemd_doesnt_create_machineid_during/Sounds like normally the machine-id is set by systemd-firstboot according to the arch folks. If that's really the case, I would think folk who migrated arch linux would not have this issue, but since I installed it fresh from the artix livecd mine isnt' set.And btw I confirmed, that ipv6 in my resolv.conf was my router's ipv6 on my lan. Going back to my example websites I used in the first post, google.com can resolve with "ping -6" but asdf.com can't. My ipv6 DNS was working the whole time. Just not ipv4.In any case, I'm going to mark this as solved, though I'm going to open up another issue about the systemd-firstboot and dbus's machine-id.