Hostname does not show up in router?
There are two machines:
Ubuntu Desktop (15.04) which connect to
WLAN. GetIPfromdhcp server(router).hostnameshows up in the router properly. This machine usesNetwork Manager.Ubuntu Server (14.04) which connect to
WLAN. Has staticIP.hostnameDOES NOT show up in the router at all. This machine DOES NOT useNetwork Manager.
Both machines have been configured to have DNS server. For Ubuntu Desktop DNS Server is on 127.0.1.1 and for Ubuntu Server is on 127.0.0.1. Both machine have hostname file containing their hostname.
I have read almost all posts related to this issue in askubuntu and some other sites, but still no hostname in the router for Ubuntu Server?
/etc/network/interfaces:
auto wlan0
iface wlan0 inet static
wpa-scan_ssid 0
address 192.168.1.200
netmask 255.255.255.0
network 192.0.0.0
broadcast 192.0.0.255
gateway 192.168.1.1
dns-nameserver 192.168.1.1 7 2 Answers
The router gets your hostname from the dhcp request. If the interface is set to static it never makes this request.
A way of getting static ip address and use dhcp requests at the same time is to
- set a static ip address for the machine on the router and
- use dhcp for your interface
auto wlan0 iface wlan0 inet dhcp wpa-scan_ssid 0 hostname myhostname3
You need to install SAMBA...as soon as you do, then your Ubuntu hostname will be resolvable from a Windows or Linux client. This will def work for DHCP configured system...less certain for fixed IP.
3