From owner-freebsd-questions@freebsd.org Wed Mar 21 21:30:08 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70BEFF68F3E for ; Wed, 21 Mar 2018 21:30:08 +0000 (UTC) (envelope-from as@cmplx.uk) Received: from jail0199.vps.exonetric.net (jail0199.vps.exonetric.net [IPv6:2a02:1658:1::199:1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "jail0199.vps.exonetric.net", Issuer "jail0199.vps.exonetric.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DB92269714 for ; Wed, 21 Mar 2018 21:30:07 +0000 (UTC) (envelope-from as@cmplx.uk) Received: from jail0199.vps.exonetric.net (jail0199.vps.exonetric.net [178.250.76.108]) by jail0199.vps.exonetric.net (8.15.2/8.15.2) with ESMTPS id w2LLU524074832 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 21 Mar 2018 21:30:05 GMT (envelope-from as@jail0199.vps.exonetric.net) Received: (from as@localhost) by jail0199.vps.exonetric.net (8.15.2/8.15.2/Submit) id w2LLU5dg074831; Wed, 21 Mar 2018 21:30:05 GMT (envelope-from as) Date: Wed, 21 Mar 2018 21:30:05 +0000 From: Anton Shterenlikht To: Manish Jain Cc: Anton Shterenlikht , freebsd-questions@freebsd.org Subject: Re: how to set hostname on a cable line? Message-ID: <20180321213005.GA73927@jail0199.vps.exonetric.net> Mail-Followup-To: Manish Jain , Anton Shterenlikht , freebsd-questions@freebsd.org References: <201803211834.w2LIY9Jh059885@jail0199.vps.exonetric.net> <79cc198c-daa9-1cb2-020f-d11d7d3d396a@yandex.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <79cc198c-daa9-1cb2-020f-d11d7d3d396a@yandex.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Mar 2018 21:30:08 -0000 On Thu, Mar 22, 2018 at 12:47:50AM +0530, Manish Jain wrote: > 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' ? Maybe I didn't explain myself well. I need a fully qualified domain name (FQDM). Perhaps I just cannot have one from a wireless router at home? Anton