1、路由交换 B10040101 王欣源实 验 报 告(2011/ 2012 学年 第 一 学期)课程名称开放实验实验名称网络设备路由器和交换机的配置及应用实验时间2011年11月6/12/13日指导单位计算机实验教学中心指导教师彭红姣学生姓名王欣源班级学号B10040101学院(系)计算机学院专 业计算机科学与技术网络设备路由器和交换机的配置及应用一、实验目的掌握网络通信设备路由器和交换机的安装、连接和配置,掌握局域网的规划和组建,基本网络安全配置和访问管理。二实验环境 本实验是在软件Packet tracer上实现网络拓扑的构建及相关设备的配置,包括路由器参数的配置,交换机参数的配置,VLAN
2、虚拟局域网构建及配置。三、实验要求 实验要求完成以下工作:1根据网络规划和设计,连接路由器和交换机,构成小型局域网互联; 2按照网络规划,配置路由器和交换机参数,实现网络互联; 3在基本网络互联完成的基础上,设置网络访问规则,实现安全控制; 4根据网络规划,实现虚拟局域网VLAN的设置; 5测试在网络互联和访问控制条件下,对网络服务的应用掌握网络通信设备路由器和交换机的安装、连接和配置,掌握局域网的规划和组建,基本网络安全配置和访问管理。四、实验过程(注:以下为具体的实验配置)1. 拓扑图:2. 路由器交换机的配置过程(以下顺序可以自己按情况调整)1.首先将装置连接好。2.对2950型路由器进
3、行trunk配置interface f0/4-交换机之间连接的接口 switchport mode trunk3.对3560交换机进行trunk配置interface f0/4 switchport trunk encapsulation dot1q switchport mode trunk在trunk配置成功的前提下进行vtp配置:对核心交换机配置:Switch(config)#vtp domain NUPTChanging VTP domain name from NULL to NUPTSwitch(config)#vtp mode ? client Set the device to
4、 client mode. server Set the device to server mode. transparent Set the device to transparent mode.Switch(config)#vtp mode serverDevice mode already VTP SERVER.对client路由器配置:Switch(config)#vtp mode ? client Set the device to client mode. server Set the device to server mode. transparent Set the devic
5、e to transparent mode.Switch(config)#vtp mode clientSetting device to VTP CLIENT mode.4.在核心交换机上划分网络:Switch(config)#vlan 10Switch(config-vlan)#name qweSwitch(config-vlan)#exitSwitch(config)#vlan 20Switch(config-vlan)#name asdSwitch(config-vlan)#end5.在2940路由器上将电脑划分到不同网络上:Switch(config)#interface range
6、 f0/1-2Switch(config-if-range)#switchport access vlan 10Switch(config-if-range)#endSwitch#Switch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface f0/3Switch(config-if)#switchport access vlan 20Switch(config-if)#end6.进行DHCP配置:Switch(config)#interface vlan 10%
7、LINK-5-CHANGED: Interface Vlan10, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to upSwitch(config-if)#ip address 1.1.10.1 255.255.255.0Switch(config-if)#exitSwitch(config)#interface vlan 20%LINK-5-CHANGED: Interface Vlan20, changed state to up%LINEPROTO-5-
8、UPDOWN: Line protocol on Interface Vlan20, changed state to upSwitch(config)#ip dhcp pool vlan10Switch(dhcp-config)#network 1.1.10.0 255.255.255.0Switch(dhcp-config)#default-router 1.1.10.1Switch(dhcp-config)#dns-server 8.8.8.8Switch(dhcp-config)#exitSwitch(config)#ip dhcp pool vlan20Switch(dhcp-con
9、fig)#network 1.1.20.0 255.255.255.0Switch(dhcp-config)#default-router 1.1.20.1Switch(dhcp-config)#dns-server 8.8.8.8 Switch(dhcp-config)#exitSwitch(config)#ip dhcp excluded-address 1.1.10.1Switch(config)#ip dhcp excluded-address 1.1.20.1Switch#7.自动获取ip地址(配置文档):Switch#show runBuilding configuration.C
10、urrent configuration : 1535 bytes!version 12.2no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption!hostname Switchip dhcp excluded-address 1.1.10.1ip dhcp excluded-address 1.1.20.1!ip dhcp pool vlan10 network 1.1.10.0 255.255.255.0 default-ro
11、uter 1.1.10.1 dns-server 8.8.8.8ip dhcp pool vlan20 network 1.1.20.0 255.255.255.0 default-router 1.1.20.1 dns-server 8.8.8.8interface FastEthernet0/1 switchport trunk encapsulation dot1q switchport mode trunk!interface FastEthernet0/2 switchport trunk encapsulation dot1q switchport mode trunk!inter
12、face FastEthernet0/3!interface FastEthernet0/4!interface FastEthernet0/5!interface FastEthernet0/6!interface FastEthernet0/7!interface FastEthernet0/8!interface FastEthernet0/9!interface FastEthernet0/10!interface FastEthernet0/11!interface FastEthernet0/12!interface FastEthernet0/13!interface FastE
13、thernet0/14!interface FastEthernet0/15!interface FastEthernet0/16!interface FastEthernet0/17!interface FastEthernet0/18!interface FastEthernet0/19!interface FastEthernet0/20!interface FastEthernet0/21!interface FastEthernet0/22!interface FastEthernet0/23!interface FastEthernet0/24!interface GigabitE
14、thernet0/1!interface GigabitEthernet0/2!interface Vlan1 no ip address shutdown!interface Vlan10 ip address 1.1.10.1 255.255.255.0!interface Vlan20 ip address 1.1.20.1 255.255.255.0!-测试结果图-(在下页)(右侧类似,截图省略)下面对各个PC机进行ping的结果如下:(其他的省略)在不同的vlan的划分区域中,不同的PC机之间能够互相ping通,说明实验成功。最后的结果,个串口间全为绿色。如图(下页)实验小结:对网络设备路由器和交换机的配置及应用有了一定的了解。由于之前没有接触过,配置命令以及实验环境都不是很熟悉,做的时候顺序总是搞错,例如,在没有配置好vtp的时候就开始划分网络,没有配置trunk的时候就配置vtp。导致总是做不出来。多做了几次以及与同学交流讨论,上网查询相关的信息后,才渐渐的了解掌握了网络设备路由器和交换机的配置。也熟悉了一些路由器交换机的简单配置命令。通过这次的实验我初步认识了路由器及交换机的命令的配置。指导老师评阅:等级: 评阅老师: 评阅时间:
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1