计算机网络原理实验二──二层交换机基本配置
2021-4-23
| 2023-3-27
0  |  Read Time 0 min
type
status
date
slug
summary
tags
category
icon
password

预先准备

先在 CPT(Cisco Packet Tracer) 上放置两个PC,两个Switch,然后将PC与各自的 Switch 通过 Copper Straight-Through 连接,交换机之间通过 Copper Cross-over 连接,此处两个 Switch 使用 2950-24 型号,将Switch的0/1口和PC进行连接,将Switch的0/24口相互连接。
我们的目的是将这四个设备划分在一个 VLAN(VLAN 10) 中。

接口与 VLAN 配置

查看vlan信息

双击 Switch 打开 CLI,默认是用户模式,输入enable进入特权模式,输入 show vlan 即可查看目前的VLAN状况,由此可见接口都默认接在VLAN1上。
输入 show running-config 也可以查看目前接口配置情况,输入 show history 可以查看命令执行历史记录

将接口划分到vlan

首先进入全局配置模式下,输入 configure terminal ,然后输入vlan 10创建新的vlan
可以看到上面多了一个vlan 10
然后修改 0/24 端口,此处要修改端口模式

更改PC的IP地址

各配置192.168.1.1(2),关闭保存,打开Command Prompt,尝试互相ping
配置成功

其他

输错指令进入域名解析

按 Ctrl+Shift+6 快捷键取消操作
 

Preparation

First, let's put two PCs and two switches(non-nintendo) into the Cisco Packet Tracer. The Cisco Packet Tracer can be downloaded here. Then connect two PCs to their own switch by Copper Straight-Through Line. It is important to keep in mind that you should use Copper Cross-over Line to connect two switches. We use the switch model 2950-24 here. Connect FastEthernet 0/1 of the switch with the port of the PC, and then connect FastEthernet 0/24 of the two switches each other.

Configuration of Interface and VLAN

View the information of VLAN

Double Click one of the switches and switch to CLI tab, whose default mode's User Mode. You should type "enable" to enter privilege mode. You can type "show vlan" to view the status of VLAN. By default, all interfaces are on vlan1.
 
To view the information of the current interface, type "show running-config". To view the command history, type "show history".
 

Divide the interface into the custom vlan

First, type "configure terminal" to enter global configuration mode. Then type "vlan 10" to create a new vlan. Type "do show vlan" after that, you will find the newly created vlan.
 
 
Then change the mode of fastEthernet 0/24 to trunk mode.

Set IP Address for PCs

Set the IP of PC1 to 192.168.1.1, set the IP of PC2 to 192.168.1.2, then close the window to save the configuration. Open the Command Prompt. Try pinging PC2 from PC1, you're cool when you got the reply from PC2.

Other Problem

Incorrectly Enter Command and Go to Resolving Domain

Press Ctrl+Shift+6 to cancel the operation.
 

At the End

From now on, I will try to use Chinese and English in each post. I want to improve my English by doing this. So if you find a mistake in the post, or even a grammatical mistake, please leave a message below the article. It is my pleasure to listen to your criticisms and suggestions!
 
学习思考
  • 学习
  • 计算机网络原理实验四──路由器基本配置来!试试用 iPad 来写代码吧!
    • GitTalk
    Catalog