Message forwarding method and system, switch, electronic device and readable storage medium

By determining the packet type in the switch and using Layer 2 multicast to obtain the port list, the problem of traditional switch flooding being limited to ordinary physical ports is solved. This enables VLAN-based flooding to be as rich and diverse as multicast, meeting the needs of special service instances.

CN115865561BActive Publication Date: 2025-11-04WXILICON TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211440409.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-17
Publication Date
2025-11-04
Estimated Expiration
2042-11-17

AI Technical Summary

Technical Problem

Traditional switches only use ordinary physical port members of VLANs for flooding when implementing flooding, which cannot meet the needs of special applications and has limitations.

Method used

By determining whether the type of the source packet information is a known type, and if it is not a known type, the packet is flooded based on the list of outgoing ports in the VLAN where the source port is located, obtained by Layer 2 multicast, and then forwarded in combination with multicast logic.

Benefits of technology

This enables VLAN-based flooding to no longer be limited to ordinary physical port members, but can meet the needs of special service instances where the outgoing port is another type of port, thus improving the diversity and applicability of flooding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115865561B_ABST
    Figure CN115865561B_ABST
Patent Text Reader

Abstract

The embodiment of the disclosure discloses a message forwarding method, system and switch based on VLAN, which comprises the following steps: obtaining source message information sent by a source port; judging whether the message type of the source message information is a known type; in response to the type of the source message information being a non-known type, obtaining an out port list for flooding propagation in the VLAN where the source port is located according to layer 2 multicast, and forwarding the message based on the out port list. When the type of the source message information is a non-known type, the embodiment of the disclosure obtains an out port list for flooding propagation in the VLAN where the source port is located according to layer 2 multicast, so that the obtained out port is still in the VLAN, but the type of the out port is no longer limited to a common physical port, but is combined with the transmission logic of multicast, the type of the out port can be as rich and diverse as multicast, and the demand that the out port is other types of ports and some special service instances can be met.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of data transmission, and particularly relates to a message forwarding method and system, a switch, an electronic device, and a computer readable storage device. BACKGROUND

[0002] Virtual Local Area Network (VLAN) is a communication technology defined by 802.1Q protocol to logically divide a physical Local Area Network (LAN) into multiple broadcast domains. The emergence of VLAN technology enables an administrator to logically divide different users in the same physical LAN into different broadcast domains according to actual application requirements, and each VLAN contains a group of computer workstations with the same requirements and has the same attributes as the physically formed LAN.

[0003] Flooding is a data flow transmission technology used by switches and bridges to send data received from an interface to all interfaces except the interface.

[0004] In the implementation of flooding in a conventional switch, no combination application based on VLAN is performed, or only flooding forwarding through ordinary physical port members of the VLAN is performed, which can meet the basic requirements of users, but there is a certain limitation in special applications, especially in chip flow design. SUMMARY

[0005] Embodiments of the present disclosure provide a message forwarding method and device based on VLAN, a switch, a computing device, and a storage device to solve the problem that a conventional switch can only meet the basic requirements of users when performing flooding forwarding through ordinary physical port members of the VLAN, and cannot meet the requirements of special applications.

[0006] In an aspect of embodiments of the present disclosure, a message forwarding method based on VLAN is provided, applied to a switch, and includes the following steps.

[0007] Obtaining source message information sent by a source port;

[0008] Determining whether the message type of the source message information is a known type;

[0009] In response to the type of the source message information being an unknown type, obtaining an egress port list for flooding propagation in a VLAN where the source port is located according to a Layer 2 multicast;

[0010] Performing message forwarding based on the egress port list.

[0011] Optionally, in the method embodiments of the present disclosure, in the step of obtaining source message information sent by a source port, the source message information is message information filtered by pruning through the source port; and the out port list obtained according to the two-layer multicast and flooded in the VLAN in which the source port is located does not include the source port.

[0012] Optionally, in any of the method embodiments of the present disclosure, before the step of obtaining the out port list flooded in the VLAN in which the source port is located according to the two-layer multicast, the method further includes a multicast configuration step, and the multicast configuration step includes allocating a multicast leaf table of the multicast, and the step of allocating the multicast leaf table of the multicast includes:

[0013] storing a start position of the multicast leaf table; and

[0014] configuring a multicast member and a multicast member type of the multicast leaf table.

[0015] Optionally, in any of the method embodiments of the present disclosure, the multicast member of the multicast leaf table includes at least one of a VLAN physical port, an aggregation member port, a two-layer virtual port and a three-layer virtual port.

