Theoretical knowledge VLAN, Trunk and three switches

Members junior partner Hello everyone, this is to share relevant theoretical knowledge VLAN, Trunk and three switches, then I will be resolved to everyone from the following aspects:
the concept and advantages of 1.VLAN of
2.VLAN of species
3. static VLAN configuration
4.Trunk introduction and configured
to forward the principle of three switches 5.
configuration 6. Layer switch

Summary and advantages VLAN (Virtual LAN)
: split broadcast domains
Theoretical knowledge VLAN, Trunk and three switches
There are two division manner:
1. Physical segmentation: divide the network into several small from the physical network, and the broadcast can be isolated using different routing devices connected to the network up for communication
disadvantages: lack of flexibility
2. logical segmentation: the network is logically divided into several small virtual network, i.e. VLAN. VLAN works in the data link layer of the OSI reference model, a VLAN is a switched network, where all users in a broadcast domain, each connected VLAN communicate through the routing device.
Advantages: Flexibility and Scalability

VLAN advantages:
1. Control Broadcast: Each VLAN is a separate broadcast domains, thus reducing the broadcast network bandwidth and improve the efficiency of network transmission, and the emergence of a VLAN network storm will not affect other VLAN.
2. Enhanced Network Security: As the only exchange data within the same VLAN between the port, the port can not directly access between different VLAN, so you can restrict access to individual host server resources by dividing VLAN, improve network security. (Eg arp *** vlan1 is not related to a host of vlan2)
3. simplify network management, management by label

Static VLAN:
Port-based VLAN static (host under the same vlan port can communicate)
Theoretical knowledge VLAN, Trunk and three switches
on a static map that is explicitly specified VLAN switch ports belong to which VLAN, which requires administrators to manually configure the network, when the hosts connected to the switch port , it is assigned to a corresponding VLAN. It should be noted here is that port and VLAN mapping is only valid locally, but can not share this information between switches.

Dynamic VLAN:
Dynamic MAC address of VLAN

VLAN range :( Cisco switch as an example to be able to support up to 4096 VLAN)
Theoretical knowledge VLAN, Trunk and three switches

To configure the static VLAN:
1. Create VLAN
2. The amount of the switch port to the corresponding VLAN
3. Verify VLAN configuration

There are two ways to create a VLAN:

  1. VLAN database configuration mode (privileged mode):
    Theoretical knowledge VLAN, Trunk and three switches
  2. Global configuration mode:
    Theoretical knowledge VLAN, Trunk and three switches

Example VLAN created by the above operation in two ways as shown below:
Theoretical knowledge VLAN, Trunk and three switches

Delete VLAN:
use the no vlan vlan-id such as no vlan 20 command to delete VLAN: The following is the deletion of two ways
Theoretical knowledge VLAN, Trunk and three switches

Configuring a VLAN port a VLAN, do the following figure:
Theoretical knowledge VLAN, Trunk and three switches

A plurality of ports simultaneously a VLAN, operation as shown below:
Theoretical knowledge VLAN, Trunk and three switches

Restore interface default configuration:
Theoretical knowledge VLAN, Trunk and three switches

Verify VLAN configurations:
1. Review the summary information of all VLAN: Switch # vlan Show the Brief
2. Check the specified VLAN information: Switch # show vlan id vlanid

These are the theories related to the VLAN, I will follow specific VLAN configuration process begins with detailed instructions.

Trunk的作用:(中继链路)
看下图思考:如何实现交换机之间的vlan通信?
Theoretical knowledge VLAN, Trunk and three switches
为每一条vlan提供一条链路?
Theoretical knowledge VLAN, Trunk and three switches
上图的缺点:占用接交换机的口较多导致利用率变低,同时会有大量的线路堆积!
中继链路可以跑所有vlan的信息
所以解决如上问题我们可以:只使用一条链路,且通过标识来区分不同VLAN的数据
Theoretical knowledge VLAN, Trunk and three switches

交换网络中的链路类型:

  1. 接入链路
  2. 中继电路
    Theoretical knowledge VLAN, Trunk and three switches

