当前位置:网站首页>VLAN details and experiments
VLAN details and experiments
2022-08-05 06:09:00 【Magic star】
VLANDetails and experiments
VLAN
交换机
交换机的作用:提供更多的接口
Switches can be cascaded and stacked
级联:

堆叠:

VLAN技术
问:3A department sends a message and only wants people in its own department to receive it
答:
- Ask your boss for money,Buy three switches(老板:“滚”)
- 通过vlan技术解决.
vlan(虚拟局域网,Virtual network segmentation,只在交换机上存在)
作用:通过技术,逻辑上划分广播域
vlan的优势:
- 控制广播
- 增强网络安全性
- 简化网络管理
vlan类型:
- 静态:端口和vlan id对应,The configuration is port-independent and host-independent(常用)
- 动态:mac地址和vlan id相关
静态vlan的种类:
- access:For connecting the host and the router only allow the samevlan间通讯
- trunk:交换机和交换机之间通讯
- hybrid:只有华为有,华为交换机的默认模式(手动)
vlanTechnical operation steps(交换机与PC端)
第一步:(access)
- 创建vlan:默认只有vlan 1
- [系统视图]vlan 10 ###建立单个vlan
- [系统视图]vlan batch 10 20 30 ###建立多个vlan
第二步:将上面的vlan关联端口(access)
- [系统试图]int 端口
- [接口试图]port link-type access ###选择vlan的接口模式(简写:p l a)
- [接口试图]port default vlan 10 ###将端口加入vlan中(简写:p d v 10)
第三步:交换机与交换机之间(trunk)
- [系统试图]int 接口
- [接口试图]port link-type trunk
- [接口试图]port trunk allow-pass all
vlan 技术实验
实验一:PC5只能与PC6通信,PC7只能与PC8通信

配置交换机:
PC5 ping PC6IP地址(192.168.1.2)
PC5 pingPC7IP地址(192.168.1.3)

PC7 ping PC8 IP 地址(192.168.1.4)

PC7 ping PC6 IP 地址(192.168.1.2)
实验二:trunk(交换机与交换机之间)
使PC1和PC2能与Server2通信,PC3和PC4能与Server1通信
一:配置交换机
sw1:

sw2:


二:PC1 ping service2的地址192.168.1.6(通),PC1 ping Service1的地址192.168.1.5(不通)

命令补充:
Delete the switch port configuration:
clear configuration interface g0/0/1
或[接口模式]undo shutdownJoin the port at one time:
[sw1]port-group group group-member g0/0/3 g0/0/4
port-group group-member //创建一个临时组
continuous port :g0/0/3 to g0/0/10 (3接口到10接口)
不continuous port: g0/0/3 g0/0/5(3接口到5接口)
[sw1] port-group group-member g0/0/3 g0/0/4
port link-type access
port default vlan 20扩展:动态绑定
mac-vlan mac-address 5489-984F-7BB6 (mac地址)
总结:
- vlanThe role is to isolate the broadcast domain(隔绝广播风暴)
- vlan分为 静态与动态
- 静态vlan接口模式有:
access(Between a switch and a host or router)
trunk(The switch is connected to the switch)
hybrid(默认模式)
边栏推荐
猜你喜欢
随机推荐
每日一题-最长有效括号-0724
什么是全栈设计师?
错误类型:reflection.ReflectionException: Could not set property ‘xxx‘ of ‘class ‘xxx‘ with value ‘xxx‘
【UiPath2022+C#】UiPath Switch
SSL证书提示过期或者无效,该怎么处理呢?
spark源码-任务提交流程之-4-container中启动executor
每日一题-正则表达式匹配-0715
Lua,ILRuntime, HybridCLR(wolong)/huatuo热更对比分析
Unity huatuo 革命性热更系列1.3 huatuo示例项目源码分析与启发
添加新硬盘为什么扫描不上?如何解决?
Apache配置反向代理
PVE 直通硬盘到TrueNAS
入门文档10 资源映射
Getting Started Document 07 Staged Output
vim的三种模式
2020年手机上最好的25种免费游戏
spark源码-任务提交流程之-1-sparkSubmit
【Machine Learning】1 Univariate Linear Regression
D39_坐标转换
ROS视频教程




![[Day8] (Super detailed steps) Use LVM to expand capacity](/img/ff/d4f06d8b30148496da64360268cf1b.png)




