Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 06 May 2023 12:32:44 +0200
From:      Markus Graf <markus.graf@markusgraf.net>
To:        Steven Friedrich <freebsdlouisville@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Can't figure out getting network into bhyve instance.
Message-ID:  <86zg6h68yg.fsf@beasty.markusgraf.net>
In-Reply-To: <e002e7a5-746b-b44f-345e-287ab6a1373e@gmail.com>
References:  <8d3a09fe-e69f-2c0e-8cc8-ca87ccfcfa42@gmail.com> <CAFYkXjna8ytEfdqx-GAc6qThar04JC%2BYCMNGZMnK=Y0GSbQrrg@mail.gmail.com> <e002e7a5-746b-b44f-345e-287ab6a1373e@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Steven Friedrich <freebsdlouisville@gmail.com> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>=20
> metric 0 mtu 1500=20
>        options=3D80028<VLAN_MTU,JUMBO_MTU,LINKSTATE>=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 <full-duplex>)=20
>        status: active=20
>        nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>=20
> lo0: flags=3D8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu=20
> 16384=20
>        options=3D680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>=
=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<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=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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86zg6h68yg.fsf>