实验一 S2126G交换机的基本配置 1.MAC地址老化时间功能测试

网络拓扑

clip_image002

clip_image003clip_image005

实验项目

MAC地址老化时间功能测试

实验环境

将STAR-S2126G的其中一以太网口连至PC的以太网口

实验配置

#config t

#mac-address-table aging-time 10

# Ctrl+Z

#show mac-address-table

实验过程

1.配置上述命令前,请用Setup 命令将交换机原有配置清除,使交换机的所有端口划分到在一个VLAN 中。并为其配置IP地址(与PC 为同一网段即可)如下所示:

Switch#setup

--- System Configuration Dialog ---

At any point you may enter a question mark '?' for help.

Use ctrl-c to abort configuration dialog at any prompt.

Default settings are in square brackets '[]'.

Continue with configuration dialog? [yes/no]:y

Enter IP address:192.168.9.1

Enter IP netmask:255.255.255.0

2.在PC上开一DOS窗口,运行命令:c:\>ping 192.168.9.1。

3.能ping通则在交换机上执行show mac-address-table 可查看到PC 的MAC地址,过了设置的MAC地址老化时间后再用show mac-address-table 命令查看,则此时的MAC地址表应为空。

实验结果

交换机应能根据所设的地址老化时间进行地址老化。

2.端口自协商测试

网络拓扑

STAR-S2126G

clip_image006clip_image007clip_image005[1]

实验项目

端口自协商测试

实验环境

将STAR-S2126G的其中一以太网口连至PC的以太网口1

实验配置

#config t

(config-if)# int fast 0/1

(config-if)# speed auto

(config-if)# duplex auto

实验过程

交换机的默认设置即为自协商,可不必配置以上命令。在操作的过程中将PC网卡的设置分别设为10M half、10M full、100M half、100M full。

在交换机上用show inter fast 0/1 进行验证。

实验结果

交换机与交换机之间或与网卡间能进行自协商。

端口速率/单双工测试

网络拓扑

STAR-S2126G

clip_image006[1]clip_image007[1]clip_image005[2]

实验项目

端口速率测试

实验环境

将STAR-S2126G 的其中一个以太网口连至PC的网卡

实验配置

#config t

(config-if)# int fast 0/1

(config-if)# speed {10 ,100}

(config-if)# duplex {full , half}

实验过程

分别将交换机的fast 0/1 口置为10M half、10M full、100M half、100M full。

在交换机上用show inter fast 0/1 进行验证。

实验结果 交换机的相应端口能根据设置的要求进行10M half、10M full、100M half、100M full的传输。

端口全双工/半双工流量控制测试

实验项目

测试端口在全双工或半双工工作方式下的流量控制

实验配置

#config t

(config-if)# int fast 0/1

(config-if)# duplex {full , half}

(config-if)# flowcontrol on