网络设计:搭建校园网(组网工程课设)【译】

世界杯开幕式视频

网络设计:搭建校园网【译】

网络拓扑具体配置信息楼配置电气楼设备配置机械楼设备配置学校主干网配置配置网管中心交换机配置出口路由器师大路由器配置

结果验证DHCP服务验证网络连通测试

说明(附pkt文件)

说明: 最近老师要求完成一个校园网的拓扑设计,赶时间就在网上百度了一下关于小型校园网的设计操作,找到一位博主发表的文章,按照操作将其进行复现。在复现过程中,发现博主文章中有一些疏忽和遗漏,本文章算是对博主文章的解释性说明,希望对大家有所帮助。(编写此文章仅仅是为了学习,并无其他用意,若有问题请给我留言) 博主博文链接

设计思路请参考博主原文,这里不另加说明,直接上配置。

网络拓扑

具体配置

信息楼配置

在SW0交换机中创建vlan10和vlan20,并为vlan添加具体的成员,设置交换机的trunk接口:

命令脚本:

en

conf t

vlan 10

name wangluo

vlan 20

name jisuanji

exit

int range f0/3-4

switchport mode access

switchport access vlan 10

int f0/5

switchport mode access

switchport access vlan 20

int range f0/1-2

switchport mode trunk

exit

在SW1交换机中创建vlan20和vlan30,并为vlan添加具体的成员,设置交换机的trunk接口:

命令脚本

en

conf t

vlan 20

name jisuanji

vlan 30

name dianke

exit

int range f0/1-2

switchport mode trunk

int f0/3

switchport mode access

switchport access vlan 20

int range f0/4-5

switchport mode access

switchport access vlan 30

exit

信息楼三层交换机的配置

配置三层交换机的虚接口(VLAN10、VLAN20、VLAN30的IP)

命令脚本

en

conf t

ip routing

vlan 10

vlan 20

vlan 30

exit

int vlan 10

ip add 202.206.64.190 255.255.255.192

no shutdown

exit

int vlan 20

ip add 202.206.64.62 255.255.255.192

no shut

exit

int vlan 30

ip add 202.206.64.126 255.255.255.192

no shut

exit

配置三层交换机的trunk接口:

命令脚本

int range f0/1-2

switchport trunk encapsulation dot1q

switchport mode trunk

exit

配置三层交换机的DHCP服务,为VLAN10、VLAN20、VLAN30中的主机自动分配IP、子网掩码以及网关等。

命令脚本

ip routing

ip dhcp excluded-address 202.206.64.126

ip dhcp excluded-address 202.206.64.190

ip dhcp excluded-address 202.206.64.62

ip dhcp pool vlan10

network 202.206.64.128 255.255.255.192

default-router 202.206.64.190

exit

ip dhcp pool vlan20

network 202.206.64.0 255.255.255.192

default-router 202.206.64.62

exit

ip dhcp pool vlan30

network 202.206.64.64 255.255.255.192

default-router 202.206.64.126

exit

电气楼设备配置

在SW2上创建VLAN40、VLAN50,并将交换机的部分接口划分到VLAN中:

命令脚本

en

conf t

vlan 40

name zidonghua

vlan 50

name cekong

exit

int f0/3

switchport mode access

switchport access vlan 40

int f0/2

switchport mode access

switchport access vlan 50

int f0/1

switchport mode trunk

int f0/24

switchport mode trunk

exit

在SW3上创建VLAN40、VLAN50,并将交换机的部分接口划分到VLAN中:

命令脚本

en

conf t

vlan 40

name zidonghua

vlan 50

name cekong

exit

int f0/3

switchport mode access

switchport access vlan 40

int f0/2

switchport mode access

switchport access vlan 50

int f0/1

switchport mode trunk

int f0/24

switchport mode trunk

exit

电气楼三层交换机的虚接口配置:

命令脚本

en

conf t

ip routing

vlan 40

vlan 50

exit

interface vlan 40

ip address 202.206.71.62 255.255.255.192

no shutdown

exit

interface vlan 50

ip address 202.206.71.126 255.255.255.192

no shutdown

exit

电气楼三层交换机trunk接口配置:

命令脚本

int range f0/1-2

switchport trunk encapsulation dot1q

switchport mode trunk

exit

电气楼三层交换机DHCP服务配置,为VLAN40、VLAN50中的主机自动分配IP地址等:

命令脚本

ip dhcp excluded-address 202.206.71.126

ip dhcp excluded-address 202.206.71.62

ip dhcp pool vlan40

network 202.206.71.0 255.255.255.192

default-router 202.206.71.62

exit

ip dhcp pool vlan50

network 202.206.71.64 255.255.255.192

default-router 202.206.71.126

exit

机械楼设备配置

配置SW4的VLAN60及接口模式:

命令脚本

en

conf t

vlan 60

name cheliang

int range f0/2-3

switchport mode access

switchport access vlan 60

int f0/1

switchport mode trunk

配置SW5的VLAN70及接口模式:

命令脚本

en

conf t

vlan 70

name zidonghua

int range f0/2-3

switchport mode access

switchport access vlan 70

int f0/1

switchport mode trunk

配置SW6VLAN80及接口模式:

命令脚本

