路由技术 - VLAN、STP、RIP (H1-3)光明实验中学网络搭建与维护

 

3.试题编号:H1-3 光明实验中学网络搭建与维护

(1)任务描述

光明实验中学原有教学楼和办公楼各1栋,用二层交换机互联,并通过路由器接入外网。由于学校快速发展,现新建教学楼1栋,校方决定趁此机会对原有校园网络进行升级。升级后新校园网将有200台左右终端,需要将这200台终端划分成不同的区域进行管理。两个学生机房大约有60台计算机,学校教学班为24个,每个教学班有两个信息点,其中一个信息点为多媒体计算机固定连接使用,另一个信息点随时可能接入学生或者教室的笔记本电脑。教师办公室共需要50个左右的终端接入,管理部门和服务器需要50个左右的终端接入。学校还需搭建WEB服务器实现校园网站的发布。校园网升级后使用192.168.1.0/24网段划分为4个大小相同的子网第一个子网分配给管理部门和服务器使用每个子网第一个可用IP为网关IP地址WWW服务器使用vlan10子网的第二个可用IP。第2-4个子网分别分配给教师办公室VLAN,学生机房VLAN和教室VLAN。使用三层交换机实现VLAN间通信。内部网络和出口路由器之间使用RIP协议实现对外联通。新的校园网逻辑拓扑结构如下图所示:

任务一:网络系统分析与设计(10分)

根据项目需求完成总公司网络IP地址分配,并将下表填写完整。


IP子网划分:

首先,我们需要填好上面的IP划分表格。我们需要从题目中提取有用的信息:

学生机房大约有60台

教学班为24*2=48个

教师办公室共需要50个

管理部门和服务器需要50个

使用192.168.1.0/24网段,划分为4个大小相同的子网。每个子网第一个可用IP为网关IP地址,WWW服务器使用vlan10子网的第二个可用IP。

所以,我们需要通过一个C类的192.168.1.0/24划分出,4个相同大小的子网。

SO:256/4=64,即每一个子网的跳数为64,则可以得到以下子网范围:

第一个子网:192.168.1.0-192.168.1.63

第二个子网:192.168.1.64-192.168.1.127

第三个子网:192.168.1.128-192.168.1.191

第四个子网:192.168.1.192.192.168.1.255

掩码又是多少?128,64,32,16,8,4,2,1

对应的是每个子网7有64个IP地址,向左借走2位掩码,即掩码(缩写)24+2=26,化成子网掩码:255.255.255.192

子网的第一个可用IP、子网最后一个可用IP如何计算?

因为,可用IP数和子网IP数是不一样的,它们之间的关系是:子网IP数-2=可用IP数,

它们减的2是第一个IP(网络号)和最后的IP(广播地址)。

so:示例:192.168.1.0-192.168.1.63的第一个、最后一个可用IP是:192.168.1.1和192.168.1.62

到这个时候,你就会做了!

注意:

把“网络地址分配表”以指定的文件名存放到指定位置——考场说明指定路径考生号网络地址分配表.doc。

任务二:网络设备选型与互联(10分)

① 使用eNSP模拟器进行组网,三层交换机使用S5700,二层交换机使用S3700,路由器选择AR2220,。(2分)

② 选择合适的连接线缆,用于连接网络设备。(3分)

③ 将网线连接到各网络设备接口上,完成拓扑图。(5分)

任务三:交换机配置(44分)

① 创建LSW1、LSW2、LSE3,配置LSW1的主机名为LSW1,LSW2的主机名为LSW2,LSW3的主机名为S3。(3分)

LSW1

[Huawei]sysname LSW1

LSW2

[Huawei]sysname LSW2

LSW3

[Huawei]sysname S3

② 在LSW1上创建4个VLAN,vlan10、vlan20、vlan30、vlan40,其中vlan10描述为service-manage,vlan20描述为teacher -office,vlan30描述为compute-room,vlan40描述为classroom,将GE0/0/3加入到vlan 10。(10分)

[LSW1]vlan 10 
[LSW1-vlan10]description service-manage
[LSW1-vlan10]vlan 20 
[LSW1-vlan20]description teacher -office
[LSW1-vlan20]vlan 30
[LSW1-vlan30]description compute-room
[LSW1-vlan30]vlan 40
[LSW1-vlan40]description classroom
[LSW1-vlan40]quit
interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 10

③ 在LSW2上创建VLAN  20,将E0/0/1加入VLAN 20。(4分)

[LSW2]vlan 20
[LSW2-vlan20]int e0/0/1
[LSW2-Ethernet0/0/1]port link-type access
[LSW2-Ethernet0/0/1]port default vlan 20
[LSW2-Ethernet0/0/1]q

④ 在LSW3上创建VLAN 30和vlan 40,将E0/0/1加入VLAN 30, 将E0/0/10加入VLAN 40。(3分)

