交换机的基本配置,交换机级联实现PC之间的互通

更新时间:2023-12-18 00:54:01 阅读量: 教育文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

交换机的配置模式 1、 用户模式 2、 特权模式 3、 全局配置模式 4、 接口配置模式 5、 Line模式

实验任务:

一、简单了解PT软件。(是一种模拟器软件,可以模拟路由器和交换机) 1、 选定交换机的图标,完成拓扑结构如图

二、完成交换机各种模式的进入

1、 双击交换机图标----选择CLI标签

2、 熟悉用户模式:如何进入,提示符是什么? 3、 熟悉特权模式:同上 4、 熟悉全局配置模式:同上 5、 接口配置模式:同上 6、 Line模式:同上

7、 双击计算机图标---desktop----ip configuration ,设置IP和子网掩码,分别为192.168.1.1-4,

子网掩码为255.255.255.0。

8、 双击计算机图标---desktop----command prompt ,使用ping 不同计算机的IP,查看结果。、

三、熟悉交换机的基本配置

1、 设置交换机主机名switch(config)#hostname 主机名

2、 进入特权模式的两种密码,switch(config)#enable password 密码 switch(config)#enable secret 密码

然后从用户模式切换特权模式时看有什么变化?

3、 给2950设置IP地址192.168.1.100 子网掩码为255.255.255.0。 4、 查看交换机相关配置:switch#show run Switch#show mac Switch#show vlan

5、 保存配置 switch#write

Switch#copy run start

? 实验2 交换机的基础命令 【实验要求】

1、 设置交换机的时钟为当前正确的年月日时分秒

2、 设置交换机退出特权用户配置模式的超时时间为 6分钟 3、 设置主机名为 server 的主机的 IP 地址为 172.18.0.5 4、 设置交换机的提示符为sxszjzx 5、 保存交换机的配置信息 【实验步骤】

switch#clock set 9:28:00 2006.11.2 switch(Config)#exec timeout 6

switch(Config)#ip host server 172.18.0.5 switch(Config)#hostname sxszjzx sxszjzx#write 【实验验证】

sxszjzx#show clock 能正确显示时间表示要求1已经设置正确 察看running-config文件中的内容 sxszjzx#show running-config hostname sxszjzx

ip host server 172.18.0.5 exec timeout 6

sxszjzx#show startup-config 内容与show running-config内容相同表示要求5已经操作正确

? 实验3备份交换机的当前配置文件running-config 【实验要求】

1、 本机电脑下载并安装TFTP服务器软件,并配置TFTP的根目录在E:\\ 2、 交换机指定IP地址,并用网线连接交换机和电脑

3、 上传交换机的当前配置文件running-config到TFTP根目录,文件名为running-config 【实验步骤】

下载、安装TFTP服务器,并设置view-options-TFTP server root为E:\\ switch>enable switch#config

switch(Config)#interface vlan 1

switch(Config-If-Vlan1)#ip address 192.168.11.81 255.255.255.0

switch(config-if-vlan1)exit switch(config)#exit

switch#copy running-config tftp://192.168.11.100/running-config 【实验验证】

在电脑的E:\\找到running-config表示备份成功

? 实验4 端口管理 【实验要求】

1、设置 0/0/1-8 号端口数据接收和发送的限制带宽为 40M 2、打开 0/0/1-8号端口的流控功能

3、设置 0/0/1-8号端口连接的网线为交叉线

4、交换机所有端口最多允许每秒钟通过 3个广播数据报 5、把端口9设置为强制100M、全双工 6、关闭端口9

7、设置端口镜像:10-12端口为源端口,13端口为目的端口 【实验步骤】

Switch(Config)#interface ethernet 0/0/1-8

Switch(Config-Port-Range)#bandwidth control 40 both Switch(Config-Port-Range)#flow control Switch(Config-Port-Range)#mdi across Switch(Config-Port-Range)#exit

Switch(Config)#broadcast-suppression 3 Switch(Config)#interface e0/0/9

Switch(Config-Ethernet0/0/9)#speed-duplex force100-full Switch(Config-Ethernet0/0/9)#shutdown switch(config-ethernet0/0/9)#exit

switch(config)# monitor session 1 source interface ethernet 0/0/10-12 Switch(Config)#monitor session 1 destination interface ethernet 0/0/13 【实验验证】

察看running-config文件中的内容 switch#show running-config broadcast-suppression 3

monitor session 1 source interface Ethernet0/0/10;Ethernet0/0/11;Ethernet0/0/ 12 both

monitor session 1 destination interface Ethernet0/0/13 Interface Ethernet0/0/1 flow control

bandwidth control 40 both mdi across ……

Interface Ethernet0/0/8 flow control

bandwidth control 40 both mdi across

Interface Ethernet0/0/9

speed-duplex force10-full mdi normal shutdown

? 实验5 跨交换机VLAN的配置 【实验要求】

1、建立VLAN100,把端口1-4划归VLAN100 2、建立VLAN200,把端口5-8划归VLAN200

3、把端口9设置为TRUNK口,允许所有VLAN通过 【实验步骤】

switch(config)#vlan 100

Switch(Config-Vlan100)# switchport interface ethernet 0/0/1-4 Switch(Config-Vlan100)#exit switch(config)#vlan 200

Switch(Config-Vlan200)# switchport interface ethernet 0/0/5-8 Switch(Config-Vlan200)#exit

Switch(Config)#interface ethernet 0/0/9

Switch(Config-ethernet0/0/9)#switchport mode trunk

Switch(Config-ethernet0/0/9)#switchport trunk allowed vlan all 【实验验证】

察看running-config文件中的内容 switch#show running-config Vlan 100 vlan 100 Vlan 200 vlan 200

Interface Ethernet0/0/1

switchport access vlan 100 ……

Interface Ethernet0/0/4

switchport access vlan 100 Interface Ethernet0/0/5

switchport access vlan 200 ……

Interface Ethernet0/0/8

switchport access vlan 200 Interface Ethernet0/0/9 switchport mode trunk

本文来源:https://www.bwwdw.com/article/1lv5.html

Top