计算机网络工程实验指导书
(基于华为路由器交换机)
计算机网络技术专业用
计算机系
实验 1 计算机和交换机的基本设置
1. 实验目的
(1) 学会计算机网中主机 IP 地址和网关地址的设置。
(2) 掌握主机与交换机间连通测试。
(3) 掌握交换机端口参数的设置,熟悉交换机私有地址的设定规则。
2. 实验拓扑结构
3. 实验内容与步骤
(1) 打开软件调用交换机和主机,建立实验拓扑要求的连接。
(2) 配置交换机名和密码,操作如下:
Quidway>system
password:
[Quidway]sysname switch ;交换机命名
[switch]super password simple 111 ;设置特权密码
[switch]user-interface vty 0 4
[switch-ui-vty0-4]authentication-mode password
[switch-ui-vty0-4]set authentication-mode password simple 222
[switch-ui-vty0-4]user privilege level 3
[switch-ui-vty0-4]quit
[switch]quit
(3) 配置并查看 VLAN
switch]vlan 2
[switch-vlan2]port ethernet0/2
[switch-vlan2]port e0/4 to et0/6
[switch-vlan2]quit
[switch]dis vlan
[switch]int e0/3
[switch-Ethernet0/3]port access vlan 2
[switch-Ethernet0/3]quit
[switch]dis vlan
[switch]dis curr
[switch]interface vlan 1
[switch-Vlan-interface1]ip address 10.65.1.8 255.255.0.0
[switch-Vlan-interface1]quit
[switch]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2
[switch]ip default-gateway 10.65.1.2
[switch]dis curr
[switch]save
实验 2 端口聚合配置
1. 实验目的
(1)熟悉端口聚合命令的使用场合与注意事项
(2)掌握端口聚合配置的基本方法
(3)了解端口的属性类型
2. 实验拓扑结构
3. 实验内容步骤
(1) 打开实验软件调用两台交换机并按实验拓扑连接
(2) 配置交换机 A 的端口参数
端口 E0/1
[Quidway]sysname SwitchA
[SwitchA]interface ethernet0/1
[SwitchA-Ethernet0/1]duplex full
[SwitchA-Ethernet0/1]speed 100
[SwitchA-Ethernet0/1]port link-type trunk
[SwitchA-Ethernet0/1]port trunk permit vlan all
端口 E0/2
[SwitchA-Ethernet0/1]int e0/2
[SwitchA-Ethernet0/2]duplex full
[SwitchA-Ethernet0/2]speed 100
[SwitchA-Ethernet0/2]port link-type trunk
[SwitchA-Ethernet0/2]port trunk permit vlan all
(3) 配置交换机 B 的端口参数
[Quidway]sysname SwitchB
[SwitchB]interface ethernet0/1
[SwitchB-Ethernet0/1]duplex full
[SwitchB-Ethernet0/1]speed 100
[SwitchB-Ethernet0/1]port link-type trunk
[SwitchB-Ethernet0/1]port trunk permit vlan all
[SwitchB-Ethernet0/1]int e0/2
[SwitchB-Ethernet0/2]duplex full
[SwitchB-Ethernet0/2]speed 100
[SwitchB-Ethernet0/2]port link-type trunk
[SwitchB-Ethernet0/2]port trunk permit vlan all
(4) 配置端口聚合
[SwitchA]link-aggregation ethernet0/1 to ethernet0/2 both
[SwitchB]link-aggregation ethernet0/1 to ethernet0/2 both
[SwitchA]display link-aggregation ethernet0/1
[SwitchA]undo link-aggregation all
4. 思考总结
(1) TRUNK 端口可否属于多个 VLAN?
(2) 如何测试 TRUNK 端口的工作状态?
实验 3 VLAN 的配置
1. 实验目的
(1) 掌握 VLAN 命令使用的基本原则
(2) 掌握 VLAN 划分的规则
(3) 熟悉 VLAN 地址的分配方法
(4) 学会如何测试 VLAN 间的连通性
2.实验拓扑结构
3.实验内容与步聚
(1)调用主机和交换机并按拓扑结构连
(2)配置交换机 A 的 VLAN
[SwitchA]vlan 2
[SwitchA-vlan2]port e0/2
[SwitchA-vlan2]port e0/3 to e0/4
[SwitchA-vlan2]vlan 3
[SwitchA-vlan3]port e0/5 to e0/6
[SwitchA]dis vlan all
[SwitchA]dis current
(3) 配置交换机 B 的 VLAN
[SwitchB]vlan 2
[SwitchB-vlan2]port e0/3 to e0/4
[SwitchB-vlan2]vlan 3
[SwitchB-vlan3]port e0/5 to e0/6
[SwitchB-vlan3]quit
[SwitchB]dis vlan all
[SwitchB]dis current
(4) 配置主机的 IP
设置计算机的 IP 为: