From owner-freebsd-questions@freebsd.org Wed Dec 23 19:53:55 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0CCCB4C9D9C for ; Wed, 23 Dec 2020 19:53:55 +0000 (UTC) (envelope-from 4250.82.1d4c7000152acb4.ef88b48c4465ebd9ffaab813488181c6@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 4D1P6B1Qg3z3vL3 for ; Wed, 23 Dec 2020 19:53:53 +0000 (UTC) (envelope-from 4250.82.1d4c7000152acb4.ef88b48c4465ebd9ffaab813488181c6@email-od.com) DKIM-Signature: v=1; a=rsa-sha256; d=email-od.com;i=@email-od.com;s=dkim; c=relaxed/relaxed; q=dns/txt; t=1608753234; x=1611345234; h=content-transfer-encoding:content-type:mime-version:references:in-reply-to:message-id:subject:to:from:date:x-thread-info; bh=/9KSUACG9AkfvNl5bououM4UT3/qjpjjfa1zX2S0+Jc=; b=VswWZTZcmM0IVupGJTRZFRF3U57m17GA2+pa9yX1pKER8rnojIn0UWMSHtGmCf6P3nlzNOAwM2DJSHOheh+cA+KoonUHOjXPgu/Tm0D9bnSgN0oaVKPCuHng7+SR7tyCCq44jKP0I3Ce2VIpHy62Tz/Jdy80L07KQ1t9yXBKwJ4= X-Thread-Info: NDI1MC45Mi4xZDRjNzAwMDE1MmFjYjQuZnJlZWJzZC1xdWVzdGlvbnM9ZnJlZWJzZC5vcmc= Received: from r1.us-east-2.aws.in.socketlabs.com (r1.us-east-2.aws.in.socketlabs.com [142.0.189.1]) by mxsg2.email-od.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Wed, 23 Dec 2020 14:53:48 -0500 Received: from smtp.lan.sohara.org (EMTPY [185.202.17.215]) by r1.us-east-2.aws.in.socketlabs.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Wed, 23 Dec 2020 14:53:47 -0500 Received: from [192.168.63.1] (helo=steve.lan.sohara.org) by smtp.lan.sohara.org with smtp (Exim 4.94 (FreeBSD)) (envelope-from ) id 1ksACg-000Pjp-1j for freebsd-questions@freebsd.org; Wed, 23 Dec 2020 19:53:46 +0000 Date: Wed, 23 Dec 2020 19:53:45 +0000 From: Steve O'Hara-Smith To: freebsd-questions@freebsd.org Subject: Re: Network namespaces in FreeBSD Message-Id: <20201223195345.7e68bc5827f5878d097864cb@sohara.org> In-Reply-To: References: <20201223182227.da6c11d3604eb07bb4f18ce5@sohara.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.1) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4D1P6B1Qg3z3vL3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=email-od.com header.s=dkim header.b=VswWZTZc; dmarc=none; spf=pass (mx1.freebsd.org: domain of 4250.82.1d4c7000152acb4.ef88b48c4465ebd9ffaab813488181c6@email-od.com designates 142.0.176.198 as permitted sender) smtp.mailfrom=4250.82.1d4c7000152acb4.ef88b48c4465ebd9ffaab813488181c6@email-od.com X-Spamd-Result: default: False [-2.70 / 15.00]; RWL_MAILSPIKE_GOOD(0.00)[142.0.176.198:from]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:142.0.176.0/20]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[email-od.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[steve@sohara.org,4250.82.1d4c7000152acb4.ef88b48c4465ebd9ffaab813488181c6@email-od.com]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:7381, ipnet:142.0.176.0/22, country:US]; MID_RHS_MATCH_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[steve@sohara.org,4250.82.1d4c7000152acb4.ef88b48c4465ebd9ffaab813488181c6@email-od.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[email-od.com:s=dkim]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[142.0.176.198:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sohara.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[142.0.176.198:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[142.0.176.198:from]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Dec 2020 19:53:55 -0000 On Wed, 23 Dec 2020 19:32:43 +0100 "Kristof Provost" wrote: > On 23 Dec 2020, at 19:22, Steve O'Hara-Smith wrote: > > On Wed, 23 Dec 2020 16:48:11 +0000 > > Ameya Deshpande via freebsd-questions > > wrote: > > > >> Hi, > >> > >> I am new to FreeBSD. I was wondering if there is concept like Network > >> Namespaces in FreeBSD, like it is in Linux? > > > > There is something similar see man setfib for details. > > > I’ve only briefly played with linux network namespaces, but aren’t > vnet jails much closer to that? My understanding was that network namespaces are primarily a way of managing multiple routing tables which is exactly what setfib is for, while setfib is mostly useful in conjunction with jails[1] it is not connected with jails in any way it is purely a network level thing which AIUI linux network namespaces are. Vnet jails are just jails with their own network stack, which achieves much the same results but only for jails. [1] Jails can be set to have a default fib - I use fibs this way to connect jails to VPNs for various purposes. -- Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun The computer obeys and wins. | licences available see You lose and Bill collects. | http://www.sohara.org/