拓扑图
扩展
重启命令(重新加载配置):reload
1 配置交换机设备名称
配置命令:
enable
config terminal
hostname 设备名称
配置实操:
Switch>enable
Switch#config terminal
Switch(config)#hostname AA
AA(config)#
2查看配置
配置命令:
enable
config terminal
hostname 设备名称
配置实操:
Switch>enable
Switch#config terminal
Switch(config)#hostname AA
AA(config)#
图1
3配置交换机密码
进入特权模式需要密码
配置命令:
1 enable
config terminal
enable password 密码文本 <<明文密码
2 enable secret 密码文本 <<密文密码
见图2
配置实操:
1 enable password 123456 <<密码为数字123456
2 enable secret 1234567 <<密码为数字1234567
图2
4保存配置
在交换机配置完命令后保存配置命令
配置命令:
1 enable
writ
见图3
其他方法:
2 copy running-config startup-config
<<running-config当前交换机系统中正在运行的配置文件 <<startup-config交换机启动时需要加载的配置文件
配置实操:
1 swatch#write
Building configuration...
[OK] <2 wrsdfffffffassdfasdfasdfasdf <提示
2 swatch#copy running-config startup-config
Destination filename [startup-config]? <<提示符 回车就可以
Building configuration...
[OK] << 提示
图3
5线路连接与密码配置
配置命令:
enable
config terminal
line console 0 <<
见图4
配置实操:
line console 0
password 123456 << 设置密码
login <<登录验证
图4
6配置交换机管理ip VLAN
配置命令:
enable
config terminal
interface VLAN 1 <<
ip address <<ip地址
no shutdown <<开启端口
见图5
配置实操:
swatch(config)#interface vlan 1
swatch(config-if)#ip address 192.168.1.1 255.255.255.0
swatch(config-if)#no shutdown
图5
保存配置命令
验证是否将ip放到VLAN中
查看命令:
1 swatch#show ip interface brief
2 ping ip地址
验证
见图6.1,6.2
使用ping 命令查看是否可以通信
7开启远程管理
配置命令:
enable
config terminal
line vty 0 4 <<可以设置多个远程管理线路 其中的0 4指01234共5条线路
password 123456 <<设置密码
login <<设置登录验证
在cmd窗口使用 telnet ip地址进行验证
见图7.1 7.2
配置实操:
swatch(config)#line vty 0 4
swatch(config-line)#password 123456
swatch(config-line)#login
图7.1
图7.2