You are not logged in.

#1 2021-02-03 20:42:30

pradtf
Member
Registered: 2009-06-10
Posts: 51

[SOLVED] hitron wifi router not showing hostnames

we have systemd-resolved providing dns as per:
https://wiki.archlinux.org/index.php/Sy … solved#DNS

we've used the stub method:
ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

for each machine the hosts and hostname files are appropriately set - as an example:
/etc/hosts:
127.0.0.1        localhost
::1              localhost
127.0.0.1        divisi.localdomain divisi

/etc/hostname:
divisi


but resolvectl status gives:

Global
           Protocols: +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported           
    resolv.conf mode: stub                                                     
  Current DNS Server: 1.1.1.1                                                  
Fallback DNS Servers: 1.1.1.1 9.9.9.10 8.8.8.8 2606:4700:4700::1111 2620:fe::10
                      2001:4860:4860::8888                                     

Link 2 (enp0s25)
Current Scopes: none                                                        
     Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported

Link 4 (wlan0)
Current Scopes: LLMNR/IPv4 LLMNR/IPv6                                       
     Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported

question #1: shouldn't the current dns server be 127.0.0.1?


however, though everything works fine, our router is putting in whatever it feels like as the hostname (first item):

android-d7f3128ade3ff07e    192.168.0.36    00:0f:00:5d:50:fb    DHCP-IP    WiFi-2.4G (that's for divisi)
66:2b:ce:7b:b9:6c    192.168.0.24    90:61:ae:57:79:70    DHCP-Reserved    WiFi-5G (that's for schnell)

the router picks up phone names and even what looking like mac addrs.
sometimes the same hostname appears multiple times.


the only way i was able to get the correct hostnames was to activate NetworkManager, but i don't see why i should have to because the wiki says:

systemd-resolved will work out of the box with a network manager using /etc/resolv.conf

(starting systemd-networkd didn't change anything)


as i said, this is not a problem because i can ssh into machines without any difficulty, but i'd like to know how to get the router to show the correct names, without running NetworkManager.

when i used manjaro i had no such issues and i recall that os ran bind by default.

tia

Last edited by pradtf (2021-02-04 21:43:56)


in friendship,
prad

Offline

#2 2021-02-03 21:40:06

seth
Member
Registered: 2012-09-03
Posts: 19,909

Re: [SOLVED] hitron wifi router not showing hostnames

i was able to get the correct hostnames was to activate NetworkManager, but i don't see why i should

starting systemd-networkd didn't change anything

How do you usually establish the connection to the router?
The local hostname is typically transmitted w/ the dhcp request

Offline

#3 2021-02-03 22:19:17

pradtf
Member
Registered: 2009-06-10
Posts: 51

Re: [SOLVED] hitron wifi router not showing hostnames

How do you usually establish the connection to the router?
The local hostname is typically transmitted w/ the dhcp request


i used iwd through iwctl, specifically:
station wlan0 connect SHAW

the connection is made and the router does the dhcp.

i must be missing something for getting the hostname to the router.

the router has a DNS, but that's for the outside, not local.


in friendship,
prad

Offline

#4 2021-02-03 22:25:31

seth
Member
Registered: 2012-09-03
Posts: 19,909

Re: [SOLVED] hitron wifi router not showing hostnames

https://lists.01.org/hyperkitty/list/iw … PXXECVGEX/
No idea where that went, but the iwd manpages do (on a superficial inspection) not seem to offer a hostname sending option.

Offline

#5 2021-02-04 03:40:26

pradtf
Member
Registered: 2009-06-10
Posts: 51

Re: [SOLVED] hitron wifi router not showing hostnames

seth wrote:

https://lists.01.org/hyperkitty/list/iw … PXXECVGEX/
No idea where that went, but the iwd manpages do (on a superficial inspection) not seem to offer a hostname sending option.

if i understand this correctly, it is deliberate:

"We chose not to send the hostname in order to comply with RFC 7844 [1]."
https://lists.01.org/hyperkitty/list/iw … PXXECVGEX/

so, may be i need something like bind to do local dns?


in friendship,
prad

Offline

#6 2021-02-04 07:29:01

seth
Member
Registered: 2012-09-03
Posts: 19,909

Re: [SOLVED] hitron wifi router not showing hostnames

You can just not use iwd for dhcp and run dhcpcd or dhclient on top to keep a low profile.
(For dhcpcd you'll have to uncomment the feature in /etc/dhcpcd.conf)

Just disable iwd's network configuration feature again and run one of the former.

Offline

#7 2021-02-04 21:25:25

pradtf
Member
Registered: 2009-06-10
Posts: 51

Re: [SOLVED] hitron wifi router not showing hostnames

seth wrote:

You can just not use iwd for dhcp and run dhcpcd or dhclient on top to keep a low profile.
(For dhcpcd you'll have to uncomment the feature in /etc/dhcpcd.conf)

Just disable iwd's network configuration feature again and run one of the former.

i thought i need iwd for getting access to wifi.
if i just ran dhcpcd, would that use something like iwd to access wifi?

here's part of a post i came across:

2. You always need something, either iwd or wpa_supplicant, to connect to networks even if they don't require authentication. How else would your adapter know what AP to pick?

...

Here are the two setups you can use for 99% of networks:

1. wpa_supplicant + systemd-networkd + systemd-resolved

2. iwd + systemd-networkd + systemd-resolved

There is no need in the present day to run dhcpcd directly unless systemd-networkd fails to work.

https://www.reddit.com/r/archlinux/comm … ant_iw_ip/


i'm using #2 and all is well except the hitron router is not picking up my hostname.
someone else there did mention using dhclient as you did.
i've never tried this before but i imagine it is to replace systemd-resolved?
so i'll work on that.

thx seth for your ideas!


in friendship,
prad

Offline

#8 2021-02-04 21:42:35

pradtf
Member
Registered: 2009-06-10
Posts: 51

Re: [SOLVED] hitron wifi router not showing hostnames

found the solution:

i didn't have dhcp running in systemd-networkd!

so, here's what i need to put in /etc/systemd/network/25-wlan0.network

[Match]
Name=wlan0

[Network]
DHCP=yes

then make sure we have:

systemctl start systemd-networkd
systemctl start systemd-resolved
and enable these as well.

now i get on the router:

divisi    192.168.0.36    00:0f:00:5d:50:fb    DHCP-IP    WiFi-2.4G
schnell    192.168.0.24    90:61:ae:57:79:70    DHCP-Reserved    WiFi-5G


thx again seth for hanging in there - i might give dhclient a try as i get more confident in all this!


will mark this SOLVED.


in friendship,
prad

Offline

Board footer

Powered by FluxBB