组建一个小型局域网.docx
- 文档编号:1518737
- 上传时间:2022-10-22
- 格式:DOCX
- 页数:12
- 大小:138.60KB
组建一个小型局域网.docx
《组建一个小型局域网.docx》由会员分享,可在线阅读,更多相关《组建一个小型局域网.docx(12页珍藏版)》请在冰豆网上搜索。
组建一个小型局域网
组建一个小型局域网
实验:
组建局域网
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
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
noservicetimesta
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 组建 一个 小型 局域网
![提示](https://static.bdocx.com/images/bang_tan.gif)