+

CN100433693C - Method for dynmaic establishing virtual local network table and Ethernet equipment - Google Patents

Method for dynmaic establishing virtual local network table and Ethernet equipment Download PDF

Info

Publication number
CN100433693C
CN100433693C CNB2006101561259A CN200610156125A CN100433693C CN 100433693 C CN100433693 C CN 100433693C CN B2006101561259 A CNB2006101561259 A CN B2006101561259A CN 200610156125 A CN200610156125 A CN 200610156125A CN 100433693 C CN100433693 C CN 100433693C
Authority
CN
China
Prior art keywords
vlan
vlan table
port
ethernet device
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB2006101561259A
Other languages
Chinese (zh)
Other versions
CN1976312A (en
Inventor
李教峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2006101561259A priority Critical patent/CN100433693C/en
Publication of CN1976312A publication Critical patent/CN1976312A/en
Application granted granted Critical
Publication of CN100433693C publication Critical patent/CN100433693C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

A method for dynamically setting up table of virtual local area network includes configuring VLAN information being able to be supported by Ethernet device port, setting up relevant VLAN table when VLAN being able to use said port to support message identification is confirmed and relevant VLAN table being not existed is confirmed according to said information after message is received by port.

Description

一种动态创建虚拟局域网表的方法和以太网设备 A method for dynamically creating a virtual local area network table and an Ethernet device

技术领域 technical field

本发明涉及以太网技术领域,尤其涉及一种动态创建虚拟局域网表的方法和以太网设备。The invention relates to the technical field of Ethernet, in particular to a method for dynamically creating a virtual local area network table and an Ethernet device.

背景技术 Background technique

随着市场的推动,以太网的发展越来越迅速,应用也越来越广泛。VLAN(Virtual Local Area Network,虚拟局域网),是将一组位于相同物理网段上的工作站和服务器从逻辑上划分成不同的逻辑网段,在功能和操作上与传统LAN(Local Area Network,局域网)基本相同,可以提供一定范围内终端系统的互联和传输。VLAN技术的产生,对于限制网络中的广播风暴,提升局域网的安全性等方面都提供了巨大的帮助,因此在以太网中对于VLAN技术的应用也是越来越普遍。With the promotion of the market, the development of Ethernet is getting faster and faster, and the application is more and more extensive. VLAN (Virtual Local Area Network, virtual local area network), is to logically divide a group of workstations and servers located on the same physical network segment into different logical network segments. ) are basically the same, and can provide interconnection and transmission of terminal systems within a certain range. The emergence of VLAN technology has provided great help in limiting broadcast storms in the network and improving the security of LANs. Therefore, the application of VLAN technology in Ethernet is becoming more and more common.

由于802.1Q协议规定,VLAN ID(标识)最大值为4095,当网络中级联的交换机越来越多时,网络中的VLAN ID资源变得异常紧缺。而QinQ(802.1Qin 802.1Q(stacked VLANs),双层VLAN)技术的出现有效的解决了网络中VLAN ID资源紧缺的问题,同时提供了一种较为简单的二层VPN(VirtualPrivate Network,虚拟专用网)方案。QinQ是对基于802.1Q封装的隧道协议的一种形象化的称呼,其核心思想是将用户私网VLAN封装到公网VLAN上,报文带着两层VLAN穿越服务商的骨干网络,从而为用户提供一种较为简单的二层VPN隧道。As stipulated in the 802.1Q protocol, the maximum value of VLAN ID (identification) is 4095. When more and more switches are cascaded in the network, the VLAN ID resources in the network become extremely scarce. The emergence of QinQ (802.1Qin 802.1Q (stacked VLANs), double-layer VLAN) technology effectively solves the problem of shortage of VLAN ID resources in the network, and provides a relatively simple two-layer VPN (Virtual Private Network, virtual private network) )plan. QinQ is a visual name for the tunneling protocol based on 802.1Q encapsulation. Its core idea is to encapsulate the VLAN of the user's private network into the VLAN of the public network. The user provides a relatively simple Layer 2 VPN tunnel.

由于以太网设备如果要对报文进行处理,就需要该以太网设备支持相应的VLAN,因此,目前,以太网设备如果需要支持某个VLAN,就需要本地创建对应的VLAN表,并把该VLAN表绑定到相应的端口上,该VLAN表中保存该VLAN的属性信息。当该端口有报文需要处理时,以太网设备从该报文申获取相应的VLAN ID,根据该VLAN ID查找本地保存的该端口的VLAN表,在找到该VLAN ID对应的VLAN表之后,根据其中保存的该VLAN的属性信息进行相关处理。Since an Ethernet device needs to support a corresponding VLAN if it wants to process packets, at present, if an Ethernet device needs to support a certain VLAN, it needs to create a corresponding VLAN table locally and add the VLAN The table is bound to the corresponding port, and the attribute information of the VLAN is saved in the VLAN table. When the port has a message to be processed, the Ethernet device obtains the corresponding VLAN ID from the message, searches the locally saved VLAN table of the port according to the VLAN ID, and after finding the VLAN table corresponding to the VLAN ID, according to The attribute information of the VLAN stored therein is processed accordingly.