[0016] Optionally, in any of the method embodiments of the present disclosure, the two-layer virtual port includes at least one of an OutIntf+exdx format port and an OutIntf+token format port; and the three-layer virtual port includes at least one of an utIntf+evmid+exdx format port and an OutIntf+token+nhi format port.

[0017] Optionally, in any of the method embodiments of the present disclosure, the step of obtaining the out port list flooded in the VLAN in which the source port is located according to the two-layer multicast includes obtaining the out port list flooded according to the multicast member in the multicast leaf table.

[0018] According to another aspect of the embodiments of the present disclosure, a switch is provided for message forwarding in a VLAN, including:

[0019] a receiving module configured to obtain source message information sent by a source port;

[0020] a configuration module configured to allocate a multicast leaf table of a two-layer multicast;

[0021] an out port obtaining module configured to, in response to a type of the source message information being a non-predictable type, obtain an out port list flooded in a VLAN in which the source port is located according to the multicast leaf table;

[0022] The sending module is configured to perform packet forwarding based on the egress port list.

[0023] According to a further aspect of the embodiments of the present disclosure, a packet forwarding system is provided, which is applied to packet forwarding within a VLAN, and includes:

[0024] The source end is configured to generate source packet information, and send the source packet information after pruning and filtering;

[0025] The switch is configured to acquire the source packet information sent by the source end, and in response to the type of the source packet information being a non-predictable type, acquire an egress port list of the source port within the VLAN according to the layer 2 multicast, and perform packet forwarding based on the egress port list.

[0026] The receiving end is in the same VLAN as the source end, and the receiving end corresponding to the egress port list receives the packet information sent by the switch.

[0027] According to a further aspect of the embodiments of the present disclosure, an electronic device is provided, which includes:

[0028] The memory is configured to store a computer program;

[0029] The processor is configured to execute the computer program stored in the memory, and when the computer program is executed, the VLAN-based packet forwarding method described above is implemented.

[0030] According to a further aspect of the embodiments of the present disclosure, a computer readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the VLAN-based packet forwarding method described above is implemented.

[0031] The VLAN-based packet forwarding method, system, switch and electronic device provided by the embodiments of the present disclosure are configured to determine whether the type of the source packet information is a predictable type, and when the type of the source packet information is a non-predictable type, acquire an egress port list of the source port within the VLAN according to the layer 2 multicast, so that the acquired egress port is still within the VLAN, but the type of the egress port is no longer limited to a normal physical port, but can be as rich and diverse as the multicast. Thus, the problem that the VLAN-based flooding is still limited to a normal physical port member is solved, and the VLAN-based flooding can be as rich and diverse as the multicast, which can meet the needs of some special service instances in which the egress port is another type of port.

[0032] The technical solutions of the present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF DRAWINGS

[0033] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0034] The present disclosure can be more clearly understood and appreciated from the following detailed description, taken in conjunction with the following drawings of which:

[0035] Figure 1 Packet forwarding method flow chart for an embodiment of the present disclosure.

[0036] Figure 2 Packet forwarding system schematic for an embodiment of the present disclosure.

[0037] Figure 3 Switch internal forwarding flow chart for an embodiment of the present disclosure. DETAILED DESCRIPTION

[0038] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of the components and steps set forth in these embodiments, numerical expressions, and numerical values, do not limit the scope of the present disclosure unless specifically stated otherwise.

[0039] Those skilled in the art can understand that the terms "first", "second", and the like in the embodiments of the present disclosure are only used to distinguish different steps, devices, or modules, and do not represent any specific technical meaning, nor do they represent a necessary logical sequence between them.

[0040] It should also be understood that in the embodiments of the present disclosure, "multiple" can refer to two or more, and "at least one" can refer to one, two, or more.

[0041] It should also be understood that for any component, data, or structure mentioned in the embodiments of the present disclosure, unless specifically limited or given a contrary implication by the context or prior art, it can generally be understood as one or more.

[0042] In addition, the term "and / or" in the present disclosure is only a description of the association relationship between the associated objects, which means that there can be three relationships, for example, A and / or B can represent the existence of A alone, the existence of A and B together, and the existence of B alone. In addition, the character " / " in the present disclosure generally represents an "or" relationship between the front and rear associated objects.

[0043] It should also be understood that the description of various embodiments of the present disclosure emphasizes the differences between the various embodiments, and the same or similar parts can be referred to each other, and for the sake of brevity, will not be repeated.

[0044] Meanwhile, it should be understood that the sizes of the various parts shown in the drawings are not drawn in accordance with the actual proportional relationship for the sake of description.

