第一范文网 - 专业文章范例文档资料分享平台

01-交换机基本配置

来源:用户分享 时间:2025/8/9 18:34:49 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

实验一 二层交换机基本配置

【实验总目的】

1. 了解交换机工作机制

2. 掌握交换机基本配置方法(配置交换机基本网络属性) 3. 如何取得命令帮助

【设备需求】Catalyst 2950 系列交换机一台。

练习 1 熟悉各种工作模式

【实验目的】熟练掌握如何进入交换机各种模式并设置主机名。掌握帮助命令。 【语法】

1.从路由器用户模式进入特权模式: Switch> enable 2.从特权模式进入全局配置模式: 3.为路由器设置主机名: 4.退出到特权模式: 5.退出到用户模式: 6.退出控制台线路: 7.了解命令的帮助

Switch# configure terminal Switch(config)# hostname {hostname} Switch(config)# end Switch# disable Switch> exit Switch# ?

【解释】交换机的模式大致可分为:

1.用户模式:权限最低,通常只能使用少量查看性质的命令。

2.特权模式:可以使用更多查看性质的命令和一些少量修改交换机参数的命令。 3.全局配置模式:不能使用查看性质的命令,但是确实做全局性修改和设置的模式,它还可以向下分为一些子模式,比如接口配置模式,线路配置模式等等。

配置实例一:

Switch> enable

从用户模式进入特权模式

Switch# configure terminal 从特权模式进入全局设置模式 Enter configuration commands, one per line. End with CNTL/Z. Switch(config)# hostname NUAIKO 为交换机改显示名称 NUAIKO(config)#exit 退出全局设置模式,回到特权模式 NUAIKO#

*Mar 1 00:04:30.815: %SYS-5-CONFIG_I: Configured from console by console

NUAIKO# disable NUAIKO>

退出特权模式,回到用户模式

配置实例二:

进入特权模式 Switch> enable 求得帮助 Switch # ? 可看到以下显示命令的全集:

<1-99> Session number to resume clear Reset functions 清除功能 (MAC-address-table 、 vtp) clock Manage the system clock configure Enter configuration mode进入配置模式 connect Open a terminal connection copy Copy from one file to another

debug Debugging functions (see also 'undebug') delete Delete a file

dir List files on a filesystem

disable Turn off privileged commands

disconnect Disconnect an existing network connection enable Turn on privileged commands erase Erase a filesystem exit Exit from the EXEC logout Exit from the EXEC

more Display the contents of a file no Disable debugging informations ping Send echo messages

reload Halt and perform a cold restart

resume Resume an active network connection setup Run the SETUP command facility show Show running system information telnet Open a telnet connection terminal Set terminal line parameters

traceroute Trace route to destination跟踪到目的地址的路由 undebug Disable debugging functions (see also 'debug') vlan Configure VLAN parameters

write Write running configuration to memory, network, or terminal 其中

copy Copy configuration or firmware delete Reset configuration help Description of the interactive help 旧版本 reload Halt and perform warm start

用Tab 键 可用于补全命令

配置实例三:在特权模式下,查看IOS的版本

Switch# show version

( 显示结果 略 )

练习 2 设置时间

【实验目的】熟练掌握如何为交换机设置时间。

【语法】

在特权模式下设置交换机时间:Switch#clock set {hh:mm:ss day month year} 【解释】它是交换机本地的时间标识。

配置实例一:

NUAIKO# clock set 16:16:16 25 September 2005 NUAIKO# show clock

16:16:24.503 UTC Sun Sep 25 2005

在模拟器中,星期和月份的信息失真:*0:0:23.203 UTC ??? ?? 1 1993

NUAIKO#

练习 3 设置空闲超时时间

【实验目的】掌握如何设置空闲超时时间。 【语法】

1.从全局配置模式进入线路配置模式,进入控制台口线路:

NUAIKO(config)# line console {number} (number 是一个数字) 2.启用光标跟随: NUAIKO(config-line)# logging synchronous 3.以下设置是 当键盘多少时间内无动作,则系统会自动将交换机弹出到用户模式以外,即退出。如果设置为 0 分 0 秒代表永不超时:

NUAIKO(config-line)# exec-timeout {minute} {second} 【解释】所谓光标跟随,是指当我们在输入命令的时候,不会被一些日志信息或debug命令产生的调试命令所冲断。默认情况下该特性没有启用。

配置实例一:

NUAIKO#

*Mar 1 00:20:11.231: %SYS-5-CONFIG_I: Configured from console by consoleconfigure terminal

Enter configuration commands, one per line. End with CNTL/Z. NUAIKO(config)# line console 0

NUAIKO(config-line)#logging synchronous 配置实例二:

NUAIKO# show clock

*15:32:12.747 UTC Mon Jul 28 2005 NUAIKO# configure terminal

Enter configuration commands, one per line. End with CNTL/Z. NUAIKO(config)# line console 0

NUAIKO(config-line)# exec-timeout 20 0

练习 4 设置标语信息和描述信息

【实验目的】掌握如何为交换机设置标语信息和描述信息。掌握清除当前设置命令。 【语法】

1.在全局配置模式中设置标语信息:

Switch(config)# banner motd # {text} # 2.从全局配置模式进入接口配置模式:

Switch(config-if)# interface {type} {number} 3.为交换机接口设置描述信息:NUAIKO(config-if)# description {text} 4.删除配置文件

Switch# erase startup-config

实例一:

NUAIKO(config)# banner motd # Enter TEXT message. End with the character '#'. hello! # NUAIKO(config)# end NUAIKO# exit NUAIKO con0 is now available Press RETURN to get started. 【解释】在设置标语信息的时候,以#号做为分隔符,并按下回车键。描述语句的本地的一个标识,它只在本地可见,并且Cisco IOS执行命令的时候会跳过它。

单打一个回车,进入用户模式 hello! NUAIKO>

实例二:

NUAIKO(config)# int f0/1

NUAIKO(config-if)# description LAN Sales NUAIKO(config-if)# end NUAIKO#

*Mar 1 02:05:48.919: %SYS-5-CONFIG_I: Configured from console by console

搜索更多关于: 01-交换机基本配置 的文档
01-交换机基本配置.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c0z4sf6bimn4mu7425eek_1.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top