2013年12月27日 星期五

Cisco 2960(LanBase) IOS 122-44.SE6 upgrade 150-2.SE5(support mab)


# Define ftp server username & password

config term
ip ftp username anonymous
ip ftp password tcbank
exit

# Use ftp service transfer IOS to flash
copy ftp://172.17.1.27/c2960-lanbasek9-mz.150-2.SE5.bin flash:

# Verify IOS file
verify /md5 flash:/c2960-lanbasek9-mz.150-2.SE5.bin 00eaf26bfc7ffe0911fa71fb9525a2bf

# Setup Boot from IOS c2960-lanbasek9-mz.150-2.SE5.bin
config term
boot system flash:/c2960-lanbasek9-mz.150-2.SE5.bin
exit
write


# After Reboot SuccessFul
# Del origin IOS folder
del /force /recursive flash:c2960-lanbasek9-mz.122-44.SE6

# Verify IOS file MD5
c2960-lanbasek9-mz.150-2.SE5.bin ==> 00eaf26bfc7ffe0911fa71fb9525a2bf
c2960-lanlitek9-mz.150-2.SE5.bin   ==> 4aa5b80dc6655fa78910e3ccd9b7502b

2013年11月25日 星期一

Cisco ASA5550 firewall Failover State & change

Login Cisco asa5550
command line Interface
#show failover state                         ###查看Failover狀態###

Result of the command: "show fail state"

                      State          Last Failure Reason      Date/Time
This host  -     Primary
                      Active         Ifc Failure                    09:10:04 CST Nov 16 2013
                              INT: Failed
Other host -   Secondary
                      Standby Ready  Ifc Failure              14:45:18 CST May 1 2013
                              EXT: Failed

====Configuration State===
Sync Done
====Communication State===
Mac set

###要將Active做切換時,先Login至Standby firewall
執行failover active,即可將Standby切換至Active
#failover active

2013年10月26日 星期六

2013/10/26美濃美綠農場露營

成員:

宛蓁家2大2小

又語家2大2小

丫凱家2大2小

傳佑家2大2小

佩玲友人

 

此次裝備:Logos 270 + Logos 320L

L1000190

L1000191

L1000194

L1000196

L1000198

L1000200

L1000204

L1000205

我家小綠--滿

L1000209

又語家的車

L1000210

丫凱家的車

L1000211

美綠農場大草皮

L1000212

 

至美濃秀宜板條用餐,芷欣耍寶中

L1000216

L1000217

L1000218

L1000219

2013年9月4日 星期三

如何透過 netsh 指令快速切換 Windows 網路設定

1. 先查到你的網路卡介面名稱,如下圖示,你的名稱就是【區域連線】四個字。
    網際網路連線設定
2. 再利用記事本(Notepad)開啟一份新文件,並且命名為 SwitchToDHCP.bat
3. 輸入以下指令碼(由於 Windows XP 與 Windows Vista 的指令有些差異,因此分開列表)
  • Windows 2000 / XP / 2003
    netsh interface ip set address "區域連線" source=dhcp
    netsh interface ip set dns     "區域連線" source=dhcp
  • Windows Vista / 2008
    netsh interface ip set address   "區域連線" source=dhcp
    netsh interface ip set dnsserver "區域連線" source=dhcp
    
再來,介紹如何設定網路介面到靜態 IP 模式
1. 先查到你的網路卡介面名稱,如上圖示。
2. 再利用記事本(Notepad)開啟一份新文件,並且命名為 SwitchTo公司內部IP.bat
3. 輸入以下指令碼(由於 Windows XP 與 Windows Vista 的指令有些差異,因此分開列表)
  • Windows 2000 / XP / 2003
    netsh interface ip set address "區域連線" static 10.10.1.168 255.255.255.0 10.10.1.254 1
    netsh interface ip set dns     "區域連線" static 10.10.1.1 primary
  • Windows Vista / 2008
    netsh interface ip set address   "區域連線" static 10.10.1.168 255.255.255.0 10.10.1.254 1
    netsh interface ip set dnsserver "區域連線" static 10.10.1.254 primary
設定靜態 IP 時,標準的指令公式如下:
  • Windows 2000 / XP / 2003
    netsh interface ip set address "<介面名稱>" static [IP] [子網路遮罩] [預設閘道] [閘道公制]
    netsh interface ip set dns     "<介面名稱>" static [名稱伺服器位址] primary
  • Windows Vista / 2008
    netsh interface ip set address "<介面名稱>" static [IP] [子網路遮罩] [預設閘道] [閘道公制]
    netsh interface ip set dnsserver "<介面名稱>" static [名稱伺服器位址] primary
