当前位置:网站首页>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(默认模式)
边栏推荐
猜你喜欢
随机推荐
新一代解析技术——云解析
Getting Started Doc 06 Adding files to a stream
ACL 和NAT
lvm逻辑卷及磁盘配额
Autoware--北科天绘rfans激光雷达使用相机&激光雷达联合标定文件验证点云图像融合效果
Image compression failure problem
腾讯云消息队列CMQ
dsf5.0 弹框点确定没有返回值的问题
Getting Started Document 01 series in order
每日一题-合并两个有序链表-0720
vim的三种模式
网站ICP备案是什么呢?
每日一题-三数之和-0716(2)
PVE 直通硬盘到TrueNAS
Account and Permission Management
每日一题-最长有效括号-0724
Cocos Creator开发中的事件响应
Remembering my first CCF-A conference paper | After six rejections, my paper is finally accepted, yay!
I217-V在openwrt软路由下大流量断网问题
VRRP原理及命令









