Re: [ovs-discuss] Open vSwitch installation in userspace.

2010-08-04 Thread Hardeep Uppal
I was running in userspace to quickly get something up and running. Also I
didn't have the dom0 kernel code when I first started with Open vSwitch.
Hence when I ran ./configure
--with-l26=/lib/modules/2.6.26-2-xen-686/build i got an error saying that
the build directory was missing. I am going to take your suggestion and use
the kernel module. I downloaded the header for  2.6.26-2-xen-686, but I need
to figure out how to link it to the kernel and have a build folder.

Thanks

--Hardeep

On Wed, Aug 4, 2010 at 2:12 PM, Jesse Gross je...@nicira.com wrote:

 On Wed, Aug 4, 2010 at 1:32 PM, Hardeep Uppal hardeep...@gmail.comwrote:

 Hi Jesse,

 Thanks for your reply. I can see that OpenvSwicth created the bridge br0.
 But when I update my domU.cfg file to update the network bridge to br0 from
 eth0, domU does not boot and I get the following error

 $ sudo xm create domU.cfg
Using config file /etc/xen/domU.cfg.
Error: Device 0 (vif) could not be connected. Hotplug scripts not
 working.

 The bridge should be visible to Xen right? I can see the bridge when I run
 ifconfig.

 e...@ettm:~$ ifconfig
 br0   Link encap:Ethernet  HWaddr 00:25:64:49:d7:94
   inet addr:128.xxx.x.xx  Bcast:128.208.3.255  Mask:255.255.255.0
   inet6 addr: fe80::225:64ff:fe49:d794/64 Scope:Link
   UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
   RX packets:14330 errors:0 dropped:0 overruns:0 frame:0
   TX packets:1313 errors:0 dropped:0 overruns:0 carrier:0
   collisions:0 txqueuelen:500
   RX bytes:2297956 (2.2 MB)  TX bytes:463836 (463.8 KB)


 Do I need to do something else to make domU use br0 created by open
 vswicth?


 Xen is expecting to use the bridge tools to connect the virtual interface.
  Since Open vSwitch is not the bridge, you either need to modify the Xen
 scripts to use the Open vSwitch commands directly or use our bridge
 compatibility layer, which as I mentioned requires kernel support.  Is there
 a reason why you need to run in userspace?

___
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org


Re: [ovs-discuss] Open vSwitch installation in userspace.

2010-07-30 Thread Hardeep Uppal
Hi Jesse,

I followed the steps in INSTALL.usespace to create bridge br0 and there were
no error messages. How do I check if the bridge br0 is created? I tried
brctl show but i didn't see bridge br0.

I am running Xen3.3 with Debian kernel 2.6.26-2-xen-686 as dom0 and ubuntu
9.04 as domUs. I have a linux bridge eth0 which is bounded to interfaces
peth0 and vif1.0.

e...@ettm:~$ brctl show
bridge namebridge id STP enabledinterfaces
eth08000.00256449d794  no  peth0

vif1.0
pan08000. no

I want to create a bridge br0 using open vswitch with interfaces peth0 and
vif1.0 and replace the linux bridge eth0. I am not sure how to go about
doing that using open vswitch. I would appreciate any help I can get.

Thanks

Hardeep



On Fri, Jul 30, 2010 at 3:09 PM, Jesse Gross je...@nicira.com wrote:

 On Thu, Jul 29, 2010 at 1:36 PM, Hardeep Uppal hardeep...@gmail.comwrote:

 r...@ettm:/home/ettm/Desktop/openvswitch-1.0.1# ovs-vswitchd
 unix:/usr/local/var/run/openvswitch/db.sock
 Jul 29
 12:43:21|1|reconnect|INFO|unix:/usr/local/var/run/openvswitch/db.sock:
 connecting...
 Jul 29
 12:43:21|2|reconnect|INFO|unix:/usr/local/var/run/openvswitch/db.sock:
 connected
 Jul 29 12:43:21|3|dpif_linux|ERR|/proc/devices: openvswitch major not
 found (is the module loaded?)
 Jul 29 12:43:21|4|dpif|WARN|failed to enumerate system datapaths: No
 such device
 Jul 29 12:55:12|5|dpif_linux|ERR|/proc/devices: openvswitch major not
 found (is the module loaded?)
 Jul 29 12:55:12|6|dpif|WARN|failed to create datapath br0: No such
 device


 I am not sure what the error corresponds to. I would appreciate any help.


 The reason for these error messages is that by default Open vSwitch assumes
 that a kernel based datapath is being created, which it cannot do if the
 kernel module is not loaded.  If you look at the next line in the
 INSTALL.userspace directions you'll see:

 ovs-vsctl set bridge br0 datapath_type=netdev

 The netdev datapath type corresponds to userspace, so the errors should
 go away once you give it that command.  Since the kernel module is our
 primary datapath you may see a few additional error messages about not being
 able to contact it but you can safely ignore those.

___
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org


Re: [ovs-discuss] Open vSwitch installation in userspace.

