cisco交换机配置练习疑难

配置完之后一般退出到特权模式,配置才生效。

 

1.将ios文件从电脑上拷入到交换机flash

首先要设置交换机的Ip地址,也就是interface vlan 1 之类的,保证这个ip 和你的tftp服务器ip在同一子网内。

Switch#copy tftp: flash:
Address or name of remote host [192.168.0.2]?             //不管是拷入还是烤出,填写的都是你电脑的IP,也就是交换机对端(remote 远程)的IP
Source filename [config.textx]? c2960s-universalk9-mz.122-56.SE3.bin
Destination filename [c2960s-universalk9-mz.122-56.SE3.bin]?
Accessing tftp://192.168.0.2/c2960s-universalk9-mz.122-56.SE3.bin...
Loading c2960s-universalk9-mz.122-56.SE3.bin from 192.168.0.2 (via Vlan1): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 10907578 bytes]

10907578 bytes copied in 159.064 secs (68574 bytes/sec)

 

 

2.配置SSH登录到交换机

 

①启用aaa new-model      不启用,你试试、、、、、、
②配置hostname和ip domain-name:
③ 配置登录用户名和密码(以本地认证为例)
④ 配置SSH服务:


aaa new-model
hostname Switch
ip domain-name tomax.com
username xxf password xmh
crypto key generate rsa                     选择 ssh v2 atleast 768 bits size

 

Switch(config)#ip ssh version 2         选择ssh的版本 

Switch(config)#ip ssh time-out  120     超时限定为120秒

Switch(config)#ip ssh authentication-retries 5   认证重试次数为5次

 

设置登录是否telnet 和SSH

Switch(config)#line vty 0 15
Switch(config-line)#transport input telnet ssh  同时支持telnet和 SSH

Switch(config-line)#transport input ssh    只支持SSH

 

3.设置clock

Switch#clock time GMT +8

Switch#clock set 15:45:00 23 September 2014

Switch#show clock
15:47:21.159 UTC Tue Sep 23 2014

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#show ntp status

Core-Switch-1#wr

Core-Switch-1#sh log

 

Core-Switch-1#show clock

 

4.设置vty终端输出调试信息。

C3750A#terminal monitor 

取消为

C3750A#terminal no monitor 


你可能感兴趣的:(服务器,Flash,interface,电脑,交换机配置)