可见,目前的以太网设备必须先创建好某个VLAN的VLAN表并把VLAN表绑定到某个端口才可以在该端口支持该VLAN。由于作为网络节点的以太网设备的下层网络的VLAN划分可能会有所变化,因此,为了方便起见,网络管理员希望该以太网设备能够支持大量的VLAN,这样网络管理员可以一次性把需要支持的VLAN都配置好,这样即使下层网络的VLAN发生变化了,也不需要修改该网络节点的配置。但是,当以太网设备需要支持大量VLAN时,需要创建大量的VLAN表。在以太网设备支持QinQ技术之后,一个端口上最多需要创建4096×4096个VLAN表。如果一个设备有32个端口,那么极端情况下需要创建4096×4096×32个VLAN表。按每个VLAN表占用2个字节算,这些VLAN表要占用1G的内存,这是以太网设备无法承受的。因此,目前的很多以太网设备都对其能够支持的VLAN数量进行了限制,而以太网设备能支持的VLAN个数,也成为了衡量以太网设备性能的一个重要指标。特别对于BRAS(Broadband Remote Access Server,宽带接入服务器)、三层交换机(Layer3Switch)等设备来说,由于这些设备一般处于城域网的汇聚层,它们连接的下层网络一般会被划分成很多VLAN,这就需要它们具有强大的VLAN支持能力。It can be seen that the current Ethernet equipment must first create a VLAN table of a certain VLAN and bind the VLAN table to a certain port before the port can support the VLAN. Since the VLAN division of the lower network of the Ethernet device as a network node may change, for the sake of convenience, the network administrator hopes that the Ethernet device can support a large number of VLANs, so that the network administrator can configure the VLANs that need to be supported at one time. All VLANs are configured well, so even if the VLAN of the lower layer network changes, there is no need to modify the configuration of the network node. However, when an Ethernet device needs to support a large number of VLANs, a large number of VLAN tables need to be created. After an Ethernet device supports QinQ technology, a maximum of 4096×4096 VLAN tables need to be created on a port. If a device has 32 ports, then in extreme cases, 4096×4096×32 VLAN tables need to be created. Based on the fact that each VLAN table occupies 2 bytes, these VLAN tables take up 1G of memory, which is unbearable for Ethernet devices. Therefore, many current Ethernet devices limit the number of VLANs they can support, and the number of VLANs that an Ethernet device can support has also become an important indicator for measuring the performance of Ethernet devices. Especially for BRAS (Broadband Remote Access Server, Broadband Access Server), Layer 3 Switch (Layer3Switch) and other devices, since these devices are generally at the aggregation layer of the MAN, the lower-layer network they connect to is generally divided into many VLANs. , which requires them to have strong VLAN support capabilities.

发明内容 Contents of the invention

本发明实施例提供一种动态创建虚拟局域网表的方法和以太网设备,用以解决现有技术中对以太网设备能够支持的VLAN在数量上有限制的问题。Embodiments of the present invention provide a method for dynamically creating a virtual local area network table and an Ethernet device to solve the problem in the prior art that the number of VLANs that the Ethernet device can support is limited.

为了解决上述技术问题,本发明实施例提供了一种动态创建虚拟局域网表的方法,包括以下步骤:In order to solve the above technical problems, an embodiment of the present invention provides a method for dynamically creating a virtual local area netlist, comprising the following steps:

配置以太网设备端口能够支持的虚拟局域网VLAN的信息;并且Configure the information of the virtual local area network (VLAN) that the Ethernet device port can support; and

在所述端口接收到报文后,根据所述信息确定所述端口能够支持所述报文标识的VLAN并且确定不存在相应的VLAN表时,为所述端口创建相应的VLAN表;After the port receives the message, according to the information, it is determined that the port can support the VLAN identified by the message and when it is determined that there is no corresponding VLAN table, create a corresponding VLAN table for the port;

当所述以太网设备同时存在的VLAN表的数量大于设定阈值时,对当前没有使用的VLAN表进行老化。When the number of concurrently existing VLAN tables of the Ethernet device is greater than a set threshold, aging the currently unused VLAN tables is performed.

本发明实施例还提供了一种以太网设备,包括用于接收和发送报文的端口以及保存VLAN表的第一存储模块,所述以太网设备包括第二存储模块、处理模块和老化模块,其中:The embodiment of the present invention also provides an Ethernet device, including a port for receiving and sending messages and a first storage module for saving a VLAN table, the Ethernet device includes a second storage module, a processing module and an aging module, in:

所述第二存储模块保存以太网设备端口能够支持的虚拟局域网VLAN的信息;The second storage module saves the information of the virtual local area network (VLAN) supported by the port of the Ethernet device;

所述处理模块在所述端口接收到报文后,根据所述信息确定该端口能够支持所述报文标识的VLAN并且确定不存在相应的VLAN表时,为所述端口创建相应的VLAN表;After the port receives the message, the processing module determines according to the information that the port can support the VLAN identified by the message and determines that there is no corresponding VLAN table, creating a corresponding VLAN table for the port;

所述老化模块当所述以太网设备同时存在的VLAN表的数量大于设定阈值时,对当前没有使用的VLAN表进行老化。The aging module ages the currently unused VLAN tables when the number of concurrently existing VLAN tables in the Ethernet device is greater than a set threshold.

在本发明实施例中,配置以太网设备端口能够支持的VLAN的信息;并且在该端口接收到报文后,根据该信息确定该端口能够支持该报文标识的VLAN并且确定不存在相应的VLAN表时,为该端口创建相应的VLAN表,当以太网设备同时存在的VLAN表的数量大于设定阈值时,对当前没有使用的VLAN表进行老化。采用本发明实施例技术方案,可以突破现有技术中对以太网设备能够支持的VLAN在数量上的限制,并且只需要少量的存储空间来保存其能够支持的VLAN的信息,从而降低以太网设备为支持其下的VLAN而承受的负荷,保护了以太网设备的资源。In the embodiment of the present invention, configure the information of the VLAN that the Ethernet device port can support; and after the port receives the message, determine that the port can support the VLAN identified by the message and determine that there is no corresponding VLAN according to the information table, create a corresponding VLAN table for the port, and when the number of VLAN tables existing on the Ethernet device at the same time is greater than the set threshold, the currently unused VLAN table will be aged. By adopting the technical scheme of the embodiment of the present invention, it is possible to break through the limitation on the number of VLANs that Ethernet devices can support in the prior art, and only need a small amount of storage space to save the information of the VLANs that it can support, thereby reducing the number of VLANs that Ethernet devices can support. The load to support the VLAN under it protects the resources of the Ethernet device.

附图说明 Description of drawings

图1为本发明实施例中动态创建VLAN表的流程图;Fig. 1 is the flowchart of dynamically creating VLAN table in the embodiment of the present invention;

图2为本发明实施例中确定是否启动VLAN表的老化机制的流程图;Fig. 2 is the flow chart of determining whether to start the aging mechanism of VLAN table in the embodiment of the present invention;

图3为本发明实施例中VLAN表的老化机制中方法二的流程图;Fig. 3 is the flowchart of method two in the aging mechanism of VLAN table in the embodiment of the present invention;

图4为本发明实施例中以太网设备的一个系统框图;Fig. 4 is a system block diagram of Ethernet equipment in the embodiment of the present invention;

图5为本发明实施例中以太网设备的另一个系统框图。Fig. 5 is another system block diagram of the Ethernet device in the embodiment of the present invention.

具体实施方式 Detailed ways

由于在一段时间内通过以太网设备的报文对应的VLAN数量不会很多,因此,以太网设备需要同时支持的VLAN数量也不会很多,本发明可以利用以太网设备的这一特点动态创建VLAN,使得以太网设备能够支持大量VLAN。Because the number of VLANs corresponding to the messages passing through the Ethernet equipment will not be many in a period of time, the number of VLANs that the Ethernet equipment needs to support at the same time will not be many, and the present invention can utilize this feature of the Ethernet equipment to dynamically create VLANs , enabling Ethernet devices to support a large number of VLANs.

在本实施例中,配置以太网设备端口能够支持的VLAN的信息;并且在该端口接收到报文后,根据该信息确定该端口能够支持该报文标识的VLAN并且确定不存在相应的VLAN表时,为该端口创建相应的VLAN表。In this embodiment, configure the information of the VLAN that the port of the Ethernet device can support; and after the port receives the message, determine that the port can support the VLAN identified by the message and determine that there is no corresponding VLAN table according to the information , create a corresponding VLAN table for the port.

下面结合附图对本实施例做进一步地描述。The present embodiment will be further described below in conjunction with the accompanying drawings.

