当前位置:网站首页>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(默认模式)
边栏推荐
猜你喜欢
随机推荐
Spark源码-任务提交流程之-6.2-sparkContext初始化-TaskScheduler任务调度器
入门文档01 series按顺序执行
C语言的一些小常识
OpenCV3.0 兼容VS2010与VS2013的问题
成功的独立开发者应对失败&冒名顶替综
Contextual non-local alignment of full-scale representations
spark源码-任务提交流程之-1-sparkSubmit
spark算子-repartition算子
入门文档08 条件插件
新一代解析技术——云解析
lvm逻辑卷及磁盘配额
Getting Started Documentation 12 webserve + Hot Updates
入门文档07 分阶段输出
每日一题-二分法
每日一题-合并K个升序链表-0722
2020,Laya最新中高级面试灵魂32问,你都知道吗?
Getting Started Document 09 Standalone watch
每日一题-电话号码的字母组合-0717
Unity物理引擎中的碰撞、角色控制器、Cloth组件(布料)、关节 Joint
【Day8】使用LVM扩容所涉及的命令