[S3]vlan 30
[S3-vlan30]int e0/0/1
[S3-Ethernet0/0/1]port link-type access
[S3-Ethernet0/0/1]port default vlan 30
[S3-Ethernet0/0/1]quit
[S3]vlan 40
[S3-vlan40]int e0/0/10
[S3-Ethernet0/0/10]port link-type access
[S3-Ethernet0/0/10]port default vlan 40
[S3-Ethernet0/0/10]quit

⑤ 配置三台交换机互联的接口为TRUNK,并允许VLAN10、20、30、40通过(14分)

LSW1

[LSW1]int g0/0/1
[LSW1-GigabitEthernet0/0/1]p l t
[LSW1-GigabitEthernet0/0/1]p t a v 10 20 30 40
[LSW1-GigabitEthernet0/0/1]int g0/0/2
[LSW1-GigabitEthernet0/0/2]p l t
[LSW1-GigabitEthernet0/0/2]p t a v 10 20 30 40
[LSW1-GigabitEthernet0/0/2]quit

LSW2

[LSW2]int g0/0/1
[LSW2-GigabitEthernet0/0/1]p l t
[LSW2-GigabitEthernet0/0/1]p t a v 10 20 30 40 
[LSW2-GigabitEthernet0/0/1]int g0/0/2
[LSW2-GigabitEthernet0/0/2]p l t
[LSW2-GigabitEthernet0/0/2]p t a v 10 20 30 40
[LSW2-GigabitEthernet0/0/2]quit

LSW3

[S3]int g0/0/1
[S3-GigabitEthernet0/0/1]p l t
[S3-GigabitEthernet0/0/1]p t a v 10 20 30 40
[S3-GigabitEthernet0/0/1]int g0/0/2
[S3-GigabitEthernet0/0/2]p l t
[S3-GigabitEthernet0/0/2]p t a v 10 20 30 40
[S3-GigabitEthernet0/0/2]quit

⑥ 在三台交换机上分别启用STP协议,配置LSW1为生成树的主根桥,LSW3为备份根桥。(5分)

LSW1

[LSW1]stp enable
[LSW1]stp mode stp
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW1]stp root primary

LSW2

[LSW2]stp enable
[LSW2]stp mode stp
Info: This operation may take a few seconds. Please wait for a moment...done.

LSW3

[S3]stp enable
[S3]stp mode stp
Info: This operation may take a few seconds. Please wait for a moment...done.
[S3]stp root secondary

⑦ 按照IP表上配置各接口的IP地址。(5分)

LSW1

[LSW1]int vlanif 1
[LSW1-Vlanif1]ip add 10.1.1.1 30
[LSW1-Vlanif1]int vlanif 10
[LSW1-Vlanif10]ip add 192.168.1.1 26
[LSW1-Vlanif10]int vlanif 20
[LSW1-Vlanif20]ip add 192.168.1.65 26
[LSW1-Vlanif20]int vlanif 30
[LSW1-Vlanif30]ip add 192.168.1.129 26
[LSW1-Vlanif30]int vlanif 40
[LSW1-Vlanif40]ip add 192.168.1.193 26
[LSW1-Vlanif40]quit

⑧ 在LSW1上配置RIP协议,版本配置为2。关闭路由自动汇总功能。(3分)

RIP为什么这么做?小编在网上找了很久,10.1.1.1是A类地址,所以在RIP中要写成10.0.0.0(不要掩码,默认是几类地址使用默认的地址掩码,例如:A类是255.0.0.0,C类是255.255.255.0)

rip 1
 undo summary
 version 2
 network 192.168.1.0
 network 10.0.0.0

任务四:路由器配置与网络测试(16分)

① 对AR1配置主机名为R1。(1分)

[Huawei]sysname R1

② 为路由器每个接口配置IP地址。(2分)