當然,這只是針對網路介面卡做基本的設定,如果要將你現有的網路設定「完整紀錄」下來的話,可以利用以下指令達成:
netsh -c interface dump > netsh_office.cfg
上面那個指令是將你現在的網路設定全部匯出(dump)到 netsh_office.cfg 檔案中。若下次要將設定還原,可以直接利用以下指令達成:
netsh -f netsh_office.cfg
當然,載入 netsh 設定檔的指令一樣可以寫成批次檔。
未來只要把常用的幾個網路設定設定好放在你的隨身蝶裡,不管到哪裡只要對批次檔點兩下就可以設定好網路了,是不是很方便的一個小技巧呢!^_^

2013年3月15日 星期五

Windows2003設定IP時發生位址重覆

在windows2003虛擬機器上機碼,\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet \Services\Tcpip\Parameters\Interfaces\中,將舊有網卡的資料刪除,該問題就會消失,不需要重新啟動電腦。
PS:
1.哪一個是舊的Interface,一般來說,舊的會被在最下面一個,正在使用的會放在第一個,如果無法確定,先將現行網卡的IP變更後,就能確定,哪一個是新的網卡,哪一個是舊網卡記錄
2.這個情形只會發生在使用固定IP

2013年1月29日 星期二

Windows如何設定網域和信任的防火牆

參考Microsoft文件
http://support.microsoft.com/kb/179442/zh-tw#method3


『Windows Server 2003』 AND 『Windows Server 2000』
對於使用 Windows NT 網域控制站或傳統用戶端混合模式網域,信任 Windows Server 2003 網域控制站和 Windows 2000 Server 為基礎的網域控制站可能會需要除了下列連接埠開啟的所有連接埠的 Windows NT 上表中所列之間的關聯性。
用戶端連接埠伺服器連接埠服務
1024-65535/TCP135/TCPRPC 端點對應程式
1024-65535/TCP1024-65535/TCPRPC 的 LSA,SAM,Netlogon (1)
1024-65535/TCP/UDP389/TCP/UDPLDAP
1024-65535/TCP636/TCPLDAP SSL
1024-65535/TCP3268/TCPLDAP GC
1024-65535/TCP3269/TCPLDAP GC SSL
53,1024-65535/TCP/UDP53/TCP/UDPDNS
1024-65535/TCP/UDP88/TCP/UDPKerberos
1024-65535/TCP445/TCPSMB
1024-65535/TCP1024-65535/TCPFRS RPC (1)
當信任網域的設定支援僅 NETBIOS 為基礎的通訊,也會需要 Windows 2000 及 Windows Server 2003 所列的 Windows NT 的 NETBIOS 連接埠。範例是 Windows NT 為基礎的作業系統或根據 Samba 協力廠商網域控制站。


『Windows Server 2008』 AND 『Windows Server 2008 R2』
Windows Server 2008 和 Windows Server 2008 R2 增加動態用戶端連接埠範圍為輸出連線。新的預設起始連接埠為 49152,並預設結束連接埠是 65535。因此,您必須增加的 RPC 連接埠範圍,在您的防火牆。這項變更是為了遵守網際網路指派數字授權單位 (IANA) 建議事項。這不同於混合模式網域所組成的 Windows Server 2003 網域控制站、 Windows 2000 Server 為基礎的網域控制站或傳統用戶端,其中預設動態連接埠範圍是介於 1025 到 5000。 

用戶端連接埠伺服器連接埠服務
49152-65535/UDP123/UDPW32Time
49152-65535/TCP135/TCPRPC 端點對應程式
49152-65535/TCP464/TCP/UDPKerberos 密碼變更
49152-65535/TCP49152-65535/TCPRPC 的 LSA,SAM,Netlogon (1)
49152-65535/TCP/UDP389/TCP/UDPLDAP
49152-65535/TCP636/TCPLDAP SSL
49152-65535/TCP3268/TCPLDAP GC
49152-65535/TCP3269/TCPLDAP GC SSL
53、 49152-65535/TCP/UDP53/TCP/UDPDNS
49152-65535/TCP49152-65535/TCPFRS RPC (1)
49152-65535/TCP/UDP88/TCP/UDPKerberos
49152-65535/TCP/UDP445/TCPSMB
49152-65535/TCP49152-65535/TCPDFSR RPC (1)

使用Splunk收集伺服器(Windows2003)加入Doamin得到的Log如下:
使用的Service已受到收歛,沒有像上述文件中提到的TCP/1024-TCP/65535。

Policyid  service  count 
237 53/tcp 1
237 53/udp 25
237 88/tcp 7
237 88/udp 25
237 123/udp 1
237 135/tcp 7
237 389/tcp 5
237 389/udp 12
237 445/tcp 6
237 49156/tcp 7
237 49158/tcp 2

2013年1月17日 星期四

設定syslog

config term
logging host 收syslog的主機IP
logging trap syslog等級
logging on (啟動syslog)

-----------------------------------------------------------------

Logging severity level (越高越不重要, log越多)   
                            
(1)  alerts             Immediate action needed                           
(2)  critical            Critical conditions                               
(3)  errors             Error conditions                                  
(4)  warnings        Warning conditions                              
(5)  notifications   Normal but significant conditions                
(6)  informational  Informational messages                            
(7)  debugging      Debugging messages