在本实施例中,在以太网设备中增加一个VLAN配置表,用于保存以太网设备各个端口分别能够支持的VLAN的信息。该VLAN配置表可以在网络管理员第一次配置时生成。例如,网络管理员首先为以太网设备的一个端口配置其能够支持VLAN ID从1至1024的VLAN,此时,以太网设备上就会生成一个VLAN配置表,该表中只有一个节点,该节点记录了本次配置的VLAN信息,由于配置是VLAN ID连续的VLAN,因此,只需要记录起始VLAN ID‘1’和结束VLAN ID‘1024’来表示能够支持VLAN ID从1至1024的VLAN就可以了,需要占用的空间很小。当网络管理员又配置该端口还能支持VLAN ID从2048至4094的VLAN时,则以太网设备就会在该配置表中再创建一个节点,记录该配置信息。In this embodiment, a VLAN configuration table is added to the Ethernet device to store information about the VLANs that each port of the Ethernet device can support. The VLAN configuration table can be generated when the network administrator configures it for the first time. For example, the network administrator first configures a port of the Ethernet device to support VLANs with VLAN IDs from 1 to 1024. At this time, a VLAN configuration table will be generated on the Ethernet device, and there is only one node in the table. The VLAN information of this configuration is recorded. Since the configuration is a VLAN with continuous VLAN IDs, it is only necessary to record the start VLAN ID '1' and the end VLAN ID '1024' to indicate that VLANs with VLAN IDs from 1 to 1024 can be supported. OK, it takes up very little space. When the network administrator configures the port to support VLANs with VLAN IDs from 2048 to 4094, the Ethernet device will create another node in the configuration table to record the configuration information.

由于本实施例中增加了VLAN配置表保存以太网设备各个端口分别能够支持的VLAN的信息,因此,本实施例中动态创建VLAN表的流程如图1所示,包括以下步骤:Since the VLAN configuration table is added in the present embodiment to preserve the information of the VLANs that each port of the Ethernet device can support respectively, the process of dynamically creating the VLAN table in the present embodiment is as shown in Figure 1, including the following steps:

在该端口接收到报文时,判断该端口是否能够支持该报文标识的VLAN但不存在相应的VLAN表,并在确定能够支持该报文标识的VLAN但不存在相应的VLAN表时,为该端口创建相应的VLAN表。When the port receives a message, judge whether the port can support the VLAN identified by the message but does not have a corresponding VLAN table, and when it is determined that it can support the VLAN identified by the message but does not have a corresponding VLAN table, it is The port creates the corresponding VLAN table.

步骤S101,以太网设备接收到一个报文;Step S101, the Ethernet device receives a message;

步骤S102,查询本地保存的接收到该报文的端口对应的VLAN表,如果存在该报文携带的VLAN ID对应的VLAN表,则直接结束;否则进行步骤S103;Step S102, query the VLAN table corresponding to the port that receives the message stored locally, if there is a VLAN table corresponding to the VLAN ID carried by the message, then directly end; otherwise, proceed to step S103;

步骤S103,查询本地保存的VLAN配置表,判断以太网设备是否能够支持该VLAN ID对应的VLAN,如果是,进行步骤S104,否则直接结束;Step S103, inquire the VLAN configuration table of local preservation, judge whether Ethernet device can support the corresponding VLAN of this VLAN ID, if yes, carry out step S104, otherwise end directly;

步骤S104,为该端口创建该VLAN表。Step S104, creating the VLAN table for the port.

可见,采用本实施例的技术方案,在极端的情况下,网络管理员可以把一个端口下的所有VLAN都配置了,例如配置VLAN 1~4094 QinQ 1~4094,VLAN配置表中只需要一个节点就可以记录该配置了。可见,在这种情况下,该端口在接收到报文后,只要判断出不存在该报文携带的VLAN ID对应的VLAN表时,就会创建一个新的VLAN表,这样如果底层网络不停变化,则最终可能创建了4094×4094个该端口对应得VLAN表。如果以太网的N个端口都能够支持其下的所有VLAN,则以太网设备最终可能创建了4094×4094×N个VLAN表。这么多VLAN表占用的系统资源是以太网设备难以承受的。而由于如前文所述,在一段时间内通过该设备的报文对应的VLAN数量不会很多,即在一段时间内,有一部分VLAN表是没有在使用的,为了减轻以太网设备的负荷,可以对没有在使用的VLAN表进行老化。It can be seen that, adopting the technical solution of this embodiment, in extreme cases, the network administrator can configure all VLANs under a port, such as configuring VLAN 1-4094 QinQ 1-4094, only one node is needed in the VLAN configuration table You can record the configuration. It can be seen that in this case, after the port receives the message, as long as it judges that there is no VLAN table corresponding to the VLAN ID carried by the message, it will create a new VLAN table. If the port is changed, 4094×4094 VLAN tables corresponding to the port may be created in the end. If the N ports of the Ethernet can support all the VLANs under it, the Ethernet device may finally create 4094×4094×N VLAN tables. The system resources occupied by so many VLAN tables are unbearable for Ethernet devices. As mentioned above, the number of VLANs corresponding to the packets passing through the device will not be many in a period of time, that is, in a period of time, some VLAN tables are not in use. In order to reduce the load of the Ethernet device, you can Aging is performed on VLAN tables that are not in use.

