1、计算机网络实验报告(课程阶段:高级路由与交换技术)学号 姓名 实验时间 2012 年 6 月 20 日实验题目 实验地点 网络技术实验室( 2 ) 综合测试 座位编号 ( )指导教师 王飞 成绩 批改时间*实验概述: 实验题目:现有一家公司,有 3 个分公司在不同地区,每个分公司有多个部门(现设为 2 个) ,其员工分散在不同的办公间(现设为 2 个) ,为保证同一个部门的员工间可以直接共享资源,不同的部门间不能直接共享资源。总体要求:1、正确选择设备及实现平台,保证接口满足项目要求。2、正确连线形成的以上拓扑。3、选择合适的动态路由协议,保证分公司之间可以正常通信。4、需要保存当前配置,保证
2、下次运行时能够测试网络的运行。5、运行路由查看命令,结果有对应的动态路由显示在路由表中。【实验原理】通过配置路由协议及交换机,实现不同 vlan 的 PC 机连通。【实验环境】 (使用的硬件设备、软件或平台)1.Cisco Router2811 三台;2.计算机 12 台;3.2811 路由 3 台;实验内容: 【实验方案设计 表一:Pc 名称 IP 地址 网关0 192.168.11.11 192.168.11.11 192.168.11.111 192.168.11.12 192.168.12.11 192.168.12.13 192.168.12.111 192.168.12.14 19
3、2.168.23.11 192.168.23.15 192.168.23.111 192.168.23.16 192.168.24.11 192.168.24.17 192.168.24.111 192.168.24.18 192.168.35.11 192.168.35.19 192.168.35.111 192.168.35.110 192.168.36.11 192.168.36.111 192.168.36.111 192.168.36.1表 2 路由 IP 配置:接口 IP 配置R1(s1/1) 192.168.1.1R1(f0/1) 10.0.0.1R2(f0/1) 172.16.
4、0.5R2(s1/1) 192.168.1.9R3(f0/1) 10.0.0.2R3(f1/0) 172.16.0.11. 按照表 1 配置 pc 机 ip 地址,网关,子网掩码全部设为 255.255.255.0;2. vlan 划分按图一所示,对应模拟软件图;3. 设置交换机,划分 vlan;4. 设置路由,接口 IP 如表 2 所示;5. 测试连通性。【实验过程】 (实验步骤、记录、数据、分析)1按照上表配置 pc 的 IP 地址,网关,子网掩码全部设为 255.255.255.0;2.添加 router2 的接口 NM-2FE2W;添加 router0,router1 的接口 NM.8
5、A/s;3.按以下方式配置交换机 switch0,switch1:(1)创建 vlan 1,vlan 2:Switch#vlan database% Warning: It is recommended to configure VLAN from config mode,as VLAN database mode is being deprecated. Please consult userdocumentation for configuring VTP/VLAN in config mode.Switch(vlan)#vlan 1VLAN 1 modified:Switch(vlan)
6、#vlan 2VLAN 2 added:Name: VLAN0002(2)把 pc 机在交换机上的接口 f0/1 划分到 vlan 1,f0/2 划分到 vlan 2;Switch#config tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#int f0/1Switch(config-if)#switchport acc vlan 1Switch(config-if)#exitSwitch(config)#int f0/2Switch(config-if)#switchport acc v
7、lan 2Switch(config-if)#exitSwitch(config)#int f0/3Switch(config-if)#switchport mod trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to upSwitch(config-if)#exitSwitch(config)#int f
8、0/4Switch(config-if)#switchport mod trunkSwitch(config-if)#Z4.按照步骤 3 所示的方式配置 switch111;5.配置 R1 路由:RouterenRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface f0/0Router(config-if)#no shutdown%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
9、%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upRouter(config-if)#exitRouter(config)#interrface f0/0.1% Invalid input detected at marker.Router(config)#interface f0/0.1%LINK-5-CHANGED: Interface FastEthernet0/0.1, changed state to up%LINEPROTO-5-UPDOWN: Line proto
10、col on Interface FastEthernet0/0.1, changed state to upRouter(config-subif)#encapsulation dot1q 1Router(config-subif)#ip address 192.168.11.1 255.255.255.0Router(config-subif)#exitRouter(config)#interface f0/0.2%LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up%LINEPROTO-5-UPDOWN: Lin
11、e protocol on Interface FastEthernet0/0.2, changed state to upRouter(config-subif)#encapsulation dot1q 2Router(config-subif)#ip address 192.168.12.1 255.255.255.0Router(config-subif)#exitRouter(config)#interface f0/1Router(config-if)#ip address 10.0.0.1 255.0.0.0Router(config-if)#no shutdown%LINK-5-
12、CHANGED: Interface FastEthernet0/1, changed state to upRouter(config-if)#exitRouter(config)#interface s1/1Router(config-if)#ip address 192.168.1.1 255.255.255.0Router(config-if)#clock rate 64000Router(config-if)#no shutdown%LINK-5-CHANGED: Interface Serial1/1, changed state to downRouter(config-if)#
13、exitRouter(config)#router eigrp% Incomplete command.Router(config)#router ripRouter(config-router)#version 2Router(config-router)#network 192.168.11.0Router(config-router)#network 192.168.12.0Router(config-router)#network 10.0.0.0Router(config-router)#network 192.168.1.0Router(config-router)#exitRou
14、ter(config)#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up%LINK-5-CHANGED: Interface Serial1/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up6. 配置 R2 路由:RouterenRouter#conf tEnter configuration commands, one pe
15、r line. End with CNTL/Z.Router(config)#interface f0/0Router(config-if)#no shutdown%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upRouter(config-if)#exitRouter(config)#interface f0/1Router(config-if)#ip
16、 address 172.16.0.5 255.255.0.0Router(config-if)#no shutdown %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upRouter(config-if)#exit% Invalid input detected at marker.Router(config-if)#exitRouter(config
17、)#interface f0/0.1%LINK-5-CHANGED: Interface FastEthernet0/0.1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.1, changed state to upRouter(config-subif)#encapsulation dot1q 3Router(config-subif)#ip address 192.168.23.1 255.255.255.0Router(config-subif)#exitRouter
18、(config)#interface f0/0.2%LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.2, changed state to upRouter(config-subif)#encapsulation dot1q 4Router(config-subif)#ip address 192.168.24.1 255.255.255.0Router(config-subif)#exi
19、tRouter(config)#interface s1/1Router(config-if)#ip address 192.168.1.9 255.255.255.0Router(config-if)#clock rate 64000Router(config-if)#no shutdown%LINK-5-CHANGED: Interface Serial1/1, changed state to upRouter(config-if)#exitRouter(config)#router ripRouter(config-router)#v%LINEPROTO-5-UPDOWN: Line
20、protocol on Interface Serial1/1, changed state to upersion 2Router(config-router)#version 2Router(config-router)#network 192.168.24.0Router(config-router)#network 192.168.23.0Router(config-router)#network 192.168.1.0Router(config-router)#network 172.16.0.0Router(config-router)#exitRouter(config)#7.配
21、置 R3 路由:Router#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface f0/0Router(config-if)#no shutdown%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upRouter(config-
22、if)#exitRouter(config)#interface f0/0.1%LINK-5-CHANGED: Interface FastEthernet0/0.1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.1, changed state to upRouter(config-subif)#encapsulation dot1q 5Router(config-subif)#ip address 192.168.35.1 255.255.255.0Router(con
23、fig-subif)#exitRouter(config)#interface f0/0.2%LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.2, changed state to upRouter(config-subif)#encapsulation dot1q 6Router(config-subif)#ip address 192.168.36.1 255.255.255.0Rou
24、ter(config-subif)#exitRouter(config)#interface f0/1Router(config-if)#ip address 10.0.0.2 255.0.0.0Router(config-if)#no shutdown%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upRouter(config-if)#exitRout
25、er(config)#interface f1/0Router(config-if)#ip address 172.16.0.1 255.255.0.0Router(config-if)#no shutdown%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to upRouter(config-if)#exitRouter(config)#router ripRouter(config-router)#version% Incomplete command.Router(config-router)#version 2Router(config-router)#network 192.168.35.0Router(config-router)#network 192.168.36.0Router(config-router)#network 172.16.0.0Router(config-router)#network 10.0.0.0Router(config-router)#exitRouter(config)#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up8.测试连通性。【小结】