[0045] The following description of at least one example embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.

[0046] Techniques, methods, and devices known to those of ordinary skill in the relevant art can not be discussed in detail herein. However, where appropriate, such techniques, methods, and devices can be considered part of the specification.

[0047] It is to be noted that like reference numerals and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it is not necessary to discuss it further in subsequent figures.

[0048] Embodiments of the present disclosure can be applied to terminal devices, computer systems, servers, and the like electronic devices, which can operate with numerous other general purpose or special purpose computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and / or configurations that can be suitable for use with terminal devices, computer systems, servers, and the like electronic devices include, but are not limited to: personal computers, server computers, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, minicomputers, mainframe computers, and including any system of any of the foregoing, distributed cloud computing environments, etc.

[0049] Terminal devices, computer systems, servers, and the like electronic devices can be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules can include routines, programs, objects, components, logic, data structures, and the like, which perform particular tasks or implement particular abstract data types. Computer systems / servers can be practiced in distributed cloud computing environments with remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules can be located in local or remote computer system storage media including memory storage devices.

[0050] As described above, the VLAN is a communication technology that the 802.1Q protocol stipulates to logically divide a physical LAN into multiple broadcast domains. The emergence of the VLAN technology enables an administrator to logically divide different users in the same physical LAN into different broadcast domains according to actual application requirements, and each VLAN contains a group of computer workstations with the same requirements and has the same attribute as the physically formed LAN. Broadcasting is a way of information propagation, which refers to that a certain device in a network simultaneously sends data to all other devices in the network, and the range of the broadcast is the broadcast domain. Flooding is a data flow transmission technology used by switches and bridges, which sends the received data stream from a certain interface to all interfaces except the interface.

[0051] The present inventors found in the research process that, in the implementation of flooding in the traditional switch, the VLAN is not combined and applied, or only the ordinary physical port member of the VLAN is used for flooding forwarding, which can meet the basic needs of users. However, there are certain limitations in special applications, especially in chip flow design.

[0052] For example, the port member of the traditional VLAN-based flooding forwarding is still forwarded according to the member list of the VLAN, and it can be seen that the VLAN-based flooding is still limited to ordinary physical port members. In some special projects, the egress port is required to be other types of ports. Therefore, when facing some special service instances and other needs, the traditional VLAN-based flooding scheme cannot meet the needs, and it is necessary to continue to find a solution to the above-mentioned special service instances.

[0053] Based on the above needs, the present inventors found that if the port member of the VLAN-based flooding forwarding is not forwarded according to the member list of the VLAN, but occupies additional multicast-related resources and implements related forwarding according to the logic of multicast, although certain multicast group-related resources are occupied, the VLAN-based flooding is no longer limited to ordinary physical port members, but can be as rich and diverse as multicast, and can meet the needs of some special service instances with other types of egress ports.

[0054] Based on this, the present disclosure determines whether the message type of the source message information is a known type, and when the type of the source message information is a non-known type, obtains an egress port list for flooding propagation in the VLAN where the source port is located according to the two-layer multicast, thereby solving the problem that the VLAN-based flooding is still limited to ordinary physical port members, and realizing that the VLAN-based flooding is no longer limited to ordinary physical port members, but can be as rich and diverse as multicast, and can meet the needs of some special service instances with other types of egress ports.

[0055] The technical solutions of the present disclosure will be described in detail below with reference to the accompanying drawings and embodiments.

[0056] Figure 1 A flowchart of an embodiment of the VLAN-based message forwarding method of the present disclosure is shown in FIG. 1. As shown in FIG. 1, the VLAN-based message forwarding method of the embodiment is applied to a switch and includes the following steps: Figure 1

[0057] S102, obtaining source message information sent by a source port.

[0058] The source end in the embodiment of the present disclosure can be a PC or the like in a specific VLAN, and the embodiment of the present disclosure does not limit the specific type of the source message sent by the source end. In this embodiment, the message information to be sent by the source end is forwarded as the source message. Of course, the source message information can be preprocessed before it is sent by the source end to meet the subsequent functional requirements.

[0059] S104, judging whether the message type of the source message information is a known type.

[0060] The purpose of this step is to judge whether the type of the source message information is a known type of the switch. After receiving the source message information sent by the source end, the switch first judges whether the source message information is a known message type of the switch. If it is a known message type, the switch can directly perform message forwarding according to MAC index query; if it is not a known message type of the switch, the switch needs to perform flooding to find the port.

