XX大学计算机与电子信息学院 网络互联技术课程设计
网络互联技术
课 程 设 计 报 告
----网吧规划设计方案
学 院: 班级名称: 学生姓名: 学 号: 指导教师: 时 间:
计算机与电子信息学院
空白小龙
2011年1月
1
XX大学计算机与电子信息学院 网络互联技术课程设计
目录
摘要 .................................................. 3 1、客户概况 ........................................... 5 2、情况分析 ........................................... 5 3、拓扑结构 ........................................... 6 4、IP规划 ............................................ 6 5、主要配置命令 ....................................... 7 6、设计总结 .......................................... 20 7、参考文献 .......................................... 21
2
XX大学计算机与电子信息学院 网络互联技术课程设计
摘要
【摘要】
随着人们生活水平的日益提高,计算机的快速普及和互联网的高速发展使人们对网络的需求变得越来越大,网吧作为人们接触和了解互联网的一个重要服务场所应运而生。网吧的业务在蓬勃发展,网吧之间的竞争也越来越激烈,高质量的网络环境、优质的服务、廉价的收费也成为各网吧的竞争筹码。要保证高质量的服务就必须依赖性能高的硬件设备,主要包括主机和网络设备,而网络设备是整个网吧的核心,为了在激烈的竞争中立足,对于网吧的经营者而言,选择一套质量好、功能齐全、安全性能较高、综合成本低、维护方便、简单的网络设备,是网吧经营者首先要考虑的问题。
在网络基本普及的今天,普通的游戏网吧已经不合时宜,只提供上网服务也已经满足不了大多数用户的需求,而新型的网吧也应运而生。新型的网吧,上网服务已经只是成为其中的一小部分,语音电话(VOIP)、视频点播、网络会议等业务将为网吧开拓新的消费群体,为未来网吧的多业务盈利做好了准备。
Abstract
As people's living standard rising, the rapid popularization of computers and the Internet, the rapid development of the needs of people on the network becomes more
3
XX大学计算机与电子信息学院 网络互联技术课程设计
and more, Internet exposure and understanding of the Internet as an important service establishments came into being. Business in the booming Internet cafes, Internet cafes are also increasingly fierce competition between the high-quality network environment, quality service, low fees have become a bargaining chip of all Internet cafes competition. To ensure high quality service is to rely on high-performance hardware devices, including host and network equipment, and network equipment is the core of the Internet cafes, in order to fierce competition foothold, for Internet cafe operators, the choice of a good quality, functional, safe and high performance, integrated, low cost, easy maintenance, simple network device is Internet cafe operators must first consider.
Today in the network of basic universal ordinary game cafes are outdated, only Internet access has also failed to meet the needs of most users, while new Internet cafes also emerged. The new Internet cafes, Internet service has become one of only a small part, voice calls (VOIP), video on demand, web conferencing and other services will open up new consumer groups, Internet cafes, Internet cafes and more business for future profitability ready.
4
XX大学计算机与电子信息学院 网络互联技术课程设计
1、客户概况
在本课程设计中,虚拟一个中小型网吧,该中型网吧共有三个上网区供客户上网,三个上网区分属不同楼层,每个上网区预计有20台计算机左右,一台吧台管理上网机器控制各个上网区的各个机器进行计费,另该网吧有两台普通服务器,分别作为网吧内部的视频服务器,所有计算机通过一台路由器连接到外部网络。假设电信所给IP为202.2.2.1/255.255.255.252
2、情况分析
结合客户实际情况经过分析,采用三层交换技术进行vlan之间的通信,对于内部局域网,选用Cisco的Catalyst 3560作为中心交换机,对于 3560 的交换机方面的配置只需做出 vlan配置即可 ,不同vlan间利用三层交换机开路由功能来实现相互访问,利用访问控制列表实现管理机器无法访问游戏服务器的目的。底层交换机采用2950做傻瓜交换,最后在边界路由处做PAT地址转换,以实现内部虚拟网络到202.2.2.1的转换。
5
XX大学计算机与电子信息学院 网络互联技术课程设计
3、拓扑结构
如图所示,分别为第一楼层,第二楼层,第三楼层,管理计算机及视频与游戏服务器,边缘路由器以及外部Internet。
4、IP规划
按照用户需求,划分子网及其IP如下:
VLAN端口 网络号 IP地址范围/掩码 192.168.2.1-192.168.2.29 192.168.2.33-192.168.2.61 192.168.2.65-192.168.2.93 192.168.2.97-192.168.2.124 网关 192.168.2.29 192.168.2.62 192.168.2.94 备注 楼层一 楼层二 楼层三 VLAN 200 192.168.2.0/27 VLAN 300 192.168.2.32/27 VLAN 400 192.168.2.64/27 VLAN 500 192.168.2.96/27 VLAN 100 192.168.55.0/24 192.168.2.125 管理机 VLAN 600 192.168.2.128/27 192.168.2.129-192.168.2.157 192.168.2.158 服务器 192.168.55.1-192.168.55.254 三层交换机与外接路由一个VLAN 各个PC及服务器、路由器端口IP分配情况:
设备 PC1 PC2
所属VLAN VLAN 200 VLAN 200 6
IP 192.168.2.1/27 192.168.2.29/27
XX大学计算机与电子信息学院 网络互联技术课程设计 PC3 PC4 PC5 PC6 PC7 Server_Vidio Server_Game 三层交换机 三层交换机 三层交换机 三层交换机 三层交换机 三层交换机 路由器f0/1 VLAN 300 VLAN 300 VLAN 400 VLAN 400 VLAN 500 VLAN 600 VLAN 600 VLAN 200 VLAN 300 VLAN 400 VLAN 500 VLAN 600 VLAN 100<接路由> VLAN 100<接路由> 192.168.2.33/27 192.168.2.61/27 192.168.2.65/27 192.168.2.93/27 192.168.2.100/27 192.168.2.130/27 192.168.2.157/27 192.168.2.30/27 192.168.2.62/27 192.168.2.94/27 192.168.2.125/27 192.168.2.158/27 192.168.55.1/24 192.168.55.2/24 5、主要配置命令
◆三层交换机接口及其Vlan配置:
Switch>en
Switch#vlan database Switch#vlan 200 Switch#vlan 300 Switch#vlan 400 Switch#vlan 500 Switch#vlan 600 Switch#config t
Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#int f0/3 Switch(config-if)#switch
Switch(config-if)#switchport m
Switch(config-if)#switchport mode a
Switch(config-if)#switchport mode access Switch(config-if)#switchport a
Switch(config-if)#switchport access v
Switch(config-if)#switchport access vlan 200 % Access VLAN does not exist. Creating vlan 200 Switch(config-if)#no shutd
Switch(config-if)#no shutdown Switch(config-if)#exit Switch(config)#int f0/3 Switch(config-if)#?
7
XX大学计算机与电子信息学院 网络互联技术课程设计
cdp Global CDP configuration subcommands channel-group Etherchannel/port bundling configuration channel-protocol Select the channel protocol (LACP, PAgP) description Interface specific description duplex Configure duplex operation.
exit Exit from interface configuration mode mac-address Manually set interface MAC address no Negate a command or set its defaults shutdown Shutdown the selected interface spanning-tree Spanning Tree Subsystem speed Configure speed operation.
switchport Set switching mode characteristics Switch(config-if)# Switch(config-if)#
Switch(config-if)#ip addr Switch(config-if)#swit
Switch(config-if)#switchport ?
access Set access mode characteristics of the interface
mode Set trunking mode of the interface
native Set trunking native characteristics when interface is in trunking mode trunk Set trunking characteristics of the interface Switch(config-if)#switchport Switch(config-if)#exit Switch(config)#interface FastEthernet0/3 Switch(config-if)# Switch(config-if)#exit Switch(config)#interface FastEthernet0/3 Switch(config-if)#exit Switch(config)#exit %SYS-5-CONFIG_I: Configured from console by console Switch#int v Switch#conf t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#int v Switch(config)#int vlan 100 Switch(config-if)#ip addr Switch(config-if)#ip address 192.168.2.30 255.255.255.224 Switch(config-if)#exit Switch(config)#int v Switch(config)#int vlan 200 8 XX大学计算机与电子信息学院 网络互联技术课程设计 %LINK-5-CHANGED: Interface Vlan200, changed state to up Switch(config-if)#ip address 192.168.2.30 255.255.255.224 % 192.168.2.0 overlaps with Vlan100 Switch(config-if)#exit Switch(config)#int v Switch(config)#int vlan 100 Switch(config-if)#era Switch(config-if)#eras Switch(config-if)#eras Switch(config-if)#ip addr Switch(config-if)#ip address % Incomplete command. Switch(config-if)#ip address 0.0.0.0 0.0.0.0 Not a valid host address - 0.0.0.0 Switch(config-if)#no ip addr Switch(config-if)#no ip address Switch(config-if)#exit Switch(config)#int v Switch(config)#int vlan 200 Switch(config-if)#ip address 192.168.2.30 255.255.255.224 Switch(config-if)#exit Switch(config)#int f0/4 Switch(config-if)#sw Switch(config-if)#switchport m Switch(config-if)#switchport mode a Switch(config-if)#switchport mode access Switch(config-if)#switchport a Switch(config-if)#switchport access v Switch(config-if)#switchport access vlan 300 % Access VLAN does not exist. Creating vlan 300 Switch(config-if)#exit Switch(config)#int f0/5 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 400 % Access VLAN does not exist. Creating vlan 400 Switch(config-if)#e Switch(config-if)#exit Switch(config)#int f0/6 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 500 % Access VLAN does not exist. Creating vlan 500 Switch(config-if)#exit 9 XX大学计算机与电子信息学院 网络互联技术课程设计 Switch(config)#int f0/2 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 600 % Access VLAN does not exist. Creating vlan 600 Switch(config-if)#e Switch(config-if)#exit Switch(config)#int v Switch(config)#int vlan 300 %LINK-5-CHANGED: Interface Vlan300, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan300, changed state to upSwitch(config-if)#ip add Switch(config-if)#ip address 192.168.2.62 255.255.255.224 Switch(config-if)#exit Switch(config)#int vlan 400 %LINK-5-CHANGED: Interface Vlan400, changed state to up Switch(config-if)#ip address 192.168.2.94 255.255.255.224 Switch(config-if)#exit Switch(config)#int vlan 500 %LINK-5-CHANGED: Interface Vlan500, changed state to up Switch(config-if)#ip address 192.168.2.125 255.255.255.224 Switch(config-if)#exit Switch(config)#int vlan 600 %LINK-5-CHANGED: Interface Vlan600, changed state to up Switch(config-if)#ip address 192.168.2.158 255.255.255.224 Switch(config-if)#exit ◆三层交换机开路由功能: Switch>en Switch#ip ? % Unrecognized command Switch#conf t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#ip ? access-list Named access-list default-network Flags networks as candidates for default routes dhcp Configure DHCP server and relay parameters domain IP DNS Resolver domain-lookup Enable IP Domain Name System hostname translation 10 XX大学计算机与电子信息学院 网络互联技术课程设计 domain-name Define the default domain name forward-protocol Controls forwarding of physical and directed IP broadcasts host Add an entry to the ip hostname table name-server Specify address of name server to use nat NAT configuration commands route Establish static routes routing Enable IP routing ssh secure shell configuration Switch(config)#ip routi Switch(config)#ip routing ◆路由器接口IP配置及静态路由配置: Router(config)#int f0/1 Router(config-if)#ip addr Router(config-if)#ip address 192.168.55.2 255.255.255.0 Router(config-if)#no shut Router(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 up Router(config-if)#exit Router(config)#? Configure commands: access-list Add an access list entry banner Define a login banner boot Modify system boot parameters cdp Global CDP configuration subcommands clock Configure time-of-day clock config-register Define the configuration register crypto Encryption module do To run exec commands in config mode enable Modify enable password parameters end Exit from configure mode exit Exit from configure mode hostname Set system's network name interface Select an interface to configure ip Global IP configuration subcommands ipv6 Global IPv6 configuration commands line Configure a terminal line mac-address-table Configure the MAC address table no Negate a command or set its defaults 11 XX大学计算机与电子信息学院 网络互联技术课程设计 router Enable a routing process service Modify use of network based services spanning-tree Spanning Tree Subsystem username Establish User Name Authentication Router(config)#ip route 0.0.0.0 0.0.0.0 192.168.55.0 Router(config)#ip r Router(config)#ip route 192.168.55.2 255.255.255.0 0.0.0.0 Router(config)#exit %SYS-5-CONFIG_I: Configured from console by console Router#ping 192.168.55.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.55.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 18/29/34 ms Router#conf t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#ip r Router(config)#ip route 192.168.2.0 255.255.255.224 192.168.255.1 Router(config)#ip route 192.168.2.0 255.255.255.224 192.168.55.1 Router(config)# undo ip route 192.168.2.0 255.255.255.224 192.168.255.1 Router(config)#no ip route 192.168.2.0 255.255.255.224 192.168.255.1 Router(config)#ip route 192.168.2.32 255.255.255.224 192.168.55.1 Router(config)#ip route 192.168.2.64 255.255.255.224 192.168.55.1 Router(config)#ip route 192.168.2.96 255.255.255.224 192.168.55.1 Router(config)#ip route 192.168.2.128 255.255.255.224 192.168.55.1 Router(config)#exit %SYS-5-CONFIG_I: Configured from console by console Router#ping 192.168.2.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds: .!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 62/71/79 ms ◆访问控制列表配置: Switch> Switch>en Switch#confi t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#acce Switch(config)#access-list 100 deny ho 12 XX大学计算机与电子信息学院 网络互联技术课程设计 Switch(config)#access-list 100 deny hos Switch(config)#access-list 100 deny ip h Switch(config)#access-list 100 deny ip host 192.168.2.100 ho Switch(config)#access-list 100 deny ip host 192.168.2.100 host 192.168.2.157 Switch(config)#access-list 100 per Switch(config)#access-list 100 permit ip any any Switch(config)#int vlan 600 Switch(config-if)#ip access-group 100 out Switch(config-if)# %SYS-5-CONFIG_I: Configured from console by console ◆边界路由PAT(动态网络地址转换)配置命令: Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#ip nat pool mynat 202.2.2.1 202.2.2.1 net Router(config)#ip nat pool mynat 202.2.2.1 202.2.2.1 netmask 255.255.255.252 ipnat_addrpool_notify_api: id , flags 11, range 0 ipnat_addrpool_notify_api: id , flags 11, range 1 Router(config)#access-list 10 per Router(config)#access-list 10 permit 192.168.2.0 0.0.0.31 Router(config)#access-list 10 permit 192.168.2.32 0.0.0.31 Router(config)#access-list 10 permit 192.168.2.64 0.0.0.31 Router(config)#access-list 10 permit 192.168.2.96 0.0.0.31 Router(config)#access-list 10 permit 192.168.2.128 0.0.0.31 Router(config)#ip nat in Router(config)#ip nat inside sou Router(config)#ip nat inside source li Router(config)#ip nat inside source list 10 pool mynat ov Router(config)#ip nat inside source list 10 pool mynat overload ipnat_remove_dynamic_cfg: id 10, flag 9, range 0 ipnat_add_dynamic_cfg: id 2, flag 11, range 0 poolstart 202.2.2.1 poolend 202.2.2.1 id 2, flags 0, domain 0, lookup 0, aclnum 10 , aclname 10 , mapname idb 0 Router(config)#inter f0/1 Router(config-if)#ip nat in Router(config-if)#ip nat inside Router(config-if)#exit Router(config)#inter f0/0 Router(config-if)#ip nat outside Router(config-if)#exit Router(config)#exit 13 XX大学计算机与电子信息学院 网络互联技术课程设计 %SYS-5-CONFIG_I: Configured from console by console Router#debu Router#debug ip na Router#debug ip nat IP NAT debugging is on 配置完成三层交换机显示信息如下: 三层交换机vlan显示信息如下: 14 XX大学计算机与电子信息学院 网络互联技术课程设计 边界路由器显示信息如下: 边界路由路由显示路由信息如下: 15 XX大学计算机与电子信息学院 网络互联技术课程设计 PAT显示信息如下: 测试: 各个Vlan之间的测试(访问控制列表之前): Vlan内部主机相互ping,可以成功通信: 16 XX大学计算机与电子信息学院 网络互联技术课程设计 Vlan200 ping Vlan 300: Vlan200 ping Vlan 400: 17 XX大学计算机与电子信息学院 网络互联技术课程设计 Vlan200 ping Vlan 500: Vlan200 ping Vlan 600 (服务器所在Vlan): 18 XX大学计算机与电子信息学院 网络互联技术课程设计 Vlan 200 ping 三层交换机外网接口: Vlan 200 ping 外接路由器(外网): 配置完访问控制列表之后: 1、游戏服务器ping管理机器: 19 XX大学计算机与电子信息学院 网络互联技术课程设计 2、管理机器ping游戏服务器: 6、设计总结 综上所述,所有需求均可达到,各个vlan之间均可ping通,实现了预期的网络互联效果,测试成功。在这次网络互联课程设计中,我确实学到了许多以前不懂的知识,并将他们加以实践,得到了很多,由于模拟器三层交换机的访问控制列表是在vlan之间配置,而且在模拟器无法实现单向,因而只进行了三层交换机的访问控制列表的禁止访问。 通过这次计算机网络课程设计,我对计算机网络原理和网络互联有了一个更加系统全面的了解和认识。从课程设计中,基本掌握了交换机常用的配置方式、VLAN的作用、配置命令及基本配置方法、路 20 XX大学计算机与电子信息学院 网络互联技术课程设计 由器的配置方法。在这次课程设计中,我不仅学到了很多在书本上学不到的知识,而且加强了理论联系实际的能力,更重要的是培养了动手的能力,在面临困难的时候我没有放弃,终于通过自己的努力完成这次课程设计。 7、参考文献 [1]张公忠主编:《现代网络技术教程》,电子工业出版社,2000年1月 [2]薛元 、顾佳 ,《创建校园网》, 清华大学出版社 [3]21世纪计算机网络工程丛书编写委员会编 ,《网络设计基础》,北京希望电子出版社 [4][美]Matthew H.Birkner编著,潇湘工作室译 ,《Cisco互联网络设计》,人民邮电出版社 [5]吴礼发 谢希仁 ,《网络原理与技术教程》,北京希望电子出版社 [6]刘正勇编著:《校园网系统集成技术与应用》,清华大学出版社,2002年6月 [7]戴雄 编著:《计算机网络》,中华人事出版社,2001年1月 21 因篇幅问题不能全部显示,请点此查看更多更全内容