实验3 交换机的基本配置
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
实验三交换机的基本配置
一、实验目的
掌握交换机的基本管理特性,学习交换机配置的基本指令,配置交换机支持Telnet操作的相关指令。
二、实验环境
实验网络拓扑如下图所示。
SwitchA
三、实验的内容和要求
1. 网络设备模式的切换
2. 网络设备指令的使用技巧
3. 配置交换机的管理IP地址
4. 配置交换机密码
5. 保存对交换机所做的配置
四、实验说明
第一步:在交换机上配置管理IP地址
!开始配置
Press RETURN to get started!
Switch>enable 14 !进入特权模式
Password: star
Switch#configure terminal !进入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
SwitchA !配置交换机名称为“SwitchA”
Switch(config)#hostname
2002-12-22 14:32:04 @5-CONFIG:Configured from outband
1
!进入交换机管理接口配置模式
SwitchA(config)#interface
vlan
2002-12-22 14:32:21 @5-CONFIG:Configured from outband
SwitchA(config-if)#ip address192.168.0.138 255.255.255.0 !配置交换机管理接口IP地址2002-12-22 14:35:07 @5-CONFIG:Configured from outband
shutdown
!开启交换机管理接口
SwitchA(config-if)#no
2002-12-22 14:35:28 @5-CONFIG:Configured from outband
!结束并退出
SwitchA(config-if)#end
2002-12-22 14:35:30 @5-CONFIG:Configured from outband
SwitchA#show ip interface !验证交换机管理IP地址已经配置,管理接口已开启Interface : VL1
Description : Vlan 1
OperStatus : up
ManagementStatus : Enabled
Primary Internet address: 192.168.0.138/24
Broadcast address : 255.255.255.255
PhysAddress : 00d0.f8bc.9a54
!或
SwitchA#show interface vlan 1
Interface : Vlan 1
Description :
AdminStatus : up
OperStatus : up
Hardware : -
Mtu : 1500
LastChange : 0d:0h:0m:0s
ARP Timeout : 3600 sec
PhysAddress : 00d0.f8bc.9a54
ManagementStatus:Enabled
Primary Internet address: 192.168.0.138/24
Broadcast address : 255.255.255.255
第二步:配置交换机远程登录密码
configure
terminal
#
SwitchA
Enter configuration commands, one per line. End with CNTL/Z.
SwitchA (config)#enable secret level 1 0 123456 !设置远程登录密码为“123456”
2003-05-24 21:16:40 @5-CONFIG:Configured from outband
第三步:配置交换机特权模式密码
SwitchA (config)#enable secret level 14 0 654321!设置特权模式密码为“654321”
2003-05-24 21:17:04 @5-CONFIG:Configured from outband
验证测试:验证从PC机通过网络远程登录到交换机上后可以进入特权模式
第四步:保存在交换机上所做的配置
SwitchA#write
Building configuration...
[OK]
第五步:验证配置已保存
config
SwitchA#show
Using 254 out of 6291456 bytes
!
version 1.0
!
hostname SwitchA
vlan 1
!
enable secret level 1 5 &t;C,tZ[qu<D+S(\rv=G1X)ss:>H.Y*T
enable secret level 15 5 &t,1u_;Cqu-8U0<Drv.tj9=Gs+/7R:>H
!
interface vlan 1
no shutdown
ip address 192.168.0.138 255.255.255.0
!
end
注意事项:
交换机的管理接口缺省是关闭的(shutdown),因此在配置管理接口interface vlan 1的IP地址后须用命令“no shutdown”开启该接口。
五、完成实验报告。