组建一个小型局域网.docx

上传人:b****4 文档编号:5443371 上传时间:2022-12-16 格式:DOCX 页数:11 大小:120.90KB
下载 相关 举报
组建一个小型局域网.docx_第1页
第1页 / 共11页
组建一个小型局域网.docx_第2页
第2页 / 共11页
组建一个小型局域网.docx_第3页
第3页 / 共11页
组建一个小型局域网.docx_第4页
第4页 / 共11页
组建一个小型局域网.docx_第5页
第5页 / 共11页
点击查看更多>>
下载资源
资源描述

组建一个小型局域网.docx

《组建一个小型局域网.docx》由会员分享,可在线阅读,更多相关《组建一个小型局域网.docx(11页珍藏版)》请在冰豆网上搜索。

组建一个小型局域网.docx

组建一个小型局域网

实验:

组建局域网

1、局域网技术

局域网(LAN)是指在某一区域内由多台计算机互联成的计算机组。

一般是方圆几千米以内。

局域网可以实现文件管理、软件共享、打印机共享、工作组内的日程安排、电子邮件和传真通信服务等功能。

局域网是封闭型的,可以由办公室观众的两台计算机组成,也可以由一个公司的上千台计算组成。

2、所用到的硬件及知识点:

该实验用到4台路由器、3台交换机、5台PC机。

VLAN划分,TRUNK,RIPV2.

3、拓扑图:

 

(1)PC地址表:

设备

(主机名)

IP地址

子网掩码

默认网关

PC1

200.30.40.2

255.255.255.0

200.30.40.1

PC2

200.30.50.2

255.255.255.0

200.30.50.1

PC3

201.30.60.2

255.255.255.0

201.30.60.1

PC4

202.30.61.3

255.255.255.0

202.30.61.1

PC5

202.30.70.2

255.255.255.0

202.30.70.1

PC6

202.30.70.3

255.255.255.0

202.30.70.1

PC7

202.30.71.3

255.255.255.0

202.30.71.1

(2)端口分配-交换机

交换机号

端口

所连PC

分配VLAN

S1

Fa0/1

PC1

VLAN40

S1

Fa0/2

PC2

VLAN50

S2

Fa0/1

PC3

VLAN60

S3

Fa0/1

PC4

VLAN61

S4

Fa0/1

PC5

VLAN70

S5

Fa0/2

PC6

VLAN70

S5

Fa0/3

PC7

VLAN71

 

(3)接口分配表-路由器

路由器

接口

地址

R1

S0/3/0

200.0.0.2

R2

S0/3/0

200.0.0.3

R2

S0/3/1

210.0.0.2

R3

S0/3/0

210.0.0.3

R3

S0/3/1

220.0.0.3

R4

S0/3/0

220.0.0.2

4、局域网具体配置

(1)PC机的配置

注:

PC2、PC3、PC4、PC5、PC6、PC7配置相同

(2)设交换机主机名

例:

Switch1:

Switch>enable

Switch#configureterminal

Switch(config)#hostnames1//s1为所设置的交换机名称

S1(config)#exit

Router1:

Router>enable

Router#configureterminal

Router(config)#hostnameR1//s1为所设置的交换机名称

R1(config)#exit

注:

路由器R2,R3,R4与R1设置相同。

交换机S2,S3,S4,S5与S1的设置相同

(3)VLAN设置

例:

S2

S2(config)#interfaceFastEthernet0/2

S2(config-if)#switchportmodetrunk//将f0/2转换成trunk

s2(config-if)#noshutdown

s2(config-if)#exit

s2(config)#interfaceFastEthernet0/1

s2(config-if)#noshutdown

s2(config-if)#exit

s2(config)#vlan60//创建VLAN60

S2(config-vlan)#intervlan60

s2(config-if)#interfaceFastEthernet0/1

s2(config-if)#switchportaccessvlan60//加入VLAN60

s2(config-if)#noshutdown

注:

如果交换机与交换机,交换机与路由器相连要强制转换为trunk。

若交换机与PC则不需要。

S1,S3,S4如s2配置。

(4)路由器设置

R1:

R1(config)#interfaceFastEthernet0/0

R1(config-if)#noshutdown

R1(config-if)#exit

R1(config)#interfaceserial0/3/0

R1(config)#ipaddress200.0.0.2255.255.255.0//写入IP

R1(config-if)#noshutdown

R1(config-if)#exit

R1(config)#interfaceFastEthernet0/0.40

R1(config-subif)#encapsulationdot1q40//封装子接口到VLAN40

R1(config-subif)#ipaddress200.30.40.1255.255.255.0

R1(config-subif)#exit

R1(config)#interfaceFastEthernet0/0.50

R1(config-subif)#encapsulationdot1q50

R1(config-subif)#ipaddress200.30.50.1255.255.255.0

R1(config-subif)#exit

R2(config)#interfaceFastEthernet0/0.60

R2(config-subif)#encapsulationdot1q60

R2(config-subif)#ipaddress201.30.60.1255.255.255.0

R2(config-subif)#exitR3(config)#interfaceFastEthernet0/0.60

R3(config-subif)#encapsulationdot1q61

