[Reprint] the basics of VLAN switching network and VLAN division, under one minute to understand

VLAN switching network basics and VLAN division, under one minute to understand

https://www.toutiao.com/i6772206771248300556/

 

A, VLAN basis

VLAN is the abbreviation of Virtual Local Area Network, or virtual local area network. On the one hand, VLAN based on LAN switches on; on the other hand, VLAN is the soul of the local exchange network. This is because they can easily be moved by the user VLAN in the network and quickly set up a broadband network, without changing any hardware and communication lines. Thus, network administrators can be assigned to users and network resources logically, without regard to the physical connection. VLAN fully reflects the important features of modern network technology: high-speed, flexible, easy to manage and easy expansion. Have VLAN function is an important indicator of LAN switches. Network virtualization is the future trend of network development. VLAN with ordinary LAN in principle no different, but from the perspective of the user and the network management point of view, ordinary local area network VLAN basic difference is reflected in: VLAN is not restricted to a particular network or physical range, VLAN in users can be located anywhere in a park, or even located in different countries.

Two, VLAN concept

Vlan LAN is a logical, he can switch to different, divided into different regions of the interface in a virtual LAN, easy to manage and maintain, and can also be divided vlan isolate broadcast traffic to prevent the impact of a large network broadcast multiple machines performance.

VLAN switching network basics and VLAN division, under one minute to understand

 

Unicast frame and a multicast traffic vlan unallocated network of very large scale, the address is unknown in the same broadcast domain can be smooth, for example, FIG, 5 is a table by the switcher (1-5 switch) a large number of customers connected to the organization's network. Suppose this time, the computer needs to communicate with the computer A B. Ethernet-based communication, must be specified in the data frame destination MAC address for communication, so the computer A must broadcast "the ARP request (ARP Request) message", to try to obtain the MAC address of the computer B.

VLAN switching network basics and VLAN division, under one minute to understand

 

交换机 1 收到广播帧(ARP 请求)后, 会将它转发给除接收端口外的其他所有端口, 也就是 Flooding了。接着, 交换机 2 收到广播帧后也会 Flooding。交换机 3、4、5 也还会 Flooding。最终 ARP 请求会被转发到同一网络中的所有客户机上。

1.广播信息消耗了网络整体的带宽。

2.收到广播信息的计算机还要消耗一部分 CPU 时间来对它进行处理。造成了网络带宽和 CPU 运

算能力的大量无谓消耗。

三、VLAN局限性

随着网络的迅速发展, 用户对于网络数据通信的安全性提出了更高的要求, 诸如防范黑客攻击、控制病毒传播等, 都要求保证网络用户通信的相对安全性;传统的解决方法是给每个客户分配一个 VLAN和相关的 IP 子网, 通过使用 VLAN, 每个客户被从第 2 层隔离开, 可以防止任何恶意的行为和 Ethernet的信息探听。 然而, 这种分配每个客户单一 VLAN 和 IP 子网的模型造成了巨大的可扩展方面的局限。这些局限主要有下述几方面。

1. VLAN 的限制:交换机固有的 VLAN 数目的限制

2. 复杂的 STP:对于每个 VLAN, 每个相关的 Spanning Tree 的拓扑都需要管理

3. IP 地址的紧缺:IP 子网的划分势必造成一些 IP 地址的浪费

4. 路由的限制:每个子网都需要相应的默认网关的配置

四、PVLAN

从安全上考虑, 现在有了一种新的 VLAN 机制, 所有服务器在同一个子网中, 但服务器只能与自己的默认网关通信。这一新的 VLAN 特性就是专用 VLAN(Private VLAN)。PVLAN 的应用对于保证接入网络的数据通信的安全性是非常有效的, 用户只需与自己的默认网关连接, 一个 pVLAN 不需要多个 VLAN 和 IP 子网就提供了具备第 2 层数据通信安全性的连接, 所有的用户都接入PVLAN, 从而实现了所有用户与默认网关的连接, 而与pVLAN内的其他用户没有任何访问。PVLAN功能可以保证同一个VLAN中的各个端口相互之间不能通信, 但可以穿过Trunk端口。这样即使同一VLAN中的用户, 相互之间也不会受到广播的影响。

五、VLAN划分

VLAN 在交换机上的实现方法, 可以大致划分为六类:

1. 基于端口划分的 VLAN

这是最常应用的一种 VLAN 划分方法, 应用也最为广泛、最有效, 目前绝大多数 VLAN 协议的

