2013年7月19日星期五

openvswitch on my router

To set up a lab at home, I need a openflow compatible swtich, was thinking about buy a netfpga, seems its not cost effective.  Then turn to find a router which can be flashed with openwrt, this approach make more sense for me. Searched from taobao, I got a buffalo's wzr-hp-300np, which has a decent specs.
4 x 1GHz lan  port
32M flash and 64M RAM.
Its supported since openwrt's 10.03 release, so latest release can be flashed too, even the trunk release, if you want to try with 3.10.1 version of kernel. 
It comes with buffalo's stock rom, the one I got is actually a Japanese release, which means you can't flash openwrt directly, because of the bootloaded has been locked to refuse flash non-japanese firmware, tricky here is you can flash dd-wrt by using buffalo's web flash tool, then you can flash openwrt from within dd-wrt. Not too bad.
To use openwrt, you may choose a release from their website or you may build it from trunk, no matter which one you choose, you need set up a openwrt build environment. Because there is no such a openvswitch binary package, so I'd build by myself.

Checkout from my branch, which was upgraded to build openvswitch-1.10.0 version.
https://github.com/zhengpenghou/openvswitch

And then follow instructions on openwrt to flash the image and install openvswitch's package onto your router, your openflow compatible switch is ready.  After boot up the switch, ssh into it, edit the network config accordingly.

Here is mine for your reference, each switch's configuration differs from others.





 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fdcc:c956:e56e::/48'

config interface 'lan'
	option ifname 'eth0.1'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '192.168.1.251'
	option gateway '192.168.1.1'
	option broadcast '192.168.1.255'
	option dns '192.168.1.1'

config interface 'wan'
	option ifname 'eth1'
	option _orig_ifname 'eth1'
	option _orig_bridge 'false'
	option proto 'static'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'
	option enable_vlan4k '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '0 5t'

config interface
	option ifname 'eth0.2'
	option proto 'static'

config interface
	option ifname 'eth0.3'
	option proto 'static'

config interface
	option ifname 'eth0.4'
	option proto 'static'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '1 5t'

config switch_vlan
	option device 'switch0'
	option vlan '3'
	option ports '2 5t'

config switch_vlan
	option device 'switch0'
	option vlan '4'
	option ports '3 5t'

and then add a bridge,  add port into the bridge


1
2
3
4
5
ovs-vsctl add-br ovsbr0
ovs-vsctl add-port ovsbr0 eth0.1 -- set Interface eth0.1 ofport_request=1
ovs-vsctl add-port ovsbr0 eth0.2 -- set Interface eth0.2 ofport_request=2
ovs-vsctl add-port ovsbr0 eth0.3 -- set Interface eth0.3 ofport_request=3
ovs-vsctl add-port ovsbr0 eth0.4 -- set Interface eth0.4 ofport_request=4
ovs is up to be used now. if you mess it up, reset the router.

2011年2月10日星期四

snowing in Beijing

no precipitation for almost 110 days, its snowing eventually. God bless us.
--------------------------------------------------------------
Ovi Mail: Making email access easy
http://mail.ovi.com

2011年2月5日星期六

通过Ubuntu软件中心,分享你喜欢的软件

Ubuntu软件中心最近有一系列的变化,其中比较有意思的是给软件评价和打分,并通将其分享到twitter和facebook这类SNS上去。
一 打开软件中心,找到你要评价或者打分的软件。

二 点击更多信息

三 点击上图有下方的 "write your own review" 会弹出如下窗口。
如果您还没有Ubuntu单点登陆帐号的话,或者第一次使用的话,都会弹出Ubuntu单点登陆注册/认证对话框,注册和认证都很简单。
如果需要将你的评价分享到twitter或者facebook等SNS网站,你需要在gwibber里设定好相应的帐号,然后在上图的对话框里勾选 "Also post this review to" 。

2011年2月3日星期四

2011年1月28日星期五

My experience with openstack

Spent some time over the last week on openstack, Its written in Python, so its very easy for troubleshooting during installation or for daily maintenance. I have deployed eucalyptus for clients demo purpose, its really bad from what I can say. The whole java stack is too complicated. Back to openstack, there has something interesting through my experience.

1 Its written in Python, so its a big advantage over eucalyptus to me.

2 Easy to deploy, you can even install it inside a vm, I installed it with virtualbox.

3 Supports sorts of virtualization technologies, like kvm, qemu, xen, hyperV, even UML being supported.

4 Totally modulized architecture, you can easily add new function.

5 Fully open source, but not eucalyptus. :)

大陆航空航班上拍到的

My new router