实验目的:掌握交换机的基本信息的配置管理。
实验设备:交换机2台,PC 2台,直连线,配置线。
实验原理简介:
Packet Tracer是cisco公司开发,用于网络设计、配置以及排除故障的模拟软件,非常适合网络设备初学者使用。
对交换机的管理主要分为:带内管理,带外管理。带内管理,即通过Telnet、拨号等方式;带外管理,通过交换机的Console端口管理交换机方式,该方式不占用交换机的网络端口,而且第一次配置交换机必须使用Console端口进行配置。
交换机的操作模式:
用户模式 Switch> //enable进入特权模式
特权模式 Switch# //config terminal进行全局模式
全局模式 Switch(config)# //config interface faX进行端口faX
端口模式 Switch(config-if)# //对端口作相应的配置操作
实验要求:通过两台PC机互连成一个小型局域网,设置PC的IP地址、更改交换机名称(交换机名称改为自己姓名的拼音),设置交换机密码为“cisco”,验证PC机间的互通性;第一次配置交换机必须利用Console端口进行配置,作为初始配置与管理,通过Console端口对交换机进行端口进行配置。
网络拓扑图:
配置IP:
PC0
IP: 192.168.1.2
Submask: 255.255.255.0
Gateway: 192.168.1.1
PC1
IP: 192.168.1.3
Submask: 255.255.255.0
Gateway: 192.168.1.1
更改交换机名:
Switch>enable
Switch#conf t
Switch(config)#hostname sw1 //交换机名字
设置端口:
S2960(config)#interface fa 0/1
S2960(config-if)#speed 100
S2960(config-if)#duplex full //全双工
S2960(config-if)#exit
同时将PC的网卡改成全双工模式,100M速率,否则链路不通
密码设置:
Switch(config)#enable password cisco //激活特权模式密码为cisco
Switch(config)#line console 0
Switch(config-line)#password cisco
Switch(config-line)#login
Switch(config-line)#exit
Switch(config)#exit
Switch# exit
密码取消:
Switch(config)#no enable password //取消特权模式密码
Switch(config)#line console 0
Switch(config-line)#no password//取消密码
信息查看:
Switch#show run