Cisco交换机配置命令

上传人:飞*** 文档编号:43107983 上传时间:2018-06-04 格式:DOC 页数:11 大小:252KB
返回 下载 相关 举报
Cisco交换机配置命令_第1页
第1页 / 共11页
Cisco交换机配置命令_第2页
第2页 / 共11页
Cisco交换机配置命令_第3页
第3页 / 共11页
Cisco交换机配置命令_第4页
第4页 / 共11页
Cisco交换机配置命令_第5页
第5页 / 共11页
点击查看更多>>
资源描述

《Cisco交换机配置命令》由会员分享,可在线阅读,更多相关《Cisco交换机配置命令(11页珍藏版)》请在金锄头文库上搜索。

1、Cisco 交换机配置命令交换机配置命令首先通过配置线连接电脑与交换机的首先通过配置线连接电脑与交换机的 console 口,在电脑上按以下步骤打开超级终端连接口,在电脑上按以下步骤打开超级终端连接 交换机:交换机: 开始开始-程序程序-附件附件-通讯通讯-超级终端超级终端连接选择连接选择 COM 口口选择还原默认值,按确定,即可与交换机交互选择还原默认值,按确定,即可与交换机交互 一一. 基本配置基本配置进入特权模式:Switch en Switch# 进入全局模式:Switch# config terminal Switch(Config)#退出命令退出命令 exit举例: Switch#

2、exit Switch时钟配置时钟配置clock set 功能:设置系统日期和时钟。 参数:为当前时钟,HH 取值范围为 023,MM 和 SS 取值范 围为 059;为当前年、月和日,YYYY 取值范围为 20002035, MM 取值范围为 112,DD 取值范围为 131。举例:设置交换机当前日期为 2002 年 8 月 1 日 23 时 0 分 0 秒。 Switch# clock set 23:0:0 2002.8.1超时设置超时设置exec-timeout 功能:设置退出特权用户配置模式超时时间。 参数:为时间值,单位为分钟,取值范围为 0300。 缺省情况:系统缺省为 5 分钟。

3、 使用指南:为确保交换机使用的安全性,防止非法用户的恶意操作,当特权 用户在做完最后一项配置后,开始计时,到达设置时间值时,系统就自动退出特 权用户配置模式。数值为 0 表示没有超时。 举例:设置交换机退出特权用户配置模式的超时时间为 6 分钟。 Switch(Config)# line console 0 Switch(config-line)# exec-timeout 0 0 - 0 为不超时修改交换机的主机名修改交换机的主机名 hostname XXX举例:设置提示符为 Test。 Switch(Config)#hostname Test Test(config)#加密加密明文加密::

4、 Test(config)# enable password XXX 密文加密:: Test(config)# enable secret XXX举例:设置密码为 1111 test(config)#enable password 111 test(config)#exittest#exit testen Password: - 输入密码 1111 test#恢复交换机出厂配置命令:恢复交换机出厂配置命令:erase startup-config重启交换机的命令:重启交换机的命令:reload保存交换机配置的命令:保存交换机配置的命令:write举例: Switch#erase startup

5、-config Switch#reload Switch#write 二查看命令二查看命令显示显示 ARP 映射表命令映射表命令show arp 命令模式:特权用户配置模式。 使用指南:显示当前 ARP 映射表的内容,如:IP 地址,硬件地址,硬件类 型,接口名等。 举例: Switch# show arp Total arp items is 2, the matched arp items is 2 Address Hardware Addr Interface Port Flag 1.1.1.2 00-01-7A-43-65-73 Vlan1 Ethernet0/0/23 Dynamic

6、 192.168.1.145 00-01-7A-FE-38-8A Vlan1 Ethernet0/0/23 Dynamic查看查看 MAC 地址表地址表命令: show mac-address-tableDynamic - dynamic entry typeinterfaces - interface entry typestatic - static entry type命令模式:特权用户配置模式 使用指南:本命令可以分类显示各种 MAC 地址表项,也可以使用命令 show mac-address-table 显示当前交换机内所有的 MAC 地址表项。 举例:显示当前 MAC 地址表中的动

7、态表项。 Switch#show mac-address-table dynamic Mac Address Table -Vlan Mac Address Type Ports - - - -1 0060.5c5b.0608 DYNAMIC Fa0/8查看交换机当前查看交换机当前配置命令show running-config 举例: test# show running-config 可简写为 test# show run Building configuration.Current configuration : 1048 bytes ! version 12.2 no service t

8、imestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname test ! enable password 1111 ! ! ! interface FastEthernet0/1查看端口命令查看端口命令show ip interface briefshow interface 举例:显示全部接口的状态。 test# show ip interface briefInterface IP-Address OK? Method Stat

9、us ProtocolFastEthernet0/1 unassigned YES manual down downFastEthernet0/2 unassigned YES manual up upFastEthernet0/3 unassigned YES manual down downFastEthernet0/4 unassigned YES manual down downFastEthernet0/5 unassigned YES manual up upFastEthernet0/6 unassigned YES manual down downFastEthernet0/7

10、 unassigned YES manual down downFastEthernet0/8 unassigned YES manual up up举例:显示端口 0/0/1 的信息。 Test#show int fastEthernet 0/1 FastEthernet0/1 is down, line protocol is down (disabled)Hardware is Lance, address is 00d0.ffa5.0c01 (bia 00d0.ffa5.0c01)BW 100000 Kbit, DLY 1000 usec,reliability 255/255, tx

11、load 1/255, rxload 1/255Encapsulation ARPA, loopback not setKeepalive set (10 sec)Half-duplex, 100Mb/sinput flow-control is off, output flow-control is offARP type: ARPA, ARP Timeout 04:00:00Last input 00:00:08, output 00:00:05, output hang neverLast clearing of “show interface“ counters neverInput

12、queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0Queueing strategy: fifoOutput queue :0/40 (size/max)5 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 0 bits/sec, 0 packets/sec956 packets input, 193351 bytes, 0 no bufferReceived 956 broadcasts, 0 runts, 0 giants, 0 thro

13、ttles0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort0 watchdog, 0 multicast, 0 pause input0 input packets with dribble condition detected2357 packets output, 263570 bytes, 0 underruns跟踪路由命令跟踪路由命令traceroute | host 功能:本命令用于测试数据包从发送设备到目的地设备所经过的网关,检测 网络是否可达,定位网络故障所在。 参数:是目的主机的 IP 地址,点分十进制格

14、式;是为 远端主机的主机名; 命令模式:特权用户配置模式。 使用指南:Traceroute 一般用于定位目的网络不可达时的故障所在。 举例: Switch# traceroute 192.168.2.3三三. telnet 管理交换机管理交换机设置管理设置管理 VLANtest# config test(config)#int vlan 1 test(config-if)#ip add 192.168.1.1 255.255.255.0 test(config-if)#no shut设置设置 telnet 的线路的线路test(config)#line vty 0 4 test(config-line)#password cisco test(config-line)#login注意:必须要设特权模式的密码才能登录交换机注意:必须要设特权模式的密码才能登录交换机test(config)# enable password 1111在计算机上配置与管理 IP 相同网段的 IP 地址,在运行那里输入 telnet 192.168

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

当前位置:首页 > 行业资料 > 其它行业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号