昨天發現有几台brocade的fan壞了
本來在crontab是有寫檢查fail及error的script
但因為brocade 在log上會一直出現fan
因為會一直變換轉速
所以之前拿掉了 因為量太大
這次再加回去
grep Fan|grep fail
但要撈log時 使用cut時發現一個問題
當每個月的10號之前
會有二個空格
Apr 9 19:37:20 192.168.204.251 System: Fan 1 (from left when facing right side), failed
Apr和9間就有二個空格
如此便會影使用cut取值的正確
為了要解決這個問題
使用一次 tr 就好了
tr -s ' ' 這樣就可以把空格全部壓縮成一個
2015/10/26
2015/06/30
brocade fws 624 密碼忘記時的處理方法
Recover from a lost password.
1. Start a CLI session over the serial interface to the Brocade device.
2. Reboot the device.
3. While the system is booting, before the initial system prompt appears, enter b to enter the boot
monitor mode.
4. Enter no password at the prompt. (You cannot abbreviate this command.)
5. Enter boot system flash primary at the prompt. This command causes the device to bypass the
system password check.
After the console prompt reappears, assign a new password
Recover from a lost password.
1. Start a CLI session over the serial interface to the Brocade device.
2. Reboot the device.
3. While the system is booting, before the initial system prompt appears, enter b to enter the boot
monitor mode.
4. Enter no password at the prompt. (You cannot abbreviate this command.)
5. Enter boot system flash primary at the prompt. This command causes the device to bypass the
system password check.
After the console prompt reappears, assign a new password
2015/02/09
在cisco的設備設定完dhcp snooping及arp inspection後
如果要針對某些ip例外開放
必須使用arp access-list
arp access-list static-arp
permit ip host 1.1.1.1 mac host 0000.1234.5678
在把這個access-list 下到vlan上去
但在brocade fws624 上就不用這麼麻煩
只要在config裡下一行指令就解決了
arp 1.1.1.1 0000.1234.5678 inspect
接下來再port security這裡加上 maxmum
如果不加 預設每個port 只能出現一個mac
加上後才能允許多個mac出現(在下串小switch的情況下)
port security
enable
maximum 5
violation restrict
age 1
如果要針對某些ip例外開放
必須使用arp access-list
arp access-list static-arp
permit ip host 1.1.1.1 mac host 0000.1234.5678
在把這個access-list 下到vlan上去
但在brocade fws624 上就不用這麼麻煩
只要在config裡下一行指令就解決了
arp 1.1.1.1 0000.1234.5678 inspect
接下來再port security這裡加上 maxmum
如果不加 預設每個port 只能出現一個mac
加上後才能允許多個mac出現(在下串小switch的情況下)
port security
enable
maximum 5
violation restrict
age 1
2014/10/07
目前比較新的switch都提供Time-Domain-Reflectometry(tdr)的功能
以方便管理人員可以初步由switch端回測到outlet
方便layer 1的查修
指令如下
cisco
#test cable tdr interface <interface of your choice>
Wait 5-7 seconds
#show cable tdr interface <interface of your choice>
brocade
#phy cable-diag tdr 1/1/1
Wait 5-7 seconds
以下列出 brocade在有接client及未接client顯示出的結果
未接client
Port Speed Local pair Pair Length Remote pair Pair status
---- ----- ---------- ----------- ----------- -----------
0/1/2 UNKWN Pair A 0000081M Open
Pair B 0000084M Open
Pair C 0000084M Open
Pair D 0000080M Open
有接client
Port Speed Local pair Pair Length Remote pair Pair status
---- ----- ---------- ----------- ----------- -----------
0/1/1 100M Pair A N/A M Pair B Terminated
Pair B N/A M Pair A Terminated
Pair C 0000076M Shorted
Pair D 0000072M Shorted
以方便管理人員可以初步由switch端回測到outlet
方便layer 1的查修
指令如下
cisco
#test cable tdr interface <interface of your choice>
Wait 5-7 seconds
#show cable tdr interface <interface of your choice>
brocade
#phy cable-diag tdr 1/1/1
Wait 5-7 seconds
#show cable-diag tdr 1/1/1
以下列出 brocade在有接client及未接client顯示出的結果
未接client
Port Speed Local pair Pair Length Remote pair Pair status
---- ----- ---------- ----------- ----------- -----------
0/1/2 UNKWN Pair A 0000081M Open
Pair B 0000084M Open
Pair C 0000084M Open
Pair D 0000080M Open
有接client
Port Speed Local pair Pair Length Remote pair Pair status
---- ----- ---------- ----------- ----------- -----------
0/1/1 100M Pair A N/A M Pair B Terminated
Pair B N/A M Pair A Terminated
Pair C 0000076M Shorted
Pair D 0000072M Shorted
2014/01/04
使用python的 telnetlib對網路設備進行一些自動化的操作
範例如下
import telnetlib
HOST = "1.1.1.1"
tn = telnetlib.Telnet(HOST)
tn.read_until("Password: ")
tn.write("12345\n")
tn.read_until("cc>")
tn.write("en\n")
tn.read_until("Password: ")
tn.write("12345\n")
tn.write("sh flash\n")
tn.write("exit\n")
print tn.read_all()
http://blog.johnsonlu.org/category/programe/pythin/
http://docs.python.org/2/library/telnetlib.html
範例如下
import telnetlib
HOST = "1.1.1.1"
tn = telnetlib.Telnet(HOST)
tn.read_until("Password: ")
tn.write("12345\n")
tn.read_until("cc>")
tn.write("en\n")
tn.read_until("Password: ")
tn.write("12345\n")
tn.write("sh flash\n")
tn.write("exit\n")
print tn.read_all()
http://blog.johnsonlu.org/category/programe/pythin/
http://docs.python.org/2/library/telnetlib.html
2014/01/01
最近碰到一個很奇怪的問題
使用了一段時間的aruba ap
突然發生無法使用的情況
查了一下brocade icx 6450的log發現是ap向switch要更多的電
原本是使用802.3 af的 15400ma
但switch無法提供更多
因此視為異常而把port disable了
但該ap並不是新裝而是已經使用一段時間了
搞不清楚到底是ap還是switch 的問題
因為有二顆出現這個情況
所以先送修一個回aruba原廠
同時詢問brocade原廠
大約隔了二週
brocade給了一個針對poe module的patch
上上去之後
目前看起來是正常
更新指令如下
inline power install-firmware [stack-unit |unit-number] tftp ip-address filename
必須先用show run看poe是在那一個unit
使用了一段時間的aruba ap
突然發生無法使用的情況
查了一下brocade icx 6450的log發現是ap向switch要更多的電
原本是使用802.3 af的 15400ma
但switch無法提供更多
因此視為異常而把port disable了
但該ap並不是新裝而是已經使用一段時間了
搞不清楚到底是ap還是switch 的問題
因為有二顆出現這個情況
所以先送修一個回aruba原廠
同時詢問brocade原廠
大約隔了二週
brocade給了一個針對poe module的patch
上上去之後
目前看起來是正常
更新指令如下
inline power install-firmware [stack-unit |unit-number] tftp ip-address filename
必須先用show run看poe是在那一個unit
2013/12/22
borcade
http://www.brocade.com/downloads/documents/product_manuals/MIB/IPMIB_Reference_Jun2013.pdf
OID前要加上 1.3.6.1.4.1.1991
1.3.6.1.4.1.1991.1.1.1.1.18 机器溫度
cisco 溫度相關oid
iso.3.6.1.4.1.9.9.13.1.3.1.2.1005 = STRING: "SW#1, Sensor#1, GREEN "
iso.3.6.1.4.1.9.9.13.1.3.1.2.2005 = STRING: "SW#2, Sensor#1, GREEN "
iso.3.6.1.4.1.9.9.13.1.3.1.3.1005 = Gauge32: 30
iso.3.6.1.4.1.9.9.13.1.3.1.3.2005 = Gauge32: 33
iso.3.6.1.4.1.9.9.13.1.3.1.4.1005 = INTEGER: 65
iso.3.6.1.4.1.9.9.13.1.3.1.4.2005 = INTEGER: 65
iso.3.6.1.4.1.9.9.13.1.3.1.5.1005 = INTEGER: 0
iso.3.6.1.4.1.9.9.13.1.3.1.5.2005 = INTEGER: 0
iso.3.6.1.4.1.9.9.13.1.3.1.6.1005 = INTEGER: 1
iso.3.6.1.4.1.9.9.13.1.3.1.6.2005 = INTEGER: 1
以下為目前實際值
.1.3.6.1.4.1.9.9.13.1.3.1.3.1005
舊型机器(2U)不支援此OID
http://www.brocade.com/downloads/documents/product_manuals/MIB/IPMIB_Reference_Jun2013.pdf
OID前要加上 1.3.6.1.4.1.1991
1.3.6.1.4.1.1991.1.1.1.1.18 机器溫度
cisco 溫度相關oid
iso.3.6.1.4.1.9.9.13.1.3.1.2.1005 = STRING: "SW#1, Sensor#1, GREEN "
iso.3.6.1.4.1.9.9.13.1.3.1.2.2005 = STRING: "SW#2, Sensor#1, GREEN "
iso.3.6.1.4.1.9.9.13.1.3.1.3.1005 = Gauge32: 30
iso.3.6.1.4.1.9.9.13.1.3.1.3.2005 = Gauge32: 33
iso.3.6.1.4.1.9.9.13.1.3.1.4.1005 = INTEGER: 65
iso.3.6.1.4.1.9.9.13.1.3.1.4.2005 = INTEGER: 65
iso.3.6.1.4.1.9.9.13.1.3.1.5.1005 = INTEGER: 0
iso.3.6.1.4.1.9.9.13.1.3.1.5.2005 = INTEGER: 0
iso.3.6.1.4.1.9.9.13.1.3.1.6.1005 = INTEGER: 1
iso.3.6.1.4.1.9.9.13.1.3.1.6.2005 = INTEGER: 1
以下為目前實際值
.1.3.6.1.4.1.9.9.13.1.3.1.3.1005
舊型机器(2U)不支援此OID
2013/10/28
最近又開始出現私設dhcp server的問題了
看了一下dhcp協定的交握
先在L3 上把udp 68擋了
注意不要下到上層的link port了
再觀察看看要不要下到L2去
ip access-list extended dhcp_deny
deny udp any any eq bootpc
permit ip any any
int ra gi 1/0/1 - 24
ip access-group dhcp_deny in
P.S.
brocade 沒辦法使用ra下acl
Orz
看了一下dhcp協定的交握
先在L3 上把udp 68擋了
注意不要下到上層的link port了
再觀察看看要不要下到L2去
ip access-list extended dhcp_deny
deny udp any any eq bootpc
permit ip any any
int ra gi 1/0/1 - 24
ip access-group dhcp_deny in
P.S.
brocade 沒辦法使用ra下acl
Orz
2013/10/11
brocade L2的機器預設spanning tree是打開的(L2 L3不同喔)
所以可以解決不管是在同一台機器上同一個port (下串的小switch)
或是不同port的loop 問題
但另外又提供了在port上可以下的loop detection的指令
因為最近發生了數起loop的問題
向原廠反映為什麼下了loop detection還是有問題
原廠才說基本上用spanning tree就夠了
不需使用loop detection
實測上也是如此
當發生loop時會auto block該port
而loop狀況解除後
會自動恢復該port
Orz
所以可以解決不管是在同一台機器上同一個port (下串的小switch)
或是不同port的loop 問題
但另外又提供了在port上可以下的loop detection的指令
因為最近發生了數起loop的問題
向原廠反映為什麼下了loop detection還是有問題
原廠才說基本上用spanning tree就夠了
不需使用loop detection
實測上也是如此
當發生loop時會auto block該port
而loop狀況解除後
會自動恢復該port
Orz
2013/07/03
brocade mac snmp
暑假要把大部分的L2 換成brocade ICX
查了一下資料
做個記錄
在ubuntu 12.04中
iso.3.6.1.2.1.4.22.1.2.5.192.168.101.178 = Hex-STRING: 00 0D 54 A0 A6 C9
iso.3.6.1.2.1.4.22.1.2 這一段是由snmp要撈取的固定OID
5 代表的則是這個 ip mac所在的實體port
192.168.101.178 是 mac 所對應到的ip
00 0D 54 A0 A6 C9 是机器的 mac 一定要是大寫
轉換大小寫的語法如下
echo AbcDEFg | tr a-z A-Z
ABCDEFG
iso.3.6.1.2.1.2.2.1.7.9 9 代表實体port
可使用snmp set 1:up 2:down
查了一下資料
做個記錄
在ubuntu 12.04中
iso.3.6.1.2.1.4.22.1.2.5.192.168.101.178 = Hex-STRING: 00 0D 54 A0 A6 C9
iso.3.6.1.2.1.4.22.1.2 這一段是由snmp要撈取的固定OID
5 代表的則是這個 ip mac所在的實體port
192.168.101.178 是 mac 所對應到的ip
00 0D 54 A0 A6 C9 是机器的 mac 一定要是大寫
轉換大小寫的語法如下
echo AbcDEFg | tr a-z A-Z
ABCDEFG
iso.3.6.1.2.1.2.2.1.7.9 9 代表實体port
可使用snmp set 1:up 2:down
2013/05/28
FWS 624升級firmware後client拿不到ip 的問題終於有了解答
目前使用的 FGS04302c.bin這個版本在打開dhcp snooping的時候
並不會在dhcp的封包加上option 82的訊息
但之後的版本會
如下圖所示
而封包向上流會經過cisco 3750
問題就來了 cisco預設會丟棄含有option 82的封包
但有指令可以讓cisco不做check
目前使用的 FGS04302c.bin這個版本在打開dhcp snooping的時候
並不會在dhcp的封包加上option 82的訊息
但之後的版本會
如下圖所示
而封包向上流會經過cisco 3750
問題就來了 cisco預設會丟棄含有option 82的封包
但有指令可以讓cisco不做check
ip dhcp relay information trust-all (全域)
或
ip dhcp relay information trusted (每埠或vlan)
但目前在cisco 3750上又開啟了dhcp snooping
導致以上二個指令在這種情況是無法作用的
接下來就只剩一個解法了
在brocade的每一個port加上
no dhcp snooping relay information
讓brocade不要在封包加上option 82
問題是這個指令無法使用 int e 0/1/1 to 0/1/24 來下
要一個port 一個port下
有一千多個port 喔
想到就累 @@
2013/05/13
訂閱:
文章 (Atom)