[0061] When the switch receives the message information, it searches the MAC address table to judge whether there is a table entry of the message information in the MAC address table. If there is, the switch considers that the message is a known message, and then performs message forwarding according to the physical port of the VLAN; if there is not, the switch considers that the message is an unknown message, and then continues the following step S106 for further processing.

[0062] S106, in response to the type of the source message information being a non-known type, obtaining a list of egress ports for flooding and spreading in the VLAN in which the source port is located according to the second layer multicast.

[0063] When the type of the source message information is a non-known type, i.e., it is not a known message type of the switch, the switch needs to perform flooding to find the egress port. In order to make the type of the egress port no longer limited to the type of the egress port in the VLAN, i.e., no longer limited to the type of the ordinary physical port member, when the switch receives the unknown message and needs to perform flooding to find the egress port, the switch will internally process the message according to the second layer multicast.

[0064] ​Of course, in other embodiments, other multicast modes can also be selected to implement message forwarding, and the disclosure does not limit the specific operation mode of multicast forwarding.

[0065] In the embodiment, the egress port corresponds to other receiving terminals in the VLAN where the source terminal is located. The receiving terminal can also be a pc terminal like the source terminal. Similarly, the disclosure does not specifically limit the type of receiving terminal.

[0066] S108, forwarding the message based on the egress port list.

[0067] This step forwards the message information to the terminals in the member table of the VLAN where the source port is located except the terminal where the source port is located based on the egress port list obtained by the multicast member in the multicast leaf table.

[0068] The disclosure determines whether the message type of the source message information is a known type, and when the type of the source message information is a non-known type, obtains an egress port list for flooding propagation in the VLAN where the source port is located based on the two-layer multicast, so that the obtained egress port is still in the VLAN, but the type of the egress port is no longer limited to the ordinary physical port, but is combined with the transmission logic of multicast. The type of the egress port can be as rich and diverse as multicast. Thus, the problem that flooding based on VLAN is still limited to ordinary physical port members is solved, and flooding based on VLAN is no longer limited to ordinary physical port members, but can be as rich and diverse as multicast, which can meet the needs of some special service instances in which the egress port is of other types.

[0069] As described above, the source terminal can preprocess the source message before sending it out to meet subsequent functional requirements. In the above embodiment, in order to meet the subsequent requirement of finding the egress port by flooding, the source message is pruned and filtered before it is sent out by the source terminal, that is, the source message information is the message information pruned and filtered by the source port, so that flooding finding is realized.

[0070] Of course, in order to realize message forwarding combined with multicast logic, the above embodiment further includes a multicast configuration step before multicast forwarding, which includes allocating a multicast leaf table of multicast. The step of allocating the multicast leaf table of multicast includes: storing the starting position of the multicast leaf table; and configuring the multicast member and the multicast member type of the multicast leaf table. Based on this, the above step of obtaining an egress port list for flooding propagation in the VLAN where the source port is located based on two-layer multicast includes obtaining an egress port list for flooding propagation according to the multicast member in the multicast leaf table.

[0071] The multicast member of the multicast leaf table can include at least one of a VLAN physical port, an aggregation member port, a Layer 2 virtual port, and a Layer 3 virtual port. The multicast member can be of multiple types, i.e., can include multiple leaves, each leaf specifying 1-6 different types. The VLAN physical port includes a normal VLAN physical port, which can include multiple ports, such as bitmap ports for VLAN transmission when the message is a known message type. The aggregation member port can be a glag format port. The Layer 2 virtual port includes at least one of an OutIntf+esdx format port and an OutIntf+token format port, and the Layer 3 virtual port includes at least one of an utIntf+evmid+esdx format port and an OutIntf+token+nhi format port. In actual application, different format ports are selected according to the difference in the type of the applied service. For example, the esdx type port is selected for mef service, and the token type port is selected for mpls related service.

[0072] As described above, the port member of the VLAN based flooding forwarding of the embodiments of the present disclosure is not forwarded according to the member list of the VLAN, but occupies additional multicast related resources, and realizes related forwarding in the logic of the multicast, so that the VLAN based flooding is no longer limited to the normal physical port member, but can be as rich and diverse as the multicast, and can meet the needs of some special service instances with other types of ports as the egress port.

[0073] In a chip type project service instance that can be supported, the chip uses ISDX / ESDX to represent the service instance. ISDX represents the source ID of the service instance, and ESDX represents the destination ID of the service instance. One service instance corresponds to one ISDX and one ESDX, and the ISDX and ESDX values are equal. One service instance represents one port / port+vlan / port+qinq, one LSP, or one PW. When the chip configures the related service, the egress port type is esdx type at this time. When flooding is performed based on a forwarding domain vlan, it is not possible to meet the needs by only using the normal physical port in the vlan member table, but the multicast leaf member table can meet the needs. At this time, if the flooding forwarding is realized by the logic of the multicast, the chip flow has better compatibility and identity.

