2011年2月18日

終於有除濕機可以用了

網拍上面看了眾多家的除濕機,最後挑中這台Panasonic F-Y101BW,外型乾淨俐落,體積適中
而且是相當省電的機型

目前使用中,非常滿意,很安靜,晚上開著睡覺也可以一夜好眠
不過我房間內的濕度真的很嚇人,平常沒開除濕的話,濕度通常是80% up


官方網頁介紹
◆ 能源因數值1.82 L/kWh
◆ 靜音滴水
◆ 6重安全裝置
◆ 電源線收納盒
◆ 底部滑輪設計
◆ 定時2-4-8小時
◆ 4合1清淨濾網
◆ 自動除濕/除霜
◆ 活動式連續排水閥
◆ 大型水位顯示
◆ LED面板
◆ 滿水自動停止
◆ 便利取水箱設計
◆ 水箱容量3.1公升
◆ 乾燥乾衣
◆ 除濕環境設定
(繼續閱讀...)

2011年2月14日

新電腦燒機測試

最近電腦加了大容量的記憶體,讓雙核CPU也跑到2.4G
立刻二話不說先裝上folding@home程式測試效能
在Windows裡跑一支folding@home,另外又裝了VMware裡裝了Linux版folding@home
讓CPU loading跑到100%,放著給他測試看看跑一個星期看會不會當機!!


(繼續閱讀...)

2011年1月17日

HSRP LAB實作


R4與R5的IOS需使用C7200 Router的IOS來做LAB
若使用C3700系列的IOS做LAB會發生Client端PC會ping不到Virtual IP的狀況
此部分應為Dynamips的Bug

設定fa0/1介面與HSRP Group 1
R4(config)#interface fa0/1
R4(config-if)#ip address 192.168.10.2 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#standby 1 priority 200
R4(config-if)#standby 1 preempt
R4(config-if)#standby 1 ip 192.168.10.254
R4(config-if)#standby 1 authentication tttkey
R4(config-if)#exit

設定fa0/0介面與HSRP Group 2
R4(config)#interface fa0/0
R4(config-if)#ip address 172.16.10.2 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#standby 2 priority 200
R4(config-if)#standby 2 preempt
R4(config-if)#standby 2 ip 172.16.10.254
R4(config-if)#standby 2 authentication nnnkey
R4(config-if)#exit
設定動態路由RIP協定
R4(config)#router rip
R4(config-router)#version 2
R4(config-router)#network 192.168.10.0
R4(config-router)#network 172.16.10.0
R4(config-router)#exit
R4(config)#exit
查看HSRP的狀態
R4#show standby brief
R4#show standby all

設定fa0/1介面與HSRP Group 1
R5(config)#interface fa0/1
R5(config-if)#ip address 192.168.10.1 255.255.255.0
R5(config-if)#no shutdown
R5(config-if)#standby 1 priority 100
R5(config-if)#standby 1 ip 192.168.10.254
R5(config-if)#standby 1 authentication tttkey
R5(config-if)#exit
設定fa0/0介面與HSRP Group 2
R5(config)#interface fa0/0
R5(config-if)#ip address 172.16.10.1 255.255.255.0
R5(config-if)#no shutdown
R5(config-if)#standby 2 priority 100
R5(config-if)#standby 2 ip 172.16.10.254
R5(config-if)#standby 2 authentication nnnkey
R5(config-if)#exit
設定動態路由RIP協定
R5(config)#router rip
R5(config-router)#version 2
R5(config-router)#network 192.168.10.0
R5(config-router)#network 172.16.10.0
R5(config-router)#exit
R5(config)#exit
查看HSRP的狀態
R5#show standby all
R5#show standby brief


測試HSRP是否正常運作

目前VPC1走192.168.10.2到172.16.10.100
VPCS 1 >tracert 172.16.10.100
traceroute to 172.16.10.100, 64 hops max
1 192.168.10.2 5.411 ms 4.580 ms 5.213 ms
2 172.16.10.100 11.488 ms 8.277 ms 6.664 ms

將R4的fa0/1介面給shutdown後,再測試,已改由Active R5出去到目的地
VPCS 1 >tracert 172.16.10.100
traceroute to 172.16.10.100, 64 hops max
1 192.168.10.1 5.018 ms 6.673 ms 10.933 ms
2 172.16.10.100 9.866 ms 10.162 ms 7.135 ms

而且若從VPC3來Trace到192.168.10.100的話
因R4 fa0/0與VPC3間的Link正常,所以會先送到R4 172.16.10.2去
但R4 fa0/1與VPC1間的Link已被關掉,故又會退回改走R5再到VPC1

VPCS 3 >tracert 192.168.10.100
traceroute to 192.168.10.100, 64 hops max
1 172.16.10.2 2.460 ms 5.119 ms 6.639 ms
2 172.16.10.1 6.097 ms 5.574 ms 5.049 ms
3 192.168.10.100 13.406 ms 13.376 ms 13.472 ms

(繼續閱讀...)

2011年1月6日

DHCP LAB實作


DHCP主機由SW1擔任,而172.16.31.0網段的主機需要透過DHCP Relay來取得IP
SW1#configure t
Enter configuration commands, one per line. End with CNTL/Z.
先設定interface的IP位址
SW1(config)#interface fa1/0
SW1(config-if)#no switchport
SW1(config-if)#ip address 192.168.1.1 255.255.255.252
SW1(config-if)#no shutdown
SW1(config-if)#exit
SW1(config)#interface fa1/1
SW1(config-if)#no switchport
SW1(config-if)#ip address 10.10.10.254 255.255.255.0
SW1(config-if)#no shutdown
SW1(config-if)#exit
SW1(config)#exit


