2013年4月15日 星期一

VMware vSphere 移除 Storage 問題

當使用 vCenter 要移除 iSCSI Storage 時,會出現 No virtual machine resides on the datastore
官網的 Knowledge Base 解決辦法是移除所有的 Snapshot 。
但是筆者移除後還是出現這個訊息,後來就把所有的 Virtual Machine 用 remove from inventory 指令移除後就可以順利把 iSCSI Storage 給 unmount 了。

2013年3月5日 星期二

使用 Expect 備份網路設備設定檔 for Extreme


支援 Extreme DB8800系列、X450a系列、X460系列

#!/usr/bin/expect -f

if { $argc != 4 } {
        send_user "usage: extreme.exp device_ip username password server_ip \n"
        exit
}

set timeout 1
set TERM ANSI
set date [exec date +%Y%m%d]

set DEVICE [lindex $argv 0]
set USERNAME [lindex $argv 1]
set PASSWD [lindex $argv 2]
set SERVER [lindex $argv 3]

spawn telnet
expect "telnet> "
send "open $DEVICE\r"
sleep 1
expect "login:"
send "$USERNAME\r"
sleep 1
expect "password:"
send "$PASSWD\r"
sleep 1
expect "#"
send "upload configuration $SERVER $DEVICE-$date vr VR-Default\r"
sleep 3
expect "#"
send "exit\r"
interact

使用 Expect 備份網路設備設定檔 for HP


支援 HP ProCurve Switch 2610系列、2510系列

#!/usr/bin/expect -f

if { $argc != 4 } {
        send_user "usage: hp.exp device_ip username password server_ip \n"
        exit
}

set timeout 1
set TERM ANSI
set date [exec date +%Y%m%d]

set DEVICE [lindex $argv 0]
set USERNAME [lindex $argv 1]
set PASSWD [lindex $argv 2]
set SERVER [lindex $argv 3]


spawn telnet
expect "telnet> "
send "open $DEVICE\r"
sleep 1
expect continue { send "\r" ; exp_continue }
sleep 1
expect "Username:"
send "$USERNAME\r"
sleep 1
expect "Password:"
send "$PASSWD\r"



sleep 1
send "\r\r"
expect "#"
send "copy running-config tftp $SERVER $DEVICE-$date\r"
sleep 1
expect "#"
send "exit\r"
sleep 1
expect ">"
send "exit\r"
sleep 1
expect "Do you want to log out"
send "y\r"
interact



2013年1月3日 星期四

Extreme 教學

限制 telent access:
#edit policy mytelnet.pol
entry Telnet_Allow {
if match any {
        source-address 192.168.1.0 /24;
        source-address 192.168.2.0 /24;
                } then {
                        permit;
}
}

# configure telnet access-profile mytelnet

若 source-address 有變動執行
# refresh policy "mytelnet"





IP-MAC blind:
add:
#configure iparp add 123.123.123.123 vr VR-Default 00:11:22:33:44:55
del
#configure iparp delete 123.123.123.123 vr VR-Default 00:11:22:33:44:55

設定檔備份:
#upload configuration 123.123.123.123 backupFileName vr "VR-Default"


清除 trial-license:

enable trial-license
#debug epm enable trial-license
remove trial-license
#debug epm clear trial

回覆出廠預設值:
#unconfigure  switch all

另外一個方法
使用console連線

1. 重開機出現Running POST的時候按住空白鍵。
2. POST完成之後會進入boot rom模式。 
3. 在提示符號下輸入: 
#Config abc  (abc指的是隨便一個檔名,目的在使系統找不到檔案後開機時load default) 
4. 輸入Boot後按enter。 
系統重開之後就回預設值,所有的設定都會不見。 


LACP

8810 config
enable sharing 2:47 grouping 2:47-48 algorithm address-based L2
第一個「2:47」為主要port,後面的「2:47-48」為群組。

X450 config
enable sharing 23 grouping 23-24 algorithm address-based L2 lacp

查看
show lacp lag 1

解除設定
disable sharing 2:47

備份、升級韌體
download image [<hostname> | <ipaddress>] <filename> {primary | secondary}
upload image [<hostname> | <ipaddress>] <filename> {primary | secondary}
use image [primary | secondary]


2012年10月3日 星期三

FreeBSD 指令

Ports tree更新指令:
#portsnap fetch update



更新

# freebsd-update fetch
# freebsd-update install

2012年8月30日 星期四

更改 Fortigate 620B Policy session-TTL

在 CLI  輸入:
config firewall policy
edit policy_id
set session-ttl (300-604800)
end


查看
diagnose sys session ttl        查看全部配置
show firewall policy policy_id   查看 policy 配置

2012年8月9日 星期四

BL460c ILO2 錯誤訊息

最近機房的 HP BL460c 莫名其妙出現了下面訊息

"An ILO2 Failure has been detected. Make sure you have a suitable iLO2 firmware loaded (must be at least iLO2 1.30)"

印象中去年是四刀 HP BL460c 輪流出現,而且確認 iLO2 韌體版本都是在 1.30 以上,換了一片 OA 之後就好了,沒想到過了半年又出現這訊息....囧。

目前解法就是重新啟動 OA 或者是 iLO ,二選一。

Reset iLo 頁面如下:



重新啟動 OA 方法就是直接熱拔插那片 OA 。