From nobody Thu May 1 12:18:36 2025 X-Original-To: dev-commits-src-branches@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 4ZpCl12KKKz5v5TN; Thu, 01 May 2025 12:18:37 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZpCl04sm9z3wZf; Thu, 01 May 2025 12:18:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746101916; 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=CuDfDZP/1BMkFvILNEInaNXHPC4gGKbmaB77Jb8JsMY=; b=INU2nz5VerIAJ6Pnr0ZI8OJNlXoCvG4Nulz0I9ehGtFg0b5T5av1S/tNZ5SWlh1w3ISp5u lNNQ3dCS8fi6lisc5P/dPhs/bsPH0ugnYJN1kC9aMlFar92zdYVWTMgvuPzTHkkbQZAqtN S4tzqkCy1A4PUU4TX8otW5XUJnEq0xemfORrgvf041We6FNbhN4Zpi3Odk5zxyBhIq2IAH uU2SjPKQkFTH/OYkIS1nqT+hmq9gPkZUoBLf7NPAuGfPIePJztwdOrFaOHEUcTxLubpdGR OiXY7spPxH6b0udNaK4XsszHoLOJkiE9hUMLL9KUcLxeVqWAFE1XKdVNlF7h1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746101916; 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=CuDfDZP/1BMkFvILNEInaNXHPC4gGKbmaB77Jb8JsMY=; b=qRCuvdSBKNibyBCnxZgv+wu4uCJWvfbMMEzHdOFtjduKiV0emzp/Q5JeybVsO28pBnAXxW A8Uq2waLPt5MdtR8XWjiGoVzdS6IaUSAPGBCHKblbed8IJkLulhh1YuR1L9sU/bNkFLUCC jbHv3ugyDCcrGsgMMrurN73/P5etsm1C2VdqGLc7u+grGoXtYDI08UV4g/pHIzHJrmdCof oUZDMxSbd/i9cMvJCX0Mrep0LNDfgtRz7scOsUabm1pPQmIyNFz/7LajxpSPKhllHqmQtu uk7DH0XBPUXNu6kQFo6O+TQEJnpf+wnSuT8oBaJwGmosNId/79Ul5IkimLyJug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746101916; a=rsa-sha256; cv=none; b=tsytkxdYQuwZgSOfhkQ+Tt40LBcu7P8IO1FyoizazXPiObJZKK86WWPchdTLfge5mZTUWY wweasVRRL2+8CAoOeLgOwMlriTf7Oino1y6OpnhJ8GbfeZqh5RlytNSyPMIFJS3DgSyFNM Hmjz2AQtOkOsYBhGm7nc4+n9gqAPEJHqPa1fw9qIdZhXObJMlrRZNVhSeJ7pLn9v4H8sgW 2VrRAJD0auhD32JFR8TpFv1jkEqNg/JRszml8744z3i1F7N7EiM0RoGz7V/OxaPWaUv+lb gjbhi1XLOojD+jFT0ry32efkpFZcI/A4T7pyeU4mAFWRJ2IC7//y42L9eLFv4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4ZpCl043cyzC5C; Thu, 01 May 2025 12:18:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 541CIawc010661; Thu, 1 May 2025 12:18:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 541CIa5k010658; Thu, 1 May 2025 12:18:36 GMT (envelope-from git) Date: Thu, 1 May 2025 12:18:36 GMT Message-Id: <202505011218.541CIa5k010658@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: 72f62f3367c0 - stable/14 - networking.7: Clarifications List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 72f62f3367c0103d5ade9d0c9f48f8e230e0ab20 Auto-Submitted: auto-generated The branch stable/14 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=72f62f3367c0103d5ade9d0c9f48f8e230e0ab20 commit 72f62f3367c0103d5ade9d0c9f48f8e230e0ab20 Author: Alexander Ziaee AuthorDate: 2025-02-19 16:46:04 +0000 Commit: Alexander Ziaee CommitDate: 2025-05-01 12:18:16 +0000 networking.7: Clarifications + standardize my license formatting with style guides + remove loading now-automatically loaded last-gen tethering driver + show contemporary internal hardware drivers for examples + tweak example language to hopefully improve clarity MFC after: 3 days Reviewed by: adrian, mhorne, Quentin Thebault Approved by: mhorne (mentor) Differential Revision: https://reviews.freebsd.org/D49762 (cherry picked from commit 70b66cf804345902bb5baadd27448c4bf5251552) --- share/man/man7/networking.7 | 48 ++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/share/man/man7/networking.7 b/share/man/man7/networking.7 index acd61f2864a7..2174577eb6a3 100644 --- a/share/man/man7/networking.7 +++ b/share/man/man7/networking.7 @@ -1,53 +1,51 @@ -.\"- -.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2024 Alexander Ziaee. Ohio. .\" -.Dd April 17, 2024 -.Dt "NETWORKING" 7 +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd March 21, 2025 +.Dt NETWORKING 7 .Os .Sh NAME .Nm networking , .Nm wifi .Nd quickstart guide to connecting to a network .Sh DESCRIPTION -In the following examples, it is assumed that we are connecting to Ethernet -with the first interface found by the -.Xr em 4 +In the following examples, it is assumed that +we are connecting to Ethernet with the first interface found by the +.Xr ix 4 driver, and Wi-Fi with the first interface found by the -.Xr iwn 4 +.Xr iwlwifi 4 driver, though your hardware will vary. .Sh EXAMPLES .Bl -tag -width 0n -.It Sy Connecting to an Ethernet network with DHCP: -.Bd -literal -offset 2n -.Ic # dhclient em0 -.Ed -.It Sy Connecting to a cellular network with USB tethering: +.It Sy Example 1: Connecting to an Ethernet network with DHCP .Pp -Load the USB tethering driver, -.Xr urndis 4 : +Ask for a DHCP lease on the first Intel 10Gb Ethernet interface: .Bd -literal -offset 2n -.Ic # kldload urndis +.Ic # dhclient ix0 .Ed +.It Sy Example 2: Connecting to a cellular network with USB tethering .Pp -Ask for a DHCP lease on the USB tethering interface: +Ask for a DHCP lease on the first USB tethering interface: .Bd -literal -offset 2n .Ic # dhclient ue0 .Ed -.It Sy Connecting to a Wi-Fi network: +.It Sy Example 3: Connecting to a Wi-Fi network .Pp Identify your Wi-Fi hardware: .Bd -literal -offset 2n .Ic % sysctl net.wlan.devices .Ed .Pp -Configure your Wi-Fi hardware as wlan0 interface: +Create the +.Sy wlan0 +interface with the first Intel Wi-Fi adapter: .Bd -literal -offset 2n -.Ic # sysrc wlans_iwn0="wlan0" +.Ic # sysrc wlans_iwlwifi0="wlan0" .Ed .Pp -Set that interface to negotiate a DHCP lease with +Set that interface to ask for a DHCP lease with .Xr wpa_supplicant 8 : .Bd -literal -offset 2n .Ic # sysrc ifconfig_wlan0="WPA SYNCDHCP" @@ -55,6 +53,7 @@ Set that interface to negotiate a DHCP lease with .Pp Enter the details of the Wi-Fi network: .Bd -literal -offset 2n +.Ic # cd /etc/ .Ic # wpa_passphrase \(dqmyssid\(dq \(dqmypassphrase\(dq >> wpa_supplicant.conf .Ed .Pp @@ -62,12 +61,11 @@ Restart the network interface daemon: .Bd -literal -offset 2n .Ic # service netif restart .Ed -.Pp -.It Sy Scanning for Wi-Fi networks: +.It Sy Example 4: Scanning for Wi-Fi networks .Bd -literal -offset 2n .Ic % ifconfig wlan0 scan .Ed -.It Sy Airplane mode: +.It Sy Example 5: Airplane mode .Bd -literal -offset 2n .Ic # service netif stop .Ed @@ -91,3 +89,5 @@ will need to be escaped for commonly using .Ql \e , see the manual page for your shell for more details. +.Pp +Stopping the network interface service also stops internal networking.