交换机都提供这种 VLAN 配置方法。这种划分 VLAN 的方法是根据以太网交换机的交换端口来划分

的, 它是将 VLAN 交换机上的物理端口和 VLAN 交换机内部的 PVC(永久虚电路)端口分成若干个组,

每个组构成一个虚拟网, 相当于一个独立的 VLAN 交换机。

对于不同部门需要互访时, 可通过路由器转发, 并配合基于 MAC 地址的端口过滤。对某站点

的访问路径上最靠近该站点的交换机、路由交换机或路由器的相应端口上, 设定可通过的 MAC 地

址集。这样就可以防止非法入侵者从内部盗用 IP 地址从其他可接入点入侵的可能。

从这种划分方法本身我们可以看出, 这种划分的方法的优点是定义VLAN成员时非常简单, 只

要将所有的端口都定义为相应的 VLAN 组即可。适合于任何大小的网络。它的缺点是如果某用户离

开了原来的端口, 到了一个新的交换机的某个端口, 必须重新定义。

2. 基于 MAC 地址划分 VLAN

这种划分VLAN的方法是根据每个主机的MAC地址来划分, 即对每个MAC地址的主机都配置

他属于哪个组, 它实现的机制就是每一块网卡都对应唯一的MAC地址, VLAN交换机跟踪属于VLAN

MAC 的地址。这种方式的 VLAN 允许网络用户从一个物理位置移动到另一个物理位置时, 自动保留

其所属 VLAN 的成员身份。

由这种划分的机制可以看出, 这种 VLAN 的划分方法的最大优点就是当用户物理位置移动时,

即从一个交换机换到其他的交换机时, VLAN不用重新配置, 因为它是基于用户, 而不是基于交换机

的端口。这种方法的缺点是初始化时, 所有的用户都必须进行配置, 如果有几百个甚至上千个用户

的话, 配置是非常累的, 所以这种划分方法通常适用于小型局域网。而且这种划分的方法也导致了

交换机执行效率的降低, 因为在每一个交换机的端口都可能存在很多个 VLAN 组的成员, 保存了许

多用户的 MAC 地址, 查询起来相当不容易。另外, 对于使用笔记本电脑的用户来说, 他们的网卡可

能经常更换, 这样 VLAN 就必须经常配置。

3. 基于网络层协议划分 VLAN

VLAN 按网络层协议来划分, 可分为 IP、IPX、DECnet、AppleTalk、Banyan 等 VLAN 网络。这种

按网络层协议来组成的 VLAN, 可使广播域跨越多个 VLAN 交换机。这对于希望针对具体应用和服

务来组织用户的网络管理员来说是非常具有吸引力的。而且, 用户可以在网络内部自由移动, 但其

VLAN 成员身份仍然保留不变。

这种方法的优点是用户的物理位置改变了, 不需要重新配置所属的 VLAN, 而且可以根据协议

类型来划分 VLAN, 这对网络管理者来说很重要, 还有, 这种方法不需要附加的帧标签来识别 VLAN,

这样可以减少网络的通信量。这种方法的缺点是效率低, 因为检查每一个数据包的网络层地址是需

要消耗处理时间的(相对于前面两种方法), 一般的交换机芯片都可以自动检查网络上数据包的以

Ethernet Zhen head, but let the chips can check the IP header, higher technology, but also more time-consuming. Of course, this is real and all manufacturers

Now about the method.

The division of the IP multicast VLAN

IP Multicast VLAN actually a kind of definition, that is considered an IP multicast group is a VLAN. This classification approach

VLAN will be expanded to a wide area network, so this method has greater flexibility and can be easily extended through the router,

The main is not suitable for LAN users in the same geographic area consisting of a VLAN, is not suitable for local area network, mainly inefficient.

5. Press the strategy of VLAN

VLAN policy-based composition to achieve a variety of distribution methods, including VLAN switch port, MAC address, IP address, network

Network layer protocols. Network managers can decide which type of VLAN choose according to their own needs and management of the unit.

6. The user defined, non-authorized users of VLAN

Based on a user defined, non-authorized users to divide VLAN, refers to adapt a particular VLAN network, in accordance with the specific network

Special requests user to define and design VLAN, but also allows users to access non-VLAN groups VLAN, but need to provide a user password

Code, only after get certified management VLAN can be added to a VLAN.

understand more

Guess you like

Origin www.cnblogs.com/jinanxiaolaohu/p/12156645.html