配色: 字号:
思科2960 CISCO catalyst 2960交换机配置方法
2023-02-15 | 阅:  转:  |  分享 
  
CISCO catalyst 2960交换机配置方法连接交换机将交换机配置电缆连接于交换机的通讯配置端口(console口)和计算机的串口(
可以直接连接到SCADA服务器后面的串口上)。点击Start(开始) > Programs(程序) > Accessories(附
件) > Cojhunications(通讯) > HyperTerminal(超级终端),运行HyperTerminal。在Co
nnection Description对话框中,为这一连接输入一个名称(自己识别方便即可),点击“ok”。在Icon对话框,点击
相应的图标并确认。在Connect To对话框,选择正在被使用的串口(一般为COM1口),并确认。在Properties对话框配置
端口如下:Bits per second: 9600Data Bits: 8Parity: NONEStop bits: 1Flo
w control: Xon/Xoff通讯端口默认为COM1,点击“ok”。 7、打开交换机电源。二、配置交换机 1、在新交换机上
电启动后,会出现向导配置模式(若没有请在SWITCH>提示符后输入setup即可启动向导配置模式),在如下部分输入相应的值(粗斜体
),并回车。Would you like to enter the initial configuration dialog? [
yes/no]: yAt any point you may enter a question mark ''?'' for help
.Use ctrl-c to abort configuration dialog at any prompt.Default s
ettings are in square brackets ''[]''.Basic management setup config
ures only enough connectivityfor management of the system, extend
ed setup will ask youto configure each interface on the systemWou
ld you like to enter basic management setup? [yes/no]: yConfiguri
ng global parameters:2、 为交换机输入一个“host name”,可以自己先任意写一个,要便于识别就行,因为
当用TFTP软件恢复之前备份的配置后,hostname也会恢复到原先的设置,在如下部分输入相应的值(粗斜体),并回车,以京海为例:
Enter host name [Switch]: jh_switch01 (京海第一路交换机,即FTE网络A交换机)The en
able secret is a password used to protect access toprivileged EXE
C and configuration modes. This password, afterentered, becomes e
ncrypted in the configuration.Enter enable secret(要求输入特权模式进入密令):
The enable password is used when you do not specify anenab
le secret password, with some older software versions, andsome bo
ot images.Enter enable password(要求输入特权模式进入密码): The virtual
terminal password is used to protectaccess to the router over a
network interface.Enter virtual terminal password: Configu
re SNMP Network Management? [no]: N3、下面是显示信息的一部分,太长没有完全抄录,无需操作,可压
空格键完成显示。Current interface sujharyAny interface listed with OK? va
lue "NO" does not have a valid configurationInterface IP-Address
OK? Method Status ProtocolVlan1 unassigned NO unset up downFastEt
hernet0/1 unassigned YES unset down downFastEthernet0/2 unassigne
d YES unset down downFastEthernet0/3 unassigned YES unset down do
wnFastEthernet0/48 unassigned YES unset down downGigabitEthernet0
unassigned YES unset down downGigabitEthernet0/2 unassigned YES
unset down down4、完成以上组态显示后,自动进入交换机对话框,在如下部分输入相应的值(粗体部分),并回车。Enter
interface name used to connect to themanagement network from the
above interface sujhary: vlan1Configuring interface vlan1:Config
ure IP on this interface? [yes/no]: NWould you like to enable as
a cluster cojhand switch? [yes/no]: N5、下面是显示信息的一部分,太长没有完全抄录,无需操作,
可压空格键完成显示。The following configuration cojhand script was created:
hostname jh_switch01enable secret 5 $1$qF.3$3AIkt0lNtdjMLAdknUnht
.enable password line vty 0 15password 123no snmp-s
erver!interface GigabitEthernet0/2!end6、组态信息显示完后,出现如下对话栏,输入2并回车保存
交换机配置信息。[0] Go to the IOS cojhand prompt without saving this conf
ig.[1] Return back to the setup without saving this config.[2] Sa
ve this configuration to nvram and exit.Enter your selection [2]:
27、交换机参数配置已完成,具体显示如下:Building configuration...[OK]00:02:36: %LIN
K-5-CHANGED: Interface Vlan1, changed state to administratively d
own00:02:37: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan
1, changed state to down00:02:38: %LINEPROTO-5-UPDOWN: Line proto
col on Interface FastEthernet0/1, changed state to downUse the en
abled mode ''configure'' cojhand to modify this configuration.接下来需要
为交换机设定IP地址。使用enable命令和前面设定的enable密码记入下一步操作,具体操作如下:Press RETURN to
get started!jh_switch01>enablePassword: 8、为了能使用Tel
net必须输入int vlan1(交换机默认所有端口都在vlan1里面),输入相应的值(粗体部分),并回车,具体操作如下。jh_s
witch01#config tEnter configuration cojhands, one per line. End
with CNTL/Z.jh_switch01 (config)#int vlan19、设定IP地址和子网掩码(更具情况确定),具
体操作如下:jh_switch01 (config-if)#ip address IP地址 255.255.255.0 jh_
switch01 (config-if)#no shutdown(激活设置)jh_switch01 (config-if)#exi
tjh_switch01 (config)#exitjh_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 rem
ote host[]?IP地址 (安装有TFTP软件的服务器地址)Source filename[]? jh_swh01-con
fg (之前保存的配置文件名称,名称一定要输入正确) Destination filename[startup-config]? 按下回车键; 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-config1
献花(0)
+1
(本文系SuperXI原创)