2900系列交换机配置命令.DOC

上传人:国*** 文档编号:313023 上传时间:2018-09-21 格式:DOC 页数:7 大小:71.50KB
下载 相关 举报
2900系列交换机配置命令.DOC_第1页
第1页 / 共7页
2900系列交换机配置命令.DOC_第2页
第2页 / 共7页
2900系列交换机配置命令.DOC_第3页
第3页 / 共7页
2900系列交换机配置命令.DOC_第4页
第4页 / 共7页
2900系列交换机配置命令.DOC_第5页
第5页 / 共7页
点击查看更多>>
资源描述

1、2900 系列交换机配置命令 查看交换机的信息 Switch# show run 全部配置信息 Switch# show version 版本信息 Switch# show interface vlan 1 IP 地址信息 Switch# show int 端口信息 Switch# show flash 闪存目录信息 删除配置信息到出厂配置 Switch#delete flash:vlan.dat 先删除 VLAN 配置文件 Switch#erase start 再删除全部配 置 Erasing the nvram filesystem will remove all files! Conti

2、nue? confirm OK Erase of nvram: complete Switch#reload 重新启动 Proceed with reload? confirm 保存配置 方法 1: Switch#write 方法 2: Switch#copy run start 设置主机名 Switch#conf t Switch(config)#hostname XXX 密码设置 1、设置进入控制台(用户模式)的密码 Switch(config)#line console 0 Switch(config-line)#pass cisco Switch(config-line)#login

3、2、设置远程登录 VTY 线路 密码 Switch(config-line)#line vty 0 4(或 15) Switch(config-line)#pass cisco Switch(config-line)#login 3、设置进入 ENABLE 特权模式的密码 Switch(config)#enable pass feng 明文密码 Switch(config)#enable secret cisco 加密密码 设置 IP地址和缺省网关 Switch(config)#int vlan1 Switch(config-if)#ip address 192.168.1.10 255.25

4、5.255.0 Switch(config-if)#no shutdown Switch(config-if)#exit Switch(config)#ip default-gateway 192.168.1.100 设置端口双工模式和速率 Switch(config)int f0/1 Switch(config-if)#duplex full|half|auto Switch(config-if)#speed 100|10|auto 启动 HTTP 服务 Switch(config) ip http server Switch(config) ip http port 80 查看 MAC 地

5、址表信息 Switch# show mac 配置端口安全性 Switch(config) int f0/10 1. 启动端 口安全 Switch(config-if)#switchport port-security 2. 设置端口最大可容纳的 MAC 地址个数 Switch(config-if)#switchport port-security max-mac-count 1 3. 设置地址违反时的处理方式 Switch(config-if)#switchport port-security violation shutdown|protect|restrict 4. 设置 端口上绑定的 M

6、AC 地址 Switch(config-if)#switchport port-security mac-address 1111.1111.1111 查看端口安全性配置 Switch# sh port-security address 查看绑定的安全地址 Switch# sh port-security int f0/1 查看安全端口 配置信息的保存 Switch#copy run start Destination filename startup-config? Building configuration. Switch#copy run tftp 配置信息的恢复 Switch#cop

7、y tftp run IOS 文件的保存 Switch#copy flash tftp IOS 文件的恢复 Switch#copy tftp flash 设置 VLAN Switch#conf t Switch(config)#vlan 3 Switch(config-vlan)#name vlan3 VLAN 3 added: Name: vlan3 Switch(config-vlan)#exit APPLY completed. Exiting. 将端口加入到 VLAN 中 Switch(config)#int f0/4 Switch(config-if)#switchport mode

8、 access Switch(config-if)#switchport access vlan 3 显示 VLAN信息 Switch#show vlan Switch#show vlan brief Switch#sh flash Directory of flash:/ 2 -rwx 1645810 Jul 18 2000 01:26:29 c2900XL-c3h2s-mz-120.5.2-XU.bin 3 -rwx 105970 Jul 18 2000 01:26:29 c2900XL-diag-mz-120.5.2-XU 4 drwx 6784 Jul 18 2000 01:26:30

9、 html 111 -rwx 720 Mar 01 1993 00:17:12 vlan.dat 112 -rwx 286 Jan 01 1970 00:00:24 env_vars 113 -rwx 1130 Mar 05 1993 16:56:45 config.sl 114 -rwx 0 Mar 01 1993 00:00:49 config.text 3612672 bytes total (833024 bytes free) 删除 VLAN Switch#conf t Switch(config)#no vlan 2 Deleting VLAN 2. Switch(config)#

10、no vlan 3 Deleting VLAN 3. Switch#delete flash:vlan.dat Delete filename vlan.dat? Delete flash:vlan.dat? confirm 配置 TRUNK Switch(config)# int f0/5 Switch(config-if)#switchport mode trunk 验证 TRUNK 配置 Switch#show int f0/1 switchport 启动 VTP Switch#conf t Switch(config)#vtp domain cisco Switch(config)#v

11、tp password cisco Switch(config)#vtp server Switch(config #vtp pruning 验证 VTP 配置 Switch#show vtp status Switch#show vtp counters STP 生成树协议配置 sl#sh span VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 24577 Address 0002.179A.87B9 Cost 19 Port 10(FastEthernet0/10) Hello Time 2 sec Max Ag

12、e 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 0002.1705.C1C7 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20 Interface Role Sts Cost Prio.Nbr Type - - - - - - Fa0/1 Desg FWD 19 128.1 P2p Fa0/5 Altn BLK 19 128.5 P2p Fa0/10 Root FWD 19

