Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Mar 2018 00:47:50 +0530
From:      Manish Jain <jude.obscure@yandex.com>
To:        Anton Shterenlikht <as@cmplx.uk>, freebsd-questions@freebsd.org
Subject:   Re: how to set hostname on a cable line?
Message-ID:  <79cc198c-daa9-1cb2-020f-d11d7d3d396a@yandex.com>
In-Reply-To: <201803211834.w2LIY9Jh059885@jail0199.vps.exonetric.net>
References:  <201803211834.w2LIY9Jh059885@jail0199.vps.exonetric.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 03/22/18 00:04, Anton Shterenlikht wrote:
> I cannot seem to set hostname
> correctly on a home laptop,
> which has a wireless connection
> to a cable router.
> 
> How do I do it?
> 
> I have
> 
> hostname=""
> ifconfig_wlan0="SYNCDHCP WPA"
> 
> in /etc/rc.conf
> 
> According to rc.conf(5):
> 
>                   If dhclient(8) is used to set the hostname via DHCP, this
>                   variable should be set to an empty string.
> 
> But I still get empty hostname after boot:
> 
> # hostname
> 
> #
> 
> # cat /var/db/dhclient.leases.wlan0
> lease {
>    interface "wlan0";
>    fixed-address 192.168.1.104;
>    next-server 192.168.1.1;
>    option subnet-mask 255.255.255.0;
>    option routers 192.168.1.1;
>    option domain-name-servers 194.168.4.100,194.168.8.100;
>    option host-name "00215c5068c3";
>    option domain-name "cable.virginmedia.net";
>    option dhcp-lease-time 86400;
>    option dhcp-message-type 5;
>    option dhcp-server-identifier 192.168.1.1;
>    option dhcp-renewal-time 43200;
>    option dhcp-rebinding-time 75600;
>    renew 4 2018/3/22 07:21:14;
>    rebind 4 2018/3/22 16:21:14;
>    expire 4 2018/3/22 19:21:14;
> }
> 
> # cat /etc/resolv.conf
> # Generated by resolvconf
> search cable.virginmedia.net
> nameserver 194.168.4.100
> nameserver 194.168.8.100
> 
> 
> Does that help me?
> 
> I cannot run MPI programs without having a correct
> hostname, i.e. I should be able to do ssh `hostname`.
> 
> What am I missing?
> 
> Thanks
> 
> Anton


Have you tried setting the hostname with 'bsdconfig networking' ?

-- 
Manish Jain



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?79cc198c-daa9-1cb2-020f-d11d7d3d396a>