CN114039814A - Message forwarding method and device, electronic equipment and storage medium - Google Patents

Message forwarding method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114039814A
CN114039814A CN202111449501.4A CN202111449501A CN114039814A CN 114039814 A CN114039814 A CN 114039814A CN 202111449501 A CN202111449501 A CN 202111449501A CN 114039814 A CN114039814 A CN 114039814A
Authority
CN
China
Prior art keywords
port
forwarding
protocol message
message
acl
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.)
Granted
Application number
CN202111449501.4A
Other languages
Chinese (zh)
Other versions
CN114039814B (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.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks 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 Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN202111449501.4A priority Critical patent/CN114039814B/en
Publication of CN114039814A publication Critical patent/CN114039814A/en
Application granted granted Critical
Publication of CN114039814B publication Critical patent/CN114039814B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/66Layer 2 routing, e.g. in Ethernet based MAN's
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0272Virtual private networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • H04L63/101Access control lists [ACL]

Abstract

The embodiment of the invention provides a message forwarding method, a message forwarding device, electronic equipment and a storage medium. The method comprises the following steps: receiving a protocol message sent by CE equipment of user edge equipment through a port of PE equipment; if the VPLS instance bound by the port enables the protocol message transparent transmission function, acquiring a hardware attribute CID value of the VPLS instance; and if the CID value is judged to be the first preset value, forwarding the protocol message. The message forwarding method provided by the embodiment of the invention receives a protocol message sent by CE equipment of user edge equipment through a port of PE equipment; if the VPLS instance bound by the port enables the protocol message transparent transmission function, the hardware attribute CID value of the VPLS instance is obtained, if the CID value is judged to be the first preset value, the protocol message is forwarded, the protocol message is prevented from being uploaded to a local CPU for processing, and the protocol message transparent transmission function on equipment only supporting MPLS L2VPN services is achieved.

Description

Message forwarding method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a message forwarding method, a message forwarding device, electronic equipment and a storage medium.
Background
A two-layer Virtual Private Network (L2 Virtual Private Network, L2VPN) is a Private Network that extends users with existing public networks. An L2VPN based on Multiprotocol Label Switching (MPLS) is a two-layer data transport network for transparently transmitting two-layer data of a user over an MPLS network, and from the viewpoint of the user, the MPLS network is a two-layer Switching network, and two-layer connection is established between different sites through the MPLS network.
Virtual Private local area network Service (VPLS) is a solution to implement L2 VPN. VPLS is a technology for providing virtual private ethernet in an IP/MPLS network, and using VPLS, a fully meshed Pseudo Wire (PW) can be established among a plurality of Provider Edge routers (PE), and a two-layer ethernet frame is encapsulated and then forwarded between the Provider Edge routers (PE) through an MPLS network, thereby establishing a point-to-multipoint ethernet VPN. With VPLS VPN, from the customer's perspective, the customer's layer two devices are connected across the IP/MPLS core network, as if they were connected to a virtual switch.
L2VPN requires transparent transmission of any message, including Bridge Protocol Data Unit (BPDU) Protocol messages, whereas for Protocol messages the normal behavior is to send the message to the CPU and discard the message, which contradicts L2VPN functional requirements,
at present, the L2VPN VPLS protocol packet transparent transmission scheme includes sending a protocol packet to a control plane, encapsulating the L2VPN packet by the control plane, and then forwarding the packet from a PW end. However, the transparent software transmission scheme needs to send some messages to the CPU for processing, so that the performance of the CPU is greatly affected, and other services of the CPU are affected.
Disclosure of Invention
Aiming at the defects in the prior art, the embodiment of the invention provides a message forwarding method, a message forwarding device, electronic equipment and a storage medium.
In a first aspect, an embodiment of the present invention provides a packet forwarding method, which is applied to a provider edge router PE device, where a port of the PE device is bound to a virtual private local area network service VPLS instance, and the method includes:
receiving a protocol message sent by CE equipment through a port of the PE equipment;
if the VPLS instance bound by the port enables the protocol message transparent transmission function, acquiring a hardware attribute CID value of the VPLS instance;
and if the CID value is judged to be the first preset value, forwarding the protocol message.
As above, optionally, before receiving, through the port, the protocol packet sent by the CE device, the method further includes:
installing a first Access Control List (ACL) on the port, wherein the matching content corresponding to the first ACL is as follows: the CID value of the VPLS instance is a first preset value, and the corresponding actions are as follows: forwarding;
correspondingly, if the CID value is judged to be the first preset value, forwarding the protocol packet, including:
and matching a first preset value in the first ACL according to the CID value of the VPLS instance corresponding to the port where the protocol message enters, and forwarding the protocol message according to the action corresponding to the first ACL.
As in the foregoing method, optionally, the forwarding the protocol packet includes:
and after the protocol message is encapsulated by a two-layer virtual private network (L2 VPN), forwarding the encapsulated protocol message to opposite-end PE equipment.
As above, optionally, before receiving, through the port, the protocol packet sent by the CE device, the method further includes:
installing a second ACL on the port, wherein the corresponding matching content of the second ACL is as follows: the corresponding actions of the messages corresponding to the VPLS instance are as follows: performing L2VPN encapsulation and forwarding on a two-layer virtual private network;
wherein the first ACL is higher priority than the second ACL.
As in the foregoing method, optionally, after the port of the PE device binds to the VPLS instance, the method further includes:
judging whether the VPLS instance enables a protocol message transparent transmission function or not, if so, setting the CID value of the VPLS instance as a first preset value;
otherwise, the CID value of the VPLS instance is set to be a second preset value.
As above, optionally, the receiving, through the port of the PE device, the protocol packet sent by the CE device includes:
receiving a first message sent by the CE equipment through a port of the PE equipment;
and judging and acquiring that the first message is a protocol message according to the attribute information of the first message.
In a second aspect, an embodiment of the present invention provides a packet forwarding apparatus, applied in a provider edge router PE device, including:
a pre-processing module for binding a virtual private local area network service, VPLS, instance on a port of the PE device,
a receiving module, configured to receive, through a port of the PE device, a protocol packet sent by a CE device;
a judgment obtaining module, configured to obtain a hardware attribute CID value of the VPLS instance if the VPLS instance bound to the port enables the protocol packet transparent transmission function;
and the judging and forwarding module is used for forwarding the protocol message if the CID value is judged to be the first preset value.
The above apparatus, optionally, further comprises: installing a module;
the installation module is used for installing a first access control list ACL on the port, and the matching content corresponding to the first ACL is as follows: the CID value of the VPLS instance is a first preset value, and the corresponding actions are as follows: forwarding;
correspondingly, the determining and forwarding module is specifically configured to:
and matching a first preset value in the first ACL according to the CID value of the VPLS instance corresponding to the port where the protocol message enters, and forwarding the protocol message according to the action corresponding to the first ACL.
As above apparatus, optionally, the preprocessing module is further configured to:
judging whether the VPLS instance enables a protocol message transparent transmission function or not, if so, setting the CID value of the VPLS instance as a first preset value;
otherwise, the CID value of the VPLS instance is set to be a second preset value.
Optionally, the determining and forwarding module is specifically configured to:
and after the protocol message is encapsulated by a two-layer virtual private network (L2 VPN), forwarding the encapsulated protocol message to opposite-end PE equipment.
As with the apparatus above, optionally, the installation module is further configured to:
installing a second ACL on the port, wherein the corresponding matching content of the second ACL is as follows: the corresponding actions of the messages corresponding to the VPLS instance are as follows: performing L2VPN encapsulation and forwarding on a two-layer virtual private network;
wherein the first ACL is higher priority than the second ACL.
As with the apparatus described above, optionally, the receiving module is specifically configured to:
receiving a first message sent by the CE equipment through a port of the PE equipment;
and judging and acquiring that the first message is a protocol message according to the attribute information of the first message.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
the processor and the memory are communicated with each other through a bus; the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform a method comprising: receiving a protocol message sent by CE equipment of user edge equipment through a port of PE equipment; if the VPLS instance bound by the port enables the protocol message transparent transmission function, acquiring a hardware attribute CID value of the VPLS instance; and if the CID value is judged to be the first preset value, forwarding the protocol message according to the CID value.
In a fourth aspect, an embodiment of the present invention provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the following method: receiving a protocol message sent by CE equipment of user edge equipment through a port of PE equipment; if the VPLS instance bound by the port enables the protocol message transparent transmission function, acquiring a hardware attribute CID value of the VPLS instance; and if the CID value is judged to be the first preset value, forwarding the protocol message according to the CID value.
The message forwarding method provided by the embodiment of the invention receives a protocol message sent by CE equipment of user edge equipment through a port of PE equipment; if the VPLS instance bound by the port enables the protocol message transparent transmission function, the hardware attribute CID value of the VPLS instance is obtained, if the CID value is judged to be the first preset value, the protocol message is forwarded, the protocol message is prevented from being uploaded to a local CPU for processing, and the protocol message transparent transmission function on equipment only supporting MPLS L2VPN services is achieved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a message forwarding method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a message forwarding method provided in the embodiment of the present invention;
fig. 3 is a flowchart of a protocol message transparent transmission opening method in the message forwarding method according to the embodiment of the present invention;
fig. 4 is a schematic flow chart of a message forwarding method according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of a message forwarding apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic view of an application scenario of the message forwarding method provided in the embodiment of the present invention, and as shown in fig. 1, the application scenario includes three PE devices, which are PE1, PE2, and PE3, where PE1 is connected to customer Edge devices (customers Edge, CE) CE1 and CE2, PE2 is connected to CE3 and CE4, and PE3 is connected to PE 5. Taking PE1 as an example, PE1 connects CE1 and CE2 through different ports, and sets access links (ACs) for CE1 and CE2, respectively, which are denoted as AC1 and AC2, when CE1 needs to send a packet to CE3, PE1 receives the packet sent by CE1 through AC1, and transparently transmits the packet to opposite-end device PE2 according to the L2VPN requirement, and PE2 sends the packet to CE3, thereby implementing L2 VPN-based packet forwarding. In order to realize the protocol message transparent transmission function based on the L2VPN, in the embodiment of the invention, a Virtual Private local area network Service (VPLS) example is bound at a port of PE equipment, a hardware attribute CID value of the VPLS example is set, and when the CID value of the VPLS example corresponding to the received protocol message is judged to be a first preset value through matching, the protocol message is forwarded, so that the protocol message is prevented from being uploaded to the CPU, and the protocol message transparent transmission function under the L2VPN scene is realized.
Fig. 2 is a schematic flow diagram of a message forwarding method provided by an embodiment of the present invention, and is applied to a PE device in an application scenario shown in fig. 1, where a port of the PE device is bound to a virtual private local area network service VPLS instance, where the example includes:
step S21, receiving a protocol message sent by a CE device through a port of the PE device;
specifically, a port of the PE device is bound to a VPLS instance, that is, an access port of the CE device connected to the PE device is configured on the PE device, and a certain port is specified to be connected to a certain CE device. For example, port 1 of PE1 connects to CE 1. And then, receiving a first message sent by the corresponding CE through the port, acquiring message attribute information, judging whether the message is a protocol message or not according to the message attribute information, and directly transmitting the first message to opposite-end equipment if the message is not the protocol message.
Step S22, if the VPLS instance bound by the port enables the protocol message transparent transmission function, acquiring the hardware attribute CID value of the VPLS instance;
specifically, if the first message is a protocol message, it is determined whether the VPLS instance bound to the port enables the protocol message transparent transmission function, that is, it is determined whether the PE port corresponding to the VPLS instance enables the protocol message transparent transmission function, for example, the function of enabling the protocol message transparent transmission may refer to setting the port of the PE device, so that the port of the PE device does not transmit the protocol message to a local CPU for operation when receiving the protocol message, and sends the protocol message, for example, the port transparent transmission protocol message is set through an instruction l2 vfi tunnel-protocol stp. In practical application, the PE device may determine, according to the port configuration instruction, whether the VPLS instance has enabled the protocol packet transparent transmission function, and if so, obtain a hardware attribute CID value of the VPLS instance.
In practical application, after a VPLS instance is bound to a port of a PE device, a CID value of a hardware attribute of the bound VPLS instance may be set according to whether the port enables a protocol packet transparent transmission function, and if the protocol packet transparent transmission function is enabled, the CID value of the VPLS instance is set to a first preset value, for example, the CID is set to 1, and if the protocol packet transparent transmission function is not enabled, the CID value of the VPLS instance is set to a second preset value, for example, the CID is set to 0.
Step S23, if it is determined that the CID value is the first preset value, forwarding the protocol packet.
Specifically, if the CID value of the VPLS instance bound to the port is the first preset value, the protocol packet is directly forwarded according to the first preset value, and the protocol packet is not sent to the local CPU for processing.
The message forwarding method provided by the embodiment of the invention receives a protocol message sent by CE equipment of user edge equipment through a port of PE equipment; if the VPLS instance bound by the port enables the protocol message transparent transmission function, the hardware attribute CID value of the VPLS instance is obtained, if the CID value is judged to be the first preset value, the protocol message is forwarded, the protocol message is prevented from being uploaded to a local CPU for processing, and the protocol message transparent transmission function on equipment only supporting MPLS L2VPN services is achieved.
On the basis of the foregoing embodiment, further before receiving, through the port, a protocol packet sent by a CE device of a customer edge device, the method further includes:
installing a first Access Control List (ACL) on the port, wherein the matching content corresponding to the first ACL is as follows: the CID value of the VPLS instance is a first preset value, and the corresponding actions are as follows: forwarding;
correspondingly, if the CID value is judged to be the first preset value, forwarding the protocol packet, including:
and matching a first preset value in the first ACL according to the CID value of the VPLS instance corresponding to the port where the protocol message enters, and forwarding the protocol message according to the action corresponding to the first ACL.
Specifically, after a port of the PE device is bound to a VPLS instance, a control policy may be issued for the port, an access control list ACL is installed at the port and is marked as a first ACL, and ACL matching content is: the CID value of the VPLS instance is a first preset value, the corresponding action is forwarding, and therefore only one ACL control strategy needs to be installed according to the CID value, and the strategy does not need to be issued to each VPLS instance. And if the CID value of the VPLS instance corresponding to the port of the received protocol message is a first preset value, directly forwarding the protocol message to opposite-end equipment according to the action corresponding to the first ACL.
Fig. 3 is a flowchart of a protocol message transparent transmission opening process in the message forwarding method according to the embodiment of the present invention, and as shown in fig. 3, the process includes:
step S31, judging whether the VPLS instance has started the protocol message transparent transmission function, namely whether the port corresponding to the VPLS instance has enabled the protocol message transparent transmission function, if so, executing step S32, otherwise, executing step S35;
step S32, judging whether the control strategy is issued aiming at the VPLS instance, if so, ending, otherwise, executing step S33;
step S33, issuing a control strategy aiming at the VPLS instance, wherein the matching content is CID and the action is forwarding;
step S34, setting the control strategy to the hardware strategy table, namely installing the first ACL;
step S35, the CID value of the VPLS instance is updated to be a second preset value;
step S36, the CID value is set in the hardware attribute of the VPLS instance.
In the above flow, the CID attribute in the policy matching content match main configuration instance is valid only when the protocol packet transparent transmission function is started. However, when the instance closes the message transparent transmission function, the CID value of the instance is updated to be the second preset value, so that the protocol message transparent transmission function can be opened or closed for different VPLS instances, and other instances without the protocol message transparent transmission function can not be influenced.
On the basis of the foregoing embodiment, optionally, forwarding the protocol packet to the peer device means that after performing layer two virtual private network L2VPN encapsulation on the protocol packet, the encapsulated protocol packet is forwarded to the peer PE device. In practical application, a second control policy may also be issued, a second ACL is installed at a port of the PE device, matching content of the second ACL is a message corresponding to the VPLS instance, and the corresponding actions are: and after the L2VPN encapsulation of the two-layer virtual private network is carried out, forwarding is carried out, and the priority of the first ACL is set to be higher than that of the second ACL, so that after the protocol message is received, whether the CID value is a first preset value or not is firstly matched according to the first ACL, if so, the first ACL is determined to be matched, then whether the second ACL is matched or not is judged, and if so, the protocol message is forwarded after the L2VPN encapsulation is carried out according to the second ACL. Meanwhile, because the priority of the first ACL is highest, if the first ACL is not matched, the protocol message is directly uploaded to the local CPU. It can be seen from the above flow that the embodiment of the present invention can implement the function of transmitting the protocol packet under the VPLS, and does not affect other instances that do not start the protocol packet transmission, and at the same time, the embodiment of the present invention implements the protocol packet transmission by matching only the CID field, and can implement the hit of the policy only by updating the CID value for all VPLS instances that start the transmission, so that only one policy is needed to take effect for different VPLS instances, thereby greatly saving policy resources.
For example, port 1 of PE1 binds to VPLS instance VPLS1, and port 1 has enabled the protocol packet transparent transmission function, the CID value of VPLS1 is a first preset value 1, port 2 of PE1 binds to VPLS instance VPLS2, and port 2 does not have the protocol packet transparent transmission function enabled, the CID value of VPLS2 is a second preset value 2, and both port 1 and port 2 have installed a first ACL and a second ACL. After receiving a packet 1 sent by a CE device through a port 1, according to a packet attribute dmac of 0180: c200:0000, it is determined that the packet is a BPDU protocol packet, a CID value of a VPLS1 corresponding to the port 1 is 1, the first ACL is matched, then according to a second ACL, after L2VPN encapsulation is performed on the packet 1, the encapsulated packet is forwarded to a PE 2. After receiving a message 2 sent by a CE device through a port 2, according to a message attribute dmac of 0180: c200:0000, judging that the message is a BPDU protocol message, and if the CID value of a VPLS2 corresponding to the port 2 is 0, and the CID value is not matched with a first ACL, directly uploading the message 2 to a CPU of a PE1 for processing by the CPU, without affecting the function of uploading other protocol messages which do not start message transparent transmission to the CPU.
Fig. 4 is a schematic flow chart of a message forwarding method according to another embodiment of the present invention, and as shown in fig. 4, the message forwarding method includes:
step S41, receiving a message sent by the CE equipment by the PE equipment;
step S42, the PE equipment judges whether the message needs to be forwarded by L2VPN, if yes, step S44 is executed, otherwise, step S43 is executed;
step S43, forwarding the message through non-L2 VPN service;
step S44, sending the message into the L2VPN forwarding processing flow;
step S45, judging whether the message is a protocol message, if yes, executing step S47, otherwise executing step S46;
step S46, the message is forwarded after being encapsulated by L2 VPN;
and step S47, strategy matching is carried out on the protocol message, if the CID value hits the first preset value, the step S46 is executed, otherwise, the protocol message is uploaded to the CPU.
The message forwarding method provided by the embodiment of the invention receives a protocol message sent by CE equipment of user edge equipment through a port of PE equipment; if the VPLS instance bound by the port enables the protocol message transparent transmission function, the hardware attribute CID value of the VPLS instance is obtained, if the CID value is judged to be the first preset value, the protocol message is forwarded, the protocol message is prevented from being uploaded to a local CPU for processing, the function of performing the protocol message transparent transmission on equipment only supporting MPLS L2VPN services is achieved, only a strategy aiming at CID needs to be issued, and strategy resources are saved.
Based on the same inventive concept, an embodiment of the present invention further provides a packet forwarding apparatus, which is applied to provider edge router PE equipment, as shown in fig. 5, and includes: a preprocessing module 51, a receiving module 52, a judgment obtaining module 53 and a judgment forwarding module 54, wherein:
the preprocessing module 51 is configured to bind a virtual private local area network service VPLS instance to a port of the PE device, and the receiving module 52 is configured to receive a protocol packet sent by a CE device of a customer edge device through the port of the PE device; the judgment obtaining module 53 is configured to obtain a hardware attribute CID value of the VPLS instance if the VPLS instance bound to the port enables the protocol packet transparent transmission function; the determining and forwarding module 54 is configured to forward the protocol packet if it is determined that the CID value is the first preset value.
The above apparatus, optionally, further comprises: installing a module;
the installation module is used for installing a first access control list ACL on the port, and the matching content corresponding to the first ACL is as follows: the CID value of the VPLS instance is a first preset value, and the corresponding actions are as follows: forwarding;
accordingly, the determining and forwarding module 54 is specifically configured to:
and matching a first preset value in the first ACL according to the CID value of the VPLS instance corresponding to the port where the protocol message enters, and forwarding the protocol message according to the action corresponding to the first ACL.
As in the above apparatus, optionally, the preprocessing module 51 is further configured to:
judging whether the VPLS instance enables a protocol message transparent transmission function or not, if so, setting the CID value of the VPLS instance as a first preset value;
otherwise, the CID value of the VPLS instance is set to be a second preset value.
As in the foregoing apparatus, optionally, the determining and forwarding module 54 is specifically configured to:
and after the protocol message is encapsulated by a two-layer virtual private network (L2 VPN), forwarding the encapsulated protocol message to opposite-end PE equipment.
As with the apparatus above, optionally, the installation module is further configured to:
installing a second ACL on the port, wherein the corresponding matching content of the second ACL is as follows: the corresponding actions of the messages corresponding to the VPLS instance are as follows: performing L2VPN encapsulation and forwarding on a two-layer virtual private network;
wherein the first ACL is higher priority than the second ACL.
As with the above apparatus, optionally, the receiving module 52 is specifically configured to:
receiving a first message sent by the CE equipment through a port of the PE equipment;
and judging and acquiring that the first message is a protocol message according to the attribute information of the first message.
The apparatus provided in the embodiment of the present invention is configured to implement the method, and its functions specifically refer to the method embodiment, which is not described herein again.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 6, the electronic device includes: a processor (processor)61, a memory (memory)62, and a bus 63;
wherein, the processor 61 and the memory 62 complete the communication with each other through the bus 63;
the processor 61 is configured to call program instructions in the memory 62 to perform the methods provided by the above-described method embodiments, including, for example: receiving a protocol message sent by CE equipment of user edge equipment through a port of PE equipment; if the VPLS instance bound by the port enables the protocol message transparent transmission function, acquiring a hardware attribute CID value of the VPLS instance; and if the CID value is judged to be the first preset value, forwarding the protocol message according to the CID value.
An embodiment of the present invention discloses a computer program product, which includes a computer program stored on a non-transitory computer readable storage medium, the computer program including program instructions, when the program instructions are executed by a computer, the computer can execute the methods provided by the above method embodiments, for example, the method includes: receiving a protocol message sent by CE equipment of user edge equipment through a port of PE equipment; if the VPLS instance bound by the port enables the protocol message transparent transmission function, acquiring a hardware attribute CID value of the VPLS instance; and if the CID value is judged to be the first preset value, forwarding the protocol message according to the CID value.
Embodiments of the present invention provide a non-transitory computer-readable storage medium, which stores computer instructions, where the computer instructions cause the computer to perform the methods provided by the above method embodiments, for example, the methods include: receiving a protocol message sent by CE equipment of user edge equipment through a port of PE equipment; if the VPLS instance bound by the port enables the protocol message transparent transmission function, acquiring a hardware attribute CID value of the VPLS instance; and if the CID value is judged to be the first preset value, forwarding the protocol message according to the CID value.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the apparatuses and the like are merely illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the embodiments of the present invention, and are not limited thereto; although embodiments of the present invention have been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (11)

1. A message forwarding method is applied to provider edge router (PE) equipment, and is characterized in that a port of the PE equipment is bound with a virtual private local area network service (VPLS) instance, and the method comprises the following steps:
receiving a protocol message sent by CE equipment through a port of the PE equipment;
if the VPLS instance bound by the port enables the protocol message transparent transmission function, acquiring a hardware attribute CID value of the VPLS instance;
and if the CID value is judged to be the first preset value, forwarding the protocol message.
2. The method according to claim 1, before receiving the protocol packet sent by the CE device through the port, further comprising:
installing a first Access Control List (ACL) on the port, wherein the matching content corresponding to the first ACL is as follows: the CID value of the VPLS instance is a first preset value, and the corresponding actions are as follows: forwarding;
correspondingly, if the CID value is judged to be the first preset value, forwarding the protocol packet, including:
and matching a CID value of the VPLS instance corresponding to the port where the protocol message enters with a first preset value in the first ACL, and forwarding the protocol message according to the corresponding action in the first ACL.
3. The method of claim 2, wherein forwarding the protocol packet comprises:
and after the protocol message is encapsulated by a two-layer virtual private network (L2 VPN), forwarding the encapsulated protocol message to opposite-end PE equipment.
4. The method according to claim 3, wherein before receiving the protocol packet sent by the CE device through the port, the method further comprises:
installing a second ACL on the port, wherein the corresponding matching content of the second ACL is as follows: the corresponding actions of the messages corresponding to the VPLS instance are as follows: performing L2VPN encapsulation and forwarding on a two-layer virtual private network;
wherein the first ACL is higher priority than the second ACL.
5. The method of claim 1, wherein after the port of the PE device binds to the VPLS instance, further comprising:
judging whether the VPLS instance enables a protocol message transparent transmission function or not, if so, setting the CID value of the VPLS instance as a first preset value;
otherwise, the CID value of the VPLS instance is set to be a second preset value.
6. The method according to any of claims 1-5, wherein the receiving, through the port of the PE device, the protocol packet sent by the CE device comprises:
receiving a first message sent by the CE equipment through a port of the PE equipment;
and judging and acquiring that the first message is a protocol message according to the attribute information of the first message.
7. A message forwarding device is applied to provider edge router (PE) equipment, and is characterized by comprising:
a pre-processing module for binding a virtual private local area network service, VPLS, instance on a port of the PE device,
a receiving module, configured to receive, through a port of the PE device, a protocol packet sent by a CE device;
a judgment obtaining module, configured to obtain a hardware attribute CID value of the VPLS instance if the VPLS instance bound to the port enables the protocol packet transparent transmission function;
and the judging and forwarding module is used for forwarding the protocol message if the CID value is judged to be the first preset value.
8. The apparatus of claim 7, further comprising: installing a module;
the installation module is used for installing a first access control list ACL on the port, and the matching content corresponding to the first ACL is as follows: the CID value of the VPLS instance is a first preset value, and the corresponding actions are as follows: forwarding;
correspondingly, the determining and forwarding module is specifically configured to:
and matching a first preset value in the first ACL according to the CID value of the VPLS instance corresponding to the port where the protocol message enters, and forwarding the protocol message according to the action corresponding to the first ACL.
9. The apparatus of claim 8, wherein the preprocessing module is further configured to:
judging whether the VPLS instance enables a protocol message transparent transmission function or not, if so, setting the CID value of the VPLS instance as a first preset value;
otherwise, the CID value of the VPLS instance is set to be a second preset value.
10. An electronic device, comprising:
the processor and the memory are communicated with each other through a bus; the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 6.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1 to 6.
CN202111449501.4A 2021-11-30 2021-11-30 Message forwarding method and device, electronic equipment and storage medium Active CN114039814B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111449501.4A CN114039814B (en) 2021-11-30 2021-11-30 Message forwarding method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111449501.4A CN114039814B (en) 2021-11-30 2021-11-30 Message forwarding method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114039814A true CN114039814A (en) 2022-02-11
CN114039814B CN114039814B (en) 2024-02-23

Family

ID=80139405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111449501.4A Active CN114039814B (en) 2021-11-30 2021-11-30 Message forwarding method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114039814B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050027782A1 (en) * 2003-08-01 2005-02-03 Rajkumar Jalan Method for providing scalable multicast service in a virtual private LAN service
CN101052022A (en) * 2006-04-05 2007-10-10 华为技术有限公司 System and method for virtual special net user to access public net
WO2012167697A1 (en) * 2011-06-08 2012-12-13 中兴通讯股份有限公司 Method and processor for suppressing network storm
CN103326940A (en) * 2012-03-22 2013-09-25 华为技术有限公司 Method for forwarding message in network and edge device of operator
CN103634210A (en) * 2012-08-28 2014-03-12 杭州华三通信技术有限公司 Method and apparatus for discovering opposite-end provider edge (PE) device of virtual private LAN service (VPLS) instance
CN108259339A (en) * 2017-08-31 2018-07-06 新华三技术有限公司 File transmitting method and device
US20180332045A1 (en) * 2014-12-25 2018-11-15 Zte Corporation Method and device for MPLS intermediate node to perform multicast forwarding, and node thereof

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050027782A1 (en) * 2003-08-01 2005-02-03 Rajkumar Jalan Method for providing scalable multicast service in a virtual private LAN service
CN101052022A (en) * 2006-04-05 2007-10-10 华为技术有限公司 System and method for virtual special net user to access public net
WO2012167697A1 (en) * 2011-06-08 2012-12-13 中兴通讯股份有限公司 Method and processor for suppressing network storm
CN103326940A (en) * 2012-03-22 2013-09-25 华为技术有限公司 Method for forwarding message in network and edge device of operator
CN103634210A (en) * 2012-08-28 2014-03-12 杭州华三通信技术有限公司 Method and apparatus for discovering opposite-end provider edge (PE) device of virtual private LAN service (VPLS) instance
US20180332045A1 (en) * 2014-12-25 2018-11-15 Zte Corporation Method and device for MPLS intermediate node to perform multicast forwarding, and node thereof
CN108259339A (en) * 2017-08-31 2018-07-06 新华三技术有限公司 File transmitting method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孙健: ""基于IP承载网的MPLS VPN的设计与实现"", 《中国优秀硕士学位论文全文数据库》, no. 03, pages 5 - 12 *

Also Published As

Publication number Publication date
CN114039814B (en) 2024-02-23

Similar Documents

Publication Publication Date Title
EP3300319B1 (en) Distributing service function chain data and service function instance data in a network
CN105706393B (en) The method and system of operator's order is supported in link aggregation group
US20180013821A1 (en) Chaining service zones by way of route re-origination
EP2945330B1 (en) Route management method, route method, network controller and router
CN107018059B (en) A kind of message forwarding method and device
US8750314B2 (en) Method and device for link protection in virtual private local area network
US20140219135A1 (en) Virtual Private Network Implementation Method and System Based on Traffic Engineering Tunnel
CN107040469A (en) The network equipment and method
CN106059994B (en) Data transmission method and network equipment
WO2008092357A1 (en) A method and device for establishing a pseudo wire tunnel and transmitting message using it
US20140280738A1 (en) Software-defined multinetwork bridge
EP3512164B1 (en) Pseudo wire load sharing method and apparatus
KR20110093990A (en) Reducing cc message transmission in a provider network
CN112422398B (en) Message transmission method and communication device
US20070110072A1 (en) Digital subscriber link interconnection to a virtual private network
CN109691026A (en) Method and apparatus for updating multiple multiprotocol label switching (MPLS) two-way converting detection (BFD) sessions
EP2897328B1 (en) Method, system and apparatus for establishing communication link
CN102571375B (en) Multicast forwarding method and device as well as network device
JP2022537296A (en) EVPN message transfer method, system, storage medium and terminal
WO2021093463A1 (en) Packet forwarding method, first network device, and first device group
EP3032782B1 (en) Packet transmission method and apparatus
CN110365578B (en) Network interface control and link switching method, device, network equipment and medium
CN107710634B (en) Communication means and equipment based on optical network system
Wilkins Designing for Cisco Internetwork Solutions (DESIGN) Foundation Learing Guide
CN100450095C (en) System and method for providing QoS service to virtual special line

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant