您的位置:首页 > 运维架构

OVS+openflow+KVM

2014-10-24 17:46 381 查看
1 安装OVS

#这里安装mininet,因为mininet里面集成了新版本ovs和controller(目前版本是2.0.1)

 sudo apt-get install mininet 

2 安装KVM


略(网上资料很多自己查看)

3配置OVS


#create new OVS instance "br0"

sudo ovs-vsctl add-br br0

#add physical port to swtich

sudo ovs-vsctl add-port br0 eth3 eth5

#add  controller cluster to ovs

sudo ovs-vsctl set-controller br0 tcp:10.1.1.1:6633 tcp:20.1.1.1:6633

#add internal port "br1" to swtich
sudo ovs-vsctl add-port br0 br1

sudo ovs-vsctl set interface br1 type=internal

3.1 check interface

spark@ubuntu:/etc/libvirt/qemu$ ifconfig
br1       Link encap:Ethernet  HWaddr 52:54:00:1d:ee:1a  

          inet6 addr: fe80::eceb:dfff:fe64:30e5/64 Scope:Link

          UP BROADCAST RUNNING  MTU:1500  Metric:1

          RX packets:3359 errors:0 dropped:788 overruns:0 frame:0

          TX packets:2681 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:167390 (167.3 KB)  TX bytes:124898 (124.8 KB)

3.2 check OVS config


spark@ubuntu:/etc/libvirt/qemu$ sudo ovs-vsctl show

7c8a6cb6-1fc0-4a0a-b3ae-65bd187856be

    Bridge "test2"

        Controller "tcp:10.1.1.1:6633"

        Controller "tcp:20.1.1.2:6633"

            is_connected: true

        Port "eth5"

            Interface "eth5"

        Port "eth3"

            Interface "eth3"

        Port "test2"

            Interface "test2"

                type: internal

        Port "br1"

            Interface "br1"

                type: internal

    ovs_version: "2.0.2"

spark@ubuntu:/etc/libvirt/qemu$ 

4 配置 VM



Note :

"Source device" select "br1" was created by OVS

 if you  used Openflow for forwarding ,pls config VNIC as following

Device model select "virtio"

Source mode select "Passthrough"

 if you don't used Openflow ,just used OVS as bridge for forwarding ,pls config VNIC as following

Device model select "virtio"

Source mode select ""Bridge""

new VM (格式:选择最后一个),选择文件,mem 4G,选择custom before

Disk 1,选择Disk bus为virtio,Storage format选择qcos2
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  openflow kvm ubuntu OVS