13、112.10 P2p 改变生成树协议类型 sl(config)#spanning-tree mode pvst 设置交换机为根桥 sl(config)#spanning-tree vlan 1 root primary 改变交换机的优先级 sl(config)#spanning-tree vlan 1 priority 4096 改变端口的 优先级 值 sl(config)#int f0/2 sl(config-if)#spanning-tree vlan 1 port-priority 112 sl#sh span datail VLAN0001 is executing the ieee

14、compatible Spanning Tree Protocol Bridge Identifier has priority of 32768, sysid 1, 0002.1705.C1C7 Configured hello time 2, max age 20, forward delay 15 Current root has priority 24577 Root port is 10 (FastEthernet0/10), cost of root path is 19 Topology change flag not set, detected flag not set Num

15、ber of topology changes 0 last change occurred 00:00:00 ago from FastEthernet0/1 Times: hold 1, topology change 35, notification 2 hello 2, max age 20, forward delay 15 Timers: hello 0, topology change 0, notification 0, aging 300 Port 5 (FastEthernet0/5) of VLAN0001 is designated blocking Port path

16、 cost 19, Port priority 128, Port Identifier 128.5 Designated root has priority 112, address 000B.BEDC.400A Designated bridge has priority 24577, address 0002.179A.87B9 Designated port id is 128.5, designated path cost 19 Timers: message age 16, forward delay 0, hold 0 Number of transitions to forwa

17、rding state: 1 Link type is point-to-point by default Port 10 (FastEthernet0/10) of VLAN0001 is designated forwarding Port path cost 19, Port priority 112, Port Identifier 112.10 Designated root has priority 112, address 000B.BEDC.400A Designated bridge has priority 24577, address 0002.179A.87B9 Des

18、ignated port id is 112.10, designated path cost 19 Timers: message age 16, forward delay 0, hold 0 Number of transitions to forwarding state: 1 Link type is point-to-point 交换机密码恢复 关闭交换机电源后,按着交换机 Mode 按钮再次打开电源 The system has been interrupted prior to initializing the flash filesystem. The following c

19、ommands will initialize the flash filesystem, and finish loading the operating system software: flash_init load_helper boot switch: flash_init Initializing Flash. flashfs0: 167 files, 2 directories flashfs0: 0 orphaned files, 0 orphaned directories flashfs0: Total bytes: 3612672 flashfs0: Bytes used

20、: 3591680 flashfs0: Bytes available: 20992 flashfs0: flashfs fsck took 8 seconds. .done Initializing Flash. Boot Sector Filesystem (bs:) installed, fsid: 3 Parameter Block Filesystem (pb:) installed, fsid: 4switch: flash_init switch: load_helper switch: dir flash: Directory of flash:/ 2 drwx 704 htm

21、l 5 -rwx 1751867 c3500XL-c3h2s-mz.120-5.WC3b.bin 17 -rwx 94375 c3500XL-hdiag-mz-120.5.3.WC.1 19 -rwx 804 vlan.dat 21 -rwx 1253 config.text switch: rename flash:config.text flash:config.old switch: boot 交换机重启后,出现提示: Continue with configuration dialog? yes/no:N switchenable Switch#rename flash:config.

22、old flash:config.text Destination filename config.text?Y Switch#copy flash:config.text system:running-config Destination filename running-config? Y Switch#configure terminal Switch(config)#no enable secret Switch(config)#enable secret 新口令 Switch(config)#Z Switch#Switch#copy running-config startup-co

23、nfig 交换机 ios 恢复全过程 关闭交换机电源后,按着交换机 Mode 按钮再次打开电源 The system has been interrupted prior to initializing the flash filesystem. The following commands will initialize the flash filesystem, and finish loading the operating system software: flash_init load_helper boot switch: flash_init Initializing Flash

24、. flashfs0: 167 files, 2 directories flashfs0: 0 orphaned files, 0 orphaned directories flashfs0: Total bytes: 3612672 flashfs0: Bytes used: 3591680 flashfs0: Bytes available: 20992 flashfs0: flashfs fsck took 8 seconds. .done Initializing Flash. Boot Sector Filesystem (bs:) installed, fsid: 3 Param

25、eter Block Filesystem (pb:) installed, fsid: 4switch: flash_init switch: load_helper 输入后无提示 输入拷贝指令: switch: copy xmodem: flash:c3500xl-c3h2s-mz.120-5.wc5.bin 出现如下提示: Begin the Xmodem or Xmodem-1K transfer now. 系统提示 不断出现 C 这个字母就可以开始传文件了 点击超级终端菜单:传送 -发送文件,在协议选项中选择 Xmodem 或者 Xmodem-1K协议,然后选择 ios 的影像文件( *.bin),开始传送。 因为不能改速率,所以传送得很慢,传送完毕后提示: File “xmodem:“ sUCcessfully copied to “flash:c3500xl-c3h2s-mz.120-5.wc5.bin“ switch: 在提示符下输入 switch:boot 启用新的 ios 系统 重新加电完成恢复工作。

展开阅读全文
相关资源
相关搜索
资源标签

当前位置:首页 > 重点行业资料库 > 1

Copyright © 2018-2021 Wenke99.com All rights reserved

工信部备案号浙ICP备20026746号-2  

公安局备案号:浙公网安备33038302330469号

本站为C2C交文档易平台,即用户上传的文档直接卖给下载用户,本站只是网络服务中间平台,所有原创文档下载所得归上传人所有,若您发现上传作品侵犯了您的权利,请立刻联系网站客服并提供证据,平台将在3个工作日内予以改正。