VLAN跨交换机通信过程:
交换机给往其他交换机的数据帧打上vlan标识(交换机可以装标签和拆标签)
Theoretical knowledge VLAN, Trunk and three switches

VLAN的标识:
在以太网上实现中继,有两种封装类型:

  1. ISL(30字节,Cisco私有标准)
  2. IEEE 802.1q(4字节)又叫:dot1q

ISL帧格式如下图所示:
Theoretical knowledge VLAN, Trunk and three switches
IEEE 802.1q工作原理如下图所示:
Theoretical knowledge VLAN, Trunk and three switches
接下来我们通过IEEE802.1q帧格式和标准以太网帧的区别来看一下上图中的四个字节的封装是如何实现的:
Theoretical knowledge VLAN, Trunk and three switches

Trunk配置步骤与命令:
1.进入接口配置模式:
Theoretical knowledge VLAN, Trunk and three switches
2.选择封装类型:
Theoretical knowledge VLAN, Trunk and three switches
3.将接口配置为Trunk:
Theoretical knowledge VLAN, Trunk and three switches
4.指定Native VLAN(可选)在中继电路中不打标签但只允许有一个
Theoretical knowledge VLAN, Trunk and three switches

其他配置(黑白名单):
1. 禁止Trunk传送某个VLAN的数据,删除这个VLAN:
Theoretical knowledge VLAN, Trunk and three switches
2. 允许Trunk传送某个VLAN数据,添加这VLAN:
Theoretical knowledge VLAN, Trunk and three switches
3. 查看接口模式、状态:
Theoretical knowledge VLAN, Trunk and three switches

以上就是有关Trunk的理论部分,后续我还会专门针对配置Trunk开篇详细的说明操作流程。

三层交换技术:
1.使用三层交换技术实现vlan间通信
2.三层交换=二层交换+三层转发
Theoretical knowledge VLAN, Trunk and three switches
上图为三层交换的图标

传统的MLS:
1.三层转发过程中要重新封装二层
三层交换机上,第3层引擎处理数据流的第一个包
Theoretical knowledge VLAN, Trunk and three switches
上图的过程如下:
1.VLAN1发送原始数据帧
2.此数据帧经过路由模块处理,在二层查找封装信息
3.交换机查找到封装信息之后对数据包进行重新封装之后经由路由器再次发送到达VLAN2
(其中的封装是通过路由器和VLAN2之间发送ARP请求和相应实现的)

1.交换ASIC从3层引擎中获悉2层重写信息在硬件中创建一个MLS条目
2.负责重写和转发数据流中的后续数据包
Theoretical knowledge VLAN, Trunk and three switches
核心概念:一次路由,多次交换

基于CEF(思科的最新技术)的MLS:
CEF是一种基于拓扑转发的模型:

  1. 转发信息库(FIB)
  2. 邻接关系表
    Theoretical knowledge VLAN, Trunk and three switches
    Theoretical knowledge VLAN, Trunk and three switches
    红框中32的IP代表着某一个固定的IP,另外一张表只记录MAC地址

虚拟接口概述:

  1. 三层交换机VLAN间通信的转发过程如下图所示:
    Theoretical knowledge VLAN, Trunk and three switches
    上图所表达的交换机中其中四个接口属于VLAN10接口,另外四个接口属于VLAN20接口,图中交换机已经配置了这两个VLAN的虚接口,就好像在交换机内部虚拟出这两个VLAN的网关。当数据从属于VLAN10的物理接口进入后会映射到VLAN10的虚接口,从而找到自己的网关。
    Theoretical knowledge VLAN, Trunk and three switches
    上图所表达的如果交换机的接口属于Trunk模式,那么该接口属于所有的VLAN,交换机会查看数据帧中的标签,并且判断应该转发给哪个虚接口。

三层交换机的配置如下图所示:
Theoretical knowledge VLAN, Trunk and three switches

These are the theoretical part about the three-tier exchange, I will follow special procedures for detailed instructions to configure three machine begins.

Thank you, please continue to focus on follow-up steps detailed explanation!

Guess you like

Origin blog.51cto.com/14464303/2427563