en

conf t

vlan 80

name zhizao

int range f0/2-3

switchport mode access

switchport access vlan 80

int f0/1

switchport mode trunk

机械楼三层交换机的虚接口配置:

命令脚本

en

conf t

ip routing

vlan 60

vlan 70

vlan 80

exit

int vlan 60

ip add 202.206.66.62 255.255.255.192

no shutdown

exit

int vlan 70

ip add 202.206.66.126 255.255.255.192

no shut

exit

int vlan 80

ip add 202.206.66.190 255.255.255.192

no shut

exit

机械楼trunk接口配置:

命令脚本

int range f0/1-3

switchport trunk encapsulation dot1q

switchport mode trunk

exit

机械楼三层交换机DHCP服务配置,为VLAN60、VLAN70、VLAN80中的主机自动分配IP等:

命令脚本

ip routing

ip dhcp excluded-address 202.206.66.126

ip dhcp excluded-address 202.206.66.190

ip dhcp excluded-address 202.206.66.62

ip dhcp pool vlan80

network 202.206.66.128 255.255.255.192

default-router 202.206.66.190

exit

ip dhcp pool vlan60

network 202.206.66.0 255.255.255.192

default-router 202.206.66.62

exit

ip dhcp pool vlan70

network 202.206.66.64 255.255.255.192

default-router 202.206.66.126

exit

学校主干网配置

利用RIP协议实现学院之间的通信。

配置信息楼三层交换机IP及RIP路由:

命令脚本

en

conf t

interface g0/1

no switchport

ip address 10.0.10.1 255.255.255.0

no shutdown

exit

router rip

version 2

network 202.206.64.0

network 202.206.64.128

network 202.206.64.64

network 10.0.10.0

no auto-summary

exit

配置电气楼的三层交换机的IP及RIP路由:

命令脚本

en

conf t

interface g0/1

no switchport

ip address 10.0.11.1 255.255.255.0

no shutdown

exit

router rip

version 2

network 202.206.71.0

network 202.206.71.64

network 10.0.11.0

no auto-summary

exit

配置机械楼的三层交换机的IP及RIP路由:

命令脚本

en

conf t

interface g0/1

no switchport

ip address 10.0.12.1 255.255.255.0

no shutdown

exit

router rip

version 2

network 202.206.66.0

network 202.206.66.128

network 202.206.66.64

network 10.0.12.0

no auto-summary

exit

配置科大服务器IP

配置网管中心交换机

命令脚本

en

conf t

ip routing

interface g0/2

no switchport

ip address 202.206.65.6 255.255.255.248

no shutdown

exit

interface g0/1

no switchport

ip address 10.0.14.2 255.255.255.0

no shutdown

exit

interface f0/1

no switchport

ip address 10.0.10.2 255.255.255.0

no shutdown

exit

interface f0/3

no switchport

ip address 10.0.11.2 255.255.255.0

no shutdown

exit

interface f0/2

no switchport

ip address 10.0.12.2 255.255.255.0

no shutdown

exit

ip dhcp excluded-address 202.206.65.6

ip dhcp pool server

network 202.206.65.0 255.255.255.248

default-router 202.206.65.6

exit

配置网管中心交换机路的RIP路由:

命令脚本

en

conf t

router rip

version 2

network 10.0.10.0

network 10.0.11.0

network 10.0.12.0

network 202.206.65.0

network 10.0.14.0

no auto-summary

exit

配置出口路由器

配置出口路由器的IP:

命令脚本

enable

configure terminal

interface g0/0

ip add 10.0.14.1 255.255.255.0

no shutdown

exit

interface s0/3/0

ip add 10.0.16.1 255.255.255.0

no shutdown

exit

在出口路由器上配置RIP路由

命令脚本

enable

configure terminal

router rip

version 2

no auto-summary

network 10.0.0.0

exit

在出口路由器上配置静态和默认路由: 命令脚本

ip route 202.206.108.0 255.255.255.0 s0/3/0

ip route 0.0.0.0 0.0.0.0 s0/3/0

router rip

default-information originate

在出口路由器上配置路由注入

命令脚本

router rip

redistribute static metric 10

师大路由器配置

路由器IP配置

命令脚本

enable

configure terminal

interface g0/0

ip add 202.206.108.253 255.255.255.0

no shutdown

exit

interface s0/3/0

ip add 10.0.16.2 255.255.255.0

no shutdown

exit

在师大路由器上配置配置静态路由:

命令脚本

ip route 202.206.65.0 255.255.255.248 s0/3/0

师大服务器IP配置

结果验证

DHCP服务验证

PC11主机的IP地址: PC14主机的IP地址: PC1主机的IP地址:

网络连通测试

a、PC16去ping师大服务器

b、PC16去pingPC14 c、PC16去pingPC11 d、PC16去pingPC1 e、PC11去ping科大服务器

说明(附pkt文件)

该实验中通所有主机过DHCP方式配置IP,且三层交换机提供DHCP服务;使用RIPv2动态路由,因RIPv2支持CIDR;师大路由器配置的静态路由仅限制202.206.65.0/29网段内的主机才可访问。

资源说明:

pkt: 提取码:54hhpkt文件设计时使用的是Packet Tracer v7.0