为了对没有在使用的VLAN表进行老化,在本实施例中,每成功创建一个VLAN表之后,以太网设备进行如图2所示的流程,包括以下步骤:In order to age the VLAN table not in use, in this embodiment, after each VLAN table is successfully created, the Ethernet device performs the process shown in Figure 2, including the following steps:

步骤S201,将当前存在的VLAN表的数量加1;Step S201, adding 1 to the number of currently existing VLAN tables;

以太网设备可以本地保存该当前存在的VLAN表的数量。The Ethernet device may locally save the number of currently existing VLAN tables.

步骤S202,检测该同时存在的VLAN表的数量是否大于设定阈值,如果是,进行步骤S203,否则直接结束;Step S202, detecting whether the number of VLAN tables existing at the same time is greater than a set threshold, if yes, proceed to step S203, otherwise directly end;

步骤S203,启动VLAN表的老化机制。Step S203, start the aging mechanism of the VLAN table.

在具体实现时,也可以不在每成功创建一个VLAN表之后进行上述检测,而是可以周期性地检测所存在的VLAN表的数量是否大于设定阈值,并根据检测结果进行相应处理。In specific implementation, the above detection may not be performed after each VLAN table is successfully created, but may periodically detect whether the number of existing VLAN tables is greater than a set threshold, and perform corresponding processing according to the detection result.

在本实施例中,提供多种VLAN表的老化机制,例如:In this embodiment, various aging mechanisms of VLAN tables are provided, for example:

方法一method one

以太网设备当其各个端口下的VLAN存在在线用户时,在相应的VLAN表中记录该在线用户的用户信息,则在VLAN表的老化机制启动后,查询VLAN表中是否存在用户信息,并在确定不存在用户信息时删除相应的VLAN表。When an Ethernet device has an online user in the VLAN under each port, it records the user information of the online user in the corresponding VLAN table, then after the aging mechanism of the VLAN table is started, it queries When it is determined that there is no user information, the corresponding VLAN table is deleted.

以BRAS设备为例,它能够支持的在线用户数目是有限制的,而每个用户只能属于一个VLAN,也就是说正在使用的VLAN表的数目是有限的。比如说某个BRAS设备只能支持10000用户,那么这一段时刻只有10000VLAN表是有用的,其它没用的VLAN表就可以老化掉。因此,该BRAS设备同时存在的VLAN表的设定阈值可以为10000,但是,为了防止反复创建、删除VLAN表,建议当创建的VLAN表个数超过设备允许接入的用户数两倍时再启动老化机制。Taking the BRAS device as an example, the number of online users it can support is limited, and each user can only belong to one VLAN, that is to say, the number of VLAN tables being used is limited. For example, if a BRAS device can only support 10,000 users, only 10,000 VLAN tables are useful during this period of time, and other useless VLAN tables can be aged out. Therefore, the set threshold of VLAN tables that exist simultaneously on the BRAS device can be 10,000. However, in order to prevent repeated creation and deletion of VLAN tables, it is recommended to restart when the number of VLAN tables created exceeds twice the number of users allowed to access the device. aging mechanism.

在具体实现时,在VLAN表的老化机制启动后,可以遍历以太网设备本地保存的VLAN表,也可以根据设置查询部分VLAN表,例如,只是查询以太网设备某个端口的VLAN表并将该端口没有用户在线的VLAN对应的VLAN表删除,在具体的处理中,可能只删除某个端口没有用户在线的VLAN对应的VLAN表就能够令以太网设备同时存在的VLAN表的数量不大于设定阈值,这样处理时一次性删除的VLAN表数量相对较少,可以避免反复创建并删除大量的VLAN表。In actual implementation, after the aging mechanism of the VLAN table is started, the local VLAN table of the Ethernet device can be traversed, and part of the VLAN table can also be queried according to the settings. For example, only the VLAN table of a certain port of the Ethernet device is queried and the Delete the VLAN table corresponding to the VLAN with no online user on the port. In the specific processing, it is possible to delete only the VLAN table corresponding to the VLAN with no online user on a certain port, so that the number of VLAN tables existing on the Ethernet device at the same time is not greater than the set value. Threshold, in this way, the number of VLAN tables deleted at one time is relatively small, which can avoid repeatedly creating and deleting a large number of VLAN tables.

方法二Method Two

如果以太网设备在每个端口接收或者发送报文,则在相应的VLAN表做一个标记来表示该VLAN表正在使用,在VLAN表的老化机制启动后,以太网设备进行如图3所示的流程,包括以下步骤:If the Ethernet device receives or sends packets on each port, a mark is made in the corresponding VLAN table to indicate that the VLAN table is in use. After the aging mechanism of the VLAN table is started, the Ethernet device performs the process as shown in Figure 3. process, including the following steps:

步骤S301,查询当前存在的VLAN表是否存在标记,如果是,进行步骤S302,否则,进行步骤S303;Step S301, inquire whether there is a tag in the currently existing VLAN table, if yes, proceed to step S302, otherwise, proceed to step S303;

在本步骤中,可以遍历以太网设备本地保存的VLAN表,也可以根据设置查询部分VLAN表。In this step, the local VLAN table saved by the Ethernet device can be traversed, and part of the VLAN table can also be queried according to the settings.

步骤S302,清除相应的标记,结束;Step S302, clear the corresponding flag, end;

步骤S303,删除相应的VLAN表。Step S303, delete the corresponding VLAN table.

可见,通过上述流程,在一个VLAN表的标记被清除掉之后,如果在下次查询其是否存在标记时仍然没有标记,即在此期间相应的VLAN没有处理报文,则该VLAN表会被删除。Visible, through above-mentioned process, after the mark of a VLAN table is cleared, if still do not have mark when inquiring whether it exists mark next time, promptly corresponding VLAN does not process message during this period, then this VLAN table can be deleted.

在具体实现时,可以不在每一次查询到一个VLAN表中不存在该标记之后就删除该VLAN表,而是可以在查询到一个VLAN表中不存在该标记达到设定次数后再删除该VLAN表。In concrete implementation, can not just delete this VLAN table after inquiring in a VLAN table at every turn and do not have this label, but can delete this VLAN table after inquiring into a VLAN table and do not have this label to reach setting number of times .

另外,区别于上述在VLAN表中做标记的方法,如果以太网设备在每个端口接收或者发送报文,还可以在相应的VLAN表记录一个时间戳信息,用来标记接收或者发送报文的时间,而在VLAN表的老化机制启动后,以太网设备可以根据该时间戳信息对VLAN进行老化。In addition, different from the above method of marking in the VLAN table, if the Ethernet device receives or sends packets on each port, it can also record a time stamp information in the corresponding VLAN table to mark the time of receiving or sending packets. Time, and after the aging mechanism of the VLAN table starts, the Ethernet device can age the VLAN according to the time stamp information.

需要说明的是,上述所提到的本发明实施例所对应的方法可以存储在一个计算机可读取存储介质中。It should be noted that the above-mentioned methods corresponding to the embodiments of the present invention may be stored in a computer-readable storage medium.

本实施例中的以太网设备,如图4所示,包括端口100和第一存储模块200,为了实现动态创建VLAN表,本实施例中的以太网设备还包括第二存储模块300和处理模块400,其中:The Ethernet device in this embodiment, as shown in Figure 4, includes a port 100 and a first storage module 200, in order to realize dynamic creation of a VLAN table, the Ethernet device in this embodiment also includes a second storage module 300 and a processing module 400, of which:

端口100接收和发送报文;Port 100 receives and sends messages;

第一存储模块200保存VLAN表;The first storage module 200 saves the VLAN table;

第二存储模块300保存以太网设备端口100能够支持的VLAN的信息;The second storage module 300 saves the VLAN information that the Ethernet device port 100 can support;

处理模块400在端口接收到报文后,根据该信息确定该端口能够支持该报文标识的VLAN并且确定不存在相应的VLAN表时,为端口创建相应的VLAN表。After the port receives the message, the processing module 400 determines according to the information that the port can support the VLAN identified by the message and determines that there is no corresponding VLAN table, and creates a corresponding VLAN table for the port.

如图5所示,处理模块400可以包括第一判断单元401和第二判断单元402,其中:As shown in FIG. 5, the processing module 400 may include a first judging unit 401 and a second judging unit 402, wherein:

第一判断单元401在端口接收到报文时,判断第一存储模块200中是否存在该报文对应的VLAN表,并在确定不存在时通知第二判断单元402;When the first judging unit 401 receives a message at the port, it judges whether there is a VLAN table corresponding to the message in the first storage module 200, and notifies the second judging unit 402 when it is determined that it does not exist;

第二判断单元402根据第二存储模块300保存的信息判断端口是否能够支持该报文标识的VLAN并输出判断结果。The second judging unit 402 judges whether the port can support the VLAN identified by the message according to the information stored in the second storage module 300 and outputs the judging result.

本实施例中的以太网设备可以包括老化模块500,其中:The Ethernet device in this embodiment may include an aging module 500, wherein:

老化模块500当以太网设备同时存在的VLAN表的数量大于设定阈值时,对当前没有使用的VLAN表进行老化。The aging module 500 ages the currently unused VLAN tables when the number of concurrently existing VLAN tables on the Ethernet device is greater than a set threshold.

