2017.4.18-afternoon

实验目标

l 掌握交换机基本信息的配置管理。

实验背景

l 某公司新进一批交换机,在投入网络以后要进行初始配置与管理,你作为网络管理员,对交换机进行端口的配置与管理。

技术原理

l 交换机的管理方式基本分为两种:带内管理和带外管理。

通过交换机的Console端口管理交换机属于带外管理;这种管理方式不占用交换机的网络端口,第一次配置交换机必须利用Console端口进行配置。

l 交换机的命令行操作模式主要包括:

l 用户模式 Switch>

l 特权模式 Switch#

l 全局配置模式 Switch(config)#

l 端口模式 Switch(config-if)#

实验步骤:

新建Packet Tracer拓扑图

l 了解交换机端口配置命令行

修改交换机名称(hostname 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表示端口类型,通常有ethernetFastethernetGigabitethernet)mod表示端口所在的模块,port表示在该模块中的编号)例如interface fastethernet0/1

选择多个端口Switch(config)#interface  type mod/startport-endport

设置端口通信速度Switch(config-if)#speed [10/100/auto]

设置端口单双工模式Switch(config-if)#duplex [half/full/auto]

l 交换机、路由器中有很多密码,设置对这些密码可以有效的提高设备的安全性。

l switch(config)# enable password ****** 设置进入特权模式的密码

l switch(config-line)可以设置通过console端口连接设备及Telnet远程登录时所需的密码;

l switch(config)# line console 0表示配置控制台线路,0是控制台的线路编号。

l switch(config-line)# login  用于打开登录认证功能。

l switch(config-line)# password 5ijsj  //设置进入控制台访问的密码

若交换机设置为auto以外的具体速度,此时应注意保证通信双方也要有相同的设置值。

注意事项:在配置交换机时,要注意交换机端口的单双工模式的匹配,如果链路一端设置的是全双工,另一端是自动协商,则会造成响应差和高出错率,丢包现象会很严重。通常两端设置为相同的模式。

实验设备

Switch_2960 1台;PC 1台;配置线;直通线

 

PC console端口

Switch>enable

Switch#conf  t

Switch(config)#hostname  S2960

S2960(config)#interface fa 0/1

S2960(config-if)#speed 100

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(config-line)#password cisco

Switch(config-line)#login

Switch(config-line)#no password//取消密码

原文地址:https://www.cnblogs.com/bgd140206202/p/6731649.html