实验一: 练习路由器与交换机的基本配置,熟悉网关工作原理
一、结构图
二、地址表
三、交换机的基本配置
- 配置交换机左边交换机和右边交换机的名称分别为S1和S2。
对左交换机:
Switch(config)#hostname S1
对右交换机:
Switch(config)#hostname S2
- 配置交换机S1的enable明文密码为:cisco
S1(config)#enable password cisco
- 配置交换机S2的enable 加密密码为:network
S2(config)#enable secret network
- 设置交换机S1的日期时间为:2019年9月9日 15:00
S1#clock set 15:00:00 9 September 2019
S1#show clock
15:0:6.957 UTC Mon Sep 9 2019
- 分别存储S1和S2的配置。
S1#copy running-config startup-config
S2#copy running-config startup-config
四、路由器的基本配置
- 配置交路由器的名称为MyRouter
Router(config)#hostname MyRouter
- 配置路由器的enable明文密码为:cisco
MyRouter(config)#enable password cisco
- 配置路由器的enable 加密密码为:network
MyRouter(config)#enable secret network
- 配置路由器FA0/0的IP地址(按上表)
MyRouter(config)#interface f0/0
MyRouter(config-if)#ip address 192.168.1.1 255.255.255.0
MyRouter(config-if)#no shut
- 配置路由器FA0/1的IP地址(按上表)
MyRouter(config)#int f0/1
MyRouter(config-if)#ip add 222.30.235.1 255.255.255.0
MyRouter(config-if)#no shut
- 存储路由器的配置。
这里是引用
五、计算机的基本配置
- 按上面图表所示配置计算机IP。(下图以PC1为例)
六、验证
-
验证上面所有计算机都是两两能够相互通信。(下图以PC1ping其他计算机为例,经验证,互相可通信)
-
需打开交换机与路由器连接的接口:
S1(config)#int f0/3
S1(config-if)#no shut
S2(config)#int f0/3
S2(config-if)#no shut