OVS平台

当前访客身份:游客 [
记录工作点滴 学以致用 linux python cloudstack openstack
:引用来自“空港”的评论咋还是不行呢ls -lh /usr...
:咋还是不行呢
:引用来自“wyvern”的评论你好,有个问题一直没解...
:引用来自“wyvern”的评论 你好,有个问题一直没...
:引用来自“wyvern”的评论你好,有个问题一直没解...
:你好,有个问题一直没解决,希望指点一下。 我的...
:python的好处是可以跨平台 win下也可以使用...
:系统一般都自带了curl命令(wget不自带)。支持各...
:用一个shell命令:curl ifconfig.me即可得到公网...
:引用来自“像枫一样凋落”的评论亲,可以教一下我...
今日访问:115
昨日访问:107
本周访问:412
本月访问:1607
所有访问:23951
openvswitch centos6.X 安装及使用
发表于1年前( 22:25)&&
阅读(2189)&|&评论()
0人收藏此文章,
openvswitch 虚拟交换机 centos6.x 编译安装及简单vlan配置
一、搭建编译环境
&安装编译环境
#yum&install&gcc&make&python-devel&openssl-devel&kernel-devel&graphviz&\
&&&&&&&kernel-debug-devel&autoconf&automake&rpm-build&redhat-rpm-config&\
&&&&&&&libtool
& 编译rpm建议使用普通用户
& 下载创建编译目录脚本
$wget&/pub/local/COLUG//RPM-build-tree.txt
& 执行脚本
$sh&RPM-build-tree.txt
&将会在当前用户家目录创建如下目录
├──&BUILD
├──&BUILDROOT
├──&RPMS
├──&SOURCES
├──&SPECS
└──&SRPMS
二、编译&openvswitch&rpm包
##切换至家目录
##下载openvswitch源码包
$wget&http://openvswitch.org/releases/openvswitch-2.3.1.tar.gz&
$cp&openvswitch-2.3.1.tar.gz&rpmbuild/SOURCES/
$tar&xvf&openvswitch-2.3.1.tar.gz
$cd&openvswitch-2.3.1
##编译内核
$cp&rhel/openvswitch-kmod.files&~/rpmbuild/SOURCES/
$rpmbuild&-bb&rhel/openvswitch-kmod-rhel6.spec
##编译openvswitch&rpm
$rpmbuild&-bb&rhel/openvswitch.spec
编译完成后rpm包位于
ll&~/rpmbuild/RPMS/x86_64/
total&11440
-rw-rw-r--.&1&firxiao&firxiao&1223288&Dec&17&05:50&kmod-openvswitch-2.3.1-1.el6.x86_64.rpm
-rw-rw-r--.&1&firxiao&firxiao&2640440&Dec&17&06:01&openvswitch-2.3.1-1.x86_64.rpm
-rw-rw-r--.&1&firxiao&firxiao&7846548&Dec&17&06:01&openvswitch-debuginfo-2.3.1-1.x86_64.rpm
& 将openvswitch-2.3.1-1.x86_64.rpm &kmod-openvswitch-2.3.1-1.el6.x86_64.rpm 上传至vm1、vm2
& 使用yum安装
#yum&install&openvswitch-2.3.1-1.x86_64.rpm&&kmod-openvswitch-2.3.1-1.el6.x86_64.rpm
& 启动服务
#/etc/init.d/openvswitch&start
三、配置及使用
vm1&&&&&&&&&&&&&&&&&&&vm2&&&&&&&&&&&&&&&&&&&&&&&&&&&vm1&and&vm2&创建桥接网卡ovsbridge0&
----&&&&&&&&&&&&&&&&&&----&&&&&&&&&&&&&&&&&&&&&&&&&&基于ovsbridge0创建vlan100网卡。
eth0&&&&&&&&&&&&&&&&&&ech0
--------------&&&&&&&&-------------
ovsbridge0&&&&&&&&&&&&ovsbridge0&&&
172.16.0.20/24&&&&&&&&172.16.0.21/24
--------------&&&&&&&&--------------
&&vlan100&&&&&&&&&&&&&&&vlan100
&&192.168.100.2/24&&&&&&192.168.100.3/24&
&&----------------&&&&&&----------------
将配置文件放于/etc/sysconfig/network-scripts
& vm1网卡配置信息
[root@vm1&network-scripts]#&cat&ifcfg-eth0&
DEVICE=eth0
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSPort
OVS_BRIDGE=ovsbridge0
BOOTPROTO=none
HOTPLUG=no
[root@vm1&network-scripts]#&cat&ifcfg-ovsbridge0&
DEVICE=ovsbridge0
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=static
IPADDR=172.16.0.20
NETMASK=255.255.255.0
HOTPLUG=no
[root@vm1&network-scripts]#&cat&ifcfg-vlan100&&&&
DEVICE=vlan100
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSIntPort
BOOTPROTO=static
IPADDR=192.168.100.2
NETMASK=255.255.255.0
OVS_BRIDGE=ovsbridge0
OVS_OPTIONS="tag=100"
OVS_EXTRA="set&Interface&$DEVICE&external-ids:iface-id=$(hostname&-s)-$DEVICE-vif"
HOTPLUG=no
[root@vm1&~]#&ovs-vsctl&show&&&&&
fedbda2f-2516-4aff-b89f-cac
&&&&Bridge&"ovsbridge0"
&&&&&&&&Port&"vlan100"
&&&&&&&&&&&&tag:&100
&&&&&&&&&&&&Interface&"vlan100"
&&&&&&&&&&&&&&&&type:&internal
&&&&&&&&Port&"eth0"
&&&&&&&&&&&&Interface&"eth0"
&&&&&&&&Port&"ovsbridge0"
&&&&&&&&&&&&Interface&"ovsbridge0"
&&&&&&&&&&&&&&&&type:&internal
&&&&ovs_version:&"2.3.1"
& vm2网卡配置信息
[root@vm2&network-scripts]#&cat&ifcfg-eth0&
DEVICE=eth0
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSPort
OVS_BRIDGE=ovsbridge0
BOOTPROTO=none
HOTPLUG=no
[root@vm2&network-scripts]#&cat&ifcfg-ovsbridge0&
DEVICE=ovsbridge0
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=static
IPADDR=172.16.0.21
NETMASK=255.255.255.0
HOTPLUG=no
[root@vm2&network-scripts]#&cat&ifcfg-vlan100&&&&
DEVICE=vlan100
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSIntPort
BOOTPROTO=static
IPADDR=192.168.100.3
NETMASK=255.255.255.0
OVS_BRIDGE=ovsbridge0
OVS_OPTIONS="tag=100"
OVS_EXTRA="set&Interface&$DEVICE&external-ids:iface-id=$(hostname&-s)-$DEVICE-vif"
HOTPLUG=no
[root@vm2&~]#&ovs-vsctl&show
646f5f0f-6a6b-4b01-9c3c-f7684aa64ecc
&&&&Bridge&"ovsbridge0"
&&&&&&&&Port&"eth0"
&&&&&&&&&&&&Interface&"eth0"
&&&&&&&&Port&"ovsbridge0"
&&&&&&&&&&&&Interface&"ovsbridge0"
&&&&&&&&&&&&&&&&type:&internal
&&&&&&&&Port&"vlan100"
&&&&&&&&&&&&tag:&100
&&&&&&&&&&&&Interface&"vlan100"
&&&&&&&&&&&&&&&&type:&internal
&&&&ovs_version:&"2.3.1"
& 配置好网卡后
#service&network&restart
四、测试配置
在vm1 上 vm2 上使用 172.16.0.0/24可以互相通信
使用vlan100 192.168.100.0/24也可进行通信 两个网络互相隔离
编译rpm参考:&openvswitch-2.3.1/INSTALL.RHEL
网络配置参考:
更多开发者职位上
1)">1)">1" ng-class="{current:{{currentPage==page}}}" ng-repeat="page in pages"><li class='page' ng-if="(endIndex<li class='page next' ng-if="(currentPage
相关文章阅读centos - BUG: soft lockup - CPU# stuck for x seconds - Unix & Linux Stack Exchange
to customize your list.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It&#39;s 100% free, no registration required.
Here&#39;s how it works:
Anybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
I've seen a few bug reports and questions (on stackexchange and elsewhere) regarding a nagging "BUG: soft lockup - CPU#&n& stuck for &dt&s!".
So far, I haven't found any clue as to what to do or try (rather, the clues I've found and followed haven't stopped this from happening).
I am further concerned about this because:
the frequency of these events seems to have been slowly on the rise lately (over 700 per month),
yum update and reboot slowed it down a bit for a while but I have seen some lockups starting to happen again,
several processes (if not the whole host, it's hard to tell), certainly including all my interactive shells are frozen for some amount of time when it happens,
I'm not sure whether it is related, but I see lots of log/messages related to ntpd not being able to update the clock.
The following is an excerpt of $(grep 'soft lockup' /var/log/messages*):
Mar 22 10:02:35 localhost kernel: BUG: soft lockup - CPU#15 stuck for 10s! [kjournald:1048]
Mar 22 10:02:36 localhost kernel: BUG: soft lockup - CPU#0 stuck for 10s! [postgres:5372]
Mar 22 10:02:36 localhost kernel: BUG: soft lockup - CPU#8 stuck for 10s! [postgres:5368]
Mar 22 10:02:37 localhost kernel: BUG: soft lockup - CPU#0 stuck for 10s! [postgres:5372]
Mar 22 10:02:37 localhost kernel: BUG: soft lockup - CPU#8 stuck for 10s! [postgres:5368]
Mar 22 10:02:38 localhost kernel: BUG: soft lockup - CPU#0 stuck for 10s! [postgres:5372]
Mar 22 10:02:38 localhost kernel: BUG: soft lockup - CPU#8 stuck for 10s! [postgres:5368]
Mar 22 10:02:39 localhost kernel: BUG: soft lockup - CPU#0 stuck for 10s! [postgres:5372]
Mar 22 10:02:39 localhost kernel: BUG: soft lockup - CPU#8 stuck for 10s! [postgres:5368]
Mar 22 10:02:40 localhost kernel: BUG: soft lockup - CPU#15 stuck for 25s! [swapper:0]
Mar 22 15:42:16 localhost kernel: BUG: soft lockup - CPU#8 stuck for 25s! [kjournald:1048]
Mar 22 18:22:13 localhost kernel: BUG: soft lockup - CPU#15 stuck for 10s! [postgres:21356]
Mar 22 18:22:20 localhost kernel: BUG: soft lockup - CPU#7 stuck for 10s! [java:8653]
Mar 22 18:22:20 localhost kernel: BUG: soft lockup - CPU#8 stuck for 72s! [kjournald:1048]
Mar 22 21:21:37 localhost kernel: BUG: soft lockup - CPU#12 stuck for 29s! [kjournald:1048]
Mar 22 21:22:07 localhost kernel: BUG: soft lockup - CPU#12 stuck for 27s! [kjournald:1048]
Mar 23 02:01:47 localhost kernel: BUG: soft lockup - CPU#8 stuck for 10s! [kblockd/8:276]
Mar 23 02:02:22 localhost kernel: BUG: soft lockup - CPU#8 stuck for 34s! [kblockd/8:276]
This happens to random processes, and seems fairly well distributed over the 16 "cores" of that virtual host.
The host is an AWS EC2 "cc1.4xlarge" instance, with an AMI named "EC2 CentOS 5.5 GPU HVM AMI (Driver 260.19.29) (ami-42a2532b)".
It seems to be virtualized with Xen.
cat /etc/redhat-release yields CentOS release 5.9 (Final).
'free' reports 21G of RAM.
The head of dmesg is:
Linux version 2.6.18-348.3.1.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2
(Red Hat 4.1.2-54)) #1 SMP Mon Mar 11 19:39:25 EDT 2013
Command line: ro root=/dev/VolGroup00/LogVol00 rhgb quiet console=tty0 console=ttyS0,
BIOS-provided physical RAM map:
BIOS-e820: 0000 - fc00 (usable)
BIOS-e820: fc00 - a0000 (reserved)
BIOS-e820: e0000 - 0000 (reserved)
BIOS-e820: 0000 - 0000 (usable)
BIOS-e820: 0000 - 0000 (reserved)
BIOS-e820: 0000 - 0000 (usable)
DMI 2.4 present.
DMI: Xen HVM domU, BIOS 3.4.3-2.6.18 08/29/2012
ACPI: RSDP (v002
) @ 0xea020
ACPI: XSDT (v001
HVM 0x HVML 0x) @ 0x62b0
ACPI: FADT (v004
HVM 0x HVML 0x) @ 0x5ee0
ACPI: MADT (v002
HVM 0x HVML 0x) @ 0x5fe0
ACPI: SRAT (v001
HVM 0x HVML 0x) @ 0x60c0
ACPI: SLIT (v001
HVM 0x HVML 0x) @ 0x6240
ACPI: HPET (v001
HVM 0x HVML 0x) @ 0x6270
ACPI: DSDT (v002
HVM 0x INTL 0x) @ 0x(null)
The following shows a cumulative count of these "soft lockups" over recent time (the redline is when I did the last yum update followed by reboot):
The following shows the histogram of duration (how long is the host stuck):
I also have this issue on Xen 4.2 with 3.6 and 3.8 Kernel (AlpineLinux).
I googled around and by adding clocksource=jiffies to my kernel i fixed it. Instead of jiffies you could also try "pit".
There are also reports of .
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you&#39;re looking for?
Browse other questions tagged
Linux is a registered trademark of Linus Torvalds. UNIX is a registered trademark of The Open Group. This site is not affiliated with Linus Torvalds or The Open Group in any way.
Unix & Linux Stack Exchange works best with JavaScript enabled

我要回帖

更多关于 ovs平台 的文章

 

随机推荐