实验提示:不同的命令要在不同的模式下才能执行。
实验步骤:
1、给交换机命名。
要进入全局模式才可以给交换机命名。(波浪线为自动产生的内容)
Switch>en进入特权配置模式
Switch#conf t进入全局配置模式
Switch(config)#hostname fashion 给交换机命名为fashion
fashion(config)#
可以使用no hostname来取消命名。
2、设置交换机的IP地址及默认网关。
VLAN1是管理VLAN,Vlan1接口属于VLAN1,是交换机上的管理接口,此接口上的IP地址将用于对此交换机的管理,如Telnet、HTTP和SNMP等。
fashion(config)#int vlan 1进入端口配置模式
fashion(config-if)#ip address 192.168.10.1 255.255.255.0设置交换机的IP地址和子网掩码为192.168.10.1 255.255.255.0
fashion(config-if)#no shutdown启用该端口 fashion(config-if)#exit回到全局配置模式
fashion(config)#ip default-gateway 192.168.10.89设置交换机默认网关为192.168.10.89 可以使用show ip intece来查看交换机的IP地址。
3、设置交换机的密码。
fashion(config)#en password 1234设置登录交换机的密码为1234
fashion(config)#en secret 12345设置进入特权模式密码为12345
fashion(config)#line console 0进入控制模式
fashion(config-line)#password 1234设置控制口密码为1234
fashion(config-line)#login
fashion(config-line)#line vty 0 5进入线路模式
fashion(config-line)#password 12345 设置线路口密码为12345
fashion(config-line)#login
线路口密码是使用telnet登录到交换机时的密码。
4、设置交换机端口速率和通信模式并对端口进行描述。
fashion(config)#int fa0/1进入1号端口配置模式
fashion(config-if)#speed 100设置1号端口速率为100Mbps
fashion (config-if)#duplex ?
auto Enable AUTO duplex configuration
full Force full duplex operation
half Force half-duplex operation
fashion(config-if)#duplex full设置1号端口为全双工模式
fashion(config-if)# description TO PC1 设置1号端口名字为TO PC1
可以使用no description来取消命名。
如果有多个端口要设置可以通过下面的命令来实现。
fashion(config)#int range fa 0/1 ? 5进入组端口配置模式
fashion(config-if-range)#speed 100
fashion(config-if-range)#duplex full
fashion(config-if-range)#exit
fashion(config)#
5、显示配置情况。
show inteces [intece-id]显示所有端口或某一端口的状
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/tongxinshuyu/article-24084-10.html
择机升级应该是选项了