From nobody Wed Apr 26 20:50:01 2023 X-Original-To: freebsd-questions@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 4Q69x33k3cz47HrM for ; Wed, 26 Apr 2023 20:50:15 +0000 (UTC) (envelope-from tomek@cedro.info) Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q69x30Bs5z4Q80 for ; Wed, 26 Apr 2023 20:50:15 +0000 (UTC) (envelope-from tomek@cedro.info) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cedro.info header.s=google header.b=PEZEh+ug; spf=none (mx1.freebsd.org: domain of tomek@cedro.info has no SPF policy when checking 2607:f8b0:4864:20::b31) smtp.mailfrom=tomek@cedro.info; dmarc=none Received: by mail-yb1-xb31.google.com with SMTP id 3f1490d57ef6-b97ec4bbc5aso5995073276.3 for ; Wed, 26 Apr 2023 13:50:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cedro.info; s=google; t=1682542214; x=1685134214; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=P2zaddbV48G06oWm77s/OC7u9RBcdJMYPXRLkdvYqkI=; b=PEZEh+ug4HQY7/nErrmQ1uOmfczazHHwxtcaGTMF3CHORhD+LmxhnR9RTwFRGocZl4 U86Ff0oZLKkKNwugMVB+AyJEvCceBukdwOZ/TBbb6izgttefmxCRj6SE9uQqZwmzvc5H 6vQMoQ8upllzN/kfm7Y126v0o/WmxAvq9FQh8UKAPAcfJYPJ6TMKTO7fABJJ3LsliaOZ 9EUC+ZJj5UlLSs7l0bgzWSoAk+1aGCcnxbQVdgd72N5Y7ePlSuSpOodKNw8NaBYLW63P mudTeW97OR7Xqwnw8vWy2J63fUt+Nu9fzcZ0VHA8M8IxC362ymLXt2q70BvbMMM9LSzF Izsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682542214; x=1685134214; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=P2zaddbV48G06oWm77s/OC7u9RBcdJMYPXRLkdvYqkI=; b=DoVlGjQLQ3H4C2156Eso1cTlJAZORY9Mpoxw5dIErVdlyltCSvUJXbucGws2JlkTTU avZRBKys6Mdo+MStBzya3mksoO28C3u5uHLq3kYPnU62TO76XnF/OBG+CoJCYZW++xUc PU2GRmQsshBtDArvuCmMbFxc0ufgqymAPlxRwgE7dB1ymauBI60g83cINDe6/gVdTMeJ A1N1jv83swUNf20S/kThlvVV+fOlhwZDCDgJMmbn383KBL9pvIuPnV1fg9bpj8zHhJbZ m4QQNU2CiIbCv267BmWOnuA7jFwJsRQw1w43XQfmTy+LripXMx7vcJUm0sp+NtxXGdX7 ieNg== X-Gm-Message-State: AAQBX9cc5mYNaarBWHSUvzwZpT3L2OZ7YrIKvP+X6HY1xkcSbWdueDJd 7inWYfZUEoiFJGnrkhX7AZjr4AOmrWw2QBOsm/M= X-Google-Smtp-Source: AKy350bNRF1vkdYnzSKNAGQiZ3frBGVgkp6oPPJXqtGlImO0iiBUj9CmYMrWanWNWpFl7GTrkat08w== X-Received: by 2002:a0d:ca92:0:b0:54e:d70a:fa5f with SMTP id m140-20020a0dca92000000b0054ed70afa5fmr13957130ywd.49.1682542214292; Wed, 26 Apr 2023 13:50:14 -0700 (PDT) Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com. [209.85.128.175]) by smtp.gmail.com with ESMTPSA id y195-20020a0dd6cc000000b0054f9a3b60a1sm4442428ywd.33.2023.04.26.13.50.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Apr 2023 13:50:13 -0700 (PDT) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-5529f3b8623so59485637b3.2; Wed, 26 Apr 2023 13:50:13 -0700 (PDT) X-Received: by 2002:a0d:f047:0:b0:54f:d245:a79d with SMTP id z68-20020a0df047000000b0054fd245a79dmr13738060ywe.34.1682542213350; Wed, 26 Apr 2023 13:50:13 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: <1033603027.10889563.1682198162191.JavaMail.zimbra@shaw.ca> In-Reply-To: From: Tomek CEDRO Date: Wed, 26 Apr 2023 22:50:01 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: embedded emulation: bhyve + vt-x on amd fx-8320 To: =?UTF-8?Q?Jan_Jur=C3=A1k?= Cc: Gregory Byshenk , FreeBSD Questions Mailing List , freebsd-emulation@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-1.80 / 15.00]; SUSPICIOUS_RECIPS(1.50)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; R_DKIM_ALLOW(-0.20)[cedro.info:s=google]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::b31:from,209.85.128.175:received]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; DKIM_TRACE(0.00)[cedro.info:+]; RCVD_COUNT_THREE(0.00)[4]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCPT_COUNT_THREE(0.00)[4]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_SOME(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; TAGGED_RCPT(0.00)[]; DMARC_NA(0.00)[cedro.info]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 4Q69x30Bs5z4Q80 X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N On Wed, Apr 26, 2023 at 10:15=E2=80=AFPM Jan Jur=C3=A1k wrote: > answer as usually late, but you can check procesor virtualisation flags w= ith command: > (..) > On Freebsd: > > egrep -woi 'vmx|ept|vpid|npt|tpr_shadow|flexpriority|vnmi|lm|aes' /var/ru= n/dmesg.boot | sort | uniq; egrep -woi 'vmx|lm|aes' /var/run/dmesg.boot | s= ort | uniq > > AES > EPT > LM > VMX > VPID > AES > LM > VMX > > this is for intel, amd has it's own implementation for bot. Basically VMX= is minimum, the extended page support - EPT is second most important not m= inimum but most modern hypervisors like bhyve also need this one. > i believe for amd you are looking for AMD-v SVM but rather verify if corr= ect acronyms. Thanks Jan.. I also found dmidecode very useful to find lots of information about the host hardware.. flags are not there.. just curious why this virtual machine in virtual machine worked on windoze o_O Handle 0x0004, DMI type 4, 42 bytes Processor Information Socket Designation: Socket 942 Type: Central Processor Family: FX Manufacturer: AMD ID: 20 0F 60 00 FF FB 8B 17 Signature: Family 21, Model 2, Stepping 0 Flags: FPU (Floating-point unit on-chip) VME (Virtual mode extension) DE (Debugging extension) PSE (Page size extension) TSC (Time stamp counter) MSR (Model specific registers) PAE (Physical address extension) MCE (Machine check exception) CX8 (CMPXCHG8 instruction supported) APIC (On-chip APIC hardware supported) SEP (Fast system call) MTRR (Memory type range registers) PGE (Page global enable) MCA (Machine check architecture) CMOV (Conditional move instruction supported) PAT (Page attribute table) PSE-36 (36-bit page size extension) CLFSH (CLFLUSH instruction supported) MMX (MMX technology supported) FXSR (FXSAVE and FXSTOR instructions supported) SSE (Streaming SIMD extensions) SSE2 (Streaming SIMD extensions 2) HTT (Multi-threading) Version: AMD FX(tm)-8320 Eight-Core Processor Voltage: 1.4 V External Clock: 200 MHz Max Speed: 3600 MHz Current Speed: 3600 MHz Status: Populated, Enabled Upgrade: Socket AM3 L1 Cache Handle: 0x0005 L2 Cache Handle: 0x0006 L3 Cache Handle: 0x0007 Serial Number: To Be Filled By O.E.M. Asset Tag: To Be Filled By O.E.M. Part Number: To Be Filled By O.E.M. Core Count: 8 Core Enabled: 8 Thread Count: 8 Characteristics: 64-bit capable --=20 CeDeROM, SQ7MHZ, http://www.tomek.cedro.info From nobody Sun Apr 30 06:44:51 2023 X-Original-To: freebsd-questions@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 4Q8Gzy3rVdz48rFW for ; Sun, 30 Apr 2023 06:45:02 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from nightmare.dreamchaser.org (ns.dreamchaser.org [66.109.141.57]) (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 (2048 bits) client-digest SHA256) (Client CN "discoveriesinwood.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8Gzw6BKnz3KWN for ; Sun, 30 Apr 2023 06:45:00 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of freebsd@dreamchaser.org designates 66.109.141.57 as permitted sender) smtp.mailfrom=freebsd@dreamchaser.org; dmarc=none Received: from [192.168.151.122] (breakaway [192.168.151.122]) by nightmare.dreamchaser.org (8.16.1/8.16.1) with ESMTP id 33U6iprX088736 for ; Sun, 30 Apr 2023 00:44:51 -0600 (MDT) (envelope-from freebsd@dreamchaser.org) Message-ID: Date: Sat, 29 Apr 2023 23:44:51 -0700 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 Content-Language: en-US To: FreeBSD Mailing List Reply-To: freebsd@dreamchaser.org From: Gary Aitken Subject: midori fails to start Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.4 (nightmare.dreamchaser.org [192.168.151.101]); Sun, 30 Apr 2023 00:44:51 -0600 (MDT) X-Spamd-Result: default: False [1.53 / 15.00]; NEURAL_SPAM_LONG(0.99)[0.994]; NEURAL_SPAM_MEDIUM(0.99)[0.989]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_SHORT(-0.15)[-0.153]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[dreamchaser.org]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:21947, ipnet:66.109.128.0/19, country:US]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; HAS_REPLYTO(0.00)[freebsd@dreamchaser.org]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; TO_DN_ALL(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4Q8Gzw6BKnz3KWN X-Spamd-Bar: + X-ThisMailContainsUnwantedMimeParts: N Trying midori as a leaner browser on a normally headless machine so I can configure a modem. Installed from pkgs. When I attempt to run it, I get: GLib-CRITICAL g_regex_match_full: assertion 'string != NULL' failed Gtk-WARNING Could not load a pixbuf from /org/gtk/libgtk/icons/16x16/status/open-menu-symbolic.symbolic.png. This may indicate that pixbuf loaders or the mime database could not be found. Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/local/share/icons/Adwaita/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3) Bail out! Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/local/share/icons/Adwaita/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3) Abort trap (core dumped) 12.4 release It seems to run fine on another 12.4 system. The one it fails on was recently upgraded from 12.3; as were pkgs. The file is there and "file" says it is a PNG. Thoughts? Gary From nobody Sun Apr 30 17:45:42 2023 X-Original-To: questions@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 4Q8YfL5rg2z485YT for ; Sun, 30 Apr 2023 17:45:46 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from nightmare.dreamchaser.org (ns.dreamchaser.org [66.109.141.57]) (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 (2048 bits) client-digest SHA256) (Client CN "discoveriesinwood.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8YfK2fMDz3kfQ for ; Sun, 30 Apr 2023 17:45:45 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of freebsd@dreamchaser.org designates 66.109.141.57 as permitted sender) smtp.mailfrom=freebsd@dreamchaser.org; dmarc=none Received: from [192.168.151.122] (breakaway [192.168.151.122]) by nightmare.dreamchaser.org (8.16.1/8.16.1) with ESMTP id 33UHjg70001275 for ; Sun, 30 Apr 2023 11:45:42 -0600 (MDT) (envelope-from freebsd@dreamchaser.org) Message-ID: <62be3192-b032-b790-d7f4-9e7ec41dae39@dreamchaser.org> Date: Sun, 30 Apr 2023 10:45:42 -0700 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 Subject: Re: midori fails to start (solved) Content-Language: en-US To: questions@freebsd.org References: Reply-To: freebsd@dreamchaser.org From: Gary Aitken In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.4 (nightmare.dreamchaser.org [192.168.151.101]); Sun, 30 Apr 2023 11:45:42 -0600 (MDT) X-Spamd-Result: default: False [0.72 / 15.00]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; NEURAL_SPAM_LONG(0.99)[0.994]; NEURAL_HAM_SHORT(-0.97)[-0.969]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[dreamchaser.org]; MLMMJ_DEST(0.00)[questions@freebsd.org]; HAS_REPLYTO(0.00)[freebsd@dreamchaser.org]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:21947, ipnet:66.109.128.0/19, country:US]; MIME_TRACE(0.00)[0:+]; BLOCKLISTDE_FAIL(0.00)[66.109.141.57:server fail]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[] X-Rspamd-Queue-Id: 4Q8YfK2fMDz3kfQ X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N On 4/29/23 23:44, Gary Aitken wrote: > Trying midori as a leaner browser on a normally headless machine so I > can configure a modem.  Installed from pkgs. > When I attempt to run it, I get: > > GLib-CRITICAL g_regex_match_full: assertion 'string != NULL' failed > > Gtk-WARNING  Could not load a pixbuf from >  /org/gtk/libgtk/icons/16x16/status/open-menu-symbolic.symbolic.png. > This may indicate that pixbuf loaders or the mime database >  could not be found. > > Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed > (error == NULL): >  Failed to load >  /usr/local/share/icons/Adwaita/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3) > Bail out! Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): >  Failed to load >  /usr/local/share/icons/Adwaita/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3) > Abort trap (core dumped) > > 12.4 release > > It seems to run fine on another 12.4 system.  The one it fails on was > recently upgraded from 12.3; as were pkgs.  The file is there and "file" > says it is a PNG. > > Thoughts? Not sure what the problem was. I de-installed all pkgs, then reinstalled; now seems to work. May have been some pkgs didn't get updated properly. Gary From nobody Sun Apr 30 19:26:50 2023 X-Original-To: freebsd-questions@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 4Q8bvJ2Wqwz48CBB; Sun, 30 Apr 2023 19:27:08 +0000 (UTC) (envelope-from grahamperrin@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8bvJ22bwz3xs3; Sun, 30 Apr 2023 19:27:08 +0000 (UTC) (envelope-from grahamperrin@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682882828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BTkUC5FW5h8qNu1OxzqdOP6/aFDPedn2xnRR/tJt8M4=; b=e4fSeKGwREL2OrFRIEpXdGGRo3PG3eubKr2ia3GCSL4mvbsGz5XjG6cM9kZWGdZfsNk77n Xln9qHPfoTyB/gUuPKVp7NRT7MCOTRKwq3AKzvBi+gH+CcdothUV9onYQ5Q19bAmlXr2kK J3FsO9NLCtHNVmLAy0XWj9urQZBX8D4eP3X+9Aocpgflbd9Hil9TwlZA68lCzldoC0cEiO 4Hc96PyYxTB2dgcqYywL2yHsf1AkQg2SBXdDEJxsUayxUt3lZRwKvzutpFeW/Bi5o/1znz unXqml4kZKmZy3FOH0i8UUSn9ExO6kolPefe4yfaPERYKUN11oqnRwllx9Dr8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682882828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BTkUC5FW5h8qNu1OxzqdOP6/aFDPedn2xnRR/tJt8M4=; b=FkI0xe8m/zyyH5PxJQ0yiBUFPAoGxkgVt7tODdhy19DT3KYQxpbTilsYPIraP60ajGhZLU Vj4L0dpW8JyyDOTKTqhzrlNtXOiV9Ah6kry2omBVtLxGUTf73YJEJy3gK+zvxFaiiw8wTt ge6FcIXvO9+IaGMeKf3bM9DAVLQTOWAR+9w2bUVT4LvacD4B4eZ/3YYXQo0J1L48amwaxj XFeo2lLsfpL5pIUOUEIDj/LvECiDTHiVdqqDZ3CJiXp4/k6vnKDOTxjN32Nn1NACOW4TUb 5owF6bgd3dut4gkCUXYb+JdLZPuxUITvxkQyRpCZQBzdNSJ8FN0tL6GcN1gKDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682882828; a=rsa-sha256; cv=none; b=lHxe+Yl3loE9bIXt9M+ilRfmn/fBEGt0eUbIXlogkWc/SBnop9RvIT8SWduiSPQXC2C4LK 2xBILJ6p3VS882YVHlp5ZQfmcf1OW1f1/c8UoIrmQRviqL0XMufpylz77IASmkUMZ3UJCP bH8cQU2zM+W0HXnloa3mG+fUK2R6GChlSs8XTCVE6vDVDXm8ctXxGPxaNlEuZnlKp7MyAh IeeySJdK1Jr9wYkMwFBtGltLRRGpFJtlFrzN+oZ9B0xbL1rHQ8zr6vM+kyd6S7LwqBp/8c aobZrOIq+vmr2KMWUEKzu227i9klprcvqmENUBIFiTew/SPoV+1DKlqtoHvAuA== Received: from [IPV6:2001:470:1f1c:a0::2] (tunnel642390-pt.tunnel.tserv1.lon2.ipv6.he.net [IPv6:2001:470:1f1c:a0::2]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: grahamperrin) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q8bv14l1KzP5b; Sun, 30 Apr 2023 19:26:53 +0000 (UTC) (envelope-from grahamperrin@freebsd.org) Message-ID: <226afa3a-114b-6740-36b1-ebfee4931a22@freebsd.org> Date: Sun, 30 Apr 2023 20:26:50 +0100 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: FreeBSD #ai-ml (was: How do I get a new freebsd- mailing list made) Content-Language: en-US From: Graham Perrin To: FreeBSD questions , FreeBSD hackers References: Organization: FreeBSD In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------DgEnRaHtCjPhVpkI5c8BRBjr" X-ThisMailContainsUnwantedMimeParts: N This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------DgEnRaHtCjPhVpkI5c8BRBjr Content-Type: multipart/mixed; boundary="------------8nlAcy0Hzh21SyajiGQ7hT4B"; protected-headers="v1" From: Graham Perrin To: FreeBSD questions , FreeBSD hackers Message-ID: <226afa3a-114b-6740-36b1-ebfee4931a22@freebsd.org> Subject: FreeBSD #ai-ml (was: How do I get a new freebsd- mailing list made) References: In-Reply-To: --------------8nlAcy0Hzh21SyajiGQ7hT4B Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 SSBjYW4gbm8gbG9uZ2VyIGZpbmQgcGFydHMgb2YgdGhpcyB0aHJlYWQgKHNvcnJ5KS4NCg0K Rm9yIHRob3NlIG9mIHlvdSB3aG8gYXJlIGludGVyZXN0ZWQsIHRoZXJlJ3MgYW4gI2FpLW1s IGNoYW5uZWwgaW4gDQpEaXNjb3JkIGZvciBGcmVlQlNEOg0KDQo+ICJBcnRpZmljaWFsIElu dGVsbGlnZW5jZSIgLSAiTWFjaGluZSBMZWFybmluZyIgLSBhbmQgcmVsYXRlZCBjb21wdXRl ciANCj4gc2NpZW5jZXkgdGhpbmdzLg0KDQo= --------------8nlAcy0Hzh21SyajiGQ7hT4B-- --------------DgEnRaHtCjPhVpkI5c8BRBjr Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEEWT/lssMHB+28ly8Kt2dIb0oY1AsFAmROwPoFAwAAAAAACgkQt2dIb0oY1AsO 0BAAnm37CZzPqTeDtk8Dc8aTZu2NA0RFgqaSHgSzyyTDAzobD7eNhuGTgxfb2k29GIgv7hQoYVzE 0Vu2LE9t1xORgrAezb5E2eFzuu4W/EanTYhOdZAxq1hiHBv0SyrCBNzZIo1B6y4H4EjTyBu1V3Hm x+3XEfV6EvJWCwi9aaFwommWVbG/38ew/y0MvWoLZ5Qcp4MuMgFm6bgaNVGQY0SD1DlS/s3uK7JQ 5LRna/hVLCmKu02rpJqrfwj4ABd1QTNIFeCoK415Y9o+9JtC4yXCDwCmAs82exWVI5Ovrj87sAlG vaR3pkSWBAH3fE73UIprAETWaznKjKQlJDiGN+3eC0fliLkCkvLBqkKJnKjxbpFYKs4wnBlqtshH WTca2iWyX4R3b5IzsNYWZatfnVHTWBCMkGcPhlEITe+NmvwkcCssKgoxPjvKP+UJ2FZh4BXj1lLw QkkRT2l0NSUMVX5+O28TugMjNm3zqN57j+G056ostfCFnMjggi6C02y80VxN9I2+Dy0YrwIFEer+ kOhhGmtfn5h3DzVAoj2rILWk0rHxvmRyaFIr909ZNOkcIdjo2SF5XdoUn/ry5/46/8fW7/sU88xx V2VYfkSw6Gyf2il+qzh0BMdxcDYpCJsEySgX31MtdFvRgJSp+OR4X+3cQwqKgZz4mdjHmjBuwLTB wVY= =CNrL -----END PGP SIGNATURE----- --------------DgEnRaHtCjPhVpkI5c8BRBjr-- From nobody Sun Apr 30 18:24:35 2023 X-Original-To: freebsd-questions@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 4Q8tXN6QxKz47sm6 for ; Mon, 1 May 2023 06:26:44 +0000 (UTC) (envelope-from lumiwa@dismail.de) Received: from mx2.dismail.de (mx2.dismail.de [159.69.191.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8tXL68N3z3rSK for ; Mon, 1 May 2023 06:26:42 +0000 (UTC) (envelope-from lumiwa@dismail.de) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=dismail.de header.s=20190914 header.b=rpBXN5yg; spf=pass (mx1.freebsd.org: domain of lumiwa@dismail.de designates 159.69.191.136 as permitted sender) smtp.mailfrom=lumiwa@dismail.de; dmarc=pass (policy=reject) header.from=dismail.de Received: from mx2.dismail.de (localhost [127.0.0.1]) by mx2.dismail.de (OpenSMTPD) with ESMTP id 149978dd for ; Mon, 1 May 2023 08:26:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=date:from :to:subject:message-id:mime-version:content-type :content-transfer-encoding; s=20190914; bh=QadNjRGrIaxeXegyOSQbG m+GB4YK4qWQUrM5N4wfaLY=; b=rpBXN5ygL15Z9BzsADVPUVCnXSkXRMxzcRSXE Oq9ep5DHTInMYam2fhWNf7TmXXH6wu5YudrjV1zynxLF5azBOr081MVR4XpKO2xk j6AxM6f09s9dMcyRDVfOsF8FeXCx1IhHGqTB43gXK09sVB73OFDiw67DkYVJuz4E ZjGldQTzZnX84f3uCdr4h16k237g6DAIrRWHIhJd93+M4KOJ4/PnPtjlKza4QGVo JEb1loj0tnY/xF2K/RxU2X2gL24Y150T7J/ANj9+vefLH6RSQcEbEdbvoEx3JtCw JI+lRtz5WcoCKLEZUBE7+cYETkYvEd/1Kmn4pn6DsdUjoqS3A== Received: from smtp2.dismail.de ( [10.240.26.12]) by mx2.dismail.de (OpenSMTPD) with ESMTP id 02e8bfe4 for ; Mon, 1 May 2023 08:26:39 +0200 (CEST) Received: from smtp2.dismail.de (localhost [127.0.0.1]) by smtp2.dismail.de (OpenSMTPD) with ESMTP id 23f76ba3 for ; Sun, 30 Apr 2023 20:24:38 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id cb2dcbda (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Sun, 30 Apr 2023 20:24:37 +0200 (CEST) Date: Sun, 30 Apr 2023 14:24:35 -0400 From: LuMiWa To: FreeBSD Questions Subject: waist of time Message-ID: <20230430142435.6cbcf729@dismail.de> X-Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.1) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-5.68 / 15.00]; DWL_DNSWL_LOW(-1.00)[dismail.de:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.985]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; DMARC_POLICY_ALLOW(-0.50)[dismail.de,reject]; R_SPF_ALLOW(-0.20)[+ip4:159.69.191.136]; RCVD_IN_DNSWL_MED(-0.20)[159.69.191.136:from]; R_DKIM_ALLOW(-0.20)[dismail.de:s=20190914]; MIME_GOOD(-0.10)[text/plain]; DKIM_TRACE(0.00)[dismail.de:+]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ASN(0.00)[asn:24940, ipnet:159.69.0.0/16, country:DE]; RCVD_COUNT_FIVE(0.00)[5]; ARC_NA(0.00)[]; TO_DN_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4Q8tXL68N3z3rSK X-Spamd-Bar: ----- X-ThisMailContainsUnwantedMimeParts: N Hi! After ugrade FreeBSD 13.1 to 13.2 Release I did update packages. It was ewais of time because lloks like many of the were build on FreeBSD 13.1. It is learning for the future. Thank you. --=20 =E2=80=9CIt is the time you have wasted for your rose that makes your rose = so important.=E2=80=9D =E2=80=95 Antoine de Saint-Exup=C3=A9ry, The Little Prince=20 From nobody Mon May 1 06:53:14 2023 X-Original-To: freebsd-questions@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 4Q8v7251ySz47ty7 for ; Mon, 1 May 2023 06:53:18 +0000 (UTC) (envelope-from thorres@brothersofgrey.net) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.134]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.kundenserver.de", Issuer "Telekom Security ServerID OV Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8v721dsrz3wdc for ; Mon, 1 May 2023 06:53:18 +0000 (UTC) (envelope-from thorres@brothersofgrey.net) Authentication-Results: mx1.freebsd.org; none Received: from localhost ([195.138.46.150]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M1aQN-1pqMT32RFD-0035ds; Mon, 01 May 2023 08:53:14 +0200 Date: Mon, 1 May 2023 08:53:14 +0200 From: Klaus To: LuMiWa Cc: FreeBSD Questions Subject: Re: waist of time Message-ID: References: <20230430142435.6cbcf729@dismail.de> List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230430142435.6cbcf729@dismail.de> X-Provags-ID: V03:K1:xqN1JqbEtY/QviQjwPc4DD7O3UUalDtIscPA9sXEwAo7/gPW9CV AefcmM1nPb5LGpaEdz62y0jBmGsdV13f55A4orzRukLUyBciNg5gYZAPK8wB8IpDtt/CUa8 CZEU7jdRJiGVa05smwjw+sap9NL7IBCZlpK7W0tJvX6qEJj8efTHdF7mPUw3uIzNELVMSUe LRnqMPuvuop2ZFKWZrpJQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:X0v55UJXTNQ=;f9g1NVfUTYAN8ws5CSjAm31QMCL uctpWahOEDfbUZrwxvI7NcZx2J3pqgAA+4rznSl/uEtOtKGcYw2ARnM8jJ3At0n+C2f1wvtOh frdwSbvnZmmcwFAyNf3WoymnwsFjvrKZT+t9Nl+/9aFzoKL8TziLavMUc6EhJokTP6EP+bxww /dLLyMm/r9EhcNMRBoJ0eygwUlho3Q3c1QKO24e9Mlf27AkOjp1//hHAqk5Z5Mp+itVD/QJcN pfLGDuabMZwxBAbr+CnhQgmbCJmZVJs2Y/tyDAmHDpVxtSNLe1tBFPNBKkr8mm3iXYoW0gSBe Mi81uvNsIDTXiLKpyDsC57j03ny4ZYwpHTHtFzIRXUs2UVYHXgMUMD+5IEYO9pQR7tVoOSuoZ GD7sVNbe8IwxChkfXUWeqwNkIPM6AUcCjDnTNF4Kez0cChayPqBehOzuquTdnsv98U9GR9T2m 87CzT3Oo05eNThjKy78N9ah/5XgWMgbItky7UI3R2u6EqI+T0x4hPBwPKlJknsLFdjHXQ5XK5 34fLe6APrytHukv5xJ0Kd+JSave5Qt9eVIitnMsZTJeJj3mZn+vPsMYFw8ZjpapsNAsm3ZaQ9 ekkU+/pq0aaOVAs63dAa0u8mp3tpEuVKvGM7vS2kxT0aXEipr1jjy53ieD3rWM8HDFGn1Ai+F kZsvg3WpGyEQ5OC+aKCMEq2WEGC+xvnVedDKAheQ4A== X-Rspamd-Queue-Id: 4Q8v721dsrz3wdc X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N LuMiWa schrieb am 30.04.2023: > Hi! > > After ugrade FreeBSD 13.1 to 13.2 Release I did update packages. It was > ewais of time because lloks like many of the were build on FreeBSD > 13.1. It is learning for the future. > > Thank you. > > … Hi, just read the documentation: https://docs.freebsd.org/en/books/handbook/cutting-edge/ It says: "packages for users of 13.1 and 13.2 will be built on a server running 13.1, until 13.1 reaches end of life". You could build the packages from the ports. Greetings, Klaus -- PGP/GnuPG: 0x326F6D7B From nobody Mon May 1 07:06:31 2023 X-Original-To: freebsd-questions@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 4Q8vQT032wz47vfb for ; Mon, 1 May 2023 07:06:41 +0000 (UTC) (envelope-from lumiwa@dismail.de) Received: from mx2.dismail.de (mx2.dismail.de [159.69.191.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8vQS5F1Qz3y1L for ; Mon, 1 May 2023 07:06:40 +0000 (UTC) (envelope-from lumiwa@dismail.de) Authentication-Results: mx1.freebsd.org; none Received: from mx2.dismail.de (localhost [127.0.0.1]) by mx2.dismail.de (OpenSMTPD) with ESMTP id c956fc62; Mon, 1 May 2023 09:06:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=20190914; bh=5yNHgDrc chBsaP/E3eE07TP3mRiMI5Tfo7M+nZdMxzw=; b=b4Ad92RJ7TPYFrgQv/bC6gbh dnnIvmTsnPCoQKscuYtb2tUmhfvY5xNFIHcbUGM6kX5YvYlAIUNQopAxFaVExJwz jaoBUehzgyUkWJdJvG0gcf1KLBtT0BR7WPi0fk7ojfSOTF5q9GO5XArWDYORJoH1 zMxiJzELQg00CV3Lrccwls/EmWLgRYOQrXXgk+mTiXoUV7jF6xg4/x5Vvuom/tIZ m5xcPkDfOM2KrHXRBU7blUzzv264AbO7B9w/elmVfclrYPxnNx6BzszmwWlQCjaF 14wSFwWGVrx7Qy4o/Y8rCztxWdIPlldJJrUcMOilFx9MENuEwqqgiJV/b+dIFg== Received: from smtp2.dismail.de ( [10.240.26.12]) by mx2.dismail.de (OpenSMTPD) with ESMTP id 398c5aaa; Mon, 1 May 2023 09:06:38 +0200 (CEST) Received: from smtp2.dismail.de (localhost [127.0.0.1]) by smtp2.dismail.de (OpenSMTPD) with ESMTP id d9a75266; Mon, 1 May 2023 09:06:38 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id ba9fb6b2 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 1 May 2023 09:06:37 +0200 (CEST) Date: Mon, 1 May 2023 03:06:31 -0400 From: LuMiWa To: Klaus Cc: FreeBSD Questions Subject: Re: waist of time Message-ID: <20230501030631.07d29210@dismail.de> In-Reply-To: References: <20230430142435.6cbcf729@dismail.de> X-Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.1) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4Q8vQS5F1Qz3y1L X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:159.69.0.0/16, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Mon, 1 May 2023 08:53:14 +0200 Klaus wrote: > LuMiWa schrieb am 30.04.2023: > > Hi! > >=20 > > After ugrade FreeBSD 13.1 to 13.2 Release I did update packages. It > > was ewais of time because lloks like many of the were build on > > FreeBSD 13.1. It is learning for the future. > >=20 > > Thank you. > >=20 > > =E2=80=A6 >=20 > Hi, >=20 > just read the documentation: > https://docs.freebsd.org/en/books/handbook/cutting-edge/ >=20 > It says: "packages for users of 13.1 and 13.2 will be built on a > server running 13.1, until 13.1 reaches end of life". >=20 > You could build the packages from the ports. >=20 > Greetings, > Klaus >=20 Thank you. I stopped using ports for the reason. Everyting works and I will wait because there are to many ports to be build. --=20 =E2=80=9CIt is the time you have wasted for your rose that makes your rose = so important.=E2=80=9D =E2=80=95 Antoine de Saint-Exup=C3=A9ry, The Little Prince=20 From nobody Mon May 1 21:23:42 2023 X-Original-To: questions@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 4Q9GRh2Bqmz492FM for ; Mon, 1 May 2023 21:24:00 +0000 (UTC) (envelope-from 4250.82.1d50000024908de.d2fb94cbfffa8c15bfd067769ee13af4@email-od.com) Received: from s1-b0c6.socketlabs.email-od.com (s1-b0c6.socketlabs.email-od.com [142.0.176.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9GRg3fkyz3hjh for ; Mon, 1 May 2023 21:23:59 +0000 (UTC) (envelope-from 4250.82.1d50000024908de.d2fb94cbfffa8c15bfd067769ee13af4@email-od.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=email-od.com header.s=dkim header.b=gUNGVCOH; spf=pass (mx1.freebsd.org: domain of 4250.82.1d50000024908de.d2fb94cbfffa8c15bfd067769ee13af4@email-od.com designates 142.0.176.198 as permitted sender) smtp.mailfrom=4250.82.1d50000024908de.d2fb94cbfffa8c15bfd067769ee13af4@email-od.com; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; d=email-od.com;i=@email-od.com;s=dkim; c=relaxed/relaxed; q=dns/txt; t=1682976240; x=1685568240; h=content-transfer-encoding:content-type:mime-version:references:in-reply-to:message-id:subject:to:from:date:x-thread-info:subject:to:from:cc:reply-to; bh=RywTOsTtL1o6OokmN/S63rodVe1D5nvF2LmgsK4kGrg=; b=gUNGVCOHtY18Ud6uT5kWQgg5hR6WHCyCa36ONNBQb0nss+9k1s7uVaJijqSoqH5v3fPv2qttukB55werDexz/TWd2qDf2/kRga0/HHn/m3udhYRIHXceJFWqizqg9l5SFzxYjBUxn2R9+OjdkVME6yTb6KDYbSoRmtu2/Z3dE9U= X-Thread-Info: NDI1MC4xMi4xZDUwMDAwMDI0OTA4ZGUucXVlc3Rpb25zPWZyZWVic2Qub3Jn Received: from r1.us-west-2.aws.in.socketlabs.com (r1.us-west-2.aws.in.socketlabs.com [142.0.190.1]) by mxsg2.email-od.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Mon, 1 May 2023 17:23:45 -0400 Received: from smtp.lan.sohara.org (86-42-20-118-dynamic.b-ras1.bdt.dublin.eircom.net [86.42.20.118]) by r1.us-west-2.aws.in.socketlabs.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Mon, 1 May 2023 17:23:44 -0400 Received: from [192.168.63.1] (helo=steve.lan.sohara.org) by smtp.lan.sohara.org with smtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1ptazm-0009T6-54 for questions@freebsd.org; Mon, 01 May 2023 22:23:42 +0100 Date: Mon, 1 May 2023 22:23:42 +0100 From: Steve O'Hara-Smith To: questions@freebsd.org Subject: Re: waist of time Message-Id: <20230501222342.cc96bf1a5f8afaf62912681d@sohara.org> In-Reply-To: <20230430142435.6cbcf729@dismail.de> References: <20230430142435.6cbcf729@dismail.de> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.1) X-Clacks-Overhead: "GNU Terry Pratchett" List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-2.61 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.91)[-0.914]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[steve@sohara.org,4250.82.1d50000024908de.d2fb94cbfffa8c15bfd067769ee13af4@email-od.com]; R_SPF_ALLOW(-0.20)[+ip4:142.0.176.0/20]; R_DKIM_ALLOW(-0.20)[email-od.com:s=dkim]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[questions@freebsd.org]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[142.0.190.1:received]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[steve@sohara.org,4250.82.1d50000024908de.d2fb94cbfffa8c15bfd067769ee13af4@email-od.com]; ASN(0.00)[asn:7381, ipnet:142.0.176.0/22, country:US]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; MID_RHS_MATCH_FROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[email-od.com:+]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[sohara.org]; DWL_DNSWL_NONE(0.00)[email-od.com:dkim] X-Rspamd-Queue-Id: 4Q9GRg3fkyz3hjh X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N On Sun, 30 Apr 2023 14:24:35 -0400 LuMiWa wrote: > Hi! > > After ugrade FreeBSD 13.1 to 13.2 Release I did update packages. It was > ewais of time because lloks like many of the were build on FreeBSD > 13.1. It is learning for the future. This is normal - FreeBSD maintains ABI compatibility throughout a major release cycle so packages build on N.0 will run on N.m for all m. The reverse might not be true. This ball has occasionally been dropped but very rarely. The general aim is to build packages for a major release on the oldest version that is still supported so that they will run on all supported versions. -- Steve O'Hara-Smith From nobody Tue May 2 01:32:25 2023 X-Original-To: freebsd-questions@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 4Q9MyW4Myyz48G4m for ; Tue, 2 May 2023 01:32:35 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from nightmare.dreamchaser.org (ns.dreamchaser.org [66.109.141.57]) (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 (2048 bits) client-digest SHA256) (Client CN "discoveriesinwood.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9MyV4k6Hz42g0 for ; Tue, 2 May 2023 01:32:34 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of freebsd@dreamchaser.org designates 66.109.141.57 as permitted sender) smtp.mailfrom=freebsd@dreamchaser.org; dmarc=none Received: from [192.168.151.122] (breakaway [192.168.151.122]) by nightmare.dreamchaser.org (8.16.1/8.16.1) with ESMTP id 3421WPMp006165 for ; Mon, 1 May 2023 19:32:26 -0600 (MDT) (envelope-from freebsd@dreamchaser.org) Message-ID: <7c972cc1-3c49-ad0a-b86f-91bd0b978537@dreamchaser.org> Date: Mon, 1 May 2023 18:32:25 -0700 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 Content-Language: en-US To: FreeBSD Mailing List Reply-To: freebsd@dreamchaser.org From: Gary Aitken Subject: PPPoE bridge / vlan? setup help needed Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.4 (nightmare.dreamchaser.org [192.168.151.101]); Mon, 01 May 2023 19:32:26 -0600 (MDT) X-Spamd-Result: default: False [0.59 / 15.00]; NEURAL_SPAM_LONG(1.00)[0.998]; NEURAL_HAM_SHORT(-0.95)[-0.949]; NEURAL_SPAM_MEDIUM(0.84)[0.842]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[dreamchaser.org]; HAS_REPLYTO(0.00)[freebsd@dreamchaser.org]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:21947, ipnet:66.109.128.0/19, country:US]; MIME_TRACE(0.00)[0:+]; TO_DN_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; SUBJECT_HAS_QUESTION(0.00)[] X-Rspamd-Queue-Id: 4Q9MyV4k6Hz42g0 X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N Having trouble setting up a dsl modem as a bridge. ISP info: Fixed IP LLC-Based multiplexing VPI 0 VCI 100 Nowhere in ppp.conf do I see anything about multiplexing mode, vpi, vci, or dsl mode; searching I found something about setting up a vlan and associating it with the hardware interface, but it's not clear to me how. Handbook Ch 33.11 VLANs shows examples using a single number, the vlan tag. Otherwise, nothing I've been able to find about setting up PPPoE bridged says anything about vpi/vci. pp.conf: default: set log Phase tun command ident user-ppp VERSION myisp: set log Phase Chat LCP IPCP CCP Connect DNS tun command set device PPPoE:xl0 set mtu max 1492 set mru max 1492 disable ipv6cp set dial set login set timeout 0 # set speed 20000000 # is speed needed for PPPoE? set authname ******** set authkey ******** set ifaddr my.isp.assigned.ip/29 0.0.0.0 add! default HISADDR # Override existing default route with new one With no vlan set up, I see: Sorry it's long, seems to succeed through SUCCESS but don't know what from the earlier output may be relevant. tun0: Phase: Using interface: tun0 tun0: Command: myisp: set log Phase Chat LCP IPCP CCP Connect DNS tun comman d tun0: Command: myisp: set device PPPoE:xl0 tun0: Command: myisp: set redial 3 0 tun0: Command: myisp: set mtu max 1492 tun0: Command: myisp: set mru max 1492 tun0: Command: myisp: disable ipv6cp tun0: Command: myisp: set dial tun0: Command: myisp: set login tun0: Command: myisp: set timeout 0 tun0: Command: myisp: set authname ******** tun0: Command: myisp: set authkey ******** tun0: Command: myisp: set ifaddr my.isp.assigned.ip/29 0.0.0.0 tun0: Command: myisp: add! default HISADDR tun0: Phase: PPP Started (ddial mode). tun0: Phase: bundle: Establish tun0: Phase: deflink: closed -> opening tun0: Phase: deflink: Connected! tun0: Phase: deflink: opening -> dial tun0: Phase: deflink: dial -> carrier tun0: Phase: Received NGM_PPPOE_ACNAME (hook "MSSLMT-CO-MX480") tun0: Phase: Received NGM_PPPOE_SESSIONID tun0: Phase: Received NGM_PPPOE_SUCCESS tun0: Phase: deflink: carrier -> login tun0: Phase: deflink: login -> lcp tun0: LCP: FSM: Using "deflink" as a transport tun0: LCP: deflink: State change Initial --> Closed tun0: LCP: deflink: State change Closed --> Stopped tun0: LCP: deflink: RecvConfigReq(163) state = Stopped tun0: LCP: MRU[4] 1492 tun0: LCP: AUTHPROTO[4] 0xc023 (PAP) tun0: LCP: MAGICNUM[6] 0x3bbf819a tun0: Warning: deflink: Reducing configured MRU from 1500 to 1492 tun0: LCP: deflink: SendConfigReq(1) state = Stopped tun0: LCP: ACFCOMP[2] tun0: LCP: PROTOCOMP[2] tun0: LCP: ACCMAP[6] 0x00000000 tun0: LCP: MRU[4] 1492 tun0: LCP: MAGICNUM[6] 0x3bbf5181 tun0: LCP: deflink: SendConfigAck(163) state = Stopped tun0: LCP: MRU[4] 1492 tun0: LCP: AUTHPROTO[4] 0xc023 (PAP) tun0: LCP: MAGICNUM[6] 0x3bbf819a tun0: LCP: deflink: LayerStart tun0: LCP: deflink: State change Stopped --> Ack-Sent tun0: LCP: deflink: RecvConfigAck(1) state = Ack-Sent tun0: LCP: ACFCOMP[2] tun0: LCP: PROTOCOMP[2] tun0: LCP: ACCMAP[6] 0x00000000 tun0: LCP: MRU[4] 1492 tun0: LCP: MAGICNUM[6] 0x3bbf5181 tun0: LCP: deflink: State change Ack-Sent --> Opened tun0: LCP: deflink: LayerUp tun0: LCP: deflink: SendIdent(0) state = Opened tun0: LCP: MAGICNUM 3bbf5181 tun0: LCP: TEXT user-ppp 3.4.2 tun0: Phase: bundle: Authenticate tun0: Phase: deflink: his = PAP, mine = none tun0: Phase: Pap Output: ******** ******** tun0: Phase: Pap Input: SUCCESS () tun0: CCP: FSM: Using "deflink" as a transport tun0: CCP: deflink: State change Initial --> Closed tun0: CCP: deflink: LayerStart. tun0: CCP: MPPE: Not usable without CHAP81 tun0: CCP: deflink: SendConfigReq(1) state = Closed tun0: CCP: DEFLATE[4] win 15 tun0: CCP: PRED1[2] tun0: CCP: deflink: State change Closed --> Req-Sent tun0: Phase: deflink: lcp -> open tun0: Phase: bundle: Network tun0: IPCP: FSM: Using "deflink" as a transport tun0: IPCP: deflink: State change Initial --> Closed tun0: IPCP: deflink: LayerStart. tun0: IPCP: deflink: SendConfigReq(1) state = Closed tun0: IPCP: IPADDR[6] my.isp.assigned.ip tun0: IPCP: COMPPROTO[6] 16 VJ slots with slot compression tun0: IPCP: deflink: State change Closed --> Req-Sent tun0: LCP: deflink: RecvProtocolRej(164) state = Opened *** tun0: LCP: deflink: -- Protocol 0x80fd (Compression Control Protocol) was reject ed! tun0: CCP: deflink: State change Req-Sent --> Stopped tun0: IPCP: deflink: RecvConfigReq(101) state = Req-Sent tun0: IPCP: IPADDR[6] 69.51.80.35 tun0: IPCP: deflink: SendConfigAck(101) state = Req-Sent tun0: IPCP: IPADDR[6] 69.51.80.35 tun0: IPCP: deflink: State change Req-Sent --> Ack-Sent tun0: IPCP: deflink: RecvConfigRej(1) state = Ack-Sent tun0: LCP: deflink: SendIdent(1) state = Opened tun0: LCP: MAGICNUM 3bbf5181 tun0: LCP: TEXT user-ppp 3.4.2 tun0: IPCP: COMPPROTO[6] 16 VJ slots with slot compression tun0: IPCP: deflink: SendConfigReq(2) state = Ack-Sent tun0: IPCP: IPADDR[6] my.isp.assigned.ip tun0: IPCP: deflink: RecvConfigNak(2) state = Ack-Sent tun0: IPCP: IPADDR[6] 66.109.136.47 *** tun0: IPCP: 66.109.136.47: Unacceptable address! tun0: IPCP: deflink: SendTerminateReq(3) state = Ack-Sent tun0: IPCP: deflink: State change Ack-Sent --> Closing tun0: IPCP: deflink: RecvTerminateAck(3) state = Closing tun0: IPCP: deflink: LayerFinish. tun0: IPCP: Connect time: 0 secs: 0 octets in, 0 octets out tun0: IPCP: 0 packets in, 0 packets out tun0: IPCP: total 0 bytes/sec, peak 0 bytes/sec on Mon May 1 18:57:32 2023 tun0: IPCP: deflink: State change Closing --> Closed tun0: Phase: bundle: Terminate tun0: CCP: deflink: State change Stopped --> Closed tun0: CCP: deflink: State change Closed --> Initial tun0: LCP: deflink: LayerDown tun0: LCP: deflink: SendTerminateReq(2) state = Opened tun0: LCP: deflink: State change Opened --> Closing tun0: Phase: deflink: open -> lcp tun0: Warning: ff02::/: Change route failed: errno: Network is unreachable tun0: IPCP: deflink: State change Closed --> Initial tun0: LCP: deflink: RecvTerminateAck(2) state = Closing tun0: LCP: deflink: LayerFinish tun0: LCP: deflink: State change Closing --> Closed tun0: LCP: deflink: State change Closed --> Initial tun0: Phase: deflink: Disconnected! tun0: Phase: deflink: lcp -> logout tun0: Phase: deflink: logout -> hangup tun0: Phase: deflink: Disconnected! Any pointers would be much appreciated. Thanks, Gary From nobody Tue May 2 07:37:58 2023 X-Original-To: freebsd-questions@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 4Q9X4B3Kdkz48dJQ for ; Tue, 2 May 2023 07:38:02 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9X4B23grz4Z1g; Tue, 2 May 2023 07:38:02 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683013082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=P4qjauNtzMBDH3pCzJwAN1SxIitzAI8WffrYYVLnCMo=; b=DWRt7AqVCNaKZtI3Y3gvnZdPNJE6F2rUobaCmWlje1EHr07i7QQIeDvn9vTzn/BCC/RHgb aM4ErPD12oGBXV92WOrt39rIxjPqzw2uHqHnudnUaBxymol9rvRGo6PNSGvn0bCLfBaGkn m3NL6r3xgfov9qVjL2fqrsg9hpIfM8EekbA9NpV8o7PIgSPlk1sKSaajt2m3DjQakG/dkM fHc0D6k8pTzr/QtJGGqbuffyrPdhRbyxXaGOjXsZM6a4QEFtGCzQlZB0vkUmAJd1tD3aUr ySRsEDt493fhqSEIvlEjHF4k6xnmc8DxPrPVFIWEI6CTNkMZlTjPEff0BUiYwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683013082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=P4qjauNtzMBDH3pCzJwAN1SxIitzAI8WffrYYVLnCMo=; b=QUFIVqqLZ+yZVU2WKwMzSk5zHP8oTT8zkxG/XKRBTvNL03rADFyXo6kM+E9R2K1UhQHo3m ubgaC7ggDDj7A7tLPCsf/Gwx3xBLt7ovpI3EIhjIl8bkAhesPs/OsTECbC5dEjGpupQNM3 aS8GPBZyNg47Q5gGpLORYi2ATI75zmE1jTEL+v4/n4AGkT0/9YcjQqCRGTbXPPjYP29tDn HcSLR3CbbASaZQ/97UBYDJbp6wJoskB5UtYKRjcTpM5kEWU7n1Fp6mAm+DIPAqgpTyNxow qYJmNAkRsG2BRv158hJDRGVDGEhHr8Kq7tq9lTpw29VM6Hy6WzhB4ScxqqD/PA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683013082; a=rsa-sha256; cv=none; b=YNwowlgA9eexEJ0xK5fkSLYr4RgAfTkVAWh5oP+Rp9Zg28Eh9MIM5/FW8CHHJbXQKh3tdG Idhs9IMor8/EGORGd9JkYcRW6bfNpRgQVjq2kcHR2dnMJhcfUXCfLtcunOSnMTa7Zcz0Hw Yu4P2FM/5wt4ly43yQV1sGfyEgrsev/eIgktPFyPjIWVztLZOTrzVETvx9DcNI4xyxIUkb /C4abOVAXs1KNMGY2hBcpJ7gi3+5jwmhbyP19TPapLREQWyC9wX+XmCoImyoT63TOxqGVr TsEadtE4YlmBEGYxcpduopoZwbeKF96vpAw9YZE/0BdKSJmzv269O96AR+aHEQ== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (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 (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q9X4B0PYjz17JG; Tue, 2 May 2023 07:38:02 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 9C0341F9DF; Tue, 2 May 2023 09:37:59 +0200 (CEST) From: Kristof Provost To: Gary Aitken Cc: FreeBSD Mailing List Subject: Re: PPPoE bridge / vlan? setup help needed Date: Tue, 02 May 2023 09:37:58 +0200 X-Mailer: MailMate (1.14r5937) Message-ID: <9A04451E-1BC7-402D-A5A5-B1B6466DBE56@FreeBSD.org> In-Reply-To: <7c972cc1-3c49-ad0a-b86f-91bd0b978537@dreamchaser.org> References: <7c972cc1-3c49-ad0a-b86f-91bd0b978537@dreamchaser.org> List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-ThisMailContainsUnwantedMimeParts: N On 2 May 2023, at 3:32, Gary Aitken wrote: > Having trouble setting up a dsl modem as a bridge. > ISP info: > Fixed IP > LLC-Based multiplexing > VPI 0 > VCI 100 > > Nowhere in ppp.conf do I see anything about > multiplexing mode, vpi, vci, or dsl mode; =E2=80=A6 > Any pointers would be much appreciated. > With the disclaimer that it=E2=80=99s been ~15 years since I last looked = at the relevant tech, but I think you=E2=80=99re confusing PPP over ATM (= PPPoA) with PPP over Ethernet (PPPoE). VPI/VCI are ATM concepts, and do not exist in Ethernet land. Best, Kristof From nobody Tue May 2 15:08:27 2023 X-Original-To: questions@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 4Q9k4T1rvQz494Fg for ; Tue, 2 May 2023 15:08:57 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from h1.out2.mxs.au (h1.out2.mxs.au [110.232.143.236]) (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 4Q9k4S44rtz4DHJ for ; Tue, 2 May 2023 15:08:55 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Authentication-Results: mx1.freebsd.org; none Received: from s121.syd3.hostingplatform.net.au (s121.syd3.hostingplatform.net.au [103.27.34.4]) by out2.mxs.au (Halon) with ESMTPS id 369955ac-e8fb-11ed-9cc9-00163c1ebd60; Wed, 03 May 2023 01:08:36 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nimnet.asn.au; s=default; h=Message-ID:From:CC:To:Subject: Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To: Date:Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=zKSiVpSfrXYvxN73pNknXS5fs3fWr/Nk7wKgT04ZR7w=; b=m1a1S4GNti1H5u7iacfHE6/BHF 6SYvNIJ9P1H5TkqEqa2OfCvo9rfd+TdlCewhE/nMIn/XdJr5F6EFHYci4jPxDpvQe+14dNFSHcIMC 3lV8wqP0UOpeYWZKjPiTfWddJXLFfDf7mpHaZ3BhEKeANka/XX5d50yn9o+/5YySoWcKBW58QywTj rxM9toUI5OO1qBAW+MN+Hk2Z/MVuf5xSIMhgtMhBliRnS/8jNiKBUdPQt6QKhsLW1znb+Yk9Ev7JQ YwhlH9fimf0TxIqhhEwTP/2nnlSygWlpkrUPssZkJ+ZrXiNP/9FLKYQHLyzlVEU+4szrZXVaBUn6O CrYvZ4dw==; Received: from [1.129.231.181] (port=53277 helo=Galaxy-J5-Pro) by s121.syd3.hostingplatform.net.au with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ptrcK-0018qN-1I; Wed, 03 May 2023 01:08:36 +1000 Date: Wed, 03 May 2023 01:08:27 +1000 User-Agent: K-9 Mail for Android In-Reply-To: <7c972cc1-3c49-ad0a-b86f-91bd0b978537@dreamchaser.org> References: <7c972cc1-3c49-ad0a-b86f-91bd0b978537@dreamchaser.org> List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: PPPoE bridge / vlan? setup help needed To: Gary Aitken CC: Kristof Provost ,questions@freebsd.org From: Ian Smith Message-ID: <985DD85F-C87A-418A-9D3B-A507BC952266@nimnet.asn.au> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s121.syd3.hostingplatform.net.au X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nimnet.asn.au X-Get-Message-Sender-Via: s121.syd3.hostingplatform.net.au: authenticated_id: smithi@nimnet.asn.au X-Authenticated-Sender: s121.syd3.hostingplatform.net.au: smithi@nimnet.asn.au X-Source: X-Source-Args: X-Source-Dir: X-Rspamd-Queue-Id: 4Q9k4S44rtz4DHJ X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:45638, ipnet:110.232.140.0/22, country:AU] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 2 May 2023 11:32:25 am AEST, Gary Aitken wro= te: > Having trouble setting up a dsl modem as a bridge=2E > ISP info: > Fixed IP > LLC-Based multiplexing > VPI 0 > VCI 100 >=20 > Nowhere in ppp=2Econf do I see anything about > multiplexing mode, vpi, vci, or dsl mode; Thanks to kristof's message nudging my brain into gear =2E=2E=2E also C=2E= 15 years since last setting up dialup or ADSL ppp=2E Apart from the IP address, those things are configured on the DSL modem, a= s is choice between bridge mode or having the modem do PPP itself=2E > searching I found something about setting up a vlan and associating > it with the hardware interface, but it's not clear to me how=2E > Handbook Ch 33=2E11 VLANs shows examples using a single number, the > vlan tag=2E This has nothing to do with vlans=2E > Otherwise, nothing I've been able to find about setting up PPPoE > bridged says anything about vpi/vci=2E It's most likely already set 0/100 for your country or region=2E Here it's= 0/35 (IIRC)=2E Similarly LLC or =2E=2E=2E the other one :) > pp=2Econf: >=20 > default: > set log Phase tun command > ident user-ppp VERSION >=20 > myisp: > set log Phase Chat LCP IPCP CCP Connect DNS tun command > set device PPPoE:xl0 > set mtu max 1492 > set mru max 1492 > disable ipv6cp Does the ISP offer ipv6? If so, is this all you have to dl to disable it? > set dial > set login > set timeout 0 > # set speed 20000000 # is speed needed for PPPoE? No=2E Used if you had a serial link to the modem instead, commonly 115200= =2E > set authname ******** > set authkey ******** > set ifaddr my=2Eisp=2Eassigned=2Eip/29 0=2E0=2E0=2E0 > add! default HISADDR # Override existing default route with new > one Not sure you need the '!' ? > With no vlan set up, I see: > Sorry it's long, seems to succeed through SUCCESS but don't know what > from the earlier output may be relevant=2E >=20 > tun0: Phase: Using interface: tun0 > tun0: Command: myisp: set log Phase Chat LCP IPCP CCP Connect DNS tun > comman > d > tun0: Command: myisp: set device PPPoE:xl0 > tun0: Command: myisp: set redial 3 0 > tun0: Command: myisp: set mtu max 1492 > tun0: Command: myisp: set mru max 1492 > tun0: Command: myisp: disable ipv6cp > tun0: Command: myisp: set dial > tun0: Command: myisp: set login > tun0: Command: myisp: set timeout 0 > tun0: Command: myisp: set authname ******** > tun0: Command: myisp: set authkey ******** > tun0: Command: myisp: set ifaddr my=2Eisp=2Eassigned=2Eip/29 0=2E= 0=2E0=2E0 > tun0: Command: myisp: add! default HISADDR > tun0: Phase: PPP Started (ddial mode)=2E > tun0: Phase: bundle: Establish > tun0: Phase: deflink: closed -> opening > tun0: Phase: deflink: Connected! > tun0: Phase: deflink: opening -> dial > tun0: Phase: deflink: dial -> carrier > tun0: Phase: Received NGM_PPPOE_ACNAME (hook "MSSLMT-CO-MX480") > tun0: Phase: Received NGM_PPPOE_SESSIONID > tun0: Phase: Received NGM_PPPOE_SUCCESS > tun0: Phase: deflink: carrier -> login So far so good, looks like=2E > tun0: Phase: deflink: login -> lcp > tun0: LCP: FSM: Using "deflink" as a transport > tun0: LCP: deflink: State change Initial --> Closed > tun0: LCP: deflink: State change Closed --> Stopped > tun0: LCP: deflink: RecvConfigReq(163) state =3D Stopped > tun0: LCP: MRU[4] 1492 > tun0: LCP: AUTHPROTO[4] 0xc023 (PAP) > tun0: LCP: MAGICNUM[6] 0x3bbf819a > tun0: Warning: deflink: Reducing configured MRU from 1500 to 1492 > tun0: LCP: deflink: SendConfigReq(1) state =3D Stopped > tun0: LCP: ACFCOMP[2] > tun0: LCP: PROTOCOMP[2] > tun0: LCP: ACCMAP[6] 0x00000000 > tun0: LCP: MRU[4] 1492 > tun0: LCP: MAGICNUM[6] 0x3bbf5181 > tun0: LCP: deflink: SendConfigAck(163) state =3D Stopped > tun0: LCP: MRU[4] 1492 > tun0: LCP: AUTHPROTO[4] 0xc023 (PAP) > tun0: LCP: MAGICNUM[6] 0x3bbf819a > tun0: LCP: deflink: LayerStart > tun0: LCP: deflink: State change Stopped --> Ack-Sent I think that's ok =2E=2E=2E chatty, ain't it =2E=2E > tun0: LCP: deflink: RecvConfigAck(1) state =3D Ack-Sent > tun0: LCP: ACFCOMP[2] > tun0: LCP: PROTOCOMP[2] > tun0: LCP: ACCMAP[6] 0x00000000 > tun0: LCP: MRU[4] 1492 > tun0: LCP: MAGICNUM[6] 0x3bbf5181 > tun0: LCP: deflink: State change Ack-Sent --> Opened > tun0: LCP: deflink: LayerUp > tun0: LCP: deflink: SendIdent(0) state =3D Opened > tun0: LCP: MAGICNUM 3bbf5181 > tun0: LCP: TEXT user-ppp 3=2E4=2E2 > tun0: Phase: bundle: Authenticate > tun0: Phase: deflink: his =3D PAP, mine =3D none > tun0: Phase: Pap Output: ******** ******** > tun0: Phase: Pap Input: SUCCESS () Looks ok, but then starting CCP negotiation (compression control) > tun0: CCP: FSM: Using "deflink" as a transport > tun0: CCP: deflink: State change Initial --> Closed > tun0: CCP: deflink: LayerStart=2E > tun0: CCP: MPPE: Not usable without CHAP81 This looks maybe ominous=2E > tun0: CCP: deflink: SendConfigReq(1) state =3D Closed > tun0: CCP: DEFLATE[4] win 15 > tun0: CCP: PRED1[2] > tun0: CCP: deflink: State change Closed --> Req-Sent So you want deflate or pred1 =2E=2E=2E but now moving to IPCP (IP Control = protocol) > tun0: Phase: deflink: lcp -> open > tun0: Phase: bundle: Network > tun0: IPCP: FSM: Using "deflink" as a transport > tun0: IPCP: deflink: State change Initial --> Closed > tun0: IPCP: deflink: LayerStart=2E > tun0: IPCP: deflink: SendConfigReq(1) state =3D Closed > tun0: IPCP: IPADDR[6] my=2Eisp=2Eassigned=2Eip > tun0: IPCP: COMPPROTO[6] 16 VJ slots with slot compression > tun0: IPCP: deflink: State change Closed --> Req-Sent > tun0: LCP: deflink: RecvProtocolRej(164) state =3D Opened > *** tun0: LCP: deflink: -- Protocol 0x80fd (Compression Control > Protocol) was reject > ed! Right, so CCP requested mode is wrong=2E Ask them what they expect / requi= re=2E > tun0: CCP: deflink: State change Req-Sent --> Stopped > tun0: IPCP: deflink: RecvConfigReq(101) state =3D Req-Sent > tun0: IPCP: IPADDR[6] 69=2E51=2E80=2E35 > tun0: IPCP: deflink: SendConfigAck(101) state =3D Req-Sent > tun0: IPCP: IPADDR[6] 69=2E51=2E80=2E35 > tun0: IPCP: deflink: State change Req-Sent --> Ack-Sent So you've accepted their offered IP address, and acknowledged it=2E > tun0: IPCP: deflink: RecvConfigRej(1) state =3D Ack-Sent > tun0: LCP: deflink: SendIdent(1) state =3D Opened > tun0: LCP: MAGICNUM 3bbf5181 > tun0: LCP: TEXT user-ppp 3=2E4=2E2 > tun0: IPCP: COMPPROTO[6] 16 VJ slots with slot compression > tun0: IPCP: deflink: SendConfigReq(2) state =3D Ack-Sent > tun0: IPCP: IPADDR[6] my=2Eisp=2Eassigned=2Eip > tun0: IPCP: deflink: RecvConfigNak(2) state =3D Ack-Sent > tun0: IPCP: IPADDR[6] 66=2E109=2E136=2E47 But they want you to use this 66=2E address, is that related or similar to= the address =20 'my=2Eisp=2Eassigned=2Eip'? Within your /29? > *** tun0: IPCP: 66=2E109=2E136=2E47: Unacceptable address! So you reject it=2E Maybe if you don't insist on 'my=2Eisp=2Eassigned=2Ei= p' it might go - but then they've provided the wrong info=2E=20 At this stage I'd send them the log and ask what's up? It's all downhill from here =2E=2E=2E > tun0: IPCP: deflink: SendTerminateReq(3) state =3D Ack-Sent > tun0: IPCP: deflink: State change Ack-Sent --> Closing > tun0: IPCP: deflink: RecvTerminateAck(3) state =3D Closing > tun0: IPCP: deflink: LayerFinish=2E > tun0: IPCP: Connect time: 0 secs: 0 octets in, 0 octets out > tun0: IPCP: 0 packets in, 0 packets out > tun0: IPCP: total 0 bytes/sec, peak 0 bytes/sec on Mon May 1 > 18:57:32 2023 > tun0: IPCP: deflink: State change Closing --> Closed > tun0: Phase: bundle: Terminate > tun0: CCP: deflink: State change Stopped --> Closed > tun0: CCP: deflink: State change Closed --> Initial > tun0: LCP: deflink: LayerDown > tun0: LCP: deflink: SendTerminateReq(2) state =3D Opened > tun0: LCP: deflink: State change Opened --> Closing > tun0: Phase: deflink: open -> lcp > tun0: Warning: ff02::/: Change route failed: errno: Network is > unreachable > tun0: IPCP: deflink: State change Closed --> Initial > tun0: LCP: deflink: RecvTerminateAck(2) state =3D Closing > tun0: LCP: deflink: LayerFinish > tun0: LCP: deflink: State change Closing --> Closed > tun0: LCP: deflink: State change Closed --> Initial > tun0: Phase: deflink: Disconnected! > tun0: Phase: deflink: lcp -> logout > tun0: Phase: deflink: logout -> hangup > tun0: Phase: deflink: Disconnected! >=20 > Any pointers would be much appreciated=2E > Thanks, >=20 > Gary It's been a long time, I may have missed something obvious=2E We moved from user ppp to mpd C=2E '07, and found it better and easier, bu= t that won't help if their setup info is wrong=2E cheers, Ian From nobody Tue May 2 17:02:00 2023 X-Original-To: questions@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 4Q9mZy5Dcqz49B9d for ; Tue, 2 May 2023 17:02:02 +0000 (UTC) (envelope-from doug@safeport.com) Received: from freeport.safeport.com (freeport.safeport.com [147.160.157.114]) by mx1.freebsd.org (Postfix) with ESMTP id 4Q9mZx3mvNz3hb7 for ; Tue, 2 May 2023 17:02:01 +0000 (UTC) (envelope-from doug@safeport.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of doug@safeport.com designates 147.160.157.114 as permitted sender) smtp.mailfrom=doug@safeport.com Received: from bucksport.safeport.com (bucksport.safeport.com [147.160.157.15]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by freeport.safeport.com (Postfix) with ESMTPS id 19E93518989 for ; Tue, 2 May 2023 13:02:00 -0400 (EDT) Date: Tue, 2 May 2023 13:02:00 -0400 (EDT) From: Doug Denault To: questions@freebsd.org Subject: ntpd error on a bridged network Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Rspamd-Queue-Id: 4Q9mZx3mvNz3hb7 X-Spamd-Bar: / X-Spamd-Result: default: False [-0.30 / 15.00]; R_SPF_ALLOW(-0.20)[+ip4:147.160.157.114]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:6405, ipnet:147.160.157.0/24, country:US]; R_DKIM_NA(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; MLMMJ_DEST(0.00)[questions@freebsd.org]; local_wl_ip(0.00)[147.160.157.114]; FROM_EQ_ENVFROM(0.00)[] X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: local_wl_ip X-ThisMailContainsUnwantedMimeParts: N We replaced an old apple router with a Linksys Velop router. The apple router was behind a Verizon router and we used DHCP from Verizon on the apple device. To duplicate the setup we configured the Linksys in bridge mode. ntpd starts with the error: ntpd: error resolving pool 0.freebsd.pool.ntp.org: Name does not resolve (8) however: host -t a 0.freebsd.pool.ntp.org 0.freebsd.pool.ntp.org has address 174.53.169.69 0.freebsd.pool.ntp.org has address 192.241.155.186 0.freebsd.pool.ntp.org has address 38.229.53.9 0.freebsd.pool.ntp.org has address 38.229.57.9 ping -c 2 0.freebsd.pool.ntp.org PING 0.freebsd.pool.ntp.org (94.237.120.208): 56 data bytes 64 bytes from 94.237.120.208: icmp_seq=0 ttl=53 time=78.773 ms 64 bytes from 94.237.120.208: icmp_seq=1 ttl=53 time=79.012 ms /etc/resolv.conf # Generated by resolvconf search boltsys.com nameserver 192.168.2.1 Other than ntpd I see no DNS or connectivity issues. So far the time has been holding at 2 seconds difference from the servers not on the office LAN. _____ Douglas Denault http://www.safeport.com doug@safeport.com Voice: 301-217-9220 Fax: 301-217-9277 From nobody Tue May 2 18:07:47 2023 X-Original-To: questions@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 4Q9p344V5Gz49FQM for ; Tue, 2 May 2023 18:08:00 +0000 (UTC) (envelope-from pprocacci@gmail.com) Received: from mail-oa1-x33.google.com (mail-oa1-x33.google.com [IPv6:2001:4860:4864:20::33]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9p34144bz3sh9 for ; Tue, 2 May 2023 18:08:00 +0000 (UTC) (envelope-from pprocacci@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-18f4a6d2822so24317748fac.1 for ; Tue, 02 May 2023 11:08:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683050879; x=1685642879; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=vw7N+ksudoLjfYQKEdRCbZyErpgpkTcM00fagyoBigg=; b=Wf/nxy6PnQIJTwT65XJHjKFWUiZGbfZolQPFx/gjuDVpQBbSE6OQHp5r6JIo9JpS1J O9i0O/gmvMKwPZu1vzASC8JjnrtWg0q5xOsFtx4j3uK3BvQoIstj9WtNfN8tVhtDsS1R gvh9QPnjXD7sLCQMBYFWSm+f/r5hiqi9n/SyyWkNwLeeba0yUJSD23spWA0g7Wz+hExB iZ4aajT5ZXLhxBFj0P7VnH9AvMusY1SldoYj7w2sQrhgClnrTuaOIcfTm/KY1Es3XGU/ j8Ywb+p3QRbP2jU7FkuBgbcRQKz0VgcYPsTxmc9VYP2L/KmXB/pRkAkQp7D/9xxoPUF0 MHaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683050879; x=1685642879; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vw7N+ksudoLjfYQKEdRCbZyErpgpkTcM00fagyoBigg=; b=LUOVpPLhbVsMW69pjXH+ScV/+WY/2jR8SDoTf9P6KRsBCbjyowLAQfJ+lMdNL/I0yg siCPuHudozW0TgH04epKvPiy8mypvPk9JFVACQx3OYC02jJenez+LHtNmK7wuGKtBKyO B1JJLvM+IEly7gSuIGUtq/dw7WqqtPj2pLNn0xfAs9hPAsdhcA4qVlTm+EsIJVxcS6MU EuWbIvUrsnSu8K0cZFL8eZliVh8mqKdUfIRFcLZcMMzGM2lbldjEwW8OBAZYZ5WsFLr0 2zO7zsYx6usDE4Z+1Ynejw68f2j3ck8kYBTQTs6BwFV5xaFqqDXRpNJurwG2oxnAN1AL wMGg== X-Gm-Message-State: AC+VfDy1u1GYvz1pXiWVoQsmdIM1XcEqcHdKOotDkg4zXqZqiBCy2CDn udYFkKTN6bY7xf1Tyd5vXmF3TTbaIX5S1Eymy4dJGzRUV3rK X-Google-Smtp-Source: ACHHUZ4z6Fcr/wp61G80XeNMP8QBONlgmvTQLsAeXd8r4jjkgRGhJH4NpEq+5bnt5DnWU+bdB/q6CcThLsBqX7XxP3c= X-Received: by 2002:a4a:d8d9:0:b0:541:87fe:5b75 with SMTP id c25-20020a4ad8d9000000b0054187fe5b75mr8571614oov.1.1683050878560; Tue, 02 May 2023 11:07:58 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Paul Procacci Date: Tue, 2 May 2023 14:07:47 -0400 Message-ID: Subject: Re: ntpd error on a bridged network To: Doug Denault Cc: questions@freebsd.org Content-Type: multipart/alternative; boundary="000000000000c171a005fab9d1a7" X-Rspamd-Queue-Id: 4Q9p34144bz3sh9 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2001:4860:4864::/48, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000c171a005fab9d1a7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, May 2, 2023 at 1:02=E2=80=AFPM Doug Denault wro= te: > We replaced an old apple router with a Linksys Velop router. The apple > router was behind a Verizon router and we used DHCP from Verizon on the > apple device. To duplicate the setup we configured the Linksys in bridge > mode. > > ntpd starts with the error: > ntpd: error resolving pool 0.freebsd.pool.ntp.org: Name does not > resolve (8) > > however: > > host -t a 0.freebsd.pool.ntp.org > 0.freebsd.pool.ntp.org has address 174.53.169.69 > 0.freebsd.pool.ntp.org has address 192.241.155.186 > 0.freebsd.pool.ntp.org has address 38.229.53.9 > 0.freebsd.pool.ntp.org has address 38.229.57.9 > > ping -c 2 0.freebsd.pool.ntp.org > PING 0.freebsd.pool.ntp.org (94.237.120.208): 56 data bytes > 64 bytes from 94.237.120.208: icmp_seq=3D0 ttl=3D53 time=3D78.773 ms > 64 bytes from 94.237.120.208: icmp_seq=3D1 ttl=3D53 time=3D79.012 ms > > /etc/resolv.conf > # Generated by resolvconf > search boltsys.com > nameserver 192.168.2.1 > > Other than ntpd I see no DNS or connectivity issues. So far the time has > been holding at 2 seconds difference > from the servers not on the office LAN. > > > _____ > Douglas Denault > http://www.safeport.com > doug@safeport.com > Voice: 301-217-9220 > Fax: 301-217-9277 > > When you restart ntpd after the system has fully booted, does the same error occur? Just trying to isolate if it's a problem with ntpd specifically or perhaps ntpd starting before the network becomes available. What version of FreeBSD are you running? ~Paul --=20 __________________ :(){ :|:& };: --000000000000c171a005fab9d1a7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, May 2, 2023 at 1:02= =E2=80=AFPM Doug Denault <doug@safeport.com> wrote:
We replaced an old apple router with a Linksys Ve= lop router. The apple
router was behind a Verizon router and we used DHCP from Verizon on the apple device. To duplicate the setup we configured the Linksys in bridge mode.

ntpd starts with the error:
=C2=A0 =C2=A0 ntpd: error resolving pool 0.freebsd.pool.ntp.org: Na= me does not resolve (8)

however:

=C2=A0 =C2=A0 host -t a 0.freebsd.pool.ntp.org
=C2=A0 =C2=A0 0.freebsd.pool.ntp.org has address 174.53.169.69
=C2=A0 =C2=A0 0.freebsd.pool.ntp.org has address 192.241.155.186 =C2=A0 =C2=A0 0.freebsd.pool.ntp.org has address 38.229.53.9
=C2=A0 =C2=A0 0.freebsd.pool.ntp.org has address 38.229.57.9

=C2=A0 =C2=A0 ping -c 2 0.freebsd.pool.ntp.org
=C2=A0 =C2=A0 PING 0.freebsd.pool.ntp.org (94.237.120.208): 56 data= bytes
=C2=A0 =C2=A0 64 bytes from 94.237.120.208: icmp_seq=3D0 ttl=3D53 time=3D78= .773 ms
=C2=A0 =C2=A0 64 bytes from 94.237.120.208: icmp_seq=3D1 ttl=3D53 time=3D79= .012 ms

=C2=A0 =C2=A0 /etc/resolv.conf
=C2=A0 =C2=A0 # Generated by resolvconf
=C2=A0 =C2=A0 search boltsys.com
=C2=A0 =C2=A0 nameserver 192.168.2.1

Other than ntpd I see no DNS or connectivity issues. So far the time has been holding at 2 seconds difference
from the servers not on the office LAN.


_____
Douglas Denault
ht= tp://www.safeport.com
doug@safeport.com
Voice: 301-217-9220
=C2=A0 =C2=A0Fax: 301-217-9277


When you restart ntpd after the system has fully boo= ted, does the same error occur?

--000000000000c171a005fab9d1a7-- From nobody Tue May 2 20:01:42 2023 X-Original-To: questions@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 4Q9rZJ05Rxz49LpZ for ; Tue, 2 May 2023 20:01:44 +0000 (UTC) (envelope-from doug@safeport.com) Received: from freeport.safeport.com (freeport.safeport.com [147.160.157.114]) by mx1.freebsd.org (Postfix) with ESMTP id 4Q9rZH4dR3z49j4 for ; Tue, 2 May 2023 20:01:43 +0000 (UTC) (envelope-from doug@safeport.com) Authentication-Results: mx1.freebsd.org; none Received: from bucksport.safeport.com (bucksport.safeport.com [147.160.157.15]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by freeport.safeport.com (Postfix) with ESMTPS id 6C97E51D37D; Tue, 2 May 2023 16:01:42 -0400 (EDT) Date: Tue, 2 May 2023 16:01:42 -0400 (EDT) From: Doug Denault To: Paul Procacci cc: questions@freebsd.org Subject: Re: ntpd error on a bridged network In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-2042001264-1683057702=:29936" X-Rspamd-Queue-Id: 4Q9rZH4dR3z49j4 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6405, ipnet:147.160.157.0/24, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-2042001264-1683057702=:29936 Content-Type: TEXT/PLAIN; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Tue, 2 May 2023, Paul Procacci wrote: > On Tue, May 2, 2023 at 1:02?PM Doug Denault wrote: > We replaced an old apple router with a Linksys Velop router. The apple > router was behind a Verizon router and we used DHCP from Verizon on the > apple device. To duplicate the setup we configured the Linksys in bridge > mode. > > ntpd starts with the error: >     ntpd: error resolving pool 0.freebsd.pool.ntp.org: Name does not resolve (8) > > however: > >     host -t a 0.freebsd.pool.ntp.org >     0.freebsd.pool.ntp.org has address 174.53.169.69 >     0.freebsd.pool.ntp.org has address 192.241.155.186 >     0.freebsd.pool.ntp.org has address 38.229.53.9 >     0.freebsd.pool.ntp.org has address 38.229.57.9 > >     ping -c 2 0.freebsd.pool.ntp.org >     PING 0.freebsd.pool.ntp.org (94.237.120.208): 56 data bytes >     64 bytes from 94.237.120.208: icmp_seq=0 ttl=53 time=78.773 ms >     64 bytes from 94.237.120.208: icmp_seq=1 ttl=53 time=79.012 ms > >     /etc/resolv.conf >     # Generated by resolvconf >     search boltsys.com >     nameserver 192.168.2.1 > > Other than ntpd I see no DNS or connectivity issues. So far the time has > been holding at 2 seconds difference > from the servers not on the office LAN. > > > When you restart ntpd after the system has fully booted, does the same > error occur? It is the same from power-off, reboot, and starting and stopping dhclient. I have also used google nameservers as well as 192.168.2.1 (verizon) all works the same. > Just trying to isolate if it's a problem with ntpd specifically or > perhaps ntpd starting before the network becomes available. > > What version of FreeBSD are you running? 12.4 _____ Douglas Denault http://www.safeport.com doug@safeport.com Voice: 301-217-9220 Fax: 301-217-9277 --0-2042001264-1683057702=:29936-- From nobody Tue May 2 20:07:58 2023 X-Original-To: questions@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 4Q9rjl1X69z49Lr1 for ; Tue, 2 May 2023 20:08:11 +0000 (UTC) (envelope-from pprocacci@gmail.com) Received: from mail-oo1-xc2f.google.com (mail-oo1-xc2f.google.com [IPv6:2607:f8b0:4864:20::c2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9rjk6LPBz4Fb5 for ; Tue, 2 May 2023 20:08:10 +0000 (UTC) (envelope-from pprocacci@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-549d9c295dfso2520607eaf.2 for ; Tue, 02 May 2023 13:08:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683058090; x=1685650090; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=dOEk5sTjujPHmZbo1il8lL4FYwkT4G4vOzkl+VPliRE=; b=rJoJDMtqDfunzPnvfMA1ibNJfxBfpB8zoXNYqkO/iN0IgXpBFEcgCYqnE9DYdWK6mj 3xqMSB2K/Xeaele6FuNkUy9AAziR26dm0IpBeLJ4PdGNWCx62zT1oCVQWTwImSWQkFz1 eA2fRwgt44CC5TfHv53+U5L5wnkIkkPcHdx7nyfYIEs/lQh91cG0peLYky28XUVZvDca 3k9ueAnIzMtX5vATbWsEMAtvzXbd6mjoxaMxTc3geEs6pBXgbRGTYf8VRf0Tkk2iUnuJ pXA74RpteFXPqcOHK1EUsj8ngF4j7fAIrXW/V+xm87a4D49+hHnfB4Mp0usTqUzx6mWI n1xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683058090; x=1685650090; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dOEk5sTjujPHmZbo1il8lL4FYwkT4G4vOzkl+VPliRE=; b=gr1USPj/A8LEnF7tvCzc/LsOL2g3R/6V1t6Njm1y5WSrTYSxcBVwcTvXkimem1lk7q LH7ZHo0DXUZk2tSLLa+1UAD46Wi2pV61iQ6GyQZqKqoNGUc4QGcWk5UTpehjPZRZNqhW JL99xbO6inZRwIcuXWivhFnIS1osJILGJMP9I3j0uGApeXFCcahZmrqfhN1h3EZ2x1lw J5XkP6hkncbxOqgBuTUHB12E/IHk4qFS9D6dmhuV1+s8sU2g3ulGyYOdf032VI3l95sg NvXwiAo3HJyjuubhA9kV+3GEnzanYXtBgzH7BEhpsdZ2Sn9V9y3gMBjQnQ8ju+1vu/+E 0MAA== X-Gm-Message-State: AC+VfDyHoTkPi4Ld5OVIyNEzGICLqBGyG7LvQZHzcSh6fau0TG/HamQi uyqqwBwai7F05SNB3noAxnM8YvLp6TGnHRS1aKYrv86VqQ== X-Google-Smtp-Source: ACHHUZ41foBU2xwyS3e4ZmSp8iniyPGa7/Bz4ZDmtEQyk0ggIw3xVFSh5zVgYPYAX4HPQoslzcK7WP2WLg3y0OkWJAw= X-Received: by 2002:a4a:ea45:0:b0:547:55ad:9176 with SMTP id j5-20020a4aea45000000b0054755ad9176mr7920101ooe.2.1683058089751; Tue, 02 May 2023 13:08:09 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Paul Procacci Date: Tue, 2 May 2023 16:07:58 -0400 Message-ID: Subject: Re: ntpd error on a bridged network To: Doug Denault Cc: questions@freebsd.org Content-Type: multipart/alternative; boundary="000000000000937aae05fabb7f01" X-Rspamd-Queue-Id: 4Q9rjk6LPBz4Fb5 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000937aae05fabb7f01 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, May 2, 2023 at 4:01=E2=80=AFPM Doug Denault wro= te: > On Tue, 2 May 2023, Paul Procacci wrote: > > > On Tue, May 2, 2023 at 1:02?PM Doug Denault wrote: > > We replaced an old apple router with a Linksys Velop router. The > apple > > router was behind a Verizon router and we used DHCP from Verizon > on the > > apple device. To duplicate the setup we configured the Linksys in > bridge > > mode. > > > > ntpd starts with the error: > > ntpd: error resolving pool 0.freebsd.pool.ntp.org: Name does > not resolve (8) > > > > however: > > > > host -t a 0.freebsd.pool.ntp.org > > 0.freebsd.pool.ntp.org has address 174.53.169.69 > > 0.freebsd.pool.ntp.org has address 192.241.155.186 > > 0.freebsd.pool.ntp.org has address 38.229.53.9 > > 0.freebsd.pool.ntp.org has address 38.229.57.9 > > > > ping -c 2 0.freebsd.pool.ntp.org > > PING 0.freebsd.pool.ntp.org (94.237.120.208): 56 data bytes > > 64 bytes from 94.237.120.208: icmp_seq=3D0 ttl=3D53 time=3D78= .773 ms > > 64 bytes from 94.237.120.208: icmp_seq=3D1 ttl=3D53 time=3D79= .012 ms > > > > /etc/resolv.conf > > # Generated by resolvconf > > search boltsys.com > > nameserver 192.168.2.1 > > > > Other than ntpd I see no DNS or connectivity issues. So far the > time has > > been holding at 2 seconds difference > > from the servers not on the office LAN. > > > > > > When you restart ntpd after the system has fully booted, does the same > > error occur? > > It is the same from power-off, reboot, and starting and stopping dhclient= . > I have also used google nameservers as well as 192.168.2.1 (verizon) all > works the same. > > > Just trying to isolate if it's a problem with ntpd specifically or > > perhaps ntpd starting before the network becomes available. > > > > What version of FreeBSD are you running? 12.4 > > > > _____ > Douglas Denault > http://www.safeport.com > doug@safeport.com > Voice: 301-217-9220 > Fax: 301-217-9277 Douglas, I perhaps wasn't clear. Sorry about that. What happens when you simply restart ntpd? By just restarting ntpd we can quickly isolate if the problem is with ntpd. ~Paul --=20 __________________ :(){ :|:& };: --000000000000937aae05fabb7f01 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, 2 May 2023, Paul Procacci wrote:

> On Tue, May 2, 2023 at 1:02?PM Doug Denault <doug@safeport.com> wrote:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0We replaced an old apple router with a Links= ys Velop router. The apple
>=C2=A0 =C2=A0 =C2=A0 =C2=A0router was behind a Verizon router and we us= ed DHCP from Verizon on the
>=C2=A0 =C2=A0 =C2=A0 =C2=A0apple device. To duplicate the setup we conf= igured the Linksys in bridge
>=C2=A0 =C2=A0 =C2=A0 =C2=A0mode.
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0ntpd starts with the error:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 ntpd: error resolving pool 0.freebsd.pool.ntp.org: Name does not resolve (8)
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0however:
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 host -t a 0.freebsd.pool.n= tp.org
>=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 0.freebsd.pool.ntp.org= has address 174.53.169.69
>=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 0.freebsd.pool.ntp.org= has address 192.241.155.186
>=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 0.freebsd.pool.ntp.org= has address 38.229.53.9
>=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 0.freebsd.pool.ntp.org= has address 38.229.57.9
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 ping -c 2 0.freebsd.pool.n= tp.org
>=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 PING 0.freebsd.pool.ntp.or= g (94.237.120.208): 56 data bytes
>=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 64 bytes from 94.237.120.208: = icmp_seq=3D0 ttl=3D53 time=3D78.773 ms
>=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 64 bytes from 94.237.120.208: = icmp_seq=3D1 ttl=3D53 time=3D79.012 ms
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 /etc/resolv.conf
>=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 # Generated by resolvconf
>=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 search boltsys.com
>=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 nameserver 192.168.2.1
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0Other than ntpd I see no DNS or connectivity= issues. So far the time has
>=C2=A0 =C2=A0 =C2=A0 =C2=A0been holding at 2 seconds difference
>=C2=A0 =C2=A0 =C2=A0 =C2=A0from the servers not on the office LAN.
>
>
> When you restart ntpd after the system has fully booted, does the same=
> error occur?

It is the same from power-off, reboot, and starting and stopping dhclient. =
I have also used google nameservers as well as 192.168.2.1 (verizon) all works the same.

> Just trying to isolate if it's a problem with ntpd specifically or=
> perhaps ntpd starting before the network becomes available.
>
> What version of FreeBSD are you running?=C2=A0 =C2=A012.4



_____
Douglas Denault
ht= tp://www.safeport.com
doug@safeport.com
Voice: 301-217-9220
=C2=A0 =C2=A0Fax: 301-217-9277

Douglas,

--000000000000937aae05fabb7f01-- From nobody Wed May 3 12:42:19 2023 X-Original-To: freebsd-questions@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 4QBGmv6dcJz49JX2 for ; Wed, 3 May 2023 12:42:23 +0000 (UTC) (envelope-from merlyn@geeks.org) Received: from mail.geeks.org (jacobs.geeks.org [204.153.247.1]) (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 4QBGmt70n0z3qBb for ; Wed, 3 May 2023 12:42:22 +0000 (UTC) (envelope-from merlyn@geeks.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of merlyn@geeks.org designates 204.153.247.1 as permitted sender) smtp.mailfrom=merlyn@geeks.org; dmarc=none Received: from mail.geeks.org (localhost [127.0.0.1]) by after-clamsmtpd.geeks.org (Postfix) with ESMTP id 7EDEB7D008 for ; Wed, 3 May 2023 07:42:19 -0500 (CDT) Received: by mail.geeks.org (Postfix, from userid 1003) id 67CFC7D007; Wed, 3 May 2023 07:42:19 -0500 (CDT) Date: Wed, 3 May 2023 07:42:19 -0500 From: Doug McIntyre To: FreeBSD Mailing List Subject: Re: PPPoE bridge / vlan? setup help needed Message-ID: References: <7c972cc1-3c49-ad0a-b86f-91bd0b978537@dreamchaser.org> <9A04451E-1BC7-402D-A5A5-B1B6466DBE56@FreeBSD.org> List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9A04451E-1BC7-402D-A5A5-B1B6466DBE56@FreeBSD.org> X-Virus-Scanned: ClamAV using ClamSMTP X-Spamd-Result: default: False [0.74 / 15.00]; NEURAL_SPAM_MEDIUM(1.00)[0.997]; NEURAL_SPAM_LONG(0.99)[0.987]; NEURAL_HAM_SHORT(-0.95)[-0.946]; R_SPF_ALLOW(-0.20)[+ptr]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:7753, ipnet:204.153.244.0/22, country:US]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[geeks.org]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; SUBJECT_HAS_QUESTION(0.00)[] X-Rspamd-Queue-Id: 4QBGmt70n0z3qBb X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N On Tue, May 02, 2023 at 09:37:58AM +0200, Kristof Provost wrote: > On 2 May 2023, at 3:32, Gary Aitken wrote: > > Having trouble setting up a dsl modem as a bridge. > > ISP info: > > Fixed IP > > LLC-Based multiplexing > > VPI 0 > > VCI 100 > > > > Nowhere in ppp.conf do I see anything about > > multiplexing mode, vpi, vci, or dsl mode; > With the disclaimer that it’s been ~15 years since I last looked at the relevant tech, but I think you’re confusing PPP over ATM (PPPoA) with PPP over Ethernet (PPPoE). > > VPI/VCI are ATM concepts, and do not exist in Ethernet land. Correct. Although there existed a PPPoA ADSL card that had drivers for FreeBSD at one point in time, where you could terminate your DSL connection directly into a FreeBSD machine to act as firewall/router. So that information would be required for configuration of such interface card. BUT, most likely that card even if found probably doesn't work with the DSL standards currently in use by ISPs today. Let alone if the company has kept up with kernel driver development to keep it still working. Most ISPs now-a-days will let you run either PPPoA or PPPoE. So use the CPE termination device they provide, turn it into bridge mode; and then setup PPPoE going through your ethernet and ignore the PVC info above. The CPE they provide would need to know the ATM VPI/VCC info quoted above (most likely autoconfiguring itself), and then passes all frames from the ATM connection down into ethernet frames, and FreeBSD can certainly do PPPoE termination to act as router/firewall for your network. From nobody Wed May 3 15:14:32 2023 X-Original-To: questions@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 4QBL8b4kqKz48wdN for ; Wed, 3 May 2023 15:14:39 +0000 (UTC) (envelope-from doug@safeport.com) Received: from fledge.watson.org (fledge.watson.org [147.160.157.40]) (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 (2048 bits) client-digest SHA256) (Client CN "A1-48603", Issuer "A1-48603" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QBL8Z43xJz43xq for ; Wed, 3 May 2023 15:14:38 +0000 (UTC) (envelope-from doug@safeport.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=fail (mx1.freebsd.org: domain of doug@safeport.com does not designate 147.160.157.40 as permitted sender) smtp.mailfrom=doug@safeport.com; dmarc=none Received: from fledge.watson.org (doug@localhost [127.0.0.1]) by fledge.watson.org (8.16.1/8.16.1) with ESMTPS id 343FEWba017674 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Wed, 3 May 2023 15:14:32 GMT (envelope-from doug@safeport.com) Received: from localhost (doug@localhost) by fledge.watson.org (8.16.1/8.16.1/Submit) with ESMTP id 343FEWSs017671 for ; Wed, 3 May 2023 15:14:32 GMT (envelope-from doug@safeport.com) X-Authentication-Warning: fledge.watson.org: doug owned process doing -bs Date: Wed, 3 May 2023 15:14:32 +0000 (UTC) From: doug Reply-To: doug@safeport.com To: questions@freebsd.org Subject: Re: ntpd error on a bridged network - solved In-Reply-To: Message-ID: <1fd48f26-ca84-ab40-5a2b-23afa3e8af1@safeport.com> References: List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spamd-Result: default: False [-2.04 / 15.00]; R_SPF_FAIL(1.00)[-all]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-0.98)[-0.979]; NEURAL_HAM_SHORT(-0.96)[-0.965]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[safeport.com]; MLMMJ_DEST(0.00)[questions@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; HAS_REPLYTO(0.00)[doug@safeport.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6405, ipnet:147.160.157.0/24, country:US]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; HAS_XAW(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; REPLYTO_ADDR_EQ_FROM(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4QBL8Z43xJz43xq X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N On Tue, 2 May 2023, Doug Denault wrote: > We replaced an old apple router with a Linksys Velop router. The apple router > was behind a Verizon router and we used DHCP from Verizon on the apple > device. To duplicate the setup we configured the Linksys in bridge mode. > > ntpd starts with the error: > ntpd: error resolving pool 0.freebsd.pool.ntp.org: Name does not resolve (8) > > however: > > host -t a 0.freebsd.pool.ntp.org > 0.freebsd.pool.ntp.org has address 174.53.169.69 > 0.freebsd.pool.ntp.org has address 192.241.155.186 > 0.freebsd.pool.ntp.org has address 38.229.53.9 > 0.freebsd.pool.ntp.org has address 38.229.57.9 > > ping -c 2 0.freebsd.pool.ntp.org > PING 0.freebsd.pool.ntp.org (94.237.120.208): 56 data bytes > 64 bytes from 94.237.120.208: icmp_seq=0 ttl=53 time=78.773 ms > 64 bytes from 94.237.120.208: icmp_seq=1 ttl=53 time=79.012 ms > > /etc/resolv.conf > # Generated by resolvconf > search boltsys.com > nameserver 192.168.2.1 > > Other than ntpd I see no DNS or connectivity issues. So far the time has been > holding at 2 seconds difference from the servers not on the office LAN. Well sorta. I was able to configure ntpd to bypass what I am pretty sure is is all do to Linksys bugs. Setting the ntpd start flag to "-4" keeps it from uselessly trying IPV6. In ntpd.conf I changed the pool setting to be: pool 0.north-america.pool.ntp.org iburst minpoll 5 maxpoll 12 With this ntpd works and keeps time with our internet facing servers. From nobody Wed May 3 17:49:57 2023 X-Original-To: freebsd-questions@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 4QBPc268wqz495L9 for ; Wed, 3 May 2023 17:50:10 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from nightmare.dreamchaser.org (ns.dreamchaser.org [66.109.141.57]) (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 (2048 bits) client-digest SHA256) (Client CN "discoveriesinwood.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QBPc15QLGz3F0T; Wed, 3 May 2023 17:50:09 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of freebsd@dreamchaser.org designates 66.109.141.57 as permitted sender) smtp.mailfrom=freebsd@dreamchaser.org; dmarc=none Received: from [192.168.151.122] (breakaway [192.168.151.122]) by nightmare.dreamchaser.org (8.16.1/8.16.1) with ESMTP id 343Hnvoe012634; Wed, 3 May 2023 11:49:58 -0600 (MDT) (envelope-from freebsd@dreamchaser.org) Message-ID: Date: Wed, 3 May 2023 10:49:57 -0700 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 Reply-To: freebsd@dreamchaser.org Subject: Re: PPPoE bridge / vlan? setup help needed Content-Language: en-US To: Kristof Provost , smithi@nimnet.asn.au Cc: FreeBSD Mailing List References: <7c972cc1-3c49-ad0a-b86f-91bd0b978537@dreamchaser.org> <9A04451E-1BC7-402D-A5A5-B1B6466DBE56@FreeBSD.org> From: Gary Aitken In-Reply-To: <9A04451E-1BC7-402D-A5A5-B1B6466DBE56@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.4 (nightmare.dreamchaser.org [192.168.151.101]); Wed, 03 May 2023 11:50:00 -0600 (MDT) X-Spamd-Result: default: False [-1.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; NEURAL_SPAM_SHORT(0.79)[0.795]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; ASN(0.00)[asn:21947, ipnet:66.109.128.0/19, country:US]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; HAS_REPLYTO(0.00)[freebsd@dreamchaser.org]; DMARC_NA(0.00)[dreamchaser.org]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_THREE(0.00)[3]; RCVD_TLS_LAST(0.00)[]; TO_DN_SOME(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; SUBJECT_HAS_QUESTION(0.00)[] X-Rspamd-Queue-Id: 4QBPc15QLGz3F0T X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N Thanks all for your replies; Slow following up; trying not to ask questions I can find the answer to somewhere else, trying to do my due diligence... On 5/2/23 00:37, Kristof Provost wrote: > On 2 May 2023, at 3:32, Gary Aitken wrote: >> Having trouble setting up a dsl modem as a bridge. ISP info: Fixed >> IP LLC-Based multiplexing VPI 0 VCI 100 ... > With the disclaimer that it’s been ~15 years since I last looked at > the relevant tech, but I think you’re confusing PPP over ATM (PPPoA) > with PPP over Ethernet (PPPoE). > > VPI/VCI are ATM concepts, and do not exist in Ethernet land. Having never done this before I've had trouble understanding how to go about it, and more trouble finding info. Obviously have/had some things cross-wired in my head, and probably still do. It's my understanding that the modem connects to the ADSL line using ATM technology, and as such uses the vpi and vci I've given it in its configuration. As nearly as I can tell it makes that connection ok. In its status report I see the line up and at the proper speed, proper vpi and vci. It also reports the IP addr and mask for my LAN end of the link, but no IP info for the ADSL port. So the question becomes how does it connect to the fbsd firewall? Do I actually need to run ppp or mpd if it's bridged? In talking to my ISP, who's limiting information because they don't like to deal with customer-owned equipment (i.e. not rented from them, but also understandably avoid the time needed to educate the uneducated), I asked if in bridged mode they ran PPPoE or PPPoA, and he said the modem should "just connect to the firewall machine like any other network". I've not been successful finding references so I could be wrong, but I tried leaving ppp out of the link: Relevant IPs reported by modem in modem-router mode, linked up: ADSL Port: 66.109.136.47 255.255.255.255 ADSL link IP 69.51.80.35 gateway address LAN Port: 66.109.141.58 255.255.255.248 fbsd end In modem-only (bridge) mode, there is no LAN ip/mask nor gateway ip So, with modem in bridge mode, I set up: Relevant part of routing table: Destination Gateway Flags Netif Expire default 69.51.80.35 UGS xl0 66.109.141.56/29 link#1 U xl0 66.109.141.57 link#1 UHS lo0 69.51.80.35 66.109.141.58 UGHS xl0 127.0.0.1 link#3 UH lo0 xl0: flags=8843 metric 0 mtu 1500 options=80008 inet 66.109.141.57 netmask 0xfffffff8 broadcast 66.109.141.63 From the fbsd machine (.57), ping results: # ping 66.109.141.58 (modem, fbsd end) PING 66.109.141.58 (66.109.141.58): 56 data bytes 64 bytes from 66.109.141.58: icmp_seq=0 ttl=64 time=1.211 ms but # ping 66.109.136.47 (IP at ADSL port when modem is in routed mode) PING 66.109.136.47 (66.109.136.47): 56 data bytes ^C --- 66.109.136.47 ping statistics --- 4 packets transmitted, 0 packets received, 100.0% packet loss # ping 69.51.80.35 (gateway on ISP end of line) PING 69.51.80.35 (69.51.80.35): 56 data bytes 92 bytes from 66.109.141.58: Destination Net Unreachable Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 5 00 0054 3f08 0 0000 40 01 d6a4 66.109.141.57 69.51.80.35 Since a ping of the modem IP succeeds but neither a ping of the gateway nor the ADSL link end worked, given the net unreachable for the gateway, I added an alias to the fbsd xl0 port: # ifconfig xl0 66.109.141.58/29 alias That simply changed the ping of the ADSL port from no response to a Destination Net Unreachable error. Upshot of all that is it looks like a direct connection without PPPoE doesn't work. Aside: I ISP asked about renting their preferred modem (Zyxel VMG 4005 B50B) and they said they don/t rent them separately, you have to rent them with their preferred router... Also looked but couldn't find one elsewhere. so... On 5/2/23 08:08, Ian Smith wrote: > It's most likely already set 0/100 for your country or region. Here > it's 0/35 (IIRC). Similarly LLC or ... the other one :) yep > Does the ISP offer ipv6? If so, is this all you have to dl to > disable it? I'm pretty sure no ipv6 from isp. I found the disable ... somewhere, and put it in. I see no IP6CP in the exchanges so I think it works. >> my.isp.assigned.ip/29 0.0.0.0 add! default HISADDR # Override >> existing default route with new one > > Not sure you need the '!' ? Without the ! it won't overwrite an old existing one. At least that's what I determined once upon a time 15 yrs ago. Can't remember where I read/learned that but I did verify it (I think) while doing all this messing around. > I think that's ok ... chatty, ain't it .. Chatty is good, in this case :-) >> tun0: CCP: FSM: Using "deflink" as a transport >> tun0: CCP: deflink: State change Initial --> Closed >> tun0: CCP: deflink: LayerStart. >> tun0: CCP: MPPE: Not usable without CHAP81 > > This looks maybe ominous. I wondered about that but thought it would just send uncompressed? I haven't seen ppp options to set no compression. So at this point hoping for the best, you get a nak and don't do it. Docs from Allied Telesis https://www.alliedtelesis.com/sites/default/files/ppp_feature_config_guide_rev_b.pdf says the config request is a "wish list", and if it gets a nak or reject reply it should come up with a new wish list. I think I see that sent out in the lines: IPCP: deflink: SendConfigReq(2) state = Ack-Sent IPCP: IPADDR[6] 66.109.141.58 right before the reject of the other address. I'm inferring that a reject reply allows for renegotiation but a nak is a flat-out can't do it, given that the nak (unacceptable address) on the other addr later results in closing the connection. >> tun0: IPCP: deflink: RecvConfigRej(1) state = Ack-Sent >> tun0: LCP: deflink: SendIdent(1) state = Opened >> tun0: LCP: MAGICNUM 3bbf5181 >> tun0: LCP: TEXT user-ppp 3.4.2 >> tun0: IPCP: COMPPROTO[6] 16 VJ slots with slot compression >> tun0: IPCP: deflink: SendConfigReq(2) state = Ack-Sent >> tun0: IPCP: IPADDR[6] my.isp.assigned.ip >> tun0: IPCP: deflink: RecvConfigNak(2) state = Ack-Sent >> tun0: IPCP: IPADDR[6] 66.109.136.47 > > But they want you to use this 66. address, is that related or similar > to the address 'my.isp.assigned.ip'? Within your /29? It's the IP addr reported by the modem for the ADSL line when in routed mode. Not exactly sure what that means when in bridge mode. My ISP couldn't / wouldn't tell me exactly what it was, did some vague hand-waving saying that really wasn't what it was and I didn't need to know and that if I configured my end properly it would just work and to not worry about it. Uh-huh. Repeated when I said "but that's the addr which is causing trouble.) >> *** tun0: IPCP: 66.109.136.47: Unacceptable address! > > So you reject it. Maybe if you don't insist on 'my.isp.assigned.ip' > it might go - but then they've provided the wrong info. Thought maybe I reject it because it's not in my /29; or because I already accepted the previous addr they asked for. I suppose if it's not in my /29 and I accepted it, all I would need to do is add a route to the routing table, which might happen automatically with the add! default HISADDR. This smells like different ppp code in the router and fbsd, and the router code may simply throw out the first agreed-upon addr when it gets the second suggested. I tried using 0.0.0.0 as my suggested IP, to see if they would come up with the 66.109.136.47 the first time: 1 tun0: IPCP: deflink: SendConfigReq(2) state = Ack-Sent 2 tun0: IPCP: IPADDR[6] 0.0.0.0 3 tun0: IPCP: deflink: RecvConfigNak(2) state = Ack-Sent 4 tun0: IPCP: IPADDR[6] 66.109.136.47 5 tun0: IPCP: IPADDR[6] changing address: 0.0.0.0 --> 66.109.136.47 6 tun0: IPCP: deflink: SendConfigReq(3) state = Ack-Sent 7 tun0: IPCP: IPADDR[6] 66.109.136.47 8 tun0: LCP: deflink: RecvTerminateReq(8) state = Opened So when I send back a config request to use that addr on line 7 why do I get a terminate back? It would be really handy to be able to see the negotiation on the back side of the modem, but I have no way to do that. > At this stage I'd send them the log and ask what's up? I think I'm going to try mpd first, if I can figure that out without documentation other than the example.conf. When I pointed out to them many years ago that they had a routing problem it was like pulling teeth to get them to admit it and fix it. "No one else is having problems, (i.e. complaining) so it has to be at your end." A traceroute eventually convinced them, but it took a while. > We moved from user ppp to mpd C. '07, and found it better and easier, > but that won't help if their setup info is wrong. Thanks, I'll see if I can figure out mpd and maybe it will work better. Have the mpd5 port installed, but I can't seem to find docs anywhere. The Handbook, ch 29.5.1, refers to a "Complete guide to configure mpd" in /usr/ports/shared/doc/mpd. There is no /usr/ports/shared, and I see nothing other than mpd5 in /usr/ports that looks like it might be relevant. Also nothing in /usr/local/share/doc/. Thanks, Gary From nobody Wed May 3 19:24:34 2023 X-Original-To: freebsd-questions@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 4QBRj71NbNz499Xs for ; Wed, 3 May 2023 19:24:43 +0000 (UTC) (envelope-from trkellers@gmail.com) Received: from mail-oo1-xc2e.google.com (mail-oo1-xc2e.google.com [IPv6:2607:f8b0:4864:20::c2e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QBRj575NYz3kFg; Wed, 3 May 2023 19:24:41 +0000 (UTC) (envelope-from trkellers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oo1-xc2e.google.com with SMTP id 006d021491bc7-541bec0c05dso313813eaf.1; Wed, 03 May 2023 12:24:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683141877; x=1685733877; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=m1CO685BToHpCD/bBt7H1txr1s+Rj3mYmcYl0BVai9E=; b=quk19wVZXtO4tLowsLurVXBdffbYz+UVAbDdRRYsh5CbfzzYx7qA98q82ogo0BDLuu x4Q+DH7MPneJy5sPUaLmRAfdBvLwArSgV9lT32mkNCs9sGXfJZD5+Kt/kZr6Y80UZp5R wmSMD2C5OPEufA0kJOMm2h1OdKMSw8aKIfu0a9RnaQfcWSfHQTnNSEYuFha7/M90ze6f A2MDUT9cuL+78RvY85X8wQoZvE1nEzaorjqKDQch/Sj8PMXIacKaYqCqH9dzIPbPLliS pz74wMhouw7M/7wZ5HLShwZmdqoBsssH2XPtjbtbWiJeQdVYPiCb+PF1YdlMcEf8lDzz 77hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683141877; x=1685733877; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=m1CO685BToHpCD/bBt7H1txr1s+Rj3mYmcYl0BVai9E=; b=T+klzlC4F6I8Te+Gh0kKYKPf5PVJcpNtxcjmb7Ht4nFwwy9ug+X+TQ8lbpb9Nkaj6i jV6NkvPL/x/0VKrNhyqzKv17HY2j1D/TOU+7CHRPF7FD26brIOekHn/IRqNRZia3pBSX 8TxIBgXKIg1VZXVYkMSFle3HBZd5UID1tbFYdPIpZfFc9KAI3ADuB5NNltnaqMP1wU+9 phYNhpn9uPQceAGJOt+zy1esUwu7qab1IZcPfwYLLIxoraHnQy3k+moWQxYQvPkRS96Z NwIyjauCiGmnmoOfqZdHtcV411Jg4Hr7+mROe8PNcIGdcbEP74l5ptU28IlrjPCcUXpw uAog== X-Gm-Message-State: AC+VfDxST7C3ZUACReAEQQThX++vAAdAkxyItxFHUBJZOXyk/WtcCX/z oYIG5+a44t6Vv67vbqfFS8cWoUCPlSU= X-Google-Smtp-Source: ACHHUZ40xywT45ymP899slbd983UIMaKleLINQlfKNlsYBfVCp4MZr4Lysi24CTZcHSAN9gv7b6x7g== X-Received: by 2002:aca:de82:0:b0:392:2c62:d2ec with SMTP id v124-20020acade82000000b003922c62d2ecmr2482649oig.5.1683141876710; Wed, 03 May 2023 12:24:36 -0700 (PDT) Received: from [192.168.254.155] (50-123-138-145.drr01.mybh.sc.frontiernet.net. [50.123.138.145]) by smtp.gmail.com with ESMTPSA id l10-20020a54450a000000b0038e4c6fb8e0sm870281oil.58.2023.05.03.12.24.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 May 2023 12:24:36 -0700 (PDT) Message-ID: <7cf0a192-f78e-5aed-9b8d-a41c18d9337b@gmail.com> Date: Wed, 3 May 2023 15:24:34 -0400 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.10.1 Subject: Re: PPPoE bridge / vlan? setup help needed To: freebsd@dreamchaser.org, Kristof Provost , smithi@nimnet.asn.au Cc: FreeBSD Mailing List References: <7c972cc1-3c49-ad0a-b86f-91bd0b978537@dreamchaser.org> <9A04451E-1BC7-402D-A5A5-B1B6466DBE56@FreeBSD.org> Content-Language: en-US From: TIM KELLERS In-Reply-To: Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4QBRj575NYz3kFg X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N

Did you do a "make config" on mpd5?

root@serendipity35-copy:/usr/local/share/doc/mpd5 # ls
README        mpd17.html    mpd27.html    mpd37.html    mpd47.html    mpd57.html    mpd67.html
mpd.html    mpd18.html    mpd28.html    mpd38.html    mpd48.html    mpd58.html    mpd68.html
mpd.ps        mpd19.html    mpd29.html    mpd39.html    mpd49.html    mpd59.html    mpd69.html
mpd1.html    mpd2.html    mpd3.html    mpd4.html    mpd5.html    mpd6.html    mpd7.html
mpd10.html    mpd20.html    mpd30.html    mpd40.html    mpd50.html    mpd60.html    mpd70.html
mpd11.html    mpd21.html    mpd31.html    mpd41.html    mpd51.html    mpd61.html    mpd8.html
mpd12.html    mpd22.html    mpd32.html    mpd42.html    mpd52.html    mpd62.html    mpd9.html
mpd13.html    mpd23.html    mpd33.html    mpd43.html    mpd53.html    mpd63.html    mpd_toc.html
mpd14.html    mpd24.html    mpd34.html    mpd44.html    mpd54.html    mpd64.html
mpd15.html    mpd25.html    mpd35.html    mpd45.html    mpd55.html    mpd65.ht


Tim

On 5/3/23 1:49 PM, Gary Aitken wrote:
Thanks all for your replies;
Slow following up; trying not to ask questions I can find the answer
to somewhere else, trying to do my due diligence...

On 5/2/23 00:37, Kristof Provost wrote:
On 2 May 2023, at 3:32, Gary Aitken wrote:
Having trouble setting up a dsl modem as a bridge. ISP info: Fixed IP LLC-Based multiplexing VPI 0 VCI 100
...
With the disclaimer that it’s been ~15 years since I last looked at the relevant tech, but I think you’re confusing PPP over ATM (PPPoA) with PPP over Ethernet (PPPoE).

VPI/VCI are ATM concepts, and do not exist in Ethernet land.

Having never done this before I've had trouble understanding how to
go about it, and more trouble finding info.  Obviously have/had some
things cross-wired in my head, and probably still do.

It's my understanding that the modem connects to the ADSL line using
ATM technology, and as such uses the vpi and vci I've given it in its
configuration.  As nearly as I can tell it makes that connection ok.
In its status report I see the line up and at the proper speed, proper
vpi and vci.  It also reports the IP addr and mask for my LAN end of
the link, but no IP info for the ADSL port.

So the question becomes how does it connect to the fbsd firewall?
Do I actually need to run ppp or mpd if it's bridged?
In talking to my ISP, who's limiting information because they
don't like to deal with customer-owned equipment (i.e. not rented
from them, but also understandably avoid the time needed to educate
the uneducated), I asked if in bridged mode they ran PPPoE or PPPoA,
and he said the modem should "just connect to the firewall machine
like any other network".  I've not been successful finding references
so I could be wrong, but I tried leaving ppp out of the link:

Relevant IPs reported by modem in modem-router mode, linked up:
  ADSL Port:
    66.109.136.47 255.255.255.255   ADSL link IP
    69.51.80.35                     gateway address
  LAN Port:
    66.109.141.58 255.255.255.248   fbsd end
In modem-only (bridge) mode, there is no LAN ip/mask nor gateway ip

So, with modem in bridge mode, I set up:
Relevant part of routing table:

Destination        Gateway            Flags     Netif Expire
default            69.51.80.35        UGS         xl0
66.109.141.56/29   link#1             U           xl0
66.109.141.57      link#1             UHS         lo0
69.51.80.35        66.109.141.58      UGHS        xl0
127.0.0.1          link#3             UH          lo0

xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=80008<VLAN_MTU,LINKSTATE>
        inet 66.109.141.57 netmask 0xfffffff8 broadcast 66.109.141.63

From the fbsd machine (.57), ping results:

# ping 66.109.141.58     (modem, fbsd end)
PING 66.109.141.58 (66.109.141.58): 56 data bytes
64 bytes from 66.109.141.58: icmp_seq=0 ttl=64 time=1.211 ms

but

# ping 66.109.136.47 (IP at ADSL port when modem is in routed mode)
PING 66.109.136.47 (66.109.136.47): 56 data bytes
^C
--- 66.109.136.47 ping statistics ---
4 packets transmitted, 0 packets received, 100.0% packet loss

# ping 69.51.80.35   (gateway on ISP end of line)
PING 69.51.80.35 (69.51.80.35): 56 data bytes
92 bytes from 66.109.141.58: Destination Net Unreachable
Vr HL TOS  Len   ID Flg  off TTL Pro  cks      Src      Dst
 4  5  00 0054 3f08   0 0000  40  01 d6a4 66.109.141.57  69.51.80.35

Since a ping of the modem IP succeeds but neither a ping of the gateway
nor the ADSL link end worked, given the net unreachable for the gateway,
I added an alias to the fbsd xl0 port:

# ifconfig xl0 66.109.141.58/29 alias

That simply changed the ping of the ADSL port from no response
to a Destination Net Unreachable error.

Upshot of all that is it looks like a direct connection without PPPoE
doesn't work.

Aside: I ISP asked about renting their preferred modem
 (Zyxel VMG 4005 B50B)
and they said they don/t rent them separately, you have to rent them
with their preferred router...  Also looked but couldn't find one
elsewhere.

so...

On 5/2/23 08:08, Ian Smith wrote:

It's most likely already set 0/100 for your country or region. Here
it's 0/35 (IIRC). Similarly LLC or ... the other one :)

yep

Does the ISP offer ipv6?  If so, is this all you have to dl to
disable it?

I'm pretty sure no ipv6 from isp.
I found the disable ... somewhere, and put it in.
I see no IP6CP in the exchanges so I think it works.
 
my.isp.assigned.ip/29 0.0.0.0 add! default HISADDR     # Override
existing default route with new one

Not sure you need the '!' ?

Without the ! it won't overwrite an old existing one.
At least that's what I determined once upon a time 15 yrs ago.
Can't remember where I read/learned that but I did verify it (I think)
while doing all this messing around.

I think that's ok ... chatty, ain't it ..

Chatty is good, in this case :-)

tun0: CCP: FSM: Using "deflink" as a transport
tun0: CCP: deflink: State change Initial --> Closed
tun0: CCP: deflink: LayerStart. tun0: CCP: MPPE: Not usable without CHAP81

This looks maybe ominous.

I wondered about that but thought it would just send uncompressed?
I haven't seen ppp options to set no compression.
So at this point hoping for the best, you get a nak and don't do it.
Docs from Allied Telesis
 
https://www.alliedtelesis.com/sites/default/files/ppp_feature_config_guide_rev_b.pdf
says the config request is a "wish list", and if it gets a nak or
reject reply it should come up with a new wish list.  I think I see
that sent out in the lines:
   IPCP: deflink: SendConfigReq(2) state = Ack-Sent
   IPCP:  IPADDR[6] 66.109.141.58
right before the reject of the other address.
I'm inferring that a reject reply allows for renegotiation but a nak
is a flat-out can't do it, given that the nak (unacceptable address)
on the other addr later results in closing the connection.

tun0: IPCP: deflink: RecvConfigRej(1) state = Ack-Sent
tun0: LCP: deflink: SendIdent(1) state = Opened
tun0: LCP:  MAGICNUM 3bbf5181 tun0: LCP:  TEXT user-ppp 3.4.2
tun0: IPCP:  COMPPROTO[6] 16 VJ slots with slot compression
tun0: IPCP: deflink: SendConfigReq(2) state = Ack-Sent
tun0: IPCP:  IPADDR[6] my.isp.assigned.ip
tun0: IPCP: deflink: RecvConfigNak(2) state = Ack-Sent
tun0: IPCP: IPADDR[6] 66.109.136.47

But they want you to use this 66. address, is that related or similar
to the address 'my.isp.assigned.ip'?  Within your /29?

It's the IP addr reported by the modem for the ADSL line when in routed
mode.  Not exactly sure what that means when in bridge mode.  My ISP
couldn't / wouldn't tell me exactly what it was, did some vague
hand-waving saying that really wasn't what it was and I didn't need to
know and that if I configured my end properly it would just work and to
not worry about it.  Uh-huh.  Repeated when I said "but that's the addr
which is causing trouble.)

***  tun0: IPCP: 66.109.136.47: Unacceptable address!

So you reject it.  Maybe if you don't insist on 'my.isp.assigned.ip'
it might go - but then they've provided the wrong info.

Thought maybe I reject it because it's not in my /29; or because I
already accepted the previous addr they asked for.  I suppose if it's
not in my /29 and I accepted it, all I would need to do is add a route
to the routing table, which might happen automatically with the
add! default HISADDR.

This smells like different ppp code in the router and fbsd, and the
router code may simply throw out the first agreed-upon addr when it
gets the second suggested.

I tried using 0.0.0.0 as my suggested IP, to see if they would come
up with the 66.109.136.47 the first time:

 1 tun0: IPCP: deflink: SendConfigReq(2) state = Ack-Sent
 2 tun0: IPCP:  IPADDR[6] 0.0.0.0
 3 tun0: IPCP: deflink: RecvConfigNak(2) state = Ack-Sent
 4 tun0: IPCP:  IPADDR[6] 66.109.136.47
 5 tun0: IPCP:  IPADDR[6] changing address: 0.0.0.0  --> 66.109.136.47
 6 tun0: IPCP: deflink: SendConfigReq(3) state = Ack-Sent
 7 tun0: IPCP:  IPADDR[6] 66.109.136.47
 8 tun0: LCP: deflink: RecvTerminateReq(8) state = Opened

So when I send back a config request to use that addr on line 7
why do I get a terminate back?
It would be really handy to be able to see the negotiation on the
back side of the modem, but I have no way to do that.

At this stage I'd send them the log and ask what's up?

I think I'm going to try mpd first, if I can figure that out without
documentation other than the example.conf.  When I pointed out to them
many years ago that they had a routing problem it was like pulling
teeth to get them to admit it and fix it.  "No one else is having
problems, (i.e. complaining) so it has to be at your end."  A
traceroute eventually convinced them, but it took a while.

We moved from user ppp to mpd C. '07, and found it better and easier,
but that won't help if their setup info is wrong.

Thanks, I'll see if I can figure out mpd and maybe it will work better.
Have the mpd5 port installed, but I can't seem to find docs anywhere.

The Handbook, ch 29.5.1, refers to a "Complete guide to configure mpd"
in /usr/ports/shared/doc/mpd.  There is no /usr/ports/shared, and I
see nothing other than mpd5 in /usr/ports that looks like it might be
relevant.  Also nothing in /usr/local/share/doc/.

Thanks,

Gary

From nobody Wed May 3 20:08:43 2023 X-Original-To: freebsd-questions@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 4QBSh026rgz49CjK for ; Wed, 3 May 2023 20:08:48 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from nightmare.dreamchaser.org (ns.dreamchaser.org [66.109.141.57]) (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 (2048 bits) client-digest SHA256) (Client CN "discoveriesinwood.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QBSgz4ZSLz3nGb; Wed, 3 May 2023 20:08:47 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Authentication-Results: mx1.freebsd.org; none Received: from [192.168.151.122] (breakaway [192.168.151.122]) by nightmare.dreamchaser.org (8.16.1/8.16.1) with ESMTP id 343K8hIf012997; Wed, 3 May 2023 14:08:44 -0600 (MDT) (envelope-from freebsd@dreamchaser.org) Message-ID: <31bbe1a8-6ad1-0fb1-d15b-38081ef57066@dreamchaser.org> Date: Wed, 3 May 2023 13:08:43 -0700 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 Reply-To: freebsd@dreamchaser.org Subject: Re: PPPoE bridge / vlan? setup help needed Content-Language: en-US To: TIM KELLERS , Kristof Provost , smithi@nimnet.asn.au Cc: FreeBSD Mailing List References: <7c972cc1-3c49-ad0a-b86f-91bd0b978537@dreamchaser.org> <9A04451E-1BC7-402D-A5A5-B1B6466DBE56@FreeBSD.org> <7cf0a192-f78e-5aed-9b8d-a41c18d9337b@gmail.com> From: Gary Aitken In-Reply-To: <7cf0a192-f78e-5aed-9b8d-a41c18d9337b@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.4 (nightmare.dreamchaser.org [192.168.151.101]); Wed, 03 May 2023 14:08:45 -0600 (MDT) X-Rspamd-Queue-Id: 4QBSgz4ZSLz3nGb X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:21947, ipnet:66.109.128.0/19, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 5/3/23 12:24, TIM KELLERS wrote: > Did you do a "make config" on mpd5? Thanks. No, I installed the pkg and assumed it would install all the relevant docs. Don't know if that's considered a bug or not. My oversight, thanks. Gary From nobody Wed May 3 20:13:31 2023 X-Original-To: freebsd-questions@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 4QBSnV1Tp9z49DJd for ; Wed, 3 May 2023 20:13:34 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from nightmare.dreamchaser.org (ns.dreamchaser.org [66.109.141.57]) (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 (2048 bits) client-digest SHA256) (Client CN "discoveriesinwood.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QBSnT3MCbz3pyg; Wed, 3 May 2023 20:13:33 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of freebsd@dreamchaser.org designates 66.109.141.57 as permitted sender) smtp.mailfrom=freebsd@dreamchaser.org; dmarc=none Received: from [192.168.151.122] (breakaway [192.168.151.122]) by nightmare.dreamchaser.org (8.16.1/8.16.1) with ESMTP id 343KDVJR013019; Wed, 3 May 2023 14:13:31 -0600 (MDT) (envelope-from freebsd@dreamchaser.org) Message-ID: <3b9ef85d-7cb6-60bb-1735-944e2ffd4c0b@dreamchaser.org> Date: Wed, 3 May 2023 13:13:31 -0700 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 Subject: Re: PPPoE bridge / vlan? setup help needed Content-Language: en-US From: Gary Aitken To: TIM KELLERS , Kristof Provost , smithi@nimnet.asn.au Cc: FreeBSD Mailing List Reply-To: freebsd@dreamchaser.org, freebsd@dreamchaser.org References: <7c972cc1-3c49-ad0a-b86f-91bd0b978537@dreamchaser.org> <9A04451E-1BC7-402D-A5A5-B1B6466DBE56@FreeBSD.org> <7cf0a192-f78e-5aed-9b8d-a41c18d9337b@gmail.com> <31bbe1a8-6ad1-0fb1-d15b-38081ef57066@dreamchaser.org> In-Reply-To: <31bbe1a8-6ad1-0fb1-d15b-38081ef57066@dreamchaser.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.4 (nightmare.dreamchaser.org [192.168.151.101]); Wed, 03 May 2023 14:13:32 -0600 (MDT) X-Spamd-Result: default: False [-3.08 / 15.00]; NEURAL_HAM_LONG(-1.00)[-0.997]; NEURAL_HAM_SHORT(-0.97)[-0.971]; NEURAL_HAM_MEDIUM(-0.81)[-0.807]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; FREEMAIL_TO(0.00)[gmail.com,FreeBSD.org,nimnet.asn.au]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:21947, ipnet:66.109.128.0/19, country:US]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; HAS_REPLYTO(0.00)[freebsd@dreamchaser.org]; DMARC_NA(0.00)[dreamchaser.org]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; TO_DN_SOME(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; SUBJECT_HAS_QUESTION(0.00)[] X-Rspamd-Queue-Id: 4QBSnT3MCbz3pyg X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On 5/3/23 13:08, Gary Aitken wrote: > On 5/3/23 12:24, TIM KELLERS wrote: >> Did you do a "make config" on mpd5? > > Thanks.  No, I installed the pkg and assumed it would install all the > relevant docs.  Don't know if that's considered a bug or not. > My oversight, thanks. Ugh, red-faced. Windows open on multiple systems, searched for the docs on the system which mpd wasn't installed on. Gary From nobody Wed May 3 22:02:22 2023 X-Original-To: questions@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 4QBWCj0bFBz49K8F for ; Wed, 3 May 2023 22:02:57 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from h1.out2.mxs.au (h1.out2.mxs.au [110.232.143.236]) (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 4QBWCh1km8z40Nk for ; Wed, 3 May 2023 22:02:55 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Authentication-Results: mx1.freebsd.org; none Received: from s121.syd3.hostingplatform.net.au (s121.syd3.hostingplatform.net.au [103.27.34.4]) by out2.mxs.au (Halon) with ESMTPS id 3573fb04-e9fe-11ed-9cc9-00163c1ebd60; Thu, 04 May 2023 08:02:34 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nimnet.asn.au; s=default; h=Message-ID:From:CC:To:Subject: Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To: Date:Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=vvguXwOZhaCMV4w9Jswhm7CEVnSKtyn4AfvJfLtbMnc=; b=Kvh/NbydLFbZkprF8r6jEOjha+ nHFFHnsJVp2Tjd6+6bELc/EW9MSiz1z8Ihj3nzJEvtnrjzGvzKd9S58CcFZ7eW9BY0gVGXQZydsu9 kao0DGMYMxHBatRAJ+7Ot17wR0NeNkE3n8+24yUstK+Y+ijcYzEBbX6MeORR2WBNk1IhaU06YqUts iyxKjMfqsp/8KStFysdAztCuZZHJU5iRt0F+qVrVOA/ZWMHFro/P4o4jyeYXFaXVd3LT9uP+mWRNg 8GQs/CcIUXZ3duefXXaQNzYcAxkgjrS+ER/+U55wLMccTwwMjnk78iLKP1405vYNSCj8MWMcxVkJA tf7k0/lQ==; Received: from [1.129.224.7] (port=54571 helo=Galaxy-J5-Pro) by s121.syd3.hostingplatform.net.au with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1puKYT-0031Pe-32; Thu, 04 May 2023 08:02:34 +1000 Date: Thu, 04 May 2023 08:02:22 +1000 User-Agent: K-9 Mail for Android In-Reply-To: References: <7c972cc1-3c49-ad0a-b86f-91bd0b978537@dreamchaser.org> <9A04451E-1BC7-402D-A5A5-B1B6466DBE56@FreeBSD.org> List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: PPPoE bridge / vlan? setup help needed To: Gary Aitken CC: Kristof Provost ,questions@freebsd.org From: Ian Smith Message-ID: <547039FF-357F-4B16-80C6-D2AC2B710C38@nimnet.asn.au> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s121.syd3.hostingplatform.net.au X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nimnet.asn.au X-Get-Message-Sender-Via: s121.syd3.hostingplatform.net.au: authenticated_id: smithi@nimnet.asn.au X-Authenticated-Sender: s121.syd3.hostingplatform.net.au: smithi@nimnet.asn.au X-Source: X-Source-Args: X-Source-Dir: X-Rspamd-Queue-Id: 4QBWCh1km8z40Nk X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:45638, ipnet:110.232.140.0/22, country:AU] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4 May 2023 3:49:57 am AEST, Gary Aitken wrot= e: > Thanks all for your replies; > Slow following up; trying not to ask questions I can find the answer > to somewhere else, trying to do my due diligence=2E=2E=2E No worries, but don't hesitate to ask (as I too often do :) > On 5/2/23 00:37, Kristof Provost wrote: > > On 2 May 2023, at 3:32, Gary Aitken wrote: > >> Having trouble setting up a dsl modem as a bridge=2E ISP info: Fixed >=20 > >> IP LLC-Based multiplexing VPI 0 VCI 100 > =2E=2E=2E > > With the disclaimer that it=E2=80=99s been ~15 years since I last loo= ked at >=20 > > the relevant tech, but I think you=E2=80=99re confusing PPP over ATM > (PPPoA)=20 > > with PPP over Ethernet (PPPoE)=2E > >=20 > > VPI/VCI are ATM concepts, and do not exist in Ethernet land=2E > Having never done this before I've had trouble understanding how to > go about it, and more trouble finding info=2E Obviously have/had some > things cross-wired in my head, and probably still do=2E 10 years ago, everyone knew about DSL modems; now, rarer in rich countries= =2E > It's my understanding that the modem connects to the ADSL line using > ATM technology, and as such uses the vpi and vci I've given it in its > configuration=2E As nearly as I can tell it makes that connection ok= =2E > In its status report I see the line up and at the proper speed, > proper > vpi and vci=2E It also reports the IP addr and mask for my LAN end of > the link, but no IP info for the ADSL port=2E Correct=2E > So the question becomes how does it connect to the fbsd firewall? > Do I actually need to run ppp or mpd if it's bridged? Yes=2E Your choice is to run the unit as a router plus modem (router mode= , where it handles the PPPoE|A connection) or 'just' a modem, handing off r= aw frames to your PPPoE client, such as userppp or mpd5=2E You've chosen to run it as a bridge, which has advantages but also some di= fficulty, as you're experiencing=2E One advantage that's a difficulty if y= ou get it wrong is that the (likely limited) firewall in the modem plus rou= ter mode is now up to you=2E I call that a plus, but plenty would rather n= ot=2E > In talking to my ISP, who's limiting information because they > don't like to deal with customer-owned equipment (i=2Ee=2E not rented > from them, but also understandably avoid the time needed to educate > the uneducated), I asked if in bridged mode they ran PPPoE or PPPoA, > and he said the modem should "just connect to the firewall machine > like any other network"=2E Yeah, sorry =2E=2E=2E mosf ISP helpdesk drones know 10% of SFA=2E Finding= the right ISP is more than half the challenge, so ignore my suggestions to= seek help there=2E > so I could be wrong, but I tried leaving ppp out of the link: Couldn't work, but clues from addresses: > Relevant IPs reported by modem in modem-router mode, linked up: > ADSL Port: > 66=2E109=2E136=2E47 255=2E255=2E255=2E255 ADSL link IP > 69=2E51=2E80=2E35 gateway address Ok, 66=2E109=2E136=2E47/32 is the local PPP (point to point protocol) addr= ess=2E That's the one your initial setup, below, refused to accept, because your = end was insisting on "my=2Eisp=2Eassigned=2Eip" which I think is your addre= ss in your assigned /29, NOT the (also probably fixed) IP address of your s= ide of the PPP link (=2E=2E=2E47) As mentioned in offlist mail, a separate IP addr to your routed subnet, wh= ether fixed or dynamic, is or was common for ppp, and what my /29 had for y= ears=2E Also, gateway there refers to the modem/router's gateway, not yours=2E I'm dropping the rest of this explore =2E=2E=2E [ =2E=2E=2E ] > Upshot of all that is it looks like a direct connection without PPPoE > doesn't work=2E Right=2E > Aside: I ISP asked about renting their preferred modem > (Zyxel VMG 4005 B50B) > and they said they don/t rent them separately, you have to rent them > with their preferred router=2E=2E=2E Also looked but couldn't find one > elsewhere=2E I'd be looking for another ISP, myself=2E=20 And having published your various IP ranges, a fresh set and a pretty para= noid firewall wouldn't hurt=2E Trimming =2E=2E=2E > > Not sure you need the '!' ? >=20 > Without the ! it won't overwrite an old existing one=2E Ok, ppp(8)=2E > >> tun0: CCP: deflink: LayerStart=2E=20 > >> tun0: CCP: MPPE: Not usable without CHAP81 > >=20 > > This looks maybe ominous=2E >=20 > I wondered about that but thought it would just send uncompressed? > I haven't seen ppp options to set no compression=2E No, but likely deflate or pred1 is ok=2E > So at this point hoping for the best, you get a nak and don't do it=2E The nak is only for MPPE (multilink?) > Docs from Allied Telesis > https://www=2Ealliedtelesis=2Ecom/sites/default/files/ppp_feature_confi= g_guide_rev_b=2Epdf > says the config request is a "wish list", and if it gets a nak or > reject reply it should come up with a new wish list=2E I think I see Indeed=2E > that sent out in the lines: > IPCP: deflink: SendConfigReq(2) state =3D Ack-Sent > IPCP: IPADDR[6] 66=2E109=2E141=2E58 > right before the reject of the other address=2E > I'm inferring that a reject reply allows for renegotiation but a nak > is a flat-out can't do it, given that the nak (unacceptable address) > on the other addr later results in closing the connection=2E Yeah, I'm pretty sure the only real problem here is asking for the wrong l= ocal ppp address=2E Ask for 0=2E0=2E0=2E0/0 and later ask for what you get= , if you like=2E > >> tun0: IPCP: deflink: RecvConfigRej(1) state =3D Ack-Sent > >> tun0: LCP: deflink: SendIdent(1) state =3D Opened > >> tun0: LCP: MAGICNUM 3bbf5181=20 > >> tun0: LCP: TEXT user-ppp 3=2E4=2E2 > >> tun0: IPCP: COMPPROTO[6] 16 VJ slots with slot compression > >> tun0: IPCP: deflink: SendConfigReq(2) state =3D Ack-Sent > >> tun0: IPCP: IPADDR[6] my=2Eisp=2Eassigned=2Eip Yep=2E that's the (2nd) ask for the wrong address so =2E=2E=2E > >> tun0: IPCP: deflink: RecvConfigNak(2) state =3D Ack-Sent > >> tun0: IPCP: IPADDR[6] 66=2E109=2E136=2E47 No, they need you to accept this one! > not worry about it=2E Uh-huh=2E Repeated when I said "but that's the > addr > which is causing trouble=2E) >=20 > >> *** tun0: IPCP: 66=2E109=2E136=2E47: Unacceptable address! No, it's unacceptable because you've insisted on an addfress in your /29,= which is wrong=2E > > So you reject it=2E Maybe if you don't insist on > 'my=2Eisp=2Eassigned=2Eip' > > it might go - but then they've provided the wrong info=2E Not wrong, just confused=2E Most customers a) use their router and b) hav= e a single IP address=2E=20 > Thought maybe I reject it because it's not in my /29; or because I > already accepted the previous addr they asked for=2E No, you accepted the address they offered as _their_ end of the ppp link= =2E > I suppose if it's > not in my /29 and I accepted it, all I would need to do is add a > route > to the routing table, which might happen automatically with the > add! default HISADDR=2E From=20your box in the /29, you just need to have the default route via the = ppp IP, which ppp should determine as HISADDR which is reached via our ppp = link addr=2E Don't force anything, it should go=2E > I tried using 0=2E0=2E0=2E0 as my suggested IP, to see if they would co= me > up with the 66=2E109=2E136=2E47 the first time: >=20 > 1 tun0: IPCP: deflink: SendConfigReq(2) state =3D Ack-Sent > 2 tun0: IPCP: IPADDR[6] 0=2E0=2E0=2E0 > 3 tun0: IPCP: deflink: RecvConfigNak(2) state =3D Ack-Sent > 4 tun0: IPCP: IPADDR[6] 66=2E109=2E136=2E47 > 5 tun0: IPCP: IPADDR[6] changing address: 0=2E0=2E0=2E0 --> 66=2E109= =2E136=2E47 Correct! > 6 tun0: IPCP: deflink: SendConfigReq(3) state =3D Ack-Sent > 7 tun0: IPCP: IPADDR[6] 66=2E109=2E136=2E47 > 8 tun0: LCP: deflink: RecvTerminateReq(8) state =3D Opened Opened is ok, we're only terminating LCP section I expect=2E Anything aft= er that? > So when I send back a config request to use that addr on line 7 > why do I get a terminate back? > It would be really handy to be able to see the negotiation on the > back side of the modem, but I have no way to do that=2E In bridge mode, all negotiation happens in ppp=2E You are seeing it all, = but it can be confusing groking what it means =2E=2E=2E > > At this stage I'd send them the log and ask what's up? Yeah, nah =2E=2E=2E > I think I'm going to try mpd first, if I can figure that out without > documentation other than the example=2Econf=2E I think ppp is ready to go, once you stop expecting it to use an addr in t= he /29 > > We moved from user ppp to mpd C=2E '07, and found it better and > easier, > > but that won't help if their setup info is wrong=2E >=20 > Thanks, I'll see if I can figure out mpd and maybe it will work > better=2E > Have the mpd5 port installed, but I can't seem to find docs anywhere=2E % find /usr/local -name mpd5\* > The Handbook, ch 29=2E5=2E1, refers to a "Complete guide to configure > mpd" > in /usr/ports/shared/doc/mpd=2E There is no /usr/ports/shared, and I > see nothing other than mpd5 in /usr/ports that looks like it might be > relevant=2E Also nothing in /usr/local/share/doc/=2E See mpd5(8) /usr/local/share/doc/mpd5/ has a 70 odd page html manual=2E Maybe overkil= l, it's a powerful beastie, including PPPoE servers and other exotica=2E But seriously, if ppp still isn't working, post another log segment ( with= config ) cheers, Ian From nobody Thu May 4 15:53:10 2023 X-Original-To: freebsd-questions@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 4QByym044Jz49FYL for ; Thu, 4 May 2023 15:53:20 +0000 (UTC) (envelope-from kayasaman@optiplex-networks.com) Received: from mail.optiplex-networks.com (mail.optiplex-networks.com [212.159.80.20]) (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 4QByyk4NsHz3jlH for ; Thu, 4 May 2023 15:53:18 +0000 (UTC) (envelope-from kayasaman@optiplex-networks.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=optiplex-networks.com header.s=AE93A2AC-7F67-11EA-90AE-8A1FE64F6997 header.b=ETeSf4RX; spf=pass (mx1.freebsd.org: domain of kayasaman@optiplex-networks.com designates 212.159.80.20 as permitted sender) smtp.mailfrom=kayasaman@optiplex-networks.com Received: from localhost (localhost [127.0.0.1]) by mail.optiplex-networks.com (Postfix) with ESMTP id 3B39115C2C76 for ; Thu, 4 May 2023 16:53:11 +0100 (BST) Received: from mail.optiplex-networks.com ([127.0.0.1]) by localhost (mail.optiplex-networks.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id iHOx6WijzeIc for ; Thu, 4 May 2023 16:53:11 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by mail.optiplex-networks.com (Postfix) with ESMTP id E674C15C2DBC for ; Thu, 4 May 2023 16:53:10 +0100 (BST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.optiplex-networks.com E674C15C2DBC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=optiplex-networks.com; s=AE93A2AC-7F67-11EA-90AE-8A1FE64F6997; t=1683215590; bh=NYe9uggLwTjaG3OS97XWNOeZeXdMFlc+yMq8dzqbnR4=; h=Message-ID:Date:MIME-Version:To:From; b=ETeSf4RXiQYQI+rhkB29NJuZMjopHdfVDfsoG8OBJJlf+snmYsRIv4jk31d83FOSh 0vIJRgcMmYBb+zZ2xPBoTB9flZ3SPaIyTuOqWyjiG1mUYH9OWWBrCSVGds/7+Rlg0f a69yIUDoA/I7hphUB0/yvtqyJ8ST1NuJEOwdaIUfhagL58+ElFgWqFTc1zmrowMHJL PIWP7ydRDiFD+k6IcgKOY8XIMqG6FSt9jcXTYoxFMp9ena6LPcCn1iOehAkEMKFQZC XSnqZey/XmFNnIbVOfaPhKWl34P+A4aIcrsS6ugzG8m8cVCCFxBqcMg7NN2lzOKRFb KxqsfLo/RS5aQ== X-Virus-Scanned: amavisd-new at mail.optiplex-networks.com Received: from mail.optiplex-networks.com ([127.0.0.1]) by localhost (mail.optiplex-networks.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id warWBsbKvMUC for ; Thu, 4 May 2023 16:53:10 +0100 (BST) Received: from [192.168.20.23] (unknown [192.168.20.23]) by mail.optiplex-networks.com (Postfix) with ESMTPSA id D1DE515C2C76 for ; Thu, 4 May 2023 16:53:10 +0100 (BST) Message-ID: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> Date: Thu, 4 May 2023 16:53:10 +0100 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US To: freebsd-questions@freebsd.org From: Kaya Saman Subject: Tool to compare directories and delete duplicate files from one directory Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4QByyk4NsHz3jlH X-Spamd-Bar: / X-Spamd-Result: default: False [-0.50 / 15.00]; R_DKIM_ALLOW(-0.20)[optiplex-networks.com:s=AE93A2AC-7F67-11EA-90AE-8A1FE64F6997]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; DKIM_TRACE(0.00)[optiplex-networks.com:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; ASN(0.00)[asn:6871, ipnet:212.159.64.0/18, country:GB]; FROM_HAS_DN(0.00)[]; local_wl_ip(0.00)[212.159.80.20] X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: local_wl_ip X-ThisMailContainsUnwantedMimeParts: N Hi, I'm wondering if anyone knows of a tool like diff or so that can also delete files based on name and size from either left/right or source/destination directory? Basically what I have done is performed an rsync without using the --remove-source-files option onto a newly bought and created disk pool (yes zpool) that i am trying to consolidate my data - as it's currently spread out over multiple pools with the same folder name. The issue I am facing mainly is that I perform another rsync and use the --remove-source-files option, rsync will delete files based on name while there are some files that have the same name but not same size and I would like to retain these files. Right now I have looked at many different options in both rsync and other tools but found nothing suitable. I even tested using a few test dirs and files that I put into /tmp and whatever I tried, the files of different size either got transferred or deleted. How would be a good way to approach this problem? Even if I create some kind of shell script and use diff, I think it will only compare names and not file sizes. I'm really lost here.... Regards, Kaya From nobody Thu May 4 16:28:05 2023 X-Original-To: freebsd-questions@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 4QBzlQ1Jz4z49HBb for ; Thu, 4 May 2023 16:28:34 +0000 (UTC) (envelope-from 93ab.82.c3aa0002f52193.db0e043e604088537b20ae640ced66cd@email-od.com) Received: from s1-b515.socketlabs.email-od.com (s1-b515.socketlabs.email-od.com [142.0.181.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QBzlN3Ydcz3rgh for ; Thu, 4 May 2023 16:28:32 +0000 (UTC) (envelope-from 93ab.82.c3aa0002f52193.db0e043e604088537b20ae640ced66cd@email-od.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=tundraware.com header.s=slkey header.b=bXAiomZZ; dkim=pass header.d=email-od.com header.s=dkim header.b=s9eWmAUi; spf=pass (mx1.freebsd.org: domain of 93ab.82.c3aa0002f52193.db0e043e604088537b20ae640ced66cd@email-od.com designates 142.0.181.21 as permitted sender) smtp.mailfrom=93ab.82.c3aa0002f52193.db0e043e604088537b20ae640ced66cd@email-od.com; dmarc=pass (policy=reject) header.from=tundraware.com DKIM-Signature: v=1; a=rsa-sha256; d=tundraware.com;s=slkey; c=relaxed/relaxed; q=dns/txt; t=1683217713; x=1685809713; h=x-tundraware-mailscanner-from:x-greylist:content-transfer-encoding:content-type:in-reply-to:from:content-language:references:to:subject:mime-version:date:message-id:x-thread-info:subject:to:from:cc:reply-to; bh=JyIvRL7V2zJGn/wvcJVxIFWgcgaELfEgV/DSFTStc4k=; b=bXAiomZZFrXLXYlXsAXotCTGrNZOuo4BrtJASgSk7gp7YkIH0xxP89qH4Km4wI9beCNbno0v/ktS7PoKSvvC3fTFJJE2VvGoVyHZwjDHlAbh5+waa9p0PUAJjPzaqa5gs9V7JkR2OT/nCsejXFH9VQ4rOZ7Z0iVW5cy+jeZta/w9o3awdOW75+3DedpPeQlehxNLNebLGmUJnAzrwp/R6QVQGCy0KZEnU/3iFgifgUCdsTx77rrZKUZBG567ojJQsvrEjJs06RxfI6Iwg+I1C9zS7TWTOimzJFQjqX1YBrzCD+ReM9VaWeCohpf5fYLmtMkyfzcHV645HjfiamNW9g== DKIM-Signature: v=1; a=rsa-sha256; d=email-od.com;i=@email-od.com;s=dkim; c=relaxed/relaxed; q=dns/txt; t=1683217713; x=1685809713; h=x-tundraware-mailscanner-from:x-greylist:content-transfer-encoding:content-type:in-reply-to:from:content-language:references:to:subject:mime-version:date:message-id:x-thread-info:subject:to:from:cc:reply-to; bh=JyIvRL7V2zJGn/wvcJVxIFWgcgaELfEgV/DSFTStc4k=; b=s9eWmAUimf1uWzJBRJO9svzVKmi0/kGOy4TbEK0vbNRAl0Ycuc2umI2tZYG8Vt5i0dgSBjIMgyRxdelOzgycc3zmCt5L1nebdFSA4/pLO2XVv9T6gjnb2aqW/oz115uI9drtuXoAhZASJ4m2diw+jQRf8Ub+j3bLpdqM2wZBmDw= X-Thread-Info: OTNhYi4xMi5jM2FhMDAwMmY1MjE5My5mcmVlYnNkLXF1ZXN0aW9ucz1mcmVlYnNkLm9yZw== Received: from r1.us-east-1.aws.in.socketlabs.com (r1.us-east-1.aws.in.socketlabs.com [142.0.191.1]) by mxh4.email-od.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Thu, 4 May 2023 12:28:26 -0400 Received: from oceanview.tundraware.com (oceanview.tundraware.com [45.55.60.57]) by r1.us-east-1.aws.in.socketlabs.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Thu, 4 May 2023 12:28:24 -0400 Received: from [192.168.0.2] (ozzie.tundraware.com [75.145.138.73]) (authenticated bits=0) by oceanview.tundraware.com (8.17.1/8.17.1) with ESMTPSA id 344GSAHZ036395 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO) for ; Thu, 4 May 2023 11:28:11 -0500 (CDT) (envelope-from tundra@tundraware.com) Message-ID: <604dd652-24ad-7774-5d0a-6f1ee2e4e6b6@tundraware.com> Date: Thu, 4 May 2023 11:28:05 -0500 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: Tool to compare directories and delete duplicate files from one directory To: freebsd-questions@freebsd.org References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> Content-Language: en-US From: Tim Daneliuk In-Reply-To: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (oceanview.tundraware.com [45.55.60.57]); Thu, 04 May 2023 11:28:11 -0500 (CDT) X-TundraWare-MailScanner-Information: Please contact the ISP for more information X-TundraWare-MailScanner-ID: 344GSAHZ036395 X-TundraWare-MailScanner: Found to be clean X-TundraWare-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (not cached, score=-7.19, required 6, autolearn=not spam, ALL_TRUSTED -1.00, BAYES_00 -1.90, NICE_REPLY_A -4.28, T_SCC_BODY_TEXT_LINE -0.01) X-TundraWare-MailScanner-From: tundra@tundraware.com X-Spam-Status: No X-Spamd-Result: default: False [-3.70 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[tundraware.com,reject]; FORGED_SENDER(0.30)[tundra@tundraware.com,93ab.82.c3aa0002f52193.db0e043e604088537b20ae640ced66cd@email-od.com]; R_DKIM_ALLOW(-0.20)[tundraware.com:s=slkey,email-od.com:s=dkim]; R_SPF_ALLOW(-0.20)[+ip4:142.0.176.0/20]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[tundra@tundraware.com,93ab.82.c3aa0002f52193.db0e043e604088537b20ae640ced66cd@email-od.com]; RCVD_IN_DNSWL_NONE(0.00)[142.0.181.21:from,142.0.191.1:received]; ASN(0.00)[asn:53658, ipnet:142.0.180.0/22, country:US]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[tundraware.com:+,email-od.com:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; DWL_DNSWL_NONE(0.00)[email-od.com:dkim] X-Rspamd-Queue-Id: 4QBzlN3Ydcz3rgh X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On 5/4/23 10:53, Kaya Saman wrote: > Hi, > > > I'm wondering if anyone knows of a tool like diff or so that can also delete files based on name and size from either left/right or source/destination directory? I've never used it, but there is a port of fdupes in the ports tree. Not sure if it does exactly what you want though. From nobody Thu May 4 16:29:22 2023 X-Original-To: freebsd-questions@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 4QBzmb307Vz49HDc for ; Thu, 4 May 2023 16:29:35 +0000 (UTC) (envelope-from pprocacci@gmail.com) Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QBzmZ5fM6z3sX2 for ; Thu, 4 May 2023 16:29:34 +0000 (UTC) (envelope-from pprocacci@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-38de3338abeso391728b6e.1 for ; Thu, 04 May 2023 09:29:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683217773; x=1685809773; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=EFw5JAZFa01OaxYiC/pMePCPidlImHyAPgV3nPljf8k=; b=IcNEm+q8TMAkAyeSJU+Df5rPHcD6df8+EkgszgTZ65/VnsrOGtQtmrj753rImNWr0+ aRmET0n0EveSea1hveEVcGfRr9eWAtCU+/SYZs1KRvbZ/pSLQLyTt5WW4DH3MupX4sTw x8ibgyF/CxaKXvSQF3/Bnf+DU7xRorBorpYtWAELu0/zvk4UXF5nPxM+o2Hhm2Sao02Z jnZFT0g4bm8+f0K/WmACVsSG0nxouaCcnYE9JOlPyeg5gZs5GPejMUTvCvfi7vkoAjHB xjIOd4fcGz6/OpS2wH+JWc/WJUFteZq4q+thHhNPLqD8h1TrlJay39y4Lxt9EU22Aigd GYcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683217774; x=1685809774; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EFw5JAZFa01OaxYiC/pMePCPidlImHyAPgV3nPljf8k=; b=i64CSnUjoCEe8qepQwXfr7wcpeB1eF0jdSzpXwT5olp2iw42Y+2qiROs3EaNu5qlh8 9fiXG8dRsvkiqFCxwVrVioBSIBjaoojgPI41j1v0h++h7wK9oSZAZovm6gca2vyL0D88 02wUj/QLCvnVTxLdh777LjLVYryUX8t63OChYg3lG82o8i77gwyKueImWlnQBmxB+XQc r3sKhe5YholFKOzk32n/FffeS7DDYaHByoICsumSwTk/YbO53BXQCOoaA21mzC6UPSDu l9mMGnYSj9TADBxTplk+JNTW9FY5hb34JOVAeljU/U6IyGiVLtfOtWJqrnD9+5+mwZgl 8P/A== X-Gm-Message-State: AC+VfDwtZec8Udr/6JI6Np1zdZSfq32vPouukbKMmiWeUnDQF5FDMCxA XZk9bjaPtPPZDMJQAcb7OTjPNL0DjX5R9675qYp8ikiJB1vq X-Google-Smtp-Source: ACHHUZ6dSuFD0L07FkTopZgnRYhh6Vg1ZXpFKuqOHsjH0Ebo2NZPtXv4OcII7nUC0B2zzM3JlLAEvuWl6PiX9ld1h0Q= X-Received: by 2002:aca:a80e:0:b0:38b:c4c3:b3ec with SMTP id r14-20020acaa80e000000b0038bc4c3b3ecmr1921277oie.3.1683217773737; Thu, 04 May 2023 09:29:33 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> In-Reply-To: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> From: Paul Procacci Date: Thu, 4 May 2023 12:29:22 -0400 Message-ID: Subject: Re: Tool to compare directories and delete duplicate files from one directory To: Kaya Saman Cc: freebsd-questions@freebsd.org Content-Type: multipart/alternative; boundary="0000000000007bbd5905fae0adda" X-Rspamd-Queue-Id: 4QBzmZ5fM6z3sX2 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --0000000000007bbd5905fae0adda Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 4, 2023 at 11:53=E2=80=AFAM Kaya Saman wrote: > Hi, > > > I'm wondering if anyone knows of a tool like diff or so that can also > delete files based on name and size from either left/right or > source/destination directory? > > > Basically what I have done is performed an rsync without using the > --remove-source-files option onto a newly bought and created disk pool > (yes zpool) that i am trying to consolidate my data - as it's currently > spread out over multiple pools with the same folder name. > > > The issue I am facing mainly is that I perform another rsync and use the > --remove-source-files option, rsync will delete files based on name > while there are some files that have the same name but not same size and > I would like to retain these files. > > > Right now I have looked at many different options in both rsync and > other tools but found nothing suitable. I even tested using a few test > dirs and files that I put into /tmp and whatever I tried, the files of > different size either got transferred or deleted. > > > How would be a good way to approach this problem? > > > Even if I create some kind of shell script and use diff, I think it will > only compare names and not file sizes. > > > I'm really lost here.... > > > Regards, > > > Kaya > > > > It sounds like you want fdupes. It's in the ports tree. ~Paul --=20 __________________ :(){ :|:& };: --0000000000007bbd5905fae0adda Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, May 4, 2023 at 11:53=E2= =80=AFAM Kaya Saman <= kayasaman@optiplex-networks.com> wrote:
Hi,


I'm wondering if anyone knows of a tool like diff or so that can also <= br> delete files based on name and size from either left/right or
source/destination directory?


Basically what I have done is performed an rsync without using the
--remove-source-files option onto a newly bought and created disk pool
(yes zpool) that i am trying to consolidate my data - as it's currently=
spread out over multiple pools with the same folder name.


The issue I am facing mainly is that I perform another rsync and use the --remove-source-files option, rsync will delete files based on name
while there are some files that have the same name but not same size and I would like to retain these files.


Right now I have looked at many different options in both rsync and
other tools but found nothing suitable. I even tested using a few test
dirs and files that I put into /tmp and whatever I tried, the files of
different size either got transferred or deleted.


How would be a good way to approach this problem?


Even if I create some kind of shell script and use diff, I think it will only compare names and not file sizes.


I'm really lost here....


Regards,


Kaya




It sounds like you want fdupes.=C2=A0 It&= #39;s in the ports tree.

~Paul

<= span class=3D"gmail_signature_prefix">--
__________________

:(){ :|:& };:
--0000000000007bbd5905fae0adda-- From nobody Thu May 4 17:02:39 2023 X-Original-To: freebsd-questions@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 4QC0Vw21kvz49Jrt for ; Thu, 4 May 2023 17:02:48 +0000 (UTC) (envelope-from ipluta@wp.pl) Received: from mx3.wp.pl (mx3.wp.pl [212.77.101.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC0Vv3TZFz447w for ; Thu, 4 May 2023 17:02:47 +0000 (UTC) (envelope-from ipluta@wp.pl) Authentication-Results: mx1.freebsd.org; none Received: (wp-smtpd smtp.wp.pl 3534 invoked from network); 4 May 2023 19:02:39 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1683219759; bh=Ld/69ft93pxNCXastsVxaojSNQNWHb/h6LUVmN5TChA=; h=Subject:To:From; b=OJrQgGEkNC0vIheFt7G7km95JXmwZRmQalcgzCv5cpBfz7ybdWIeuveXcQsk7IOmL wnxlDUcQAHPc4Hi4GneoXONaGpCh+DP2TWmsQqknc6b0+mXXB87Y5F4JvQCS9Udt7f A0hFr3qxgH1e7jGWge97em7cR9+fgY6m5C8jyCVA= Received: from 78-11-36-98.cmr.net.pl (HELO [192.168.1.129]) (ipluta@wp.pl@[78.11.36.98]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 4 May 2023 19:02:39 +0200 Message-ID: Date: Thu, 4 May 2023 19:02:39 +0200 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: Tool to compare directories and delete duplicate files from one directory Content-Language: pl-PL To: Kaya Saman , freebsd-questions@freebsd.org References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> From: "Ireneusz Pluta/wp.pl" In-Reply-To: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-WP-MailID: 0f032d3f86c2d96cafce66b90f27d469 X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 000000D [MSPU] X-Rspamd-Queue-Id: 4QC0Vv3TZFz447w X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:12827, ipnet:212.77.101.0/24, country:PL] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N W dniu 4.05.2023 o 17:53, Kaya Saman pisze: > > Even if I create some kind of shell script and use diff, I think it will only compare names and > not file sizes. use cmp(1) From nobody Thu May 4 19:40:14 2023 X-Original-To: questions@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 4QC40g3kQnz49SRw for ; Thu, 4 May 2023 19:40:19 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from nightmare.dreamchaser.org (ns.dreamchaser.org [66.109.141.57]) (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 (2048 bits) client-digest SHA256) (Client CN "discoveriesinwood.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC40g10Gwz3D7J for ; Thu, 4 May 2023 19:40:19 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Authentication-Results: mx1.freebsd.org; none Received: from [192.168.151.122] (breakaway [192.168.151.122]) by nightmare.dreamchaser.org (8.16.1/8.16.1) with ESMTP id 344JeEgx001746; Thu, 4 May 2023 13:40:17 -0600 (MDT) (envelope-from freebsd@dreamchaser.org) Message-ID: <0054f586-e216-a1aa-8b2d-67d1e7c931c7@dreamchaser.org> Date: Thu, 4 May 2023 12:40:14 -0700 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 Reply-To: freebsd@dreamchaser.org Subject: Re: PPPoE bridge / vlan? setup help needed Content-Language: en-US To: Ian Smith Cc: questions@freebsd.org References: <7c972cc1-3c49-ad0a-b86f-91bd0b978537@dreamchaser.org> <9A04451E-1BC7-402D-A5A5-B1B6466DBE56@FreeBSD.org> <547039FF-357F-4B16-80C6-D2AC2B710C38@nimnet.asn.au> From: Gary Aitken In-Reply-To: <547039FF-357F-4B16-80C6-D2AC2B710C38@nimnet.asn.au> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.4 (nightmare.dreamchaser.org [192.168.151.101]); Thu, 04 May 2023 13:40:17 -0600 (MDT) X-Rspamd-Queue-Id: 4QC40g10Gwz3D7J X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:21947, ipnet:66.109.128.0/19, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 5/3/23 15:02, Ian Smith wrote: > You've chosen to run it as a bridge, which has advantages but also > some difficulty, as you're experiencing. One advantage that's a > difficulty if you get it wrong is that the (likely limited) firewall > in the modem plus router mode is now up to you. I call that a plus, > but plenty would rather not. Understood. I've been running a fbsd firewall for ~20 years, but always behind a router; the router pretty much was a pass-through. > Yeah, sorry ... mosf ISP helpdesk drones know 10% of SFA. Finding > the right ISP is more than half the challenge, so ignore my > suggestions to seek help there. My choice is like being outback ... pretty much <=1. > That's the one your initial setup, below, refused to accept, because > your end was insisting on "my.isp.assigned.ip" which I think is your > address in your assigned /29, NOT the (also probably fixed) IP > address of your side of the PPP link (...47) Got it, yes. That was the missing piece of the puzzle, which my ISP didn't want to talk about. Kept insisting all I needed to do was use the IP assigned to the /29 address. > Also, gateway there refers to the modem/router's gateway, not yours. understood. > a fresh set and a pretty > paranoid firewall wouldn't hurt. yeah, I mulled that over a lot and decided it was probably too confusing to talk about and try to get all the substitutions right in the traces. Thanks for the suggestions. > Yeah, I'm pretty sure the only real problem here is asking for the > wrong local ppp address. Ask for 0.0.0.0/0 and later ask for what > you get, if you like. ...> No, you accepted the address they offered as _their_ end of the ppp > link. Ok, thanks. Looking at the trace again, please correct if I'm wrong; trying to make sure I understand it: 1 IPCP: deflink: SendConfigReq(1) state = Closed 2 IPCP: IPADDR[6] MY.PROPADDR.MY.END 3 IPCP: COMPPROTO[6] 16 VJ slots with slot compression 4 IPCP: deflink: State change Closed --> Req-Sent 1-4 I send isp proposed addr for my end 5 LCP: deflink: RecvProtocolRej(79) state = Opened 6 LCP: deflink: -- Protocol 0x80fd (Compression Control Protocol) was rejected! 7 CCP: deflink: State change Req-Sent --> Stopped 5-6 I receive his *protocol* rejection of CCP compression protocol I assumed this meant he accepted the address. But instead I have to send a whole new proposal? Or is it uncertain at this point? Could he still send me an ack for the addr instead of reject? 8 IPCP: deflink: RecvConfigReq(223) state = Req-Sent 9 IPCP: IPADDR[6] HIS.PROPADDR.HIS.END 10 IPCP: deflink: SendConfigAck(223) state = Req-Sent 11 IPCP: IPADDR[6] HIS.PROPADDR.HIS.END 12 IPCP: deflink: State change Req-Sent --> Ack-Sent 8-12 I receive his proposed addr for his end and accept it 13 IPCP: deflink: RecvConfigRej(1) state = Ack-Sent 14 IPCP: COMPPROTO[6] 16 VJ slots with slot compression 13-14 I receive his rejection of my original entire config request Since it's a config reject, as opposed to a protocol reject, the reject includes/implies the proposed addr, not just the compression protocol he tells me about? 15 IPCP: deflink: SendConfigReq(2) state = Ack-Sent 16 IPCP: IPADDR[6] MY.PROPADDR.MY.END 15-16 I resend isp my proposed addr for my end 17 IPCP: deflink: RecvConfigNak(2) state = Ack-Sent 18 IPCP: IPADDR[6] HIS.PROPADDR.MY.END 17-18 I receive his nak of my proposed addr, along with his proposal for my end. 19 IPCP: HIS.PROPADDR.HIS.END: Unacceptable address! 19 I give up because of my limits on addrs on my end. >> I tried using 0.0.0.0 as my suggested IP, to see if they would >> come up with the HIS.PROPADDR.MY.END the first time: >> >> 1 tun0: IPCP: deflink: SendConfigReq(2) state = Ack-Sent >> 2 tun0: IPCP: IPADDR[6] 0.0.0.0 >> 3 tun0: IPCP: deflink: RecvConfigNak(2) state = Ack-Sent >> 4 tun0: IPCP: IPADDR[6] HIS.PROPADDR.MY.END >> 5 tun0: IPCP: IPADDR[6] changing address: 0.0.0.0 --> HIS.PROPADDR.MY.END > > Correct! > >> 6 tun0: IPCP: deflink: SendConfigReq(3) state = Ack-Sent >> 7 tun0: IPCP: IPADDR[6] HIS.PROPADDR.MY.END >> 8 tun0: LCP: deflink: RecvTerminateReq(8) state = Opened > > Opened is ok, we're only terminating LCP section I expect. Anything > after that? 9 LCP: deflink: LayerDown 10 LCP: deflink: SendTerminateAck(8) state = Opened 11 LCP: deflink: State change Opened --> Stopping 12 CCP: deflink: State change Stopped --> Closed 13 CCP: deflink: State change Closed --> Initial 14 Phase: deflink: open -> lcp 15 Warning: ff02::/: Change route failed: errno: Network is unreachable 16 IPCP: deflink: State change Ack-Sent --> Starting 17 IPCP: deflink: LayerFinish. 18 IPCP: Connect time: 0 secs: 0 octets in, 0 octets out 19 IPCP: 0 packets in, 0 packets out 20 IPCP: total 0 bytes/sec, peak 0 bytes/sec on Tue May 2 09:18:03 2023 21 IPCP: deflink: State change Starting --> Initial 22 Phase: bundle: Terminate 23 LCP: deflink: LayerFinish 24 LCP: deflink: State change Stopping --> Stopped 25 LCP: deflink: State change Stopped --> Closed 26 LCP: deflink: State change Closed --> Initial 27 Phase: deflink: Disconnected! 28 Phase: deflink: lcp -> logout 29 Phase: deflink: logout -> hangup 30 Phase: deflink: Disconnected! 31 Phase: deflink: Connect time: 4 secs: 113 octets in, 144 octets out 32 Phase: deflink: 8 packets in, 9 packets out 33 Phase: total 64 bytes/sec, peak 85 bytes/sec on Tue May 2 09:18:04 2023 34 Phase: deflink: hangup -> opening 35 Phase: bundle: Establish 36 Phase: deflink: Enter pause (3) for redialing. 37 Chat: deflink: Reconnect try 1 of 0 38 Chat: deflink: Redial timer expired. 39 Phase: deflink: Connected! 40 Phase: deflink: opening -> dial I terminated the ppp session, thinking the warning at line 15 meant it didn't work. However, I'm not certain at what point I terminated it; maybe a bit too soon. I think #22 above is me killing the process. But I'm a bit wary of saying that as it seems too timely. #22 immediately follows #21, but there's a 3 second delay between #22 and #23. This a.m. I started out proposing HIS.PROPADDR.MY.END and the link came up, immediately followed by: (Note: HIS.PROPADDR.MY.END is actually what *I* proposed) ... 1 IPCP: deflink: RecvConfigAck(2) state = Ack-Sent 2 IPCP: IPADDR[6] HIS.PROPADDR.MY.END 3 IPCP: deflink: State change Ack-Sent --> Opened 4 IPCP: deflink: LayerUp. 5 IPCP: myaddr HIS.PROPADDR.MY.END hisaddr = HIS.PROPADDR.HIS.END 6 Warning: ff02::/: Change route failed: errno: Network is unreachable 7 LCP: deflink: RecvEchoRequest(0) state = Opened 8 LCP: deflink: SendEchoReply(0) state = Opened 9 DNS: OUTbound query IN AAAA 0.freebsd.pool.ntp.org. ... I don't know if #9 means #9 actually went out or not. When I looked at the routing table, I saw: Destination Gateway Flags Netif Expire 1 default HIS.PROPADDR.HIS.END US tun0 2 HIS.PROPADDR.MY.END link#4 UHS lo0 3 MY.NET.MY.END/29 link#1 U xl0 4 MY.NET.MY.END link#1 UHS lo0 5 HIS.PROPADDR.HIS.END link#4 UHS tun0 ... As I see it, a request going out not in my subnet out would match 1. If it gets to tun0, I presume it's going out. If so, where is the network unreachable, which is in every trace whether it succeeds or not, coming from? Is it true that something sent to xl0, which is the target for natd in my firewall rules, will "do the right thing" via tun0, even with nothing additional in the routing table? I'm not sure I really understand the above routing table with tun0 inserted: tun0 -> xl0 (HIS.PROPADDR.MY.END) -> HIS.PROPADDR.HIS.END) -> world MY.NET.MY.END part of MY.NET.MY.END/29 -> xl0 -> ??? or MY.NET.MY.END same as HIS.PROPADDR.MY.END -> ??? This feels like why I want MY.NET.MY.END and not HIS.PROPADDR.MY.END. Thanks, Gary From nobody Thu May 4 20:23:26 2023 X-Original-To: freebsd-questions@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 4QC4zS4WMRz49V7f for ; Thu, 4 May 2023 20:24:20 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.kundenserver.de", Issuer "Telekom Security ServerID OV Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC4zR6NPgz3HsK for ; Thu, 4 May 2023 20:24:19 +0000 (UTC) (envelope-from freebsd@edvax.de) Authentication-Results: mx1.freebsd.org; none Received: from r56.edvax.de ([178.12.41.85]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Mi23L-1qPraM1U4f-00e3Qk; Thu, 04 May 2023 22:24:11 +0200 Date: Thu, 4 May 2023 22:23:26 +0200 From: Polytropon To: Kaya Saman Cc: freebsd-questions@FreeBSD.org Subject: Re: Tool to compare directories and delete duplicate files from one directory Message-Id: <20230504222326.6bba6e1d.freebsd@edvax.de> In-Reply-To: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:8eeODDJncyBYzFV/Xnt3Hed+Iwt04LT41TP9TSC8Z1t4SYvi/fE 1zS33vtJn8Qv7v174BZlVNJ/QH1LNN9c5JYPEslKRwomeuw8yYHI+K3jNtMkWD/IuzL2DYa mOwfmGDB6E0QT7VDMSwseWQzEkGRVNeecGR1tuCeWJZAYE4mkZIkNJCUdkwbwI6w9qQjjKa o3uHjdTIOwGFsYIq7vAxg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:PopI3wiIvCg=;vx2UMfHdYd+G0gEs/Uj2vcaKkL7 jnH7dc1JLUxps247SsfctdpY6PPCe0HKXYwmgjq1xvnig6n7yDakwp+rGkQrIwPX6GLO/OFHt O7tq7N3MeiCr8ii/SIxnBtUCQwLSlgcfU1sfOWCs/z3/PZ7hog8cNcW7WTLNQi2ET+eRhdPIU NE3WTOJ6Pe28aE8ulF4bZkbbqXN1PRvYz3PVjK045RwuCLLuYM8/q8TPE8mUjisBcR55cBLDk qz52lrwYkqtdTTGMNzOyB0B11v6NRu5nY7rkyu/nGpSpVGRxruFs6WMaSQoXpr33j/DUTEuJY xkOxdy1L3jN7HIDYZW/w3OrMvn0HN94RGAT/2K/IWQmYFk0ul/2O2rlkAv2wOtr1HtOIBg5zi qNF6s5YVsDAB4jBG6JTwpJxA5ZoE22U7EOXIuSpxzMwjR1hRHg9a4pMrsW3JiqV5YuxWmNpsy p/g/luQcxWgWGOUUG1uqn48mfhMlREhlWe45uwkOUPQOxOzeRdWa4i60HTWx9IaPcrDIPO/LN WlySHc066kjyhn4Oqt1ehMRQ5e9pMnxdpV9S3ce9Y3+Xv8mQcrUQhynvLIzYhPhOL7MqyEHNr SCjSF7xzN01VbgJ0FW3sKQ6MS3B/tP3IKwYWajXBQ78H95DrT9n9Ye26TjGRImJZc8L0zShz2 A/d7i0+StO0c06/3A31AsSoj88Nmk1hBK7aGmvvxzw== X-Rspamd-Queue-Id: 4QC4zR6NPgz3HsK X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:8560, ipnet:217.72.192.0/20, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Thu, 4 May 2023 16:53:10 +0100, Kaya Saman wrote: > I'm wondering if anyone knows of a tool like diff or so that can also > delete files based on name and size from either left/right or > source/destination directory? > > [...] > > The issue I am facing mainly is that I perform another rsync and use the > --remove-source-files option, rsync will delete files based on name > while there are some files that have the same name but not same size and > I would like to retain these files. If I remember correctly, cpdup does actually have that specific feature. You'll find it in the pkgs or in the ports collection; see "man cpdup" for details. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... From nobody Thu May 4 21:21:23 2023 X-Original-To: questions@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 4QC6FX3gSYz49Y5B for ; Thu, 4 May 2023 21:21:36 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from holgerdanske.com (holgerdanske.com [184.105.128.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "holgerdanske.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC6FW0bg7z3P5r for ; Thu, 4 May 2023 21:21:35 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=holgerdanske.com header.s=nov-20210719-112354 header.b=dP5bTvji; spf=pass (mx1.freebsd.org: domain of dpchrist@holgerdanske.com designates 184.105.128.27 as permitted sender) smtp.mailfrom=dpchrist@holgerdanske.com; dmarc=pass (policy=none) header.from=holgerdanske.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=holgerdanske.com; s=nov-20210719-112354; t=1683235283; bh=YdVDbDA2GsfZLJl5m7yuJV1iH+0pNCgO/p3ElqtA9Hk=; h=Received:Message-ID:Date:MIME-Version:User-Agent:Subject: Content-Language:To:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; b=dP5bTvjiIJop4a13XbYS37lpWZMnEeMQVunuDf7YVngtEkm4LigTVznoinYHRftBH sdEQ1TDTWzrEXrP8xohZgfXSp8qLZoe1Ufbv1hhvqxgD4AgGaVgL7d1jKWUdNEyiC2 UtlYK1Jzbz5oedKK5QO6Es8KPkX2lbjU5zfro4p5fTBhvWmmlp9x0FtFfo1oh6rjiG FeyV1p3SxgcvzKfGi1hQ/niTducowHiHEMQy8Lj/PDd8SIj8kBWlYl8bDbPBMikELS TQTwkWvrN4KCwi9rvePx1SYRxd2W06oqqMW9C6Aee1auVVwhPGOuGE8ayh2UmdHIsi 3IGt1O4nC0GcqSSVdHe2SzBGPHJmK1HEc/ht7WCf+no+1vrjQEusuZKpcJvQaA2Gmb qYTw3zlHp3TXQd33CEq69vjtajo+aL1D8RWiKvzBDknaG8u7zlsUzhd+LcQzka/ZqO mhgtP+5UGNd0I8vGZA6YpXmz49DgiFpDEZcHHLZtA5pcK42dAzQsyaD1q4csWFRaaw gV/N/ojr8L4TzEt9tlu8O+nOMtEs2gEOTcHYtvjd8iyfOeNRjbx0opXU/PJe9uBKYi jvV6gIZh2MSICT/5KzwQOzkKasRR0MaSvwo5KLxP/YsQDjApRNdt86RTAhmmFWfbRo GQZIdWsoGblEYOBzlmrnwXLU= Received: from 99.100.19.101 (99-100-19-101.lightspeed.frokca.sbcglobal.net [99.100.19.101]) by holgerdanske.com with ESMTPSA (TLS_AES_128_GCM_SHA256:TLSv1.3:Kx=any:Au=any:Enc=AESGCM(128):Mac=AEAD) (SMTP-AUTH username dpchrist@holgerdanske.com, mechanism PLAIN) for ; Thu, 4 May 2023 14:21:23 -0700 Message-ID: <4efcf1a8-45d9-adb4-f148-5e9a43817990@holgerdanske.com> Date: Thu, 4 May 2023 14:21:23 -0700 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: Tool to compare directories and delete duplicate files from one directory Content-Language: en-US To: questions@freebsd.org References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> From: David Christensen In-Reply-To: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[holgerdanske.com,none]; R_SPF_ALLOW(-0.20)[+a]; R_DKIM_ALLOW(-0.20)[holgerdanske.com:s=nov-20210719-112354]; MIME_GOOD(-0.10)[text/plain]; DKIM_TRACE(0.00)[holgerdanske.com:+]; ASN(0.00)[asn:6939, ipnet:184.104.0.0/15, country:US]; MLMMJ_DEST(0.00)[questions@freebsd.org]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4QC6FW0bg7z3P5r X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On 5/4/23 08:53, Kaya Saman wrote: > Hi, > > > I'm wondering if anyone knows of a tool like diff or so that can also > delete files based on name and size from either left/right or > source/destination directory? > > > Basically what I have done is performed an rsync without using the > --remove-source-files option onto a newly bought and created disk pool > (yes zpool) that i am trying to consolidate my data - as it's currently > spread out over multiple pools with the same folder name. > > > The issue I am facing mainly is that I perform another rsync and use the > --remove-source-files option, rsync will delete files based on name > while there are some files that have the same name but not same size and > I would like to retain these files. > > > Right now I have looked at many different options in both rsync and > other tools but found nothing suitable. I even tested using a few test > dirs and files that I put into /tmp and whatever I tried, the files of > different size either got transferred or deleted. > > > How would be a good way to approach this problem? > > > Even if I create some kind of shell script and use diff, I think it will > only compare names and not file sizes. > > > I'm really lost here.... > > > Regards, > > > Kaya Mounting the source file system and destination file system on the same host will simplify matters. sshfs(1) works, but is not fast. Samba is fast. I have never used NFS, but it should be fast. While I know of several programs that can do copying and have destination file name collision detection (and/or destination content collision detection), AIUI their collision resolution is limited to cancel or overwrite (perhaps conditionally, such as newer source mtime; e.g. cp(1) --update). I would approach the problem by writing a program or script that does the copy and collision detection, plus has the collision resolution I want. Such as, compare the source and destination contents. If the contents are the same, do not copy. If the contents differ, copy to a destination file name that is a unique variant of the source file name. The challenge then becomes finding a unique destination file name. Inserting an encoded (e.g. hexadecimal, base32, base64) secure hash (e.g. SHA1, SHA256) of the file contents into the destination file name should make it very unlikely that two source files with the same name, but differing contents, would have colliding variant names. In addition, it would be good to include a --directory=DIR option (similar to tar(1)). David From nobody Thu May 4 21:47:44 2023 X-Original-To: freebsd-questions@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 4QC6ql2rX8z49Z5Y for ; Thu, 4 May 2023 21:47:47 +0000 (UTC) (envelope-from kayasaman@optiplex-networks.com) Received: from mail.optiplex-networks.com (mail.optiplex-networks.com [212.159.80.20]) (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 4QC6qk5NCzz3R11 for ; Thu, 4 May 2023 21:47:46 +0000 (UTC) (envelope-from kayasaman@optiplex-networks.com) Authentication-Results: mx1.freebsd.org; none Received: from localhost (localhost [127.0.0.1]) by mail.optiplex-networks.com (Postfix) with ESMTP id 13A1F15C2C76; Thu, 4 May 2023 22:47:45 +0100 (BST) Received: from mail.optiplex-networks.com ([127.0.0.1]) by localhost (mail.optiplex-networks.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Y67IPZkktF1G; Thu, 4 May 2023 22:47:44 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by mail.optiplex-networks.com (Postfix) with ESMTP id 8DFCC15C2DBC; Thu, 4 May 2023 22:47:44 +0100 (BST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.optiplex-networks.com 8DFCC15C2DBC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=optiplex-networks.com; s=AE93A2AC-7F67-11EA-90AE-8A1FE64F6997; t=1683236864; bh=5xK6M0QHr2aDp1L7iB1zTN9nCkRkLKovLp2scuttzlM=; h=Message-ID:Date:MIME-Version:To:From; b=EOMPDkY0opOsK1u0pfZTvDI6HXsDILYAo1+ZEOXg9jcEQREuqPWl6/TxluIfqegHC 2zU742uRyOk97sE1RpIXB+SLmYMZo6CWPzojsP8B1lr0U0Q5DUnzqG+kwIc/NnQUK2 bqLmkhFDCIXuL6tB0tXIzIplVWQogB8Qs2HgUgh/WhXqgLsR3BkZJB2znZ/hwS4f0/ NIf9RvtNhF7T2LdDRpkUqf/s+WBQSnHcRQjqPtHAQUlIuVUva2YDzv1Uh8FKNatNMg saCYL8xQRHaoRwEmo4W4SgZVmgi6Y0eXQrS19uVqfXOE7OsaavTBjNzvZHed0vO5ep M/sROcysuvFSQ== X-Virus-Scanned: amavisd-new at mail.optiplex-networks.com Received: from mail.optiplex-networks.com ([127.0.0.1]) by localhost (mail.optiplex-networks.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id gl1Bld1DpSHG; Thu, 4 May 2023 22:47:44 +0100 (BST) Received: from [192.168.20.23] (unknown [192.168.20.23]) by mail.optiplex-networks.com (Postfix) with ESMTPSA id 730FB15C2C76; Thu, 4 May 2023 22:47:44 +0100 (BST) Content-Type: multipart/alternative; boundary="------------nwzKkVn1jzK0pw3WOSUpGRKx" Message-ID: <344b29c6-3d69-543d-678d-c2433dbf7152@optiplex-networks.com> Date: Thu, 4 May 2023 22:47:44 +0100 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: Tool to compare directories and delete duplicate files from one directory Content-Language: en-US To: Paul Procacci Cc: freebsd-questions@freebsd.org References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> From: Kaya Saman In-Reply-To: X-Rspamd-Queue-Id: 4QC6qk5NCzz3R11 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6871, ipnet:212.159.64.0/18, country:GB] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N This is a multi-part message in MIME format. --------------nwzKkVn1jzK0pw3WOSUpGRKx Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 5/4/23 17:29, Paul Procacci wrote: > > > On Thu, May 4, 2023 at 11:53=E2=80=AFAM Kaya Saman=20 > wrote: > > Hi, > > > I'm wondering if anyone knows of a tool like diff or so that can al= so > delete files based on name and size from either left/right or > source/destination directory? > > > Basically what I have done is performed an rsync without using the > --remove-source-files option onto a newly bought and created disk > pool > (yes zpool) that i am trying to consolidate my data - as it's > currently > spread out over multiple pools with the same folder name. > > > The issue I am facing mainly is that I perform another rsync and > use the > --remove-source-files option, rsync will delete files based on name > while there are some files that have the same name but not same > size and > I would like to retain these files. > > > Right now I have looked at many different options in both rsync and > other tools but found nothing suitable. I even tested using a few > test > dirs and files that I put into /tmp and whatever I tried, the > files of > different size either got transferred or deleted. > > > How would be a good way to approach this problem? > > > Even if I create some kind of shell script and use diff, I think > it will > only compare names and not file sizes. > > > I'm really lost here.... > > > Regards, > > > Kaya > > > > > It sounds like you want fdupes.=C2=A0 It's in the ports tree. > > ~Paul > > --=20 > __________________ > > :(){ :|:& };: I tried fdupes and installed it a while back. For me it felt like it=20 only works on a single directory. My dir structure is that I have" /dir <- main directory where everything has now been rsync'ed to /dir_1 <- old directory with partial content /dir_2 <- more partial content /dir_3 <- more partial content The key thing here is that I need to compare: /dir_(x) with /dir if the files are different sizes in /dir_(x) then leave them, otherwise=20 delete if both name and file size are the same. --------------nwzKkVn1jzK0pw3WOSUpGRKx Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On 5/4/23 17:29, Paul Procacci wrote:<= br>


On Thu, May 4, 2023 at 11:53=E2=80=AFAM Kaya Saman <= kayasaman@optiplex-networks.com> wrote:
Hi,


I'm wondering if anyone knows of a tool like diff or so that can also
delete files based on name and size from either left/right or
source/destination directory?


Basically what I have done is performed an rsync without using the
--remove-source-files option onto a newly bought and created disk pool
(yes zpool) that i am trying to consolidate my data - as it's currently
spread out over multiple pools with the same folder name.

The issue I am facing mainly is that I perform another rsync and use the
--remove-source-files option, rsync will delete files based on name
while there are some files that have the same name but not same size and
I would like to retain these files.


Right now I have looked at many different options in both rsync and
other tools but found nothing suitable. I even tested using a few test
dirs and files that I put into /tmp and whatever I tried, the files of
different size either got transferred or deleted.


How would be a good way to approach this problem?


Even if I create some kind of shell script and use diff, I think it will
only compare names and not file sizes.


I'm really lost here....


Regards,


Kaya




It sounds like you want fdupes.=C2=A0 It's in the ports tree= .

~Paul

--
__________________
:(){ :|:& };:



I tried fdupes and installed it a while back. For me it felt like it only works on a single directory.


My dir structure is that I have"


/dir <- main directory where everything has now been rsync'ed to

/dir_1 <- old directory with partial content

/dir_2 <- more partial content

/dir_3 <- more partial content


The key thing here is that I need to compare:


/dir_(x) with /dir


if the files are different sizes in /dir_(x) then leave them, otherwise delete if both name and file size are the same.

--------------nwzKkVn1jzK0pw3WOSUpGRKx-- From nobody Thu May 4 21:56:04 2023 X-Original-To: freebsd-questions@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 4QC71S2RH5z49ZpL for ; Thu, 4 May 2023 21:56:12 +0000 (UTC) (envelope-from kayasaman@optiplex-networks.com) Received: from mail.optiplex-networks.com (mail.optiplex-networks.com [212.159.80.20]) (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 4QC71S1jwkz3j26 for ; Thu, 4 May 2023 21:56:12 +0000 (UTC) (envelope-from kayasaman@optiplex-networks.com) Authentication-Results: mx1.freebsd.org; none Received: from localhost (localhost [127.0.0.1]) by mail.optiplex-networks.com (Postfix) with ESMTP id 07B4A15C2C76; Thu, 4 May 2023 22:56:11 +0100 (BST) Received: from mail.optiplex-networks.com ([127.0.0.1]) by localhost (mail.optiplex-networks.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 4GbGTPAI-vAO; Thu, 4 May 2023 22:56:10 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by mail.optiplex-networks.com (Postfix) with ESMTP id 923C315C38AE; Thu, 4 May 2023 22:56:06 +0100 (BST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.optiplex-networks.com 923C315C38AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=optiplex-networks.com; s=AE93A2AC-7F67-11EA-90AE-8A1FE64F6997; t=1683237366; bh=xYubweE5Z4qsO0VkVVD3x9GySMJrTcdDCb466nrokQM=; h=Message-ID:Date:MIME-Version:To:From; b=GHJhmis5zdc/o2DOINSG8NYsQgy6ZbsyBBHmz05oMXtLEG/LKb4yrO+oXXwePBVIp E1ENAoA88VeXk+aZsSKMhGVQ3OAlR3pqU3hn+xcYzDxkyg5uztj7V0hSUqeOaKJH1K TdKVrQgn1W8lIh8fd0Zwc4nmOsdyxAsgLM9uZ1IWq/dno0wMm5jmEZMICSqYTs1iQ/ bTgA09gxyoyFG/7mYVoBRY0R7aUJWRxxvLyZbaFPm9r/ChY8ylhLs2Q3ypEq4gQLLx YbPffxjdXsEm1SeSKH6BkPYZssW5l1huGxdgQT3mbZj14w/uVe87d8ISEpBS+cecuz AjHhvd/7TFoRQ== X-Virus-Scanned: amavisd-new at mail.optiplex-networks.com Received: from mail.optiplex-networks.com ([127.0.0.1]) by localhost (mail.optiplex-networks.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ecl18SG9F6wU; Thu, 4 May 2023 22:56:06 +0100 (BST) Received: from [192.168.20.23] (unknown [192.168.20.23]) by mail.optiplex-networks.com (Postfix) with ESMTPSA id 4005F15C38AF; Thu, 4 May 2023 22:56:04 +0100 (BST) Message-ID: <80cafa55-9609-a9ef-d739-bda1affe38df@optiplex-networks.com> Date: Thu, 4 May 2023 22:56:04 +0100 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: Tool to compare directories and delete duplicate files from one directory Content-Language: en-US To: "Ireneusz Pluta/wp.pl" , freebsd-questions@freebsd.org References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> From: Kaya Saman In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4QC71S1jwkz3j26 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6871, ipnet:212.159.64.0/18, country:GB] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 5/4/23 18:02, Ireneusz Pluta/wp.pl wrote: > W dniu 4.05.2023 o=C2=A017:53, Kaya Saman pisze: >> >> Even if I create some kind of shell script and use diff, I think it=20 >> will only compare names and not file sizes. > > use cmp(1) > This is interesting! From the man page I can see: =C2=A0=C2=A0=C2=A0=C2=A0 Compare file sizes of example.txt and /boot/loa= der.conf and return=20 1 if =C2=A0=C2=A0=C2=A0=C2=A0 they are not equal.=C2=A0 Note that -z can only= be used with regular files: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $ cmp -z ex= ample.txt /boot/loader.conf =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 example.txt= /boot/loader.conf differ: size But*, what happens when you have thousands of files? The man page at the top suggests compare file1 and file2, not dir1 and=20 dir2 which is what I am looking for: NAME =C2=A0=C2=A0=C2=A0=C2=A0 cmp =E2=80=93 compare two files SYNOPSIS =C2=A0=C2=A0=C2=A0=C2=A0 cmp [-l | -s | -x] [-bhz] [--ignore-initial=3Dn= um1[:num2]] [--bytes=3Dnum] =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 file1 file2 [skip1 [ski= p2]] =C2=A0If it did that I would definitely say it's what I'm looking for. I need to compare the files within: /dir /dir_1 /dir_2 /dir_3 where /dir_(x) are directories that have been merged into /dir.... From nobody Thu May 4 22:32:04 2023 X-Original-To: freebsd-questions@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 4QC7q518Kbz49fvd for ; Thu, 4 May 2023 22:32:17 +0000 (UTC) (envelope-from pprocacci@gmail.com) Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC7q46XgHz3r9w for ; Thu, 4 May 2023 22:32:16 +0000 (UTC) (envelope-from pprocacci@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oi1-x22a.google.com with SMTP id 5614622812f47-38dee9a7795so409396b6e.3 for ; Thu, 04 May 2023 15:32:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683239536; x=1685831536; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ROm1RAS7z9SXkYOjP7vRouUxxCgxbfX5Q2xIFTvrTHk=; b=hceMS4+MvWhZ2RDcNuqdoIdA98PhnZAj8taFv47GXmTM04xeWWcXQyV42ccOtweQFy +pjbaX+69WlLOMwW3xQZd++xJc6H0rWPvqzRGpU3sw/7kVVNeutwhX3MR3edRmhl+iL7 Itb6sokE0QOGhm8paIEWRbzaMhgyPq+a+Dk6+8uDErP75sEfIjtLMcBcCZ257LZHi0MK qCv2FDVB16+/I1r7TBTW+Bg2ntYDO9V60yaJDfHvW1CcKzeFiWQukYPSnLTYRmsEeOM1 Ar6fhHsq/8j3UIJvXClXbmEncVwdNdiocrl+tphyul4nxUbSgGq7IQ1rhrzmQgdzBBKh 5cKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683239536; x=1685831536; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ROm1RAS7z9SXkYOjP7vRouUxxCgxbfX5Q2xIFTvrTHk=; b=i24plY35i9ZTirsE87Fqe5a7WtGoGzEoIpt3mKM/T8TD/MgMLj6hbYjz7fD5mEmaIF W1uBw3FpyzwBG9H0rPuHNIh6BmF92g166Dhcm9LeR5Q2UacxS0XK3VoHWJgIYPG0+JBF v7PUGHiqN/9FMhvKvx/z0iq2gi5Ts5NwszwgFDEIxvJhUSx7rTN19oja+mocZYgyqQ9K 3PDwA//EGgrVuoooE16LoAraOgPWOagWv09VCEYvRUPT3ihCl1jFyDuJgV9q7n/4W5Hb aC6kU3S58HrL7KLBbHhB4Oy986oUZYptJ4MDIsG7fULzspjUAmzP4WxvWC6f0d+ug4yh v1kQ== X-Gm-Message-State: AC+VfDzM+dSEIw2IgIsscNGnjNDkKyQJjNnqr2niSQ5PqkB3L2ta88ar iqwlpN+Ci9nyz+UyisTVLzJVhyYdlW6KuTWr9M/cnWLpuxHw X-Google-Smtp-Source: ACHHUZ5e4hA3/EeNrfcNQC+Mj74u/fMd7AuLzT9W3oyLxkVqGQBxpagvR6dLvWFgFAp2ihLVvDwgGX7SuMXmJxT1mQY= X-Received: by 2002:a05:6808:1149:b0:38e:2567:315a with SMTP id u9-20020a056808114900b0038e2567315amr2585779oiu.1.1683239535775; Thu, 04 May 2023 15:32:15 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> <344b29c6-3d69-543d-678d-c2433dbf7152@optiplex-networks.com> In-Reply-To: <344b29c6-3d69-543d-678d-c2433dbf7152@optiplex-networks.com> From: Paul Procacci Date: Thu, 4 May 2023 18:32:04 -0400 Message-ID: Subject: Re: Tool to compare directories and delete duplicate files from one directory To: Kaya Saman Cc: freebsd-questions@freebsd.org Content-Type: multipart/alternative; boundary="0000000000009a126805fae5be5a" X-Rspamd-Queue-Id: 4QC7q46XgHz3r9w X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --0000000000009a126805fae5be5a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 4, 2023 at 5:47=E2=80=AFPM Kaya Saman wrote: > > On 5/4/23 17:29, Paul Procacci wrote: > > > > On Thu, May 4, 2023 at 11:53=E2=80=AFAM Kaya Saman < > kayasaman@optiplex-networks.com> wrote: > >> Hi, >> >> >> I'm wondering if anyone knows of a tool like diff or so that can also >> delete files based on name and size from either left/right or >> source/destination directory? >> >> >> Basically what I have done is performed an rsync without using the >> --remove-source-files option onto a newly bought and created disk pool >> (yes zpool) that i am trying to consolidate my data - as it's currently >> spread out over multiple pools with the same folder name. >> >> >> The issue I am facing mainly is that I perform another rsync and use the >> --remove-source-files option, rsync will delete files based on name >> while there are some files that have the same name but not same size and >> I would like to retain these files. >> >> >> Right now I have looked at many different options in both rsync and >> other tools but found nothing suitable. I even tested using a few test >> dirs and files that I put into /tmp and whatever I tried, the files of >> different size either got transferred or deleted. >> >> >> How would be a good way to approach this problem? >> >> >> Even if I create some kind of shell script and use diff, I think it will >> only compare names and not file sizes. >> >> >> I'm really lost here.... >> >> >> Regards, >> >> >> Kaya >> >> >> >> > It sounds like you want fdupes. It's in the ports tree. > > ~Paul > > -- > __________________ > > :(){ :|:& };: > > > > I tried fdupes and installed it a while back. For me it felt like it only > works on a single directory. > > > My dir structure is that I have" > > > /dir <- main directory where everything has now been rsync'ed to > > /dir_1 <- old directory with partial content > > /dir_2 <- more partial content > > /dir_3 <- more partial content > > > The key thing here is that I need to compare: > > > /dir_(x) with /dir > > > if the files are different sizes in /dir_(x) then leave them, otherwise > delete if both name and file size are the same. > Then a tiny shell script does the job assuming your files don't have any spaces and no weird characters exist: #!/bin/sh for i in b c d; do ls $i/ | while read file; do [ ! -f a/$file ] && cp $i/$file a/$file && continue ref=3D`stat -f '%z' a/$file` src=3D`stat -f '%z' %i/$file` [ $ref -eq $src ] && rm -f $i/file done done Change paths accordingly and backup your stuff. ;) ~Paul --=20 __________________ :(){ :|:& };: --0000000000009a126805fae5be5a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, May 4, 2023 at 5:47=E2= =80=AFPM Kaya Saman <= kayasaman@optiplex-networks.com> wrote:
=20 =20 =20


On 5/4/23 17:29, Paul Procacci wrote:
=20


On Thu, May 4, 2023 at 11:53=E2=80=AFAM Kaya Saman <kayasaman@optiplex-networks.com= > wrote:
Hi,


I'm wondering if anyone knows of a tool like diff or so that can also
delete files based on name and size from either left/right or
source/destination directory?


Basically what I have done is performed an rsync without using the
--remove-source-files option onto a newly bought and created disk pool
(yes zpool) that i am trying to consolidate my data - as it's currently
spread out over multiple pools with the same folder name.


The issue I am facing mainly is that I perform another rsync and use the
--remove-source-files option, rsync will delete files based on name
while there are some files that have the same name but not same size and
I would like to retain these files.


Right now I have looked at many different options in both rsync and
other tools but found nothing suitable. I even tested using a few test
dirs and files that I put into /tmp and whatever I tried, the files of
different size either got transferred or deleted.


How would be a good way to approach this problem?


Even if I create some kind of shell script and use diff, I think it will
only compare names and not file sizes.


I'm really lost here....


Regards,


Kaya




It sounds like you want fdupes.=C2=A0 It's in the ports tr= ee.

~Paul

--
__________________

:(){ :|:& };:



I tried fdupes and installed it a while back. For me it felt like it only works on a single directory.


My dir structure is that I have"


/dir <- main directory where everything has now been rsync'ed to

/dir_1 <- old directory with partial content

/dir_2 <- more partial content

/dir_3 <- more partial content


The key thing here is that I need to compare:


/dir_(x) with /dir


if the files are different sizes in /dir_(x) then leave them, otherwise delete if both name and file size are the same.


Then a tiny shell script does the job assuming your = files don't have any spaces and no weird characters exist:

#!/bin/sh

for i in b c d;
do
=C2=A0 ls $i/ | while re= ad file;
=C2=A0 do
=C2=A0 =C2=A0 [ ! -f a/$file ] && cp $i/$f= ile a/$file && continue

=C2=A0 =C2=A0 ref=3D`stat -f '%z= ' a/$file`
=C2=A0 =C2=A0 src=3D`stat -f '%z' %i/$file`
= =C2=A0 =C2=A0 [ $ref -eq $src ] && rm -f $i/file

=C2=A0 done=
done

Change paths accordingly and backup your stuff. = ;)

~Paul

--
__= ________________

:(){ :|:& };:
--0000000000009a126805fae5be5a-- From nobody Thu May 4 23:53:14 2023 X-Original-To: freebsd-questions@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 4QC9cZ5nPzz49tx6 for ; Thu, 4 May 2023 23:53:18 +0000 (UTC) (envelope-from kayasaman@optiplex-networks.com) Received: from mail.optiplex-networks.com (mail.optiplex-networks.com [212.159.80.20]) (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 4QC9cZ2xCGz436W for ; Thu, 4 May 2023 23:53:18 +0000 (UTC) (envelope-from kayasaman@optiplex-networks.com) Authentication-Results: mx1.freebsd.org; none Received: from localhost (localhost [127.0.0.1]) by mail.optiplex-networks.com (Postfix) with ESMTP id 23E6815C2EC6; Fri, 5 May 2023 00:53:17 +0100 (BST) Received: from mail.optiplex-networks.com ([127.0.0.1]) by localhost (mail.optiplex-networks.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id F1WFEPFrlDTM; Fri, 5 May 2023 00:53:16 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by mail.optiplex-networks.com (Postfix) with ESMTP id 493A215C2DBC; Fri, 5 May 2023 00:53:14 +0100 (BST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.optiplex-networks.com 493A215C2DBC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=optiplex-networks.com; s=AE93A2AC-7F67-11EA-90AE-8A1FE64F6997; t=1683244394; bh=vMYjYwL4OYyOekp4ggvuUEb3JIEP1DiWeEPXOVGYClA=; h=Message-ID:Date:MIME-Version:To:From; b=z//WLKVm6XuEs9fc8H4hfx911ElHDP2Dsq4O9z3j5qBesLMHwODKdtN69d7iA8USV l7tyAN2tzhQmu3GOreG4NCyV9jZsRx/3cnIBawLSNtzzibWsHJj10PBvFSPdLnAQ81 Rj9nSOTc4SeuByANpvDIchLsW00CNcqD32BmQYO2LOdQkoBq+LufISijrOdggc1RKa bQfgfY2giKDSQrHfLS9gva9rJIBD895uv1aD9Oa4b6W+Ni2SYSyBDlxTsDMFt2m/Xp EAbksDiofaWvbt/dCgobyC4sorl4GzRy5ujqMHXU4ICSFWmISONDcLo+I78r80CAqW mAL4SXw21Ca4A== X-Virus-Scanned: amavisd-new at mail.optiplex-networks.com Received: from mail.optiplex-networks.com ([127.0.0.1]) by localhost (mail.optiplex-networks.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id jUvajR8ikzLT; Fri, 5 May 2023 00:53:14 +0100 (BST) Received: from [192.168.20.23] (unknown [192.168.20.23]) by mail.optiplex-networks.com (Postfix) with ESMTPSA id 2815415C2C76; Fri, 5 May 2023 00:53:14 +0100 (BST) Content-Type: multipart/alternative; boundary="------------iLtfd7qrOG0ADWnzwCu037z0" Message-ID: Date: Fri, 5 May 2023 00:53:14 +0100 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: Tool to compare directories and delete duplicate files from one directory Content-Language: en-US To: Paul Procacci Cc: freebsd-questions@freebsd.org References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> <344b29c6-3d69-543d-678d-c2433dbf7152@optiplex-networks.com> From: Kaya Saman In-Reply-To: X-Rspamd-Queue-Id: 4QC9cZ2xCGz436W X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6871, ipnet:212.159.64.0/18, country:GB] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N This is a multi-part message in MIME format. --------------iLtfd7qrOG0ADWnzwCu037z0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 5/4/23 23:32, Paul Procacci wrote: > > > On Thu, May 4, 2023 at 5:47=E2=80=AFPM Kaya Saman=20 > wrote: > > > On 5/4/23 17:29, Paul Procacci wrote: >> >> >> On Thu, May 4, 2023 at 11:53=E2=80=AFAM Kaya Saman >> wrote: >> >> Hi, >> >> >> I'm wondering if anyone knows of a tool like diff or so that >> can also >> delete files based on name and size from either left/right or >> source/destination directory? >> >> >> Basically what I have done is performed an rsync without >> using the >> --remove-source-files option onto a newly bought and created >> disk pool >> (yes zpool) that i am trying to consolidate my data - as it's >> currently >> spread out over multiple pools with the same folder name. >> >> >> The issue I am facing mainly is that I perform another rsync >> and use the >> --remove-source-files option, rsync will delete files based >> on name >> while there are some files that have the same name but not >> same size and >> I would like to retain these files. >> >> >> Right now I have looked at many different options in both >> rsync and >> other tools but found nothing suitable. I even tested using a >> few test >> dirs and files that I put into /tmp and whatever I tried, the >> files of >> different size either got transferred or deleted. >> >> >> How would be a good way to approach this problem? >> >> >> Even if I create some kind of shell script and use diff, I >> think it will >> only compare names and not file sizes. >> >> >> I'm really lost here.... >> >> >> Regards, >> >> >> Kaya >> >> >> >> >> It sounds like you want fdupes.=C2=A0 It's in the ports tree. >> >> ~Paul >> >> --=20 >> __________________ >> >> :(){ :|:& };: > > > > I tried fdupes and installed it a while back. For me it felt like > it only works on a single directory. > > > My dir structure is that I have" > > > /dir <- main directory where everything has now been rsync'ed to > > /dir_1 <- old directory with partial content > > /dir_2 <- more partial content > > /dir_3 <- more partial content > > > The key thing here is that I need to compare: > > > /dir_(x) with /dir > > > if the files are different sizes in /dir_(x) then leave them, > otherwise delete if both name and file size are the same. > > > Then a tiny shell script does the job assuming your files don't have=20 > any spaces and no weird characters exist: > > #!/bin/sh > > for i in b c d; > do > =C2=A0 ls $i/ | while read file; > =C2=A0 do > =C2=A0 =C2=A0 [ ! -f a/$file ] && cp $i/$file a/$file && continue > > =C2=A0 =C2=A0 ref=3D`stat -f '%z' a/$file` > =C2=A0 =C2=A0 src=3D`stat -f '%z' %i/$file` > =C2=A0 =C2=A0 [ $ref -eq $src ] && rm -f $i/file > > =C2=A0 done > done > > Change paths accordingly and backup your stuff. ;) > > ~Paul > > --=20 > __________________ > > :(){ :|:& };: Thanks Paul, I should be able to work with this. There are actually spaces and weird=20 characters in the file names so I assume doing something like "file"=20 should allow for that? I don't think I need the line after the 'do' statement do I? From what I=20 understand it copies the file from directory i to directory a? As I=20 explained initially, the files have already been rsync'ed so I just need=20 to compare and delete accordingly. When I performed the rsync it took around a week to complete per run,=20 currently zfs list shows around 12TB usage for my /dir but that's with=20 compression enabled, of the merged directory. A quick Google shows that I can use something like this: |search_dir=3D/the/path/to/base/dir for entry in "$search_dir"/* do echo=20 "$entry" done| To list the files in the directory though this might be Bash and not Csh Otherwise clunkily (my scripting style is pretty rubbish and non=20 efficient), I could do something like (it probably won't work!): #!/bin/sh #fb =3D file base #fm - file merge - file that has already been merged using rsync unless=20 size was different dir_base=3D/dir for fb in "$dir_base"/* do =C2=A0 echo "$fs" done dir_merge=3D/dir_1 for fm in "$dir_merge"/* do =C2=A0 echo "$fm" done =C2=A0 do =C2=A0 =C2=A0 ref=3D`stat -f '%z' $dir_base/$fb` =C2=A0 =C2=A0 src=3D`stat -f '%z' %i$dir_merge/$fm` =C2=A0 =C2=A0 [ $ref -eq $src ] && rm -f $dir_merge/$fm =C2=A0 done Regards, Kaya --------------iLtfd7qrOG0ADWnzwCu037z0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On 5/4/23 23:32, Paul Procacci wrote:<= br>


On Thu, May 4, 2023 at 5:47=E2=80=AFPM Kaya Saman <= kayasaman@optiplex-networks.com> wrote:


On 5/4/23 17:29, Paul Procacci wrote:


On Thu, May= 4, 2023 at 11:53=E2=80=AFAM Kaya Saman <kayasaman@opt= iplex-networks.com> wrote:
Hi,


I'm wondering if anyone knows of a tool like diff or so that can also
delete files based on name and size from either left/right or
source/destination directory?


Basically what I have done is performed an rsync without using the
--remove-source-files option onto a newly bought and created disk pool
(yes zpool) that i am trying to consolidate my data - as it's currently
spread out over multiple pools with the same folder name.


The issue I am facing mainly is that I perform another rsync and use the
--remove-source-files option, rsync will delete files based on name
while there are some files that have the same name but not same size and
I would like to retain these files.


Right now I have looked at many different options in both rsync and
other tools but found nothing suitable. I even tested using a few test
dirs and files that I put into /tmp and whatever I tried, the files of
different size either got transferred or deleted.


How would be a good way to approach this problem?


Even if I create some kind of shell script and use diff, I think it will
only compare names and not file sizes.


I'm really lost here....


Regards,


Kaya




It sounds like you want fdupes.=C2=A0 It's in th= e ports tree.

~Paul

--
__________________

:(){ :|:& };:



I tried fdupes and installed it a while back. For me it felt like it only works on a single directory.


My dir structure is that I have"


/dir <- main directory where everything has now been rsync'ed to

/dir_1 <- old directory with partial content

/dir_2 <- more partial content

/dir_3 <- more partial content


The key thing here is that I need to compare:


/dir_(x) with /dir


if the files are different sizes in /dir_(x) then leave them, otherwise delete if both name and file size are the same.


Then a tiny shell script does the job assuming your files don't have any spaces and no weird characters exist:

#!/bin/sh

for i in b c d;
do
=C2=A0 ls $i/ | while read file;
=C2=A0 do
=C2=A0 =C2=A0 [ ! -f a/$file ] && cp $i/$file a/$file &= amp;& continue

=C2=A0 =C2=A0 ref=3D`stat -f '%z' a/$file`
=C2=A0 =C2=A0 src=3D`stat -f '%z' %i/$file`
=C2=A0 =C2=A0 [ $ref -eq $src ] && rm -f $i/file

=C2=A0 done
done

Change paths accordingly and backup your stuff. ;)

~Paul

--
__________________
:(){ :|:& };:


Thanks Paul,


I should be able to work with this. There are actually spaces and weird characters in the file names so I assume doing something like "file" should allow for that?


I don't think I need the line after the 'do' statement do I? From what I understand it copies the file from directory i to directory a? As I explained initially, the files have already been rsync'ed so I just need to compare and delete accordingly.

When I performed the rsync it took around a week to complete per run, currently zfs list shows around 12TB usage for my /dir but that's with compression enabled, of the merged directory.


A quick Google shows that I can use something like this:

search_dir=3D/the/path/to/bas=
e/dir
for=
 entry in<=
/span> "$search_di=
r"/*
do
  echo "$entry"
done


To list the files in the directory though this might be Bash and not Csh


Otherwise clunkily (my scripting style is pretty rubbish and non efficient), I could do something like (it probably won't work!):


#!/bin/sh


#fb =3D file base

#fm - file merge - file that has already been merged using rsync unless size was different


dir_base=3D/dir
for fb in "$dir_base"/*
do
=C2=A0 echo "$fs"
done


dir_merge=3D/dir_1
for fm in "$dir_merge"/*
do
=C2=A0 echo "$fm"
done


=C2=A0 do

=C2=A0 =C2=A0 ref=3D`stat -f '%z' $dir_base/$fb`
=C2=A0 =C2=A0 src=3D`stat -f '%z' %i$dir_merge/$fm`
=C2=A0 =C2=A0 [ $ref -eq $src ] && rm -f $dir_merge/$fm
=
=C2=A0 done



Regards,


Kaya

--------------iLtfd7qrOG0ADWnzwCu037z0-- From nobody Fri May 5 00:13:02 2023 X-Original-To: freebsd-questions@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 4QCB3b20TFz49xnC for ; Fri, 5 May 2023 00:13:15 +0000 (UTC) (envelope-from pprocacci@gmail.com) Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCB3Z74r0z45yN for ; Fri, 5 May 2023 00:13:14 +0000 (UTC) (envelope-from pprocacci@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-1927718b240so773938fac.1 for ; Thu, 04 May 2023 17:13:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683245594; x=1685837594; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=pfZCahzhIoAuj8GvnQvgXAOlVgzK9/vTEk7sMSfvCZs=; b=NFVjXMe8JBUQDy1bKE50I6x7zChTa3C4rhVUiVm+6S9n0+eQr7pWB9QzI5BOb8OXRN lnoZtSbDP01grO78wkBWDCABLnnxNFpnahDfqf6TlbswtABW5nN/upj1RqNyEbA/fvjq XoeUItwCOKKm8IuePcxA0LXW1KI+GXqpykN+eAJHgfc2qvDEKgwPJukgMttJVfES6HPj HlxJi1SwdxI7COmiaVkupDvJCeEuedMliX2/VYNuhg7TXu9J1Tgo67Ewncm+Hge7TqQY YKeLwetsovp7aL8vKiknyqUdxJhiD+cBtwX2K9CEVFZ2xw6FDIaj84h1Cjeulr88WNpz AE/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683245594; x=1685837594; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pfZCahzhIoAuj8GvnQvgXAOlVgzK9/vTEk7sMSfvCZs=; b=da9guokEiWDjzbZ4z9mhbM4q+aFMwXYUVwercitR1ibw/Mt7rUHDJNsi1vt89VqMIu BZ/H9Wz3Tq4OqT5qgtOhUi7wrVDBYj6vie3199TPUkLUfPbOiXSCg0wCJNyql+Souh4w 7k8hhfWKQGwDdBexUmWUh6/sagT3fiAL6RJXXFLW/X+3KFIo/IBT0Bz3K9XBsNU8dEVa srk8YxrQZ8jysgoE4zNg9yo7LZw4hwzB1SJWLMORS+1rJJF9IyZ2N6OXoAzoexWVKOS0 JkXmBN+JbRjMYe5pzNEpkws+w2xhiJEYVFoeODqTpL/SkyfhdyJJ/nxMWw4GTEFVv0vG oQvw== X-Gm-Message-State: AC+VfDz17YUZYWEt332oO7gP+e24L8fB7JSaj0QUR9WAXkYtEgiejxqz PVGKLI0Z855HXh06zoC0yVDnh/yiK4IAfoXAecE+GUq7ke4p X-Google-Smtp-Source: ACHHUZ5fV/y8hVGNX3Ik68wUXcROkZvCt09eX3HOfyhRJCj/0G5KFPqrfQuj9/Es/t3OqIwFFfxvc1St3h9KvMKiVHQ= X-Received: by 2002:a05:6808:1456:b0:38e:c5d4:19c with SMTP id x22-20020a056808145600b0038ec5d4019cmr2787807oiv.5.1683245593920; Thu, 04 May 2023 17:13:13 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> <344b29c6-3d69-543d-678d-c2433dbf7152@optiplex-networks.com> In-Reply-To: From: Paul Procacci Date: Thu, 4 May 2023 20:13:02 -0400 Message-ID: Subject: Re: Tool to compare directories and delete duplicate files from one directory To: Kaya Saman Cc: freebsd-questions@freebsd.org Content-Type: multipart/alternative; boundary="000000000000b207ea05fae72763" X-Rspamd-Queue-Id: 4QCB3Z74r0z45yN X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2001:4860:4864::/48, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000b207ea05fae72763 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 4, 2023 at 7:53=E2=80=AFPM Kaya Saman wrote: > > On 5/4/23 23:32, Paul Procacci wrote: > > > > On Thu, May 4, 2023 at 5:47=E2=80=AFPM Kaya Saman > wrote: > >> >> On 5/4/23 17:29, Paul Procacci wrote: >> >> >> >> On Thu, May 4, 2023 at 11:53=E2=80=AFAM Kaya Saman < >> kayasaman@optiplex-networks.com> wrote: >> >>> Hi, >>> >>> >>> I'm wondering if anyone knows of a tool like diff or so that can also >>> delete files based on name and size from either left/right or >>> source/destination directory? >>> >>> >>> Basically what I have done is performed an rsync without using the >>> --remove-source-files option onto a newly bought and created disk pool >>> (yes zpool) that i am trying to consolidate my data - as it's currently >>> spread out over multiple pools with the same folder name. >>> >>> >>> The issue I am facing mainly is that I perform another rsync and use th= e >>> --remove-source-files option, rsync will delete files based on name >>> while there are some files that have the same name but not same size an= d >>> I would like to retain these files. >>> >>> >>> Right now I have looked at many different options in both rsync and >>> other tools but found nothing suitable. I even tested using a few test >>> dirs and files that I put into /tmp and whatever I tried, the files of >>> different size either got transferred or deleted. >>> >>> >>> How would be a good way to approach this problem? >>> >>> >>> Even if I create some kind of shell script and use diff, I think it wil= l >>> only compare names and not file sizes. >>> >>> >>> I'm really lost here.... >>> >>> >>> Regards, >>> >>> >>> Kaya >>> >>> >>> >>> >> It sounds like you want fdupes. It's in the ports tree. >> >> ~Paul >> >> -- >> __________________ >> >> :(){ :|:& };: >> >> >> >> I tried fdupes and installed it a while back. For me it felt like it onl= y >> works on a single directory. >> >> >> My dir structure is that I have" >> >> >> /dir <- main directory where everything has now been rsync'ed to >> >> /dir_1 <- old directory with partial content >> >> /dir_2 <- more partial content >> >> /dir_3 <- more partial content >> >> >> The key thing here is that I need to compare: >> >> >> /dir_(x) with /dir >> >> >> if the files are different sizes in /dir_(x) then leave them, otherwise >> delete if both name and file size are the same. >> > > Then a tiny shell script does the job assuming your files don't have any > spaces and no weird characters exist: > > #!/bin/sh > > for i in b c d; > do > ls $i/ | while read file; > do > [ ! -f a/$file ] && cp $i/$file a/$file && continue > > ref=3D`stat -f '%z' a/$file` > src=3D`stat -f '%z' %i/$file` > [ $ref -eq $src ] && rm -f $i/file > > done > done > > Change paths accordingly and backup your stuff. ;) > > ~Paul > > -- > __________________ > > :(){ :|:& };: > > > Thanks Paul, > > > I should be able to work with this. There are actually spaces and weird > characters in the file names so I assume doing something like "file" shou= ld > allow for that? > > > I don't think I need the line after the 'do' statement do I? From what I > understand it copies the file from directory i to directory a? As I > explained initially, the files have already been rsync'ed so I just need = to > compare and delete accordingly. > > When I performed the rsync it took around a week to complete per run, > currently zfs list shows around 12TB usage for my /dir but that's with > compression enabled, of the merged directory. > > > A quick Google shows that I can use something like this: > > search_dir=3D/the/path/to/base/dirfor entry in "$search_dir"/*do > echo "$entry"done > > > To list the files in the directory though this might be Bash and not Csh > > > Otherwise clunkily (my scripting style is pretty rubbish and non > efficient), I could do something like (it probably won't work!): > > > #!/bin/sh > > > #fb =3D file base > > #fm - file merge - file that has already been merged using rsync unless > size was different > > > dir_base=3D/dir > for fb in "$dir_base"/* > do > echo "$fs" > done > > > dir_merge=3D/dir_1 > for fm in "$dir_merge"/* > do > echo "$fm" > done > > > do > > ref=3D`stat -f '%z' $dir_base/$fb` > src=3D`stat -f '%z' %i$dir_merge/$fm` > [ $ref -eq $src ] && rm -f $dir_merge/$fm > > done > > > > Regards, > > > Kaya > What I provided is exactly what you needed as it loops through all the directories. You just have to provide the list of source directories on that first for loop. You can alter it, removing the first for loop, but then you'll need to run it for each directory you'd want to apply the checks to. Enclosing the variables in quotes may or may not help. A quote is a valid character in a filename and therefore may not work as expected. If you're reasonably sure your filenames do not contain quotes then you have a better chance of it working. Worst comes to worst, you'll need to: find /path -print0 | xargs -0 -n 1 to overcome weird characters in filenames. In either case, adding quotes at this point knowing you have at least spaces and some special characters, is probably the correct course of action. As an aside, I don't use this syntax: for entry in "$search_dir"/* You're certainly free to do so, but I personally avoid globs when possible. Maybe not so much in scripts like this but on the command line, those globs can expand to a size that exceeds allowable sizes to command line arguments= . Revised script adding comments: ----------------------------------------------------- #!/bin/sh # # dir_1, dir_2, and dir_3 are the directories I want to search through. for i in dir_1 dir_2 dir_3; do # Retrieve the filenames within each of those directories ls $i/ | while read file; do If the file doesn't exist in the base dir, copy it and continue with the top of the loop. [ ! -f dir_base/$file ] && cp $i/$file dir_base/ && continue # # Getting to this point means the file eixsts in both locations. # # Get the file size as it is in the dir_base ref=3D`stat -f '%z' dir_base/$file` # Get the file size as it is in $i src=3D`stat -f '%z' $i/$file` # If the sizes are the same, remove the file from the source directory [ $ref -eq $src ] && rm -f $i/file done done --=20 __________________ :(){ :|:& };: --000000000000b207ea05fae72763 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, May 4, 2023 at 7:53= =E2=80=AFPM Kaya Saman <kayasaman@optiplex-networks.com> wrote:
=20 =20 =20


On 5/4/23 23:32, Paul Procacci wrote:
=20


On Thu, May 4, 2023 at 5:47=E2=80=AFPM Kaya Saman <kayasaman@optiplex-networks.com&= gt; wrote:


On 5/4/23 17:29, Paul Procacci wrote:


On Thu, May 4= , 2023 at 11:53=E2=80=AFAM Kaya Saman <kayasaman@opt= iplex-networks.com> wrote:
H= i,


I'm wondering if anyone knows of a tool like diff or so that can also
delete files based on name and size from either left/right or
source/destination directory?


Basically what I have done is performed an rsync without using the
--remove-source-files option onto a newly bought and created disk pool
(yes zpool) that i am trying to consolidate my data - as it's currently
spread out over multiple pools with the same folder name.


The issue I am facing mainly is that I perform another rsync and use the
--remove-source-files option, rsync will delete files based on name
while there are some files that have the same name but not same size and
I would like to retain these files.


Right now I have looked at many different options in both rsync and
other tools but found nothing suitable. I even tested using a few test
dirs and files that I put into /tmp and whatever I tried, the files of
different size either got transferred or deleted.


How would be a good way to approach this problem?


Even if I create some kind of shell script and use diff, I think it will
only compare names and not file sizes.


I'm really lost here....


Regards,


Kaya




It sounds like you want fdupes.=C2=A0 It's in = the ports tree.

~Paul

--
__________________

:(){ :|:& };:



I tried fdupes and installed it a while back. For me it felt like it only works on a single directory.


My dir structure is that I have"


/dir <- main directory where everything has now been rsync'ed to

/dir_1 <- old directory with partial content

/dir_2 <- more partial content

/dir_3 <- more partial content


The key thing here is that I need to compare:


/dir_(x) with /dir


if the files are different sizes in /dir_(x) then leave them, otherwise delete if both name and file size are the same.


Then a tiny shell script does the job assuming your files don't have any spaces and no weird characters exist:

#!/bin/sh

for i in b c d;
do
=C2=A0 ls $i/ | while read file;
=C2=A0 do
=C2=A0 =C2=A0 [ ! -f a/$file ] && cp $i/$file a/$file &am= p;& continue

=C2=A0 =C2=A0 ref=3D`stat -f '%z' a/$file`
=C2=A0 =C2=A0 src=3D`stat -f '%z' %i/$file`
=C2=A0 =C2=A0 [ $ref -eq $src ] && rm -f $i/file

=C2=A0 done
done

Change paths accordingly and backup your stuff. ;)

~Paul

--
__________________

:(){ :|:& };:


Thanks Paul,


I should be able to work with this. There are actually spaces and weird characters in the file names so I assume doing something like "file" should allow for that?


I don't think I need the line after the 'do' statement d= o I? From what I understand it copies the file from directory i to directory a? As I explained initially, the files have already been rsync'ed so I just need to compare and delete accordingly.

When I performed the rsync it took around a week to complete per run, currently zfs list shows around 12TB usage for my /dir but that's with compression enabled, of the merged directory.


A quick Google shows that I can use something like this:

search_dir=3D/the/path/to/base/dir
for entr=
y in "$search_dir"/*
do
  echo <=
span style=3D"margin:0px;padding:0px;border:0px none;font-style:inherit;fon=
t-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inhe=
rit;font-family:inherit;font-kerning:inherit;font-feature-settings:inherit;=
font-size:13px;vertical-align:baseline;box-sizing:inherit">"$entry"
done


To list the files in the directory though this might be Bash and not Csh


Otherwise clunkily (my scripting style is pretty rubbish and non efficient), I could do something like (it probably won't work!):<= /p>


#!/bin/sh


#fb =3D file base

#fm - file merge - file that has already been merged using rsync unless size was different


dir_base=3D/dir
for fb in "$dir_base"/*
do
=C2=A0 echo "$fs"
done


dir_merge=3D/dir_1
for fm in "$dir_merge"/*
do
=C2=A0 echo "$fm"
done


=C2=A0 do

=C2=A0 =C2=A0 ref=3D`stat -f '%z' $dir_base/$fb`
=C2=A0 =C2=A0 src=3D`stat -f '%z' %i$dir_merge/$fm`
=C2=A0 =C2=A0 [ $ref -eq $src ] && rm -f $dir_merge/$fm

=C2=A0 done



Regards,


Kaya


What I provided is exactly what you needed as = it loops through all the directories.=C2=A0 You just have to provide the li= st of source directories on that first for loop.
You can alter it, remov= ing the first for loop, but then you'll need to run it for each directo= ry you'd want to apply the checks to.

Enclosing the variables in= quotes may or may not help.=C2=A0 A quote is a valid character in a filena= me and therefore may not work as expected.
If you're reas= onably sure your filenames do not contain quotes then you have a better cha= nce of it working.

Worst comes to worst, you'll need = to: find /path -print0 | xargs -0 -n 1 <args> to overcome weird chara= cters in filenames.

In either case, adding quotes at this= point knowing you have at least spaces and some special characters, is pro= bably the correct course of action.

As an aside, I don't use thi= s syntax:=C2=A0=C2=A0=C2=A0 for entry in "$search_dir"/*
You're certainly free to do so, but I personally avoid globs when p= ossible.
Maybe not so much in scripts like this but on the command line,= those globs can expand to a size that exceeds allowable sizes to command l= ine arguments.

Revised script adding comments:
------------------= -----------------------------------
#!/bin/sh

#
# dir_1, dir_2, and dir_3 are the directorie= s I want to search through.
for i in dir_1 dir_2 dir_3;
do
=C2=A0 # Retrieve the filenames within each of those = directories
=C2=A0 ls $i/ | while read file;
=C2=A0 do
=C2=A0=C2=A0=C2=A0=C2=A0 If the file does= n't exist in the base dir, copy it and continue with the top of the loo= p.
=C2=A0 =C2=A0 [ ! -f dir_base/$file ] && cp $i/$file dir_= base/ && continue

=C2=A0=C2=A0=C2=A0 #
=C2=A0=C2=A0=C2= =A0 # Getting to this point means the file eixsts in both locations.
=C2= =A0=C2=A0=C2=A0 #

=C2=A0=C2=A0=C2=A0 # Get the file size = as it is in the dir_base
=C2=A0 =C2=A0 ref=3D`stat -f '%z' dir_base/$file`

=
=C2=A0=C2=A0=C2=A0 # Get the file size as it is in $i
<= div> =C2=A0 =C2=A0 src=3D`stat -f '%z' $i/$file`

=
=C2=A0=C2=A0=C2=A0 # If the sizes are the same, remove the file from t= he source directory
=C2=A0 =C2=A0 [ $ref -eq $src ] && rm -f $i/file

=C2=A0 done
done



-= -
__________________<= br>
:(){ :|:& };:
--000000000000b207ea05fae72763-- From nobody Fri May 5 01:32:28 2023 X-Original-To: freebsd-questions@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 4QCCq335pHz48xKl for ; Fri, 5 May 2023 01:32:31 +0000 (UTC) (envelope-from kayasaman@optiplex-networks.com) Received: from mail.optiplex-networks.com (mail.optiplex-networks.com [212.159.80.20]) (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 4QCCq32NKJz4MSk for ; Fri, 5 May 2023 01:32:31 +0000 (UTC) (envelope-from kayasaman@optiplex-networks.com) Authentication-Results: mx1.freebsd.org; none Received: from localhost (localhost [127.0.0.1]) by mail.optiplex-networks.com (Postfix) with ESMTP id ED58115C38AC; Fri, 5 May 2023 02:32:28 +0100 (BST) Received: from mail.optiplex-networks.com ([127.0.0.1]) by localhost (mail.optiplex-networks.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ISYT1c1CxPkJ; Fri, 5 May 2023 02:32:28 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by mail.optiplex-networks.com (Postfix) with ESMTP id 8931B15C38AD; Fri, 5 May 2023 02:32:28 +0100 (BST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.optiplex-networks.com 8931B15C38AD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=optiplex-networks.com; s=AE93A2AC-7F67-11EA-90AE-8A1FE64F6997; t=1683250348; bh=HbJA+JH62tTgpHctuvTvn3kZPTS/BNysMGSmIdkdrYk=; h=Message-ID:Date:MIME-Version:To:From; b=Ru436zWB21P6g7zHoQSSZSH9dqIQlmy9hgW8OzEej33h+MZuPmAWwJsIVkZUB9pJS cdtbic7pR7WkvxGtCJ0rqcKpQtnnRXiOZnbAkgMMn9Xh4DQ3qo8Hy3HqiyuJb+wV9w CuBvfzUuZOcKD/NCOha40Vm6A0s+yzikUN51NzdkRDRe54pcqih+9Z0jPAT/PRg++A FP6Mi8ZlFaqWI5FK72xJpI6WAq3f9f/ARiU2IbpzEzwMbsfj5EiP3gTpBQyhsAF8y0 6Log/HR+3Xbq4vLneKszc1EDum5rMYHFVUzZDQDWHQYbg7J4CN0fZVnbNB/7vtIulG gaV3SUOfykzKA== X-Virus-Scanned: amavisd-new at mail.optiplex-networks.com Received: from mail.optiplex-networks.com ([127.0.0.1]) by localhost (mail.optiplex-networks.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id H6qog8uSNaVS; Fri, 5 May 2023 02:32:28 +0100 (BST) Received: from [192.168.20.23] (unknown [192.168.20.23]) by mail.optiplex-networks.com (Postfix) with ESMTPSA id 74F2D15C38AC; Fri, 5 May 2023 02:32:28 +0100 (BST) Message-ID: <7747f587-f33e-f39c-ac97-fe4fe19e0b76@optiplex-networks.com> Date: Fri, 5 May 2023 02:32:28 +0100 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: Tool to compare directories and delete duplicate files from one directory Content-Language: en-US To: Paul Procacci Cc: freebsd-questions@freebsd.org References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> <344b29c6-3d69-543d-678d-c2433dbf7152@optiplex-networks.com> From: Kaya Saman In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4QCCq32NKJz4MSk X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6871, ipnet:212.159.64.0/18, country:GB] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 5/5/23 01:13, Paul Procacci wrote: > #!/bin/sh > > # > # dir_1, dir_2, and dir_3 are the directories I want to search through. > for i in dir_1 dir_2 dir_3; > do > =C2=A0 # Retrieve the filenames within each of those directories > =C2=A0 ls $i/ | while read file; > =C2=A0 do > =C2=A0=C2=A0=C2=A0=C2=A0 If the file doesn't exist in the base dir, cop= y it and continue=20 > with the top of the loop. > =C2=A0 =C2=A0 [ ! -f dir_base/$file ] && cp $i/$file dir_base/ && conti= nue > > =C2=A0=C2=A0=C2=A0 # > =C2=A0=C2=A0=C2=A0 # Getting to this point means the file eixsts in bot= h locations. > =C2=A0=C2=A0=C2=A0 # > > =C2=A0=C2=A0=C2=A0 # Get the file size as it is in the dir_base > =C2=A0 =C2=A0 ref=3D`stat -f '%z' dir_base/$file` > > =C2=A0=C2=A0=C2=A0 # Get the file size as it is in $i > =C2=A0 =C2=A0 src=3D`stat -f '%z' $i/$file` > > =C2=A0=C2=A0=C2=A0 # If the sizes are the same, remove the file from th= e source directory > =C2=A0 =C2=A0 [ $ref -eq $src ] && rm -f $i/file > > =C2=A0 done > done Thanks so much! just a quick question... you have dir_base written in the script. Do I=20 need to define this or is this part of the shell language itself? Right now I have modifed the script to make it non destructive so that=20 it doesn't do any copying or removing yet... call it a test instance if=20 you like. I personally prefer doing things like this so I don't have any=20 accidents and loose things in the meantime... So my initial modification is this: > #!/bin/sh > > # > # dir_1, dir_2, and dir_3 are the directories I want to search through. > for i in /dir_1 /dir_2 /dir_3; > do > =C2=A0 # Retrieve the filenames within each of those directories > =C2=A0 ls $i/ | while read file; > =C2=A0 do > =C2=A0=C2=A0=C2=A0 # If the file doesn't exist in the base dir, copy it= and continue=20 > with the top of the loop. > =C2=A0 =C2=A0 [ ! -f dir_base/$file ] && ls $i/$file && continue > > =C2=A0=C2=A0=C2=A0 # > =C2=A0=C2=A0=C2=A0 # Getting to this point means the file eixsts in bot= h locations. > =C2=A0=C2=A0=C2=A0 # > > =C2=A0=C2=A0=C2=A0 # Get the file size as it is in the dir_base > =C2=A0 =C2=A0 ref=3D`stat -f '%z' dir_base/$file` > > =C2=A0=C2=A0=C2=A0 # Get the file size as it is in $i > =C2=A0 =C2=A0 src=3D`stat -f '%z' $i/$file` > > =C2=A0=C2=A0=C2=A0 # If the sizes are the same, remove the file from th= e source directory > =C2=A0 =C2=A0 [ $ref -nq $src ] && ls $i/file > /tmp/file > > =C2=A0 done > done If this works it should just output the different files into a file=20 called "file" under /tmp Ok, this didn't work at all.... it just listed a whole bunch of top=20 level folders and didn't recurse through them :-( I ran it on the assumption that I needed to run the script under /dir=20 and that dir_base was a shell function which would essentially be /dir/. [EDIT] Currently, I managed to get it partly running by modifying ls to use ls=20 -R *but* I think that the 'stat' statements don't allow for recursion? The script is running as I type this but it's most likely just=20 outputting a whole bunch of ls information... as I see many 'stat'=20 errors in the shell output. From nobody Fri May 5 02:08:22 2023 X-Original-To: freebsd-questions@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 4QCDch0LHJz494KD for ; Fri, 5 May 2023 02:08:36 +0000 (UTC) (envelope-from pprocacci@gmail.com) Received: from mail-oo1-xc2b.google.com (mail-oo1-xc2b.google.com [IPv6:2607:f8b0:4864:20::c2b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCDcg5b58z3ChT for ; Fri, 5 May 2023 02:08:35 +0000 (UTC) (envelope-from pprocacci@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oo1-xc2b.google.com with SMTP id 006d021491bc7-54cb8d72c0bso666047eaf.3 for ; Thu, 04 May 2023 19:08:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683252514; x=1685844514; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qH5eMyAUQVSoqRxDc0HN6Anu/VTobZIWu23yP7xOs4Y=; b=kgEuG+r8KoaWf0ZKBkT6j5h8rAuD2BQvWeNXBnunUppVqOLJpE6fC4p+P3AvOZzxkq GLSyoj/o8SgAZbKP89SMwUbPSO9JDaJWQxzSah7OaKA7+2TjAE+VTOlmbcnUiYs46zfi 4bWzgEoI8qDW/K0oppnIqs7zm0y99x+iWZivL9hoC6g/Nzk6vj1ksu+PxpABztECeuU3 I7hpmHU4RoYa7KpdTbrEBbKll/YhDC8sFJhtmAmRj3bZxhconfmG8y+ZvIBXijh5as91 NPx5ndAoxs5fCPjFXe7ER1EgDfSQTb057A4RP8LdpiWCzrmyMIVNxf4+qy74gSHswWAN dEvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683252514; x=1685844514; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qH5eMyAUQVSoqRxDc0HN6Anu/VTobZIWu23yP7xOs4Y=; b=ZmTp8BSDSA88sXIGFdb3ZufGSnhL/zm5ah1bCjhnYtjivQHoMRhqz4mE+9Ws4Dj/H7 0bm+WeYPw1VFvKba86bEK2YRC+LP7fJNRkVZHvEz3K+dXRRS2X80k4Enm/02CGjy40xS XhDvgKOwUoenQk2HP3iCwGMzc6fjPc5wzmvu6RVK4qEcOgOsKzmJkw1k+HCPvRJdDACs 7rHwnwdsYvzEmWzcWCm2dMW7awjI52ePUmpa3zMHcFxGeQyP9YEWPQN+TZG7ULa+0ZIr +BwXukTVucPNUi8FSYGDIEjgQyHB8oF1/yZ/Yh5EhQX6puREZnh97ayQ2CcwZwkTkBEq tuKg== X-Gm-Message-State: AC+VfDx/+Io9BgVwS0I+T7y/1hPtTN9HkP+GGjAuG9jel6Q4qseasVb0 pNah41+xzeM+HwpSMC2kaqZ7AD897Uqt22LTnA== X-Google-Smtp-Source: ACHHUZ6Cwefl6naKGq/013bIQj5Tej/t43JgBijm1LdwhLjMG0EUdXLIgWe1yir4XoMQicQafl8AWbyBWCN7naB7ZhI= X-Received: by 2002:aca:b954:0:b0:38e:76b7:373b with SMTP id j81-20020acab954000000b0038e76b7373bmr2293228oif.53.1683252514647; Thu, 04 May 2023 19:08:34 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> <344b29c6-3d69-543d-678d-c2433dbf7152@optiplex-networks.com> <7747f587-f33e-f39c-ac97-fe4fe19e0b76@optiplex-networks.com> In-Reply-To: <7747f587-f33e-f39c-ac97-fe4fe19e0b76@optiplex-networks.com> From: Paul Procacci Date: Thu, 4 May 2023 22:08:22 -0400 Message-ID: Subject: Re: Tool to compare directories and delete duplicate files from one directory To: Kaya Saman Cc: freebsd-questions@freebsd.org Content-Type: multipart/alternative; boundary="00000000000033f28805fae8c4fc" X-Rspamd-Queue-Id: 4QCDcg5b58z3ChT X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --00000000000033f28805fae8c4fc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable There are multiple reasons why it may not work. My guess is because the potential for characters that could be showing up within the filenames and whatnot. This can be solved with an interpreted language that's a bit more forgiving= . Take the following perl script. It does the same thing as the shell script (almost). It renames the source file instead of making a copy of it. run as: ./test.pl /absolute/path/to/master_dir /absolute_path_to_dir_x ###########################################################################= ######## #!/usr/bin/env perl use strict; use warnings; sub msgDie { my ($ret) =3D shift; my ($msg) =3D shift // "$0 dir_base dir\n"; print $msg; exit($ret); } msgDie(1) unless(scalar @ARGV eq 2); my $base =3D $ARGV[0]; my $dir =3D $ARGV[1]; msgDie(1, "base directory doesn't exist\n") unless -d $base; msgDie(1, "source directory doesn't exist\n") unless -d $dir; opendir(my $dh, $dir) or msgDie("Unable to open directory: $dir\n"); while(readdir $dh) { next if($_ eq '.' || $_ eq '..'); if( ! -f "$base/$_" ){ rename("$dir/$_", "$base/$_"); next; } my ($ref) =3D (stat("$base/$_"))[7]; my ($src) =3D (stat("$dir/$_"))[7]; unlink("$dir/$_") if($ref =3D=3D $src); } ###########################################################################= ######## ~Paul On Thu, May 4, 2023 at 9:32=E2=80=AFPM Kaya Saman wrote: > > On 5/5/23 01:13, Paul Procacci wrote: > > #!/bin/sh > > > > # > > # dir_1, dir_2, and dir_3 are the directories I want to search through. > > for i in dir_1 dir_2 dir_3; > > do > > # Retrieve the filenames within each of those directories > > ls $i/ | while read file; > > do > > If the file doesn't exist in the base dir, copy it and continue > > with the top of the loop. > > [ ! -f dir_base/$file ] && cp $i/$file dir_base/ && continue > > > > # > > # Getting to this point means the file eixsts in both locations. > > # > > > > # Get the file size as it is in the dir_base > > ref=3D`stat -f '%z' dir_base/$file` > > > > # Get the file size as it is in $i > > src=3D`stat -f '%z' $i/$file` > > > > # If the sizes are the same, remove the file from the source > directory > > [ $ref -eq $src ] && rm -f $i/file > > > > done > > done > > > Thanks so much! > > > just a quick question... you have dir_base written in the script. Do I > need to define this or is this part of the shell language itself? > > > Right now I have modifed the script to make it non destructive so that > it doesn't do any copying or removing yet... call it a test instance if > you like. I personally prefer doing things like this so I don't have any > accidents and loose things in the meantime... > > > So my initial modification is this: > > > > #!/bin/sh > > > > # > > # dir_1, dir_2, and dir_3 are the directories I want to search through. > > for i in /dir_1 /dir_2 /dir_3; > > do > > # Retrieve the filenames within each of those directories > > ls $i/ | while read file; > > do > > # If the file doesn't exist in the base dir, copy it and continue > > with the top of the loop. > > [ ! -f dir_base/$file ] && ls $i/$file && continue > > > > # > > # Getting to this point means the file eixsts in both locations. > > # > > > > # Get the file size as it is in the dir_base > > ref=3D`stat -f '%z' dir_base/$file` > > > > # Get the file size as it is in $i > > src=3D`stat -f '%z' $i/$file` > > > > # If the sizes are the same, remove the file from the source > directory > > [ $ref -nq $src ] && ls $i/file > /tmp/file > > > > done > > done > > > If this works it should just output the different files into a file > called "file" under /tmp > > > Ok, this didn't work at all.... it just listed a whole bunch of top > level folders and didn't recurse through them :-( > > > I ran it on the assumption that I needed to run the script under /dir > and that dir_base was a shell function which would essentially be /dir/. > > > [EDIT] > > > Currently, I managed to get it partly running by modifying ls to use ls > -R *but* I think that the 'stat' statements don't allow for recursion? > > > The script is running as I type this but it's most likely just > outputting a whole bunch of ls information... as I see many 'stat' > errors in the shell output. > > > --=20 __________________ :(){ :|:& };: --00000000000033f28805fae8c4fc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
There are multiple reasons why it may not work.=C2=A0= My guess is because the potential for characters that could be showing up = within the filenames and whatnot.

This can be solved with= an interpreted language that's a bit more forgiving.
Tak= e the following perl script.=C2=A0 It does the same thing as the shell scri= pt (almost).=C2=A0 It renames the source file instead of making a copy of i= t.

run as:=C2=A0 ./test.pl /absolute/= path/to/master_dir /absolute_path_to_dir_x

###########################################################################= ########
#!/usr/bin/env perl

use strict;
use warnings;

sub msgD= ie
{
=C2=A0 my ($ret) =3D shift;
=C2=A0 my ($msg) =3D shift // &qu= ot;$0 dir_base dir\n";
=C2=A0 print $msg;
=C2=A0 exit($ret);
= }

msgDie(1) unless(scalar @ARGV eq 2);

my $base =3D $ARGV[0];=
my $dir =C2=A0=3D $ARGV[1];

msgDie(1, "base directory doesn= 't exist\n") unless -d $base;
msgDie(1, "source directory = doesn't exist\n") unless -d $dir;

opendir(my $dh, $dir) or = msgDie("Unable to open directory: $dir\n");
while(readdir $dh)=
{
=C2=A0 next if($_ eq '.' || $_ eq '..');
=C2=A0= if( ! -f "$base/$_" ){
=C2=A0 =C2=A0 rename("$dir/$_&quo= t;, "$base/$_");
=C2=A0 =C2=A0 next;
=C2=A0 }

=C2=A0= my ($ref) =3D (stat("$base/$_"))[7];
=C2=A0 my ($src) =3D (st= at("$dir/$_"))[7];
=C2=A0 unlink("$dir/$_") if($ref = =3D=3D $src);
}
#####################################################= ##############################

~Paul

<= div class=3D"gmail_quote">
On Thu, May= 4, 2023 at 9:32=E2=80=AFPM Kaya Saman <kayasaman@optiplex-networks.com> wrote:
=

On 5/5/23 01:13, Paul Procacci wrote:
> #!/bin/sh
>
> #
> # dir_1, dir_2, and dir_3 are the directories I want to search through= .
> for i in dir_1 dir_2 dir_3;
> do
> =C2=A0 # Retrieve the filenames within each of those directories
> =C2=A0 ls $i/ | while read file;
> =C2=A0 do
> =C2=A0=C2=A0=C2=A0=C2=A0 If the file doesn't exist in the base dir= , copy it and continue
> with the top of the loop.
> =C2=A0 =C2=A0 [ ! -f dir_base/$file ] && cp $i/$file dir_base/= && continue
>
> =C2=A0=C2=A0=C2=A0 #
> =C2=A0=C2=A0=C2=A0 # Getting to this point means the file eixsts in bo= th locations.
> =C2=A0=C2=A0=C2=A0 #
>
> =C2=A0=C2=A0=C2=A0 # Get the file size as it is in the dir_base
> =C2=A0 =C2=A0 ref=3D`stat -f '%z' dir_base/$file`
>
> =C2=A0=C2=A0=C2=A0 # Get the file size as it is in $i
> =C2=A0 =C2=A0 src=3D`stat -f '%z' $i/$file`
>
> =C2=A0=C2=A0=C2=A0 # If the sizes are the same, remove the file from t= he source directory
> =C2=A0 =C2=A0 [ $ref -eq $src ] && rm -f $i/file
>
> =C2=A0 done
> done


Thanks so much!


just a quick question... you have dir_base written in the script. Do I
need to define this or is this part of the shell language itself?


Right now I have modifed the script to make it non destructive so that
it doesn't do any copying or removing yet... call it a test instance if=
you like. I personally prefer doing things like this so I don't have an= y
accidents and loose things in the meantime...


So my initial modification is this:


> #!/bin/sh
>
> #
> # dir_1, dir_2, and dir_3 are the directories I want to search through= .
> for i in /dir_1 /dir_2 /dir_3;
> do
> =C2=A0 # Retrieve the filenames within each of those directories
> =C2=A0 ls $i/ | while read file;
> =C2=A0 do
> =C2=A0=C2=A0=C2=A0 # If the file doesn't exist in the base dir, co= py it and continue
> with the top of the loop.
> =C2=A0 =C2=A0 [ ! -f dir_base/$file ] && ls $i/$file &&= ; continue
>
> =C2=A0=C2=A0=C2=A0 #
> =C2=A0=C2=A0=C2=A0 # Getting to this point means the file eixsts in bo= th locations.
> =C2=A0=C2=A0=C2=A0 #
>
> =C2=A0=C2=A0=C2=A0 # Get the file size as it is in the dir_base
> =C2=A0 =C2=A0 ref=3D`stat -f '%z' dir_base/$file`
>
> =C2=A0=C2=A0=C2=A0 # Get the file size as it is in $i
> =C2=A0 =C2=A0 src=3D`stat -f '%z' $i/$file`
>
> =C2=A0=C2=A0=C2=A0 # If the sizes are the same, remove the file from t= he source directory
> =C2=A0 =C2=A0 [ $ref -nq $src ] && ls $i/file > /tmp/file >
> =C2=A0 done
> done


If this works it should just output the different files into a file
called "file" under /tmp


Ok, this didn't work at all.... it just listed a whole bunch of top level folders and didn't recurse through them :-(


I ran it on the assumption that I needed to run the script under /dir
and that dir_base was a shell function which would essentially be /dir/.

[EDIT]


Currently, I managed to get it partly running by modifying ls to use ls -R *but* I think that the 'stat' statements don't allow for rec= ursion?


The script is running as I type this but it's most likely just
outputting a whole bunch of ls information... as I see many 'stat' =
errors in the shell output.




--
_____________= _____

:(){ :|:& };:
--00000000000033f28805fae8c4fc-- From nobody Fri May 5 02:30:14 2023 X-Original-To: freebsd-questions@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 4QCF5h21nFz4985B for ; Fri, 5 May 2023 02:30:16 +0000 (UTC) (envelope-from kayasaman@optiplex-networks.com) Received: from mail.optiplex-networks.com (mail.optiplex-networks.com [212.159.80.20]) (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 4QCF5h01zQz3GZW for ; Fri, 5 May 2023 02:30:16 +0000 (UTC) (envelope-from kayasaman@optiplex-networks.com) Authentication-Results: mx1.freebsd.org; none Received: from localhost (localhost [127.0.0.1]) by mail.optiplex-networks.com (Postfix) with ESMTP id E396D15C2F4F; Fri, 5 May 2023 03:30:14 +0100 (BST) Received: from mail.optiplex-networks.com ([127.0.0.1]) by localhost (mail.optiplex-networks.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Wftqiw0V4ojJ; Fri, 5 May 2023 03:30:14 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by mail.optiplex-networks.com (Postfix) with ESMTP id 59D4415C38AA; Fri, 5 May 2023 03:30:14 +0100 (BST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.optiplex-networks.com 59D4415C38AA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=optiplex-networks.com; s=AE93A2AC-7F67-11EA-90AE-8A1FE64F6997; t=1683253814; bh=egU9luFGKeN87+G1d9VVrR5vEnFiZqWwWdQzbH+KPkU=; h=Message-ID:Date:MIME-Version:To:From; b=uBCcmIPh/6jBJhqxD/hnPf7T6NsiA4E0sQ+BOy6Wz4JiUdTa6QJRqDZvl/2oNHGXy HK9GvGjhf9KG1Ct5yudWYfxJ4q2qCcEM4N3B0uqS9s+YuugpCYvITbAiyCSpl+WMVP UX0w5vcflj7eokqhVWHocjYQAi9cOaxk6sDROkS45yiJamNOIxmjnvX5G7PpnauBUd pCZ9QQjbqsthZiHbwaltwGR6OgzdNmBhQ+gHaSHCXjK2K6hNTTG8+op6Za00D1D4fP 0otdHzqa5VR03M49ehuz5zVQ95OF4rI8tUT62JTVZpCATn/XN60/dTXdJzEt1sap0j FPG6GZQhRTaQg== X-Virus-Scanned: amavisd-new at mail.optiplex-networks.com Received: from mail.optiplex-networks.com ([127.0.0.1]) by localhost (mail.optiplex-networks.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id JHzYyicy9Wog; Fri, 5 May 2023 03:30:14 +0100 (BST) Received: from [192.168.20.23] (unknown [192.168.20.23]) by mail.optiplex-networks.com (Postfix) with ESMTPSA id 39B5D15C2F4F; Fri, 5 May 2023 03:30:14 +0100 (BST) Content-Type: multipart/alternative; boundary="------------FQX0zPbApKHBu0wXoTJEWsO0" Message-ID: Date: Fri, 5 May 2023 03:30:14 +0100 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: Tool to compare directories and delete duplicate files from one directory Content-Language: en-US To: Paul Procacci Cc: freebsd-questions@freebsd.org References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> <344b29c6-3d69-543d-678d-c2433dbf7152@optiplex-networks.com> <7747f587-f33e-f39c-ac97-fe4fe19e0b76@optiplex-networks.com> From: Kaya Saman In-Reply-To: X-Rspamd-Queue-Id: 4QCF5h01zQz3GZW X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6871, ipnet:212.159.64.0/18, country:GB] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N This is a multi-part message in MIME format. --------------FQX0zPbApKHBu0wXoTJEWsO0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 5/5/23 03:08, Paul Procacci wrote: > There are multiple reasons why it may not work.=C2=A0 My guess is becau= se=20 > the potential for characters that could be showing up within the=20 > filenames and whatnot. > > This can be solved with an interpreted language that's a bit more=20 > forgiving. > Take the following perl script.=C2=A0 It does the same thing as the she= ll=20 > script (almost).=C2=A0 It renames the source file instead of making a c= opy=20 > of it. > > run as:=C2=A0 ./test.pl /absolute/path/to/master_dir=20 > /absolute_path_to_dir_x > > #######################################################################= ############=20 > > #!/usr/bin/env perl > > use strict; > use warnings; > > sub msgDie > { > =C2=A0 my ($ret) =3D shift; > =C2=A0 my ($msg) =3D shift // "$0 dir_base dir\n"; > =C2=A0 print $msg; > =C2=A0 exit($ret); > } > > msgDie(1) unless(scalar @ARGV eq 2); > > my $base =3D $ARGV[0]; > my $dir =C2=A0=3D $ARGV[1]; > > msgDie(1, "base directory doesn't exist\n") unless -d $base; > msgDie(1, "source directory doesn't exist\n") unless -d $dir; > > opendir(my $dh, $dir) or msgDie("Unable to open directory: $dir\n"); > while(readdir $dh) > { > =C2=A0 next if($_ eq '.' || $_ eq '..'); > =C2=A0 if( ! -f "$base/$_" ){ > =C2=A0 =C2=A0 rename("$dir/$_", "$base/$_"); > =C2=A0 =C2=A0 next; > =C2=A0 } > > =C2=A0 my ($ref) =3D (stat("$base/$_"))[7]; > =C2=A0 my ($src) =3D (stat("$dir/$_"))[7]; > =C2=A0 unlink("$dir/$_") if($ref =3D=3D $src); > } > #######################################################################= ############ > > ~Paul > > This didn't seem to work :-( What exactly happened is this: I created a set of test directories in /tmp So, I have /tmp/test1 and /tmp/test2 to mimic the structure of the directories I intend to run this thing I=20 did this: create a subdir called: dupdir in /tmp/test1 and /tmp/test2 /tmp/test2/dupdir contains these files: dup and dup1 /tmp/test1/dupdir contains a modified 'dup' file but copied dup1 file. However*, now things get interesting as dup from test1 contains=20 "1234567" and dup from test2 contains "111" <- this is to simulate the=20 file size difference. I then ran: ./test.pl /tmp/test1 /tmp/test2 The expected behavior is that I should retain the file 'dup' in test1=20 while 'dup1' should be removed. In my actual file system I have many of these subdirs, so a fair test=20 would probably be something like creating: /tmp/test1/dupdir1 /tmp/test2/dupdir1 /tmp/test1/dupdir2 /tmp/test2/dupdir2 then putting the file dup into dupdir1 and dup1 into dupdir2 I guess my issue is complex?? If I only I had used the=20 --remove-source-files option during my initial rsync then I wouldn't=20 have had to worry about any of this since I used the --ignore-existing=20 option so that would have done the trick initially, but I decided to=20 play safe instead and now ended up with a slight headache on my hands. --------------FQX0zPbApKHBu0wXoTJEWsO0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On 5/5/23 03:08, Paul Procacci wrote:<= br>
There are multiple reasons why it may not work.=C2=A0 My gue= ss is because the potential for characters that could be showing up within the filenames and whatnot.

This can be solved with an interpreted language that's a bit more forgiving.
Take the following perl script.=C2=A0 It does the same thing= as the shell script (almost).=C2=A0 It renames the source file ins= tead of making a copy of it.

run as:=C2=A0 ./test.pl /absolute/path/to/master_dir /absolute_path_to_dir_x

#########################################################################= ##########
#!/usr/bin/env perl

use strict;
use warnings;

sub msgDie
{
=C2=A0 my ($ret) =3D shift;
=C2=A0 my ($msg) =3D shift // "$0 dir_base dir\n";
=C2=A0 print $msg;
=C2=A0 exit($ret);
}

msgDie(1) unless(scalar @ARGV eq 2);

my $base =3D $ARGV[0];
my $dir =C2=A0=3D $ARGV[1];

msgDie(1, "base directory doesn't exist\n") unless -d $base; msgDie(1, "source directory doesn't exist\n") unless -d $dir;
opendir(my $dh, $dir) or msgDie("Unable to open directory: $dir\n");
while(readdir $dh)
{
=C2=A0 next if($_ eq '.' || $_ eq '..');
=C2=A0 if( ! -f "$base/$_" ){
=C2=A0 =C2=A0 rename("$dir/$_", "$base/$_");
=C2=A0 =C2=A0 next;
=C2=A0 }

=C2=A0 my ($ref) =3D (stat("$base/$_"))[7];
=C2=A0 my ($src) =3D (stat("$dir/$_"))[7];
=C2=A0 unlink("$dir/$_") if($ref =3D=3D $src);
}
#########################################################################= ##########

~Paul



This didn't seem to work :-(


What exactly happened is this:


I created a set of test directories in /tmp


So, I have /tmp/test1 and /tmp/test2


to mimic the structure of the directories I intend to run this thing I did this:


create a subdir called: dupdir in /tmp/test1 and /tmp/test2


/tmp/test2/dupdir contains these files: dup and dup1


/tmp/test1/dupdir contains a modified 'dup' file but copied dup1 file.


However*, now things get interesting as dup from test1 contains "1234567" and dup from test2 contains "111" <- this is to simulate the file size difference.


I then ran: ./test.pl /tmp/test1 /tmp/test2


The expected behavior is that I should retain the file 'dup' in test1 while 'dup1' should be removed.


In my actual file system I have many of these subdirs, so a fair test would probably be something like creating:

/tmp/test1/dupdir1

/tmp/test2/dupdir1

/tmp/test1/dupdir2

/tmp/test2/dupdir2


then putting the file dup into dupdir1 and dup1 into dupdir2


I guess my issue is complex?? If I only I had used the --remove-source-files option during my initial rsync then I wouldn't have had to worry about any of this since I used the --ignore-existing option so that would have done the trick initially, but I decided to play safe instead and now ended up with a slight headache on my hands.

--------------FQX0zPbApKHBu0wXoTJEWsO0-- From nobody Fri May 5 03:01:54 2023 X-Original-To: freebsd-questions@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 4QCFpS3kkFz49Ft5 for ; Fri, 5 May 2023 03:02:08 +0000 (UTC) (envelope-from pprocacci@gmail.com) Received: from mail-oo1-xc36.google.com (mail-oo1-xc36.google.com [IPv6:2607:f8b0:4864:20::c36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCFpR6cv6z3M7c for ; Fri, 5 May 2023 03:02:07 +0000 (UTC) (envelope-from pprocacci@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oo1-xc36.google.com with SMTP id 006d021491bc7-54711bc097bso440837eaf.0 for ; Thu, 04 May 2023 20:02:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683255726; x=1685847726; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=UlVc+w4DeSapKqX7hv60TMtnNRUB/CW11DoMjXzDtcQ=; b=Xlkr+NEfU2lY/jt81wHIHKFIxiKOuX+H0uVLWc9lJ+SWXmUZjOEqsg/qc/odxKKNUG lhwp03ruyXu6AdO1orantXCxWVf8UVHdyh/OM7PY04xIud7wLSYxJJJJCRCUslW2a57q TgZnfXqtjIurrw6wgwHEw9pzdzTRZ2WSNRtX8dgzBIr+Q3N48kP37XWTdrLFWoMZmoYj p6lXUz+7k/lUqlE5bIOWbrS0pjk/McPMcxBsE+ta0FjmTJArPtEfo5qwEplKq6yRPfV4 4mhvvrEGlSNghBA6g8Jpvv2Agh7s5PjlgeLFhaKrp+ct7vyzL8h1f52N3XPN42eY9YAC tCgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683255726; x=1685847726; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UlVc+w4DeSapKqX7hv60TMtnNRUB/CW11DoMjXzDtcQ=; b=BN/0lnLY/AX3daDdH64ozdJ1m76Bz0hcZjOP02yl490OU0bOHMDwJjuN5tPmPV/7tG 1gjmJ3IlRsNmWSeeQhLIMRnhjuczqa1B5y6gnLOEGGVA7MoO1uAjHvt4lfLAmEENrqUZ Bh7oEXqqo37j07ZEWL63tta03Kx03pHB8EakGiH6+WagJi/fnBU82MacGfQLgZOckvK+ DzMfpqiQmZHmGbhl2uIdncf2y+ufJU5NlRanQPcn04TubpVtmwcrqgbBBRxFHGQXY8fc Us0OxxbXMO4v6esEP6RiASBG0UjPb8ABlmby1Ndp0AKA98zusICOv2OiKIFczTNCEXDy 2Jjw== X-Gm-Message-State: AC+VfDwQWQ6Wm380ec8n86rIU5U+GV8ne4b83uSoM2ZhOg2FufuCgLhZ ietMtMzm9HZU8vKlsTOvu0GZAPF07BjO/9TOugFnvImbBK1Z X-Google-Smtp-Source: ACHHUZ7deSTXHpxVT49ljFbSrLutkh3bEqyCkYxHToOS0NuKL+IdJfAVe7MhzzqJlFEyRjj/nOiYRlxmZT8X+ze8asY= X-Received: by 2002:a05:6808:438f:b0:38e:dc5b:7bc0 with SMTP id dz15-20020a056808438f00b0038edc5b7bc0mr2230556oib.59.1683255726588; Thu, 04 May 2023 20:02:06 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> <344b29c6-3d69-543d-678d-c2433dbf7152@optiplex-networks.com> <7747f587-f33e-f39c-ac97-fe4fe19e0b76@optiplex-networks.com> In-Reply-To: From: Paul Procacci Date: Thu, 4 May 2023 23:01:54 -0400 Message-ID: Subject: Re: Tool to compare directories and delete duplicate files from one directory To: Kaya Saman Cc: freebsd-questions@freebsd.org Content-Type: multipart/alternative; boundary="000000000000a649b605fae9831d" X-Rspamd-Queue-Id: 4QCFpR6cv6z3M7c X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000a649b605fae9831d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 4, 2023 at 10:30=E2=80=AFPM Kaya Saman wrote: > > On 5/5/23 03:08, Paul Procacci wrote: > > There are multiple reasons why it may not work. My guess is because the > potential for characters that could be showing up within the filenames an= d > whatnot. > > This can be solved with an interpreted language that's a bit more > forgiving. > Take the following perl script. It does the same thing as the shell > script (almost). It renames the source file instead of making a copy of = it. > > run as: ./test.pl /absolute/path/to/master_dir /absolute_path_to_dir_x > > #########################################################################= ########## > > #!/usr/bin/env perl > > use strict; > use warnings; > > sub msgDie > { > my ($ret) =3D shift; > my ($msg) =3D shift // "$0 dir_base dir\n"; > print $msg; > exit($ret); > } > > msgDie(1) unless(scalar @ARGV eq 2); > > my $base =3D $ARGV[0]; > my $dir =3D $ARGV[1]; > > msgDie(1, "base directory doesn't exist\n") unless -d $base; > msgDie(1, "source directory doesn't exist\n") unless -d $dir; > > opendir(my $dh, $dir) or msgDie("Unable to open directory: $dir\n"); > while(readdir $dh) > { > next if($_ eq '.' || $_ eq '..'); > if( ! -f "$base/$_" ){ > rename("$dir/$_", "$base/$_"); > next; > } > > my ($ref) =3D (stat("$base/$_"))[7]; > my ($src) =3D (stat("$dir/$_"))[7]; > unlink("$dir/$_") if($ref =3D=3D $src); > } > > #########################################################################= ########## > > ~Paul > > > > This didn't seem to work :-( > > > What exactly happened is this: > > > I created a set of test directories in /tmp > > > So, I have /tmp/test1 and /tmp/test2 > > > to mimic the structure of the directories I intend to run this thing I di= d > this: > > > create a subdir called: dupdir in /tmp/test1 and /tmp/test2 > > > /tmp/test2/dupdir contains these files: dup and dup1 > > > /tmp/test1/dupdir contains a modified 'dup' file but copied dup1 file. > > > However*, now things get interesting as dup from test1 contains "1234567" > and dup from test2 contains "111" <- this is to simulate the file size > difference. > > > > > > Worked for me! Regardless. Use rsync then. rsync --ignore-existing --remove-source-files /src /dest This would at the very least move non-existent files from the source over to the dest AND remove those source files AFTER the transfer happens. You'll be 1/2 way there doing that. What you'll be left with are file that exist in BOTH src AND DEST. ~Paul --000000000000a649b605fae9831d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, May 4, 2023 at 10:30=E2=80=AFPM Kaya Saman &l= t;kaya= saman@optiplex-networks.com> wrote:
=20 =20 =20


On 5/5/23 03:08, Paul Procacci wrote:
=20
There are multiple reasons why it may not work.=C2=A0 My guess is because the potential for characters that could be showing up within the filenames and whatnot.

This can be solved with an interpreted language that's a bit more forgiving.
Take the following perl script.=C2=A0 It does the same thing a= s the shell script (almost).=C2=A0 It renames the source file inste= ad of making a copy of it.

run as:=C2=A0 ./test= .pl /absolute/path/to/master_dir /absolute_path_to_dir_x

###########################################################################= ########
#!/usr/bin/env perl

use strict;
use warnings;

sub msgDie
{
=C2=A0 my ($ret) =3D shift;
=C2=A0 my ($msg) =3D shift // "$0 dir_base dir\n";
=C2=A0 print $msg;
=C2=A0 exit($ret);
}

msgDie(1) unless(scalar @ARGV eq 2);

my $base =3D $ARGV[0];
my $dir =C2=A0=3D $ARGV[1];

msgDie(1, "base directory doesn't exist\n") unless = -d $base;
msgDie(1, "source directory doesn't exist\n") unles= s -d $dir;

opendir(my $dh, $dir) or msgDie("Unable to open directory: $dir\n");
while(readdir $dh)
{
=C2=A0 next if($_ eq '.' || $_ eq '..');
=C2=A0 if( ! -f "$base/$_" ){
=C2=A0 =C2=A0 rename("$dir/$_", "$base/$_");<= br> =C2=A0 =C2=A0 next;
=C2=A0 }

=C2=A0 my ($ref) =3D (stat("$base/$_"))[7];
=C2=A0 my ($src) =3D (stat("$dir/$_"))[7];
=C2=A0 unlink("$dir/$_") if($ref =3D=3D $src);
}
###########################################################################= ########

~Paul



This didn't seem to work :-(


What exactly happened is this:


I created a set of test directories in /tmp


So, I have /tmp/test1 and /tmp/test2


to mimic the structure of the directories I intend to run this thing I did this:


create a subdir called: dupdir in /tmp/test1 and /tmp/test2


/tmp/test2/dupdir contains these files: dup and dup1


/tmp/test1/dupdir contains a modified 'dup' file but copied = dup1 file.


However*, now things get interesting as dup from test1 contains "1234567" and dup from test2 contains "111" <-= this is to simulate the file size difference.





=C2=A0
Wor= ked for me!=C2=A0 Regardless.=C2=A0 Use rsync then.

rsync --ignore-existing=20 --remove-source-files=C2=A0 /src /dest
This would at the very=
 least move non-existent files from the source over to the dest AND remove =
those source files AFTER the transfer happens.
Y=
ou'll be 1/2 way there doing that.  What you'll be left with are fi=
le that exist in BOTH src AND DEST.

~Paul
--000000000000a649b605fae9831d-- From nobody Fri May 5 03:20:23 2023 X-Original-To: freebsd-questions@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 4QCGCY70Q5z49JHt for ; Fri, 5 May 2023 03:20:25 +0000 (UTC) (envelope-from kayasaman@optiplex-networks.com) Received: from mail.optiplex-networks.com (mail.optiplex-networks.com [212.159.80.20]) (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 4QCGCY4K7Gz3P31 for ; Fri, 5 May 2023 03:20:25 +0000 (UTC) (envelope-from kayasaman@optiplex-networks.com) Authentication-Results: mx1.freebsd.org; none Received: from localhost (localhost [127.0.0.1]) by mail.optiplex-networks.com (Postfix) with ESMTP id 4AB6515C2DBC; Fri, 5 May 2023 04:20:24 +0100 (BST) Received: from mail.optiplex-networks.com ([127.0.0.1]) by localhost (mail.optiplex-networks.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id I5GQA6PVQ0Vd; Fri, 5 May 2023 04:20:23 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by mail.optiplex-networks.com (Postfix) with ESMTP id 6C9AA15C2EC6; Fri, 5 May 2023 04:20:23 +0100 (BST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.optiplex-networks.com 6C9AA15C2EC6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=optiplex-networks.com; s=AE93A2AC-7F67-11EA-90AE-8A1FE64F6997; t=1683256823; bh=oVXjp8prtxk8x/Wj4RT78Nw+WaV50MyE0wELsyokYfE=; h=Message-ID:Date:MIME-Version:To:From; b=KPAwn2a00itP2DgJrn+C/yaqqR1c8x+OLGk5I577J9kIPghXJTjHQsGzjdUuyp/GT U3O8IGSTQbJmMu+lQQesJ3ZAD6yxfzx5DMppxd7wKda/Q/Mt0RHDcUS5XfFxjw5lQ1 iUFO6f32QuZlXwksq4yU977+j42V8p2tpGOHhlSurmP+ncLqNPk+tIohxtE4ZYkkw2 SLeJKWNo40QdmCJriitbPvgQIUe9DltgwzZlYO+hytb6SWGF1qga7aJdBdLeXoLW07 UbyZHefqEkuacScKG9ZBeCe1O+vS85npV7p8L8R4krLDl8iDwvp9MmYD9FKLkT8HWK TMZGQLlqi5jGQ== X-Virus-Scanned: amavisd-new at mail.optiplex-networks.com Received: from mail.optiplex-networks.com ([127.0.0.1]) by localhost (mail.optiplex-networks.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id dLBu-hMy_d8x; Fri, 5 May 2023 04:20:23 +0100 (BST) Received: from [192.168.20.23] (unknown [192.168.20.23]) by mail.optiplex-networks.com (Postfix) with ESMTPSA id 4ED0515C2DBC; Fri, 5 May 2023 04:20:23 +0100 (BST) Content-Type: multipart/alternative; boundary="------------d0U3TqYER7CIuMFlsBlTFHlk" Message-ID: Date: Fri, 5 May 2023 04:20:23 +0100 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: Tool to compare directories and delete duplicate files from one directory Content-Language: en-US To: Paul Procacci Cc: freebsd-questions@freebsd.org References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> <344b29c6-3d69-543d-678d-c2433dbf7152@optiplex-networks.com> <7747f587-f33e-f39c-ac97-fe4fe19e0b76@optiplex-networks.com> From: Kaya Saman In-Reply-To: X-Rspamd-Queue-Id: 4QCGCY4K7Gz3P31 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6871, ipnet:212.159.64.0/18, country:GB] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N This is a multi-part message in MIME format. --------------d0U3TqYER7CIuMFlsBlTFHlk Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 5/5/23 04:01, Paul Procacci wrote: > On Thu, May 4, 2023 at 10:30=E2=80=AFPM Kaya Saman=20 > wrote: > > > On 5/5/23 03:08, Paul Procacci wrote: >> There are multiple reasons why it may not work.=C2=A0 My guess is >> because the potential for characters that could be showing up >> within the filenames and whatnot. >> >> This can be solved with an interpreted language that's a bit more >> forgiving. >> Take the following perl script.=C2=A0 It does the same thing as th= e >> shell script (almost).=C2=A0 It renames the source file instead of >> making a copy of it. >> >> run as:=C2=A0 ./test.pl /absolute/path/to/master_= dir >> /absolute_path_to_dir_x >> >> ##################################################################= ################# >> >> #!/usr/bin/env perl >> >> use strict; >> use warnings; >> >> sub msgDie >> { >> =C2=A0 my ($ret) =3D shift; >> =C2=A0 my ($msg) =3D shift // "$0 dir_base dir\n"; >> =C2=A0 print $msg; >> =C2=A0 exit($ret); >> } >> >> msgDie(1) unless(scalar @ARGV eq 2); >> >> my $base =3D $ARGV[0]; >> my $dir =C2=A0=3D $ARGV[1]; >> >> msgDie(1, "base directory doesn't exist\n") unless -d $base; >> msgDie(1, "source directory doesn't exist\n") unless -d $dir; >> >> opendir(my $dh, $dir) or msgDie("Unable to open directory: $dir\n"= ); >> while(readdir $dh) >> { >> =C2=A0 next if($_ eq '.' || $_ eq '..'); >> =C2=A0 if( ! -f "$base/$_" ){ >> =C2=A0 =C2=A0 rename("$dir/$_", "$base/$_"); >> =C2=A0 =C2=A0 next; >> =C2=A0 } >> >> =C2=A0 my ($ref) =3D (stat("$base/$_"))[7]; >> =C2=A0 my ($src) =3D (stat("$dir/$_"))[7]; >> =C2=A0 unlink("$dir/$_") if($ref =3D=3D $src); >> } >> ##################################################################= ################# >> >> ~Paul >> >> > > This didn't seem to work :-( > > > What exactly happened is this: > > > I created a set of test directories in /tmp > > > So, I have /tmp/test1 and /tmp/test2 > > > to mimic the structure of the directories I intend to run this > thing I did this: > > > create a subdir called: dupdir in /tmp/test1 and /tmp/test2 > > > /tmp/test2/dupdir contains these files: dup and dup1 > > > /tmp/test1/dupdir contains a modified 'dup' file but copied dup1 fi= le. > > > However*, now things get interesting as dup from test1 contains > "1234567" and dup from test2 contains "111" <- this is to simulate > the file size difference. > > > > > > > Worked for me!=C2=A0 Regardless.=C2=A0 Use rsync then. > > rsync --ignore-existing --remove-source-files=C2=A0 /src /dest > |This would at the very least move non-existent files from the source=20 > over to the dest AND remove those source files AFTER the transfer=20 > happens. | > |You'll be 1/2 way there doing that. What you'll be left with are file=20 > that exist in BOTH src AND DEST. | > |~Paul | Paul, I think we've got wires crossed.... I *have* already performed the rsync. Apologies if I wasn't clear! The problem I am faced with is that the destination directory is already=20 populated with the information from 3 source directories. I need to remove the sync'ed files in the source directories and leave=20 files that match in name but are of different sizes. The problem is I can't use rsync again for this as there aren't any=20 options to simply compare files based on size. I can't use the=20 --existing option as the files exist in both directories.... This is the dilemma I am facing: ls -l /merged_dir/folder/ 234904506 - file 'a' ls -l /source_dir/folder/ 1080918146 - file 'a' so in this case file 'a' is in both directories with the same name but=20 different size. I need to keep both versions. However, *if* they were=20 the same size then remove the file in the source_dir..... That's all.. I don't need to transfer anything or copy anything at=20 all... just compare and remove files of same name and size. Hopefully I am explaining better and things are more clear? Again I=20 apologize for the confusion=C2=A0 :-( --------------d0U3TqYER7CIuMFlsBlTFHlk Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On 5/5/23 04:01, Paul Procacci wrote:<= br>
On Thu, May 4, 2023 at 10:30=E2=80=AFPM Kaya Saman <kayasaman@optiplex-networks.c= om> wrote:


On 5/5/23 03:08, Paul Procacci wrote:
There are multiple reasons why it may not work.=C2=A0 My guess is because the potential for characters that could be showing up within the filenames and whatnot.

This can be solved with an interpreted language that's a bit more forgiving.
Take the following perl script.=C2=A0 It does th= e same thing as the shell script (almost).=C2=A0 It renames the source file instead of making a copy of it.

run as:=C2=A0 ./test.p= l /absolute/path/to/master_dir /absolute_path_to_dir_x

#########################################################################= ##########
#!/usr/bin/env perl

use strict;
use warnings;

sub msgDie
{
=C2=A0 my ($ret) =3D shift;
=C2=A0 my ($msg) =3D shift // "$0 dir_base dir\n";<= br> =C2=A0 print $msg;
=C2=A0 exit($ret);
}

msgDie(1) unless(scalar @ARGV eq 2);

my $base =3D $ARGV[0];
my $dir =C2=A0=3D $ARGV[1];

msgDie(1, "base directory doesn't exist\n") unless -d $base;
msgDie(1, "source directory doesn't exist\n") unless -d $dir;

opendir(my $dh, $dir) or msgDie("Unable to open directory: $dir\n");
while(readdir $dh)
{
=C2=A0 next if($_ eq '.' || $_ eq '..');
=C2=A0 if( ! -f "$base/$_" ){
=C2=A0 =C2=A0 rename("$dir/$_", "$base/$_");
=C2=A0 =C2=A0 next;
=C2=A0 }

=C2=A0 my ($ref) =3D (stat("$base/$_"))[7];
=C2=A0 my ($src) =3D (stat("$dir/$_"))[7];
=C2=A0 unlink("$dir/$_") if($ref =3D=3D $src);
}
#########################################################################= ##########

~Paul



This didn't seem to work :-(


What exactly happened is this:


I created a set of test directories in /tmp


So, I have /tmp/test1 and /tmp/test2


to mimic the structure of the directories I intend to run this thing I did this:


create a subdir called: dupdir in /tmp/test1 and /tmp/test2


/tmp/test2/dupdir contains these files: dup and dup1


/tmp/test1/dupdir contains a modified 'dup' file but copied dup1 file.


However*, now things get interesting as dup from test1 contains "1234567" and dup from test2 contains "111" <- this is to simulate the file size difference.





=C2=A0
Worked for me!=C2=A0 Regardless.=C2=A0 Use rsync then.

rsync --ignore-existing --remove-source-files=C2=A0 /src /dest
This would at the very least move non-existent f=
iles from the source over to the dest AND remove those source files AFTER=
 the transfer happens.
You'll be 1/2 way there doing that.  What you'll=
 be left with are file that exist in BOTH src AND DEST.

~Paul


Paul, I think we've got wires crossed....


I *have* already performed the rsync. Apologies if I wasn't clear!


The problem I am faced with is that the destination directory is already populated with the information from 3 source directories.


I need to remove the sync'ed files in the source directories and leave files that match in name but are of different sizes.


The problem is I can't use rsync again for this as there aren't any options to simply compare files based on size. I can't use the --existing option as the files exist in both directories....


This is the dilemma I am facing:


ls -l /merged_dir/folder/

234904506 - file 'a'


ls -l /source_dir/folder/

1080918146 - file 'a'


so in this case file 'a' is in both directories with the same name but different size. I need to keep both versions. However, *if* they were the same size then remove the file in the source_dir.....


That's all.. I don't need to transfer anything or copy anything at all... just compare and remove files of same name and size.


Hopefully I am explaining better and things are more clear? Again I apologize for the confusion=C2=A0 :-(

--------------d0U3TqYER7CIuMFlsBlTFHlk-- From nobody Fri May 5 03:36:19 2023 X-Original-To: freebsd-questions@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 4QCGZB4wGGz49LfR for ; Fri, 5 May 2023 03:36:34 +0000 (UTC) (envelope-from pprocacci@gmail.com) Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCGZB2GWHz3h2j for ; Fri, 5 May 2023 03:36:34 +0000 (UTC) (envelope-from pprocacci@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oi1-x22f.google.com with SMTP id 5614622812f47-3921cd76d5bso859070b6e.2 for ; Thu, 04 May 2023 20:36:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683257792; x=1685849792; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9vFFHdPV2nSpLcF6FUmun/0WAbyVKqbYKqAwX0AP9kA=; b=iLskSTsxV4V8tE3o7Z+GfC8FKjuQub/CCP9+VoTsYlObauiFt6sbiT3Y+36A7Z2knd Jng0g1xX49fICS4UhkdFaysn6FEfZIWrmtcAfRggqvBDOhP6m7ZTN+3a9S+EtI/geznQ 3rEuCG28Zufyt3OY482tf+wQyUZZ5/Nna+21K8WEU7Ud8ZkCsU6VfrYc/6wBfmcQAydJ GQKMQby5rdjzrdYA7f9jYqqYDYjstbLVtV9j6yeKaT4CnLO9TlVjZW2XJs7nh81RgUnQ OGFCjr1bq9360t2ncMDl+FiwBSpr+p6GBZrhlk8iEBhLEsK++idR7DfrlFPQLMAune9j QA/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683257792; x=1685849792; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9vFFHdPV2nSpLcF6FUmun/0WAbyVKqbYKqAwX0AP9kA=; b=lZmNl9lv+EKKqKHtzGVGoXct+X/XaeJ21qn1ppPkKEa7Y1RFqvLCYm2kKDbQtJY5Dr OFcEHlnqbMzf5bvYK2bnR8d1AgYU+GqpE6XwAAN2tZd+0C/nryRq/uvC0Ut4iOAIOJej fMw1IjnBxPDcDdrRZA1HW7g8BpXrNCjoLHgX1zAzvGqwHMan9BKJ7jLyIfc/fV86k9zq kTps7f5PSNCuDu/Zi4x0ACVCsTok73bSLHK9sOFe/YoxfsqcsoYWDu/mhgDoK/ERdOKv 0RZu7sVIjMuPbtKiOjgCHyvfAMPI1aF9srVLuwLxHbPUu0QNFknUalB9uEz4Q5tNuB27 rfoA== X-Gm-Message-State: AC+VfDyHlaiM1sZ6KBw2EfYubwmxcAkMfCKUdWGusDv2+xLdUrTdfleB ye4Tyf4Ws4WlBWyUpxyiUcUGSsLmpEXZFAV+s5iRCFVq7tEZ X-Google-Smtp-Source: ACHHUZ4KbchCFXw2dO64QTKWwyvqunAvsB8o1IkC85Tsnf2kTTIy2pYdGXwaox+zK0/XKdKVt3pav+hwMqKxZq5eewU= X-Received: by 2002:a05:6808:199d:b0:389:4a9e:3341 with SMTP id bj29-20020a056808199d00b003894a9e3341mr3097626oib.18.1683257791713; Thu, 04 May 2023 20:36:31 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> <344b29c6-3d69-543d-678d-c2433dbf7152@optiplex-networks.com> <7747f587-f33e-f39c-ac97-fe4fe19e0b76@optiplex-networks.com> In-Reply-To: From: Paul Procacci Date: Thu, 4 May 2023 23:36:19 -0400 Message-ID: Subject: Re: Tool to compare directories and delete duplicate files from one directory To: Kaya Saman Cc: freebsd-questions@freebsd.org Content-Type: multipart/alternative; boundary="000000000000bd96d105fae9fe90" X-Rspamd-Queue-Id: 4QCGZB2GWHz3h2j X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000bd96d105fae9fe90 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 4, 2023 at 11:20=E2=80=AFPM Kaya Saman wrote: > > On 5/5/23 04:01, Paul Procacci wrote: > > On Thu, May 4, 2023 at 10:30=E2=80=AFPM Kaya Saman < > kayasaman@optiplex-networks.com> wrote: > >> >> On 5/5/23 03:08, Paul Procacci wrote: >> >> There are multiple reasons why it may not work. My guess is because the >> potential for characters that could be showing up within the filenames a= nd >> whatnot. >> >> This can be solved with an interpreted language that's a bit more >> forgiving. >> Take the following perl script. It does the same thing as the shell >> script (almost). It renames the source file instead of making a copy of= it. >> >> run as: ./test.pl /absolute/path/to/master_dir /absolute_path_to_dir_x >> >> ########################################################################= ########### >> >> #!/usr/bin/env perl >> >> use strict; >> use warnings; >> >> sub msgDie >> { >> my ($ret) =3D shift; >> my ($msg) =3D shift // "$0 dir_base dir\n"; >> print $msg; >> exit($ret); >> } >> >> msgDie(1) unless(scalar @ARGV eq 2); >> >> my $base =3D $ARGV[0]; >> my $dir =3D $ARGV[1]; >> >> msgDie(1, "base directory doesn't exist\n") unless -d $base; >> msgDie(1, "source directory doesn't exist\n") unless -d $dir; >> >> opendir(my $dh, $dir) or msgDie("Unable to open directory: $dir\n"); >> while(readdir $dh) >> { >> next if($_ eq '.' || $_ eq '..'); >> if( ! -f "$base/$_" ){ >> rename("$dir/$_", "$base/$_"); >> next; >> } >> >> my ($ref) =3D (stat("$base/$_"))[7]; >> my ($src) =3D (stat("$dir/$_"))[7]; >> unlink("$dir/$_") if($ref =3D=3D $src); >> } >> >> ########################################################################= ########### >> >> ~Paul >> >> >> >> This didn't seem to work :-( >> >> >> What exactly happened is this: >> >> >> I created a set of test directories in /tmp >> >> >> So, I have /tmp/test1 and /tmp/test2 >> >> >> to mimic the structure of the directories I intend to run this thing I >> did this: >> >> >> create a subdir called: dupdir in /tmp/test1 and /tmp/test2 >> >> >> /tmp/test2/dupdir contains these files: dup and dup1 >> >> >> /tmp/test1/dupdir contains a modified 'dup' file but copied dup1 file. >> >> >> However*, now things get interesting as dup from test1 contains "1234567= " >> and dup from test2 contains "111" <- this is to simulate the file size >> difference. >> >> >> >> >> >> > Worked for me! Regardless. Use rsync then. > > rsync --ignore-existing --remove-source-files /src /dest > > This would at the very least move non-existent files from the source over= to the dest AND remove those source files AFTER the transfer happens. > > You'll be 1/2 way there doing that. What you'll be left with are file th= at exist in BOTH src AND DEST. > > > ~Paul > > > Paul, I think we've got wires crossed.... > > > I *have* already performed the rsync. Apologies if I wasn't clear! > > > The problem I am faced with is that the destination directory is already > populated with the information from 3 source directories. > > > I need to remove the sync'ed files in the source directories and leave > files that match in name but are of different sizes. > > > The problem is I can't use rsync again for this as there aren't any > options to simply compare files based on size. I can't use the --existing > option as the files exist in both directories.... > > > This is the dilemma I am facing: > > > ls -l /merged_dir/folder/ > > 234904506 - file 'a' > > > ls -l /source_dir/folder/ > > 1080918146 - file 'a' > > > so in this case file 'a' is in both directories with the same name but > different size. I need to keep both versions. However, *if* they were the > same size then remove the file in the source_dir..... > > > That's all.. I don't need to transfer anything or copy anything at all... > just compare and remove files of same name and size. > > > Hopefully I am explaining better and things are more clear? Again I > apologize for the confusion :-( > You're at least partially right that I was confused because comparing by name and by size makes no sense to me. A single byte changed in one yields the same name and the same size but are different! ;) Is the below output what you're expecting to happen: % mkdir a b % echo 1111 > a/test.txt % echo 1111 > b/test.txt %./test.pl a b % ls -l a b a: total 5 -rw-r--r-- 1 pprocacci pprocacci 5 May 5 03:26 test.txt b: total 0 ---------- The below perl script is what was ran above. 1) Find a file from directory "b". 2) Go to the top of the loop if the file doesn't exist in directory "a". 3) Go to the top of the loop if the file sizes do not match 4) unlink the file if conditions 2 and 3 fall through. ################################################# #!/usr/bin/env perl use strict; use warnings; sub msgDie { my ($ret) =3D shift; my ($msg) =3D shift // "$0 dir_base dir\n"; print $msg; exit($ret); } msgDie(1) unless(scalar @ARGV eq 2); my $base =3D $ARGV[0]; my $dir =3D $ARGV[1]; msgDie(1, "base directory doesn't exist\n") unless -d $base; msgDie(1, "source directory doesn't exist\n") unless -d $dir; opendir(my $dh, $dir) or msgDie("Unable to open directory: $dir\n"); while(readdir $dh) { next if($_ eq '.' || $_ eq '..'); next if(! -f "$base/$_"); my ($ref) =3D (stat("$base/$_"))[7]; my ($src) =3D (stat("$dir/$_"))[7]; unlink("$dir/$_") if($ref =3D=3D $src); } ################################################# --=20 __________________ :(){ :|:& };: --000000000000bd96d105fae9fe90 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, May 4, 2023 at 11:2= 0=E2=80=AFPM Kaya Saman <kayasaman@optiplex-networks.com> wrote:
=20 =20 =20


On 5/5/23 04:01, Paul Procacci wrote:
=20
On Thu, May 4, 2023 at 10:30=E2=80=AFPM Kaya Saman <kayasaman@opt= iplex-networks.com> wrote:


On 5/5/23 03:08, Paul Procacci wrote:
There are multiple reasons why it may not work.=C2=A0 My guess is because the potential for characters that could be showing up within the filenames and whatnot.

This can be solved with an interpreted language that's a bit more forgiving.
Take the following perl script.=C2=A0 It does the same thing as the shell script (almost).=C2=A0 It renames the source file instead of making a copy of it.

run as:=C2=A0 ./test.pl /absolute/path/to/master_dir /absolute_path_to_dir_x

###########################################################################= ########
#!/usr/bin/env perl

use strict;
use warnings;

sub msgDie
{
=C2=A0 my ($ret) =3D shift;
=C2=A0 my ($msg) =3D shift // "$0 dir_base dir\n= ";
=C2=A0 print $msg;
=C2=A0 exit($ret);
}

msgDie(1) unless(scalar @ARGV eq 2);

my $base =3D $ARGV[0];
my $dir =C2=A0=3D $ARGV[1];

msgDie(1, "base directory doesn't exist\n&qu= ot;) unless -d $base;
msgDie(1, "source directory doesn't exist\n&= quot;) unless -d $dir;

opendir(my $dh, $dir) or msgDie("Unable to open directory: $dir\n");
while(readdir $dh)
{
=C2=A0 next if($_ eq '.' || $_ eq '..'= ;);
=C2=A0 if( ! -f "$base/$_" ){
=C2=A0 =C2=A0 rename("$dir/$_", "$base= /$_");
=C2=A0 =C2=A0 next;
=C2=A0 }

=C2=A0 my ($ref) =3D (stat("$base/$_"))[7];=
=C2=A0 my ($src) =3D (stat("$dir/$_"))[7];<= br> =C2=A0 unlink("$dir/$_") if($ref =3D=3D $sr= c);
}
###########################################################################= ########

~Paul



This didn't seem to work :-(


What exactly happened is this:


I created a set of test directories in /tmp


So, I have /tmp/test1 and /tmp/test2


to mimic the structure of the directories I intend to run this thing I did this:


create a subdir called: dupdir in /tmp/test1 and /tmp/test2


/tmp/test2/dupdir contains these files: dup and dup1


/tmp/test1/dupdir contains a modified 'dup' file= but copied dup1 file.


However*, now things get interesting as dup from test1 contains "1234567" and dup from test2 con= tains "111" <- this is to simulate the file size difference.





=C2=A0
Worked for me!=C2=A0 Regardless.=C2=A0 Use rsync then.

rsync --ignore-existing --remove-source-files=C2=A0 /src /dest
This would at the very least move non-existent fil=
es from the source over to the dest AND remove those source files AFTER the=
 transfer happens.
You'll be 1/2 way there doing that.  What you&=
#39;ll be left with are file that exist in BOTH src AND DEST.

~Paul


Paul, I think we've got wires crossed....


I *have* already performed the rsync. Apologies if I wasn't clear!


The problem I am faced with is that the destination directory is already populated with the information from 3 source directories.


I need to remove the sync'ed files in the source directories and leave files that match in name but are of different sizes.


The problem is I can't use rsync again for this as there aren= 9;t any options to simply compare files based on size. I can't use th= e --existing option as the files exist in both directories....


This is the dilemma I am facing:


ls -l /merged_dir/folder/

234904506 - file 'a'


ls -l /source_dir/folder/

1080918146 - file 'a'


so in this case file 'a' is in both directories with the sam= e name but different size. I need to keep both versions. However, *if* they were the same size then remove the file in the source_dir.....


That's all.. I don't need to transfer anything or copy anyth= ing at all... just compare and remove files of same name and size.


Hopefully I am explaining better and things are more clear? Again I apologize for the confusion=C2=A0 :-(


You're at least partially ri= ght that I was confused because comparing by name and by size makes no sens= e to me.=C2=A0 A single byte changed in one yields the same name and the sa= me size but are different!=C2=A0 ;)
Is the below output what you're = expecting to happen:

% mkdir a b
% echo 1111 > a/test.txt
%= echo 1111 > b/test.txt
%./test.pl a b=
% ls -l a b
a:
total 5
-rw-r--r-- =C2=A01 pprocacci= =C2=A0pprocacci =C2=A05 May =C2=A05 03:26 test.txt

b:
total 0

----------

The bel= ow perl script is what was ran above.=C2=A0 1) Find a file from directory &= quot;b".=C2=A0 2)=C2=A0 Go to the top of the loop if the file doesn= 9;t exist in directory "a".=C2=A0 3) Go to the top of the loop if= the file sizes do not match=C2=A0 4)=C2=A0 unlink the file if conditions 2= and 3 fall through.

#################################################
#!/usr/bin/env perl

use strict;
use warnings;

sub msgD= ie
{
=C2=A0 my ($ret) =3D shift;
=C2=A0 my ($msg) =3D shift // &qu= ot;$0 dir_base dir\n";
=C2=A0 print $msg;
=C2=A0 exit($ret);
= }

msgDie(1) unless(scalar @ARGV eq 2);

my $base =3D $ARGV[0];=
my $dir =C2=A0=3D $ARGV[1];

msgDie(1, "base directory doesn= 't exist\n") unless -d $base;
msgDie(1, "source directory = doesn't exist\n") unless -d $dir;

opendir(my $dh, $dir) or = msgDie("Unable to open directory: $dir\n");
while(readdir $dh)=
{
=C2=A0 next if($_ eq '.' || $_ eq '..');
=C2=A0= next if(! -f "$base/$_");

=C2=A0 my ($ref) =3D (stat(&quo= t;$base/$_"))[7];
=C2=A0 my ($src) =3D (stat("$dir/$_"))[= 7];
=C2=A0 unlink("$dir/$_") if($ref =3D=3D $src);
}
<= div>#################################################

--
__________________

:(){ :|:& };:
--000000000000bd96d105fae9fe90-- From nobody Fri May 5 04:06:25 2023 X-Original-To: freebsd-questions@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 4QCHDg50tvz49Qr1 for ; Fri, 5 May 2023 04:06:27 +0000 (UTC) (envelope-from kayasaman@optiplex-networks.com) Received: from mail.optiplex-networks.com (mail.optiplex-networks.com [212.159.80.20]) (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 4QCHDg3BNhz3lc9 for ; Fri, 5 May 2023 04:06:27 +0000 (UTC) (envelope-from kayasaman@optiplex-networks.com) Authentication-Results: mx1.freebsd.org; none Received: from localhost (localhost [127.0.0.1]) by mail.optiplex-networks.com (Postfix) with ESMTP id E32AA15C2C76; Fri, 5 May 2023 05:06:25 +0100 (BST) Received: from mail.optiplex-networks.com ([127.0.0.1]) by localhost (mail.optiplex-networks.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id gvX8ePFxWowx; Fri, 5 May 2023 05:06:25 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by mail.optiplex-networks.com (Postfix) with ESMTP id 8815415C38AE; Fri, 5 May 2023 05:06:25 +0100 (BST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.optiplex-networks.com 8815415C38AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=optiplex-networks.com; s=AE93A2AC-7F67-11EA-90AE-8A1FE64F6997; t=1683259585; bh=M1HU6niD0OVKXlVXfLV8V4TcSf3Pcvs/D6jdZrIvebU=; h=Message-ID:Date:MIME-Version:To:From; b=fOfxDScHykrbwuSnsUTZuAt6AZmNYqz/DiTAoUX9TWvg9kSXhGiRj9zWokYf5AxVR MFc6osAm7GXjyx6nDOMYdYpXTkmQJn6d3+iQX2vRGrsYMFWs2yP878+l1GzpgJjdHO wl2bR5PaNqDFcKe88vBEzW9buwJF+EX9i9gx0czEgdIuOlzrZG0eTgfTA3NuSJr2VT nnVnen00wnM84Mbler2GxlBY7ppCHRJHxUgiBf/mk++E51xH7c59Wmg16u0/dqCkjP XL7POtUVU5X5Lj/CqzyHfOMcwtBnpOwKfgmXwS/4uwe3Q7a6yGqqHQGqwbjrR6bMLI xI9eTjNhWSq5g== X-Virus-Scanned: amavisd-new at mail.optiplex-networks.com Received: from mail.optiplex-networks.com ([127.0.0.1]) by localhost (mail.optiplex-networks.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id MluKLsfWPDHB; Fri, 5 May 2023 05:06:25 +0100 (BST) Received: from [192.168.20.23] (unknown [192.168.20.23]) by mail.optiplex-networks.com (Postfix) with ESMTPSA id 7354715C2C76; Fri, 5 May 2023 05:06:25 +0100 (BST) Message-ID: Date: Fri, 5 May 2023 05:06:25 +0100 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: Tool to compare directories and delete duplicate files from one directory Content-Language: en-US To: Paul Procacci Cc: freebsd-questions@freebsd.org References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> <344b29c6-3d69-543d-678d-c2433dbf7152@optiplex-networks.com> <7747f587-f33e-f39c-ac97-fe4fe19e0b76@optiplex-networks.com> From: Kaya Saman In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4QCHDg3BNhz3lc9 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6871, ipnet:212.159.64.0/18, country:GB] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 5/5/23 04:36, Paul Procacci wrote: > #!/usr/bin/env perl > > use strict; > use warnings; > > sub msgDie > { > =C2=A0 my ($ret) =3D shift; > =C2=A0 my ($msg) =3D shift // "$0 dir_base dir\n"; > =C2=A0 print $msg; > =C2=A0 exit($ret); > } > > msgDie(1) unless(scalar @ARGV eq 2); > > my $base =3D $ARGV[0]; > my $dir =C2=A0=3D $ARGV[1]; > > msgDie(1, "base directory doesn't exist\n") unless -d $base; > msgDie(1, "source directory doesn't exist\n") unless -d $dir; > > opendir(my $dh, $dir) or msgDie("Unable to open directory: $dir\n"); > while(readdir $dh) > { > =C2=A0 next if($_ eq '.' || $_ eq '..'); > =C2=A0 next if(! -f "$base/$_"); > > =C2=A0 my ($ref) =3D (stat("$base/$_"))[7]; > =C2=A0 my ($src) =3D (stat("$dir/$_"))[7]; > =C2=A0 unlink("$dir/$_") if($ref =3D=3D $src); > } To start with this is the directory structure: =C2=A0ls -lhR /tmp/test1 total 1 drwxr-xr-x=C2=A0 2 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 3B May=C2=A0 = 5 04:57 dupdir1 drwxr-xr-x=C2=A0 2 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 3B May=C2=A0 = 5 04:57 dupdir2 /tmp/test1/dupdir1: total 1 -rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 8B Apr 30 03:= 17 dup /tmp/test1/dupdir2: total 1 -rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 7B May=C2=A0 = 5 03:23 dup1 ls -lhR /tmp/test2 total 1 drwxr-xr-x=C2=A0 2 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 3B May=C2=A0 = 5 04:56 dupdir1 drwxr-xr-x=C2=A0 2 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 3B May=C2=A0 = 5 04:56 dupdir2 /tmp/test2/dupdir1: total 1 -rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 4B Apr 30 02:= 53 dup /tmp/test2/dupdir2: total 1 -rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 7B Apr 30 02:= 47 dup1 So what I want to happen is the script to recurse from the top level=20 directories test1 and test2 then expected behavior should be to remove=20 file dup1 as dup is different between directories. I ran the script and again it didn't produce any output? ./test.pl /tmp/test1 /tmp/test2 I'm not sure if I need any other perl module? It is installed: p5-ExtUtils-Config-0.008_1=C2=A0=C2=A0=C2=A0=C2=A0 Wrapper for perl confi= guration perl5-5.32.1_3=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Practical Extraction and Report Lang= uage I have many p5- modules too installed but maybe I don't have the right=20 ones to run the script? From nobody Fri May 5 05:18:18 2023 X-Original-To: questions@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 4QCJqk60S0z49c5l for ; Fri, 5 May 2023 05:18:26 +0000 (UTC) (envelope-from Olivier.Nicole@cs.ait.ac.th) Received: from mail.cs.ait.ac.th (mail.cs.ait.ac.th [192.41.170.16]) (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 4QCJqh6QB0z3wC2 for ; Fri, 5 May 2023 05:18:24 +0000 (UTC) (envelope-from Olivier.Nicole@cs.ait.ac.th) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cs.ait.ac.th header.s=selector1 header.b=IjoMWaKb; spf=pass (mx1.freebsd.org: domain of Olivier.Nicole@cs.ait.ac.th designates 192.41.170.16 as permitted sender) smtp.mailfrom=Olivier.Nicole@cs.ait.ac.th; dmarc=pass (policy=none) header.from=cs.ait.ac.th Received: from mail.cs.ait.ac.th (localhost [127.0.0.1]) by mail.cs.ait.ac.th (Postfix) with ESMTP id 41E1489284; Fri, 5 May 2023 12:18:20 +0700 (+07) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cs.ait.ac.th; h= content-type:content-type:mime-version:message-id:date:date :in-reply-to:subject:subject:from:from:received:received :received; s=selector1; t=1683263899; x=1685078300; bh=ZWrm9r2ar 6ks8EDxfPiWKayzKo+7y3AODWkVcYXCOrY=; b=IjoMWaKbD2a9KDVz/cirBXgE/ 0cFngfXg6C3SivHYBAfVxntttyVyR/5tY37UC0395OC+uajGB7fdAoMv8rG70Xo+ 1tH9lGsjcr1XKoO9rZhMFEkdFXSCaD1SKMahUaae+6cF/81N/l2zCcsxJCYFzjr4 BIP4hbiVdSL0PpUq8k= X-Virus-Scanned: amavisd-new at cs.ait.ac.th Received: from mail.cs.ait.ac.th ([127.0.0.1]) by mail.cs.ait.ac.th (mail.cs.ait.ac.th [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id G6JeckgQ7WY0; Fri, 5 May 2023 12:18:19 +0700 (+07) Received: from banyan.cs.ait.ac.th (banyan.cs.ait.ac.th [192.41.170.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.cs.ait.ac.th (Postfix) with ESMTPS id 9CF3489283; Fri, 5 May 2023 12:18:19 +0700 (+07) Received: (from on@localhost) by banyan.cs.ait.ac.th (8.15.2/8.15.2/Submit) id 3455IIH4073740; Fri, 5 May 2023 12:18:18 +0700 (ICT) (envelope-from on@banyan.cs.ait.ac.th) From: Olivier To: doug@safeport.com Cc: questions@freebsd.org Subject: Re: ntpd error on a bridged network - solved In-Reply-To: <1fd48f26-ca84-ab40-5a2b-23afa3e8af1@safeport.com> (message from doug on Wed, 3 May 2023 15:14:32 +0000 (UTC)) Date: Fri, 05 May 2023 12:18:18 +0700 Message-ID: List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain X-Spamd-Result: default: False [-4.70 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; DMARC_POLICY_ALLOW(-0.50)[cs.ait.ac.th,none]; R_SPF_ALLOW(-0.20)[+mx]; RCVD_IN_DNSWL_MED(-0.20)[192.41.170.16:from]; R_DKIM_ALLOW(-0.20)[cs.ait.ac.th:s=selector1]; MIME_GOOD(-0.10)[text/plain]; DKIM_TRACE(0.00)[cs.ait.ac.th:+]; MLMMJ_DEST(0.00)[questions@freebsd.org]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RCPT_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_DN_NONE(0.00)[]; ASN(0.00)[asn:4767, ipnet:192.41.170.0/24, country:TH] X-Rspamd-Queue-Id: 4QCJqh6QB0z3wC2 X-Spamd-Bar: ---- X-ThisMailContainsUnwantedMimeParts: N doug writes: > Well sorta. I was able to configure ntpd to bypass what I am pretty sure is > is all do to Linksys bugs. Setting the ntpd start flag to "-4" keeps it > from uselessly trying IPV6. In ntpd.conf I changed the pool setting to be: I would say that is a bug of the Apple router that was not IPv6 ready so your computer never got a IPv6 address. I got burned a couple of times with ntp trying v6 and failling so I have disabled any v6 addressing on my machines. Bests, Olivier From nobody Fri May 5 07:01:14 2023 X-Original-To: freebsd-questions@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 4QCM6d56RDz49tQ0 for ; Fri, 5 May 2023 07:01:29 +0000 (UTC) (envelope-from pprocacci@gmail.com) Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCM6d0T3rz4FHk for ; Fri, 5 May 2023 07:01:29 +0000 (UTC) (envelope-from pprocacci@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-38ded2d8bcaso794319b6e.0 for ; Fri, 05 May 2023 00:01:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683270087; x=1685862087; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=eMCY91cBRsoE8uAVQtRt2tjmorpRNcGvvm06BafHyzY=; b=R03mtHZh90pwoaE89FFDcw3WYbwuXqlMUtoF0QD0aR3L+cfPdyxEEXRYQkkjcGH/Q5 rtaOR38sxw1FB6G35pJjtqTWWvn8L5lMhGx4uCw94YSJw8ixVB25C2WJ1U0E+53aLQgB RPdF7kKcRpussXJVVrLf2FKPPgtJJ0Tz1zrJ7t+BkpemwS2BiBtk2gk9D02PJCIpdeNj SuciBHPZrC+ujqNfbHj8rxDg0HZDWmNMXKHRk9ZxOzsfm3FP+WirPnj23vv0tuuj/qWq 12bMoVOeKK7hb3IC6tHD6vHFMW3S667TUXpTZv9Idgu5mThSyDVB3X/EN0z5fFViCVDd tS7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683270087; x=1685862087; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eMCY91cBRsoE8uAVQtRt2tjmorpRNcGvvm06BafHyzY=; b=VOUDX9fzDnl08Zg/YNxEiIIbK+4P8ShGy2q+oH/GcwkKbjjmBBiRd1eOosdbc07pM9 2BkkL5pJ+vlC0nH5MDuznuUmAn72f1DbYUN2MFsq2B/BM8b6xYlsFwuqNbSIRGHHQZOZ v2EsAHH2SMKBvyUbZYsXctlQQPz2xeRKu6JjY1tbrdmyvLRAcZ+OXF6SSDP8DY5dcusk nu1HAnFKPwPzd5rkXMrT6hBr9xAAKeMdx66MBkpO5WEEtuAxAZA0jl0CASvlsAz8u2J5 Jd8luL0r0hJXtVeae8+X7eHcIQ/ZZteFMgzKQjlSj3ZDPjKXpXOd8fl4ldxraAu2iPaS WHgA== X-Gm-Message-State: AC+VfDw6yVWz3afZqzPPlxKaL82IYKoB9AXii7jaz8sYz2qI34cu1WL4 GzGONP8WlBwUc81Kdh1hf+ZKQg3i7WnOKjzW8Sw3+hipBW+d X-Google-Smtp-Source: ACHHUZ57vk9SnG+KR5STtByaKn8Em4tEHFAd5ZURn40IVBP24+V4tPyuT/5jfk09HzVQnsRN+I/M5MYfogrVZG8h0/M= X-Received: by 2002:a05:6808:2989:b0:38d:f298:6cfc with SMTP id ex9-20020a056808298900b0038df2986cfcmr196375oib.0.1683270087143; Fri, 05 May 2023 00:01:27 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> <344b29c6-3d69-543d-678d-c2433dbf7152@optiplex-networks.com> <7747f587-f33e-f39c-ac97-fe4fe19e0b76@optiplex-networks.com> In-Reply-To: From: Paul Procacci Date: Fri, 5 May 2023 03:01:14 -0400 Message-ID: Subject: Re: Tool to compare directories and delete duplicate files from one directory To: Kaya Saman Cc: freebsd-questions@freebsd.org Content-Type: multipart/alternative; boundary="0000000000009af6d205faecdbf6" X-Rspamd-Queue-Id: 4QCM6d0T3rz4FHk X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --0000000000009af6d205faecdbf6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, May 5, 2023 at 12:06=E2=80=AFAM Kaya Saman wrote: > > On 5/5/23 04:36, Paul Procacci wrote: > > #!/usr/bin/env perl > > > > use strict; > > use warnings; > > > > sub msgDie > > { > > my ($ret) =3D shift; > > my ($msg) =3D shift // "$0 dir_base dir\n"; > > print $msg; > > exit($ret); > > } > > > > msgDie(1) unless(scalar @ARGV eq 2); > > > > my $base =3D $ARGV[0]; > > my $dir =3D $ARGV[1]; > > > > msgDie(1, "base directory doesn't exist\n") unless -d $base; > > msgDie(1, "source directory doesn't exist\n") unless -d $dir; > > > > opendir(my $dh, $dir) or msgDie("Unable to open directory: $dir\n"); > > while(readdir $dh) > > { > > next if($_ eq '.' || $_ eq '..'); > > next if(! -f "$base/$_"); > > > > my ($ref) =3D (stat("$base/$_"))[7]; > > my ($src) =3D (stat("$dir/$_"))[7]; > > unlink("$dir/$_") if($ref =3D=3D $src); > > } > > > To start with this is the directory structure: > > > ls -lhR /tmp/test1 > total 1 > drwxr-xr-x 2 root wheel 3B May 5 04:57 dupdir1 > drwxr-xr-x 2 root wheel 3B May 5 04:57 dupdir2 > > /tmp/test1/dupdir1: > total 1 > -rw-r--r-- 1 root wheel 8B Apr 30 03:17 dup > > /tmp/test1/dupdir2: > total 1 > -rw-r--r-- 1 root wheel 7B May 5 03:23 dup1 > > > ls -lhR /tmp/test2 > total 1 > drwxr-xr-x 2 root wheel 3B May 5 04:56 dupdir1 > drwxr-xr-x 2 root wheel 3B May 5 04:56 dupdir2 > > /tmp/test2/dupdir1: > total 1 > -rw-r--r-- 1 root wheel 4B Apr 30 02:53 dup > > /tmp/test2/dupdir2: > total 1 > -rw-r--r-- 1 root wheel 7B Apr 30 02:47 dup1 > > > So what I want to happen is the script to recurse from the top level > directories test1 and test2 then expected behavior should be to remove > file dup1 as dup is different between directories. > > > I ran the script and again it didn't produce any output? > > ./test.pl /tmp/test1 /tmp/test2 > > > I'm not sure if I need any other perl module? It is installed: > > p5-ExtUtils-Config-0.008_1 Wrapper for perl configuration > perl5-5.32.1_3 Practical Extraction and Report Language > > > I have many p5- modules too installed but maybe I don't have the right > ones to run the script? > > > - My script doesn't have any output. - My script doesn't recurse directories. - My script requires no modules. - You just need perl5 installed. So you want something like this: % find test* -type f -ls 131318 9 -rwxr-xr-x 1 pprocacci pprocacci 763 May 5 06:58 test.pl 132503 9 -rw-r--r-- 1 pprocacci pprocacci 5 May 5 06:52 test1/dupdir2/dup1 132898 9 -rw-r--r-- 1 pprocacci pprocacci 8 May 5 06:51 test1/dupdir1/dup 132771 9 -rw-r--r-- 1 pprocacci pprocacci 4 May 5 06:52 test2/dupdir1/dup 133006 9 -rw-r--r-- 1 pprocacci pprocacci 5 May 5 06:52 test2/dupdir2/dup1 And after the run of the perl script like so: % ./test.pl test1 test2 You want it to be like this: % find test* -type f -ls 131318 9 -rwxr-xr-x 1 pprocacci pprocacci 763 May 5 06:58 test.pl 132503 9 -rw-r--r-- 1 pprocacci pprocacci 5 May 5 06:52 test1/dupdir2/dup1 132898 9 -rw-r--r-- 1 pprocacci pprocacci 8 May 5 06:51 test1/dupdir1/dup 132771 9 -rw-r--r-- 1 pprocacci pprocacci 4 May 5 06:52 test2/dupdir1/dup If so: #################################################### #!/usr/bin/env perl use strict; use warnings; sub msgDie { my ($ret) =3D shift; my ($msg) =3D shift // "$0 dir_base dir\n"; print $msg; exit($ret); } sub doit { my($base, $cur) =3D @_; opendir(my $dh, $cur) or msgDie("Unable to open directory: $cur\n"); while(readdir $dh) { next if($_ eq '.' || $_ eq '..'); if(-d "$cur/$_"){ doit("$base/$_", "$cur/$_"); next; } next if(! -f "$base/$_"); my ($ref) =3D (stat("$base/$_"))[7]; my ($src) =3D (stat("$cur/$_"))[7]; unlink("$cur/$_") if($ref =3D=3D $src); } } msgDie(1) unless(scalar @ARGV eq 2); my $base =3D $ARGV[0]; my $dir =3D $ARGV[1]; msgDie(1, "base diretory doesn't exist\n") unless -d $base; msgDie(1, "source diretory doesn't exist\n") unless -d $dir; doit($base, $dir); #################################################### ~Paul --=20 __________________ :(){ :|:& };: --0000000000009af6d205faecdbf6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable



On Fri, May 5, 20= 23 at 12:06=E2=80=AFAM Kaya Saman <kayasaman@optiplex-networks.com> wrote:

On 5/5/23 04:36, Paul Procacci wrote:
> #!/usr/bin/env perl
>
> use strict;
> use warnings;
>
> sub msgDie
> {
> =C2=A0 my ($ret) =3D shift;
> =C2=A0 my ($msg) =3D shift // "$0 dir_base dir\n";
> =C2=A0 print $msg;
> =C2=A0 exit($ret);
> }
>
> msgDie(1) unless(scalar @ARGV eq 2);
>
> my $base =3D $ARGV[0];
> my $dir =C2=A0=3D $ARGV[1];
>
> msgDie(1, "base directory doesn't exist\n") unless -d $b= ase;
> msgDie(1, "source directory doesn't exist\n") unless -d = $dir;
>
> opendir(my $dh, $dir) or msgDie("Unable to open directory: $dir\n= ");
> while(readdir $dh)
> {
> =C2=A0 next if($_ eq '.' || $_ eq '..');
> =C2=A0 next if(! -f "$base/$_");
>
> =C2=A0 my ($ref) =3D (stat("$base/$_"))[7];
> =C2=A0 my ($src) =3D (stat("$dir/$_"))[7];
> =C2=A0 unlink("$dir/$_") if($ref =3D=3D $src);
> }


To start with this is the directory structure:


=C2=A0=C2=A0ls -lhR /tmp/test1
total 1
drwxr-xr-x=C2=A0 2 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 3B May=C2=A0 5 = 04:57 dupdir1
drwxr-xr-x=C2=A0 2 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 3B May=C2=A0 5 = 04:57 dupdir2

/tmp/test1/dupdir1:
total 1
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 8B Apr 30 03:17= dup

/tmp/test1/dupdir2:
total 1
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 7B May=C2=A0 5 = 03:23 dup1


ls -lhR /tmp/test2
total 1
drwxr-xr-x=C2=A0 2 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 3B May=C2=A0 5 = 04:56 dupdir1
drwxr-xr-x=C2=A0 2 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 3B May=C2=A0 5 = 04:56 dupdir2

/tmp/test2/dupdir1:
total 1
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 4B Apr 30 02:53= dup

/tmp/test2/dupdir2:
total 1
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 7B Apr 30 02:47= dup1


So what I want to happen is the script to recurse from the top level
directories test1 and test2 then expected behavior should be to remove
file dup1 as dup is different between directories.


I ran the script and again it didn't produce any output?

./test.pl /tmp/test1 /tmp/test2


I'm not sure if I need any other perl module? It is installed:

p5-ExtUtils-Config-0.008_1=C2=A0=C2=A0=C2=A0=C2=A0 Wrapper for perl configu= ration
perl5-5.32.1_3=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Practical Extraction and Report Langua= ge


I have many p5- modules too installed but maybe I don't have the right =
ones to run the script?




- My script doesn't have any output.
- My script doesn't recurse directories.
- My script requires no modules.
- You just need perl5 installed.

So you want = something like this:

% find test* -type f -ls
131318 =C2=A0 = =C2=A0 =C2=A0 =C2=A09 -rwxr-xr-x =C2=A0 =C2=A01 pprocacci =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pprocacci= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 763 May =C2=A05 06:58
t= est.pl
132503 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rw-r--r-- =C2=A0 =C2=A01= pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 5 May =C2=A05 0= 6:52 test1/dupdir2/dup1
132898 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rw-r--r-- = =C2=A0 =C2=A01 pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 8= May =C2=A05 06:51 test1/dupdir1/dup
132771 =C2=A0 =C2=A0 =C2=A0 =C2=A09= -rw-r--r-- =C2=A0 =C2=A01 pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 4 May =C2=A05 06:52 test2/dupdir1/dup
133006 =C2=A0 =C2=A0 = =C2=A0 =C2=A09 -rw-r--r-- =C2=A0 =C2=A01 pprocacci =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pprocacci =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 5 May =C2=A05 06:52 test2/dupdir2/dup1
And after the run of the perl script like so:
% ./test.pl test1 test2

You want it to be like this:

% = find test* -type f -ls
131318 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rwxr-xr-x = =C2=A0 =C2=A01 pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 763 May = =C2=A05 06:58 test.pl
132503 =C2=A0 =C2= =A0 =C2=A0 =C2=A09 -rw-r--r-- =C2=A0 =C2=A01 pprocacci =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pprocacci = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 5 May =C2=A05 06:52 test1/dupdir2/dup1
1= 32898 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rw-r--r-- =C2=A0 =C2=A01 pprocacci =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 8 May =C2=A05 06:51 test1/dup= dir1/dup
132771 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rw-r--r-- =C2=A0 =C2=A01 p= procacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 4 May =C2=A05 06:5= 2 test2/dupdir1/dup

If so:

####################################################
#!/usr/bin/env perl

use strict;
use warnings;

sub msgD= ie
{
=C2=A0 my ($ret) =3D shift;
=C2=A0 my ($msg) =3D shift // &qu= ot;$0 dir_base dir\n";
=C2=A0 print $msg;
=C2=A0 exit($ret);
= }

sub doit
{
=C2=A0 my($base, $cur) =3D @_;

=C2=A0 open= dir(my $dh, $cur) or msgDie("Unable to open directory: $cur\n");<= br>=C2=A0 while(readdir $dh)
=C2=A0 {
=C2=A0 =C2=A0 next if($_ eq = 9;.' || $_ eq '..');
=C2=A0 =C2=A0 if(-d "$cur/$_"= ){ doit("$base/$_", "$cur/$_"); next; }
=C2=A0 =C2= =A0 next if(! -f "$base/$_");

=C2=A0 =C2=A0 my ($ref) =3D = (stat("$base/$_"))[7];
=C2=A0 =C2=A0 my ($src) =3D (stat("= ;$cur/$_"))[7];
=C2=A0 =C2=A0 unlink("$cur/$_") if($ref = =3D=3D $src);
=C2=A0 }
}

msgDie(1) unless(scalar @ARGV eq 2);<= br>
my $base =3D $ARGV[0];
my $dir =C2=A0=3D $ARGV[1];

msgDie(= 1, "base diretory doesn't exist\n") unless -d $base;
msgDi= e(1, "source diretory doesn't exist\n") unless -d $dir;
doit($base, $dir);
###################################################= #

~Paul

--
__________= ________

:(){ :|:& };:
--0000000000009af6d205faecdbf6-- From nobody Fri May 5 07:49:08 2023 X-Original-To: questions@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 4QCN9h4sLNz48xtZ for ; Fri, 5 May 2023 07:49:12 +0000 (UTC) (envelope-from dr.klepp@gmx.at) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.gmx.net", Issuer "Telekom Security ServerID OV Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCN9f6kjPz4KKn for ; Fri, 5 May 2023 07:49:10 +0000 (UTC) (envelope-from dr.klepp@gmx.at) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmx.at header.s=s31663417 header.b=axecKIuX; spf=pass (mx1.freebsd.org: domain of dr.klepp@gmx.at designates 212.227.17.22 as permitted sender) smtp.mailfrom=dr.klepp@gmx.at; dmarc=pass (policy=none) header.from=gmx.at DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.at; s=s31663417; t=1683272949; i=dr.klepp@gmx.at; bh=ZQMVzd8NtZk5b7C9+QJOFCL4XUNn/X2tXtzOAWNWnP0=; h=X-UI-Sender-Class:From:To:Subject:Date:References:In-Reply-To; b=axecKIuX71PzVLFHxBmy8OmLUftjktpC5Zl329cOiWUM9LPBiinI/FAOsehuTzbfw HrbAkRO3HYQjWTrnzBiehLNHitGS0ZvTZst/nip9scEZZRGtBk0uQ9eiPP2zKubDjh MFlITk9okLsA05egq+TJ+4WAI70qp34wJ6YzJeuEHxq7qbIFGnMmaZZFl/HCV2ID4m 7bxzSHT/pEllVVu22THSvCrz3fBbLgEXThiL0QuJr0BjA5X8IqWURKbg5hLwtNTAiq JO1bcnhlX71ASprxaVqqBsJauksxrH/ZnTVLujv+aUbcL6IWXfXRkpdT2p7L7EgMrx qLrTEGV6HuRHA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from neo.lan ([78.142.103.142]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N1OXT-1qOAhj3X23-012pR3 for ; Fri, 05 May 2023 09:49:08 +0200 From: "Dr. Nikolaus Klepp" To: questions@freebsd.org Subject: Re: Tool to compare directories and delete duplicate files from one directory Date: Fri, 5 May 2023 09:49:08 +0200 User-Agent: KMail/1.9.10 References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> <80cafa55-9609-a9ef-d739-bda1affe38df@optiplex-networks.com> In-Reply-To: <80cafa55-9609-a9ef-d739-bda1affe38df@optiplex-networks.com> X-KMail-QuotePrefix: > List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <202305050949.08353.dr.klepp@gmx.at> X-Provags-ID: V03:K1:70+0VgWYagk1GuFFZiUUTJ255jxEtsw4MJkX/dMRAX/V28B/OHc +kKMx/01HP1yEJ9s2eP4mvKv2QvfGnfUVpNra9QGYyE5EQhzZayc8/qoZ44gl1NNwSUkLtu f7IQGQQH1q8xaYG+3Qz6eKNbwbX5e7kljTSQK6mUF5Qz/04376DVrP1uKl7XGtoncrsb7Nv CkecE+/ogIrpu1po6x9Ug== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:+HGLf+eDdb8=;gDvmVMlozMIw/azXP4YRBgpm+9q pcaLs8DazdCxlg5vHxQwfo25W1dARLJnarnGJuxtmyKyXVU9Hgw/2uT4HDF4ZmyzNUxuXrTll bofl2cucR9aiRfjlnsONXCsFpLbZjSaW6Y/B4QoIJ5w32r0gooT1EFOHT20yXFp1y8T582fkS nJLniTQ383n50lm52DOPshl1rbJhSXODztoySWjr8bh1HPW6xfqBwz9tELKrSSvnjUgYxkFBJ WGwwjmAchJQPh6Q4eK40hh/OhsKlhOCXwwROOUFOFMCbR0BZ3stpJPtpHI0JqGcYguJKSOcoj ieimT9GStlotvgLHaWxgknuB03d+p/zJ7gKIktCkgie/SMf+KPOXLQXO7VBeMMqTQ+FSGVwOs vTP1qCdeyz5Ylp+c2QTctcwL+taypZr33QS9o0h/Bh774vYykyZXfgeY4GLh+UBD9DRsbgPlA Fjo2qvoLqJ/o7Pd+NR+SwSks/tMWZH7oifDRYLTQwCLZyA2vwlYP9tPDwA0iyin5A5SHg6v61 Szv6L5f0kKoo30ET6fLKYBsBjePg1EYD3BNup3NiTqZlCjQItK251x6ZolbHGuF1TzKWu7LNz ua6z+86pdolmswBkIppM/OiruzA16PTFCRMooI6AQD9GFwG4zdQqe1v2MZyIX/NxVTaDSqpna Uj7YVSz1UPScQCvUIvpS9WwWpx22UGnnzci2AJgIVroJPjqgKPQVdF5Mo46J3arFLEcaIlBIf UligdkmjtD9YXvPcM0a6JikRdK0vrlGK7Z4XkTckKfmyDGDj2gmNZiomBZMdiGMSZ5+vXbimB 36iqCz3i7zvRO1BZnmUrSQndOSDrF03RWpjQlTaW5hBtjkoheewABd1FNDJBrN7k0/fF0qyEw ryfNjl4LcyNWHJjqPm/VXUQfLdESKmG36fES8jjEtMWGSI5Kce8dDQgm+MHS8MOklJZI4ONpk xS6vNacKKbZNZYnt0YudEa7lE28= X-Spamd-Result: default: False [-2.08 / 15.00]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; FROM_NAME_HAS_TITLE(1.00)[dr]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.977]; DMARC_POLICY_ALLOW(-0.50)[gmx.at,none]; R_SPF_ALLOW(-0.20)[+ip4:212.227.17.0/27]; R_DKIM_ALLOW(-0.20)[gmx.at:s=s31663417]; RCVD_IN_DNSWL_LOW(-0.10)[212.227.17.22:from]; MIME_GOOD(-0.10)[text/plain]; RWL_MAILSPIKE_POSSIBLE(0.00)[212.227.17.22:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[questions@freebsd.org]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[gmx.at:+]; TO_DN_NONE(0.00)[]; FREEMAIL_FROM(0.00)[gmx.at]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmx.at]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4QCN9f6kjPz4KKn X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N Anno domini 2023 Thu, 4 May 22:56:04 +0100 Kaya Saman scripsit: > [...]=20 > But*, what happens when you have thousands of files? Why don't you simply use "rdfind"?=20 Nik >=20 >=20 > The man page at the top suggests compare file1 and file2, not dir1 and=20 > dir2 which is what I am looking for: >=20 >=20 > NAME > =C2=A0=C2=A0=C2=A0=C2=A0 cmp =E2=80=93 compare two files >=20 > SYNOPSIS > =C2=A0=C2=A0=C2=A0=C2=A0 cmp [-l | -s | -x] [-bhz] [--ignore-initial=3Dn= um1[:num2]] [--bytes=3Dnum] > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 file1 file2 [skip1 [ski= p2]] >=20 >=20 > =C2=A0If it did that I would definitely say it's what I'm looking for. >=20 >=20 > I need to compare the files within: >=20 >=20 > /dir >=20 > /dir_1 >=20 > /dir_2 >=20 > /dir_3 >=20 >=20 > where /dir_(x) are directories that have been merged into /dir.... >=20 >=20 >=20 >=20 =2D-=20 Please do not email me anything that you are not comfortable also sharing w= ith the NSA, CIA ... From nobody Fri May 5 07:51:37 2023 X-Original-To: freebsd-questions@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 4QCNDZ0dy7z48yTK for ; Fri, 5 May 2023 07:51:42 +0000 (UTC) (envelope-from kayasaman@optiplex-networks.com) Received: from mail.optiplex-networks.com (mail.optiplex-networks.com [212.159.80.20]) (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 4QCNDX73wPz4Lcm for ; Fri, 5 May 2023 07:51:40 +0000 (UTC) (envelope-from kayasaman@optiplex-networks.com) Authentication-Results: mx1.freebsd.org; none Received: from localhost (localhost [127.0.0.1]) by mail.optiplex-networks.com (Postfix) with ESMTP id 1485115C38B0; Fri, 5 May 2023 08:51:39 +0100 (BST) Received: from mail.optiplex-networks.com ([127.0.0.1]) by localhost (mail.optiplex-networks.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id VFR2OQdliila; Fri, 5 May 2023 08:51:38 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by mail.optiplex-networks.com (Postfix) with ESMTP id 3CD6115C38B1; Fri, 5 May 2023 08:51:38 +0100 (BST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.optiplex-networks.com 3CD6115C38B1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=optiplex-networks.com; s=AE93A2AC-7F67-11EA-90AE-8A1FE64F6997; t=1683273098; bh=m9oIvNkFPtCKlwnT5CSdulx72IEJncXiaUfOlYm+h2E=; h=Message-ID:Date:MIME-Version:To:From; b=icymbPhRLnwq0Ljn8Ydkckf0C2WXORD0v166TuPUcdha50093VaB5SwkIGiuLs+la D2PZowDpYiHPxaQV71qNCdPou6HfebZLoRp4QcYcbbwNrV/1+CT7cLF5v8ViJq+CY9 1WOgNYzapS1QMIpSyA45UspxxyXSZG0fhqLQgHm2gPE4VuL4eQ7M/JRE+W3a43VxgI pBElDWifis9KbQU0GqmzrXQUVjkeTOCCdD9vNQ6iwppoFhCihUctIO/8VV1xmAKO8Q eFxtGZOTeu9EOdtWCLEo6Nb950cA22QR9bGI2GVyZOt2lRtYXXjU2M6BCAms+HHPXE E2RoGKpPRQxIQ== X-Virus-Scanned: amavisd-new at mail.optiplex-networks.com Received: from mail.optiplex-networks.com ([127.0.0.1]) by localhost (mail.optiplex-networks.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id lLa2vzLdmxaC; Fri, 5 May 2023 08:51:38 +0100 (BST) Received: from [192.168.20.23] (unknown [192.168.20.23]) by mail.optiplex-networks.com (Postfix) with ESMTPSA id 1548815C38B0; Fri, 5 May 2023 08:51:38 +0100 (BST) Content-Type: multipart/alternative; boundary="------------SiM7Cf9U9LS10HeJGopQNN7n" Message-ID: Date: Fri, 5 May 2023 08:51:37 +0100 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: Tool to compare directories and delete duplicate files from one directory Content-Language: en-US To: Paul Procacci Cc: freebsd-questions@freebsd.org References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> <344b29c6-3d69-543d-678d-c2433dbf7152@optiplex-networks.com> <7747f587-f33e-f39c-ac97-fe4fe19e0b76@optiplex-networks.com> From: Kaya Saman In-Reply-To: X-Rspamd-Queue-Id: 4QCNDX73wPz4Lcm X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6871, ipnet:212.159.64.0/18, country:GB] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N This is a multi-part message in MIME format. --------------SiM7Cf9U9LS10HeJGopQNN7n Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Paul, that's fantastic!! Thank you so much! It works!! Now to test on the live system... guess I should take a zfs snapshot=20 before messing around with things :-) I really appreciate this :-D Best regards, Kaya On 5/5/23 08:01, Paul Procacci wrote: > > > > On Fri, May 5, 2023 at 12:06=E2=80=AFAM Kaya Saman=20 > wrote: > > > On 5/5/23 04:36, Paul Procacci wrote: > > #!/usr/bin/env perl > > > > use strict; > > use warnings; > > > > sub msgDie > > { > > =C2=A0 my ($ret) =3D shift; > > =C2=A0 my ($msg) =3D shift // "$0 dir_base dir\n"; > > =C2=A0 print $msg; > > =C2=A0 exit($ret); > > } > > > > msgDie(1) unless(scalar @ARGV eq 2); > > > > my $base =3D $ARGV[0]; > > my $dir =C2=A0=3D $ARGV[1]; > > > > msgDie(1, "base directory doesn't exist\n") unless -d $base; > > msgDie(1, "source directory doesn't exist\n") unless -d $dir; > > > > opendir(my $dh, $dir) or msgDie("Unable to open directory: $dir\n= "); > > while(readdir $dh) > > { > > =C2=A0 next if($_ eq '.' || $_ eq '..'); > > =C2=A0 next if(! -f "$base/$_"); > > > > =C2=A0 my ($ref) =3D (stat("$base/$_"))[7]; > > =C2=A0 my ($src) =3D (stat("$dir/$_"))[7]; > > =C2=A0 unlink("$dir/$_") if($ref =3D=3D $src); > > } > > > To start with this is the directory structure: > > > =C2=A0=C2=A0ls -lhR /tmp/test1 > total 1 > drwxr-xr-x=C2=A0 2 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 3B May=C2= =A0 5 04:57 dupdir1 > drwxr-xr-x=C2=A0 2 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 3B May=C2= =A0 5 04:57 dupdir2 > > /tmp/test1/dupdir1: > total 1 > -rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 8B Apr = 30 03:17 dup > > /tmp/test1/dupdir2: > total 1 > -rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 7B May=C2= =A0 5 03:23 dup1 > > > ls -lhR /tmp/test2 > total 1 > drwxr-xr-x=C2=A0 2 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 3B May=C2= =A0 5 04:56 dupdir1 > drwxr-xr-x=C2=A0 2 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 3B May=C2= =A0 5 04:56 dupdir2 > > /tmp/test2/dupdir1: > total 1 > -rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 4B Apr = 30 02:53 dup > > /tmp/test2/dupdir2: > total 1 > -rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0 7B Apr = 30 02:47 dup1 > > > So what I want to happen is the script to recurse from the top leve= l > directories test1 and test2 then expected behavior should be to > remove > file dup1 as dup is different between directories. > > > I ran the script and again it didn't produce any output? > > ./test.pl /tmp/test1 /tmp/test2 > > > I'm not sure if I need any other perl module? It is installed: > > p5-ExtUtils-Config-0.008_1=C2=A0=C2=A0=C2=A0=C2=A0 Wrapper for perl= configuration > perl5-5.32.1_3=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Practical Extraction and Repor= t > Language > > > I have many p5- modules too installed but maybe I don't have the > right > ones to run the script? > > > > > - My script doesn't have any output. > - My script doesn't recurse directories. > - My script requires no modules. > - You just need perl5 installed. > > So you want something like this: > > % find test* -type f -ls > 131318 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rwxr-xr-x =C2=A0 =C2=A01 pprocacci= =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0=20 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 763 May =C2=A05 06:58 test.pl= > 132503 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rw-r--r-- =C2=A0 =C2=A01 pprocacci= =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0=20 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 5 May =C2=A05 06:52 te= st1/dupdir2/dup1 > 132898 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rw-r--r-- =C2=A0 =C2=A01 pprocacci= =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0=20 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 8 May =C2=A05 06:51 te= st1/dupdir1/dup > 132771 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rw-r--r-- =C2=A0 =C2=A01 pprocacci= =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0=20 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 4 May =C2=A05 06:52 te= st2/dupdir1/dup > 133006 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rw-r--r-- =C2=A0 =C2=A01 pprocacci= =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0=20 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 5 May =C2=A05 06:52 te= st2/dupdir2/dup1 > > And after the run of the perl script like so: > % ./test.pl test1 test2 > > You want it to be like this: > > % find test* -type f -ls > 131318 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rwxr-xr-x =C2=A0 =C2=A01 pprocacci= =C2=A0 =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0=20 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 763 May =C2=A05 06:58 = test.pl > 132503 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rw-r--r-- =C2=A0 =C2=A01 pprocacci= =C2=A0 =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0=20 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 5 May =C2=A05 0= 6:52 test1/dupdir2/dup1 > 132898 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rw-r--r-- =C2=A0 =C2=A01 pprocacci= =C2=A0 =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0=20 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 8 May =C2=A05 0= 6:51 test1/dupdir1/dup > 132771 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rw-r--r-- =C2=A0 =C2=A01 pprocacci= =C2=A0 =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0=20 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 4 May =C2=A05 0= 6:52 test2/dupdir1/dup > > If so: > > #################################################### > #!/usr/bin/env perl > > use strict; > use warnings; > > sub msgDie > { > =C2=A0 my ($ret) =3D shift; > =C2=A0 my ($msg) =3D shift // "$0 dir_base dir\n"; > =C2=A0 print $msg; > =C2=A0 exit($ret); > } > > sub doit > { > =C2=A0 my($base, $cur) =3D @_; > > =C2=A0 opendir(my $dh, $cur) or msgDie("Unable to open directory: $cur\= n"); > =C2=A0 while(readdir $dh) > =C2=A0 { > =C2=A0 =C2=A0 next if($_ eq '.' || $_ eq '..'); > =C2=A0 =C2=A0 if(-d "$cur/$_"){ doit("$base/$_", "$cur/$_"); next; } > =C2=A0 =C2=A0 next if(! -f "$base/$_"); > > =C2=A0 =C2=A0 my ($ref) =3D (stat("$base/$_"))[7]; > =C2=A0 =C2=A0 my ($src) =3D (stat("$cur/$_"))[7]; > =C2=A0 =C2=A0 unlink("$cur/$_") if($ref =3D=3D $src); > =C2=A0 } > } > > msgDie(1) unless(scalar @ARGV eq 2); > > my $base =3D $ARGV[0]; > my $dir =C2=A0=3D $ARGV[1]; > > msgDie(1, "base diretory doesn't exist\n") unless -d $base; > msgDie(1, "source diretory doesn't exist\n") unless -d $dir; > > doit($base, $dir); > #################################################### > > ~Paul > > --=20 > __________________ > > :(){ :|:& };: --------------SiM7Cf9U9LS10HeJGopQNN7n Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Paul, that's fantastic!! Thank you so much!

It works!!


Now to test on the live system... guess I should take a zfs snapshot before messing around with things :-)


I really appreciate this :-D


Best regards,


Kaya


On 5/5/23 08:01, Paul Procacci wrote:<= br>



On Fri, May 5, 2023 at 12:06=E2=80=AFAM Kaya Saman <= kayasaman@optiplex-networks.com> wrote:

On 5/5/23 04:36, Paul Procacci wrote:
> #!/usr/bin/env perl
>
> use strict;
> use warnings;
>
> sub msgDie
> {
> =C2=A0 my ($ret) =3D shift;
> =C2=A0 my ($msg) =3D shift // "$0 dir_base dir\n";
> =C2=A0 print $msg;
> =C2=A0 exit($ret);
> }
>
> msgDie(1) unless(scalar @ARGV eq 2);
>
> my $base =3D $ARGV[0];
> my $dir =C2=A0=3D $ARGV[1];
>
> msgDie(1, "base directory doesn't exist\n") unless -d $base;
> msgDie(1, "source directory doesn't exist\n") unless -d $dir;
>
> opendir(my $dh, $dir) or msgDie("Unable to open directory: $dir\n");
> while(readdir $dh)
> {
> =C2=A0 next if($_ eq '.' || $_ eq '..');
> =C2=A0 next if(! -f "$base/$_");
>
> =C2=A0 my ($ref) =3D (stat("$base/$_"))[7];
> =C2=A0 my ($src) =3D (stat("$dir/$_"))[7];
> =C2=A0 unlink("$dir/$_") if($ref =3D=3D $src);
> }


To start with this is the directory structure:


=C2=A0=C2=A0ls -lhR /tmp/test1
total 1
drwxr-xr-x=C2=A0 2 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0= 3B May=C2=A0 5 04:57 dupdir1
drwxr-xr-x=C2=A0 2 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0= 3B May=C2=A0 5 04:57 dupdir2

/tmp/test1/dupdir1:
total 1
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0= 8B Apr 30 03:17 dup

/tmp/test1/dupdir2:
total 1
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0= 7B May=C2=A0 5 03:23 dup1


ls -lhR /tmp/test2
total 1
drwxr-xr-x=C2=A0 2 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0= 3B May=C2=A0 5 04:56 dupdir1
drwxr-xr-x=C2=A0 2 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0= 3B May=C2=A0 5 04:56 dupdir2

/tmp/test2/dupdir1:
total 1
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0= 4B Apr 30 02:53 dup

/tmp/test2/dupdir2:
total 1
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0=C2=A0=C2=A0=C2=A0= 7B Apr 30 02:47 dup1


So what I want to happen is the script to recurse from the top level
directories test1 and test2 then expected behavior should be to remove
file dup1 as dup is different between directories.


I ran the script and again it didn't produce any output?
./test.pl /tmp/test1 /tmp/test2


I'm not sure if I need any other perl module? It is installed:

p5-ExtUtils-Config-0.008_1=C2=A0=C2=A0=C2=A0=C2=A0 Wrapper = for perl configuration
perl5-5.32.1_3=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Practical Extraction = and Report Language


I have many p5- modules too installed but maybe I don't have the right
ones to run the script?




- My script doesn't have any output.
- My script doesn't recurse directories.
- My script requires no modules.
- You just need perl5 installed.

So you want something like this:

% find test* -type f -ls
131318 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rwxr-xr-x =C2=A0 =C2=A01 p= procacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 763 May =C2=A05 = 06:58 test.pl<= br> 132503 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rw-r--r-- =C2=A0 =C2=A01 p= procacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 5 May =C2= =A05 06:52 test1/dupdir2/dup1
132898 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rw-r--r-- =C2=A0 =C2=A01 p= procacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 8 May =C2= =A05 06:51 test1/dupdir1/dup
132771 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rw-r--r-- =C2=A0 =C2=A01 p= procacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 4 May =C2= =A05 06:52 test2/dupdir1/dup
133006 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rw-r--r-- =C2=A0 =C2=A01 p= procacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 5 May =C2= =A05 06:52 test2/dupdir2/dup1

And after the run of the perl script like so:
% ./test.= pl test1 test2

You want it to be like this:

% find test* -type f -ls
131318 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rwxr-xr-x =C2=A0 =C2=A01= pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 763 Ma= y =C2=A05 06:58 test.pl
132503 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rw-r--r-- =C2=A0 =C2=A01= pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= 5 May =C2=A05 06:52 test1/dupdir2/dup1
132898 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rw-r--r-- =C2=A0 =C2=A01= pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= 8 May =C2=A05 06:51 test1/dupdir1/dup
132771 =C2=A0 =C2=A0 =C2=A0 =C2=A09 -rw-r--r-- =C2=A0 =C2=A01= pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pprocacci =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= 4 May =C2=A05 06:52 test2/dupdir1/dup

If so:

####################################################
#!/usr/bin/env perl

use strict;
use warnings;

sub msgDie
{
=C2=A0 my ($ret) =3D shift;
=C2=A0 my ($msg) =3D shift // "$0 dir_base dir\n";
=C2=A0 print $msg;
=C2=A0 exit($ret);
}

sub doit
{
=C2=A0 my($base, $cur) =3D @_;

=C2=A0 opendir(my $dh, $cur) or msgDie("Unable to open direct= ory: $cur\n");
=C2=A0 while(readdir $dh)
=C2=A0 {
=C2=A0 =C2=A0 next if($_ eq '.' || $_ eq '..');
=C2=A0 =C2=A0 if(-d "$cur/$_"){ doit("$base/$_", "$cur/$_"); = next; }
=C2=A0 =C2=A0 next if(! -f "$base/$_");

=C2=A0 =C2=A0 my ($ref) =3D (stat("$base/$_"))[7];
=C2=A0 =C2=A0 my ($src) =3D (stat("$cur/$_"))[7];
=C2=A0 =C2=A0 unlink("$cur/$_") if($ref =3D=3D $src);
=C2=A0 }
}

msgDie(1) unless(scalar @ARGV eq 2);

my $base =3D $ARGV[0];
my $dir =C2=A0=3D $ARGV[1];

msgDie(1, "base diretory doesn't exist\n") unless -d $base; msgDie(1, "source diretory doesn't exist\n") unless -d $dir;<= br>
doit($base, $dir);
####################################################

~Paul

--
__________________=

:(){ :|:& };:
--------------SiM7Cf9U9LS10HeJGopQNN7n-- From nobody Fri May 5 08:10:09 2023 X-Original-To: questions@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 4QCNdv6tGFz490Mq for ; Fri, 5 May 2023 08:10:11 +0000 (UTC) (envelope-from kayasaman@optiplex-networks.com) Received: from mail.optiplex-networks.com (mail.optiplex-networks.com [212.159.80.20]) (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 4QCNdv1ZgQz4Nn0 for ; Fri, 5 May 2023 08:10:11 +0000 (UTC) (envelope-from kayasaman@optiplex-networks.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=optiplex-networks.com header.s=AE93A2AC-7F67-11EA-90AE-8A1FE64F6997 header.b="Xo/ezG7W"; spf=pass (mx1.freebsd.org: domain of kayasaman@optiplex-networks.com designates 212.159.80.20 as permitted sender) smtp.mailfrom=kayasaman@optiplex-networks.com Received: from localhost (localhost [127.0.0.1]) by mail.optiplex-networks.com (Postfix) with ESMTP id 0684815C2C76 for ; Fri, 5 May 2023 09:10:10 +0100 (BST) Received: from mail.optiplex-networks.com ([127.0.0.1]) by localhost (mail.optiplex-networks.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id x3rex7gZ53MI for ; Fri, 5 May 2023 09:10:09 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by mail.optiplex-networks.com (Postfix) with ESMTP id B35B715C38AE for ; Fri, 5 May 2023 09:10:09 +0100 (BST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.optiplex-networks.com B35B715C38AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=optiplex-networks.com; s=AE93A2AC-7F67-11EA-90AE-8A1FE64F6997; t=1683274209; bh=/1VHz+tkY1oIbOxqHH5wMXyvGVMcthuk5fPuThDFIMc=; h=Message-ID:Date:MIME-Version:To:From; b=Xo/ezG7WEZwHxf5LtaJufr7PLbQu2CvsAaVSBz21U8AQaYd4Mmy5WspRBo2iUB2et novLQP92UWopAbhPTrrMew83rP3g3dbY/M8hfABZG+TO8o42B2pX3X8D64fv42m020 Qu0osQjcHghUi0e225RxnUMSC+VFRrElZh1A4amS+DCTwaVoKSyyVP3xvilTdLphVu tjo+G+q5feGlM9atAMoAhueYpoNMUOgRQhAtbir2gbUEFfMuefpFY7N06WkB7R3Ox9 1di9CCIAsESe9QXEHc3XrklLrHh1drmrDJNh9PaxGXBV5S0LlUkgz4sUL72A7vcKEe 1jhp83Np4pCAQ== X-Virus-Scanned: amavisd-new at mail.optiplex-networks.com Received: from mail.optiplex-networks.com ([127.0.0.1]) by localhost (mail.optiplex-networks.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id IzpgInZRHNpe for ; Fri, 5 May 2023 09:10:09 +0100 (BST) Received: from [192.168.20.23] (unknown [192.168.20.23]) by mail.optiplex-networks.com (Postfix) with ESMTPSA id 9B0FB15C2C76 for ; Fri, 5 May 2023 09:10:09 +0100 (BST) Message-ID: Date: Fri, 5 May 2023 09:10:09 +0100 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: Tool to compare directories and delete duplicate files from one directory Content-Language: en-US To: questions@freebsd.org References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> <80cafa55-9609-a9ef-d739-bda1affe38df@optiplex-networks.com> <202305050949.08353.dr.klepp@gmx.at> From: Kaya Saman In-Reply-To: <202305050949.08353.dr.klepp@gmx.at> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4QCNdv1ZgQz4Nn0 X-Spamd-Bar: / X-Spamd-Result: default: False [-0.50 / 15.00]; R_DKIM_ALLOW(-0.20)[optiplex-networks.com:s=AE93A2AC-7F67-11EA-90AE-8A1FE64F6997]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; DKIM_TRACE(0.00)[optiplex-networks.com:+]; MLMMJ_DEST(0.00)[questions@freebsd.org]; ASN(0.00)[asn:6871, ipnet:212.159.64.0/18, country:GB]; FROM_HAS_DN(0.00)[]; local_wl_ip(0.00)[212.159.80.20] X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: local_wl_ip X-ThisMailContainsUnwantedMimeParts: N On 5/5/23 08:49, Dr. Nikolaus Klepp wrote: > Anno domini 2023 Thu, 4 May 22:56:04 +0100 > Kaya Saman scripsit: >> [...] >> But*, what happens when you have thousands of files? > Why don't you simply use "rdfind"? > > Nik Thanks Nik, I just tried to look at the man page for it and it doesn't seem installed. I didn't know about rdfind before so I'll read up on it for future reference. The perl script that Paul has generously provided me seems to be working fine at this stage. Regards, Kaya From nobody Fri May 5 15:54:54 2023 X-Original-To: freebsd-questions@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 4QCZy90MlNz49Tpb for ; Fri, 5 May 2023 15:54:57 +0000 (UTC) (envelope-from freebsdlouisville@gmail.com) Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCZy83H42z44WV for ; Fri, 5 May 2023 15:54:56 +0000 (UTC) (envelope-from freebsdlouisville@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=Cm8YovbY; spf=pass (mx1.freebsd.org: domain of freebsdlouisville@gmail.com designates 2607:f8b0:4864:20::f33 as permitted sender) smtp.mailfrom=freebsdlouisville@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-qv1-xf33.google.com with SMTP id 6a1803df08f44-61a9bb1b3a0so9195806d6.1 for ; Fri, 05 May 2023 08:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683302096; x=1685894096; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=YkIOVUiC1ggK79hYZQXAK0wb+7garG6wZEpf3JZ7utI=; b=Cm8YovbYuO9TeR3fpZ66Ca+nc4WV/HnDMtc5+8QoDdleLwEtAEqBR5igL7DzqZQuMd Z+4FI9AHsyV2XnFgUtBHc0rQHV3AD27dCucRMT9KObTDkuElRGfI5NUXDmyKx2ysTO7W KYhWuXzBQOA3ozCyB+vp4sxWvS5amUBJP+L/Y/REnsqfkaVHq8FntoMoVtXXrQKleQ/r qj78Ubp6MUitzKl3oaYhnL5PuEhHRrORPxPZryEz4lTyFKB6hr1ZASuT+UjL2gxKs0MG xDBxZUQmaVW9FuE6iclGokF66/SS/6PKEj0Y4t5ZvDeUIN014YPPqOBPoSdkbr3qI8dt Sygw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683302096; x=1685894096; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YkIOVUiC1ggK79hYZQXAK0wb+7garG6wZEpf3JZ7utI=; b=KCD2Y8sk/0PI5wpd4WcMVs8rqUCBbv7drja2lqXw8/ol+0gNc+rwIu2QWStIcmxHsI MgWmlIZGgHmNGg4f6g2tPOJuipFEO9WBjRLchFgFV1wgsq5nWo2HtSbRFqO2u75BzTT9 gB5WkoHmh15XIi7bkEdltBxwlw+XogxWL+e2v3Ykf3XRqPNXMHZS7qG+tNdQXp5jrw0q tzXabJGW1Y32MF8y0msT5f1DKgJpYYRoMSYVZYKc3fvk4+Gl0P2XQJR7+aRCqDCVsJXx P/1+0Yo5s2qcXE7oGibNBOFg2cNTB5Jh4Jy4sxBXrmQ6Cy7iWPnM98rKzFPm4UbIzBOb UTGw== X-Gm-Message-State: AC+VfDzoI5pMVBbWgbF3uH5x82289YziFhUaebIz3rCnTHzptewcobVC +exlcLoshA+kZ5I1560d8J/vXh74PYOz5gHe X-Google-Smtp-Source: ACHHUZ4Xb73vUhQjsKVXl1rYpcWkf5PTM4OUp0iM1/yUu9iLv0FepmNnroZTvS4wYBZzgj+jKb0sEQ== X-Received: by 2002:a05:6214:20ee:b0:616:84a3:375c with SMTP id 14-20020a05621420ee00b0061684a3375cmr2037947qvk.42.1683302095628; Fri, 05 May 2023 08:54:55 -0700 (PDT) Received: from [192.168.1.9] ([162.154.243.45]) by smtp.gmail.com with ESMTPSA id i9-20020a0cf489000000b005ef608dc422sm696133qvm.41.2023.05.05.08.54.55 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 May 2023 08:54:55 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------YRWSDqQTJMcMLfXt2WB1TcZI" Message-ID: <8d3a09fe-e69f-2c0e-8cc8-ca87ccfcfa42@gmail.com> Date: Fri, 5 May 2023 11:54:54 -0400 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US To: freebsd-questions@freebsd.org From: Steven Friedrich Subject: Can't figure out getting network into bhyve instance. X-Spamd-Result: default: False [-3.90 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.90)[-0.903]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f33:from]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_NONE(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org] X-Rspamd-Queue-Id: 4QCZy83H42z44WV X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N This is a multi-part message in MIME format. --------------YRWSDqQTJMcMLfXt2WB1TcZI Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit I had found a bhyve tutorial on the Internet: https://klarasystems.com/articles/from-0-to-bhyve-on-freebsd-13-1/ I performed the steps to create vm_public, but I don't get internet inside the vm.  Here's my ifconfig from the host side: re0: flags=8943 metric 0 mtu 1500        options=8209b        ether 10:62:e5:02:ef:45        inet 192.168.1.9 netmask 0xffffff00 broadcast 192.168.1.255        media: Ethernet autoselect (1000baseT )        status: active        nd6 options=29 lo0: flags=8049 metric 0 mtu 16384        options=680003        inet6 ::1 prefixlen 128        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2        inet 127.0.0.1 netmask 0xff000000        groups: lo        nd6 options=21 vm-public: flags=8843 metric 0 mtu 1500        ether 16:58:c1:2e:24:bc        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15        maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0        member: re0 flags=143                ifmaxaddr 0 port 1 priority 128 path cost 20000        groups: bridge vm-switch viid-4c918@        nd6 options=9 I tried to follow the man page vm: root@freebsd:/zroot/bhyve/.templates # vm switch add public re0 /usr/local/sbin/vm: ERROR: failed to add member re0 to the virtual switch public root@freebsd:/zroot/bhyve/.templates # vm switch create public /usr/local/sbin/vm: ERROR: switch public already exists So I tried ifconfig vm-public destroy so I could start fresh. vm-public no longer appears in ifconfig then I tried, from the vm man page: vm switch create public /usr/local/sbin/vm: ERROR: switch public already exists root@freebsd:/usr/local/share/examples/vm-bhyve # vm switch add public re0 /usr/local/sbin/vm: ERROR: unable to locate switch id vm switch list NAME    TYPE      IFACE  ADDRESS  PRIVATE  MTU  VLAN  PORTS public  standard  -      -        no       -    -     re0 root@freebsd:/usr/local/share/examples/vm-bhyve # vm switch info local: _netgraph,: bad variable name ------------------------ Virtual Switch: public ------------------------  type: standard  ident: -  vlan: -  physical-ports: re0 I'm uneducated in this area.  Any suggestion? -- uname -a FreeBSD freebsd.friedrich.org 13.2-RELEASE FreeBSD 13.2-RELEASE FREEBSD amd64 --------------YRWSDqQTJMcMLfXt2WB1TcZI Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

I had found a bhyve tutorial on the Internet: https://klarasystems.com/articles/from-0-to-bhyve-on-freebsd-13-1/

I performed the steps to create vm_public, but I don't get internet inside the vm.  Here's my ifconfig from the host side:

re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
       options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
       ether 10:62:e5:02:ef:45
       inet 192.168.1.9 netmask 0xffffff00 broadcast 192.168.1.255
       media: Ethernet autoselect (1000baseT <full-duplex>)
       status: active
       nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
       options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
       inet6 ::1 prefixlen 128
       inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
       inet 127.0.0.1 netmask 0xff000000
       groups: lo
       nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
vm-public: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
       ether 16:58:c1:2e:24:bc
       id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
       maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
       root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
       member: re0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
               ifmaxaddr 0 port 1 priority 128 path cost 20000
       groups: bridge vm-switch viid-4c918@
       nd6 options=9<PERFORMNUD,IFDISABLED>

I tried to follow the man page vm:

root@freebsd:/zroot/bhyve/.templates # vm switch add public re0
/usr/local/sbin/vm: ERROR: failed to add member re0 to the virtual switch public
root@freebsd:/zroot/bhyve/.templates # vm switch create public
/usr/local/sbin/vm: ERROR: switch public already exists

So I tried ifconfig vm-public destroy so I could start fresh.

vm-public no longer appears in ifconfig

then I tried, from the vm man page:

vm switch create public
/usr/local/sbin/vm: ERROR: switch public already exists
root@freebsd:/usr/local/share/examples/vm-bhyve # vm switch add public re0
/usr/local/sbin/vm: ERROR: unable to locate switch id

vm switch list
NAME    TYPE      IFACE  ADDRESS  PRIVATE  MTU  VLAN  PORTS
public  standard  -      -        no       -    -     re0
root@freebsd:/usr/local/share/examples/vm-bhyve # vm switch info
local: _netgraph,: bad variable name
------------------------
Virtual Switch: public
------------------------
 type: standard
 ident: -
 vlan: -
 physical-ports: re0


I'm uneducated in this area.  Any suggestion?

-- 
uname -a
FreeBSD freebsd.friedrich.org 13.2-RELEASE FreeBSD 13.2-RELEASE FREEBSD amd64
--------------YRWSDqQTJMcMLfXt2WB1TcZI-- From nobody Fri May 5 17:22:55 2023 X-Original-To: freebsd-questions@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 4QCcvw6Vxnz49ZWw for ; Fri, 5 May 2023 17:23:08 +0000 (UTC) (envelope-from tomek@cedro.info) Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCcvw5kHDz4Hvw for ; Fri, 5 May 2023 17:23:08 +0000 (UTC) (envelope-from tomek@cedro.info) Authentication-Results: mx1.freebsd.org; none Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-55a5e0f5b1aso19541767b3.0 for ; Fri, 05 May 2023 10:23:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cedro.info; s=google; t=1683307387; x=1685899387; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=UagPEkxycWemkYqTOEJw86S9kwBEpTQszxE8dpfVWz8=; b=PE5jYRYchrdJsYtxbWIYcywwp/MSOZPUvlOceRj/r0gbQnhddQki04COZIF0XU/WSW cFQpD+HMYdaql1xFmRmot5L4a8mATbKuP8cuD2qXQ3VkWlHbw6XJx4CTKdMg/+Zaw16M 8KlDAvR+8QeptGmQ9T6lvBB8mUoGqZPSBOIaLlgwrlx+MX0/TtyFs2NA9s915si1Nsnc DaNVzGbTmid2VD4rYdKzWH3lt7vhpSTso1OLFtgBb1hMAg26A7E3miJeOvn1+9fGhsQ2 qQX4W3s7sQ4VKEgpwLQSrC8q3erzEVkpQQInERIUOfI/njCdrjTBMPUj8pP/ylrYwRlZ mqoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683307387; x=1685899387; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UagPEkxycWemkYqTOEJw86S9kwBEpTQszxE8dpfVWz8=; b=T0KKkAonAPIroYT7kedA4KGpDcwoymq+4K4QKVmhFmqlwG2KarCb3b+mlvc+EpgArV cl3Vb7tow4wrXCf/pPhR3AYoipLbZRfc2Tw8YP4w+DkbxbiEi350dytzo1nRMP5bfgru wii79PbhV+VG8VNcgJfEAXatiqEtcKaSVsSdHLTlqsve27D8AcYGiI3ONX1GIa/AaLxF GTmG8Ox1BIz8crOgcuGS1/xzsJSOOIbH/Fl2GouYCxlFM4Q+sFyiukOOhTVBEU9ABUv3 F9C8J0dbCAl5rMshA10GwOzzFSplvZFQ/h9hqHpRqnMwBGIoqhMwTsa+ulZryw0EMweb TmsQ== X-Gm-Message-State: AC+VfDyrwSTQw6UwkAhkvIfWT9ZT/DIEHx6EQWpvGkAiij8kKKkb6fD4 Tl2hUbru0aBL+EXZDP+gWbWEuiXEUoo+10vbVpA= X-Google-Smtp-Source: ACHHUZ6aUhQqRXcAorVjE/6f0SAWnKpgCisq3BlnasLFZYCfxcgo86tB+B0mUuU1+jR13cCydc3cdw== X-Received: by 2002:a81:4e45:0:b0:55a:985e:8ad1 with SMTP id c66-20020a814e45000000b0055a985e8ad1mr2315554ywb.33.1683307387666; Fri, 05 May 2023 10:23:07 -0700 (PDT) Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com. [209.85.128.175]) by smtp.gmail.com with ESMTPSA id b62-20020a0dc041000000b0055d725edafbsm584442ywd.113.2023.05.05.10.23.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 May 2023 10:23:07 -0700 (PDT) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-555e853d3c5so19460727b3.2 for ; Fri, 05 May 2023 10:23:07 -0700 (PDT) X-Received: by 2002:a25:da12:0:b0:b8f:6065:e8eb with SMTP id n18-20020a25da12000000b00b8f6065e8ebmr2696997ybf.29.1683307386905; Fri, 05 May 2023 10:23:06 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: <8d3a09fe-e69f-2c0e-8cc8-ca87ccfcfa42@gmail.com> In-Reply-To: <8d3a09fe-e69f-2c0e-8cc8-ca87ccfcfa42@gmail.com> From: Tomek CEDRO Date: Fri, 5 May 2023 19:22:55 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Can't figure out getting network into bhyve instance. To: Steven Friedrich Cc: freebsd-questions@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4QCcvw5kHDz4Hvw X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Fri, May 5, 2023 at 5:55=E2=80=AFPM Steven Friedrich wrote: > I had found a bhyve tutorial on the Internet: https://klarasystems.com/ar= ticles/from-0-to-bhyve-on-freebsd-13-1/ > (..) In a simple scenario read `man vm` :-) Just add public switch with selected physical port / interface. Machines will use that for networking by default. I had the same problem(?). Packets were not going out of the guest vm. There are some sysctls to do in order to pass the bridged traffic. sysctl net.link.bridge.ipfw=3D0 sysctl net.link.bridge.pfil_bridge=3D0 sysctl net.link.bridge.pfil_member=3D0 I have provided a man page update on that, any comments welcome :-) https://github.com/churchers/vm-bhyve/pull/510 Hope that helps :-) --=20 CeDeROM, SQ7MHZ, http://www.tomek.cedro.info From nobody Fri May 5 17:53:06 2023 X-Original-To: freebsd-questions@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 4QCdZZ2qM6z49bTy for ; Fri, 5 May 2023 17:53:10 +0000 (UTC) (envelope-from freebsdlouisville@gmail.com) Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCdZZ0q7wz4M7c for ; Fri, 5 May 2023 17:53:10 +0000 (UTC) (envelope-from freebsdlouisville@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qv1-xf35.google.com with SMTP id 6a1803df08f44-61b6101a1b9so9318776d6.3 for ; Fri, 05 May 2023 10:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683309187; x=1685901187; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=xs4Vj3No9EV6brycgPEXinatYX8ht8e7NoBJnLNCxpA=; b=pLuSRjlm5A9Desy6bQ+tFSag4sfKWOTGqUIznBf7k7dpk/XrMjz63ocn1bNldUtJfX 3kUiDee0xeCE83bUvkQIUtjVn0S/JnDzEKJLPiXwWUoin+6V6iFXCFyOLSlu6PtL7vdr yQ+bc/l4Uq2npFj9qB0m8eNQw+b2BhKRpsuWE0S6D99ONJ+Z5dXJRDODWw3Q3j8ZpeVJ VXGTppyjHWhJGtXvx9ZSl3o+rWavNdZWBMASMtaJm69Gcab7bKwQq5B7rsZWSeu2osZJ t/hqsQPtj9FI2sg3oXUAn6c/3BmNsTqnDZhLukDcvDkmaHCq8U+4Iquq+s6p8GjsTXV9 DYUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683309187; x=1685901187; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=xs4Vj3No9EV6brycgPEXinatYX8ht8e7NoBJnLNCxpA=; b=Ve5xdQLAwID5wWp6okWHukjgbD4BqE/NACd4v8cX/dy/gc5W33V2pXQXWGp6AJQr14 lTPSlaSTCKE62C1KVrHiAQ2BBdGxzLlmtFa/ndMOn8/7KWd1BryhOwaT7c1Xc/n1CD5b 93dU1nBc7bJpM97M8FL8a/AYWdOYQZKERcdPfvujB6/NtgUNriCDo4Uk2Y7F2AWSURsx HcjNqtnwauCRyReymkfhl0u5tFCCvJB/22YaqWOV7wv1yhm0zN7TnLFxXw9gD4xMSs/P +hR+Sx2GeUZjis5VVbIficopw7FrvaQNHENpTZf/6k9rRw2Kv7TYT57dLniaVykJoCt3 9aFQ== X-Gm-Message-State: AC+VfDxbwOslHJXEaeWNJwVAWPWrv29kyCKWONju0C7iwhBjoIlIaNZG Hp4NNLOmEdsqbcSif+hmqNKusxiRelZK+WRI X-Google-Smtp-Source: ACHHUZ5LxAZBPgwqIxl/MrFoI0xEece1n59saeNhIhSrAx6hEO3Uxg9rKBEq9Rv72RkmgmKVhGG+iA== X-Received: by 2002:ad4:5f0c:0:b0:5ea:9fc5:fca2 with SMTP id fo12-20020ad45f0c000000b005ea9fc5fca2mr3643644qvb.45.1683309187339; Fri, 05 May 2023 10:53:07 -0700 (PDT) Received: from [192.168.1.9] ([162.154.243.45]) by smtp.gmail.com with ESMTPSA id p1-20020a05620a132100b0074df20fb43dsm734387qkj.97.2023.05.05.10.53.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 May 2023 10:53:07 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------lRkF0crXhKIOZ97Q6F4EZj5B" Message-ID: Date: Fri, 5 May 2023 13:53:06 -0400 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: Can't figure out getting network into bhyve instance. To: Tomek CEDRO Cc: freebsd-questions@freebsd.org References: <8d3a09fe-e69f-2c0e-8cc8-ca87ccfcfa42@gmail.com> Content-Language: en-US From: Steven Friedrich In-Reply-To: X-Rspamd-Queue-Id: 4QCdZZ0q7wz4M7c X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N This is a multi-part message in MIME format. --------------lRkF0crXhKIOZ97Q6F4EZj5B Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit I can get in with vm console nameofguest root@freebsd:~ # ifconfig vtnet0: flags=8863 metric 0 mtu 1500        options=80028        ether 58:9c:fc:02:aa:68        inet 192.168.1.14 netmask 0xffffff00 broadcast 192.168.1.255        media: Ethernet autoselect (10Gbase-T )        status: active        nd6 options=29 lo0: flags=8049 metric 0 mtu 16384        options=680003        inet6 ::1 prefixlen 128        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2        inet 127.0.0.1 netmask 0xff000000        groups: lo        nd6 options=21 vtnet0 has an IP address, I assume it got it from DHCP. But ping to my router at 192.168.1.1 fails.  100% packet loss. On 5/5/23 13:22, Tomek CEDRO wrote: > On Fri, May 5, 2023 at 5:55 PM Steven Friedrich wrote: >> I had found a bhyve tutorial on the Internet:https://klarasystems.com/articles/from-0-to-bhyve-on-freebsd-13-1/ >> (..) > In a simple scenario read `man vm` :-) > > Just add public switch with selected physical port / interface. > Machines will use that for networking by default. > > I had the same problem(?). Packets were not going out of the guest vm. > There are some sysctls to do in order to pass the bridged traffic. > > sysctl net.link.bridge.ipfw=0 > sysctl net.link.bridge.pfil_bridge=0 > sysctl net.link.bridge.pfil_member=0 > > I have provided a man page update on that, any comments welcome :-) > > https://github.com/churchers/vm-bhyve/pull/510 > > Hope that helps :-) > -- uname -a FreeBSD freebsd.friedrich.org 13.2-RELEASE FreeBSD 13.2-RELEASE FREEBSD amd64 --------------lRkF0crXhKIOZ97Q6F4EZj5B Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

I can get in with vm console nameofguest

root@freebsd:~ # ifconfig
vtnet0: flags=8863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
       options=80028<VLAN_MTU,JUMBO_MTU,LINKSTATE>
       ether 58:9c:fc:02:aa:68
       inet 192.168.1.14 netmask 0xffffff00 broadcast 192.168.1.255
       media: Ethernet autoselect (10Gbase-T <full-duplex>)
       status: active
       nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
       options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
       inet6 ::1 prefixlen 128
       inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
       inet 127.0.0.1 netmask 0xff000000
       groups: lo
       nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

vtnet0 has an IP address, I assume it got it from DHCP.

But ping to my router at 192.168.1.1 fails.  100% packet loss.

On 5/5/23 13:22, Tomek CEDRO wrote:
On Fri, May 5, 2023 at 5:55 PM Steven Friedrich wrote:
I had found a bhyve tutorial on the Internet: https://klarasystems.com/articles/from-0-to-bhyve-on-freebsd-13-1/
(..)
In a simple scenario read `man vm` :-)

Just add public switch with selected physical port / interface.
Machines will use that for networking by default.

I had the same problem(?). Packets were not going out of the guest vm.
There are some sysctls to do in order to pass the bridged traffic.

sysctl net.link.bridge.ipfw=0
sysctl net.link.bridge.pfil_bridge=0
sysctl net.link.bridge.pfil_member=0

I have provided a man page update on that, any comments welcome :-)

https://github.com/churchers/vm-bhyve/pull/510

Hope that helps :-)

-- 
uname -a
FreeBSD freebsd.friedrich.org 13.2-RELEASE FreeBSD 13.2-RELEASE FREEBSD amd64
--------------lRkF0crXhKIOZ97Q6F4EZj5B-- From nobody Fri May 5 17:54:27 2023 X-Original-To: freebsd-questions@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 4QCdc612wcz49c8w for ; Fri, 5 May 2023 17:54:30 +0000 (UTC) (envelope-from freebsdlouisville@gmail.com) Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCdc54wXdz4NCb for ; Fri, 5 May 2023 17:54:29 +0000 (UTC) (envelope-from freebsdlouisville@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x731.google.com with SMTP id af79cd13be357-75131c2997bso1047498085a.1 for ; Fri, 05 May 2023 10:54:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683309268; x=1685901268; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ssr9oFIfmro+zGYS+KdooiYJXdgDAREWyZ8dYcYpAtk=; b=QW1v1/6SFfJTPzzZqdI3U3RLbgJ0U4wTpCcTBqGfK+041Y8lLBw9HNHFhDyROZynGR k7iTcXDF8jtPsUDyKBgzO/e0tr8hHffEZyEUi/4PhuLvKbhheKRaPtPk7wNGLJpjPPJP Pb4tFchf13PIez5kgGSj0pp4I/wkJT1lmg/aJD0DXzW6lvRjPzIz3UxXnoZS1Z7yQUo3 S1doUvMYVNoBLBpAGgn4yUwpQUt9lIYP4tF+let+wxCZnI2Xo9Ii1yh1SUOYpsXX+nZb S3LJPbhymM5ClZGHMtRfdEYaNA3QSxAlY7ee1nsPw79HjtmFAPZFTe+NVQ1nvDaRVVPw fs6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683309268; x=1685901268; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ssr9oFIfmro+zGYS+KdooiYJXdgDAREWyZ8dYcYpAtk=; b=j8Vl+BH8SmOGnA+UE+JnI0vUNWOni8HdBDg46xskqTEsgWnHqakLpoRiIugrMt/wxr 4uvo0pVsMJ/7Vhfv965SgFrJ3xs2hoC/iFgWap/C7R7NL6YDd8q8fK5p6n6U5uq2A4mW TmZeSLiWU5tDa9Bt3DyA2d8mnW2hYvqszuQKnYyrMBuaP52SGDWNFSDa5+LaN9pUI7kP Lq+ZAr+kuHYi7bAxtJQlNnSgWxOIF71HKGltlLkqk2W9kfssjA9PSnZxxzu5oZYP+59e VihdPwZ0DkdaM/eFFKt3d2ztbC/jRKMaT8ZzIfxCiuZHGbeVeLEUZm/acfDzbwGOoB3I Nfiw== X-Gm-Message-State: AC+VfDyLCce/F9w4uY/yUKjnaRE2MknXLYaCFyW2a5hqRJo7frPZLQgl gFGXo3+vHFL2nRRDLDUZHSLqq+xLEIx4UIig X-Google-Smtp-Source: ACHHUZ4vqXkPT58q9Ra4llJEahtsBHB3hgGPGv31SZwrkSFfYOG4L4q1KZ500/K0w5s5fESo0w3FEQ== X-Received: by 2002:a05:6214:518b:b0:605:648b:2ac8 with SMTP id kl11-20020a056214518b00b00605648b2ac8mr14407268qvb.4.1683309268213; Fri, 05 May 2023 10:54:28 -0700 (PDT) Received: from [192.168.1.9] ([162.154.243.45]) by smtp.gmail.com with ESMTPSA id r11-20020a0cb28b000000b005ef4de2cc3bsm150017qve.138.2023.05.05.10.54.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 May 2023 10:54:27 -0700 (PDT) Message-ID: Date: Fri, 5 May 2023 13:54:27 -0400 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: Can't figure out getting network into bhyve instance. Content-Language: en-US To: Tomek CEDRO Cc: freebsd-questions@freebsd.org References: <8d3a09fe-e69f-2c0e-8cc8-ca87ccfcfa42@gmail.com> From: Steven Friedrich In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4QCdc54wXdz4NCb X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N BTW, I invoked the sysctls.  Wait, were those on the host on in the vm? On 5/5/23 13:22, Tomek CEDRO wrote: > On Fri, May 5, 2023 at 5:55 PM Steven Friedrich wrote: >> I had found a bhyve tutorial on the Internet: https://klarasystems.com/articles/from-0-to-bhyve-on-freebsd-13-1/ >> (..) > In a simple scenario read `man vm` :-) > > Just add public switch with selected physical port / interface. > Machines will use that for networking by default. > > I had the same problem(?). Packets were not going out of the guest vm. > There are some sysctls to do in order to pass the bridged traffic. > > sysctl net.link.bridge.ipfw=0 > sysctl net.link.bridge.pfil_bridge=0 > sysctl net.link.bridge.pfil_member=0 > > I have provided a man page update on that, any comments welcome :-) > > https://github.com/churchers/vm-bhyve/pull/510 > > Hope that helps :-) > -- uname -a FreeBSD freebsd.friedrich.org 13.2-RELEASE FreeBSD 13.2-RELEASE FREEBSD amd64 From nobody Sat May 6 07:31:30 2023 X-Original-To: freebsd-questions@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 4QCzlW2ZYrz49CTn for ; Sat, 6 May 2023 07:32:07 +0000 (UTC) (envelope-from freebsd@telaman.net.au) Received: from actcsvr17.gohosting.com.au (actcsvr17.gohosting.com.au [103.11.147.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCzlT4lndz3Nll for ; Sat, 6 May 2023 07:32:05 +0000 (UTC) (envelope-from freebsd@telaman.net.au) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=telaman.net.au header.s=default header.b="Ka/kRS+w"; spf=pass (mx1.freebsd.org: domain of freebsd@telaman.net.au designates 103.11.147.171 as permitted sender) smtp.mailfrom=freebsd@telaman.net.au; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=telaman.net.au; s=default; h=MIME-Version:Content-Transfer-Encoding: Content-Type:Date:To:From:Subject:Message-ID:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=E2SbHMUxeWmAMixumFQB5g2IgoKKyqqW/enRdLwP37Y=; b=Ka/kRS+wWWCLpryMnlwe2JbBMN LIK8HkPgoDTVS6QgFOOWkAi5pJiUZ7YbDPqo6CMhsI11mekvTaAOUYuVcdvzbm1pXi+kGER5ZXbHK FBcIw8gWsCrdHiXnGtzkRuwI5yiK+3HS5cGESFm7cbOBqdc+q6bMMCYCazmQKUpbgapD5CqbmXEzM 76NcJ691M7dELcHMtj+lgMZVCbbt8QuvC3QKwqRiXWM8fDX+Km/FF2fwvTrBf52N78QTNzyLf9B7G 2voMUpJYEcdfI/7AjuRvJa9Sb2qtWzapEfLHG3uANwmeQnMcmRAOc0yYccKuJfXHYB1hXtSZNYd8I wddvVb6Q==; Received: from 116-250-233-13.pool.activ8me.net.au ([116.250.233.13]:36977 helo=[192.168.20.2]) by actcsvr17.gohosting.com.au with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1pvCOY-006rot-35 for freebsd-questions@FreeBSD.org; Sat, 06 May 2023 17:31:55 +1000 Message-ID: Subject: AKG gear From: David To: freebsd-questions@FreeBSD.org Date: Sat, 06 May 2023 17:31:30 +1000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 FreeBSD GNOME Team List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - actcsvr17.gohosting.com.au X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - telaman.net.au X-Get-Message-Sender-Via: actcsvr17.gohosting.com.au: authenticated_id: freebsd@telaman.net.au X-Authenticated-Sender: actcsvr17.gohosting.com.au: freebsd@telaman.net.au X-Source: X-Source-Args: X-Source-Dir: X-Spamd-Result: default: False [-3.49 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; NEURAL_HAM_SHORT(-0.99)[-0.992]; R_SPF_ALLOW(-0.20)[+ip4:103.11.147.171]; R_DKIM_ALLOW(-0.20)[telaman.net.au:s=default]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:9290, ipnet:103.11.144.0/22, country:AU]; HAS_X_GMSV(0.00)[freebsd@telaman.net.au]; MLMMJ_DEST(0.00)[freebsd-questions@FreeBSD.org]; DKIM_TRACE(0.00)[telaman.net.au:+]; MIME_TRACE(0.00)[0:+]; HAS_X_ANTIABUSE(0.00)[]; RCVD_TLS_ALL(0.00)[]; DMARC_NA(0.00)[telaman.net.au]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; HAS_X_SOURCE(0.00)[]; ARC_NA(0.00)[]; HAS_X_AS(0.00)[freebsd@telaman.net.au] X-Rspamd-Queue-Id: 4QCzlT4lndz3Nll X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Hullo, I have an AKG Lyra microphone, which is USB driven, and an AKG K240 headset, which plugs directly into the bottom of the microphone. I'm getting sound, so it's not a permissions problem, through the tinny case speaker, but can't get it through the phones. The system recognises the equipment accurately, as I can see it during boot-up, so I assume driver are available, but I have no idea of how to access it. Thanks for any time and trouble with this. Cheers! From nobody Sat May 6 09:21:19 2023 X-Original-To: freebsd-questions@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 4QD29h675qz49L39 for ; Sat, 6 May 2023 09:21:28 +0000 (UTC) (envelope-from mail@souji-thenria.net) Received: from alisa.souji-thenria.net (alisa.souji-thenria.net [188.68.37.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QD29h1WHwz3pwl for ; Sat, 6 May 2023 09:21:27 +0000 (UTC) (envelope-from mail@souji-thenria.net) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=souji-thenria.net; s=20220813rsa; t=1683364880; 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: in-reply-to:in-reply-to:references:references; bh=uMaytaFwlaPudJXBWI3Su4ULCRbwwsfgKHGf0TUuHkU=; b=Ng4yIf3CDdplXg126W8v+WS0grWG+33K02SIRU+ZUm6yfwkhLkfOEL5UK+/kgVvsHUMsGI b4m0dDzaBtBRlpAPgm/x01+dxTlqSxugxC89ypjFU1Fz++PdKyS0x5UrquPLEpSws5ib9B eHqGyfugw+Zj2ITcydabCUEIoCRKVh9l/QfbIXya6IMbovTxmK4/eDjZybRyHib8W/A0Gl P01m8Rgwg5PGfVrjjkCrnZS/317vMO2drHHEJF2/HxI677aM996U+SVXrXKyY8SogOFF3H t3W4u+4Y/vDiBNaOVnvpbJd7gclRVaFNIhsG9Fq/ICAXdVEPFo2+6KBKJ+tJPg== Received: from [192.168.178.41] (nat-178-19-229-24.net.encoline.de [178.19.229.24]) by alisa.souji-thenria.net (OpenSMTPD) with ESMTPSA id 800260aa (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 6 May 2023 11:21:20 +0200 (CEST) Message-ID: <0ed3c244-71a6-d464-c502-2371d225e39d@souji-thenria.net> Date: Sat, 6 May 2023 11:21:19 +0200 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: AKG gear To: David , freebsd-questions@FreeBSD.org References: Content-Language: en-US From: Souji Thenria In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4QD29h1WHwz3pwl X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:197540, ipnet:188.68.32.0/20, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 5/6/23 09:31, David wrote: > Hullo, > > I have an AKG Lyra microphone, which is USB driven, and an AKG K240 > headset, which plugs directly into the bottom of the microphone. > I'm getting sound, so it's not a permissions problem, through the tinny > case speaker, but can't get it through the phones. > The system recognises the equipment accurately, as I can see it during > boot-up, so I assume driver are available, but I have no idea of how to > access it. > Thanks for any time and trouble with this. > Cheers! > Hey, It depends on what sound system you are using. You can change the default device if you use OSS, which is the default on FreeBSD. However, the application playing the sound needs to reopen the sound device, which usually means you need to reopen the application. To show all available devices run the following: cat /dev/sndstat To switch the default device: sysctl hw.snd.default_unit= -- Souji Thenria From nobody Sat May 6 10:32:44 2023 X-Original-To: freebsd-questions@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 4QD3tp5S7Yz49QPf for ; Sat, 6 May 2023 10:38:42 +0000 (UTC) (envelope-from markus.graf@markusgraf.net) Received: from mx.virtual-earth.de (mx.virtual-earth.de [IPv6:2a01:4f8:120:7381:1:1:0:227]) (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 (2048 bits) client-digest SHA256) (Client CN "mx.virtual-earth.de", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QD3tn1WvXz3yDy for ; Sat, 6 May 2023 10:38:41 +0000 (UTC) (envelope-from markus.graf@markusgraf.net) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mx.virtual-earth.de; s=220816; t=1683369511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m067RDzDQMoKYjbGcfw2fTDAqc9Tjz2mUZU87Yj5O90=; b=l6Lec5sjfCqT4yIXaFmn4c8WW7GpZp7kSX/svztScsTPoBc1EpBAnKn9GU+fGzzddNh2V7 QEUK2QUKrG4heoLbXtaKEgsxY6Yyyx0eLFHduZVb5L7nYb8rI7RGoV8llpP7ie3xYmUMvd fVwGFeFI6cS9r6l6f1dE1lFi40y/6Fo= Received: from beasty.markusgraf.net (p200300E12f33970082FA5bFfFE3b70E7.dip0.t-ipconnect.de [2003:e1:2f33:9700:82fa:5bff:fe3b:70e7]) by mx.virtual-earth.de (OpenSMTPD) with ESMTPSA id 017f84c2 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 6 May 2023 12:38:31 +0200 (CEST) References: <8d3a09fe-e69f-2c0e-8cc8-ca87ccfcfa42@gmail.com> User-agent: mu4e 1.8.13; emacs 28.2 From: Markus Graf To: Steven Friedrich Cc: freebsd-questions@freebsd.org Subject: Re: Can't figure out getting network into bhyve instance. Date: Sat, 06 May 2023 12:32:44 +0200 In-reply-to: Message-ID: <86zg6h68yg.fsf@beasty.markusgraf.net> List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4QD3tn1WvXz3yDy X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Steven Friedrich writes: > 1. ( ) text/plain (*) text/html=20=20=20=20=20=20=20=20=20=20=20 > > I can get in with vm console nameofguest > > root@freebsd:~ # ifconfig=20 > vtnet0: flags=3D8863=20 > metric 0 mtu 1500=20 > options=3D80028=20 > ether 58:9c:fc:02:aa:68=20 > inet 192.168.1.14 netmask 0xffffff00 broadcast=20 > 192.168.1.255=20 > media: Ethernet autoselect (10Gbase-T )=20 > status: active=20 > nd6 options=3D29=20 > lo0: flags=3D8049 metric 0 mtu=20 > 16384=20 > options=3D680003= =20 > inet6 ::1 prefixlen 128=20 > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2=20 > inet 127.0.0.1 netmask 0xff000000=20 > groups: lo=20 > nd6 options=3D21 > > vtnet0 has an IP address, I assume it got it from DHCP. > > But ping to my router at 192.168.1.1 fails. 100% packet loss. > > On 5/5/23 13:22, Tomek CEDRO wrote: > > On Fri, May 5, 2023 at 5:55=E2=80=AFPM Steven Friedrich wrote: > > I had found a bhyve tutorial on the Internet: > https://klarasystems.com/articles/from-0-to-bhyve-on-freebsd-13-1/ > (..) > > > In a simple scenario read `man vm` :-) > > Just add public switch with selected physical port / interface. > Machines will use that for networking by default. > > I had the same problem(?). Packets were not going out of the=20 > guest vm. > There are some sysctls to do in order to pass the bridged=20 > traffic. > > sysctl net.link.bridge.ipfw=3D0 > sysctl net.link.bridge.pfil_bridge=3D0 > sysctl net.link.bridge.pfil_member=3D0 > > I have provided a man page update on that, any comments welcome=20 > :-) > > https://github.com/churchers/vm-bhyve/pull/510 > > Hope that helps :-) Hallo Steven, just something I noticed: you try to ping 192.168.1.1 but I can not see any interface with this address in your posts. re0 192.168.1.9 vm-public no ip4 best regards Markus --=20 Markus Graf Tel.: +49 172 840 26 08 Email: markus.graf@markusgraf.net Web: markusgraf.net, headhuntertraining.net From nobody Sat May 6 11:25:25 2023 X-Original-To: freebsd-questions@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 4QD4wm4pxqz49Shx for ; Sat, 6 May 2023 11:25:28 +0000 (UTC) (envelope-from freebsdlouisville@gmail.com) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QD4wl4BgXz44mX for ; Sat, 6 May 2023 11:25:27 +0000 (UTC) (envelope-from freebsdlouisville@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=fsVguVGL; spf=pass (mx1.freebsd.org: domain of freebsdlouisville@gmail.com designates 2607:f8b0:4864:20::830 as permitted sender) smtp.mailfrom=freebsdlouisville@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-qt1-x830.google.com with SMTP id d75a77b69052e-3ef69281e68so14404021cf.1 for ; Sat, 06 May 2023 04:25:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683372326; x=1685964326; h=content-transfer-encoding:subject:to:content-language:user-agent :mime-version:date:message-id:from:from:to:cc:subject:date :message-id:reply-to; bh=JWVnVDv5Vb1g+bKBYTyZ14LqnEIAuJA4gqUqPbpR6fA=; b=fsVguVGLxzAuFEAA4tmr41TT3IrV0C6asEI39GoL8Q4kAbbr67u7Bdl5bUG2RqhZ8y h6ecmTPcYAqHyYR6w0RzwkihjPwLgCy0UNYdk5rtnysqrVxFR0InGcvb+9JlwiRNaZym bIMX7CobsYEQD4W7SZicsfR/krwc+UKeNUvnAya0xcsfwTbm6o03BLlpL6UZyDvHfT4I YFkq7+AIGXAYC3cLmuBsDZRb5n+LnzcgfHEBhlmZ35uYxGDcnwzQLmcweP9/yNv0lq5w i3NFoymcjzqSNdMFB9sQudmaEYFXHYY1k89EfPetOeHXhn6Rqzfmsc34KoiQO79HjuwA H7Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683372326; x=1685964326; h=content-transfer-encoding:subject:to:content-language:user-agent :mime-version:date:message-id:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JWVnVDv5Vb1g+bKBYTyZ14LqnEIAuJA4gqUqPbpR6fA=; b=NLQn9+IlL7mWKN6l4CRtAlAyRthdIADSv/DFZy4brFBBs9pgGAq8lsBL/mQxtiNay9 wqNi0u4cVcQepyNy2q5RWXAU8Us/4z6riUgxTCZTHAIA3HsF5c0YPtqNpXTnP4dplnHi K7gUC0eUDbfGUF29Fyu7xlkccBUwHwM7m8v67Dv9Z9/+ftzEkkAmje2fFW5RtHRsPOWi RxnKJiV/ZxAhqKYy5NkCf6csXGlMiUIL9eOjPxnHFVwxlkqbXz0NmH/cRkLpcpLKmhK+ 9C+PrXBCGSdxffolnieuts0PBN5xEDcRJdGfSHoU7IBZxyu9WRsaG4KE2LY/CrNdv5Ag QJCg== X-Gm-Message-State: AC+VfDyimAj5fNm+kesS7cOBF6WDeWh8cmneQbJbUXVM+RjhWY0WQrzf mksPa9XNVLw0u7RwAlPqOXSLrzTEQNlkurql X-Google-Smtp-Source: ACHHUZ7uV6FwTW+W0ZaKY/cRyrgHSmZuKdYlT0vRjQ5xdUwspfMISBZ/P6YOuYOFRuyuxhK1T9+nXQ== X-Received: by 2002:a05:622a:1441:b0:3ef:3191:f31a with SMTP id v1-20020a05622a144100b003ef3191f31amr6152380qtx.54.1683372326590; Sat, 06 May 2023 04:25:26 -0700 (PDT) Received: from [192.168.1.15] ([162.154.243.45]) by smtp.gmail.com with ESMTPSA id d25-20020a05620a141900b007516394c2e9sm1245064qkj.64.2023.05.06.04.25.25 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 06 May 2023 04:25:26 -0700 (PDT) From: Steven Friedrich X-Google-Original-From: Steven Friedrich Message-ID: <2986dfd0-ac48-9793-f480-84c8e6f4d222@Gmail.com> Date: Sat, 6 May 2023 07:25:25 -0400 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Content-Language: en-US To: freebsd-questions@freebsd.org Subject: Error in vm manpage Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::830:from]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_NONE(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org] X-Rspamd-Queue-Id: 4QD4wl4BgXz44mX X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N In Windows Support section, it mentions uefi-edk2-bhyve port. No such port or package exists. From nobody Sat May 6 11:43:57 2023 X-Original-To: freebsd-questions@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 4QD5LL2fXwz49Td1 for ; Sat, 6 May 2023 11:44:10 +0000 (UTC) (envelope-from tomek@cedro.info) Received: from mail-yb1-xb2c.google.com (mail-yb1-xb2c.google.com [IPv6:2607:f8b0:4864:20::b2c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QD5LL0mmCz46lM for ; Sat, 6 May 2023 11:44:10 +0000 (UTC) (envelope-from tomek@cedro.info) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-xb2c.google.com with SMTP id 3f1490d57ef6-b8f34bca001so3667054276.3 for ; Sat, 06 May 2023 04:44:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cedro.info; s=google; t=1683373449; x=1685965449; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=xKDd34wewUp67HAe+cerDEQT6189zvVGYYp3hOj5zn0=; b=UkbuUQnsLfFay7o+2Hp8ijBsKPbFTbVrcI98gm0DPfQv/XZSXbcSNMRJYyG1ZvkBIX DPFIPx/5QV/imF5LydXWhBb0i5ivMIiZSAL+X38UwVy8o48sCaqC5D/3FOPDP7H6h+92 9cAuWy8uwerjwUy2RaZzW3pdLze1fw3jCriMhu0UuZ/LeT9l2kvhbQeBLpalGtQiwwZ7 aqNuvRH3QmrHW6XEuMpkunHB/XXT21jpaTaKN/losmFRza6IAbZUdFd3eU0smrS2GqN0 hX4pvF+B9/lUEudM2brLRusktRHaAkcwtucKgyglHPy3faj+dy/LPgf3yYhWN9CwY5TM oPTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683373449; x=1685965449; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xKDd34wewUp67HAe+cerDEQT6189zvVGYYp3hOj5zn0=; b=SAJuZbYc1DTu5bY/vPvupYANnnKrgUq8AKOtdcyqfvzegw11spRY0ImkCJIjNlbu5G hE+BbatwY91yoy57l0v4GvaRiTR9uPiovm67zDtg5u+LHD1q9140dQ5IEfWkEKcGrL72 ot+THEzZ9LNRIHR84hzpI+DKLcBGzElv+yvdh8+OUElaig4lbGZIQ13z5JQt+sMpekGY 8IIFIvmESvDAh/WK/AVIfI5YUNhV0NLYQI9cQK5M8T780PZ6mHn+Eq4Y30Rl5MgkhOWG NjGVbv7mNFRoevb6PSTpXLHh07yc3xvlnw6otYHDHj1rJLC+PczWWS2TNTuEOl1IyxxB E1CA== X-Gm-Message-State: AC+VfDzCIaDacN8RL+kIc+YC4GWJ2+q0uTJc0O3xKCT+o3Wo2f9Bvdvx Mdk9t5aciEA4u0xjek4wCm0e7FUKs8+M1YX6bHE= X-Google-Smtp-Source: ACHHUZ5o59sdxlyCT+qMxIDFcti4UE4g/RlX2hGZuFnlKhma4BRnz/Ym0YdmXkI8oy4XsqxjusT6LQ== X-Received: by 2002:a81:6d05:0:b0:55a:c51:9a15 with SMTP id i5-20020a816d05000000b0055a0c519a15mr5092425ywc.22.1683373448953; Sat, 06 May 2023 04:44:08 -0700 (PDT) Received: from mail-yw1-f172.google.com (mail-yw1-f172.google.com. [209.85.128.172]) by smtp.gmail.com with ESMTPSA id h6-20020a0df706000000b00545a08184bdsm1104513ywf.77.2023.05.06.04.44.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 06 May 2023 04:44:08 -0700 (PDT) Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-55a2cb9788dso40680337b3.2 for ; Sat, 06 May 2023 04:44:08 -0700 (PDT) X-Received: by 2002:a81:6554:0:b0:55a:5b41:d126 with SMTP id z81-20020a816554000000b0055a5b41d126mr4598037ywb.40.1683373448146; Sat, 06 May 2023 04:44:08 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: <8d3a09fe-e69f-2c0e-8cc8-ca87ccfcfa42@gmail.com> In-Reply-To: From: Tomek CEDRO Date: Sat, 6 May 2023 13:43:57 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Can't figure out getting network into bhyve instance. To: Steven Friedrich Cc: FreeBSD Questions Mailing List Content-Type: multipart/alternative; boundary="00000000000066c30705fb04ecbc" X-Rspamd-Queue-Id: 4QD5LL0mmCz46lM X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --00000000000066c30705fb04ecbc Content-Type: text/plain; charset="UTF-8" On Fri, May 5, 2023, 19:54 Steven Friedrich wrote: > BTW, I invoked the sysctls. Wait, were those on the host on in the vm? > host :-) host is the bridge between networks :-) -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info > --00000000000066c30705fb04ecbc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, May = 5, 2023, 19:54 Steven Friedrich <freebsdlouisville@gmail.com> wrote:
BTW, I invoked the sysctls.=C2= =A0 Wait, were those on the host on in the vm?
=

host :-) host is the bridge b= etween networks :-)

--00000000000066c30705fb04ecbc-- From nobody Sat May 6 12:43:29 2023 X-Original-To: freebsd-questions@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 4QD6fs3dgTz49YJy for ; Sat, 6 May 2023 12:43:33 +0000 (UTC) (envelope-from freebsdlouisville@gmail.com) Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QD6fr09QHz4DKg for ; Sat, 6 May 2023 12:43:32 +0000 (UTC) (envelope-from freebsdlouisville@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=lO0uasDm; spf=pass (mx1.freebsd.org: domain of freebsdlouisville@gmail.com designates 2607:f8b0:4864:20::734 as permitted sender) smtp.mailfrom=freebsdlouisville@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-qk1-x734.google.com with SMTP id af79cd13be357-74e3de79bf2so271625385a.2 for ; Sat, 06 May 2023 05:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683377010; x=1685969010; h=content-transfer-encoding:subject:to:content-language:user-agent :mime-version:date:message-id:from:from:to:cc:subject:date :message-id:reply-to; bh=3cMA+gmT5jrkdPShv1nrGHxMCGbnO7NapHjOKoUHxfE=; b=lO0uasDmR+mOE04n7IsL5li+KrEyIVqiDiAc1FvOPLSnNplA/sHCEbrw+hBLSTKWAa hsDaNbvO9g8zpReoxJkhCSllIHIRGEzf7Kt/pKx8bqHbkV+l8JFIX8fCAPxTb3D14aCK ppn7oaxeipSCoIuz6dg7onBcEpP0fv1HZDyHjuuZrxqpxXpUaBjf5XNGPY+D7TS4P2nH DZK+v0sxARL3v2ecRpesQgvG+FUMBvQ1Xvc0jSSSkoJNggXPHtOT/ZuCoZW1ohDDAirg Yp/EVkRlOk3eDAUNDxgmR6FH6JAmHyzLyAvYxOC6dl0SErYxxVLC+jjDZFhdTDYLXRw1 GKgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683377010; x=1685969010; h=content-transfer-encoding:subject:to:content-language:user-agent :mime-version:date:message-id:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3cMA+gmT5jrkdPShv1nrGHxMCGbnO7NapHjOKoUHxfE=; b=FcWxx4T3P2aA4unKkvlIxHJ5301IgI0FpAetxETykBSnpB9LYvjVmUzG4xy2EV2ROZ riMrXatPmDSK6PYnL6Vq70QcA4EesAY+4g1m+rans9qkNwCiTjx1M7ovc+AMQkmO7CVq wwsx8TRFw3x7uh8FuBQEPBlL/CjbdBEKYY7S4v9eL8YmLItI5pOMmHzC/veKUypIv74H 4tM6uGotZdBOdo13Ht7MZbwRmaZHgGhwrOIY1xCShnsI8LcsKCujSte1d1cTa44jkp7P XK5mTqQ9tqw83yTYR5a1djC3BHhLCQsOPmJ1rf/RbmlXydxqatVx3xqLEgwwTo5q4DO4 Z4vA== X-Gm-Message-State: AC+VfDz3NQ7Zcf38o2NTStfMopyWctHMApncQO2r20esqXC8/Ks5QDER Xanfh14n4cKnf9dXoLoXObcJBvS9xayNtVmt X-Google-Smtp-Source: ACHHUZ67I7SyqFWPsvGfnw16W/FiuiRT3wEAD8U8zVFOPZbbJTH4nmT/B9bxqAidzB/1klK89Q9hFw== X-Received: by 2002:a05:6214:e4c:b0:5fa:8692:3882 with SMTP id o12-20020a0562140e4c00b005fa86923882mr7115222qvc.16.1683377010659; Sat, 06 May 2023 05:43:30 -0700 (PDT) Received: from [192.168.1.15] ([162.154.243.45]) by smtp.gmail.com with ESMTPSA id p14-20020a05620a15ee00b0074df4cc81e4sm1279312qkm.101.2023.05.06.05.43.30 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 06 May 2023 05:43:30 -0700 (PDT) From: Steven Friedrich X-Google-Original-From: Steven Friedrich Message-ID: <85ca379a-830d-897a-c2ed-240c9aca687a@Gmail.com> Date: Sat, 6 May 2023 08:43:29 -0400 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Content-Language: en-US To: freebsd-questions@freebsd.org Subject: no traffic from guest to host. guest can't get a dhcp response. ping says no route to host. Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-3.85 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.85)[-0.855]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::734:from]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_NONE(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org] X-Rspamd-Queue-Id: 4QD6fr09QHz4DKg X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On my host: re0: flags=8943 metric 0 mtu 1500  options=8209b     ether 10:62:e5:02:ef:45     inet 192.168.1.9 netmask 0xffffff00 broadcast 192.168.1.255     media: Ethernet autoselect (1000baseT )     status: active     nd6 options=29 lo0: flags=8049 metric 0 mtu 16384  options=680003     inet6 ::1 prefixlen 128     inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2     inet 127.0.0.1 netmask 0xff000000     groups: lo     nd6 options=21 bridge0: flags=8843 metric 0 mtu 1500     ether 58:9c:fc:00:1b:70     id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15     maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200     root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0     member: re0 flags=143             ifmaxaddr 0 port 1 priority 128 path cost 55     groups: bridge     nd6 options=9 vm-public: flags=8843 metric 0 mtu 1500     ether 52:5a:45:37:95:e7     id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15     maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200     root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0     groups: bridge vm-switch viid-4c918@     nd6 options=9 on my guest: ifconfig vtnet0: flags=8822 metric 0 mtu 1500 options=80028X,MULTICAST > metric 0 mtu 15         ether 58:9c:fc:0f:ef:34         media: Ethernet autoselect (10Gbase-T )         status: active         nd6 options=29 lo0: flags=8049 metric 0 mtu 16384 options=680003         inet6 ::1 prefixlen 128         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2         inet 127.0.0.1 netmask 0xff000000         groups: lo         nd6 options=21 no traffic from guest to host.  guest can't get a dhcp response. ping says no route to host. I tried dhclient bridge0 on the host and it assigned an ip adx to bridge0, but had no relief in the guest. i am not able to get guest access to the host.  what can i do? From nobody Sat May 6 15:48:14 2023 X-Original-To: freebsd-questions@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 4QDBmC2Tq3z49lJ2 for ; Sat, 6 May 2023 15:48:27 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from mailout.qeng-ho.org (mailout.qeng-ho.org [217.155.128.244]) (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 4QDBmC0D6xz4TK8 for ; Sat, 6 May 2023 15:48:26 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Authentication-Results: mx1.freebsd.org; none Received: from [IPV6:2a02:8010:64c9:1::2] (unknown [IPv6:2a02:8010:64c9:1::2]) by mailout.qeng-ho.org (Postfix) with ESMTP id 07E8DF9350; Sat, 6 May 2023 16:48:22 +0100 (BST) Message-ID: Date: Sat, 6 May 2023 15:48:14 +0000 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: Error in vm manpage Content-Language: en-GB To: Steven Friedrich , freebsd-questions@freebsd.org References: <2986dfd0-ac48-9793-f480-84c8e6f4d222@Gmail.com> From: Arthur Chance In-Reply-To: <2986dfd0-ac48-9793-f480-84c8e6f4d222@Gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4QDBmC0D6xz4TK8 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:13037, ipnet:217.155.0.0/16, country:GB] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 06/05/2023 11:25, Steven Friedrich wrote: > In Windows Support section, it mentions uefi-edk2-bhyve port. > > No such port or package exists. > > It appears there are two versions sysutils/uefi-edk2-bhyve-csm sysutils/uefi-edk2-bhyve-devel -- We build our computer systems the way we build our cities; over time, without a plan, on top of ruins. — Ellen Ullman From nobody Sat May 6 15:56:40 2023 X-Original-To: freebsd-questions@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 4QDBxm66jlz49lff for ; Sat, 6 May 2023 15:56:44 +0000 (UTC) (envelope-from yuri@aetern.org) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDBxm2tx6z4VtC for ; Sat, 6 May 2023 15:56:44 +0000 (UTC) (envelope-from yuri@aetern.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=aetern.org header.s=fm3 header.b=dnllWTRQ; dkim=pass header.d=messagingengine.com header.s=fm3 header.b="A KeSm0f"; spf=pass (mx1.freebsd.org: domain of yuri@aetern.org designates 64.147.123.19 as permitted sender) smtp.mailfrom=yuri@aetern.org Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 8ABAE320093F for ; Sat, 6 May 2023 11:56:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sat, 06 May 2023 11:56:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aetern.org; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1683388602; x=1683475002; bh=Tj75TpM9ODdKDzec0puK0hK5eBHKVRGGv7e GBF5jRZM=; b=dnllWTRQpB2ATMrzWd4Bn9wf6y8xJ2jTzA2ZHtOZcr6mpAzPvF8 5DmTNFZJZC3Q6nSLHj8wkSweMuoU/kM0WjnRSZR45jSBbbDz7IXqRTdXCjgRckQY ZIp1B0Hnaqd90pZMGgsBVO8lF8VFNlhIVmFKvB7V3KM8DDhkm988AQoONUi6qzuy d/CvMWewl+GqbeYFFpnsqyCCsYN8ISM0wGamcC18bW2pTf74q82Yh4D7Ib42UuKd asghSSGLLBqLxcjjQtVFvFCfu+ABtM1RBfGGyGbmKDAp7pooSCZpe6xd3jb57x1e P4Tcv/bCV59iUUXfqBYkVYmKBAP8TKExuyg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1683388602; x= 1683475002; bh=Tj75TpM9ODdKDzec0puK0hK5eBHKVRGGv7eGBF5jRZM=; b=A KeSm0f7wsmZKhTtsQgqmK4eXEDrRHucXXuQdTeYDR3osc6ODwcQGVn1qBo4Do+Ih FfJ1ZpdIz4xsYDE5BAxecL5xcjlF7iLyHvAxIAOH1DIyEO6k57e0EqUAYax4dKsM XCvhqRGFTqWULmubq7vMnSASyDmeZzO3BM9CPKu0LUPoxXnMz90xgZfjVUkUDgYR 5o9gUcNZTFh9XDLsFlbvj+05P3pRtiLJE8k3O18BR4lVLkgpYrG43ySKy9lGU36o tM6mzlEqNRBKU6faquek4tJhvYNH16Izy309TJx+AwW9EFa73zsQPpM9/Q+IKib6 iKeuiclU5/ltGhfgMqtzg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeefgedgjedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtje ertddtfeejnecuhfhrohhmpegjuhhrihcuoeihuhhrihesrggvthgvrhhnrdhorhhgqeen ucggtffrrghtthgvrhhnpeevvdegledtveekudfhjeeggeffteehueejlefhkeegffethe evveejfefhgffftdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpeihuhhrihesrggvthgvrhhnrdhorhhg X-ME-Proxy: Feedback-ID: i0d79475b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sat, 6 May 2023 11:56:42 -0400 (EDT) Message-ID: <4763e87b-86bb-8756-4d67-febc6c3d6b04@aetern.org> Date: Sat, 6 May 2023 17:56:40 +0200 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: Error in vm manpage Content-Language: en-US To: freebsd-questions@freebsd.org References: <2986dfd0-ac48-9793-f480-84c8e6f4d222@Gmail.com> From: Yuri In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4QDBxm2tx6z4VtC X-Spamd-Bar: / X-Spamd-Result: default: False [-0.40 / 15.00]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.19]; R_DKIM_ALLOW(-0.20)[aetern.org:s=fm3,messagingengine.com:s=fm3]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; local_wl_from(0.00)[yuri@aetern.org]; DKIM_TRACE(0.00)[aetern.org:+,messagingengine.com:+]; ASN(0.00)[asn:29838, ipnet:64.147.123.0/24, country:US] X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: local_wl_from X-ThisMailContainsUnwantedMimeParts: N Arthur Chance wrote: > On 06/05/2023 11:25, Steven Friedrich wrote: >> In Windows Support section, it mentions uefi-edk2-bhyve port. >> >> No such port or package exists. >> >> > > It appears there are two versions > > sysutils/uefi-edk2-bhyve-csm This one is deprecated. > sysutils/uefi-edk2-bhyve-devel This one does not exist since 2021. Everything is now in sysutils/edk2 as flavors, e.g. package names will currently be: edk2-bhyve-g202202_2 edk2-fvp-g202202_2 edk2-macchiatobin-g202202_2 edk2-qemu-x64-g202202_2 edk2-rpi3-g202202_2 edk2-rpi4-g202202_2 edk2-qemu-i386-g202202_2 edk2-xen-x64-g202202_2 From nobody Sat May 6 16:21:42 2023 X-Original-To: freebsd-questions@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 4QDCVc49szz49nJf for ; Sat, 6 May 2023 16:21:44 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from mailout.qeng-ho.org (mailout.qeng-ho.org [217.155.128.244]) (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 4QDCVc1jPzz4bN9 for ; Sat, 6 May 2023 16:21:44 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Authentication-Results: mx1.freebsd.org; none Received: from [IPV6:2a02:8010:64c9:1::2] (unknown [IPv6:2a02:8010:64c9:1::2]) by mailout.qeng-ho.org (Postfix) with ESMTP id BB1D9F9356; Sat, 6 May 2023 17:21:42 +0100 (BST) Message-ID: <1a48dbcf-71ba-69a0-c010-f16b11d14628@qeng-ho.org> Date: Sat, 6 May 2023 16:21:42 +0000 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: Error in vm manpage Content-Language: en-GB To: Yuri , freebsd-questions@freebsd.org References: <2986dfd0-ac48-9793-f480-84c8e6f4d222@Gmail.com> <4763e87b-86bb-8756-4d67-febc6c3d6b04@aetern.org> From: Arthur Chance In-Reply-To: <4763e87b-86bb-8756-4d67-febc6c3d6b04@aetern.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4QDCVc1jPzz4bN9 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:13037, ipnet:217.155.0.0/16, country:GB] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 06/05/2023 15:56, Yuri wrote: > Arthur Chance wrote: >> On 06/05/2023 11:25, Steven Friedrich wrote: >>> In Windows Support section, it mentions uefi-edk2-bhyve port. >>> >>> No such port or package exists. >>> >>> >> >> It appears there are two versions >> >> sysutils/uefi-edk2-bhyve-csm > > This one is deprecated. > >> sysutils/uefi-edk2-bhyve-devel > > This one does not exist since 2021. > > Everything is now in sysutils/edk2 as flavors, e.g. package names will > currently be: > > edk2-bhyve-g202202_2 > edk2-fvp-g202202_2 > edk2-macchiatobin-g202202_2 > edk2-qemu-x64-g202202_2 > edk2-rpi3-g202202_2 > edk2-rpi4-g202202_2 > edk2-qemu-i386-g202202_2 > edk2-xen-x64-g202202_2 > Maybe it's time I regenerated my ports rather than just updating them. It would appear portsnap doesn't necessarily delete old ports as I have both ports on my system and my last portsnap update was just after midnight today. Also ports.freebsd.org doesn't seem to be up to date on these ports. -- We build our computer systems the way we build our cities; over time, without a plan, on top of ruins. — Ellen Ullman From nobody Sat May 6 20:27:47 2023 X-Original-To: freebsd-questions@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 4QDJyb5wjSz495TJ for ; Sat, 6 May 2023 20:27:51 +0000 (UTC) (envelope-from freebsdlouisville@gmail.com) Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDJyZ6cg6z3v03 for ; Sat, 6 May 2023 20:27:50 +0000 (UTC) (envelope-from freebsdlouisville@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x72f.google.com with SMTP id af79cd13be357-75131c2997bso1389721085a.1 for ; Sat, 06 May 2023 13:27:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683404870; x=1685996870; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:user-agent:mime-version:date:message-id:from:from:to :cc:subject:date:message-id:reply-to; bh=hsxTXmxcfXUN/i4+KqdnFRv1kmQPEfQSIRL5fX76ixU=; b=F/iUyboR6JL1c5hOAzpubejvfwKT45UH5OpasD8YaCQKoUEinfDeHEBtjsX+nInX9W /9ZoeSeWIr4weCXHbF1+bkwzVgU1oD6JAAh/PItdnJJ6ZV/XRd+JzLq2FfjC28itwW7j 8Sz2oQYCpzIa/TLYKN+O6um2H2tzbHEgUZZS2czyHszwYA719M7AF8lJBlt1ig8WzuqK PVXEzQFz6HxckgA5YAofoOU0YTxwCMnUKR9s5ilIhCSlk1ozxetedKGYAQRCju0k/cct zFUhR+izdJGDrKF13Q+oL1FTMF54vkBwwBwgGMNAzrPisASOjt+7Qn3/MPK6DXhnEtku zbKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683404870; x=1685996870; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:user-agent:mime-version:date:message-id:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hsxTXmxcfXUN/i4+KqdnFRv1kmQPEfQSIRL5fX76ixU=; b=EVvtVhlN4gtNuxTH8aKE5A5WXn1VztklXflfrUtna8lZus0qA6o3k6P2h7YlgiTKfM ccVHUHHELalPxfCYVbLBiCQTzUmVRvyZ0Bmnh40YUDHENtblZsWX0HRAmMn4hrAdD42r zMVvS5mfH1cj+McP21DDnQbPyk7W7jIRgTq5chOh+NmhAaQbsNCEQYQwUYvz+uMiiI2g blhpQNMFNZB41Dp9ccpIKogYUTV8mIV2i1pra4XbN5SJjoN8JOAEaHZ4A9Ut+7/LV+XP hYQKlaPM4WceSi3gPEoyvRgrVlLyp/U8oyxYjddjF4zIYnFwmq7oeWQsJbEEHUD4oq1q TxkA== X-Gm-Message-State: AC+VfDxzqENtj8k6/NB5q+eZ8OrN9/mp1+eHiiVj3spNmtSd/oePzvZq fNM3YAMLXjhcFypniX+abp3/djXYzr1gHjl6 X-Google-Smtp-Source: ACHHUZ699pr3XWh2+IxuVBCGvPGK4+Axcyoab46Ae7WRwnlQSNiC8CRSC/Vy90lKRir2NV6Hw3tlxw== X-Received: by 2002:a05:622a:19a1:b0:3e4:e035:b5ae with SMTP id u33-20020a05622a19a100b003e4e035b5aemr18406491qtc.25.1683404869639; Sat, 06 May 2023 13:27:49 -0700 (PDT) Received: from [192.168.1.15] ([162.154.243.45]) by smtp.gmail.com with ESMTPSA id d3-20020ac800c3000000b003e3918f350dsm1693062qtg.25.2023.05.06.13.27.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 06 May 2023 13:27:49 -0700 (PDT) From: Steven Friedrich X-Google-Original-From: Steven Friedrich Message-ID: <48eee4f7-85a6-f49f-0c8c-c1f51394927f@Gmail.com> Date: Sat, 6 May 2023 16:27:47 -0400 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: Can't figure out getting network into bhyve instance. To: Markus Graf Cc: freebsd-questions@freebsd.org References: <8d3a09fe-e69f-2c0e-8cc8-ca87ccfcfa42@gmail.com> <86zg6h68yg.fsf@beasty.markusgraf.net> Content-Language: en-US In-Reply-To: <86zg6h68yg.fsf@beasty.markusgraf.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4QDJyZ6cg6z3v03 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 5/6/23 6:32 AM, Markus Graf wrote: > > Steven Friedrich writes: > >> 1.  ( ) text/plain          (*) text/html >> I can get in with vm console nameofguest >> >> root@freebsd:~ # ifconfig vtnet0: >> flags=8863 metric 0 mtu 1500 >> options=80028        ether >> 58:9c:fc:02:aa:68        inet 192.168.1.14 netmask 0xffffff00 >> broadcast        192.168.1.255        media: Ethernet autoselect >> (10Gbase-T )        status: active        nd6 >> options=29 lo0: >> flags=8049 metric 0 mtu 16384 >> options=680003 >>        inet6 ::1 prefixlen 128        inet6 fe80::1%lo0 prefixlen 64 >> scopeid 0x2        inet 127.0.0.1 netmask 0xff000000        groups: >> lo        nd6 options=21 >> >> vtnet0 has an IP address, I assume it got it from DHCP. >> >> But ping to my router at 192.168.1.1 fails.  100% packet loss. >> >> On 5/5/23 13:22, Tomek CEDRO wrote: >> >>  On Fri, May 5, 2023 at 5:55 PM Steven Friedrich wrote: >> >>  I had found a bhyve tutorial on the Internet: >>  https://klarasystems.com/articles/from-0-to-bhyve-on-freebsd-13-1/ >> (..) >> >> >> In a simple scenario read `man vm` :-) >> >> Just add public switch with selected physical port / interface. >> Machines will use that for networking by default. >> >> I had the same problem(?). Packets were not going out of the guest vm. >> There are some sysctls to do in order to pass the bridged traffic. >> >> sysctl net.link.bridge.ipfw=0 >> sysctl net.link.bridge.pfil_bridge=0 >> sysctl net.link.bridge.pfil_member=0 >> >> I have provided a man page update on that, any comments welcome :-) >> >> https://github.com/churchers/vm-bhyve/pull/510 >> >> Hope that helps :-) > > Hallo Steven, > > just something I noticed: > > you try to ping 192.168.1.1 > > but I can not see any interface with this address in your posts. > > re0 192.168.1.9 > vm-public no ip4 > > best regards > > Markus 168.1.1 is my hardware router connected to a cable modem. > Thanks for your response. 192.168.1.1 is my hardware router connected to a cable modem. yes, vm-public has no ip adx because my bridge0-tun0-vm-public doesn't work. From nobody Sat May 6 20:33:14 2023 X-Original-To: questions@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 4QDK510Dkzz49608 for ; Sat, 6 May 2023 20:33:25 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from holgerdanske.com (holgerdanske.com [184.105.128.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "holgerdanske.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDK5002zvz3wQ9 for ; Sat, 6 May 2023 20:33:23 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=holgerdanske.com header.s=nov-20210719-112354 header.b=4NSgML5+; spf=pass (mx1.freebsd.org: domain of dpchrist@holgerdanske.com designates 184.105.128.27 as permitted sender) smtp.mailfrom=dpchrist@holgerdanske.com; dmarc=pass (policy=none) header.from=holgerdanske.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=holgerdanske.com; s=nov-20210719-112354; t=1683405194; bh=eOidMs8KoyOOc0b3cMYdivmr5nVe8G8Iae6Db//TRic=; h=Received:Message-ID:Date:MIME-Version:User-Agent:From:Subject:To: References:Content-Language:In-Reply-To:Content-Type: Content-Transfer-Encoding; b=4NSgML5+G86fUICYst33m8VJC+Ljp7MhjyQJdIl6BtLEZpFa7w5S7ZjZxFjO5hW90 /W6xbzHiOGE1BV8aB2WI3szfj3mn+YGsk4cV4Erv3rz2KD44Hm/CeOxXotyfoB3Zsw pOhPFsiR6Ct/9Pq0IlaOJv7whHLtvBeITOKAfkijS4d6rShMlJ3PEoGND6kbgCm82C B4P1mJDvLC6UflQZDGVMewcPNTuAb/8VebpccodUzxEDaT+lfL5P72UuCMWeeXC3kq nBtjCVa4brKnh8Z4nNE4MZFaKd9ldEbBFdeauLKPofmFXCKHgS5XcUO7v9Ji0R5ggE wo1EmxVvWXPKuvTeJTpJbJhBCND92jLXVzG3KFfNqZAkT0kBADchm7VNhFDBrpICOT 8PlZvG1xvyR2SOGXeOQuv7Pv7sd9nLQQSeWlkR6tUhG4JeFcrDdRwEF3GiGC2CFM1G wQ+UhlvHEPhiYieD5N1CrSOD7MqBWplUNRzdzo03/i51X1B+xZwVI7WQSrXlZ3nT9Z DWNk11UgDpgPkCO1GsACAwuK3ZXIB0mH3ZJ/bTtlCKmpJ837KCdSX9oEmeGxron7pQ r+2yTyYp8diuj2GrvqTRJ/BuIKbYDX9l/MHAQ+6awBgCDXl6RlWufwY/MlFJveb0qS oWF62A0kM8NPBSCPQdERRk9U= Received: from 99.100.19.101 (99-100-19-101.lightspeed.frokca.sbcglobal.net [99.100.19.101]) by holgerdanske.com with ESMTPSA (TLS_AES_128_GCM_SHA256:TLSv1.3:Kx=any:Au=any:Enc=AESGCM(128):Mac=AEAD) (SMTP-AUTH username dpchrist@holgerdanske.com, mechanism PLAIN) for ; Sat, 6 May 2023 13:33:14 -0700 Message-ID: <7c2429c5-55d0-1649-a442-ce543f2d46c2@holgerdanske.com> Date: Sat, 6 May 2023 13:33:14 -0700 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 From: David Christensen Subject: Re: Tool to compare directories and delete duplicate files from one directory To: questions@freebsd.org References: <9887a438-95e7-87cc-a162-4ad7a70d744f@optiplex-networks.com> <344b29c6-3d69-543d-678d-c2433dbf7152@optiplex-networks.com> <7747f587-f33e-f39c-ac97-fe4fe19e0b76@optiplex-networks.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; DMARC_POLICY_ALLOW(-0.50)[holgerdanske.com,none]; R_SPF_ALLOW(-0.20)[+a]; R_DKIM_ALLOW(-0.20)[holgerdanske.com:s=nov-20210719-112354]; MIME_GOOD(-0.10)[text/plain]; DKIM_TRACE(0.00)[holgerdanske.com:+]; ASN(0.00)[asn:6939, ipnet:184.104.0.0/15, country:US]; MLMMJ_DEST(0.00)[questions@freebsd.org]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4QDK5002zvz3wQ9 X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N I thought I sent this, but it never hit the list (?) -- David On 5/4/23 21:06, Kaya Saman wrote: > To start with this is the directory structure: > > >  ls -lhR /tmp/test1 > total 1 > drwxr-xr-x  2 root  wheel     3B May  5 04:57 dupdir1 > drwxr-xr-x  2 root  wheel     3B May  5 04:57 dupdir2 > > /tmp/test1/dupdir1: > total 1 > -rw-r--r--  1 root  wheel     8B Apr 30 03:17 dup > > /tmp/test1/dupdir2: > total 1 > -rw-r--r--  1 root  wheel     7B May  5 03:23 dup1 > > > ls -lhR /tmp/test2 > total 1 > drwxr-xr-x  2 root  wheel     3B May  5 04:56 dupdir1 > drwxr-xr-x  2 root  wheel     3B May  5 04:56 dupdir2 > > /tmp/test2/dupdir1: > total 1 > -rw-r--r--  1 root  wheel     4B Apr 30 02:53 dup > > /tmp/test2/dupdir2: > total 1 > -rw-r--r--  1 root  wheel     7B Apr 30 02:47 dup1 > > > So what I want to happen is the script to recurse from the top level > directories test1 and test2 then expected behavior should be to remove > file dup1 as dup is different between directories. My previous post missed the mark, but I have been watching this thread with interest (trepidation?). I think Tim already identified a tool that will safely get you close to your goal, if not all the way: On 5/4/23 09:28, Tim Daneliuk wrote: > I've never used it, but there is a port of fdupes in the ports tree. > Not sure if it does exactly what you want though. fdupes(1) is also available as a package: 2023-05-04 21:25:31 toor@vf1 ~ # freebsd-version; uname -a 12.4-RELEASE-p2 FreeBSD vf1.tracy.holgerdanske.com 12.4-RELEASE-p1 FreeBSD 12.4-RELEASE-p1 GENERIC amd64 2023-05-04 21:25:40 toor@vf1 ~ # pkg search fdupes fdupes-2.2.1,1 Program for identifying or deleting duplicate files Looking at the man page: https://man.freebsd.org/cgi/man.cgi?query=fdupes&sektion=1&manpath=FreeBSD+13.2-RELEASE+and+Ports I am fairly certain that you will want to give the destination directory as the first argument and the source directories after that: $ fdupes --recurse /dir /dir_1 /dir_2 /dir_3 The above will provide you with information, but not delete anything. Practice under /tmp to gain familiarity with fdupes(1) is a good idea. As you are using ZFS, I assume you know how to take snapshots and do rollbacks (?). These could serve as backup and restore operations if things go badly. Given a 12+ TB of data, you may want the --noprompt option when you do give the --delete option and actual arguments, David From nobody Sat May 6 20:39:17 2023 X-Original-To: freebsd-questions@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 4QDKCt1Rkrz496P0 for ; Sat, 6 May 2023 20:39:22 +0000 (UTC) (envelope-from freebsdlouisville@gmail.com) Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDKCq3zySz3xkH for ; Sat, 6 May 2023 20:39:19 +0000 (UTC) (envelope-from freebsdlouisville@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=C0OpjIvh; spf=pass (mx1.freebsd.org: domain of freebsdlouisville@gmail.com designates 2607:f8b0:4864:20::729 as permitted sender) smtp.mailfrom=freebsdlouisville@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-qk1-x729.google.com with SMTP id af79cd13be357-74e00fcdec6so173335285a.1 for ; Sat, 06 May 2023 13:39:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683405558; x=1685997558; h=content-transfer-encoding:subject:to:content-language:user-agent :mime-version:date:message-id:from:from:to:cc:subject:date :message-id:reply-to; bh=a83lg5Q8rESYzreDXD//3GHm5aRgkV9qAJGqcCBTsQQ=; b=C0OpjIvhxJ2+hTY7vLz/kzL1g41j59zxx+uj7JfqVTeImKdqoQFVD4w1W4L3MBQiOA ejns+1iq1OrKHfY2+yt3k1720hKhRzpBaiYtVN+fNhh/Zp/zgKK+tXX2cEEITE9Gf57Z cGsWqF7xvLvmQCg/6Kc8xYWBkjmgsUc+8KYpdBZk899g5eH1ZifYuXBfH7ET9G3Q8IGo +PAiyCBwP61AW9zD8K2Pyfntf4VRTqyJE+b3RJP+r8TITqT10Yohk3+OC8D5a+b/tzyy kl6x3NkXIcgcVXPqJ4sP7SGeeMQhfeT8gBC5/52ZbNy/hn/KiSBerHsVJH0TmM0sxw8n b0Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683405558; x=1685997558; h=content-transfer-encoding:subject:to:content-language:user-agent :mime-version:date:message-id:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=a83lg5Q8rESYzreDXD//3GHm5aRgkV9qAJGqcCBTsQQ=; b=Qpe/QtLFOVD3qbgEi4faFE0U+8GYDTBB8mScRdIz+VwFZH+siTJOh70qJ9A+9C1Wgl NVPIUqb7XwLKAcZ7+E9MuvVrBJ/gfQSxdosmU0nLaFE2nC++Iesd8UJEgM3Ut1ZucZmp atpJZSUAYeHMd2ei0rjLotZiRCd89KuWDdYI/1Z/sGxVc7aSM2lLa+rSGVBdLYpq37MG 8yuFUXfCaHqLGrH4kf6PFRfm0RFn41HPwUKHrR+goxqn7oEq7CV/AYpLoiW0zI5tr6fG Og82FYwF+i8qGeJS5RBqmzotdcyGTSYTkGp8Om1DopKAuc2lEN9xLplWeDN3IxD/u8BA qd2Q== X-Gm-Message-State: AC+VfDxLtP7kCR/rGpRruJTuRxaolD7nzXfDpmWfUCij3ZDVzXcq4TbD BJhMdqi6kboMmU/mSrzkv134B+ISTb2CO8Vx X-Google-Smtp-Source: ACHHUZ40Aqvz3NFOE//dvRrlFRYbgEtFMMp+3an7yGEcQZ9JbsnqgiM/nwQwHLL6n7PKRM9ZlIrnLw== X-Received: by 2002:ad4:5f8e:0:b0:61a:197b:605 with SMTP id jp14-20020ad45f8e000000b0061a197b0605mr8998292qvb.1.1683405558274; Sat, 06 May 2023 13:39:18 -0700 (PDT) Received: from [192.168.1.15] ([162.154.243.45]) by smtp.gmail.com with ESMTPSA id w18-20020a05620a149200b0074d673f1b47sm1528108qkj.31.2023.05.06.13.39.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 06 May 2023 13:39:18 -0700 (PDT) From: Steven Friedrich X-Google-Original-From: Steven Friedrich Message-ID: <04bcd596-fa33-59b9-15f3-426a80b41a1e@Gmail.com> Date: Sat, 6 May 2023 16:39:17 -0400 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Content-Language: en-US To: freebsd-questions@freebsd.org Subject: no traffic from guest to host. guest can't get a dhcp response. ping says no route to host. Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-3.61 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.61)[-0.613]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::729:from]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_NONE(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org] X-Rspamd-Queue-Id: 4QDKCq3zySz3xkH X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On my host: re0: flags=8943 metric 0 mtu 1500  options=8209b     ether 10:62:e5:02:ef:45     inet 192.168.1.9 netmask 0xffffff00 broadcast 192.168.1.255     media: Ethernet autoselect (1000baseT )     status: active     nd6 options=29 lo0: flags=8049 metric 0 mtu 16384  options=680003     inet6 ::1 prefixlen 128     inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2     inet 127.0.0.1 netmask 0xff000000     groups: lo     nd6 options=21 bridge0: flags=8843 metric 0 mtu 1500     ether 58:9c:fc:00:1b:70     id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15     maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200     root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0     member: re0 flags=143             ifmaxaddr 0 port 1 priority 128 path cost 55     groups: bridge     nd6 options=9 vm-public: flags=8843 metric 0 mtu 1500     ether 52:5a:45:37:95:e7     id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15     maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200     root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0     groups: bridge vm-switch viid-4c918@     nd6 options=9 on my guest: ifconfig vtnet0: flags=8822 metric 0 mtu 1500 options=80028X,MULTICAST > metric 0 mtu 15         ether 58:9c:fc:0f:ef:34         media: Ethernet autoselect (10Gbase-T )         status: active         nd6 options=29 lo0: flags=8049 metric 0 mtu 16384 options=680003         inet6 ::1 prefixlen 128         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2         inet 127.0.0.1 netmask 0xff000000         groups: lo         nd6 options=21 no traffic from guest to host.  guest can't get a dhcp response. ping says no route to host. I tried dhclient bridge0 on the host and it assigned an ip adx to bridge0, but had no relief in the guest. i am not able to get guest access to the host.  what can i do? This is a fresh install 13.2 release. From nobody Sat May 6 20:42:02 2023 X-Original-To: questions@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 4QDKH72jpwz496T8 for ; Sat, 6 May 2023 20:42:11 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from nightmare.dreamchaser.org (ns.dreamchaser.org [66.109.141.57]) (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 (2048 bits) client-digest SHA256) (Client CN "discoveriesinwood.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDKH56nb2z40y3 for ; Sat, 6 May 2023 20:42:09 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of freebsd@dreamchaser.org designates 66.109.141.57 as permitted sender) smtp.mailfrom=freebsd@dreamchaser.org; dmarc=none Received: from [192.168.151.122] (breakaway [192.168.151.122]) by nightmare.dreamchaser.org (8.16.1/8.16.1) with ESMTP id 346Kg2ag009398 for ; Sat, 6 May 2023 14:42:02 -0600 (MDT) (envelope-from freebsd@dreamchaser.org) Message-ID: <29781401-994b-a01e-bc83-63d10fcd5b45@dreamchaser.org> Date: Sat, 6 May 2023 13:42:02 -0700 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 Subject: Re: no traffic from guest to host. guest can't get a dhcp response. ping says no route to host. Content-Language: en-US To: questions@freebsd.org References: <85ca379a-830d-897a-c2ed-240c9aca687a@Gmail.com> From: Gary Aitken Reply-To: freebsd@dreamchaser.org In-Reply-To: <85ca379a-830d-897a-c2ed-240c9aca687a@Gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.4 (nightmare.dreamchaser.org [192.168.151.101]); Sat, 06 May 2023 14:42:02 -0600 (MDT) X-Spamd-Result: default: False [0.41 / 15.00]; NEURAL_SPAM_LONG(0.92)[0.918]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_MEDIUM(-0.12)[-0.121]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_SHORT(-0.09)[-0.090]; R_DKIM_NA(0.00)[]; DMARC_NA(0.00)[dreamchaser.org]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:21947, ipnet:66.109.128.0/19, country:US]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[questions@freebsd.org]; HAS_REPLYTO(0.00)[freebsd@dreamchaser.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; RCVD_TLS_LAST(0.00)[] X-Rspamd-Queue-Id: 4QDKH56nb2z40y3 X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N On 5/6/23 05:43, Steven Friedrich wrote: > On my host: > > re0: flags=8943 > metric 0 mtu 1500 > options=8209b > > ether 10:62:e5:02:ef:45 > inet 192.168.1.9 netmask 0xffffff00 broadcast 192.168.1.255 media: > Ethernet autoselect (1000baseT ) status: active nd6 > options=29 lo0: > flags=8049 metric 0 mtu 16384 > options=680003 inet6 > ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 inet > 127.0.0.1 netmask 0xff000000 groups: lo nd6 > options=21 bridge0: > flags=8843 metric 0 mtu 1500 > ether 58:9c:fc:00:1b:70 id 00:00:00:00:00:00 priority 32768 hellotime > 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout > 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 member: > re0 flags=143 ifmaxaddr 0 port 1 > priority 128 path cost 55 groups: bridge nd6 > options=9 vm-public: > flags=8843 metric 0 mtu 1500 > ether 52:5a:45:37:95:e7 id 00:00:00:00:00:00 priority 32768 hellotime > 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout > 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 groups: > bridge vm-switch viid-4c918@ nd6 options=9 > > > on my guest: > > ifconfig vtnet0: flags=8822 metric 0 mtu 1500 options=80028 VLAN_MTU,JUMBO_MTU,LINKSTATE>X,MULTICAST > metric 0 mtu 15 > ether 58:9c:fc:0f:ef:34 media: Ethernet autoselect > (10Gbase-T ) status: active nd6 > options=29 lo0: flags=8049 metric 0 mtu 16384 > options=680003 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 > inet 127.0.0.1 netmask 0xff000000 groups: lo > nd6 options=21 > no traffic from guest to host. guest can't get a dhcp response. ping > says no route to host. > > I tried dhclient bridge0 on the host and it assigned an ip adx to > bridge0, but had no relief in the guest. > > i am not able to get guest access to the host. what can i do? I don't know anything about the vtnet driver for virtual hosts, nor whether or not what you're running should automatically assign the vtnet0 device an IP address. Is there a dhcpd (dhcp server) running on the host system? That's where the client will get its IP address from. See man 8 dhcpd and man 5 dhcpd.conf There's no route (and ping doesn't work) because there is no address assigned to the vtnet0 interface on the guest system. netstat -rn should show your existing routes Gary From nobody Sat May 6 21:03:00 2023 X-Original-To: freebsd-questions@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 4QDKlG2r3Jz4983V for ; Sat, 6 May 2023 21:03:06 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from nightmare.dreamchaser.org (ns.dreamchaser.org [66.109.141.57]) (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 (2048 bits) client-digest SHA256) (Client CN "discoveriesinwood.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDKlG0vC2z43TK for ; Sat, 6 May 2023 21:03:06 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Authentication-Results: mx1.freebsd.org; none Received: from [192.168.151.122] (breakaway [192.168.151.122]) by nightmare.dreamchaser.org (8.16.1/8.16.1) with ESMTP id 346L305o009512; Sat, 6 May 2023 15:03:00 -0600 (MDT) (envelope-from freebsd@dreamchaser.org) Message-ID: Date: Sat, 6 May 2023 14:03:00 -0700 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 From: Gary Aitken Subject: Re: Error in vm manpage To: Arthur Chance , Yuri , freebsd-questions@freebsd.org References: <2986dfd0-ac48-9793-f480-84c8e6f4d222@Gmail.com> <4763e87b-86bb-8756-4d67-febc6c3d6b04@aetern.org> <1a48dbcf-71ba-69a0-c010-f16b11d14628@qeng-ho.org> Content-Language: en-US Reply-To: freebsd@dreamchaser.org In-Reply-To: <1a48dbcf-71ba-69a0-c010-f16b11d14628@qeng-ho.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.4 (nightmare.dreamchaser.org [192.168.151.101]); Sat, 06 May 2023 15:03:00 -0600 (MDT) X-Rspamd-Queue-Id: 4QDKlG0vC2z43TK X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:21947, ipnet:66.109.128.0/19, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 5/6/23 09:21, Arthur Chance wrote: > Maybe it's time I regenerated my ports rather than just updating them. > It would appear portsnap doesn't necessarily delete old ports as I have > both ports on my system and my last portsnap update was just after > midnight today. > > Also ports.freebsd.org doesn't seem to be up to date on these ports. I'm not dead certain on this but I think this is about the time when the tree is being updated, so it may be in a state of flux. Although if the change is not recent that wouldn't be what you're seeing. I've had problems in the past where waiting a few hours and then things showed up. Gary From nobody Sat May 6 21:04:22 2023 X-Original-To: freebsd-questions@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 4QDKmn4qnxz4983w for ; Sat, 6 May 2023 21:04:25 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from nightmare.dreamchaser.org (ns.dreamchaser.org [66.109.141.57]) (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 (2048 bits) client-digest SHA256) (Client CN "discoveriesinwood.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDKmm0w43z44YK for ; Sat, 6 May 2023 21:04:24 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of freebsd@dreamchaser.org designates 66.109.141.57 as permitted sender) smtp.mailfrom=freebsd@dreamchaser.org; dmarc=none Received: from [192.168.151.122] (breakaway [192.168.151.122]) by nightmare.dreamchaser.org (8.16.1/8.16.1) with ESMTP id 346L4Mhb009520 for ; Sat, 6 May 2023 15:04:22 -0600 (MDT) (envelope-from freebsd@dreamchaser.org) Message-ID: <080af465-82c9-6347-473d-0235d6982278@dreamchaser.org> Date: Sat, 6 May 2023 14:04:22 -0700 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 Content-Language: en-US To: FreeBSD Mailing List Reply-To: freebsd@dreamchaser.org From: Gary Aitken Subject: blackhole defaults Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.4 (nightmare.dreamchaser.org [192.168.151.101]); Sat, 06 May 2023 15:04:22 -0600 (MDT) X-Spamd-Result: default: False [1.11 / 15.00]; NEURAL_SPAM_LONG(0.94)[0.943]; NEURAL_SPAM_SHORT(0.30)[0.302]; R_SPF_ALLOW(-0.20)[+mx:c]; NEURAL_SPAM_MEDIUM(0.16)[0.163]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[dreamchaser.org]; ASN(0.00)[asn:21947, ipnet:66.109.128.0/19, country:US]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; HAS_REPLYTO(0.00)[freebsd@dreamchaser.org]; TO_DN_ALL(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4QDKmm0w43z44YK X-Spamd-Bar: + X-ThisMailContainsUnwantedMimeParts: N I don't think I've specifically set any of these: $ sysctl net.inet | grep blackhole net.inet.tcp.v6pmtud_blackhole_mss: 1220 net.inet.tcp.pmtud_blackhole_mss: 1200 net.inet.tcp.pmtud_blackhole_detection: 0 net.inet.tcp.blackhole: 2 net.inet.udp.blackhole: 1 net.inet.sctp.blackhole: 0 Can someone explain to me the logic behind the last 3 (tcp,udp,sctp) defaults, and why they aren't all at 2? Gary From nobody Sat May 6 21:27:17 2023 X-Original-To: questions@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 4QDLHD0Mgsz499Bc for ; Sat, 6 May 2023 21:27:20 +0000 (UTC) (envelope-from freebsdlouisville@gmail.com) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDLHC5scgz4708 for ; Sat, 6 May 2023 21:27:19 +0000 (UTC) (envelope-from freebsdlouisville@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qt1-x834.google.com with SMTP id d75a77b69052e-3ef34e948b1so16154581cf.2 for ; Sat, 06 May 2023 14:27:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683408439; x=1686000439; h=content-transfer-encoding:in-reply-to:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=Nq9zMXnGIIIHpAOM4niUgkHC0ududeSv8hfyUjePmaw=; b=LN2ZIkv01mFXMK6AGoSEvCsa6UR0i+Ez6WDEL2FhJlOQrj0bOcJZawpRiCtuPdeETn OloICrk0A4aW9vTN0pzhI2dgIXDGUCD5GkZHQN1oxa19SXwq92LxiL44XFpZd/hWraCw h/A+XxgeN7JNik/+eTgiUh4/ld+2+BVyd095vZXX030TadQfbQKlx2WceBlLuxSII3Ln GoVxaKeXxDUV/Dr36ZmnMtCVn28QshaK8WPApQqVDkRajB1BSbFwIFOBZsiIb09RlvQq vkz0ObpdvGDGo7P5CWHtlDAD3zK9a+phBZuJu3+39MQBp/cq+P50jXu1kHQgkW0fJFeD wzZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683408439; x=1686000439; h=content-transfer-encoding:in-reply-to:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Nq9zMXnGIIIHpAOM4niUgkHC0ududeSv8hfyUjePmaw=; b=k5Ht6BBhOVchdmzIHUtutXQi877WBJ89zlHu5yt1Z0JlNVKah36jqts2uk5onv6iGp n3rr4Njj8tC9rjnclIelfX6EQV8YWt+x0sLZNKUKDV8Zz2UO6jxVeE51qhSc2F+eOKKG w1eIZlDpq2CXe6ZJkweExMuh47JG5s4IUFJAQq2pY3Zz7RrfM733AbTC5kc6BtdbxS3y UK85Sye1672ZGWLzMncZkpWBDkAB5Hm8l8QaMBBnXJg6BwrkpI6LVo5wn6TdP+fQXyJa voWvbQECqSsF6nBhUjWwHgtROGONbOpvI4LdmHSlm5Mynp2hqUsYpQPC931WTV5ppF3S HXVw== X-Gm-Message-State: AC+VfDzP2rXprBS8pbez0ByAVr8DewvAqKEEwBEKZoW823KOZM9rIiyg p30l/5gCK9klBojs1SApf4oZZZSfR8eVJtx1 X-Google-Smtp-Source: ACHHUZ7B0JjJvHjBVh591W2+6oc6OtPaPlpw8NzkHJrTIndRUFAF95rYl+j+MPvuN1FRY5l7cTCujg== X-Received: by 2002:ac8:5b01:0:b0:3ef:413b:71be with SMTP id m1-20020ac85b01000000b003ef413b71bemr7017779qtw.68.1683408438839; Sat, 06 May 2023 14:27:18 -0700 (PDT) Received: from [192.168.1.15] ([162.154.243.45]) by smtp.gmail.com with ESMTPSA id cf26-20020a05622a401a00b003e390b48958sm1717227qtb.55.2023.05.06.14.27.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 06 May 2023 14:27:18 -0700 (PDT) From: Steven Friedrich X-Google-Original-From: Steven Friedrich Message-ID: Date: Sat, 6 May 2023 17:27:17 -0400 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: no traffic from guest to host. guest can't get a dhcp response. ping says no route to host. Content-Language: en-US To: freebsd@dreamchaser.org, questions@freebsd.org References: <85ca379a-830d-897a-c2ed-240c9aca687a@Gmail.com> <29781401-994b-a01e-bc83-63d10fcd5b45@dreamchaser.org> In-Reply-To: <29781401-994b-a01e-bc83-63d10fcd5b45@dreamchaser.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4QDLHC5scgz4708 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 5/6/23 4:42 PM, Gary Aitken wrote: > On 5/6/23 05:43, Steven Friedrich wrote: >> On my host: >> >> re0: flags=8943 >> metric 0 mtu 1500 >> options=8209b >> >> > ether 10:62:e5:02:ef:45 >> inet 192.168.1.9 netmask 0xffffff00 broadcast 192.168.1.255 media: >> Ethernet autoselect (1000baseT ) status: active nd6 >> options=29 lo0: >> flags=8049 metric 0 mtu 16384 >> options=680003 inet6 >> ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 inet >> 127.0.0.1 netmask 0xff000000 groups: lo nd6 >> options=21 bridge0: >> flags=8843 metric 0 mtu 1500 >> ether 58:9c:fc:00:1b:70 id 00:00:00:00:00:00 priority 32768 hellotime >> 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout >> 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 member: >> re0 flags=143 ifmaxaddr 0 port 1 >> priority 128 path cost 55 groups: bridge nd6 >> options=9 vm-public: >> flags=8843 metric 0 mtu 1500 >> ether 52:5a:45:37:95:e7 id 00:00:00:00:00:00 priority 32768 hellotime >> 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout >> 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 groups: >> bridge vm-switch viid-4c918@ nd6 options=9 >> >> >> on my guest: >> >> ifconfig vtnet0: flags=8822> metric 0 mtu 1500 options=80028 VLAN_MTU,JUMBO_MTU,LINKSTATE>X,MULTICAST >> metric 0 mtu 15 >> ether 58:9c:fc:0f:ef:34 media: Ethernet autoselect >> (10Gbase-T ) status: active nd6 >> options=29> lo0: flags=8049 metric 0 mtu 16384 >> options=680003> inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 >> inet 127.0.0.1 netmask 0xff000000 groups: lo >> nd6 options=21> >> no traffic from guest to host.  guest can't get a dhcp response. ping >> says no route to host. >> >> I tried dhclient bridge0 on the host and it assigned an ip adx to >> bridge0, but had no relief in the guest. >> >> i am not able to get guest access to the host.  what can i do? > > I don't know anything about the vtnet driver for virtual hosts, > nor whether or not what you're running should automatically assign > the vtnet0 device an IP address. > > Is there a dhcpd (dhcp server) running on the host system?  That's > where the client will get its IP address from.  See man 8 dhcpd > and man 5 dhcpd.conf > > There's no route (and ping doesn't work) because there is no address > assigned to the vtnet0 interface on the guest system. > > netstat -rn > should show your existing routes > > > > Gary > Thanks for taking the time to respond. My router (Netgear) acts as my dhcp server.  It's at 192.168.1.1 The problem is the bridge between the guest and the host. I used the info from the vm man page, the freebsd handbook, and various tutorials on the internet. I have tried to remove the bridge, and vm-public, and re-create them, to no avail. From nobody Sat May 6 21:36:44 2023 X-Original-To: questions@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 4QDLV94k7Bz499dK for ; Sat, 6 May 2023 21:36:49 +0000 (UTC) (envelope-from dalescott@shaw.ca) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDLV905xGz49Vl for ; Sat, 6 May 2023 21:36:48 +0000 (UTC) (envelope-from dalescott@shaw.ca) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTP id vGP9ptRsnLAoIvPaCp78d7; Sat, 06 May 2023 21:36:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=shaw.ca; s=s20180605; t=1683409008; bh=3dilRoOCNv0UtORmNhfzgHNY2nNEC/jopl3rYPb4XMU=; h=Date:Subject:In-Reply-To:From:To:Cc; b=LnoHYEFwJ9G2PzV9b81xAPu41s/DReEIS4U4POo7hPeJG5GCrnA9MVtKcXyz616Hc N7iE3gniSRMAD2PjeDkDWNbb4qDehnljXNnmqH227LfuvmoZBRYtZXCYsGQzjLIWdh Fttap+tFVIAr4qikztc5mUHcKjGk2pbQTPncHQmRi62fgEZOp5PblXnRQq6PFyi/pW c7fzn1jlT03DZO0aZKPfC0CPBvpdnJdAMvIhVVSb6QSprtU+vNcHXHpIHKe+79yHXQ WrlnIQ6qzcsYt+hDzMn4JzGcCQZ4Eslu1z1yRobByPfPPPicNQcAEyh4oEuMIRlq+T N26aj+HQA7HDg== Received: from [192.168.0.15] ([174.0.43.39]) by cmsmtp with ESMTPA id vPaApSOgOcyvuvPaBpwPMo; Sat, 06 May 2023 21:36:47 +0000 X-Authority-Analysis: v=2.4 cv=VbHkgXl9 c=1 sm=1 tr=0 ts=6456c86f a=TiBur8m8wieNAdBnNdHE5Q==:117 a=TiBur8m8wieNAdBnNdHE5Q==:17 a=LquIPNHSXijeiixk:21 a=IkcTkHD0fZMA:10 a=0wQVMjYSAAAA:8 a=TBf8pTXJvY4oQ3wOZ60A:9 a=OIiY6u9_X12ivbeT:21 a=QEXdDO2ut3YA:10 a=ADKXfWr4Du7Vx0sqHUCe:22 a=ibV0ZHtNwtz4ncopG1mI:22 Date: Sat, 06 May 2023 15:36:44 -0600 Subject: Re: no traffic from guest to host. guest can't get a dhcp response. ping says no route to host. Message-ID: X-Android-Message-ID: In-Reply-To: <29781401-994b-a01e-bc83-63d10fcd5b45@dreamchaser.org> From: Dale Scott To: freebsd@dreamchaser.org Cc: questions@freebsd.org Importance: Normal X-Priority: 3 X-MSMail-Priority: Normal List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: base64 X-CMAE-Envelope: MS4xfIHKwyP9+S/Lsh3+/jBWqkA2mCz/x/EdzQOK/cwUkeXsQncmkLiQF5qGsQ64yXjIKMutDd/1S2hnyYnscocpMoSHUh0o9jRBMupMeyq9iV+5WghDQ+Oh 0UtUB7dWSgA2Yb6QBVxiVoR4uvAzpHcLKpWbhbita4BqNpeGnJtyqyoAA3I4+YAcxxwAeA7BZVMoqWCA/mCns9OqxxUYaPfmk/VzsVLanU2dn/NqG9AC811a X-Rspamd-Queue-Id: 4QDLV905xGz49Vl X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N PGRpdiBkaXI9J2F1dG8nPlNvcnJ5IEkgY2FuIG9ubHkgbW9yYWwgc3VwcG9ydCBhcyBJIGFtIGlu dmVzdGlnYXRpbmcgdGhlIHNhbWUgaXNzdWUuPGRpdiBkaXI9ImF1dG8iPjxicj48L2Rpdj48ZGl2 IGRpcj0iYXV0byI+QmFzZWQgb24gdXNpbmcgVmlydHVhbEJveCBwcmV2aW91c2x5LCBJIG5lZWQg dG8gY29uZmlndXJlIGEgTkFUIGludGVyZmFjZSBpbnN0ZWFkIG9mIGJyaWRnaW5nLCBpbnN0YWxs IGEgREhDUCBzZXJ2ZXIgb24gdGhlIGhvc3QsIGFuZCBjb25maWd1cmUgcG9ydCBmb3J3YXJkaW5n IGZvciBzc2ggZnJvbSBwb3J0IDIyIG9uIHRoZSBndWVzdCB2bSB0byBzb21lIG90aGVyIHBvcnQg b24gdGhlIGhvc3QgKGUuZy4gMzAyMikuJm5ic3A7PC9kaXY+PGRpdiBkaXI9ImF1dG8iPjxicj48 L2Rpdj48ZGl2IGRpcj0iYXV0byI+RG9lcyBhbnlvbmUgaGF2ZSBhbnkgZmF2b3JpdGUgcmVzb3Vy Y2VzIGZvciBsZWFybmluZyBob3cgdG8gZG8gdGhpcz88L2Rpdj48YnI+PGRpdiBkYXRhLXNtYXJ0 bWFpbD0iZ21haWxfc2lnbmF0dXJlIj5UaGFua3MsIERhbGU8YnI+PC9kaXY+PC9kaXY+PGRpdiBj bGFzcz0iZ21haWxfZXh0cmEiPjxicj48ZGl2IGNsYXNzPSJnbWFpbF9xdW90ZSI+T24gTWF5IDYs IDIwMjMgMjo0MiBQTSwgR2FyeSBBaXRrZW4gJmx0O2ZyZWVic2RAZHJlYW1jaGFzZXIub3JnJmd0 OyB3cm90ZTo8YnIgdHlwZT0iYXR0cmlidXRpb24iIC8+PGJsb2NrcXVvdGUgY2xhc3M9InF1b3Rl IiBzdHlsZT0ibWFyZ2luOjAgMCAwIC44ZXg7Ym9yZGVyLWxlZnQ6MXB4ICNjY2Mgc29saWQ7cGFk ZGluZy1sZWZ0OjFleCI+PHAgZGlyPSJsdHIiPk9uIDUvNi8yMyAwNTo0MywgU3RldmVuIEZyaWVk cmljaCB3cm90ZTomIzEzOzxicj4KJmd0OyBPbiBteSBob3N0OiYjMTM7PGJyPgomZ3Q7ICYjMTM7 PGJyPgomZ3Q7IHJlMDogZmxhZ3M9ODk0MyZsdDtVUCxCUk9BRENBU1QsUlVOTklORyxQUk9NSVND LFNJTVBMRVgsTVVMVElDQVNUJmd0OyYjMTM7PGJyPgomZ3Q7IG1ldHJpYyAwIG10dSAxNTAwICYj MTM7PGJyPgomZ3Q7IG9wdGlvbnM9ODIwOWImbHQ7UlhDU1VNLFRYQ1NVTSxWTEFOX01UVSxWTEFO X0hXVEFHR0lORyxWTEFOX0hXQ1NVTSxXT0xfTUFHSUMsTElOS1NUQVRFJmd0OyYjMTM7PGJyPgom Z3Q7JiMxMzs8YnI+CiZndDsgJiMxMzs8YnI+CmV0aGVyIDEwOjYyOmU1OjAyOmVmOjQ1JiMxMzs8 YnI+CiZndDsgaW5ldCAxOTIuMTY4LjEuOSBuZXRtYXNrIDB4ZmZmZmZmMDAgYnJvYWRjYXN0IDE5 Mi4xNjguMS4yNTUgbWVkaWE6JiMxMzs8YnI+CiZndDsgRXRoZXJuZXQgYXV0b3NlbGVjdCAoMTAw MGJhc2VUICZsdDtmdWxsLWR1cGxleCZndDspIHN0YXR1czogYWN0aXZlIG5kNiYjMTM7PGJyPgom Z3Q7IG9wdGlvbnM9MjkmbHQ7UEVSRk9STU5VRCxJRkRJU0FCTEVELEFVVE9fTElOS0xPQ0FMJmd0 OyBsbzA6JiMxMzs8YnI+CiZndDsgZmxhZ3M9ODA0OSZsdDtVUCxMT09QQkFDSyxSVU5OSU5HLE1V TFRJQ0FTVCZndDsgbWV0cmljIDAgbXR1IDE2Mzg0ICYjMTM7PGJyPgomZ3Q7IG9wdGlvbnM9Njgw MDAzJmx0O1JYQ1NVTSxUWENTVU0sTElOS1NUQVRFLFJYQ1NVTV9JUFY2LFRYQ1NVTV9JUFY2Jmd0 OyBpbmV0NiYjMTM7PGJyPgomZ3Q7IDo6MSBwcmVmaXhsZW4gMTI4IGluZXQ2IGZlODA6OjElbG8w IHByZWZpeGxlbiA2NCBzY29wZWlkIDB4MiBpbmV0JiMxMzs8YnI+CiZndDsgMTI3LjAuMC4xIG5l dG1hc2sgMHhmZjAwMDAwMCBncm91cHM6IGxvIG5kNiYjMTM7PGJyPgomZ3Q7IG9wdGlvbnM9MjEm bHQ7UEVSRk9STU5VRCxBVVRPX0xJTktMT0NBTCZndDsgYnJpZGdlMDomIzEzOzxicj4KJmd0OyBm bGFncz04ODQzJmx0O1VQLEJST0FEQ0FTVCxSVU5OSU5HLFNJTVBMRVgsTVVMVElDQVNUJmd0OyBt ZXRyaWMgMCBtdHUgMTUwMCAmIzEzOzxicj4KJmd0OyBldGhlciA1ODo5YzpmYzowMDoxYjo3MCBp ZCAwMDowMDowMDowMDowMDowMCBwcmlvcml0eSAzMjc2OCBoZWxsb3RpbWUmIzEzOzxicj4KJmd0 OyAyIGZ3ZGRlbGF5IDE1IG1heGFnZSAyMCBob2xkY250IDYgcHJvdG8gcnN0cCBtYXhhZGRyIDIw MDAgdGltZW91dCYjMTM7PGJyPgomZ3Q7IDEyMDAgcm9vdCBpZCAwMDowMDowMDowMDowMDowMCBw cmlvcml0eSAzMjc2OCBpZmNvc3QgMCBwb3J0IDAgbWVtYmVyOiYjMTM7PGJyPgomZ3Q7IHJlMCBm bGFncz0xNDMmbHQ7TEVBUk5JTkcsRElTQ09WRVIsQVVUT0VER0UsQVVUT1BUUCZndDsgaWZtYXhh ZGRyIDAgcG9ydCAxJiMxMzs8YnI+CiZndDsgcHJpb3JpdHkgMTI4IHBhdGggY29zdCA1NSBncm91 cHM6IGJyaWRnZSBuZDYmIzEzOzxicj4KJmd0OyBvcHRpb25zPTkmbHQ7UEVSRk9STU5VRCxJRkRJ U0FCTEVEJmd0OyB2bS1wdWJsaWM6JiMxMzs8YnI+CiZndDsgZmxhZ3M9ODg0MyZsdDtVUCxCUk9B RENBU1QsUlVOTklORyxTSU1QTEVYLE1VTFRJQ0FTVCZndDsgbWV0cmljIDAgbXR1IDE1MDAgJiMx Mzs8YnI+CiZndDsgZXRoZXIgNTI6NWE6NDU6Mzc6OTU6ZTcgaWQgMDA6MDA6MDA6MDA6MDA6MDAg cHJpb3JpdHkgMzI3NjggaGVsbG90aW1lJiMxMzs8YnI+CiZndDsgMiBmd2RkZWxheSAxNSBtYXhh Z2UgMjAgaG9sZGNudCA2IHByb3RvIHJzdHAgbWF4YWRkciAyMDAwIHRpbWVvdXQmIzEzOzxicj4K Jmd0OyAxMjAwIHJvb3QgaWQgMDA6MDA6MDA6MDA6MDA6MDAgcHJpb3JpdHkgMzI3NjggaWZjb3N0 IDAgcG9ydCAwIGdyb3VwczomIzEzOzxicj4KJmd0OyBicmlkZ2Ugdm0tc3dpdGNoIHZpaWQtNGM5 MThAIG5kNiBvcHRpb25zPTkmbHQ7UEVSRk9STU5VRCxJRkRJU0FCTEVEJmd0OyYjMTM7PGJyPgom Z3Q7ICYjMTM7PGJyPgomZ3Q7ICYjMTM7PGJyPgomZ3Q7IG9uIG15IGd1ZXN0OiYjMTM7PGJyPgom Z3Q7ICYjMTM7PGJyPgomZ3Q7IGlmY29uZmlnIHZ0bmV0MDogZmxhZ3M9ODgyMiZsdDtCUk9BRENB U1QsU0lNUExFWCxNVUxUSUNBU1QmIzEzOzxicj4KJmd0OyBtZXRyaWMgMCBtdHUgMTUwMCBvcHRp b25zPTgwMDI4IFZMQU5fTVRVLEpVTUJPX01UVSxMSU5LU1RBVEUmZ3Q7WCxNVUxUSUNBU1QmIzEz Ozxicj4KJmd0OyBtZXRyaWMgMCBtdHUgMTUmIzEzOzxicj4KJmd0OyBldGhlciA1ODo5YzpmYzow ZjplZjozNCBtZWRpYTogRXRoZXJuZXQgYXV0b3NlbGVjdCYjMTM7PGJyPgomZ3Q7ICgxMEdiYXNl LVQgJmx0O2Z1bGwtZHVwbGV4Jmd0Oykgc3RhdHVzOiBhY3RpdmUgbmQ2JiMxMzs8YnI+CiZndDsg b3B0aW9ucz0yOSZsdDtQRVJGT1JNTlVELElGRElTQUJMRUQsQVVUT19MSU5LTE9DQUwmIzEzOzxi cj4KJmd0OyBsbzA6IGZsYWdzPTgwNDkmbHQ7VVAsTE9PUEJBQ0ssUlVOTklORyxNVUxUSUNBU1Qm Z3Q7IG1ldHJpYyAwIG10dSAxNjM4NCAmIzEzOzxicj4KJmd0OyBvcHRpb25zPTY4MDAwMyZsdDtS WENTVU0sVFhDU1VNLExJTktTVEFURSxSWENTVU1fSVBWNixUWENTVU1fSVBWNiYjMTM7PGJyPgom Z3Q7IGluZXQ2IDo6MSBwcmVmaXhsZW4gMTI4IGluZXQ2IGZlODA6OjElbG8wIHByZWZpeGxlbiA2 NCBzY29wZWlkIDB4MiYjMTM7PGJyPgomZ3Q7IGluZXQgMTI3LjAuMC4xIG5ldG1hc2sgMHhmZjAw MDAwMCBncm91cHM6IGxvJiMxMzs8YnI+CiZndDsgbmQ2IG9wdGlvbnM9MjEmbHQ7UEVSRk9STU5V RCxBVVRPX0xJTktMT0NBTCYjMTM7PGJyPgomZ3Q7ICYjMTM7PGJyPgomZ3Q7IG5vIHRyYWZmaWMg ZnJvbSBndWVzdCB0byBob3N0LiZuYnNwOyBndWVzdCBjYW4ndCBnZXQgYSBkaGNwIHJlc3BvbnNl LiBwaW5nJiMxMzs8YnI+CiZndDsgc2F5cyBubyByb3V0ZSB0byBob3N0LiYjMTM7PGJyPgomZ3Q7 ICYjMTM7PGJyPgomZ3Q7IEkgdHJpZWQgZGhjbGllbnQgYnJpZGdlMCBvbiB0aGUgaG9zdCBhbmQg aXQgYXNzaWduZWQgYW4gaXAgYWR4IHRvJiMxMzs8YnI+CiZndDsgYnJpZGdlMCwgYnV0IGhhZCBu byByZWxpZWYgaW4gdGhlIGd1ZXN0LiYjMTM7PGJyPgomZ3Q7ICYjMTM7PGJyPgomZ3Q7IGkgYW0g bm90IGFibGUgdG8gZ2V0IGd1ZXN0IGFjY2VzcyB0byB0aGUgaG9zdC4mbmJzcDsgd2hhdCBjYW4g aSBkbz8mIzEzOzxicj4KJiMxMzs8YnI+CkkgZG9uJ3Qga25vdyBhbnl0aGluZyBhYm91dCB0aGUg dnRuZXQgZHJpdmVyIGZvciB2aXJ0dWFsIGhvc3RzLCYjMTM7PGJyPgpub3Igd2hldGhlciBvciBu b3Qgd2hhdCB5b3UncmUgcnVubmluZyBzaG91bGQgYXV0b21hdGljYWxseSBhc3NpZ24mIzEzOzxi cj4KdGhlIHZ0bmV0MCBkZXZpY2UgYW4gSVAgYWRkcmVzcy4mIzEzOzxicj4KJiMxMzs8YnI+Cklz IHRoZXJlIGEgZGhjcGQgKGRoY3Agc2VydmVyKSBydW5uaW5nIG9uIHRoZSBob3N0IHN5c3RlbT8m bmJzcDsgVGhhdCdzJiMxMzs8YnI+CndoZXJlIHRoZSBjbGllbnQgd2lsbCBnZXQgaXRzIElQIGFk ZHJlc3MgZnJvbS4mbmJzcDsgU2VlIG1hbiA4IGRoY3BkJiMxMzs8YnI+CmFuZCBtYW4gNSBkaGNw ZC5jb25mJiMxMzs8YnI+CiYjMTM7PGJyPgpUaGVyZSdzIG5vIHJvdXRlIChhbmQgcGluZyBkb2Vz bid0IHdvcmspIGJlY2F1c2UgdGhlcmUgaXMgbm8gYWRkcmVzcyYjMTM7PGJyPgphc3NpZ25lZCB0 byB0aGUgdnRuZXQwIGludGVyZmFjZSBvbiB0aGUgZ3Vlc3Qgc3lzdGVtLiYjMTM7PGJyPgomIzEz Ozxicj4KbmV0c3RhdCAtcm4mIzEzOzxicj4Kc2hvdWxkIHNob3cgeW91ciBleGlzdGluZyByb3V0 ZXMmIzEzOzxicj4KJiMxMzs8YnI+CiYjMTM7PGJyPgomIzEzOzxicj4KR2FyeSYjMTM7PGJyPgom IzEzOzxicj4KPC9wPgo8L2Jsb2NrcXVvdGU+PC9kaXY+PGJyPjwvZGl2Pg== From nobody Sat May 6 21:36:42 2023 X-Original-To: freebsd-questions@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 4QDLVJ4N8Rz499py for ; Sat, 6 May 2023 21:36:56 +0000 (UTC) (envelope-from tomek@cedro.info) Received: from mail-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDLVJ2ghHz49kG for ; Sat, 6 May 2023 21:36:56 +0000 (UTC) (envelope-from tomek@cedro.info) Authentication-Results: mx1.freebsd.org; none Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-55a010774a5so48355277b3.3 for ; Sat, 06 May 2023 14:36:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cedro.info; s=google; t=1683409015; x=1686001015; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=KWwTTIFHERwgjQA1Rifr1X0JGyjTyZ+mibgNAf8mub4=; b=hUvAhut4Eox2bKifPz4bYJ1f3RS0L6b0vpbghE/EDC38jOVmy7x/TC2Z5m+XYFW55r ik7ydJR8y0xTrt189WAiYZ4M+xJo1rrWyo6w756Zuqw8cvU3wNVbA80PLtdH0A2EeQmw zBQPp6Qer+vPEKwgXqaIHaEDOGhlfD40ToMP4kPOutBybjH8caK6e/KHmoeJT0dgZsXt 38X/fvq7+fn9q8M/MvEH0QVhtMuJz/sWnn4ZF6DvkncD/lhsD60+Pqxt1g9oSscxnVHN 6ctK0jEH3QXczJnlbFn3FwQKOsCKEACSrdEnmiT8AD01R+zBg0XnVe1wbUf7Q6IE10NX 97wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683409015; x=1686001015; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KWwTTIFHERwgjQA1Rifr1X0JGyjTyZ+mibgNAf8mub4=; b=YnlepSqZpNkkV8en0ubM0tBgNdWxVo4JAPLIoNFXt1Xz1cFtk+0kA+1HE3cHHctvbN KaCWX/sFTJVOBpkoGvhGep1HCNxMwCNNMaPAMZgN1CFuljvQJncj+k9OnUOS1eLVtGeA Nn7aOq80aQn0uLntVU7t0HHyt8ojSRjFl35/rLVgFvK7eku6c5LWliQOfiClfK2U1BQB hpcEW/c9e8lQ2GQ/PHHClrndqAaZFaQiaDLqNz4VlxAwteZYe2n/jSpNiMeCk26BuJ7U /ka4TMJFYkBydbH7ACIZ2Pa353XmA/A8LirqCfp1an3qQ2dgVl/xS3ZkabZyOIyvboyf xQ6w== X-Gm-Message-State: AC+VfDxwfZ8KDMfPgFylqK7XmDqMJv7hM/H3E0NyqY5Wlu/+krVXh9xp 0YRAMEXENH7Mwhwc+4YjZEdMZ9vBU4zr0irgufA= X-Google-Smtp-Source: ACHHUZ4Cq1x4bxq9JRO0UoPF0R7CnaglW9DrkutAcxryGojO/2gjk1FpnHlmTlytWT5f9GxBEZ9dHg== X-Received: by 2002:a81:a20f:0:b0:559:de8c:96b3 with SMTP id w15-20020a81a20f000000b00559de8c96b3mr6568603ywg.30.1683409015393; Sat, 06 May 2023 14:36:55 -0700 (PDT) Received: from mail-yb1-f171.google.com (mail-yb1-f171.google.com. [209.85.219.171]) by smtp.gmail.com with ESMTPSA id g138-20020a815290000000b0054629ed8300sm1383808ywb.80.2023.05.06.14.36.54 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 06 May 2023 14:36:54 -0700 (PDT) Received: by mail-yb1-f171.google.com with SMTP id 3f1490d57ef6-b9d8b2e1576so4187276276.2 for ; Sat, 06 May 2023 14:36:54 -0700 (PDT) X-Received: by 2002:a25:b307:0:b0:b96:ab2d:368f with SMTP id l7-20020a25b307000000b00b96ab2d368fmr5783162ybj.39.1683409014390; Sat, 06 May 2023 14:36:54 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: <85ca379a-830d-897a-c2ed-240c9aca687a@Gmail.com> In-Reply-To: <85ca379a-830d-897a-c2ed-240c9aca687a@Gmail.com> From: Tomek CEDRO Date: Sat, 6 May 2023 23:36:42 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: no traffic from guest to host. guest can't get a dhcp response. ping says no route to host. To: Steven Friedrich Cc: FreeBSD Questions Mailing List Content-Type: multipart/alternative; boundary="00000000000050890c05fb0d34ed" X-Rspamd-Queue-Id: 4QDLVJ2ghHz49kG X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --00000000000050890c05fb0d34ed Content-Type: text/plain; charset="UTF-8" sysctl net.link.bridge.ipfw=0 sysctl net.link.bridge.pfil_bridge=0 sysctl net.link.bridge.pfil_member=0 ? -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info --00000000000050890c05fb0d34ed Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
sysct= l net.link.bridge.ipfw=3D0
sysctl net.link= .bridge.pfil_bridge=3D0
sysctl net.link.br= idge.pfil_member=3D0

?

--00000000000050890c05fb0d34ed-- From nobody Sat May 6 22:01:21 2023 X-Original-To: freebsd-questions@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 4QDM2Z4cLwz49D9K for ; Sat, 6 May 2023 22:01:26 +0000 (UTC) (envelope-from yuri@aetern.org) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (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 4QDM2Y6tPBz4G8q for ; Sat, 6 May 2023 22:01:25 +0000 (UTC) (envelope-from yuri@aetern.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=aetern.org header.s=fm3 header.b=rAnMy3ZB; dkim=pass header.d=messagingengine.com header.s=fm3 header.b="L YTAeuW"; spf=pass (mx1.freebsd.org: domain of yuri@aetern.org designates 64.147.123.21 as permitted sender) smtp.mailfrom=yuri@aetern.org Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 12A5C32000D9 for ; Sat, 6 May 2023 18:01:24 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 06 May 2023 18:01:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aetern.org; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1683410483; x=1683496883; bh=X7xdkAdhCZexzuQX07sTu9rHO6v58PWmB3t FFycrheY=; b=rAnMy3ZBK9n1qsvY6vu+ngIHGwoxM5kuBWcvTxpbg+AwCK8f0q4 J6e9ONOeGHvJNPHb9tBAAOg6ixaZgpxg6Cyes3NteQGf5GSUKLuJuPgLkhPxIw19 3NhrW+a8H65VbX1g1qpAQ01SyaJy47D6FRFwjkrHHoLeJ+yLL8f4oSnxHibEkyM5 aRrW3ujRQPb7xetgNm528WIkoiocsHR++1GwnKP+yK996D5xSzytohuLh/UeljTb xynsrCVveXOXl9o6hPzTxS3Of5kkbJSUozc0ciabQqgdqlujSdGM+71ts3lIhpDe ap62MmfsRk4IxJP3eBOuYRUZzN9+C61NXsQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1683410483; x= 1683496883; bh=X7xdkAdhCZexzuQX07sTu9rHO6v58PWmB3tFFycrheY=; b=L YTAeuWzqiV8VlUYKIMlr8oc3Tog+9XzMUD6pi9MkONLFaKa+GF8wEwiKvEuuxUrp UQiSDQ6NHy6Afi1VJs/ounJBMxUzFY2k6E4RRG5HuP3bNcOtLUUZ/C2BtHTykiRz qmVBG2LEPrZ/mHUXt7Y/84BrUc1Aaocir+h8Kv2QVtMu62wh19XVcsV9bsv8dpZm 9yFxXD47PzWY96NPcbedO+3flcNvxV+Tv37+KjFb5wIaKg4clUyvpQ+MROjoePAs oHkxNNBu1Mfy38Y0TrvdDtemTZU+fMhSQo6v0xibFFh6OqoqQG8hbI+fmr8Em164 KS+714PaqsfTMQCGSFUAw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeefhedgtdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtje ertddtfeejnecuhfhrohhmpegjuhhrihcuoeihuhhrihesrggvthgvrhhnrdhorhhgqeen ucggtffrrghtthgvrhhnpeevvdegledtveekudfhjeeggeffteehueejlefhkeegffethe evveejfefhgffftdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpeihuhhrihesrggvthgvrhhnrdhorhhg X-ME-Proxy: Feedback-ID: i0d79475b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sat, 6 May 2023 18:01:22 -0400 (EDT) Message-ID: <0bee752e-0e01-1e51-e411-2995a3d6a318@aetern.org> Date: Sun, 7 May 2023 00:01:21 +0200 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: blackhole defaults Content-Language: en-US To: FreeBSD Mailing List References: <080af465-82c9-6347-473d-0235d6982278@dreamchaser.org> From: Yuri In-Reply-To: <080af465-82c9-6347-473d-0235d6982278@dreamchaser.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4QDM2Y6tPBz4G8q X-Spamd-Bar: / X-Spamd-Result: default: False [-0.40 / 15.00]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.21]; R_DKIM_ALLOW(-0.20)[aetern.org:s=fm3,messagingengine.com:s=fm3]; ASN(0.00)[asn:29838, ipnet:64.147.123.0/24, country:US]; DKIM_TRACE(0.00)[aetern.org:+,messagingengine.com:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; local_wl_from(0.00)[yuri@aetern.org] X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: local_wl_from X-ThisMailContainsUnwantedMimeParts: N Gary Aitken wrote: > I don't think I've specifically set any of these: > > $ sysctl net.inet | grep blackhole > net.inet.tcp.v6pmtud_blackhole_mss: 1220 > net.inet.tcp.pmtud_blackhole_mss: 1200 > net.inet.tcp.pmtud_blackhole_detection: 0 > net.inet.tcp.blackhole: 2 > net.inet.udp.blackhole: 1 > net.inet.sctp.blackhole: 0 > > Can someone explain to me the logic behind the last 3 (tcp,udp,sctp) > defaults, and why they aren't all at 2? blackhole(4) says it's disabled by default, and indeed all 3 are 0 on my system, so something might have set it for you after all? $ sysctl net.inet.tcp.blackhole net.inet.udp.blackhole net.inet.sctp.blackhole net.inet.tcp.blackhole: 0 net.inet.udp.blackhole: 0 net.inet.sctp.blackhole: 0