設定RIP路由
SW1(config)#router rip
SW1(config-router)#version 2
SW1(config-router)#network 192.168.1.0
SW1(config-router)#network 10.10.10.0
SW1(config-router)#exit
SW1(config)#exit

設定10.10.10.0網段的DHCP pool
SW1(config)#ip dhcp excluded-address 10.10.10.101 10.10.10.200
SW1(config)#ip dhcp pool 10-net
SW1(dhcp-config)#network 10.10.10.0 255.255.255.0
SW1(dhcp-config)#default-router 10.10.10.254
SW1(dhcp-config)#lease infinite
SW1(dhcp-config)#dns-server 168.95.1.1
SW1(dhcp-config)#end
設定172.16.31.0網段的DHCP pool
SW1#configure t
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#ip dhcp excluded-address 172.16.31.101 172.16.31.200
SW1(config)#ip dhcp pool 172-net
SW1(dhcp-config)#network 172.16.31.0 255.255.255.0
SW1(dhcp-config)#default-router 172.16.31.254
SW1(dhcp-config)#dns-server 168.95.1.1
SW1(dhcp-config)#lease infinite
SW1(dhcp-config)#end
SW1#wr

先設定Interface的IP位址
SW2(config)#interface fa1/0
SW2(config-if)#no switchport
SW2(config-if)#ip address 192.168.1.2 255.255.255.252
SW2(config-if)#no shutdown
SW2(config-if)#exit

SW2(config)#interface fa1/1
SW2(config-if)#no switchport
SW2(config-if)#ip address 172.16.31.254 255.255.255.0
SW2(config-if)#ip helper-address 192.168.1.1 (設定DHCP Relay)
SW2(config-if)#no shutdown
SW2(config-if)#exit
設定RIP路由
SW2(config)#router rip
SW2(config-router)#version 2
SW2(config-router)#network 192.168.1.0
SW2(config-router)#network 172.16.31.0
SW2(config-router)#exit
SW2(config)#exit
SW2#wr

檢查DHCP取得IP的狀況
SW1#show ip dhcp binding


(繼續閱讀...)

2010年12月23日

自已幫單車換手把

單車換手把可參考下列教學
http://bicycletutor.com/handlebar-grips/
最近幫家裡的以前高中在騎的通勤腳踏車換了新的手把
舊的手把實在是太難用了



(繼續閱讀...)

2010年10月21日

開啟Cygwin後,自動執行特定shell script

若希望Cygwin執行後,自動去跑寫好的shell script,可使用下列方法達成
先到Windows中安裝Cygwin的根目錄下面找到cygwin.bat這個批次檔
例如C:\cygwin\cygwin.bat,然後使用記事本修改它

bash --login -i
執行此命令後dos視窗會自動轉換為cygwin環境的視窗,輸入exit返回dos視窗。
此命令若寫進.bat檔,則檔中之後的命令無法實現,故此命令只作為轉化環境用,在寫批次處理命令時不適用

bash --login -c "ls"
此命令就是直接運行cygwin的ls命令

bash --login -c "ls /etc"
顯示根目錄下etc資料夾中的內容

bash --login -c "sh /home/user/autossh.sh"
此命令是執行autossh.sh中的cygwin批次處理命令。此方法適合在Dos下的Cygwin中做批次處理。

EX:修改cygwin.bat內容為:
@echo off
chdir C:\cygwin\bin
bash --login -c "sh /home/user/autossh.sh"
即可透過bat檔語法,先到C槽目錄下,再呼叫bash執行特定的shell script
(繼續閱讀...)

2010年10月20日

SSH 免密碼登入

一、
在 Client 端建立 Public 與 Private Key
$ ssh-keygen -t dsa (這個步驟產生Keys)
Generating public/private dsa key pair.
Enter file in which to save the key (/home/root/.ssh/id_dsa):按下 Enter
Enter passphrase (empty for no passphrase):按下 Enter
Enter same passphrase again:按下 Enter
Your identification has been saved in /home/root/.ssh/id_dsa. (私鑰)
Your public key has been saved in /home/root/.ssh/id_dsa.pub. (公鑰)
The key fingerprint is:
7f:22:6b:ba:2d:35:46:ac:2b:18:e7:91:27:e9:bc:19 root@free.com.tw
The key's randomart image is:
+--[ DSA 1024]----+
| |
| |
| . |
| o |
| o oS |
| . * o +. |
| BE+ +..o . |
| . =oo..o o |
| ooo=o |
+-----------------+

二、
在 Server 端放置 Client 可以登入的公鑰 (假設Server主機IP為192.168.10.10)
$cd ~/.ssh (先回到家目錄中下的.ssh資料夾中)
$scp id_dsa.pub root@192.168.10.10:~/ (使用scp複製client端的公鑰到server端主機的目錄下)
若server端的ssh port有更改為其它port的話,可再加入 -P參數如下
$scp -P 8080 id_dsa.pub root@192.168.10.10:~/

三、
登入到 Server 端,將公鑰轉存到 authorized_keys 檔案中
$ssh 192.168.10.10
$cat id_dsa.pub >> .ssh/authorized_keys
建立完成之後,client端即可不用免密碼登入ssh server主機
(繼續閱讀...)

Copyright © 2009 New Life in Taipei All rights reserved. Theme by Laptop Geek. | Bloggerized by FalconHive.