From owner-freebsd-questions@freebsd.org Sun Feb 28 16:05:45 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18296AB73DB for ; Sun, 28 Feb 2016 16:05:45 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D735E12FB for ; Sun, 28 Feb 2016 16:05:44 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-66-139.dynamic.qsc.de [92.195.66.139]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id 52F25277B3; Sun, 28 Feb 2016 17:05:35 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id u1SG5Y07002116; Sun, 28 Feb 2016 17:05:34 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Sun, 28 Feb 2016 17:05:34 +0100 From: Polytropon To: JosC Cc: "freebsd-questions@FreeBSD.org" Subject: Re: Hosts Message-Id: <20160228170534.f41eaef7.freebsd@edvax.de> In-Reply-To: <56D2C3E0.8030406@cloudzeeland.nl> References: <56D2C3E0.8030406@cloudzeeland.nl> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2016 16:05:45 -0000 On Sun, 28 Feb 2016 10:54:40 +0100, JosC wrote: > Is there a wayI can link domain names to MAC addresses instead to IP > addresses? No, host names are bound to IP (as MAC addresses are a different layer). > Used to give some internal harware fixed ip's and described that in my > /etc/hosts file, but as for some I use DHCP, I cannot use that anymore. You can use a "cascaded approach". If you use DHCP to provide IP addresses, provide them on the basis of MAC addresses. You can do that with the dhcpd.conf configuration file: host domain1 { hardware ethernet 00:12:34:56:78:90; fixed-address 192.168.1.101; } host domain2 { hardware ethernet aa:bb:cc:dd:ee:ff; fixed-address 192.168.1.102; } Then you can use those addresses in the hosts configuration file: 192.168.1.101 domain1.example.com domain1 192.168.1.101 domain1.example.com. 192.168.1.102 domain2.example.com domain2 192.168.1.102 domain2.example.com. So the MAC 00:12:34:56:78:90 will be associated with domain1.example.com, and aa:bb:cc:dd:ee:ff with domain2.example.com. I hope I didn't misinterpret your question. Is that what you were searching for? -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...