2010-07-30 Thread Jesse Gross
On Fri, Jul 30, 2010 at 4:47 PM, Hardeep Uppal hardeep...@gmail.com wrote:

 Hi Jesse,

 I followed the steps in INSTALL.usespace to create bridge br0 and there
 were no error messages. How do I check if the bridge br0 is created? I tried
 brctl show but i didn't see bridge br0.

 I am running Xen3.3 with Debian kernel 2.6.26-2-xen-686 as dom0 and ubuntu
 9.04 as domUs. I have a linux bridge eth0 which is bounded to interfaces
 peth0 and vif1.0.

 e...@ettm:~$ brctl show
 bridge namebridge id STP enabledinterfaces
 eth08000.00256449d794  no  peth0

 vif1.0
 pan08000. no

 I want to create a bridge br0 using open vswitch with interfaces peth0 and
 vif1.0 and replace the linux bridge eth0. I am not sure how to go about
 doing that using open vswitch. I would appreciate any help I can get.


brctl is part of the Linux bridging tools, which are not the preferred
method of interacting with Open vSwitch.  We do have a compatibility layer
but it requires kernel support.

A simple way to see if a bridge was created is check if the bridge interface
exists.  In this case ifconfig br0 should show an interface.  You can also
see the list of bridges using ovs-vsctl list-br.
___
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org


Re: [ovs-discuss] Open vSwitch installation in userspace.

2010-07-29 Thread 陈文龙
Have you loaded the openvswitch_mod module?

2010/7/30 Hardeep Uppal hardeep...@gmail.com

 Hi,

 I am new to Open vSwitch and had a few question about open vswitch setup in
 userspace in dom0 (2.6.26-2-xen-686). I followed steps 1 to 5 from
 INSTALL.Linux to compile and install open vswitch.

 % ./configure
 % make
 % su
 % make install

 I then initialize the configuration database using ovsdb-tools as
 instructed on step 7.
  % ovsdb-tool create /usr/local/etc/ovs-vswitchd.conf.db
 vswitchd/vswitch.ovsschema

 I made sure that directory /sys/class/misc/tun and /dev/net/tun exist. All
 this looked like it worked fine until I tried to initialize the database and
 started open vswitch daemon. I got the following error when I tried to setup
 a bridge using the command ovs-vsctl add-br br0.

 r...@ettm:/home/ettm/Desktop/openvswitch-1.0.1# ovsdb-tool create
 /usr/local/etc/ovs-vswitchd.conf.db vswitchd/vswitch.ovsschema
 r...@ettm:/home/ettm/Desktop/openvswitch-1.0.1#  ovsdb-server
 /usr/local/etc/ovs-vswitchd.conf.db
 --remote=punix:/usr/local/var/run/openvswitch/db.sock
 Jul 29 12:42:33|1|reconnect|INFO|unix:/tmp/stream-unix.8222.0:
 connecting...
 Jul 29 12:42:33|2|reconnect|INFO|unix:/tmp/stream-unix.8222.0:
 connected
 Jul 29 12:42:39|3|jsonrpc|INFO|unix:/tmp/stream-unix.8222.0: connection
 closed
 Jul 29 12:42:39|4|reconnect|INFO|unix:/tmp/stream-unix.8222.0:
 connection dropped
 Jul 29 12:43:21|5|reconnect|INFO|unix:/tmp/stream-unix.8251.0:
 connecting...
 Jul 29 12:43:21|6|reconnect|INFO|unix:/tmp/stream-unix.8251.0:
 connected
 Jul 29 12:55:12|7|reconnect|INFO|unix:/tmp/stream-unix.10566.0:
 connecting...
 Jul 29 12:55:12|8|reconnect|INFO|unix:/tmp/stream-unix.10566.0:
 connected
 Jul 29 12:55:12|9|jsonrpc|INFO|unix:/tmp/stream-unix.10566.0:
 connection closed
 Jul 29 12:55:12|00010|reconnect|INFO|unix:/tmp/stream-unix.10566.0:
 connection dropped

 r...@ettm:/home/ettm/Desktop/openvswitch-1.0.1# ovs-vsctl init
 Alarm clock
 r...@ettm:/home/ettm/Desktop/openvswitch-1.0.1# ovs-vswitchd
 unix:/usr/local/var/run/openvswitch/db.sock
 Jul 29
 12:43:21|1|reconnect|INFO|unix:/usr/local/var/run/openvswitch/db.sock:
 connecting...
 Jul 29
 12:43:21|2|reconnect|INFO|unix:/usr/local/var/run/openvswitch/db.sock:
 connected
 Jul 29 12:43:21|3|dpif_linux|ERR|/proc/devices: openvswitch major not
 found (is the module loaded?)
 Jul 29 12:43:21|4|dpif|WARN|failed to enumerate system datapaths: No
 such device
 Jul 29 12:55:12|5|dpif_linux|ERR|/proc/devices: openvswitch major not
 found (is the module loaded?)
 Jul 29 12:55:12|6|dpif|WARN|failed to create datapath br0: No such
 device


 I am not sure what the error corresponds to. I would appreciate any help.

 Thanks,

 Hardeep



 ___
 discuss mailing list
 discuss@openvswitch.org
 http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org


___
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org