[0074] The VLAN member table is stored in the above-mentioned chip project, and only basic physical ports can be configured. The multicast configuration process is to allocate the multicast mc_index, in which the start position of the mc_leaf table is stored, and the mc_leaf table contains multicast members, member types and other information. The multicast leaf table can include bitmap format, glag format, OutIntf+esdx format, OutIntf+evmid+esdx format, OutIntf+token format, OutIntf+token+nhi format. The following exemplary lists the related register information of the VLAN member table and the multicast leaf table:

[0075] (1) The VLAN member table can be configured as follows:

[0076] (1) PFS_MPLS_L3::VLAN_TBL_2::VLAN_PORT_MASK_LOW[0:31]

[0077] Configuration description: Specify the mask of the port (Port0-Port31) under the vlan, 0 indicates that the port does not belong to the vlan, and 1 indicates that the port belongs to the vlan

[0078] (2) PFS_MPLS_L3::VLAN_TBL_3::VLAN_PORT_MASK_HIGH[0:31]

[0079] Configuration description: Specify the mask of the port (Port32-Port63) under the vlan, 0 indicates that the port does not belong to the vlan, and 1 indicates that the port belongs to the vlan

[0080] (2) The multicast leaf table can be configured as follows:

[0081] 1. Configuration description of IPMC::CPU_CFG_MC_LEAF_TABLE_DATA0::LEAF0_INFO_L[0:31]:

[0082] (1) bitmap format: bitmap member [0:31] of leaf0;

[0083] (2) glag format: glag_id [0:4] of leaf0, [5:31] is reserved as 0;

[0084] (3) OutIntf+esdx format;

[0085] (4) OutIntf+evmid+esdx format;

[0086] (5) OutIntf+token format;

[0087] (6) OutIntf + token + nhi format.

[0088] 2 Configuration of IPMC::CPU_CFG_MC_LEAF_TABLE_DATA1 ::LEAF0_HUB_SPOKE[16:16]: hub / spoke attribute of leaf0, 0 is spoke, 1 is hub.

[0089] 3 Configuration of IPMC::CPU_CFG_MC_LEAF_TABLE_DATA1 ::LEAF0_TYPE[13:15]: multicast leaf type, 1 is bitmap format, 2 is glag format, etc.

[0090] 4 Configuration of IPMC::CPU_CFG_MC_LEAF_TABLE_DATA1 ::LEAF0_INFO_H[0:12]:

[0091] (1) bitmap format: upsid[0:3], [4:12] reserved as 0;

[0092] (2) glag format: [0:12] reserved as 0;

[0093] (3) OutIntf + esdx format;

[0094] (4) OutIntf + evmid + esdx format;

[0095] (5) OutIntf + token format;

[0096] (6) OutIntf + token + nhi format.

[0097] 5 Configuration of IPMC::CPU_CFG_MC_LEAF_TABLE_DATA2 ::LEAF1_INFO_L[0:31]:

[0098] (1) bitmap format: bitmap member [32:63] of leaf1;

[0099] (2) glag format: glag_id [0:4] of leaf0, [5:31] reserved as 0;

[0100] (3) OutIntf + esdx format;

[0101] (4) OutIntf + evmid + esdx format;

[0102] (5) OutIntf + token format;

[0103] (6) OutIntf + token + nhi format.

[0104] 6. Configuration of IPMC::CPU_CFG_MC_LEAF_TABLE_DATA3::NEXT_PTR [17:30]: Next Multicast Leaf Pointer.

[0105] 7. Configuration of IPMC::CPU_CFG_MC_LEAF_TABLE_DATA3::LEAF1_HUB_SPOKE [16:16]: Hub / Spoke attribute of leafl, 0 is spoke, 1 is hub.

[0106] 8. Configuration of IPMC::CPU_CFG_MC_LEAF_TABLE_DATA3::LEAF1_TYPE [13:15]: Multicast Leaf Type, 1 is bitmap format, 2 is glag format, etc.

[0107] 9. Configuration of IPMC::CPU_CFG_MC_LEAF_TABLE_DATA3::LEAF1_INFO_H [0:12]:

[0108] (1) bitmap format: [0:12] reserved as 0;

[0109] (2) glag format: [0:12] reserved as 0;

[0110] (3) OutIntf + esdx format;

