You are not logged in.

#1 2020-06-10 02:07:52

Bluboy234
Member
Registered: 2020-06-10
Posts: 15

Hostname is shown as '*' instead of true hostname on connected network

I am using mobile hotspot with netctl auto and it works great for internet. But when I look for connected devices in my mobile it shows '*' instead of hostname. I can ping my hostname on the same machine without any error though.
Is this beacuse of nsswitch.conf

hosts : files mymachines myhostname resolve [!UNAVAIL= return] dns

/etc/hosts looks like this

# Static table lookup for hostnames.
# See hosts(5) for details.
127.0.0.1       localhost
::1             localhost
127.0.1.1       alkalimetals.localdomain   alkalimetals

Last edited by Bluboy234 (2020-06-10 05:16:53)

Offline

#2 2020-06-10 05:49:41

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,791

Re: Hostname is shown as '*' instead of true hostname on connected network

Netctl announces the hostname (via dhcpcd) but your phone probably only resolves the domain name from https://wiki.archlinux.org/index.php/Sa … host_names or https://wiki.archlinux.org/index.php/Avahi

Offline

#3 2020-06-10 05:57:13

Bluboy234
Member
Registered: 2020-06-10
Posts: 15

Re: Hostname is shown as '*' instead of true hostname on connected network

My /etc/dhcpcd.conf is still commented. Isn't this cause of issue?

Offline

#4 2020-06-10 05:59:55

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,791

Re: Hostname is shown as '*' instead of true hostname on connected network

No.

What does the netctl profile look like?
Static or dynamic IP?

If it's a dynamic IP, it will be obtained through dhcpcd and that will promote the hostname by default.

Offline

#5 2020-06-10 06:04:42

Bluboy234
Member
Registered: 2020-06-10
Posts: 15

Re: Hostname is shown as '*' instead of true hostname on connected network

/etc/netctl/profile

Description='A simple WPA encrypted wireless connection'
Interface=wlp2s0
Connection=wireless

Security=wpa
IP=dhcp

and my /etc/dhcpcd.conf looks like this

# Inform the DHCP server of our hostname for DDNS.
#hostname

Offline

#6 2020-06-10 07:25:50

Bluboy234
Member
Registered: 2020-06-10
Posts: 15

Re: Hostname is shown as '*' instead of true hostname on connected network

So should i comment out my hostname in /etc/dhcpcd.conf

Offline

#7 2020-06-10 10:00:39

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,791

Re: Hostname is shown as '*' instead of true hostname on connected network

Yes (either the default changed at some point or I forgot that I activated it years ago - sorry)

If the hostname still doesn't show up, see the other two links.

Offline

Board footer

Powered by FluxBB