From nobody Thu Mar 31 09:45:01 2022 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 6863E1A4CABB; Thu, 31 Mar 2022 09:45:02 +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 4KTdgy1v73z4rmg; Thu, 31 Mar 2022 09:45:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648719902; 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=HohhG7EZC9IYKGq8bll5ArCE3nvuukSn/26JKN7bV1c=; b=ilw8LeX0kiaRitFq61JaFpO2gC4SgukVYB2d1roIeMgUu86YMl3fcMbTIaNwWtkPTXEwYS KTgONryKNUiBUnS2D5PYvaRQghQ/CnF5ttmPXMsIP4LdyqJP43ydqncA7K47Em0h8pDtVT vvasZFoRHFUjouiv5yBpdLHl1KGlURGbchWj0jWQ81qzryremnTkYuFp7+qU6aGnUrVPHG U3ZclnC7oYy+6HIBmCE0O+S0TelUjkq+Cc4DhCL9yGJBuEZBN6OBCdDw16KWMrUlgqSvkq C6nDZHLuIG4XIEXs6npc/oY/XSGvmin4oc2cITMbnOzLv3cEiwvhiJyGDUz6VA== 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 07A6825733; Thu, 31 Mar 2022 09:45:02 +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 22V9j1Xb082467; Thu, 31 Mar 2022 09:45:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22V9j15P082466; Thu, 31 Mar 2022 09:45:01 GMT (envelope-from git) Date: Thu, 31 Mar 2022 09:45:01 GMT Message-Id: <202203310945.22V9j15P082466@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 3049aac91b91 - main - ifconfig.8: Improve description of the address argument 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 3049aac91b91a119ff3cdc09c90c501873415f97 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648719902; 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=HohhG7EZC9IYKGq8bll5ArCE3nvuukSn/26JKN7bV1c=; b=LSv/rUmpLhTo/pKJO3/a0TCC9zz7LdR/4yeYjvm1YQDaQZS+acqpzSaAf5bAxqBi1eSiIO qtDZILiIQ7L6FMrlYWSr27j6HfThBdJ0cJVo+2WO23NoGG5yxod9KVumb6fQF1V6S5F2kf mdg4C41GYWRfra4psssM+Ycf/zYHZYEb3IjsGtAl3xFsAIYJc4n+xjH6f40Zg0Qm8iafpP 88C4Xq1bCJquf2sieBNny8EnUY0/dlyltyYEWrOp3BKDvv873uRlcDBdxbntJcp/LPnt5r p1/96feiEEw+SLw54HoXHo36vmb0nAE/N52DXShD7RbyZxXtYB4sQyWod+gFCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648719902; a=rsa-sha256; cv=none; b=eUAEdSETnz8q3aYg6GitN+cS9gsTtGUZixAu02U6l6N3gU3fIctCyShP50OSliTAyjNkKR Mntyenp6oErxTxRBXCzgRwd61IBmgAxgrqUmmQvEsq/MfHSzp0cipeBL3AAnZaulnDmSX6 6OX8zdYptSyvlqplbcm3qQRN871obVoJ/kn9KwzqXByVO6pSBrnevZNGTgOo2HfUET3xIf JYzWbCMNGPGoq30PuKi8ymijhIH11wdl10wT+igkd5kwTGoavoAlAHRyR4s3ZDBhQdswQW Wqx7EHIDGZ/rNM9CpNaTlbbEtpeDSaVe5q5ROPRt/5gxKZa9+17eOBHfJtj+ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=3049aac91b91a119ff3cdc09c90c501873415f97 commit 3049aac91b91a119ff3cdc09c90c501873415f97 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-03-31 09:28:41 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2022-03-31 09:43:18 +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 --- 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 9fede254314c..9c6e280dc954 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