由于老化模块500可以在每次创建VLAN表后进行判断,因此,处理模块400在第一存储模块200中创建VLAN表后通知老化模块500;Since the aging module 500 can judge after creating the VLAN table each time, the processing module 400 notifies the aging module 500 after creating the VLAN table in the first storage module 200;

老化模块500根据该通知进行处理。The aging module 500 performs processing according to the notification.

对应对没有在使用的VLAN表进行老化的方法一,以太网设备可以包括控制模块,用于在第一存储模块200中的VLAN表中记录相应VLAN的在线用户的用户信息;For the first method of aging the VLAN table that is not in use, the Ethernet device may include a control module for recording the user information of the online user of the corresponding VLAN in the VLAN table in the first storage module 200;

老化模块500查询第一存储模块200中的VLAN表中是否存在用户信息,并在确定不存在用户信息时删除相应的VLAN表。The aging module 500 queries whether there is user information in the VLAN table in the first storage module 200, and deletes the corresponding VLAN table when it is determined that there is no user information.

对应对没有在使用的VLAN表进行老化的方法二,以太网设备可以包括标记模块,用于在端口接收或者发送报文时,在第一存储模块200中标记相应的VLAN表正在使用;For the second method of aging the VLAN table that is not in use, the Ethernet device may include a marking module, which is used to mark the corresponding VLAN table in use in the first storage module 200 when the port receives or sends a message;

老化模块500查询第一存储模块200中的VLAN表是否存在标记,如果是,清除标记;否则,删除相应的VLAN表。The aging module 500 inquires whether there is a tag in the VLAN table in the first storage module 200, and if so, clears the tag; otherwise, deletes the corresponding VLAN table.

采用本实施例技术方案,在极端情况下,网络管理员配置以太网设备能够支持其下的所有VLAN,则不管底层网络的VLAN划分如何变动,都不再需要人工干预,大大减轻了网络管理员的工作负担。Adopting the technical solution of this embodiment, in extreme cases, the network administrator configures the Ethernet device to support all VLANs under it, no matter how the VLAN division of the underlying network changes, manual intervention is no longer required, greatly reducing the network administrator's workload.

显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention also intends to include these modifications and variations.

Claims (10)

1, a kind of method of dynmaic establishing virtual local network table is characterized in that, may further comprise the steps:
The information of the virtual LAN VLAN that the configuration ethernet device port can be supported; And
After described port receives message, when determining that according to described information described port can be supported the VLAN of described message identification and determine not have corresponding vlan table, for described port is created corresponding vlan table;
When the quantity of the simultaneous vlan table of described ethernet device during, the current vlan table that does not have to use is worn out greater than setting threshold.
2, the method for claim 1, it is characterized in that, after described port receives message, judge whether described port exists the vlan table of described message correspondence earlier, when determining not exist, judge again whether described port can support the VLAN of described message identification.
3, the method for claim 1 is characterized in that, when creating vlan table, whether the quantity of judging the simultaneous vlan table of described ethernet device is greater than setting threshold periodically or each.
4, method as claimed in claim 3 is characterized in that, the online user's of record corresponding VLAN user profile in vlan table;
The concrete grammar that the current vlan table that does not have to use is worn out is: whether have user profile in the inquiry vlan table, and delete corresponding vlan table when determining not have user profile.
5, method as claimed in claim 3 is characterized in that, when described port received or send message, the corresponding vlan table of mark used;
The concrete grammar that the current vlan table that does not have to use is worn out is: whether the inquiry vlan table exists mark, if remove described mark; Otherwise, delete corresponding vlan table.
6, a kind of ethernet device comprises being used to receive and send the port of message and first memory module of preserving vlan table, it is characterized in that described ethernet device comprises second memory module, processing module and aging module, wherein:
The information of the virtual LAN VLAN that described second memory module preservation ethernet device port can be supported;
Described processing module is after described port receives message, when determining that according to described information this port can be supported the VLAN of described message identification and determine not have corresponding vlan table, for described port is created corresponding vlan table;
Described aging module wears out to the current vlan table that does not have to use when the quantity of the simultaneous vlan table of described ethernet device during greater than setting threshold.
7, ethernet device as claimed in claim 6 is characterized in that, described processing module comprises first judging unit and second judging unit, wherein:
Described first judging unit is judged the vlan table that whether has described message correspondence in described first memory module when described port receives message, and is determining to notify when not existing described second judging unit;
The information that described second judging unit is preserved according to described second memory module judges whether described port can be supported the VLAN of described message identification and export judged result.
8, ethernet device as claimed in claim 6 is characterized in that, described processing module is notified described aging module create vlan table in described first memory module after;
Described aging module is handled according to described notice.
9, ethernet device as claimed in claim 8 is characterized in that, described ethernet device comprises control module, is used for the user profile of the online user of record corresponding VLAN in the vlan table of described first memory module;
Described aging module inquires about in the vlan table in described first memory module whether have user profile, and deletes corresponding vlan table when determining not have user profile.
10, ethernet device as claimed in claim 8 is characterized in that, described ethernet device comprises mark module, is used for when described port receives or send message, and the corresponding vlan table of mark uses in described first memory module;
Whether the vlan table that described aging module is inquired about in described first memory module exists mark, if remove described mark; Otherwise, delete corresponding vlan table.
CNB2006101561259A 2006-12-27 2006-12-27 Method for dynmaic establishing virtual local network table and Ethernet equipment Expired - Fee Related CN100433693C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006101561259A CN100433693C (en) 2006-12-27 2006-12-27 Method for dynmaic establishing virtual local network table and Ethernet equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006101561259A CN100433693C (en) 2006-12-27 2006-12-27 Method for dynmaic establishing virtual local network table and Ethernet equipment

