Pages

2011/05/20

Ubuntu10.10で bonding + vlan + bridge(NG編)

XenServerやVMWare等では簡単な操作で可能な「VLAN + Bonding」の構成、KVMやlxcでは手動で設定しておきます。
 



追記:このbondにvlanを付ける設定では、ゲスト同士がVLANでやり取りできない。
bond0, bond0.100 とするのでなく、bond0(eth0+eth1), bond1(eth0.100+eth1.100) となるように設定するとうまくいく。


2011/05/11

Mongodb ShardのためにUpstart起動スクリプト

Ubuntu向け。

10-genのリポジトリからmongodb(mongodb-10gen)を入れた場合、普通のMongoDB起動スクリプトがはいります。

Shardingするなら必須のConfig, Router用は別途必要なのでUpstart用に作成した。

init.dのことは忘れなさい。
 

2011/05/10

2011/05/09

VyattaのbridgeでSTP

Vyattaで透過FWなんかを作った際に冗長化できるかとSTPを有効にしてみた。

こんな感じ。
# set interfaces bridge br0 stp true


やってることは"brctl stp"と同じですが。



$ show bridge br0 spanning-tree
br0
bridge id 0000.0800277d3173
designated root 0000.08002722f2bc
root port 1 path cost 4
max age 20.00 bridge max age 20.00
hello time 2.00 bridge hello time 2.00
forward delay 15.00 bridge forward delay 15.00
ageing time 300.01
hello timer 0.00 tcn timer 0.00
topology change timer 0.00 gc timer 54.06
flags

eth0 (2)
port id 8002 state blocking
designated root 0000.08002722f2bc path cost 4
designated bridge 0000.08002722f2bc message age timer 18.63
designated port 8002 forward delay timer 0.00
designated cost 0 hold timer 0.00
flags

eth1 (1)
port id 8001 state forwarding
designated root 0000.08002722f2bc path cost 4
designated bridge 0000.08002722f2bc message age timer 18.63
designated port 8001 forward delay timer 0.00
designated cost 0 hold timer 0.00
flags


nice blocking.

FWの設定は同期できるので、これで十分そうだ。

2011/05/06

Vyatta6.2からNetFlow

2行でよかった。

set system flow-accounting interface br0
set system flow-accounting netflow server 192.168.10.1 port 9996


Vyattaは出来る子だなあ。

2011/05/03

Nginxのログをmongodbに入れるために

mongoimportが便利でmongodbが柔軟なので、ログを入れたくなる。
取り急ぎWebのログでもいれちゃうか、というお話。
 

HTTPサーバのアクセスログはそれなりの解析ツールもあるんだが、あえてMongoDBに突っ込んでみよう。