From nobody Mon Apr 08 07:18:06 2024 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VCgRX6tRxz5GPpZ for ; Mon, 8 Apr 2024 07:18:16 +0000 (UTC) (envelope-from list_freebsd@bluerosetech.com) Received: from echo.brtsvcs.net (echo.brtsvcs.net [IPv6:2607:f740:c::4ae]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4VCgRX4gvxz4DHV for ; Mon, 8 Apr 2024 07:18:16 +0000 (UTC) (envelope-from list_freebsd@bluerosetech.com) Authentication-Results: mx1.freebsd.org; none Received: from chombo.houseloki.net (65-100-43-2.dia.static.qwest.net [65.100.43.2]) by echo.brtsvcs.net (Postfix) with ESMTPS id 0B87F38D00; Mon, 08 Apr 2024 07:18:08 +0000 (UTC) Received: from [10.26.25.100] (ivy.pas.ds.pilgrimaccounting.com [10.26.25.100]) by chombo.houseloki.net (Postfix) with ESMTPSA id D27073F099; Mon, 8 Apr 2024 00:18:06 -0700 (PDT) Message-ID: <8bd004ff-f4a1-8cf4-dc90-a95328ff5ec9@bluerosetech.com> Date: Mon, 8 Apr 2024 00:18:06 -0700 List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: How to ignore a default route for one of the dhclient-ed interface? To: Anton Yudin , freebsd-net@freebsd.org References: Content-Language: en-US From: list_freebsd@bluerosetech.com In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36236, ipnet:2607:f740:c::/48, country:US] X-Rspamd-Queue-Id: 4VCgRX4gvxz4DHV On 2024-04-07 20:16, Anton Yudin wrote: >   I'm running a FreeBSD 14 with two interfaces that use DHCP. >   I would like to make one of the interfaces to never set the default > route. >   Right now the first interface to be fully up sets the default route. > >   I tried to set the following in /etc/dhclient.conf > ---------------8<------------------------ >   interface "wan1" { >       ignore routers; >   } > ---------------8<------------------------ >   but the default route still gets set. [...] > Is there a better way of doing this? What happens if you explicitly set the request statement for each of the interfaces, including routers in only the one you want as your gateway? "By default, the DHCPv4 client requests the subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers and host-name options" --dhclient.conf(5)