局域网的组建(局域网搭建教程)
局域网的组建(局域网搭建教程)1、局域网技术
局域网(LAN )是指在某一区域内由多台计算机互联成的计算机组。
一般是方圆几千米以内。局域网可以实现文件管理、软件共享、打印机共享、工作组内的日程安排、电子邮件和传真通信服务等功能。局域网是封闭型的,可以由办公室观众的两台计算机组成,也可以由一个公司的上千台计算组成。
2、所用到的硬件及知识点:该实验用到4台路由器、3台交换机、 5 台PC 机。 VLAN 划分 ,TRUNK,RIPV2。
3、拓扑图:
(1) PC 地址表:
(2)端口分配-交换机
(3)接口分配表-路由器
4、局域网具体配置
(1)PC 机的配置
注: PC2、PC3、PC4、PC5、PC6、PC7 配置相同
(2)设交换机主机名
例:
Switch1 :
Switch>enable
Switch#configure terminal
Switch(config)#hostname s1 //s1 为所设置的交换机名称
S1(config)#exit
Router 1:
Router>enable
Router#configure terminal
Router (config)#hostname R1 //s1 为所设置的交换机名称
R1(config)#exit
注:路由器 R2,R3,R4 与R1设置相同。交换机S2,S3,S4, S5与S1的设置相同
(3)VLAN 设置
例: S2
S2(config)# interface FastEthernet0/2
S2(config-if)#switchport mode trunk // 将 f0/2 转换成 trunk
s2(config-if)#no shutdown
s2(config-if)#exit
s2(config)# interface FastEthernet0/1
s2(config-if)#no shutdown s2(config-if)#exit
s2(config)#vlan 60 // 创建 VLAN 60
S2(config-vlan)#inter vlan 60
s2(config-if)# interface FastEthernet0/1
s2(config-if)#switchport access vlan 60 // 加入 VLAN 60
s2(config-if)#no shutdown
注:如果交换机与交换机,交换机与路由器相连要强制转换为 trunk。
若交换机与 PC 则不需要。 S1,S3,S4 如 s2 配置。
(4)路由器设置
R1:
R1(config)# interface FastEthernet0/0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)# interface serial0/3/0
R1(config)#ip address 200.0.0.2 255.255.255.0 // 写入 IP
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface FastEthernet0/0.40
R1(config-subif)#encapsulation dot1q 40 // 封装子接口到 VLAN 40
R1(config-subif)#ip address 200.30.40.1 255.255.255.0
R1(config-subif)#exit
R1(config)#interface FastEthernet0/0.50
R1(config-subif)#encapsulation dot1q 50
R1(config-subif)#ip address 200.30.50.1 255.255.255.0
R1(config-subif)#exit
R2(config)#interface FastEthernet0/0.60
R2(config-subif)#encapsulation dot1q 60
R2(config-subif)#ip address 201.30.60.1 255.255.255.0
R2(config-subif)#exit R3(config)#interface FastEthernet0/0.60
R3(config-subif)#encapsulation dot1q 61
R3(config-subif)#ip address 202.30.61.1 255.255.255.0
R3(config-subif)#exit
R3(config)#interface FastEthernet0/0.70
R3(config-subif)#encapsulation dot1q 70
R3(config-subif)#ip address 202.30.70.1 255.255.255.0
R3(config-subif)#exit
R3(config)#interface FastEthernet0/0.71
R3(config-subif)#encapsulation dot1q 71
R3(config-subif)#ip address 202.30.71.1 255.255.255.0
R3(config-subif)#exit
R1(config)#router rip
R1(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.0
R1(config-router)#exit
注:
R2 转发的网络
R2(config-router)#network 200.0.0.0
R2(config-router)#network 210.0.0.0
R2(config-router)#network 201.30.60.0
R3 转发的网络
R3(config-router)#network 210.0.0.0
R3(config-router)#network 220.0.0.0
R3(config-router)#network 202.30.61.0
R3(config-router)#network 202.30.70.0
R3(config-router)#network 202.30.71.0
R4 转发的网络
R4(config-router)#network 220. 0. 0.0
(5) 时钟设置
比如 R2 中的 s0/3/0
R2(config)# interface serial0/3/0
R2(config-if)#ip address 200.0.0.3 255.255.255.0
R2(config-if)#clock rate 64000
R2(config-if)#no shutdown
5、测试
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.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#show run
Building configuration...
Current configuration : 1081 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no 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 auto
shutdown
!
interface Serial0/2/0
no ip address
shutdown
!
interface Serial0/2/1
no ip address
shutdown
!
interface Serial0/3/0
ip address 210.0.0.3 255.255.255.0
!
interface Serial0/3/1
ip address 220.0.0.3 255.255.255.0
!
interface Vlan1
no ip address
shutdown
!
router rip
version 2
network 202.30.61.0
network 202.30.70.0
network 202.30.71.0
network 210.0.0.0
network 220.0.0.0
!
ip classless
!
line con 0
line vty 0 4
login
!
end
S1#show running-config
Building configuration...
Current configuration : 1088 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname S1
!
interface FastEthernet0/1
switchport access vlan 40
!
interface FastEthernet0/2
switchport access vlan 50
!
interface FastEthernet0/3
switchport mode trunk
!
interface Vlan1
no ip address
shutdown
!
interface Vlan40
no ip address
!
interface Vlan50
no ip address
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
end
6、总结与心得
本次所做的实验, 所运用到的知识均为我们上几个星期所配置过的实验。如 RIP 、VLAN 、子网的划分等等。通过各种路由和交换技术,我们可以组建更为复杂的局域网,本次的实验只是一个简化局域网,但从这次的实验中,我们可以充分的了解到, VLAN 技术可以使网段的分配和管理变得更加方便,灵活。
收藏举报11条评论
什么是彩光嫩肤(做彩光嫩肤费用)彩光嫩肤费用贵吗?一般情况下,随着医院的不同,医生和条件的不同,及治疗患者的不同,彩光嫩肤的价格也是不同的。彩光嫩肤的价格与它高新的技术是脱不了关系的,一般来说,彩光嫩肤的技术效果
文思豆腐(十大最难做的菜)文思豆腐(十大最难做的菜)到一处地方旅游,除了饱览自然和人文景观,那就是品尝当地的美食,这次的美食体验没有兜兜转转,几乎都是在东关街寻找地道美食。一条街几乎包揽所有的扬州名小吃,来
车灯模具(车灯模具比较难做的是)车灯模具(车灯模具比较难做的是)在模具设计中,汽车模具一直以来都是大家认为很难的模具,有的时候拿到一个产品感到无从下手,今天给大家分享一套经典的汽车车灯模具结构,希望以后大家遇到这
贝多芬田园交响乐(一生不得不欣赏的经典音乐贝多芬)贝多芬田园交响乐(一生不得不欣赏的经典音乐贝多芬)关于贝多芬伟大的德国作曲家,留给世界大量的钢琴曲和交响乐等。特别是在耳聋以后继续创作,这首田园就是在这样的情况下产生的。F大调第六
经典背景音乐(央视常用的16首经典背景音乐)经典背景音乐(央视常用的16首经典背景音乐)有一种旋律好像一见钟情的意中人,让你知道什么叫曾经沧海难为水,除却巫山不是云有一种旋律好似相思成灾的恋人,让你体会什么叫衣带渐宽终不悔,
数码知识网易云怎么下载mp3格式的音乐下载的歌曲如何转换mp3格式如今使用IT数码设备的小伙伴们是越来越多了,那么IT数码设备当中是有很多小技巧的,这些技巧很多小伙伴一般都是不知道如何来实用的,就好比最近就有很多小伙伴们想要知道网易云怎么下载mp
茶叶营销策略(新时期的茶叶营销策略研究)茶叶营销策略(新时期的茶叶营销策略研究)茶园生态化建设模式,涵盖茶叶品种栽培土壤植保加工营销品牌等各个领域。秉承以人类为中心的理性生态伦理学思想,集成生物技术,为复兴国茶产业而努力
淘宝营销策略(淘宝营销方式有哪些)淘宝营销策略(淘宝营销方式有哪些)随着互联网的蓬勃发展,电子商务也随之成为了互联网的主要发展方向之一。通过电商购物不仅给人们的生活带来了巨大的便利和利益,也带来了新的电商经济。与此
软文案例(优秀营销软文100篇)软文案例(优秀营销软文100篇)提到脑白金,大家第一个会想到史玉柱,但作为营销人,我们思考的更多的是,脑白金的洗脑广告,是如何拿捏用户痛点的?我是迅xun步bu,今天为大家分解故事
商业软文(软文广告经典案例300)商业软文(软文广告经典案例300)软文营销是否成功,取决于其理解目标市场的能力。能够有效理解并有效阐述客户与竞争对手的现状是每位营销人员必备的营销技能。营销人员能够通过收集客户的定
餐饮行业(现在餐饮什么项目最火)餐饮行业(现在餐饮什么项目最火)多平台运营给商家提供了更多外卖渠道。近日,本报记者走访济南餐饮外卖市场发现,餐饮外卖行业再度迎来巨大变化,餐饮商家多平台运营时代已经到来!随着多平台