1. 程式人生 > 其它 >Cisco2950埠映象與清除密碼

Cisco2950埠映象與清除密碼

Cisco2950埠映象與清除密碼

檢視cisco裝置cpu、記憶體

#show processes memory:檢視裝置記憶體

#show processes cpu:檢視裝置cpu利用率

console連線方式:開啟CRT,快捷鍵ALT+Q,協議:選擇serial,埠:一般位COM1(如果是筆記本通過USB轉串列埠,需要到裝置管理器檢視自己是COM幾),波特率:9600,流控:把所有的勾都去掉,然後點連線。
清除密碼
1.首先通過console口登陸Cisco 2950交換機
2.拔掉Cisco 2950交換機的電源線,然後再插上,讓交換機進行初始化
3.在插上電源的同時緊緊長按Cisco 2950前面板左側下方的mode按鈕,系統會進入啟動幫助模式
4.然後輸入命令列:
flash_init
接著輸入:
load_helper
接著輸入:
dir flash:
系統會提示類似如下的資訊:
Directory of flash:
2 -rwx 843947 Mar 01 1993 00:02:18 C2900XL-h-mz-112.8-SA
4 drwx 3776 Mar 01 1993 01:23:24 html
66 -rwx 130 Jan 01 1970 00:01:19 env_vars
68 -rwx 1296 Mar 01 1993 06:55:51 config.text
1728000 bytes total (456704 bytes free)
然後輸入:
rename flash:config.text flash:config.old
把系統使用的配置檔案config.text重名為.old檔案,相當於刪除了在用配置檔案,該配置檔案就是存放原有系統密碼的。
然後輸入命令列:
boot
系統將重新引導
此時重新引導後就相當於出廠模式
提示如下資訊時輸入N
Enter N at the prompt to start the Setup program, Continue with the configuration dialog? [yes/no] : N
然後輸入enable進入特權模式,此時不需要輸入密碼,密碼為空。
然後輸入rename flash:config.old flash:config.text ,把原來的配置檔案恢復回來,如果不需要還原原有配置從該步起就不
做下面的操作。
拷貝該配置檔案到記憶體當中
Switch# copy flash:config.text system:running-config
Source filename [config.text]? (press Return)
Destination filename [running-config]? (press Return)
然後輸入如下指令清空enable密碼
switch#configure terminal
switch(config)#no enable secret
最後儲存退出即可。
write memory

埠映象
先解釋一下埠映象:埠映象簡單的說,就是把交換機一個(數個)埠(源埠)的流量完全拷貝一份,從另外一個埠(目的埠)發 出去,以便從目的埠通過分析源埠的流量來找出網路存在問題的原因。 cisco的埠映象叫做SWITCHED PORT ANALYZER,簡稱SPAN(僅在IOS系統中,下同),因此,埠映象僅適用於乙太網交換埠。

CISCO2950交換機,都是預設配置,
24個口,在一個VLAN1裡,現在要做一個埠映象,將1至23口的所有資料都分到24口,命令如下:

Switch(config)#monitor session 1 source interface fastEthernet 0/1 - 23
Switch(config)#monitor session 1 destination interface fastEthernet 0/24

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

用FastEthernet0/19埠監視FastEthernet0/24埠.進行的配置如下:


Switch(config)# monitor session 1 source interface fastEthernet0/24
Switch(config)# monitor session 1 destination interface fastEthernet0/19

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

1. Catalyst 2900XL/3500XL/2950系列交換機埠監聽配置

以下命令配置埠監聽:

port monitor

例如,F0/1和F0/2、F0/5同屬VLAN1,F0/1監聽F0/2、F0/5埠:

interface FastEthernet0/1

port monitor FastEthernet0/2

port monitor FastEthernet0/5

port monitor VLAN1

2. Catalyst 4000,5000,and 6000系列交換機埠監聽配置

以下命令配置埠監聽:

set span

例如,模組6中埠1和埠2同屬VLAN1,埠3在VLAN2,埠4和5在VLAN2,埠2監聽埠1和3、4、5,

set span 6/1,6/3-5 6/2

以下命令禁止埠監聽:

set span disable [dest_mod/dest_port|all]


設定時間

Core-Switch-1#show clock

Core-Switch-1#show ntp status

Core-Switch-1#conf t

Core-Switch-1(config)# clock timezone GMT +8

Core-Switch-1(config)#service timestamps debug datetime msec localtime show-timezone

Core-Switch-1(config)#service timestamps log datetime msec localtime show-timezone

Core-Switch-1(config)#exit

Core-Switch-1# clock set 13:51:00 Sep 7 2011

或通過NTP伺服器時間同步:

Core-Switch-1#ntp server 192.168.0.254 key 8888注:8888是指ntp伺服器的Key值

Core-Switch-1#wr

Core-Switch-1#sh log

預設情況下日誌訊息不包括日期和時間戳。

service timestamps {debug | log } uptime

service timestamps {debug | log } datetime [mesc] [localtime] [show-timezone] [year]