《计算机网络原理》实验指导书/实验二:虚拟局域网与ⅥAN间通信 实验二:虚拟局域网与VLAN间通信 实验目的 1、理解交换机的工作原理; 2、掌握交换机的带外管理和带内管理的基本方法 3、理解虚拟局域网(VLAN)的基本概念和原理 4、掌握在多台二层交换机间划分虚拟局域网的详细内容和操作命令 5、掌握VLAN间通信的基本原理与配置方法。 、实验学时 2学时 三、实验类型 综合型 四、实验需求 硬件 每人配备计算机1台。 2、软件 Windows7以上操作系统,安装GNS3网络仿真与Ⅴ irtualBox虚拟化软件,安装 Puty软件。 3、网络 实验室局域网支持,能够访问校园网。 4、工具 无 五、实验理论 1、局域网的基本原理; 2、二层交换机的工作原理 3、虚拟局域网的基本原理 4、局域网组网的基本方法和基本流程 5、VLAN间路由的基本知识 六、实验任务 1、完成基于二层交换机的局域网的建设 2、完成交换机端口配置的具体操作,并能够完整读取交换机端口信息: 3、完成在2台二层交换机间划分虚拟局域网和网络功能测试 息管理与信息系统教研室/阮晓龙/13938213680/第1页
《计算机网络原理》实验指导书 / 实验二:虚拟局域网与 VLAN 间通信 信息管理与信息系统教研室 / 阮晓龙 / 13938213680 / 第 1 页 实验二:虚拟局域网与 VLAN 间通信 一、实验目的 1、理解交换机的工作原理; 2、掌握交换机的带外管理和带内管理的基本方法; 3、理解虚拟局域网(VLAN)的基本概念和原理; 4、掌握在多台二层交换机间划分虚拟局域网的详细内容和操作命令; 5、掌握 VLAN 间通信的基本原理与配置方法。 二、实验学时 2 学时 三、实验类型 综合型 四、实验需求 1、硬件 每人配备计算机 1 台。 2、软件 Windows 7 以上操作系统,安装 GNS3 网络仿真与 VirtualBox 虚拟化软件,安装 Putty 软件。 3、网络 实验室局域网支持,能够访问校园网。 4、工具 无。 五、实验理论 1、局域网的基本原理; 2、二层交换机的工作原理; 3、虚拟局域网的基本原理; 4、局域网组网的基本方法和基本流程; 5、VLAN 间路由的基本知识。 六、实验任务 1、完成基于二层交换机的局域网的建设; 2、完成交换机端口配置的具体操作,并能够完整读取交换机端口信息; 3、完成在 2 台二层交换机间划分虚拟局域网和网络功能测试
《计算机网络原理》实验指导书/实验二:虚拟局域网与ⅥAN间通信 七、实验内容及步骤 交换机管理 (1)打开GNS3软件,将 EtherSwitch拖拽到GNS3工作台中,右击交换机,点击 【 start】按钮,开启交换机。右击交换机,点击【 console】按钮,进入交换机配置界面, 如图2-1所示。 exit” to apply the To view existing vlans use the command us1mgan。1d 图2-1交换机配置界面 对交换机端口配置进行管理,是进行交换机管理的基本操作,也是网管人员进行网 络管理的基本素养。 (2)查看交换机的全部端口信息 查看交换机所有端口的状态 SW-1#show interface status 查看交换机所有端口详细信息 SW-1#show interface (3)查看指定端口的信息 查看交换机端口0/1的状态 SW-1#show interfaces FastEthernet 0/1 FastEtherneto/1 is administratively down, line protocol is down Hardware is Fast Ethernet, address is cc010884 f001(bia cc010884 f001) Description:“ Unused for Layer2 Ether Switch“ MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec. reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Keepalive set(10 sec) Auto-duplex, Auto-speed ARP type: ARPA, ARP Timeout 04: 00: 00 Last input never, output never, output hang never Last clearing of"show interface"counters never Input queue: 0/75/0/0(size/max/drops/flushes); Total output drops: 0 Output queue: 0/40(size/max) 息管理与信息系统教研室/阮晓龙/13938213680/第2页
《计算机网络原理》实验指导书 / 实验二:虚拟局域网与 VLAN 间通信 信息管理与信息系统教研室 / 阮晓龙 / 13938213680 / 第 2 页 七、实验内容及步骤 1、交换机管理 (1)打开 GNS3 软件,将 EtherSwitch 拖拽到 GNS3 工作台中,右击交换机,点击 【start】按钮,开启交换机。右击交换机,点击【console】按钮,进入交换机配置界面, 如图 2-1 所示。 对交换机端口配置进行管理,是进行交换机管理的基本操作,也是网管人员进行网 络管理的基本素养。 (2)查看交换机的全部端口信息 查看交换机所有端口的状态 SW-1#show interface status 查看交换机所有端口详细信息 SW-1#show interface (3)查看指定端口的信息 查看交换机端口 0/1 的状态 SW-1#show interfaces FastEthernet 0/1 FastEthernet0/1 is administratively down, line protocol is down Hardware is Fast Ethernet, address is cc01.0884.f001 (bia cc01.0884.f001) Description: *** Unused for Layer2 EtherSwitch *** MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Keepalive set (10 sec) Auto-duplex, Auto-speed ARP type: ARPA, ARP Timeout 04:00:00 Last input never, output never, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: fifo Output queue: 0/40 (size/max) 图 2-1 交换机配置界面
《计算机网络原理》实验指导书/实验二:虚拟局域网与ⅥAN间通信 5 minute output rate 0 bits/sec, 0 packets/sec 0 packets input, 0 bytes, 0 no buffer Received broadcasts, O runts, 0 giants, 0 throttles 0 input errors, 0 CRC, O frame, 0 overrun, 0 ignored 0 input packets with dribble condition detected 0 packets output, 0 bytes, O under 0 output errors, 0 collisions, 2 interface resets O unknown protocol drops o babbles. 0 late collision. 0 deferred 0 lost carrier. 0 no carrier 0 output buffer failures, 0 output buffers swapped out 阅读 Fastetherneto1的端口信息,并将端口信息所表达的含义填写到表2-1中, 表2-1 FastEthernet0/1端口信息含义 (4)配置端口的描述信息 进入交换机配置模式 SW-1#configure termina 进入业务端口配置模式 SW-1(config)#interface FastEthernet 0/1 配置交换机0/1端口的描述信息为: This is a fast ethernet interface Sw-1(config-if) #description This is a fast ethernet interface 查看端口信息,可以看到己经发生了变化 SW-1#show interfaces FastEthernet 0/1 Hardware is Fast Ethernet, address is cc010884 f001(bia cc010884 f001) 息管理与信息系统教研室/阮晓龙/13938213680/第3页
《计算机网络原理》实验指导书 / 实验二:虚拟局域网与 VLAN 间通信 信息管理与信息系统教研室 / 阮晓龙 / 13938213680 / 第 3 页 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 0 packets input, 0 bytes, 0 no buffer Received 0 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 0 input packets with dribble condition detected 0 packets output, 0 bytes, 0 underruns 0 output errors, 0 collisions, 2 interface resets 0 unknown protocol drops 0 babbles, 0 late collision, 0 deferred 0 lost carrier, 0 no carrier 0 output buffer failures, 0 output buffers swapped out 阅读 FastEthernet0/1 的端口信息,并将端口信息所表达的含义填写到表 2-1 中。 表 2-1 FastEthernet0/1 端口信息含义 (4)配置端口的描述信息 进入交换机配置模式 SW-1#configure terminal 进入业务端口配置模式 SW-1 (config)#interface FastEthernet 0/1 配置交换机 0/1 端口的描述信息为:This is a fast ethernet interface SW-1 (config-if)#description This is a fast ethernet interface 查看端口信息,可以看到已经发生了变化。 SW-1#show interfaces FastEthernet 0/1 Hardware is Fast Ethernet, address is cc01.0884.f001 (bia cc01.0884.f001)
《计算机网络原理》实验指导书/实验二:虚拟局域网与ⅥAN间通信 Description: This is a fast ethernet interface MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Auto-duplex, Auto-speed ARP type: ARPA, ARP Timeout 04: 00: 00 Last input never, output never, output hang never Last clearing of"show interface"counters never Input queue: 0/75/0/0(size/max/drops/flushes); Total output drops: 0 fifo Output queue: 0/40(size/max) 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rateO bits/sec, 0 packets/sec 0 packets input, 0 bytes, 0 no bu Received 0 broadcasts, O runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 0 input packets with dribble condition detected 0 output errors, 0 collisions, 2 interface resets o babbles. 0 late collision. 0 deferred 0 lost carrier. 0 no carrier 0 output buffer failures, 0 output buffers swapped out (5)配置端口的速率和双工模式 SW-1(config)#interface FastEthernet 0/1 SW-1(config-if)#speed 100 Force 100 Mbps operation auto Enable AUTO speed configuration 配置端口速率为自适应 SW-1(config-if) #speed auto SW-1(config-if)duplex? auto Enable AUTO duplex configuration full Force full duplex operation half Force half-duplex operation 配置端口为全双工模式 SW- (6)配置端口的带宽控制 SW-1(config-if)#bandwidth <1-10000000> Bandwidth in kilobits pecify that bandwidth is inherited receive Specify receive-side bandwidth 配置端口的接收数据的带宽为10Mbps SW-1(config-if) #bandwidth receive 10 取消端口带宽限制。 Sw-1(config-if)#no bandwidth receive (7)禁用和启用端口 息管理与信息系统教研室/阮晓龙/13938213680/第4页
《计算机网络原理》实验指导书 / 实验二:虚拟局域网与 VLAN 间通信 信息管理与信息系统教研室 / 阮晓龙 / 13938213680 / 第 4 页 Description: This is a fast ethernet interface MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Keepalive set (10 sec) Auto-duplex, Auto-speed ARP type: ARPA, ARP Timeout 04:00:00 Last input never, output never, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: fifo Output queue: 0/40 (size/max) 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 0 packets input, 0 bytes, 0 no buffer Received 0 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 0 input packets with dribble condition detected 0 packets output, 0 bytes, 0 underruns 0 output errors, 0 collisions, 2 interface resets 0 unknown protocol drops 0 babbles, 0 late collision, 0 deferred 0 lost carrier, 0 no carrier 0 output buffer failures, 0 output buffers swapped out (5)配置端口的速率和双工模式 SW-1 (config)#interface FastEthernet 0/1 SW-1(config-if)#speed ? 10 Force 10 Mbps operation 100 Force 100 Mbps operation auto Enable AUTO speed configuration 配置端口速率为自适应。 SW-1(config-if)#speed auto SW-1(config-if)#duplex ? auto Enable AUTO duplex configuration full Force full duplex operation half Force half-duplex operation 配置端口为全双工模式。 SW-1(config-if)#duplex full (6)配置端口的带宽控制 SW-1(config-if)#bandwidth ? <1-10000000> Bandwidth in kilobits inherit Specify that bandwidth is inherited receive Specify receive-side bandwidth 配置端口的接收数据的带宽为 10Mbps。 SW-1(config-if)#bandwidth receive 10 取消端口带宽限制。 SW-1(config-if)#no bandwidth receive (7)禁用和启用端口
《计算机网络原理》实验指导书/实验二:虚拟局域网与ⅥAN间通信 禁用端口 SW-1(config-if)#shutdown 启用端口 SW-1(config-if)#no shutdown 2、虚拟局域网 (1)拓扑设计 本实验采用2台交换机(SW-1,SW-2),6台主机(ost-1、Host-2、Host-3、Host- 4、Host-5、Host6),主机通过GNS3中自带的VPCS虚拟主机实现,网络拓扑结构如 图22所示 eth0 图22简单网络结构 (2)按照拓扑结构设计,在GNS3环境下完成局域网建设,如图2-3所示。 S-1 eth0 m器m Host-I e0/15 Host-2 Host-3 Host-5 e0/3 eth0 eth0 Host-4 图2-3简单网络结构 (3)网络地址规划与VLAN规划设计方案见表22所示 息管理与信息系统教研室/阮晓龙/13938213680/第5页
《计算机网络原理》实验指导书 / 实验二:虚拟局域网与 VLAN 间通信 信息管理与信息系统教研室 / 阮晓龙 / 13938213680 / 第 5 页 禁用端口。 SW-1(config-if)#shutdown 启用端口 SW-1(config-if)#no shutdown 2、虚拟局域网 (1)拓扑设计 本实验采用 2 台交换机(SW-1,SW-2),6 台主机(Host-1、Host-2、Host-3、Host- 4、Host-5、Host-6),主机通过 GNS3 中自带的 VPCS 虚拟主机实现,网络拓扑结构如 图 2-2 所示。 (2)按照拓扑结构设计,在 GNS3 环境下完成局域网建设,如图 2-3 所示。 (3)网络地址规划与 VLAN 规划设计方案见表 2-2 所示。 图 2-2 简单网络结构 图 2-3 简单网络结构