[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 10.1.1.2 30
[R1-GigabitEthernet0/0/0]quit
[R1]int loop 0
[R1-LoopBack0]ip add 1.1.1.1 32
[R1-LoopBack0]q

③ 在AR1上配置RIP协议,配置版本为2。关闭路由自动汇总功能,配置直连IP网段。(4分)

配置RIP和OSPF是有所区别的,RIP无需配置掩码,so,IP的地址范围无法确认。RIP就采用了IP是什么类型就默认使用什么类型的掩码。(如IP为1.1.1.1,我们在RIP中声明网段为1.0.0.0,因为1.1.1.1是A类地址,so,他又默认的掩码,我们无需配置即可。同时,如果你配置成1.1.1.0,就会报错,因为它无法确认IP的地址范围,是24还是16。)

RIPv2会把所有的1.0.0.0的IP数据包转发到对应的接口,这就是为什么RIP只能用于小型网络。因此我们更多的使用OSPF,进行动态路由配置。

[R1]rip 1
[R1-rip-1]undo summary
[R1-rip-1]version 2
[R1-rip-1]network 10.0.0.0
[R1-rip-1]network 1.0.0.0
[R1-rip-1]quit

④ 全网连通及应用测试。(9分)

Server1配置

IP信息:192.168.1.2—255.255.255.192—192.168.1.1

HTTPServer配置:选择文件夹(文件夹下有index.html即可),启动

Client1的IP配置:192.168.1.126—255.255.255.192—192.168.1.65

Client2的IP配置:192.168.1.254—255.255.255.192—192.168.1.193

PC1的IP配置:192.168.1.190—255.255.255.192—192.168.1.129

开始测试

teacher-office能够正确访问Server1的WWW服务:http://192.168.1.2

compute-room能够访问R1的loopback 0:ping 1.1.1.1

PC>ping 1.1.1.1

Ping 1.1.1.1: 32 data bytes, Press Ctrl_C to break
From 1.1.1.1: bytes=32 seq=1 ttl=254 time=62 ms
From 1.1.1.1: bytes=32 seq=2 ttl=254 time=63 ms
From 1.1.1.1: bytes=32 seq=3 ttl=254 time=62 ms
From 1.1.1.1: bytes=32 seq=4 ttl=254 time=63 ms
From 1.1.1.1: bytes=32 seq=5 ttl=254 time=62 ms

测试RIPv2

LSW1

[LSW1]display rip 1 database
 ---------------------------------------------------
 Advertisement State : [A] - Advertised
                       [I] - Not Advertised/Withdraw
 ---------------------------------------------------
   1.0.0.0/8, cost 1, ClassfulSumm
       1.1.1.1/32, cost 1, [A], nexthop 10.1.1.2
   10.0.0.0/8, cost 0, ClassfulSumm
       10.1.1.0/30, cost 0, [A], Rip-interface
   192.168.1.0/24, cost 0, ClassfulSumm
       192.168.1.0/26, cost 0, [A], Rip-interface
       192.168.1.64/26, cost 0, [A], Rip-interface
       192.168.1.128/26, cost 0, [A], Rip-interface
       192.168.1.192/26, cost 0, [A], Rip-interface

LSW2

[R1]display rip 1 database 
 ---------------------------------------------------
 Advertisement State : [A] - Advertised
                       [I] - Not Advertised/Withdraw
 ---------------------------------------------------
   1.0.0.0/8, cost 0, ClassfulSumm
       1.1.1.1/32, cost 0, [A], Rip-interface
   10.0.0.0/8, cost 0, ClassfulSumm
       10.1.1.0/30, cost 0, [A], Rip-interface
   192.168.1.0/24, cost 1, ClassfulSumm
       192.168.1.0/26, cost 1, [A], nexthop 10.1.1.1
       192.168.1.64/26, cost 1, [A], nexthop 10.1.1.1
       192.168.1.128/26, cost 1, [A], nexthop 10.1.1.1
       192.168.1.192/26, cost 1, [A], nexthop 10.1.1.1


全部配置命令(温馨提示:出错再刷)

LSW1

sysname LSW1

vlan batch 10 20 30 40

stp mode stp
stp instance 0 root primary

vlan 10
 description service-manage
vlan 20
 description teacher -office
vlan 30
 description compute-room
vlan 40
 description classroom

interface Vlanif1
 ip address 10.1.1.1 255.255.255.252 

interface Vlanif10
 ip address 192.168.1.1 255.255.255.192 

interface Vlanif20
 ip address 192.168.1.65 255.255.255.192 

interface Vlanif30
 ip address 192.168.1.129 255.255.255.192 

interface Vlanif40
 ip address 192.168.1.193 255.255.255.192 

interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 20 30 40

interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 10 20 30 40

interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 10

rip 1
 undo summary
 version 2
 network 192.168.1.0
 network 10.0.0.0

LSW2

sysname LSW2

vlan batch 10 20 30 40

stp mode stp

interface Ethernet0/0/1
 port link-type access
 port default vlan 20

interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 20 30 40

interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 10 20 30 40

LSW3

sysname S3

vlan batch 10 20 30 40

stp mode stp
stp instance 0 root secondary

interface Ethernet0/0/1
 port link-type access
 port default vlan 30

interface Ethernet0/0/10
 port link-type access
 port default vlan 40

interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 20 30 40
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 10 20 30 40

AR1

sysname R1

interface GigabitEthernet0/0/0
 ip address 10.1.1.2 255.255.255.252 

interface LoopBack0
 ip address 1.1.1.1 255.255.255.255 

rip 1
 undo summary
 version 2
 network 10.0.0.0
 network 1.0.0.0
  • 6
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值