[0111] (4) OutIntf + evmid + esdx format: esdx [0:12];

[0112] (5) OutIntf + token format;

[0113] (6) OutIntf + token + nhi format: nhi [0:12].

[0114] On the basis of the above-mentioned traditional configurations such as the bitmap format in (1) and the OutIntf+evmid+esdx format in (4), the inventors of the present disclosure designed new multicast member configurations in the development process to adapt to more scenarios and more types of demand applications. Among them, the purpose of configuring the glad format in (2) is to add aggregated members; the purpose of configuring the OutIntf+esdx format in (3) is to support 12service configurations, such as ISDX / ESDX service instances, etc.; the purpose of configuring the OutIntf+token format in (5) and the OutIntf+token+nhi format in (6) is to support mpls functions. Based on the above-mentioned specific configurations, the multicast configuration of the present disclosure can adapt to more scenarios and applications, making it more compatible, especially achieving better compatibility and identity on the chip project.

[0115] Of course, the above is an example of an embodiment of the present disclosure, and in other embodiments, the required format can be set in combination with specific applications.

[0116] The VLAN-based packet forwarding method of any of the above embodiments of the present disclosure is applicable to a switch, and the present disclosure also discloses a switch based on the above VLAN-based packet forwarding method. Referring to Figure 3 A switch of the present disclosure is provided to implement the above transmission method. The switch comprises: a receiving module configured to obtain source packet information sent by a source port; a configuration module configured to allocate a multicast leaf table of a layer 2 multicast; an out-port obtaining module configured to, in response to the type of the source packet information being a non-predictable type, obtain an out-port list for flooding transmission within a VLAN in which the source port is located according to the multicast leaf table; and a sending module configured to perform packet forwarding based on the out-port list. In order to implement flooding, the source packet information is packet information filtered by pruning through the source port.

[0117] The switch of the present disclosure determines whether the packet type of the source packet information is a predictable type, and in response to the type of the source packet information being a non-predictable type, obtains an out-port list for flooding transmission within a VLAN in which the source port is located according to a layer 2 multicast, so that the obtained out-port is still within the VLAN, but the type of the out-port is no longer limited to a normal physical port, but is combined with the transmission logic of the multicast, and the type of the out-port can be as diverse as the multicast. Thus, the problem that VLAN-based flooding is still limited to normal physical port members is solved, and VLAN-based flooding is no longer limited to normal physical port members, but can be as diverse as the multicast, which can meet the needs of some special service instances in which the out-port is another type of port.

[0118] The disclosure also discloses a packet forwarding system applied to packet forwarding in a VLAN, characterized in that comprising: a source end for generating source packet information and sending the source packet information after pruning filtering; a switch for acquiring the source packet information sent by a source port; in response to the type of the source packet information being an unknown type, acquiring an egress port list for flooding propagation in the VLAN where the source port is located according to layer 2 multicast, and forwarding packets based on the egress port list; and a receiving end, which is in the same VLAN as the source end, wherein the receiving end corresponding to the egress port list receives the packet information sent by the switch.

[0119] Figure 2 A packet forwarding system schematic diagram for an embodiment of the disclosure.

[0120] Figure 3 A switch internal forwarding flowchart for an embodiment of the disclosure.

[0121] As shown in Figure 2 , it is a packet forwarding system, and the switch SW1 has PCs 1, 2, 3, and 4 divided in vlan 1. When PC 1 sends a packet of an unknown type, the switch SW1 will copy and flood the packet to PCs 2-4, but the corresponding switch will have a source port filtering configuration, so that PC 1 will not receive the packet.

[0122] In combination Figure 3 , a packet forwarding scheme is specifically described. When the switch PhyPort receives the packet information sent by the source end, the VLAN where the source end is located is found according to the ID information of the VLAN, and then the index information is found to determine whether the received packet type is known. If it is known, the corresponding egress port is acquired, and if the packet type is unknown, the source packet is copied and forwarded according to the members in mc_leaf, wherein the source port will prune and filter the packet, so as to achieve the flooding effect.

[0123] Any one of the packet forwarding methods provided by the embodiments of the disclosure can be executed by a processor, such as a processor executing any one of the packet forwarding methods mentioned by the embodiments of the disclosure by calling corresponding instructions stored in a memory. The following will not be repeated.

[0124] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware, and the foregoing program can be stored in a computer readable storage medium, and the program executes the steps of the above-mentioned method embodiments when executed; and the foregoing storage medium includes ROM, RAM, magnetic disc or optical disc and various storage program codes.

