当前位置:文档之家› 江科大计算机网络实验报告小型局域网的构建

江科大计算机网络实验报告小型局域网的构建

计算机网络实验报告专业:信息管理与信息系统课题名称:小型局域网的构建班级:学号:姓名:指导教师:任务:小型局域网的构建【需求分析】某企业有公司办公室、财务部、销售部、设计部、生产部5个部门。

每个部门预算配置200台电脑,公司使用一个B类网络地址129.250.0.0。

现要求:1、每个部门划分1个子网;2、通过配置路由协议实现不同VLAN之间的主机能够互通。

【实验任务】1、完成企业网络拓扑方案设计;2、列出所需网络设备、PC机的设备清单;3、给出部门PC机的IP地址分配方案;4、给出第三层VLAN设计方案;5、给出路由器配置方案6、验证调试。

【实验环境】计算机操作系统:Windows 7;软件:Cisco Packet Tracer【实验任务设计】1、拓扑图:2、所需网络设备、服务器、PC 机的设备清单:3、部门PC 机的IP 地址分配方案:VLAN号 相应部门子网IP子网掩码2 财务部 129.250.1.0/24 255.255.255.03 销售部 129.250.2.0/24 255.255. 255.0 4 办公室 129.250.3.0/24 255.255. 255.05 设计部 129.250.4.0/24 255.255. 255.0 6生产部129.250.5.0/24 255.255. 255.04、第三层VLAN 设计方案 VLAN 号接口号三层交换机设备名称 数量 主机 1000 二层交换机 44 三层交换机2 网线若干2 Fa 0/1 Multilayer Switch03 Fa 0/24 Fa 0/3 10 Fa 0/45 Fa 0/1Multilayer Switch16 Fa 0/2 10 Fa 0/4【实验内容】一、安装packet tracker 软件二、打开软件,添加五个两层交换机和两个三层交换机,主机10台然后用连接线连接各个部分三、配置两层交换机switch0Switch>enableSwitch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 2Switch(config-vlan)#name officeSwitch(config-vlan)#exit //创建vlan2 名称office(办公室)Switch(config)#vlan 3Switch(config-vlan)#name financeSwitch(config-vlan)#exit //创建vlan3 名称finance(财务部)Switch(config)#vlan 4Switch(config-vlan)#name salesSwitch(config-vlan)#exit //创建vlan4 名称sales(销售部)Switch(config)#Switch(config)#interface FastEthernet0/1Switch(config-if)#Switch(config-if)#exitSwitch(config)#no vlan 3Switch(config)#no vlan 4Switch(config)#Switch(config)#interface FastEthernet0/4Switch(config-if)#Switch(config-if)#exitSwitch(config)#interface FastEthernet0/4 //将端口fa0/4划分到vlan2Switch(config-if)#Switch(config-if)#Switch(config-if)#switchport access vlan 2Switch(config-if)#Switch(config-if)#exitSwitch(config)#interface FastEthernet0/5 //将端口fa0/5划分到vlan2Switch(config-if)#Switch(config-if)#Switch(config-if)#switchport access vlan 2Switch(config-if)#Switch(config-if)#exitSwitch(config)#interface FastEthernet0/1 //将端口fa0/1设置TrunkSwitch(config-if)#Switch(config-if)#switchport mode trunkSwitch(config-if)#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upSwitch(config-if)#switchport mode accessSwitch(config-if)#Switch(config-if)#Switch(config-if)#switchport access vlan 2Switch(config-if)#Switch(config-if)#exitSwitch(config)#Switch#四、配置三层交换机Switch>enableSwitch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface FastEthernet0/1Switch(config-if)#Switch(config-if)#switchport mode trunkCommand rejected: An interface whose trunk encapsulation is "Auto" can not be configured to "trunk" mode.Switch(config-if)#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upSwitch(config-if)#exitSwitch(config)#interface FastEthernet0/2Switch(config-if)#Switch(config-if)#switchport mode trunkCommand rejected: An interface whose trunk encapsulation is "Auto" can not be configured to "trunk" mode.Switch(config-if)#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to upSwitch(config-if)#exitSwitch(config)#interface FastEthernet0/3Switch(config-if)#Switch(config-if)#switchport mode trunkCommand rejected: An interface whose trunk encapsulation is "Auto" can not be configured to "trunk" mode.Switch(config-if)#%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)#exitSwitch#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)#%SYS-5-CONFIG_I: Configured from console by consolevlan 10 name vlan10VLAN 10 modified:Name: vlan10Switch(vlan)#Switch(vlan)#Switch(vlan)#Switch(vlan)#Switch(vlan)#vlan 2 name office //创建vlan2 名称office(办公室)VLAN 2 modified:Name: officeSwitch(vlan)#vlan 3 name finance //创建vlan3 名称finance(财务部)VLAN 3 modified:Name: financeSwitch(vlan)#vlan 4 name sales //创建vlan4 名称sales(销售部)VLAN 4 modified:Name: salesSwitch(vlan)#Switch(vlan)#exitAPPLY completed.Exiting....Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface FastEthernet0/1 //将端口fa0/1划分到vlan2 Switch(config-if)#Switch(config-if)#Switch(config-if)#switchport access vlan 2Switch(config-if)#Switch(config-if)#exitSwitch(config)#interface FastEthernet0/2 //将端口fa0/2划分到vlan3 Switch(config-if)#Switch(config-if)#Switch(config-if)#switchport access vlan 3Switch(config-if)#Switch(config-if)#exitSwitch(config)#interface FastEthernet0/3 //将端口fa0/3划分到vlan4 Switch(config-if)#Switch(config-if)#Switch(config-if)#switchport access vlan 4Switch(config-if)#Switch(config-if)#exitSwitch(config)#interface FastEthernet0/4 //将端口fa0/4划分到vlan10Switch(config-if)#Switch(config-if)#Switch(config-if)#switchport access vlan 10Switch(config-if)#(另外一个三层交换器配置相同)为不同vlan配置IP地址Switch>enSwitch>enSwitch>enableSwitch#intSwitch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#intSwitch(config)#interface vlan 2Switch(config-if)#%LINK-5-CHANGED: Interface Vlan2, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan2, changed state to upSwitch(config-if)#ip addSwitch(config-if)#ip address 129.250.1.1 255.255.255.0Switch(config-if)#intSwitch(config-if)#exitSwitch(config)#intSwitch(config)#interface vlan 3Switch(config-if)#%LINK-5-CHANGED: Interface Vlan3, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan3, changed state to upSwitch(config-if)#ip addSwitch(config-if)#ip address 129.250.2.1 255.255.255.0Switch(config-if)#exitSwitch(config)#intSwitch(config)#interface vlan 4Switch(config-if)#%LINK-5-CHANGED: Interface Vlan4, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan4, changed state to up Switch(config-if)#ip addSwitch(config-if)#ip address 129.250.3.1 255.255.255.0Switch(config-if)#exitSwitch(config)#intSwitch(config)#interface vlan 10Switch(config-if)#%LINK-5-CHANGED: Interface Vlan10, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to upSwitch(config-if)#ip addSwitch(config-if)#ip address 129.250.10.1 255.255.255.0Switch(config-if)#exitSwitch(config)#Switch>enSwitch>enSwitch>enableSwitch#intSwitch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#intSwitch(config)#interface vlan 5Switch(config-if)#%LINK-5-CHANGED: Interface Vlan5, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan5, changed state to upSwitch(config-if)#ip addSwitch(config-if)#ip address 129.250.4.1 255.255.255.0Switch(config-if)#intSwitch(config-if)#exitSwitch(config)#intSwitch(config)#interface vlan 6Switch(config-if)#%LINK-5-CHANGED: Interface Vlan6, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan6, changed state to upSwitch(config-if)#ip addSwitch(config-if)#ip address 129.250.5.1 255.255.255.0Switch(config-if)#exitSwitch(config)#intSwitch(config)#interface vlan 4Switch(config-if)#%LINK-5-CHANGED: Interface Vlan4, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan4, changed state to upSwitch(config-if)#ip addSwitch(config-if)#ip address 129.250.3.1 255.255.255.0Switch(config-if)#exitSwitch(config)#inSwitch(config)#interface vlan 10Switch(config-if)#%LINK-5-CHANGED: Interface Vlan10, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to upSwitch(config-if)#ip addSwitch(config-if)#ip address 129.250.10.2 255.255.255.0Switch(config-if)#exitSwitch(config)#使用OSPF动态路由协议为不同vlan配置路由Switch>enSwitch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#rouSwitch(config)#router ospf 1IP routing not enabledSwitch(config)#Switch(config)#ip routing //启动路由协议Switch(config)#rouSwitch(config)#router ospf 1 //启动OSPF协议Switch(config-router)#netSwitch(config-router)#network 129.250.1.0 0.0.0.255 area 0 //左边交换器声明路由Switch(config-router)#netSwitch(config-router)#network 129.250.2.0 0.0.0.255 area 0Switch(config-router)#netSwitch(config-router)#network 129.250.3.0 0.0.0.255 area 0Switch(config-router)#endSwitch#Switch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#rouSwitch(config)#router ospf 1Switch(config-router)#netSwitch(config-router)#network 129.250.10.0 0.0.0.255 area 0Switch(config-router)#endSwitch#Switch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#rouSwitch(config)#router ospf 1IP routing not enabledSwitch(config)#Switch(config)#ip routing //启动路由协议Switch(config)#rouSwitch(config)#router ospf 1 //启动OSPF协议Switch(config-router)#netSwitch(config-router)#network 129.250.4.0 0.0.0.255 area 0 //右边交换器声明路由Switch(config-router)#netSwitch(config-router)#network 129.250.5.0 0.0.0.255 area 0Switch(config-router)#endSwitch#Switch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#rouSwitch(config)#router ospf 1Switch(config-router)#netSwitch(config-router)#network 129.250.10.0 0.0.0.255 area 0Switch(config-router)#endSwitch#另一个三层交换机也要进行差不多相同的配置五、PC机配置IP地址,子网掩码和网关六、验证不同vlan 之间是否能通信1)Vlan 2和vlan5之间的通信——pc8与pc1相ping2)Vlan 2和vlan6之间的通信——pc8与pc1相ping【实验总结】本次实验进行了小型局域网的构建的实验,最初自己已经通过视频的学习对实验内容有了大概的了解,基本的模式、局域网子网划分方法以及交换机VLAN 配置方法已经熟悉,至于使用路由选择协议将不同VLAN 相连通一直没有理解如何设置,最终经过资料阅读,咨询老师,虽然中间出现很多错误,但还是成功地完成了本次实验。

相关主题