From owner-freebsd-questions@freebsd.org Tue Feb 19 17:55:49 2019 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 BED9B14F6F79 for ; Tue, 19 Feb 2019 17:55:49 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from be-well.ilk.org (be-well.ilk.org [23.30.133.173]) by mx1.freebsd.org (Postfix) with ESMTP id 396D2699B7 for ; Tue, 19 Feb 2019 17:55:49 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: by be-well.ilk.org (Postfix, from userid 1147) id 7358A33C58; Tue, 19 Feb 2019 12:55:39 -0500 (EST) From: Lowell Gilbert To: toogley Cc: freebsd-questions@freebsd.org Subject: Re: static internal IP address as default networking config; ONLY if that fails, try to get an IP address via dhcp? References: <880880467.23843.1550398783520@office.mailbox.org> Reply-To: freebsd-questions@freebsd.org Date: Tue, 19 Feb 2019 12:55:39 -0500 In-Reply-To: <880880467.23843.1550398783520@office.mailbox.org> (toogley's message of "Sun, 17 Feb 2019 11:19:43 +0100 (CET)") Message-ID: <44h8czu0h0.fsf@be-well.ilk.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 396D2699B7 X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [3.71 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[freebsd-questions@freebsd.org]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.41)[0.410,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[ilk.org]; AUTH_NA(1.00)[]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; NEURAL_SPAM_MEDIUM(0.98)[0.979,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: be-well.ilk.org]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_SPAM_LONG(0.41)[0.414,0]; R_SPF_NA(0.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:7922, ipnet:23.30.0.0/15, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.08)[ip: (0.09), ipnet: 23.30.0.0/15(0.07), asn: 7922(-0.52), country: US(-0.07)]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2019 17:55:49 -0000 toogley writes: > Hey, > > i know how i can configure my FreeBSD machine to use a static internal > ip addresss or how to get one via dhcp. As i sometimes change the > netmask of my internal network, the networking via static ip addresses > doesn't work anymore. > > ==> Is it possible to have a static network configuration as "default > networking method" and ONLY if that fails, try to get one via dhcp? There's no obvious definition of a static address "failing." You would need to define that yourself, and implement a startup script that checks for whatever you come up with, then starts dhcpc if it doesn't see what it wants. You could use something like connectivity to a particular host, for example. Personally, I'd just let the FreeBSD machine use DHCP all the time if I possibly could. Be well.