From owner-freebsd-virtualization@FreeBSD.ORG Thu Apr 2 17:00:47 2009 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F21FD10656C8 for ; Thu, 2 Apr 2009 17:00:47 +0000 (UTC) (envelope-from subbsd@gmail.com) Received: from nmail.nevosoft.ru (nmail.nevosoft.ru [78.108.89.51]) by mx1.freebsd.org (Postfix) with ESMTP id 9BC138FC08 for ; Thu, 2 Apr 2009 17:00:47 +0000 (UTC) (envelope-from subbsd@gmail.com) Received: by nmail.nevosoft.ru (Postfix, from userid 58) id 60AAA63EC12; Thu, 2 Apr 2009 20:43:58 +0400 (MSD) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on nmail.nevosoft.ru X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from localhost.invalid (95-28-0-190.broadband.corbina.ru [95.28.0.190]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by nmail.nevosoft.ru (Postfix) with ESMTPSA id 87B7D63EC0D for ; Thu, 2 Apr 2009 20:43:54 +0400 (MSD) From: subbsd To: freebsd-virtualization@freebsd.org Date: Thu, 2 Apr 2009 20:43:57 +0400 User-Agent: KMail/1.11.1 (FreeBSD/8.0-CURRENT; KDE/4.2.1; amd64; ; ) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904022043.57984.subbsd@gmail.com> Subject: how to move physical interface into multiple vimage interfaces X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: subbsd@gmail.com List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2009 17:00:48 -0000 Hello maillist i fetch and apply latest http://imunes.tel.fer.hr/virtnet/vimage-20081015.tgz patches for 7.2 i386 for testing vimage. All according man page work done. Small bug: vimage -i with 1 arguments make core dumped: # vimage -i onearg Segmentation fault (core dumped) and bridge cannot worked: kldload if_bridge.ko link_elf: symbol ifnet undefined KLD if_bridge.ko: depends on bridgestp - not available And i've want asking: may i using 1 physical or vlan interface as parent for multiple vimage interfaces? something like vimage -c sw1 vimage -c sw2 vimage -c sw3 vimage -i sw1,sw2,sw3 em0 Thanks for information From owner-freebsd-virtualization@FreeBSD.ORG Thu Apr 2 17:53:21 2009 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B30C1106567A for ; Thu, 2 Apr 2009 17:53:21 +0000 (UTC) (envelope-from zec@icir.org) Received: from labs4.cc.fer.hr (labs4.cc.fer.hr [161.53.72.24]) by mx1.freebsd.org (Postfix) with ESMTP id 2CD288FC14 for ; Thu, 2 Apr 2009 17:53:20 +0000 (UTC) (envelope-from zec@icir.org) Received: from sluga.fer.hr (sluga.cc.fer.hr [161.53.72.14]) by labs4.cc.fer.hr (8.14.2/8.14.2) with ESMTP id n32Ha8Ds006567 for ; Thu, 2 Apr 2009 19:36:14 +0200 (CEST) Received: from [192.168.200.110] ([161.53.19.79]) by sluga.fer.hr with Microsoft SMTPSVC(6.0.3790.3959); Thu, 2 Apr 2009 19:35:43 +0200 From: Marko Zec To: freebsd-virtualization@freebsd.org, subbsd@gmail.com Date: Thu, 2 Apr 2009 19:35:25 +0200 User-Agent: KMail/1.9.10 References: <200904022043.57984.subbsd@gmail.com> In-Reply-To: <200904022043.57984.subbsd@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904021935.25688.zec@icir.org> X-OriginalArrivalTime: 02 Apr 2009 17:35:43.0679 (UTC) FILETIME=[7304DCF0:01C9B3B9] X-Scanned-By: MIMEDefang 2.64 on 161.53.72.24 Cc: Subject: Re: how to move physical interface into multiple vimage interfaces X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 02 Apr 2009 17:53:22 -0000 On Thursday 02 April 2009 18:43:57 subbsd wrote: > Hello maillist > > i fetch and apply latest > http://imunes.tel.fer.hr/virtnet/vimage-20081015.tgz patches for 7.2 > i386 for testing vimage. Hi, if you're running 7.2-PRERELASE or similar you'll probably have more luck trying out the latest sys tarball tracking 7-stable: http://imunes.tel.fer.hr/virtnet/vimage_7_20090401.tgz > All according man page work done. > Small bug: vimage -i with 1 arguments make core dumped: > > # vimage -i onearg > Segmentation fault (core dumped) You're right, this needs to be fixed... > and bridge cannot worked: > kldload if_bridge.ko > link_elf: symbol ifnet undefined > KLD if_bridge.ko: depends on bridgestp - not available if_bridge is not virtualized yet, so as an alternative, I'd suggest you try out netgraph bridging which works quite well vith virtual stacks. There's a tutorial describing how to use netgraph with vimages - pls. take a look at this: http://imunes.tel.fer.hr/virtnet/eurobsdcon07_tutorial.pdf > And i've want asking: > may i using 1 physical or vlan interface as parent for multiple > vimage interfaces? something like > vimage -c sw1 > vimage -c sw2 > vimage -c sw3 > > vimage -i sw1,sw2,sw3 em0 No it won't work that way - a single interface (physical, vlan, whatever) can be assigned to only one vimage at a time. So to make multiple vimages visible via a single physical card you should create virtual interfaces for vimages and bridge them to the physical one. Here's an example: tpx32# vimage -c sw1 tpx32# vimage -c sw2 tpx32# vimage -c sw3 tpx32# ngctl mkpeer eiface ether ether tpx32# ngctl mkpeer eiface ether ether tpx32# ngctl mkpeer eiface ether ether tpx32# kldload ng_ether tpx32# ngctl mkpeer em0: bridge lower link0 tpx32# ngctl name em0:lower b0 tpx32# ngctl connect em0: b0: upper link9 tpx32# ngctl connect ngeth0: b0: ether link1 tpx32# ngctl connect ngeth1: b0: ether link2 tpx32# ngctl connect ngeth2: b0: ether link3 tpx32# vimage -i sw1 ngeth0 eth0@sw1 tpx32# vimage -i sw2 ngeth1 eth0@sw2 tpx32# vimage -i sw3 ngeth2 eth0@sw3 tpx32# tpx32# ifconfig em0: flags=8843 metric 0 mtu 1500 options=9b ether 00:16:41:15:4d:3e inet6 fe80::216:41ff:fe15:4d3e%em0 prefixlen 64 scopeid 0x3 inet6 a:2::51 prefixlen 64 inet 192.168.200.110 netmask 0xffffff00 broadcast 192.168.200.255 media: Ethernet autoselect (100baseTX ) status: active lo0: flags=8049 metric 0 mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet 127.0.0.1 netmask 0xff000000 tpx32# ping 192.168.200.1 PING 192.168.200.1 (192.168.200.1): 56 data bytes 64 bytes from 192.168.200.1: icmp_seq=0 ttl=255 time=4.668 ms 64 bytes from 192.168.200.1: icmp_seq=1 ttl=255 time=2.625 ms ^C --- 192.168.200.1 ping statistics --- 2 packets transmitted, 2 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 2.625/3.647/4.668/1.022 ms tpx32# ifconfig em0 promisc tpx32# vimage sw1 Switched to vimage sw1 # ifconfig lo0: flags=8008 metric 0 mtu 16384 eth0: flags=8802 metric 0 mtu 1500 ether 00:00:00:00:00:00 # ifconfig lo0 localhost # ifconfig eth0 link 42:1:2:3:4:1 # dhclient eth0 DHCPREQUEST on eth0 to 255.255.255.255 port 67 DHCPNAK from 192.168.200.31 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8 DHCPOFFER from 192.168.200.31 DHCPOFFER from 192.168.200.32 DHCPREQUEST on eth0 to 255.255.255.255 port 67 DHCPACK from 192.168.200.31 bound to 192.168.200.112 -- renewal in 1800 seconds. # ifconfig lo0: flags=8049 metric 0 mtu 16384 inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 eth0: flags=8843 metric 0 mtu 1500 ether 42:01:02:03:04:01 inet6 fe80::d41d:8cd9:8f00:b204%eth0 prefixlen 64 scopeid 0x2 inet 192.168.200.112 netmask 0xffffff00 broadcast 192.168.200.255 # ping 192.168.200.1 PING 192.168.200.1 (192.168.200.1): 56 data bytes 64 bytes from 192.168.200.1: icmp_seq=0 ttl=255 time=4.833 ms 64 bytes from 192.168.200.1: icmp_seq=1 ttl=255 time=2.619 ms 64 bytes from 192.168.200.1: icmp_seq=2 ttl=255 time=2.544 ms ^C --- 192.168.200.1 ping statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 2.544/3.332/4.833/1.062 ms # From owner-freebsd-virtualization@FreeBSD.ORG Thu Apr 2 17:55:41 2009 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B12C1065706 for ; Thu, 2 Apr 2009 17:55:41 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outX.internet-mail-service.net (outx.internet-mail-service.net [216.240.47.247]) by mx1.freebsd.org (Postfix) with ESMTP id 5A4BE8FC13 for ; Thu, 2 Apr 2009 17:55:41 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id A25C14082F; Thu, 2 Apr 2009 10:42:49 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 159D52D6013; Thu, 2 Apr 2009 10:42:46 -0700 (PDT) Message-ID: <49D4F932.3060704@elischer.org> Date: Thu, 02 Apr 2009 10:43:14 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: subbsd@gmail.com References: <200904022043.57984.subbsd@gmail.com> In-Reply-To: <200904022043.57984.subbsd@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-virtualization@freebsd.org Subject: Re: how to move physical interface into multiple vimage interfaces X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 02 Apr 2009 17:55:46 -0000 subbsd wrote: > Hello maillist > > i fetch and apply latest http://imunes.tel.fer.hr/virtnet/vimage-20081015.tgz > patches for 7.2 i386 for testing vimage. > > All according man page work done. > Small bug: vimage -i with 1 arguments make core dumped: > > # vimage -i onearg > Segmentation fault (core dumped) > > and bridge cannot worked: > kldload if_bridge.ko > link_elf: symbol ifnet undefined > KLD if_bridge.ko: depends on bridgestp - not available thankyou. will inverstigate. BTW most work on vimage is happening in -currrent so it may taek time to fix this.. > > > And i've want asking: > may i using 1 physical or vlan interface as parent for multiple vimage > interfaces? something like > vimage -c sw1 > vimage -c sw2 > vimage -c sw3 > > vimage -i sw1,sw2,sw3 em0 no an interface can only be in one vimage at a time. Marko uses the netgraph bridge node (ng_bridge) and netgraph ng_eiface nodes to 'bridge' a single interface to many virtual interfaces, and then puts different virtual interfaces in each vimage. Hopefully he can provide you with more detailed information on how he does this. > > Thanks for information > > > > > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@freebsd.org"