You are not logged in.
So after fresh install of arch I usually use static ip where I also put DNS or I use dhcpcd
But it felt wrong to use two different things when systemd can do both.
So when I tried recent installation I went for for this section
https://wiki.archlinux.org/index.php/Sy … using_DHCP
I enabled and started systemd-networkd.service and systemd-resolved.service
I created /etc/systemd/network/20-wired.network with simple match and name of my interface as instructed by the wiki
Now I can ping 8.8.8.8 but I cant ping archlinux.org
`networkctl status` command ends saying that DNS is set to the IP of my router, which has set 8.8.8.8 and 1.1.1.1 in its DNS config
Is this some issue with my hardware, or I am missing some obvious step on the wiki?
I tried in virtualbox and it behaves the same as on the physical machine I am playing with.
Also the idea is that the machine gets DNS from the router, as it gets its IP and gateway settings, not that I manually put it in to some resolv.conf
I guess I could just go back to dhcpcd which just works for me.
/edit
Marking solved as its likely issue with my router as it worked fine when I tried two others, though it feels like fallback of systemd-resolved should have kick in or something
Last edited by DoTheEvolution (2018-12-23 18:50:43)
Offline
Ok, I think it might be my router.
I usually use virtualbox for VMs.
I had "bridged adapter settings" so the arch VM is on the same network as all other regular devices, getting dhcp from the main router.
Now I changed VMs network setting to "NAT" so that the internal virtualbox network manages the VM and it works when I set it up on that network.
If someone can confirm that those two steps of having config file and enabling the two services works for them on physical hardware I will just mark it solved I guess.
Last edited by DoTheEvolution (2018-12-21 22:41:36)
Offline
Did you configure systemd-resolved properly?
Offline
I had a look there, 70% of the stuff there I dunno what means or if it is needed.
Is any further configuration required when I just want DHCP to work on wired connector?
Also I dont want to write myself dns manually in some config to 8.8.8.8 or 1.1.1.1, it should get it from router.
I checked resolvectl status, and fallback dns are there, and setting for my local connection are pointed to router/gateway IP address
then there is some ipv6 address there which I would not expect as I set ipv4 in the systemd netword config file
https://i.imgur.com/A2vB0Ij.png
while when I am in virtualbox NAT mode, and not bridged mode, they point to the actual DNS servers
https://i.imgur.com/WHJEPRY.png
Last edited by DoTheEvolution (2018-12-21 20:21:32)
Offline
https://wiki.archlinux.org/index.php/Sy … solved#DNS
Did you create the symlink under (1)?
Offline
Yeap.
Yesterday when I was digging deep on the physical machine I tried it.
Now today again, just to be sure in VM.
No change.
Last edited by DoTheEvolution (2018-12-21 22:40:50)
Offline
I had "bridged adapter settings" so the arch VM is on the same network as all other regular devices, getting dhcp from the main router.
You might want to set UseDomains to true for your *.network file.
See: https://www.freedesktop.org/software/sy … twork.html
Specifically, about the DHCP section and the UseDomains property:
DHCP=
Enables DHCPv4 and/or DHCPv6 client support. Accepts "yes", "no", "ipv4", or "ipv6". Defaults to "no".Note that DHCPv6 will by default be triggered by Router Advertisement, if that is enabled, regardless of this parameter. By enabling DHCPv6 support explicitly, the DHCPv6 client will be started regardless of the presence of routers on the link, or what flags the routers pass. See "IPv6AcceptRA=".
Furthermore, note that by default the domain name specified through DHCP is not used for name resolution. See option UseDomains= below.
See the "[DHCP]" section below for further configuration options for the DHCP client support.
UseDomains=
Takes a boolean, or the special value "route". When true, the domain name received from the DHCP server will be used as DNS search domain over this link, similar to the effect of the Domains= setting. If set to "route", the domain name received from the DHCP server will be used for routing DNS queries only, but not for searching, similar to the effect of the Domains= setting when the argument is prefixed with "~". Defaults to false.It is recommended to enable this option only on trusted networks, as setting this affects resolution of all host names, in particular of single-label names. It is generally safer to use the supplied domain only as routing domain, rather than as search domain, in order to not have it affect local resolution of single-label names.
When set to true, this setting corresponds to the domain option in resolv.conf(5).
For external addresses, it should work if you set up systemd-resolved correctly. Make sure nothing is interfering with it.
EDIT: Could you provide the output of `nslookup -debug archlinux.org` (part of bind-tools)?
Last edited by Omar007 (2018-12-22 18:42:45)
Offline
The "UseDomains=yes" added to [Network] part of the systemd networkd config file did nothing when tested in VM
tried the nslookup
# nslookup -debug archlinux.org
# connection timed out, no servers could be reached https://i.imgur.com/vjugt0E.png
What I tried is putting another router right between the physical machine I was testing and the network
Just reseted it to defaults, plugged network cable to wan and from switch to the arch machine
reinstalled arch just to be sure, and it works with just enabled networkd and resolved services and the network file
no additional configuration is needed.
Then I also plugged in opnsense appliance, also fresh install and it also worked, except for some initial delay with every new domain name
Seems there might be just some strange issue with the D-link dsl router thats currently in charge of the networks DHCP
I guess I stick with dhcpcd
Offline