当前位置:首页 > 基于packettracer智能校园网组建实验指导书
基于Packet tracer 组建校园网
-------实验指导书
一、IP地址划分
根据学校的部门数量划分,将学校分为以下几个VLAN: VLAN号 VLAN 2 VLAN 3 VLAN 4 VLAN 5 VLAN 6 VLAN 7 VLAN名称 Servers teacher student laboratory teaching library IP网段 192.10.1.0/24 192.10.2.0/24 192.10.3.0/24 192.10.4.0/24 192.10.7.0/24 192.10.8.0/24 默认网关 192.10.1.2 192.10.2.2 192.10.3.2 192.10.4.2 192.10.7.2 192.10.8.2 说明 服务器群 VLAN 教师宿舍 VLAN 学生宿舍 VLAN 实验室 VLAN 教学楼 VLAN 图书馆 VLAN 交换机对应端口 Fa 0/2 Fa 0/3 Fa 0/4 Fa 0/5 Fa 0/6 Fa 0/7 二、拓扑图
1
三、配置 1. 交换机配置
核心交换机为Cisco 3560,将其配置为vtp Server, vtp domain 为senya。将图书馆、教学楼和实验楼等交换机配置为vtp Client,vtp domain为senya。这里以“中心交换机”和“服务器汇聚”交换机为例,讲解交换机的配置,其他交换机的配置可以参考“服务器汇聚”交换机。
第一步:中心交换机配置VTP Server Switch>en Switch#
Switch#vlan database
Switch(vlan)#vtp domain senya Switch(vlan)#vtp server Switch(vlan)#exit Switch#conf t
Switch(config)#int fa 0/1
Switch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#switchport mode trunk Switch(config-if)#int fa 0/2
Switch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#switchport mode trunk Switch(config-if)#int fa 0/3
Switch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#switchport mode trunk Switch(config-if)#int fa 0/4
Switch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#switchport mode trunk Switch(config-if)#int fa 0/5
Switch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#switchport mode trunk Switch(config-if)#int fa 0/6
Switch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#switchport mode trunk Switch(config-if)#int fa 0/7
Switch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#switchport mode trunk Switch(config-if)#int fa 0/8
Switch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#switchport mode trunk Switch(config-if)#
注意:此处端口要处于开启状态
第二步:配置“服务器汇聚”交换机trunk链路,允许vlan标记的以太网帧通过该链
2
路
Switch>en Switch#conf t
Switch(config)#vtp domain senya Switch(config)#vtp mode client Switch(config)#int fa 0/1
Switch(config-if)#switchport mode trunk Switch(config-if)#
第三步:“中心交换机”创建vlan及端口划分 一种方式:直接在VLAN 库中添加:
另外一种方式是采用命令行添加: 直接在VLAN 库中添加: Switch>en
Switch#vlan database Switch(vlan)#vlan 1 Switch(vlan)#vlan 2 Switch(vlan)#vlan 3 Switch(vlan)#vlan 4 Switch(vlan)#vlan 5 Switch(vlan)#vlan 6 Switch(vlan)#vlan 7 Switch(vlan)#vlan 8 VLAN 8 added:
Name: VLAN0008 Switch(vlan)#exit Switch#show vlan
VLAN Name Status Ports ---- -------------------------------- --------- -------------------------------
1 default active Fa0/8, Fa0/9, Fa0/10, Fa0/11
Fa0/12, Fa0/13, Fa0/14, Fa0/15 Fa0/16, Fa0/17, Fa0/18, Fa0/19 Fa0/20, Fa0/21, Fa0/22, Fa0/23 Fa0/24, Gig0/1, Gig0/2 2 servers active
3
3 teacher active 4 student active 5 laboratory active 6 theaching active 7 library active 8 VLAN0008 active 1002 fddi-default act/unsup 1003 token-ring-default act/unsup 1004 fddinet-default act/unsup 1005 trnet-default act/unsup
第四步:在“服务器汇聚“交换机上查看vlan Switch#show vlan
VLAN Name Status Ports ---- -------------------------------- --------- -------------------------------
1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5 Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13 Fa0/14, Fa0/15, Fa0/16, Fa0/17 Fa0/18, Fa0/19, Fa0/20, Fa0/21 Fa0/22, Fa0/23, Fa0/24, Gig1/1 Gig1/2 2 servers active 3 teacher active 4 student active 5 laboratory active 6 theaching active 7 library active 8 VLAN0008 active 1002 fddi-default act/unsup 1003 token-ring-default act/unsup 1004 fddinet-default act/unsup 1005 trnet-default act/unsup
--More—
从显示结果可知体现了学习功能! 第五步:“服务器汇聚”交换机端口配置 Switch#conf t
Switch(config)#int fa 0/2
Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 2 Switch(config-if)#int fa 0/3
Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 2
4
共分享92篇相关文档