实验目标 掌握交换机基本信息的配置管理 实验背景 某公司新进一批交换机,在投入网络以后要进行初始配置与管理,你作为网络管理员,对交换机进行端口的配置与管理。 技术原理
交换机的管理方式基本分为两种:带内管理和带外管理。 通过交换机的Console端口管理交换机属于带外管理;这种管理方式不占用交换机的网络端口,第一次配置交换机必须利用Console端口进行配置。 交换机的命令行操作模式主要包括: 用户模式Switch>特权模式Switch#全局配置模式Switch(config)#端口模式Switch(config-if)#实验步骤:
新建Packet Tracer拓扑图了解交换机端口配置命令行 修改交换机名称(hostmame X)配置交换机端口参数(speed,duplex)查看交换机版本信息(show version)查看当前生效的配置信息(show running-config)查看保存在NVRAM中的启动配置信息(show startup-config)查看端口信息Switch#show interface查看交换机的MAC地址表Switch#show mac-address-table选择某个端口Switch(config)#interface type mod/port(type表示端口类型,通常有ethernet、Fastethernet、Gigabitethernet)(mod表示端口所在的模块,port表示在该模换l的编号例如interface fastethernet0/1)选择多个端口Switch(config)#interface type mod/startport-endport设置端通信速度Switch(config-if)#speed [10/100/auto]设置端口单双工模式Switch(config-if)#duplex [half/full/auto]交换机、路由器中有很多密码,设置对这些密码可以有效的提高设备的安全性。switch(config)#enable password******设置进入特权模式的密码switch(config-line)可以设置通过console 端口连接设备及Telnet远程登录时所需的密码switch(config)#line console 0 表示配置控制台线路,0是控制台的线路编号switch(config-line)#login 用于打开登录认证功能switch(config-line)#password 5ijsj 设置进入控制台访问的密码若交换机设置为auto以外的具体速度,此时应注意保证通信双方也要有相同的设置值。注意事项:在配置交换机时,要注意交换机端口的单双工模式的匹配,如果链路一端设置的是全双工,另一端是自动协商,则会造成响应差和高出错率,丢包现象会很严重。通常两端设置为相同的模式。实验设备 Switch_2960 1台;PC1台;配置线;直通线
PC console端口 Switch>enableSwitch#conf t Switch(config)#hostname S2960 S2960(config)#interface fa 0/1 S2960(config-if)#speed100 S2960(config-if)#duplex full S2960(config-if)#exit 同时将PC的网卡改成全双工模式,100M速率,否则链路不通 S2960(config)#hostname Switch Switch(config)#exit Switch#show version Switch#show run Switch#show interface Switch#show mac-address-table Switch#config t Switch(config)#enable password cisco //激活特权模式密码为cisco Switch(config)#no enable password //取消特权模式密码 Switch(config)#line console 0 Switch(conifig-line)#password cisco Switch(config-line)#login Switch(config-line)#no password //取消密码