组建一个小型局域网Word格式.docx
- 文档编号:1183682
- 上传时间:2023-04-30
- 格式:DOCX
- 页数:13
- 大小:121.34KB
组建一个小型局域网Word格式.docx
《组建一个小型局域网Word格式.docx》由会员分享,可在线阅读,更多相关《组建一个小型局域网Word格式.docx(13页珍藏版)》请在冰点文库上搜索。
200、30、50、2
200、30、50、1
PC3
201、30、60、2
201、30、60、1
PC4
202、30、61、3
202、30、61、1
PC5
202、30、70、2
202、30、70、1
PC6
202、30、70、3
PC7
202、30、71、3
202、30、71、1
(2)端口分配-交换机
交换机号
端口
所连PC
分配VLAN
S1
Fa0/1
VLAN40
Fa0/2
VLAN50
S2
VLAN60
S3
VLAN61
S4
VLAN70
S5
Fa0/3
VLAN71
(3)接口分配表-路由器
路由器
接口
地址
R1
S0/3/0
200、0、0、2
R2
200、0、0、3
S0/3/1
210、0、0、2
R3
210、0、0、3
220、0、0、3
R4
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>
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)#vlan60//创建VLAN60
S2(config-vlan)#intervlan60
s2(config-if)#interfaceFastEthernet0/1
s2(config-if)#switchportaccessvlan60//加入VLAN60
如果交换机与交换机,交换机与路由器相连要强制转换为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)#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
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)#interfaceFastEthernet0/0、71
R3(config-subif)#encapsulationdot1q71
R3(config-subif)#ipaddress202、30、71、1255、255、255、0
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>
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
shutdown
interfaceSerial0/2/0
interfaceSerial0/2/1
interfaceSerial0/3/0
ipaddress210、0、0、3255、255、255、0
interfaceSerial0/3/1
ipaddress220、0、0、3255、255、255、0
interfaceVlan1
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
1088bytes
version12、1
hostnameS1
switchportaccessvlan40
interfaceFastEthernet0/2
switchportaccessvlan50
interfaceFastEthernet0/3
switchportmodetrunk
interfaceVlan40
interfaceVlan50
linevty515
6、总结与心得
本次所做的实验,所运用到的知识均为我们上几个星期所配置过的实验。
如RIP、VLAN、子网的划分等等。
通过各种路由与交换技术,我们可以组建更为复杂的局域网,本次的实验只就是一个简化局域网,但从这次的实验中,我们可以充分的了解到,VLAN技术可以使网段的分配与管理变得更加方便,灵活。
本次实验,让我知道,每做一件事要细心,细心再细心,程序要时时检查,因为一个小细节就有可能会使您的程序发生错误,最后严重的还要重新来过。
最重要的就是,一定要明白程序中的所以代码,并且发生问题,一定尽量自行解决,以加深自己的印象,依赖别人就是不能提高自己的。
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 组建 一个 小型 局域网