From nobody Wed Jun 29 08:19:29 2022 X-Original-To: dev-commits-src-all@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 A309E86016A; Wed, 29 Jun 2022 08:19:31 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LXvWk3Kydz4kNC; Wed, 29 Jun 2022 08:19:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656490771; 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=B4fycg7XBaf4eWH6Q5BdMEcwRTn4tL9vOLm/q6vgz4Q=; b=cNSo7Tfub21Znk2nLapeQ61MmimhFNVQJeGOxEF975N6cxz7FPQaGc8iqRWhSYwsYkqt8W sQ8f52mVPbgpvDne6zYKfxZ4BwC7YDWPFZUEBpvh8lr+PsoA7tABppky992WZskFh884Ad ExjPuzDhrmvPrtQLpyhEaOCU/QP4rHknSgpkPORXg6YDViJaIcCebB33ex0Lqq4GhL/3JK TAia6IyOiGK3fV2NJUFSI7yAWWgzgc/ckIu3MrPsAMNTkMoWPOtuxX3lNAtjOYqxR4eT1T iEl2VUObVDbyfostIPiFu3k+xipPqs9C5wHU/WVcroOcUTP1iAM7ulXE+KmUzw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 872915DE9; Wed, 29 Jun 2022 08:19:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25T8JTOa005354; Wed, 29 Jun 2022 08:19:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25T8JTRd005353; Wed, 29 Jun 2022 08:19:29 GMT (envelope-from git) Date: Wed, 29 Jun 2022 08:19:29 GMT Message-Id: <202206290819.25T8JTRd005353@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: fb40141d2b25 - stable/13 - ifconfig.8: Improve description of the address argument List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fb40141d2b254916ce9563f1de3cf922b4621872 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656490771; 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=B4fycg7XBaf4eWH6Q5BdMEcwRTn4tL9vOLm/q6vgz4Q=; b=Y0U6aZY5z4s3PUa7EkfHVoepRk8gpcDB+EBWLspRCDeoKzdldwDGmKeB00kAyddBc1g7Xg 0T6JDQsbpJQdM6H1kDkhIhkYFpeqjj84WB5yJkylQtKLZc7N9KsFRXCTTCZQT1XoFTGUtm aMOeELAXAzd4wRnIeW2pIJGpyTw//H9cZvyKmWAVR/fVCWaQeUzY3AOF+5Tq1UUkVWjGj3 ETpHL4Y7VnRQjbgQ8/BfYHWBy/G9RsqyVhAsHtGo8LMuxB1MB9PwS1FWOcW/lLiYutbLsz 0eCuQDSfl/60/tqBmWJei1F7GlHPCL+jw1p+VmRPqGMxRyeTFTDCHSzSY0tT3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656490771; a=rsa-sha256; cv=none; b=ygje72PHf0kR61V5rm1pS0BkP2MngiHyNH/QlfHoqBqVh5QP/jRvF/KQZcMZP/sGR9sSuq rXzEi9kjbgB1QQGina/q/2kQ1qL9csXPQlV5BhGyGOyDB/JMOZ4m7IjXREyI0p7VlwHABr ou4QdXcLReLNh07nXE0NlakKJ2zHYHcRLVHvUO1ZyoAqJqGC+oB35gD1/tdsVC3hWHtn3E upAR+6IcrTI8jogKsxCvpXx6SjtzrWpukZYVV7BL5mMEGOFes0NfLdhcREdTDZNZ6gvXIZ Corr6D8FqTkjDw/6V3RDgmLsk8yGa587kzvNPdg1EAg1Mds6kQPRQ+SMoN6cpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=fb40141d2b254916ce9563f1de3cf922b4621872 commit fb40141d2b254916ce9563f1de3cf922b4621872 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-03-31 09:28:41 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2022-06-29 08:15:11 +0000 ifconfig.8: Improve description of the address argument - Split paragraphs for clarity. - Add an example of setting a random MAC address. MFC after: 2 weeks (cherry picked from commit 3049aac91b91a119ff3cdc09c90c501873415f97) --- sbin/ifconfig/ifconfig.8 | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index 1edcc1b35e09..f039cd0c855d 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -270,7 +270,7 @@ That is, one can specify an address like .Li 192.168.0.1/16 . .Pp For the -.Dq inet6 +.Cm inet6 family, it is also possible to specify the prefix length using the slash notation, like .Li ::1/128 . @@ -299,20 +299,23 @@ parameter below for more information. .\" count out long strings of digits in network byte order. .Pp The link-level -.Pq Dq link +.Pq Cm link address is specified as a series of colon-separated hex digits. This can be used to, for example, set a new MAC address on an Ethernet interface, though the mechanism used is not Ethernet specific. +.Pp Use the -.Pq Dq random +.Cm random keyword to set a randomly generated MAC address. A randomly-generated MAC address might be the same as one already in use in the network. Such duplications are extremely unlikely. +.Pp If the interface is already -up when this option is used, it will be briefly brought down and +up when the link-level address is modified, +it will be briefly brought down and then brought back up again in order to ensure that the receive filter in the underlying Ethernet hardware is properly reprogrammed. .It Ar address_family @@ -3149,6 +3152,9 @@ Display inet and inet6 address subnet masks in CIDR notation .Pp Display interfaces that are up with the exception of loopback .Dl # ifconfig -a -u -G lo +.Pp +Set a randomly-generated MAC address on tap0: +.Dl # ifconfig tap0 ether random .Sh DIAGNOSTICS Messages indicating the specified interface does not exist, the requested address is unknown, or the user is not privileged and