①设置交换机特权模式密码
1.输入enable 进入特权模式
2.输入config 进入全局模式
3.输入enable password 后面加想要设置的密码
4.保存
②清空交换机配置
1.进入特权模式后输入set default
2.输入Y 按enter
3.输入write出现以下提示就说明清空成功
NULL(factory config) will be used as the startup-config file at the next time!
switch#%Jan 01 00:59:32 2006 Switch configuration has been set default!
4.输入 show startup-config 请求重启出现以下提示说明可以进行
% The next boot time startup-config is default factory configuration!
5.输入reload进行重启
6.输入Y确定重启
提示:重启完成后,特权密码也被清除。
设置日期和时间
1.进入特权模式后输入clock set ?设置时间 显示如下
HH:MM:SS Hour:Minute:Second 时分秒
2.输入当前时间例如: 13:58:30 出现以下提示说明成功
Current time is Sun Jan 01 13:59:30 2006
3.输入clock set 13:59:30 ?回车后出现以下格式说明成功
YYYY.MM.DD Year.Month.Day(Valid time is between 2001.1.1 and 2037.12.31)
4.接在后面输入日期 例如:2015.04.10 系统就会弹出提示 如下
Current time is Wed Dec 30 13:59:30 2015
查看交换机闪存中的文件
1.进入特权模式后输入 show flash回车
可以看到两个文件
配置交换机管理IP地址
1.进入全局模式后输入interface vlan 1
switch(config-if-vlan1)#
2。输入 ip address 192.168.1.1 255.255.255.0
3.输入 no shut 打开 vlan 1接口
验证TFTP服务器与交换机的连通性
1.进入特权模式后输入ping 加端口配置的ip 成功显示如下
Type ^c to abort.
Sending 5 56-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds.
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms
备份交换机配置文件
1.输入write保存配置
Write running-config to current startup-config successful
switch#%Jan 01 00:09:59 2006 Write configuration successfully!
2.输入copy startup.cfg tftp://IP地址/2015.cfg
输入y
Get file "statup.cfg" length error!
tftp client read file error
close tftp client.
3.输入copy nos.img tftp://IP地址/2015.nos.img
输入Y
下载配置文件
1.进入特权模式后输入copy tftp://IP地址/2015.cfg startup.cfg
输入Y
2.输入copy tftp://IP地址/nos.img nos.img
输入Y
设置带内管理的用户名、密码和权限
1.进入全局模式后设置特权模式登录密码
2.输入username dcs privilege 15 password 123456
3.输入telnet-server enable 提示如下说名Telnet开启成功
Telnet server has been already enabled.
4.输入ip http server 提示如下说明web开启成功
web server has worked
5.输入interface vlan 1
6.输入ip address 192.168.1.1 255.255.255.0 配置交换机管理IP地址
7.输入两次exit回到特权模式后输入 ping 192.168.1.1 验证连通性 显示已下提示说明成功
Type ^c to abort.
Sending 5 56-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds.
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms
使用Telnet方式管理交换机
交换机的配置
1.创建vlan 进入全局模式后输入 vlan 10
2.输入 exit
3.输入vlan 20
4.输入两次exit
5.在普通模式下输入show vlan 查看vlan信息 显示以下信息说明vlan创建成功
VLAN Name Type Media Ports
---- ------------ ---------- --------- ----------------------------------------
1 default Static ENET Ethernet1/1 Ethernet1/2
Ethernet1/3 Ethernet1/4
Ethernet1/5 Ethernet1/6
Ethernet1/7 Ethernet1/8
Ethernet1/9 Ethernet1/10
Ethernet1/11 Ethernet1/12
Ethernet1/13 Ethernet1/14
Ethernet1/15 Ethernet1/16
Ethernet1/17 Ethernet1/18
Ethernet1/19 Ethernet1/20
Ethernet1/21 Ethernet1/22
Ethernet1/23 Ethernet1/24
Ethernet1/25 Ethernet1/26
10 VLAN0010 Static ENET
20 VLAN0020 Static ENET
6.进入全局模式后输入vlan 10
7.输入switchport interface ethernet 1/1-5 显示以下说明成功
Set the port Ethernet1/1 access vlan 10 successfully
Set the port Ethernet1/2 access vlan 10 successfully
Set the port Ethernet1/3 access vlan 10 successfully
Set the port Ethernet1/4 access vlan 10 successfully
Set the port Ethernet1/5 access vlan 10 successfully
switch(config-vlan10)#%Jan 01 01:28:03 2006 %LINEPROTO-5-UPDOWN: Line protocol o
n Interface Vlan1,changed state to DOWN
8.exit回到全局模式后输入vlan 20
9.输入switchport interface ethernet 1/6-10 显示以下说明成功
Set the port Ethernet1/6 access vlan 20 successfully
Set the port Ethernet1/7 access vlan 20 successfully
Set the port Ethernet1/8 access vlan 20 successfully
Set the port Ethernet1/9 access vlan 20 successfully
Set the port Ethernet1/10 access vlan 20 successfully
10.输入两次exit回到特权模式后输入show vlan 看到以下说名端口已经成功配好
10 VLAN0010 Static ENET Ethernet1/1 Ethernet1/2
Ethernet1/3 Ethernet1/4
Ethernet1/5
20 VLAN0020 Static ENET Ethernet1/6 Ethernet1/7
Ethernet1/8 Ethernet1/9
Ethernet1/10
分配IP地址
1.回到桌面
右击网络打开属性单击本地连接
2.在弹出的窗口菜单中单击属性
3.单击Ienternet协议版本4(TCP/IPv4)
4.单击属性
5.在弹出的的窗口菜单中点击使用下面的IP地址
6.在IP地址栏输入192.168.1.101
6.单击子网掩码自动弹出掩码255.255.255.0
7.单击两次确定后关闭
8.同样的方法在pc2上运用IP地址为192。.168.1.102
9.在PC1上单击开始菜单下的运行输入cmd
10.在弹出的窗口中输入ping 192.168.1.102进行验证 显示以下说明两台PC机可以连通
为交换机开启 vlan 1并配置 ip
1设置时间后进入全局模式
2.输入interface ip后面输ip 和子网掩码
3.输入no shutdown
4.保存
5.验证配置回到特权模式输入 show run 显示如下说明配置成功
no service password-encryption
!
hostname DCS-3950-26C
sysLocation China
sysContact 800-810-9119
!
username admin privilege 15 password 0 admin
!
!
!
!
!
!
!
!
!
!
vlan 1
!
Interface Ethernet1/1
!
Interface Ethernet1/2
!
Interface Ethernet1/3
!
Interface Ethernet1/4
!
Interface Ethernet1/5
!
Interface Ethernet1/6
!
Interface Ethernet1/7
!
Interface Ethernet1/8
!
Interface Ethernet1/9
!
Interface Ethernet1/10
!
Interface Ethernet1/11
!
Interface Ethernet1/12
!
Interface Ethernet1/13
!
Interface Ethernet1/14
!
Interface Ethernet1/15
!
Interface Ethernet1/16
!
Interface Ethernet1/17
!
Interface Ethernet1/18
!
Interface Ethernet1/19
!
Interface Ethernet1/20
!
Interface Ethernet1/21
!
Interface Ethernet1/22
!
Interface Ethernet1/23
!
Interface Ethernet1/24
!
Interface Ethernet1/25
!
Interface Ethernet1/26
!
interface Vlan1
ip address 192.168.1.100 255.255.255.0
!
no login
!
end
为交换机设置授权Telnet
1.进入全局模式后后 输入tetlnet-user dcnu(此为用户名可以自由设置) password 0 digital(此为口令可以自由设置但前面必须有零)
2.回到特权模式进行验证
配置主机IP地址
1.主机应于交换机属于同一网段 故输入192.268.1.101 255.255.255.0
2.验证配置 在cmd命令提示符中输入ipconfig进行验证
验证主机与交换机是否联通
方法1
1.在特权模式下输入 ping 192.168.1.101
出现5个感叹号则说明成功
方法2
1.在主机的cmd命令提示符中输入ping 192.168.1.100
使用Telnet登录
1.在运行输入Telnet:\\192.168.100
输入用户名和口令
开启web服务
1.进入全局模式后输入ip http server 开启web服务
2.设置web服务的授权用户在全局模式下输入web-user admin password 0 digital
登录web
1.在运行中输入http://192.168.1.100
再打开的网页中输入用户名和口令后进行进一步配置
提示:删除Telnet服务可在全局模式下输入 no Telnet-user