2024年5月31日发(作者:)
CISCO catalyst 2960交换机配置方法
一、 连接交换机
1、 将交换机配置电缆连接于交换机的通讯配置端口(console口)和
计算机的串口(可以直接连接到SCADA服务器后面的串口上)。
2、 点击Start(开始) > Programs(程序) > Accessories(附件) >
Cojhunications(通讯) > HyperTerminal(超级终端),运行
HyperTerminal。
3、 在Connection Description对话框中,为这一连接输入一个名称(自
己识别方便即可),点击“ok”。
4、
5、
在Icon对话框,点击相应的图标并确认。
在Connect To对话框,选择正在被使用的串口(一般为COM1口),
并确认。
6、 在Properties对话框配置端口如下:
Bits per second: 9600
Data Bits: 8
Parity: NONE
Stop bits: 1
Flow control: Xon/Xoff
通讯端口默认为COM1,点击“ok”。
7、打开交换机电源。
二、配置交换机
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
1
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
2
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、交换机参数配置已完成,具体显示如下:
[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,
3
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!
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 (之前保存的配置文件名称,名
称一定要输入正确)
4
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-config
5
发布评论