[0125] In addition, the disclosure also provides an electronic device, comprising:

[0126] a memory for storing a computer program;

[0127] a processor for executing the computer program stored in the memory, and when the computer program is executed, the method for forwarding a message based on VLAN according to any one of the embodiments of the disclosure is implemented.

[0128] The electronic device comprises one or more processors and a memory.

[0129] The processor can be a central processing unit (CPU) or other forms of processing units with data processing capability and / or instruction execution capability, and can control other components in the electronic device to perform desired functions.

[0130] The memory can include one or more computer program products, which can include various forms of computer readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM), cache memory, and the like. The non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions can be stored on the computer readable storage medium, and the processor can run the program instructions to implement the method for forwarding a message based on VLAN according to various embodiments of the disclosure described above and / or other desired functions.

[0131] In one example, the electronic device can further include an input device and an output device, which are interconnected through a bus system and / or other forms of connection mechanism (not shown).

[0132] In addition, the input device can further include, for example, a keyboard, a mouse, and the like.

[0133] The output device can output various information to the outside, including the determined distance information, direction information, and the like. The output device can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.

[0134] In addition, the electronic device can further include any other appropriate components according to specific application cases.

[0135] In addition to the above method and device, the embodiments of the disclosure can also be a computer program product, which includes computer program instructions that, when executed by a processor, cause the processor to perform the steps in the method for forwarding a message based on VLAN according to various embodiments of the disclosure described in the above parts of the specification.

[0136] The computer program product can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server.

[0137] Furthermore, embodiments of the present disclosure can also be a computer readable storage medium, having stored thereon computer program instructions which, when executed by a processor, cause the processor to perform the steps described in the foregoing disclosure of the VLAN-based packet forwarding method according to various embodiments of the present disclosure.

[0138] The computer readable storage medium can be any combination of one or more computer readable media. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the above. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0139] The above describes the basic principles of the present disclosure in combination with specific embodiments, but it should be noted that the advantages, benefits, effects and the like mentioned in the present disclosure are only examples and are not limiting, and these advantages, benefits, effects and the like cannot be considered as the must-have of each embodiment of the present disclosure. In addition, the above specific details are only for the purpose of example and understanding, and the above details do not limit the present disclosure to the must-use specific details.

[0140] Each embodiment in the present specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts between each embodiment can be referred to each other. For system embodiments, since they are basically corresponding to method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment.

[0141] The block diagrams of devices, apparatuses, equipment, systems referred to in this disclosure are merely illustrative examples and are not intended to require or imply that the connection, arrangement, configuration must be as shown in the block diagrams. These devices, apparatuses, equipment, systems can be connected, arranged, configured in any manner as will be appreciated by those skilled in the art. Words such as "include," "contain," "have," and the like are open-ended words that are to be interpreted to mean "including but not limited to," and are not to be interpreted as limiting the described embodiment to features, elements, and / or steps disclosed herein. The words "or" and "and" as used herein are to be interpreted as the word "and / or," and are not to be interpreted as requiring both features, elements, and / or steps disclosed herein. The word "such as" as used herein is to be interpreted as the phrase "such as but not limited to," and is not to be interpreted as limiting the described embodiment to features, elements, and / or steps disclosed herein.

[0142] The methods and apparatuses of this disclosure can be implemented in a number of ways. For example, the methods and apparatuses of this disclosure can be implemented using software, hardware, firmware, or any combination of these. The above described order of steps for the methods is merely illustrative, and the steps of the methods of this disclosure are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, the disclosure can also be implemented as a program recorded on a recording medium, which includes machine readable instructions for implementing the methods according to the disclosure. Thus, the disclosure also covers a recording medium storing a program for executing the methods according to the disclosure.

[0143] It is also important to note that the devices, equipment, and methods of this disclosure can be embodied in a variety of ways. These variations are contemplated as being within the scope of the present disclosure.

[0144] The above description of the disclosed aspects is given for illustrative purposes and is not intended to limit the scope of the disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0145] The above description has been given for illustrative and descriptive purposes. In addition, this description is not intended to limit embodiments of the disclosure to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, changes, additions, and sub-combinations thereof.

Claims

