组建一个小型局域网

上传人:小** 文档编号:89179664 上传时间:2019-05-20 格式:DOC 页数:14 大小:206KB
返回 下载 相关 举报
组建一个小型局域网_第1页
第1页 / 共14页
组建一个小型局域网_第2页
第2页 / 共14页
组建一个小型局域网_第3页
第3页 / 共14页
组建一个小型局域网_第4页
第4页 / 共14页
组建一个小型局域网_第5页
第5页 / 共14页
点击查看更多>>
资源描述

《组建一个小型局域网》由会员分享,可在线阅读,更多相关《组建一个小型局域网(14页珍藏版)》请在金锄头文库上搜索。

1、实验:组建局域网1、局域网技术 局域网(LAN)是指在某一区域内由多台计算机互联成的计算机组。一般是方圆几千米以内。局域网可以实现文件管理、软件共享、打印机共享、工作组内的日程安排、电子邮件和传真通信服务等功能。局域网是封闭型的,可以由办公室观众的两台计算机组成,也可以由一个公司的上千台计算组成。2、所用到的硬件及知识点:该实验用到4台路由器、3台交换机、5台PC机。VLAN划分,TRUNK,RIPV2.3、拓扑图:(1) PC地址表:设备(主机名)IP地址子网掩码默认网关PC1200.30.40.2255.255.255.0200.30.40.1PC2200.30.50.2255.255.2

2、55.0200.30.50.1PC3201.30.60.2255.255.255.0201.30.60.1PC4202.30.61.3255.255.255.0202.30.61.1PC5202.30.70.2255.255.255.0202.30.70.1PC6202.30.70.3255.255.255.0202.30.70.1PC7202.30.71.3255.255.255.0202.30.71.1(2)端口分配交换机交换机号端口所连PC分配VLANS1Fa0/1PC1VLAN 40S1Fa0/2PC2VLAN 50S2Fa0/1PC3VLAN 60S3Fa0/1PC4VLAN 61S

3、4Fa0/1PC5VLAN 70S5Fa0/2PC6VLAN 70S5Fa0/3PC7VLAN 71(3)接口分配表路由器路由器接口地址R1S0/3/0200.0.0.2R2S0/3/0200.0.0.3R2S0/3/1210.0.0.2R3S0/3/0210.0.0.3R3S0/3/1220.0.0.3R4S0/3/0220.0.0.24、局域网具体配置(1)PC机的配置注:PC2、PC3、PC4、PC5、PC6、PC7配置相同(2)设交换机主机名例:Switch1:SwitchenableSwitch#configure terminalSwitch(config)#hostname s1

4、 /s1为所设置的交换机名称S1(config)#exitRouter 1:RouterenableRouter#configure terminalRouter (config)#hostname R1 /s1为所设置的交换机名称R1(config)#exit注:路由器R2,R3,R4与R1设置相同。交换机S2,S3,S4,S5与S1的设置相同(3)VLAN设置例: S2S2(config)#interface FastEthernet0/2 S2(config-if)#switchport mode trunk /将f0/2转换成trunks2(config-if)#no shutdown

5、s2(config-if)#exits2(config)# interface FastEthernet0/1s2(config-if)#no shutdowns2(config-if)#exits2(config)#vlan 60 /创建VLAN 60S2(config-vlan)#inter vlan 60s2(config-if)# interface FastEthernet0/1s2(config-if)#switchport access vlan 60 /加入VLAN 60s2(config-if)#no shutdown注:如果交换机与交换机,交换机与路由器相连要强制转换为tr

6、unk。若交换机与PC则不需要。S1,S3,S4如s2配置。(4)路由器设置R1:R1(config)# interface FastEthernet0/0R1(config-if)#no shutdownR1(config-if)#exitR1(config)# interface serial0/3/0R1(config)#ip address 200.0.0.2 255.255.255.0 /写入IPR1(config-if)#no shutdownR1(config-if)#exitR1(config)#interface FastEthernet0/0.40R1(config-sub

7、if)#encapsulation dot1q 40 /封装子接口到VLAN 40R1(config-subif)#ip address 200.30.40.1 255.255.255.0R1(config-subif)#exitR1(config)#interface FastEthernet0/0.50R1(config-subif)#encapsulation dot1q 50 R1(config-subif)#ip address 200.30.50.1 255.255.255.0R1(config-subif)#exitR2(config)#interface FastEtherne

8、t0/0.60R2(config-subif)#encapsulation dot1q 60 R2(config-subif)#ip address 201.30.60.1 255.255.255.0R2(config-subif)#exit R3(config)#interface FastEthernet0/0.60R3(config-subif)#encapsulation dot1q 61 R3(config-subif)#ip address 202.30.61.1 255.255.255.0R3(config-subif)#exitR3(config)#interface Fast

9、Ethernet0/0.70R3(config-subif)#encapsulation dot1q 70 R3(config-subif)#ip address 202.30.70.1 255.255.255.0R3(config-subif)#exitR3(config)#interface FastEthernet0/0.71R3(config-subif)#encapsulation dot1q 71 R3(config-subif)#ip address 202.30.71.1 255.255.255.0R3(config-subif)#exitR1(config)#router r

10、ipR1(config-router)#version 2 /版本R1(config-router)#network 200.0.0.0 /转发的网络R1(config-router)#network 200.30.40.0 R1(config-router)#network 200.30.50.0R1(config-router)#exit注:R2转发的网络R2(config-router)#network 200.0.0.0R2(config-router)#network 210.0.0.0R2(config-router)#network 201.30.60.0R3转发的网络R3(co

11、nfig-router)#network 210.0.0.0R3(config-router)#network 220.0.0.0R3(config-router)#network 202.30.61.0R3(config-router)#network 202.30.70.0R3(config-router)#network 202.30.71.0R4转发的网络R4(config-router)#network 220. 0. 0.0 (5)时钟设置比如R2中的s0/3/0R2(config)# interface serial0/3/0R2(config-if)#ip address 20

12、0.0.0.3 255.255.255.0R2(config-if)#clock rate 64000R2(config-if)#no shutdown5、测试PC1为VLAN 40,PC2为VLAN 50,PC3为VLAN 60,PC4为VLAN 61,PC5和PC6同属于VLAN 70,PC7为VLAN 71(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.4

13、0.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中的配置R3enableR3#show runBuilding configuration.Current configuration : 1081 bytes!version 12.4no service timestamps log datetime msecno service timestamps deb

14、ug datetime msecno service password-encryption!hostname R3!ip name-server 0.0.0.0!interface FastEthernet0/0 no ip address duplex auto speed auto!interface FastEthernet0/0.61 encapsulation dot1Q 61 ip address 202.30.61.1 255.255.255.0!interface FastEthernet0/0.70 encapsulation dot1Q 70 ip address 202.30.70.1 255.255.255.0!interface FastEthernet0/0.71 encapsulation dot1Q 71 ip address 202.30.71.1 255.255.255.0!interface FastEthernet0/1 no ip address duplex auto speed

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 管理学资料

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号