From nobody Wed May 20 20:58:53 2026 X-Original-To: dev-commits-src-main@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 4gLP656lzSz6fPlf for ; Wed, 20 May 2026 20:58:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLP654N1nz41tn for ; Wed, 20 May 2026 20:58:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779310733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sCcKIMg3fKKxtnIz1zerKGPnAc/ytNgKhkNYVn+BadM=; b=sZxlcPweCFoHzXTNfVO2+aBp0sfuhZyM9b20wMcmmaf8yMWZwLgN9cGqyzTsNbeyNe+FqS mBSVV7bTT1WauNBoo6kD0b9gXej1s+1ysNIKJt6TLFP7vTj8KRXGYs+Yjbjm3vwAU7p9vp Bng5PUou3Ah/zDz+c4mIxTlIxakQJvgtCAGMYT+g6sNo/xS41SwgwvMGpdaZAfENmR4Bap +qv3PyGYvjLY0GDDecQ88q+3SW0owQExOi6eYdVkev56KHaxmTINZIoJs/SwoQ7lX38eAP vuxWY4KiHUntUfFaPt+wL0oyG0/G5pM4mxYxVB4rMKO6H8xmxkfSbJew6oN1Ng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779310733; a=rsa-sha256; cv=none; b=RkLl94sYqwtJahU/bS9yoFA0knZM6U3VT0cN77MihmyyV12y7qTJPpOz6RTEYcg6fJ0orU g6eq4rZE8fe4pCtTPw17RohqU39lRNKFulI+ycJaZHxfjJjdYZNcXC5efNWsAuigNOiDVB dkYrkBKjFnld8ZQU3MKT1/fUS4M8WzbtQUUP5yAFAfx2ivW9h4tJObMJLpq2TLz2KbzN3y e1aU6VLF4vABtmuC2ELdbXTpNY2PkKN9o6I52esF/dDgvUHwHz83KtBlykUy70dWJrL6le Mw4pbMyMGkgCVwyQScd6yA0w4lUd5ONYmAU0XFEBwVdrQPs7ij6dzZlY1+jFAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779310733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sCcKIMg3fKKxtnIz1zerKGPnAc/ytNgKhkNYVn+BadM=; b=U3R/xtS7tVv549ujrKOGe5RXd69flNsptIO8jjGQqbHPxVJX0wX1dZVN4bxAaQ0w1BwTdK U2QDHLC6pwfHEfdRhfMAwoCzqwKx8utLj/dyYHaTkBcFzfF0SbLl5ciN7i0WuRSM02+NTF GMNto8MQ0aDOp9eKboO7JickwuPDwgoNJQGBO5to8T+hN6sPPRwllkPw0uZxM994Rfjg3j ltz579AJCHL/IwYGMwg3lhyHZrAHwDx0HVg35Kixzo2a+b2vvwUgIgsTteTre/AnA2zU/R nlmdQtkgVBP2UKFchta01f7J8CuFcqVxs0ZN8Mnm64M1VapBJUNrqgMffwuvaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLP653VJ0z1GWS for ; Wed, 20 May 2026 20:58:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f1cf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 20:58:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: d87e5b28b763 - main - route.8: Describe metric modifier List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pouria X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d87e5b28b763f1f0d73fd0ba0ce7f4eee30a8fca Auto-Submitted: auto-generated Date: Wed, 20 May 2026 20:58:53 +0000 Message-Id: <6a0e208d.3f1cf.2f6952a6@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=d87e5b28b763f1f0d73fd0ba0ce7f4eee30a8fca commit d87e5b28b763f1f0d73fd0ba0ce7f4eee30a8fca Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-05-15 22:02:09 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-05-20 20:55:09 +0000 route.8: Describe metric modifier Describe `-metric` argument in the route manual. Discussed with: ziaee Differential Revision: https://reviews.freebsd.org/D57025 --- sbin/route/route.8 | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/sbin/route/route.8 b/sbin/route/route.8 index 5cb16120c8d8..424b005ca984 100644 --- a/sbin/route/route.8 +++ b/sbin/route/route.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 16, 2026 +.Dd May 17, 2026 .Dt ROUTE 8 .Os .Sh NAME @@ -308,6 +308,26 @@ and .Dq Fl gateway Ar 3fff::2 Fl weight Ar 200 will make the nexthop 3fff::2 twice as likely to be chosen as 3fff::1. .Pp +The +.Fl metric +option sets the numeric cost associated with a route nexthop. +The lowest metric is always preferred and routes with higher metric +values are only used if lower-metric routes become unavailable. +This allows routes to establish primary and backup nexthops without +removing the primary. +The default value for +.Fl metric +is 1 when not specified. +When multiple routes to the same destination have identical metrics, the +.Fl weight +option determines which nexthop is selected for ECMP. +.Pp +For example, a destination with two nexthops defined as +.Dq Fl gateway Ar 3fff::1 Fl metric Ar 1 +and +.Dq Fl gateway Ar 3fff::2 Fl metric Ar 2 +will cause the nexthop 3fff::1 to be selected. +.Pp Routes have associated flags which influence operation of the protocols when sending to destinations matched by the routes. These flags may be set (or sometimes cleared)