Publications (2)

Publication Number Publication Date
CN1976312A CN1976312A (en) 2007-06-06
CN100433693C true CN100433693C (en) 2008-11-12

Family

ID=38126118

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006101561259A Expired - Fee Related CN100433693C (en) 2006-12-27 2006-12-27 Method for dynmaic establishing virtual local network table and Ethernet equipment

Country Status (1)

Country Link
CN (1) CN100433693C (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104519052B (en) * 2014-12-02 2017-06-20 重庆尊贤科技有限公司 The lower multi-internet integration transmission method of the multiple vlan of one family one binding authentication mechanism outlets

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5949783A (en) * 1997-09-08 1999-09-07 3Com Corporation LAN emulation subsystems for supporting multiple virtual LANS
CN1474564A (en) * 2002-08-05 2004-02-11 ��Ϊ�������޹�˾ A communication method between virtual local area networks
US20040047352A1 (en) * 1999-10-22 2004-03-11 Dell Usa L.P. Site-to-site dynamic virtual local area network
CN1540931A (en) * 2003-04-22 2004-10-27 华为技术有限公司 The Method of Hot Backup for the Creation and Deletion of Virtual Local Area Network in the Switch

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5949783A (en) * 1997-09-08 1999-09-07 3Com Corporation LAN emulation subsystems for supporting multiple virtual LANS
US20040047352A1 (en) * 1999-10-22 2004-03-11 Dell Usa L.P. Site-to-site dynamic virtual local area network
CN1474564A (en) * 2002-08-05 2004-02-11 ��Ϊ�������޹�˾ A communication method between virtual local area networks
CN1540931A (en) * 2003-04-22 2004-10-27 华为技术有限公司 The Method of Hot Backup for the Creation and Deletion of Virtual Local Area Network in the Switch

Also Published As

Publication number Publication date
CN1976312A (en) 2007-06-06

Similar Documents

Publication Publication Date Title
US20160294769A1 (en) Communication Method, Apparatus, and System of Virtual Extensible Local Area Network
CN103795636B (en) Multicast processing method, device and system
JP3449326B2 (en) Data search system, packet processing apparatus, and control method
CN103731353B (en) The physical address acquisition methods of virtual machine
CN112422393A (en) Method for transmitting message of extensible virtual local area network, computer equipment and readable medium
CN104243265A (en) Gateway control method, device and system based on virtual machine migration
CN110417569A (en) A network link fault processing method and tunnel endpoint equipment
CN103997414A (en) Method and network control unit for generating configuration information
WO2013155959A1 (en) Accessing ip network and edge devices
CN104811473B (en) A kind of method, system and management system for creating virtual non-volatile storage medium
CN110798541B (en) Interface sharing method, message forwarding method, interface sharing device, message forwarding device, electronic equipment and storage medium
WO2014114196A1 (en) Keeping a terminal access location record alive
US20170180311A1 (en) Systems and methods for managing network address information
CN105589744A (en) Virtual machine migration method and apparatus
CN108683523A (en) A kind of SDN frameworks based on network virtualization
CN104168140A (en) VTEP abnormal condition processing method and device
CN100433693C (en) Method for dynmaic establishing virtual local network table and Ethernet equipment
CN100435528C (en) Method for reducing media access control address learning in network
CN101115001B (en) Host computer of ADSL router and PVC dynamic binding method
CN107517111A (en) A dynamic virtual local area network management method and its device, network equipment
CN103200110B (en) A kind of data multicast method and apparatus being applied to intelligent substation local area network
EP2523399A1 (en) Method and device for realizing flexible qinq
WO2016101515A1 (en) Method and apparatus for determining information technology (it) device port
CN108667644A (en) Method for Configuring ACL Services and Forwarding Devices
CN101577660B (en) Method and device for acquiring label forwarding list item and forwarding message

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20081112

Termination date: 20211227

CF01 Termination of patent right due to non-payment of annual fee
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载