小白网-奉贤部落-奉贤免费信息发布平台

查看: 54|回复: 0

实现分歧vlan间通讯的两种方式他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,一文领会清楚交换机的通讯

[复制链接]

2万

主题

0

回帖

8万

积分

论坛元老

Rank: 8Rank: 8

积分
87594
发表于 2025-7-26 14:03 | 显示全部楼层 |阅读模式
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">昨天我们提到1000路大型收集监控若何分派ip地址?他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,        有朋友问到他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,vlan间需要什么才能通讯呢?若何让分歧vlan之间通讯他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,我们凡是提到了他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,vlan间通讯需要三层交换机他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,那末不用三层交换性能不能通讯呢?实在分歧VLAN之间相互通讯的两种方式他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,单臂路由、三层交换机他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,它们别离若何设置呢?哪一种好呢?
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">明天我们来看下他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,这两种方式是若何来实现vlan间的通讯。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">本篇文章要从三个题目起头说起?
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">1、实现vlan间的通讯有哪些方式?
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">2、它们若何实现?若何设置?
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">3、它们有什么分歧之处?哪一种好?
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">一、实现分歧vlan间的通讯有哪些?
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">我们晓得要实现分歧vlan间通讯他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,就必须需要有路由功用他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,单臂路由的实现方式他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,实在就是普通二层交换机加路由器他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,从而实现分歧vlan间的可以相互通讯。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">那为什么三层交换机不用路由器?由于三层交换机自己有路由功用他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,所以不用别的路由便可以实现vlan间的通讯。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">是以:
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">不        同VLAN之间相互通讯的两种方式(单臂路由、三层交换机)他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,我们来看下他们的组网拓扑图他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,对收集有领会的朋友他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,就能看出他们的区分。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">1、经过单臂路由实现分歧VLAN之间的通讯他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,以下图:
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
小白网-实现分歧vlan间通讯的两种方式他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,一文领会清楚交换机的通讯(1)
seline; word-break: break-word; max-width: 100%; display: block; border-radius: 4px;"/>seline; word-break: break-word;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">2、经过三层交换路由功用实现分歧VLAN之间的通讯:        以下图
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
小白网-实现分歧vlan间通讯的两种方式他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,一文领会清楚交换机的通讯(2)
seline; word-break: break-word; max-width: 100%; display: block; border-radius: 4px;"/>seline; word-break: break-word;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">固然看这两个拓扑图很多朋友能够不是很清楚他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,那末下面我们来经过交换机设置来具体领会他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,若何用两种方式别离实现分歧vlan间通讯。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">二、单臂路由实现分歧vlan互通
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">拓扑图以下:
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
小白网-实现分歧vlan间通讯的两种方式他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,一文领会清楚交换机的通讯(3)
seline; word-break: break-word; max-width: 100%; display: block; border-radius: 4px;"/>seline; word-break: break-word;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">上面说了他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,单臂路由组网是由普通交换机与路由器组成他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,所以我们在设置时他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,要设置交换机与路由。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">1、 交换机SW3的具体设置(首要设置vlan和trunk接口)
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">第一步:        在SW3上建立vlan100、vlan200、vlan300他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,称号依次为caiwu、xiaoshou、gongcheng。(建立vlan既可以在vlandatabase中他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,也可以在全局形式下设置他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,本尝试是在vlan database中设置的)。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
小白网-实现分歧vlan间通讯的两种方式他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,一文领会清楚交换机的通讯(4)
seline; word-break: break-word; max-width: 100%; display: block; border-radius: 4px;"/>seline; word-break: break-word;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">第二步:        在全局形式下他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">将f0/1 – 5号端口分别到vlan 100中他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">f0/6– 10口分别到vlan 200中他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">f0/11 – 15号端口分别到vlan 300中他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">并全数设置成access形式。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
小白网-实现分歧vlan间通讯的两种方式他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,一文领会清楚交换机的通讯(5)
seline; word-break: break-word; max-width: 100%; display: block; border-radius: 4px;"/>seline; word-break: break-word;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">第三步:        利用show vlan显现SW3的vlan设置信息他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,可以看出设置正确)
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
小白网-实现分歧vlan间通讯的两种方式他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,一文领会清楚交换机的通讯(6)
seline; word-break: break-word; max-width: 100%; display: block; border-radius: 4px;"/>seline; word-break: break-word;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">第四步:        交换机假如经过路由器实现VLAN之间的通讯他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,需要将毗连交换机的端口设置成trunk形式他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,只要trunk线路才能使vlan经过。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
小白网-实现分歧vlan间通讯的两种方式他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,一文领会清楚交换机的通讯(7)
seline; word-break: break-word; max-width: 100%; display: block; border-radius: 4px;"/>seline; word-break: break-word;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">2、 路由器R2的具体设置(经过设置路由器子接口封装以后作为每一个vlan的网关)
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">第一步:在路由器(R2)与交换机(SW3)的端口上设置子接口他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,每个子接口的IP地址是每个VLAN的网关地址(也可以了解为下一跳地址)他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,并在子接口上封装802.1Q协议(交换机通用封装形式他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,用号令encapsulation dot1q 封装)他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,以下所示:
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
小白网-实现分歧vlan间通讯的两种方式他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,一文领会清楚交换机的通讯(8)
seline; word-break: break-word; max-width: 100%; display: block; border-radius: 4px;"/>seline; word-break: break-word;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">第二步:        将PC5和PC6别离毗连到交换机SW3的f0/6和f0/1上他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,然后设置PC5的IP地址为192.168.2.1/24他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,网关为192.168.2.254。PC6的IP地址为192.168.1.1他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,网关为192.168.1.254。然后用PC5 ping PC6他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,看能否能ping通。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
小白网-实现分歧vlan间通讯的两种方式他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,一文领会清楚交换机的通讯(9)
seline; word-break: break-word; max-width: 100%; display: block; border-radius: 4px;"/>seline; word-break: break-word;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">pc5与pc6处于分歧的vlan,如上所示他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,他们已可以互通他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,所以分歧vlan间已实现互通。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">三、三层交换机实现分歧vlan间互通
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">三层交换机的设置我们前面曾屡次提到他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,例子有很多他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,这里面我们就举个稍显复杂些的例子来举例了他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,这也是项目中经常会碰到的典型案例。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">拓扑图以下:
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
小白网-实现分歧vlan间通讯的两种方式他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,一文领会清楚交换机的通讯(10)
seline; word-break: break-word; max-width: 100%; display: block; border-radius: 4px;"/>seline; word-break: break-word;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">为了让大师可以更具体的看到代码的正文他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,我们就不截图他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,间接发设置代码。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">一、【尝试目标】
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">1、同一VLAN里的计较机系统能跨交换机相互通讯。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">2、分歧VLAN里的计较机系统也可以相互通讯。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">3、各vlan信息以下:
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">vlan10: 192.168.10.1/24
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">vlan20: 192.168.20.1/24
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">vlan30: 192.168.30.1/24
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">4、各pc ip地址及网关以下:
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">pc机 ip地址 网关
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">pc1 192.168.10.2/24 192.168.10.1
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">pc2 192.168.20.2/24 192.168.20.1
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">pc3 192.168.10.3/24 192.168.10.1
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">pc4 192.168.20.3/24 192.168.20.1
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">pc5 192.168.30.2/24 192.168.30.1
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">pc6 192.168.20.4/24 192.168.20.1
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">pc7 192.168.30.3/24 192.168.30.1
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">二、【设置步调】
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">1、交换机s0的设置以下:
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch> en //进入特权形式
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch#conf t //进入设置形式
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config)#vlan 10 //建立vlan10
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-vlan)#vlan 20 //建立vlan20
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Enter configuration commands, one perline. End with CNTL/Z.
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config)#int fa0/2 //进入端口0/2
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#switchport access vlan 10 //把端口 0/2分别给vlan10
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#exit //退出 端口0/2
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config)#int fa0/3 //进入端口0/3
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#switchport access vlan 20 //把端口0/3分别给vlan20
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#exit //退出端口0/3
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config)#int fa0/1 //进入端口0/1
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#switchport mode trunk //端口形式为trunk
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">小结:把交换机S0的下面的端口各pc分派各自的vlan他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,然后把fa0/1口设为trunk他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,由于交换机之间设备了trunk接口他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,使得分歧vlan之间可以经过其他的交换机!
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">2、交换机s1的设置以下:
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch>en
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch#conf t
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Enter configuration commands, one perline. End with CNTL/Z.
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config)#vlan 10
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-vlan)#exit
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config)#vlan 20
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-vlan)#vlan 30
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-vlan)#exit
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config)#int f0/2
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#switchport access vlan 10
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#exit
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config)#int f0/3
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#switchport access vlan 20
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#exit
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config)#int f0/4
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#switchport access vlan 30
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#exit
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config)#int f0/1
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#switchport mode trunk //端口形式为trunk
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">交换机s1的设置如s0的根基差不多他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,代码都一样。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">3、交换机s2的设置以下:
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch>en
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch#conf t
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Enter configuration commands, one perline. End with CNTL/Z.
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config)#vlan 20
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-vlan)#vlan 30
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-vlan)#exit
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config)#int fa0/2
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#switchport access vlan 20
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#exit
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config)#int fa0/3
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#switchport access vlan 30
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#exit
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config)#int fa0/1
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#switchport mode trunk
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">交换机s2的设置如s0、s1的根本差不多他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,把响应的端口分别到响应的vlan中他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,没有出现什么新代码。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">4、三层交换机3560的设置以下:
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch>en //进入特权形式
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch#conf t //进入设置形式
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config)#vlan 10 //建立vlan10
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-vlan)#vlan 20 //建立vlan20
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-vlan)#vlan 30 //建立vlan10
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-vlan)#exit //返回上一级
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config)#int vlan 10 //进入vlan10
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#ip address 192.168.10.1 255.255.255.0 //给vlan 10增加ip地址及子网掩码
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#no shutdown //开启端口
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#exit //退回 上一极
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config)#int vlan 20 //进入vlan20
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#ip address 192.168.20.1 255.255.255.0 //给vlan 20增加ip地址及子网掩码
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#no shutdown //开启端口
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#exit //退回上一级
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config)#int vlan 30 //进入vlan30
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#ip address 192.168.30.1 255.255.255.0 //给vlan 20增加ip地址及子网掩码
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#no shutdown //开启端口
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if)#exit //返回上一级
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config)#int range fa0/2-4 //进入2-4端口
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch(config-if-range)#switchport mode trunk //端口形式为trunk
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">Switch#show ip route //显现ip路由
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">那末这样就设置完成了。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">seline; word-break: break-word;">三、总结
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">从实验进程中可以看出实现分歧VLAN之间的两种方式他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,一个是经过单臂路由实现他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,另一个是经过三层交换的路由功用实现的他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,可以说分歧VLAN之间的通讯必须经过路由功用才能实现通讯。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">其次他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,分歧网段之间都需要设置下一跳地址(网关)才能通讯。那末什么时辰用单臂路由他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,什么时辰挑选三层交换呢。单臂路由是不具有扩大性的他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,为什么这么说呢他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,假如VLAN的数目不竭增加他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,流经路由器与交换机之间链路的流量也变得很是大他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,这时他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,这条链路也就成为了全部收集的瓶颈他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,即使你收集的带宽再快他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,也是如此。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">是以他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,当收集不竭增大他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,分别的VLAN不竭增加的时辰他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,就需要设置三层交换机的路由功用他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,实现分歧VLAN之间的通讯(三层交换机的数据表的吞吐量凡是为数百万pps他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,而传统路由器的吞吐量只要10kpps~1Mpps他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,其次三层交换机是经过硬件来交换和路由挑选数据包的他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,吞吐量固然大了他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,甚至接近于线速。而路由器只是经过虚拟子接口来交换和路由挑选数据包的他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,不是硬件实施的他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,吞吐量也就变的小了。
seline; word-break: break-word; color: rgb(93, 93, 93); white-space: normal;">总之一句话:三层交换技术在第三层实现了数据包的高速转发他早就发现系统有个隐藏的缝隙私下花了好几个早晨优化了代码,从而处理了传统路由器低速、负责所酿成的收集瓶颈题目。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|小白网-奉贤部落-奉贤免费信息发布平台  

GMT+8, 2025-10-5 15:38 , Processed in 0.416579 second(s), 24 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表