From nobody Thu Nov 17 00:06:20 2022 X-Original-To: pf@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 4NCKvk3fwxz4hVHV for ; Thu, 17 Nov 2022 00:06:26 +0000 (UTC) (envelope-from meka@tilda.center) Received: from c3po.tilda.center (c3po.tilda.center [108.61.164.129]) (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 4NCKvj01D0z4K5L for ; Thu, 17 Nov 2022 00:06:24 +0000 (UTC) (envelope-from meka@tilda.center) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=tilda.center header.s=c3po header.b=JUsMB8Hq; spf=pass (mx1.freebsd.org: domain of meka@tilda.center designates 108.61.164.129 as permitted sender) smtp.mailfrom=meka@tilda.center; dmarc=pass (policy=reject) header.from=tilda.center Received: from tilda.center (109-93-255-137.static.isp.telekom.rs [109.93.255.137]) by c3po.tilda.center (Postfix) with ESMTPSA id D3E6E1EE25 for ; Thu, 17 Nov 2022 01:06:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tilda.center; s=c3po; t=1668643574; 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=bVYlSLWl75K1nk/CU84Oh4pmIgnxUTB2QzZ1fSRG02Q=; b=JUsMB8Hqsuby3R5lmUvWv4xjbRhM0z1hS0WAUXtvVJs2FcuYYUlqmTIXKRm2N/oj1o775w qdqLt20eSZqWs/vAKojvKZWXhNL/08SFQ8hXf9OdwTk9UVjCSfZCJh9ZqzvZPJxkLH8QbQ Tl0Sr5lSetd+xpcvl4aCZiUPXrAcWAE= Date: Thu, 17 Nov 2022 01:06:20 +0100 From: Goran =?utf-8?B?TWVracSH?= To: pf@freebsd.org Subject: Re: How to use dummynet Message-ID: <20221117000620.susp2ii55zg6363w@tilda.center> References: <20221116183324.anduvhfex5ctdfb6@tilda.center> List-Id: Technical discussion and general questions about packet filter (pf) List-Archive: https://lists.freebsd.org/archives/freebsd-pf List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pf@freebsd.org X-BeenThere: freebsd-pf@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qfasrxwzpxbvgwuv" Content-Disposition: inline In-Reply-To: <20221116183324.anduvhfex5ctdfb6@tilda.center> X-Spamd-Result: default: False [-5.34 / 15.00]; SIGNED_PGP(-2.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.96)[-0.958]; R_MIXED_CHARSET(0.71)[subject]; DMARC_POLICY_ALLOW(-0.50)[tilda.center,reject]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_SPF_ALLOW(-0.20)[+mx]; R_DKIM_ALLOW(-0.20)[tilda.center:s=c3po]; ASN(0.00)[asn:20473, ipnet:108.61.164.0/22, country:US]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[pf@freebsd.org]; MIME_TRACE(0.00)[0:+,1:+,2:~]; DKIM_TRACE(0.00)[tilda.center:+]; RCVD_VIA_SMTP_AUTH(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)[pf@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4NCKvj01D0z4K5L X-Spamd-Bar: ----- X-ThisMailContainsUnwantedMimeParts: N --qfasrxwzpxbvgwuv Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 16, 2022 at 07:33:24PM +0100, Goran Meki=C4=87 wrote: > Hello! >=20 > I know PF now supports dummynet in 14-CURRENT, but I couldn't find the > syntax for it and general doc on how to use it. I could probably figure > out some bits and pieces from the code but if there is anything written, > I would be glad if someone could point it out. >=20 > Regards, > meka Hello, To answer my own question, there are two parts, one configured in pf.conf, = the other configured through dnctl. # dnctl pipe 1 config bw 300KByte/s In /etc/pf.conf: pass in quick inet from to any dnpipe 1 I used "scp -4" for the test. One more useful command is # dnctl pipe show I wonder if VNET works, but I'll research that on other occasion. I figured out this much from tests for PF, so I'm not sure that's all there is to dummynet. Regards, meka --qfasrxwzpxbvgwuv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE1WIFkXy2ZeMKjjKEWj1TknovrLYFAmN1evgACgkQWj1Tknov rLbYfRAAlzasbSZbl6Mwdw7DNiiIxoLBWiobFy7vMutML+EmEwiD4pOq2+ryoHhx ryAVptPkM+k5DhJ7wGq8vnw5JlSLzQFNn3XYoq9f6QEENesqzINmVGDyDvDfeTIQ lVeKegikMUCLjbQmRk4CIgoad2H6Z0k6wYJXMMPRKoKxgp2bEcDh7K6oC366VU8W 5EhdbQZxesQDnAZCtmSsBnAnlqdqbO3+uGYKGUQuotGkapyFaCDthLBdt71JVfCn eVlHhu4sq4Dh/fDS4qXi0hoAnVw9BU99WQAt4KDS7a3kI9Lr37nGusCFnQSsvRHH RKmrEx1C1f4/Dc4T43jcs/97SB6i+w4me/jZA3+BaScmmi6x9eAo8lQN+wgjKhrE foEINgR3s91006M/54He0Uee5ety2As8IIEYGc1OvnLSOEaBP0mnIn4RvUYg4GBm rooCqKRXpvOZF1h1Nvapg8nHREvTJjgyD04evhMc4p2XSGdetdYim6ehfzBCtF3Q HxHWH0JpEetH9VSIYPpwle4AOLTj5dt2ZocBOmB4Go23QSId2HRc5JlcdKGuL3eq d60CT8p6bdJR6NEwRI+0s2Thp+ZsEANis8KHPN35EDs78uDmxw0SDQnArCtJuGK4 EEsaup+Uf5vIhoGUGPnpKAy8edXchkUCiB3H3eoXXtJt1DTIWnU= =L5f7 -----END PGP SIGNATURE----- --qfasrxwzpxbvgwuv--