R3(config-subif)#ipaddress202.30.61.1255.255.255.0

R3(config-subif)#exit

R3(config)#interfaceFastEthernet0/0.70

R3(config-subif)#encapsulationdot1q70

R3(config-subif)#ipaddress202.30.70.1255.255.255.0

R3(config-subif)#exit

R3(config)#interfaceFastEthernet0/0.71

R3(config-subif)#encapsulationdot1q71

R3(config-subif)#ipaddress202.30.71.1255.255.255.0

R3(config-subif)#exit

R1(config)#routerrip

R1(config-router)#version2//版本

R1(config-router)#network200.0.0.0//转发的网络

R1(config-router)#network200.30.40.0

R1(config-router)#network200.30.50.0

R1(config-router)#exit

注:

R2转发的网络

R2(config-router)#network200.0.0.0

R2(config-router)#network210.0.0.0

R2(config-router)#network201.30.60.0

R3转发的网络

R3(config-router)#network210.0.0.0

R3(config-router)#network220.0.0.0

R3(config-router)#network202.30.61.0

R3(config-router)#network202.30.70.0

R3(config-router)#network202.30.71.0

R4转发的网络

R4(config-router)#network220.0.0.0

(5)时钟设置

比如R2中的s0/3/0

R2(config)#interfaceserial0/3/0

R2(config-if)#ipaddress200.0.0.3255.255.255.0

R2(config-if)#clockrate64000

R2(config-if)#noshutdown

5、测试

PC1为VLAN40,PC2为VLAN50,PC3为VLAN60,PC4为VLAN61,PC5和PC6同属于VLAN70,PC7为VLAN71

(1)同一VLAN之间的测试

PC5(200.30.70.2)和PC6(200.30.70.3)之间的测试

(2)不同网段之间的测试

1、PC1(200.30.40.2)和PC2(200.30.50.2)

先到相应的网段200.30.50.0,再根据路由表进行转发。

2、PC1(200.30.40.2)和PC3(201.30.60.2)

先到相应的网段201.30.60.0,再根据路由表进行转发。

3、PC6(202.30.70.3)和PC7(202.30.71.3)

先到相应的网段202.30.71.0,再根据路由表进行转发。

注:

其它的测试如上图所示,均可Ping通。

 

5、举例R3中的配置

R3>enable

R3#showrun

Buildingconfiguration...

Currentconfiguration:

1081bytes

!

version12.4

noservicetimestampslogdatetimemsec

noservicetimestampsdebugdatetimemsec

noservicepassword-encryption

!

hostnameR3

!

ipname-server0.0.0.0

!

interfaceFastEthernet0/0

noipaddress

duplexauto

speedauto

!

interfaceFastEthernet0/0.61

encapsulationdot1Q61

ipaddress202.30.61.1255.255.255.0

!

interfaceFastEthernet0/0.70

encapsulationdot1Q70

ipaddress202.30.70.1255.255.255.0

!

interfaceFastEthernet0/0.71

encapsulationdot1Q71

ipaddress202.30.71.1255.255.255.0

!

interfaceFastEthernet0/1

noipaddress

duplexauto

speedauto

shutdown

!

interfaceSerial0/2/0

noipaddress

shutdown

!

interfaceSerial0/2/1

noipaddress

shutdown

!

interfaceSerial0/3/0

ipaddress210.0.0.3255.255.255.0

!

interfaceSerial0/3/1

ipaddress220.0.0.3255.255.255.0

!

interfaceVlan1

noipaddress

shutdown

!

routerrip

version2

network202.30.61.0

network202.30.70.0

network202.30.71.0

network210.0.0.0

network220.0.0.0

!

ipclassless

!

linecon0

linevty04

login

!

end

S1#showrunning-config

Buildingconfiguration...

Currentconfiguration:

1088bytes

!

version12.1

noservicetimestampslogdatetimemsec

noservicetimestampsdebugdatetimemsec

noservicepassword-encryption

!

hostnameS1

!

interfaceFastEthernet0/1

switchportaccessvlan40

!

interfaceFastEthernet0/2

switchportaccessvlan50

!

interfaceFastEthernet0/3

switchportmodetrunk

!

interfaceVlan1

noipaddress

shutdown

!

interfaceVlan40

noipaddress

!

interfaceVlan50

noipaddress

linecon0

!

linevty04

login

linevty515

login

!

end

6、总结与心得

本次所做的实验,所运用到的知识均为我们上几个星期所配置过的实验。

如RIP、VLAN、子网的划分等等。

通过各种路由和交换技术,我们可以组建更为复杂的局域网,本次的实验只是一个简化局域网,但从这次的实验中,我们可以充分的了解到,VLAN技术可以使网段的分配和管理变得更加方便,灵活。

本次实验,让我知道,每做一件事要细心,细心再细心,程序要时时检查,因为一个小细节就有可能会使你的程序发生错误,最后严重的还要重新来过。

最重要的是,一定要明白程序中的所以代码,并且发生问题,一定尽量自行解决,以加深自己的印象,依赖别人是不能提高自己的。

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 解决方案 > 学习计划

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1