From owner-freebsd-questions@freebsd.org Wed Mar 21 19:18: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 11241F5EE72 for ; Wed, 21 Mar 2018 19:18:08 +0000 (UTC) (envelope-from jude.obscure@yandex.com) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::601]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8FFEE82A8B for ; Wed, 21 Mar 2018 19:18:07 +0000 (UTC) (envelope-from jude.obscure@yandex.com) Received: from mxback16j.mail.yandex.net (mxback16j.mail.yandex.net [IPv6:2a02:6b8:0:1619::92]) by forward101o.mail.yandex.net (Yandex) with ESMTP id 98DBD13427FF; Wed, 21 Mar 2018 22:18:04 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback16j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id T9M96JoO0I-I34Olnnb; Wed, 21 Mar 2018 22:18:04 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1521659884; bh=X6a/v945YS04gpEleNPpp7dW1pGk6tiVQMoLJGUcTOY=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=Yz6KtUdg0YcVqUoZm5WXojEgWPBS2lyBz5NiB1y4xBj5G/9K1TyW0OmM28dtaBSII F4yVPEhw1qwA+MbqN6Ot2Ueu8b58PY+/z+tlFXHLJizPzoQ16NiIkDq0MVndd2td/I DtwcjFznBu1xwUWT/xT5+YYvNAVQoQ6EIeZ+YGfQ= Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id DIGBxvjhcc-I1Xux2cc; Wed, 21 Mar 2018 22:18:02 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1521659882; bh=X6a/v945YS04gpEleNPpp7dW1pGk6tiVQMoLJGUcTOY=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=fukvMC2VXD4mKl7+6kkRNVvcFLSArxhPqU1aK4VGjVcU4yA5kjA8X67roEG6ey7gA 1wFQy8PzFAcTtBK2O73t1xjvPZyYafJJAkmYftbx0ElkduPTlShvYjubyXAioEHWUV jTH6a+8iI+icPX6QAeL0sAwSIoWl00AEDkuLzI2c= Authentication-Results: smtp2j.mail.yandex.net; dkim=pass header.i=@yandex.com Subject: Re: how to set hostname on a cable line? To: Anton Shterenlikht , freebsd-questions@freebsd.org References: <201803211834.w2LIY9Jh059885@jail0199.vps.exonetric.net> From: Manish Jain Message-ID: <79cc198c-daa9-1cb2-020f-d11d7d3d396a@yandex.com> Date: Thu, 22 Mar 2018 00:47:50 +0530 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <201803211834.w2LIY9Jh059885@jail0199.vps.exonetric.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit 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 19:18:08 -0000 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