当前位置:网站首页>VLAN介绍与实验
VLAN介绍与实验
2022-08-05 05:19:00 【sologuai】
目录
一、VLAN概述
1.vlan概念及作用
vlan叫做虚拟局域网(VLAN Virtual LAN )虚拟局域网是一组逻辑上的设备和用户,这些设备和用户并不受物理位置的限制,可以根据功能部门应用等因素将他们组织起来,相互之间的通信就像他们在同一网段。作用是划分广播域,控制广播消息传递范围。
2.vlan的种类
静态VLAN:基于端口划分静态VLAN
动态VLAN:基于MAC地址划分动态VLAN
3.vlan的id范围

4.trunk的作用
①Trunk是一个公共的链路,在Trunk中可以发送所有vlan的数据,以达到所有vlan可以通过 一条链路跨交换机通信。
②Trunk根据不同的vlan号给vlan发送的数据添加标识,使同一vlan可以跨交换机通信。
二、配置实验

过程:
步骤1:设置四台主机和两台服务器的的IP地址和子网掩码




步骤2:配置交换机sw1





步骤3:配置交换机sw2



步骤4:进行测试
pc1 ping server2

pc2 ping server2

Pc3 ping server1

Pc4 ping server1

server1 ping pc3

Server1 ping pc4

Server2 ping pc1

Server2 ping pc2

实验成功!
三、总结
创建vlan :默认只有 vlan 1
[系统视图] vlan 10 ###建立单个vlan
[系统视图] vlan batch 20 30 40 ###一次性建立多个vlan
[sw1]display vlan ###查看vlan 的一些基本信息
access 交换机 主机 路由器
trunk 交换机核交换机相连
边栏推荐
- spark source code-RPC communication mechanism
- IP地址及子网的划分
- Getting Started 04 When a task depends on another task, it needs to be executed in sequence
- VRRP原理及命令
- 入门文档09 独立的watch
- 线上问题排查流程
- [Day5] Soft and hard links File storage, deletion, directory management commands
- RAID disk array
- Three modes of vim
- 增长:IT运维发展趋势报告
猜你喜欢
随机推荐
Small example of regular expression--remove spaces in the middle and on both sides of the string
解决这三大问题,运维效率将超90%的医院
Apache configure reverse proxy
【Day8】RAID Disk Array
The problem of calling ds18b20 through a single bus
Getting Started 11 Automatically add version numbers
网络布线与数制转换
Hard Disk Partitioning and Permanent Mounting
The spark operator - coalesce operator
Hugo搭建个人博客
vim的三种模式
入职前,没想到他们玩的这么花
入门文档10 资源映射
js dynamically get screen width and height
lvm logical volume and disk quota
RAID disk array
深度 Zabbix 使用指南——来自惨绿少年
Image compression failure problem
入门文档06 向流(stream)中添加文件
618,你也许可以清醒亿点点








