通过vlan技术实现PC机的互通

前言

没想到吧,惊喜的上课过程,峡谷五连胜的你也来CSDN。别问我为啥知道,你懂的,那就让我们一起互相学习吧。

一、vlan的介绍

vlan技术的根本作用就是让交换机具有分隔广播域的能力。vlan(virtual Local Area Network Virtual LAN)LAN专指广播域,我们通常把分隔之前的,规模较大的广播域。

vlan技术能在逻辑上把一个物理局域网分隔成多个广播域,每个广播域称为一个“虚拟局域网”。

vlan工作原理

vlan技术通过给数据帧的方式插入vlan标签的方式,以便交换机能分辨不同的vlan。

二、实操过程

拓扑图

在这里插入图片描述

操作过程

如图所示,交换机连接pc端用的是Hybrid(混合接口),可允许所有vlan同过,实现全网互通,不能用access接口。

// A code block
var foo = 'bar';
// An highlighted block
var foo = 'bar';
```LSW1
sys LSW1
vlan batch  200 90 80
interface G0/0/1
port link-type trunk
port trunk allow-pass vlan 90 80 200
interface G0/0/2
port link-type trunk
port trunk allow-pass vlan 90 80 200
interface G0/0/3
port link-type hybrid 
port hybrid pvid vlan 200
port hybrid untagged vlan 80 90 200
q



// A code block
var foo = ‘bar’;

sys LSW2
vlan batch 80 200 90
interface G0/0/1
port link-type trunk
port trunk allow-pass vlan 80 90 200
interface G0/0/3
port link-type trunk
port trunk allow-pass vlan 80 200
interface G0/0/3
port link-type trunk
port trunk allow-pass vlan 80 200
q



// An highlighted block
var foo = ‘bar’;

sys LSW3
vlan batch  200 90 80
interface G0/0/2
port link-type trunk
port trunk allow-pass vlan 90 80 200
interface G0/0/5
port link-type trunk
port trunk allow-pass vlan 80 200
interface G0/0/6
port link-type trunk
port trunk allow-pass vlan 90 200
q
// A code block
var foo = 'bar';

// A code block
var foo = ‘bar’;

sys LSW4
vlan batch 80 200
int G0/0/10
port link-type hybrid 
port hybrid pvid vlan 80
port hybrid untagged vlan 80 200
interface G0/0/3
port link-type trunk
port trunk allow-pass vlan 80 200
q


// A code block
var foo = ‘bar’;

sys LSW5
vlan batch  200 90
interface G0/0/4
port link-type trunk
port trunk allow-pass vlan 90 200
interface G0/0/10
port link-type hybrid 
port hybrid pvid vlan 90
port hybrid untagged vlan 90 200
q


// A code block
var foo = ‘bar’;


```javascript
// An highlighted block
var foo = 'bar';

LSW6
sys LSW6
vlan batch  200 80
interface G0/0/5
port link-type trunk
port trunk allow-pass vlan 80 200
interface G0/0/10
port link-type hybrid 
port hybrid pvid vlan 80
port hybrid untagged vlan 80 200
q

// A code block
var foo = ‘bar’;


```javascript
// An highlighted block
var foo = 'bar';
```LSW7
sys LSW7
vlan batch  200 90
interface G0/0/6
port link-type trunk
port trunk allow-pass vlan 90 200
interface G0/0/10
port link-type hybrid 
port hybrid pvid vlan 90
port hybrid untagged vlan 90 200
q
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

悠然学语言

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值