From owner-freebsd-virtualization@freebsd.org Wed Apr 25 20:34:07 2018 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB82AFAF852 for ; Wed, 25 Apr 2018 20:34:06 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EA868267D for ; Wed, 25 Apr 2018 20:34:05 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w3PKXvOp097828; Wed, 25 Apr 2018 13:33:57 -0700 (PDT) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w3PKXv8M097827; Wed, 25 Apr 2018 13:33:57 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201804252033.w3PKXv8M097827@pdx.rh.CN85.dnsmgr.net> Subject: Re: bhyve networking In-Reply-To: To: Paul Esson Date: Wed, 25 Apr 2018 13:33:57 -0700 (PDT) CC: Harry Schmalzbauer , "freebsd-virtualization@freebsd.org" X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2018 20:34:07 -0000 [ Charset windows-1252 unsupported, converting... ] > Hi Harry, > I?m simply using the ?vm? utility as in > > vm switch create public > vm switch add public igb1 > > That must make underlying calls to if config or equivalent as the bridge and tap interfaces are created automatically. > > The vm template file has these relevant parameters > > network0_type=?virtio-net? > network0_switch=?public? > > I?ve done nothing to the igb1 interface other than connect it to a physical switch on the appropriate VLAN. How have you configured your vtnet devices inside the guest? If your pass a "trunked" ethernet device to a guest the guest is going to need to run vlan decapuslation. I do this here, and it works fine. vtnet0: flags=8943 metric 0 mtu 1500 options=80028 ether 58:9c:fc:0e:8b:ec nd6 options=29 media: Ethernet 10Gbase-T status: active lo0: flags=8049 metric 0 mtu 16384 options=600003 inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 nd6 options=21 groups: lo vlan48: flags=8843 metric 0 mtu 1500 ether 58:9c:fc:0e:8b:ec inet 192.168.48.38 netmask 0xffffff00 broadcast 192.168.48.255 nd6 options=29 media: Ethernet 10Gbase-T status: active vlan: 48 vlanpcp: 0 parent interface: vtnet0 groups: vlan ... > > Bez?glich Paul Esson's Nachricht vom 25.04.2018 20:44 (localtime): > > Hi Folks, > > > > I'm struggling with networking when using vm-bhyve on FreeBSD 11.1-RELEASE. I have two NICs and have configured the first (igb0) on a management network and want to use the second (igb1) for VMs. However, I can't get any VM to communicate through the virtual switch if I have igb1 added to it. If I take the NIC out of the switch and configure an ipv4 address on it I can reach other hosts on the relevant subnet so I believe the poet set-up is valid. If I replace igb1 in the switch with igb0, I can then configure VMs on my management network and they have network connectivity. Can I only use > > Hello, > > a example of the command you used was nice. > I guess you're using if_bridge(4) ? the example would clarify. > But there's ng_bridge(4) and vale(4) also, and others are using > OpenVSwitch... > > > an interface that has an IP address configured at the host level before adding it to the switch? I've used other > > No. > But the interface has to be in promisc mode. And some offloading > functions must be disabled, but in case of if_bridge(4), it's done > automagically (and reverted if you remove the interface again). > > Hth, > > -harry > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@freebsd.org" > > -- Rod Grimes rgrimes@freebsd.org