加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

cisco交换机配置练习疑难

发布时间:2020-12-15 17:35:52 所属栏目:百科 来源:网络整理
导读:配置完之后一般退出到特权模式,配置才生效。 ? 1.将ios文件从电脑上拷入到交换机flash 首先要设置交换机的Ip地址,也就是interface vlan 1 之类的,保证这个ip 和你的tftp服务器ip在同一子网内。 Switch#copy tftp: flash: Address or name of remote host

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

?

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?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读