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