天天看點

CISCO catalyst 2960交換機配置方法

作者:特工控
  1. 連接配接交換機
  2. 将交換機配置電纜連接配接于交換機的通訊配置端口(console口)和計算機的序列槽(可以直接連接配接到SCADA伺服器後面的序列槽上)。
  3. 點選Start(開始) > Programs(程式) > Accessories(附件) > Cojhunications(通訊) > HyperTerminal(超級終端),運作HyperTerminal。
  4. 在Connection Description對話框中,為這一連接配接輸入一個名稱(自己識别友善即可),點選“ok”。
  5. 在Icon對話框,點選相應的圖示并确認。
  6. 在Connect To對話框,選擇正在被使用的序列槽(一般為COM1口),并确認。
  7. 在Properties對話框配置端口如下:

Bits per second: 9600

Data Bits: 8

Parity: NONE

Stop bits: 1

Flow control: Xon/Xoff

通訊端口預設為COM1,點選“ok”。

8. 打開交換機電源。

二、配置交換機

  1. 在新交換機上電啟動後,會出現向導配置模式(若沒有請在SWITCH>提示符後輸入setup即可啟動向導配置模式),在如下部分輸入相應的值(粗斜體),并回車。

Would you like to enter the initial configuration dialog? [yes/no]: y

At any point you may enter a question mark '?' for help.

Use ctrl-c to abort configuration dialog at any prompt.

Default settings are in square brackets '[]'.

Basic management setup configures only enough connectivity

for management of the system, extended setup will ask you

to configure each interface on the system

Would you like to enter basic management setup? [yes/no]: y

Configuring global parameters:

2. 為交換機輸入一個“host name”,可以自己先任意寫一個,要便于識别就行,因為當用TFTP軟體恢複之前備份的配置後,hostname也會恢複到原先的設定,在如下部分輸入相應的值(粗斜體),并回車,以京海為例:

Enter host name [Switch]: jh_switch01 (京海第一路交換機,即FTE網絡A交換機)

The enable secret is a password used to protect access to

privileged EXEC and configuration modes. This password, after

entered, becomes encrypted in the configuration.

Enter enable secret(要求輸入特權模式進入密令): *******

The enable password is used when you do not specify an

enable secret password, with some older software versions, and

some boot images.

Enter enable password(要求輸入特權模式進入密碼): *******

The virtual terminal password is used to protect

access to the router over a network interface.

Enter virtual terminal password: *******

Configure SNMP Network Management? [no]: N

3. 下面是顯示資訊的一部分,太長沒有完全抄錄,無需操作,可壓空格鍵完成顯示。

Current interface sujhary

Any interface listed with OK? value "NO" does not have a valid configuration

Interface IP-Address OK? Method Status Protocol

Vlan1 unassigned NO unset up down

FastEthernet0/1 unassigned YES unset down down

FastEthernet0/2 unassigned YES unset down down

FastEthernet0/3 unassigned YES unset down down

FastEthernet0/48 unassigned YES unset down down

GigabitEthernet0 unassigned YES unset down down

GigabitEthernet0/2 unassigned YES unset down down

4. 完成以上組态顯示後,自動進入交換機對話框,在如下部分輸入相應的值(粗體部分),并回車。

Enter interface name used to connect to the

management network from the above interface sujhary: vlan1

Configuring interface vlan1:

Configure IP on this interface? [yes/no]: N

Would you like to enable as a cluster cojhand switch? [yes/no]: N

5. 下面是顯示資訊的一部分,太長沒有完全抄錄,無需操作,可壓空格鍵完成顯示。

The following configuration cojhand script was created:

hostname jh_switch01

enable secret 5 $1$qF.3$3AIkt0lNtdjMLAdknUnht.

enable password *******

line vty 0 15

password *******123

no snmp-server

!

interface GigabitEthernet0/2

!

end

6. 組态資訊顯示完後,出現如下對話欄,輸入2并回車儲存交換機配置資訊。

[0] Go to the IOS cojhand prompt without saving this config.

[1] Return back to the setup without saving this config.

[2] Save this configuration to nvram and exit.

Enter your selection [2]: 2

7. 交換機參數配置已完成,具體顯示如下:

Building configuration...

[OK]

00:02:36: %LINK-5-CHANGED: Interface Vlan1, changed state to administratively down

00:02:37: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to down

00:02:38: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down

Use the enabled mode 'configure' cojhand to modify this configuration.

接下來需要為交換機設定IP位址。使用enable指令和前面設定的enable密碼記入下一步操作,具體操作如下:

Press RETURN to get started!<ENTER>

jh_switch01>enable

Password: *******

8. 為了能使用Telnet必須輸入int vlan1(交換機預設所有端口都在vlan1裡面),輸入相應的值(粗體部分),并回車,具體操作如下。

jh_switch01#config t

Enter configuration cojhands, one per line. End with CNTL/Z.

jh_switch01 (config)#int vlan1

9. 設定IP位址和子網路遮罩(更具情況确定),具體操作如下:

jh_switch01 (config-if)#ip address IP位址 255.255.255.0

jh_switch01 (config-if)#no shutdown(激活設定)

jh_switch01 (config-if)#exit

jh_switch01 (config)#exit

jh_switch01 #write (将交換機的配置資訊儲存到nvram存儲器中,交換機重新開機後需要從nvram中加載這個配置)

注:交換機IP位址配置完成後,将交換機接入SCADA網絡,在SCADA伺服器上用“telnet”指令登入到交換機上,用之前備份配置檔案恢複到新的交換機上,以下為具體步驟:

10. 打開伺服器上的CMD視窗,輸入:“telnet 10.9.0.193”,(以京海站交換機為例),輸入密碼并進入到特權模式switch#

11. 在特權模式下輸入:“copy tftp startup-config” 在以下提示下輸入粗體的文字:

Address or name of remote host[]?IP位址 (安裝有TFTP軟體的伺服器位址)

Source filename[]? jh_swh01-confg (之前儲存的配置檔案名稱,名稱一定要輸入正确)

Destination filename[startup-config]? 按下Enter鍵;

Loading jh_swh01-confg from 10.9.0.193(via vlan1):!!

[OK – 6017bytes]

[OK]

6017 bytes copied in 18.544secs<324bytes/sec>

Switch# reload (重新開機交換機)

重新開機完成後,用telnet指令登入到交換機并進入特權模式,輸入“show running-config”,檢視交換機的配置是否正确。

Switch#show running-config

繼續閱讀