1. A VLAN-based packet forwarding method applied to a switch, characterized in that, The application comprises: A multicast leaf table of a two-layer multicast is distributed, which comprises: a starting position of a multicast leaf table is stored; multicast members and multicast member types of the multicast leaf table are configured, the multicast members of the multicast leaf table comprise at least one of a VLAN physical port, an aggregation member port, a two-layer virtual port and a three-layer virtual port; the two-layer virtual port comprises at least one of an OutIntf+esdx format port and an OutIntf+token format port, the OutIntf+esdx format port is used for mef service, and the OutIntf+token format port is used for MPLS service; the three-layer virtual port comprises at least one of an OutIntf+evmid+esdx format port and an OutIntf+token+nhi format port, the OutIntf+evmid+esdx format port is used for mef service, and the OutIntf+token+nhi format port is used for MPLS service; Source message information sent by a source port is acquired; It is judged whether the message type of the source message information is a known type; In response to the type of the source message information being an unknown type, an out port list for flooding and propagation in a VLAN in which the source port is located is acquired according to a two-layer multicast, wherein the step of acquiring the out port list for flooding and propagation in the VLAN in which the source port is located according to the two-layer multicast comprises: acquiring the out port list for flooding and propagation according to multicast members in a multicast leaf table of the two-layer multicast; and selecting different types of ports according to the service type of the message; Message forwarding is performed based on the out port list.

2. The VLAN-based packet forwarding method according to claim 1, wherein, In the step of acquiring source message information sent by a source port, the source message information is message information filtered by pruning through the source port; The out port list for flooding and propagation in the VLAN in which the source port is located acquired according to the two-layer multicast does not include the source port.

3. A switch, applied to packet forwarding in a VLAN, characterized in that, The application comprises: A receiving module is configured to acquire source message information sent by a source port; A configuration module is configured to distribute a multicast leaf table of a two-layer multicast, which comprises: a starting position of a multicast leaf table of each two-layer multicast is stored; multicast members and multicast member types of the multicast leaf table are configured, the multicast members of the multicast leaf table comprise at least one of a VLAN physical port, an aggregation member port, a two-layer virtual port and a three-layer virtual port; the two-layer virtual port comprises at least one of an OutIntf+esdx format port and an OutIntf+token format port, the OutIntf+esdx format port is used for mef service, and the OutIntf+token format port is used for MPLS service; the three-layer virtual port comprises at least one of an OutIntf+evmid+esdx format port and an OutIntf+token+nhi format port, the OutIntf+evmid+esdx format port is used for mef service, and the OutIntf+token+nhi format port is used for MPLS service; The out port acquisition module is configured to, in response to the type of the source message information being a non-predicted type, acquire an out port list for flooding propagation within a VLAN in which the source port is located according to a multicast leaf table; and select ports of different service types according to the service type of the message. The sending module is configured to send the message based on the out port list.

4. A packet forwarding system for packet forwarding within a VLAN, the system comprising: The method comprises the following steps: The source end is configured to generate source message information, and send the source message information after pruning and filtering. The switch is configured to allocate a multicast leaf table of a layer 2 multicast, and comprises the following: a start position of the multicast leaf table of each layer 2 multicast; multicast members and multicast member types of the multicast leaf table; the multicast members of the multicast leaf table comprise at least one of a VLAN physical port, an aggregation member port, a layer 2 virtual port and a layer 3 virtual port; the layer 2 virtual port comprises at least one of an OutIntf+esdx format port and an OutIntf+token format port, the OutIntf+esdx format port is used for mef service, and the OutIntf+token format port is used for MPLS service; the layer 3 virtual port comprises at least one of an OutIntf+evmid+esdx format port and an OutIntf+token+nhi format port, the OutIntf+evmid+esdx format port is used for mef service, and the OutIntf+token+nhi format port is used for MPLS service; the switch is further configured to acquire source message information sent by a source port; in response to the type of the source message information being a non-predicted type, acquire an out port list for flooding propagation within a VLAN in which the source port is located according to a layer 2 multicast, and send the message based on the out port list; the step of acquiring the out port list for flooding propagation within the VLAN in which the source port is located according to the layer 2 multicast comprises the following: acquiring the out port list for flooding propagation according to the multicast members in the multicast leaf table of the layer 2 multicast, and selecting ports of different service types according to the service type of the message; and the receiving end is located in the same VLAN as the source end, wherein a receiving end corresponding to the out port list receives the message information sent by the switch.

5. An electronic device, comprising: The memory is configured to store a computer program. The processor is configured to execute the computer program stored in the memory, and when the computer program is executed, the method in any one of claims 1-2 is implemented. The computer program is executed by the processor, and the method in any one of claims 1-2 is implemented.

6. A computer-readable storage medium having stored thereon a computer program, characterized in that, ​

Citation Information

Patent Citations

  • Communication method, device and system for TRILL (Transparent Interconnection of Lots of Links) network

    CN102932228A