CN114039814B - 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
CN114039814B
CN114039814B CN202111449501.4A CN202111449501A CN114039814B CN 114039814 B CN114039814 B CN 114039814B CN 202111449501 A CN202111449501 A CN 202111449501A CN 114039814 B CN114039814 B CN 114039814B
Authority
CN
China
Prior art keywords
protocol message
port
forwarding
vpls instance
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111449501.4A
Other languages
Chinese (zh)
Other versions
CN114039814A (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

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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

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 Customer Edge (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; if the CID value is judged to be the first preset value, forwarding the protocol message. According to the message forwarding method provided by the embodiment of the invention, the protocol message sent by the CE equipment of the user edge equipment is received through the port of the PE equipment; if the port-bound VPLS instance 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 function of protocol message transparent transmission on equipment only supporting MPLS L2VPN service is realized.

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, L2 VPN) is a private network that extends users with existing public networks. L2VPN based on multiprotocol label switching (Multiprotocol Label Switching, MPLS) is a two-layer data that is transparently transported over an MPLS network, which from the point of view of the subscriber is a two-layer switching network, through which two-layer connections are established between different sites.
Virtual private local area network services (Virtual Private LAN Service, VPLS) are one solution to implementing L2 VPNs. VPLS is a technology for providing virtual private ethernet in an IP/MPLS network, and using VPLS, a full mesh Pseudowire (PW) may be established between a plurality of operator edge routers (Provider Edge Router, PE), and after encapsulating a two-layer ethernet frame, the two-layer ethernet frame is forwarded between the operator edge routers (Provider Edge Router, PE) through the MPLS network, so as to establish a point-to-multipoint ethernet VPN. With VPLS VPN, from the customer's perspective, the customer's two-layer equipment is connected across the IP/MPLS core network as if it were connected to a virtual switch.
The L2VPN requirements are able to pass through any messages, including bridge protocol data units (Bridge Protocol Data Unit, BPDU) protocol messages, whereas for protocol messages the normal behavior is to send the message to the CPU while discarding the message, which contradicts the L2VPN functional requirements,
at present, the transmission scheme of the L2VPN VPLS protocol message comprises the steps of transmitting the protocol message to a control plane, packaging the L2VPN message by the control plane, and transmitting the packaged L2VPN message from a PW end. However, the software transparent transmission scheme needs to send some messages to the CPU for processing, so that the CPU performance is greatly influenced, and other services of the CPU are influenced.
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 method for forwarding a packet, which is applied to a PE device of an edge router of an operator, where a port of the PE device binds a VPLS instance, and the method includes:
receiving a protocol message sent by Customer Edge (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;
if the CID value is judged to be the first preset value, forwarding the protocol message.
The method optionally further includes, before receiving, through the port, a 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 determined to be the first preset value, forwarding the protocol message includes:
and matching the CID value of the VPLS instance corresponding to the port into which the protocol message enters with a first preset value in the first ACL, and forwarding the protocol message according to the action corresponding to the first ACL.
The method, optionally, forwarding the protocol packet includes:
and after the protocol message is encapsulated by the two-layer virtual private network L2VPN, forwarding the encapsulated protocol message to opposite-end PE equipment.
The method above, optionally, before receiving, through the port, a protocol packet sent by a CE device, further includes:
installing a second ACL at the port, wherein the matching content corresponding to the second ACL is as follows: the corresponding actions of the message corresponding to the VPLS instance are as follows: packaging the two-layer virtual private network L2VPN and forwarding;
wherein the first ACL has a higher priority than the second ACL.
The method optionally further includes, after the port of the PE device binds to the VPLS instance:
judging whether the VPLS instance enables a protocol message transparent transmission function, 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.
In the above method, optionally, the receiving, by the port of the PE device, a protocol packet sent by a CE device of a user edge device includes:
receiving a first message sent by a CE device through a port of the PE device;
judging and obtaining the first message as 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, which is applied to a PE device of an edge router of an operator, including:
a preprocessing module, configured to bind a VPLS instance on a port of the PE device,
the receiving module is used for receiving a protocol message sent by the CE equipment of the user edge equipment through the port of the PE equipment;
the judging and acquiring module is used for acquiring a hardware attribute CID value of the VPLS instance if the VPLS instance bound by the port enables a protocol message transparent transmission function;
and the judging and forwarding module is used for forwarding the protocol message if judging that the CID value is obtained as a first preset value.
The apparatus as above, optionally, 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 judging and forwarding module is specifically configured to:
and matching the CID value of the VPLS instance corresponding to the port into which the protocol message enters with a first preset value in the first ACL, and forwarding the protocol message according to the action corresponding to the first ACL.
The apparatus as above, optionally, the preprocessing module is further configured to:
judging whether the VPLS instance enables a protocol message transparent transmission function, 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.
The above device, optionally, the judgment forwarding module is specifically configured to:
and after the protocol message is encapsulated by the two-layer virtual private network L2VPN, forwarding the encapsulated protocol message to opposite-end PE equipment.
The apparatus as above, optionally, the mounting module is further configured to:
installing a second ACL at the port, wherein the matching content corresponding to the second ACL is as follows: the corresponding actions of the message corresponding to the VPLS instance are as follows: packaging the two-layer virtual private network L2VPN and forwarding;
wherein the first ACL has a higher priority than the second ACL.
The above device, optionally, the receiving module is specifically configured to:
receiving a first message sent by a CE device through a port of the PE device;
judging and obtaining the first message as 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 device comprises a memory and a processor, wherein 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 capable of performing the method of: receiving a protocol message sent by Customer Edge (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; 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, embodiments of the present invention provide a storage medium having stored thereon a computer program which, when executed by a processor, performs a method of: receiving a protocol message sent by Customer Edge (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; if the CID value is judged to be the first preset value, forwarding the protocol message according to the CID value.
According to the message forwarding method provided by the embodiment of the invention, the protocol message sent by the CE equipment of the user edge equipment is received through the port of the PE equipment; if the port-bound VPLS instance 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 function of protocol message transparent transmission on equipment only supporting MPLS L2VPN service is realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an application scenario of a message forwarding method provided by an embodiment of the present invention;
fig. 2 is a schematic flow chart of a message forwarding method according to an embodiment of the present invention;
fig. 3 is a flowchart of a protocol message transmission starting process in the message forwarding method according to the embodiment of the present invention;
fig. 4 is a 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 device 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
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a schematic diagram of an application scenario of a message forwarding method provided by an embodiment of the present invention, where, as shown in fig. 1, the application scenario includes three PE devices, namely, PE1, PE2, and PE3, where PE1 is connected to Customer 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 (Attachment Circuits, AC) for CE1 and CE2 respectively, denoted as AC1 and AC2, when CE1 needs to send a message to CE3, PE1 receives the message sent by CE1 through AC1, and according to the requirement of L2VPN, the message is transmitted to opposite terminal equipment PE2, PE2 sends the message to CE3, thereby realizing message forwarding based on L2 VPN. Because the L2VPN requires to pass through all messages, and for the received protocol messages, the protocol messages are discarded after being sent to a local CPU according to the protocol message requirements, which is obviously contradictory to the L2VPN function requirements, in order to realize the protocol message pass through function based on the L2VPN, in the embodiment of the invention, virtual private local area network service (Virtual Private LAN Service, VPLS) examples are bound at the PE equipment port, the hardware attribute CID value of the VPLS example is set, and when the CID value of the VPLS example corresponding to the received protocol messages is a first preset value through matching judgment, the protocol messages are forwarded, so that the protocol messages are prevented from being sent to the CPU, and the protocol message pass through function under the L2VPN VPLS scene is realized.
Fig. 2 is a schematic flow chart of a packet forwarding method according to an embodiment of the present invention, which is applied to a PE device in an application scenario shown in fig. 1, where a port of the PE device binds a VPLS instance, and includes:
step S21, receiving a protocol message sent by customer edge equipment CE equipment through a port of the PE equipment;
specifically, the port binding VPLS instance of the PE device configures an access port of the CE device connected to the port binding VPLS instance on the PE device, and designates that a certain port is connected to a certain CE device. For example, port 1 of PE1 is connected to CE1. 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 according to the message attribute information, and if not, directly transmitting the first message to opposite terminal equipment.
Step S22, 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;
specifically, if the first packet is a protocol packet, it is determined whether the VPLS instance bound to the port enables the protocol packet transparent function, that is, whether the PE port corresponding to the VPLS instance enables the protocol packet transparent function, for example, the function of enabling the protocol packet transparent function may refer to setting the port of the PE device, so that the port of the PE device does not transmit the protocol packet to the local CPU to perform an operation when receiving the protocol packet, and sends the protocol packet, for example, setting the port transparent protocol packet by the instruction l2v fi 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 function, and if so, obtain the hardware attribute CID value of the VPLS instance.
In practical application, after the port of the PE device binds the VPLS instance, the hardware attribute CID value of the bound VPLS instance may be set according to whether the port enables the protocol message transparent transmission function, if the protocol message transparent transmission function is enabled, the CID value of the VPLS instance is set to a first preset value, for example, CID is set to 1, and if the protocol message transparent transmission function is not enabled, the CID value of the VPLS instance is set to a second preset value, for example, CID is set to 0.
Step S23, if judging that the CID value is the first preset value, forwarding the protocol message.
Specifically, if the CID value of the VPLS instance bound by the port is the first preset value, forwarding the protocol packet directly according to the first preset value, and not uploading the protocol packet to the local CPU for processing.
According to the message forwarding method provided by the embodiment of the invention, the protocol message sent by the CE equipment of the user edge equipment is received through the port of the PE equipment; if the port-bound VPLS instance 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 function of protocol message transparent transmission on equipment only supporting MPLS L2VPN service is realized.
On the basis of the foregoing embodiment, further before receiving, through the port, a protocol packet sent by a 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 determined to be the first preset value, forwarding the protocol message includes:
and matching the CID value of the VPLS instance corresponding to the port into which the protocol message enters with a first preset value in the first ACL, and forwarding the protocol message according to the action corresponding to the first ACL.
Specifically, after the port of the PE device binds to the VPLS instance, a control policy may be issued for the port, and an access control table ACL is installed on the port, and denoted as a first ACL, where the ACL matches the following contents: the CID value of the VPLS instance is a first preset value, and the corresponding action is forwarding, so that only a control strategy for installing an ACL (access control list) is issued aiming at the CID value, and the strategy is not issued for each VPLS instance. If the CID value of the VPLS instance corresponding to the port of the received protocol message is a first preset value, the protocol message is directly forwarded to the opposite terminal equipment according to the action corresponding to the first ACL.
Fig. 3 is a flowchart of a protocol message transparent transmission starting in a message forwarding method according to an embodiment of the present invention, where, as shown in fig. 3, the flowchart 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 a control strategy is issued for the VPLS instance, if yes, 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 a control strategy to a hardware strategy table, namely installing a first ACL;
step S35, updating the CID value of the VPLS instance to be a second preset value;
step S36, CID value is set in hardware attribute of VPLS instance.
In the above flow, the CID attribute in the policy matching content match main configuration instance is valid only when the protocol message transparent transmission function is started. However, when the instance turns off the message passing function, the CID value of the instance is updated to a second preset value, so that the protocol message passing function can be turned on or off for different VPLS instances, and other instances without the protocol message passing function being turned on can not be affected.
On the basis of the foregoing embodiment, optionally, forwarding the protocol packet to the peer device means that after the two-layer virtual private network L2VPN encapsulation is performed on the protocol packet, forwarding the encapsulated protocol packet to the peer PE device. In practical application, a second control policy may be issued, a second ACL is installed at a port of the PE device, and a matching content of the second ACL is a packet corresponding to the VPLS instance, where the corresponding action is: and forwarding after the two-layer virtual private network L2VPN is encapsulated, and setting the priority of the first ACL higher than that of the second ACL, so that after the protocol message is received, firstly, according to whether the CID value is matched with the first ACL or not as a first preset value, if so, determining whether the first ACL is matched with the second ACL, and if so, forwarding the protocol message after the L2VPN encapsulation is performed on the protocol message according to the second ACL. Meanwhile, as the first ACL has the highest priority, if the first ACL is not matched, the protocol message is directly uploaded to the local CPU. According to the embodiment of the invention, the protocol message passing function under the VPLS can be realized, other examples of the non-started protocol message passing are not affected, meanwhile, the protocol message passing is realized by only matching the CID field, and the strategy hit can be realized by only updating the CID value for all the VPLS examples of the started passing, so that the strategy can be effective for different VPLS examples only by one strategy, and the strategy resource is greatly saved.
For example, the port 1 of the PE1 binds the VPLS instance VPLS1, and the port 1 already enables the protocol message transparent transmission function, the CID value of the VPLS1 is a first preset value 1, the port 2 of the PE1 binds the VPLS instance VPLS2, and the port 2 does not enable the protocol message transparent transmission function, the CID value of the VPLS2 is a second preset value 2, and both the port 1 and the port 2 are installed with the first ACL and the second ACL. After receiving a message 1 sent by a CE device through a port 1, determining that the message is a BPDU protocol message according to a message attribute dmac=0180:c200:0000, matching a first ACL with a CID value of VPLS1 corresponding to the port 1, and forwarding the encapsulated message to a PE2 after carrying out L2VPN encapsulation on the message 1 according to a second ACL. After receiving the message 2 sent by the CE device through the port 2, according to the message attribute dmac=0180:c200:0000, judging that the message is a BPDU protocol message, wherein the CID value of the VPLS2 corresponding to the port 2 is 0, and the message 2 is not matched with the first ACL, and is directly uploaded to the CPU of the PE1 for processing by the CPU, so that the function of uploading other protocol messages which are not started for message transmission to the CPU is not affected.
Fig. 4 is a flow chart of a message forwarding method according to another embodiment of the present invention, as shown in fig. 4, where the forwarding method includes:
step S41, the PE equipment receives a message sent by the CE equipment;
step S42, the PE equipment judges whether the message needs to be forwarded by the L2VPN, if yes, the step S44 is executed, otherwise, the step S43 is executed;
step S43, forwarding the message through non-L2 VPN service;
step S44, the message is sent to a processing L2VPN forwarding flow;
step S45, judging whether the message is a protocol message, if so, executing step S47, otherwise, executing step S46;
step S46, the message is forwarded after being packaged by the L2 VPN;
step S47, carrying out strategy matching on the protocol message, if the CID value hits the first preset value, executing step S46, otherwise, uploading to the CPU.
According to the message forwarding method provided by the embodiment of the invention, the protocol message sent by the CE equipment of the user edge equipment is received through the port of the 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 protocol message transparent transmission on equipment only supporting MPLS L2VPN service is realized, only a policy aiming at the CID needs to be issued, and policy resources are saved.
Based on the same inventive concept, the embodiment of the present invention further provides a packet forwarding apparatus, which is applied to an operator edge router PE device, as shown in fig. 5, including: the device comprises a preprocessing module 51, a receiving module 52, a judging and acquiring module 53 and a judging and forwarding module 54, wherein:
the preprocessing module 51 is configured to bind a VPLS instance on a port of the PE device, and the receiving module 52 is configured to receive, through the port of the PE device, a protocol packet sent by a CE device of the user edge device; the judging and acquiring module 53 is configured to acquire a hardware attribute CID value of the VPLS instance if the VPLS instance bound by the port has enabled a protocol message transparent transmission function; the judgment forwarding module 54 is configured to forward the protocol packet if the CID value is determined to be the first preset value.
The apparatus as above, optionally, 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;
accordingly, the judgment forwarding module 54 is specifically configured to:
and matching the CID value of the VPLS instance corresponding to the port into which the protocol message enters with a first preset value in the first ACL, 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, 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 mentioned above, optionally, the judgment forwarding module 54 is specifically configured to:
and after the protocol message is encapsulated by the two-layer virtual private network L2VPN, forwarding the encapsulated protocol message to opposite-end PE equipment.
The apparatus as above, optionally, the mounting module is further configured to:
installing a second ACL at the port, wherein the matching content corresponding to the second ACL is as follows: the corresponding actions of the message corresponding to the VPLS instance are as follows: packaging the two-layer virtual private network L2VPN and forwarding;
wherein the first ACL has a higher priority than the second ACL.
As in the above device, optionally, the receiving module 52 is specifically configured to:
receiving a first message sent by a CE device through a port of the PE device;
judging and obtaining the first message as a protocol message according to the attribute information of the first message.
The device provided by the embodiment of the present invention is used for implementing the above method, and the functions of the device are specifically referred to the above method embodiment and are not described herein again.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, as shown in fig. 6, where the device includes: a processor (processor) 61, a memory (memory) 62, and a bus 63;
wherein the processor 61 and the memory 62 perform communication with each other via said bus 63;
the processor 61 is configured to call program instructions in the memory 62 to perform the methods provided by the above method embodiments, for example, including: receiving a protocol message sent by Customer Edge (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; 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 disclose a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the methods provided by the method embodiments described above, for example comprising: receiving a protocol message sent by Customer Edge (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; 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 storing computer instructions that cause a computer to perform the methods provided by the above-described method embodiments, for example, including: receiving a protocol message sent by Customer Edge (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; 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 appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware related to program instructions, and the foregoing program may be stored in a computer readable storage medium, where the program, when executed, performs steps including the above method embodiments; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
The embodiments of the apparatus etc. described above are merely illustrative, wherein the elements described as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution 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, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A message forwarding method is applied to PE equipment of an operator edge router, 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 Customer Edge (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;
if judging that the CID value is the first preset value, forwarding the protocol message;
before receiving the protocol message sent by the customer edge CE equipment through the port, 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 determined to be the first preset value, forwarding the protocol message includes:
and according to the CID value of the VPLS instance corresponding to the port into which the protocol message enters, matching a first preset value in the first ACL, and forwarding the protocol message according to the corresponding action in the first ACL.
2. The method of claim 1, wherein forwarding the protocol message comprises:
and after the protocol message is encapsulated by the two-layer virtual private network L2VPN, forwarding the encapsulated protocol message to opposite-end PE equipment.
3. The method of claim 2, wherein prior to receiving the protocol message sent by the customer edge CE device via the port, further comprising:
installing a second ACL at the port, wherein the matching content corresponding to the second ACL is as follows: the corresponding actions of the message corresponding to the VPLS instance are as follows: packaging the two-layer virtual private network L2VPN and forwarding;
wherein the first ACL has a higher priority than the second ACL.
4. The method of claim 1, wherein after the port of the PE device binds the VPLS instance, further comprising:
judging whether the VPLS instance enables a protocol message transparent transmission function, 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.
5. The method according to any one of claims 1-4, wherein the receiving, through the port of the PE device, a protocol packet sent by a CE device, includes:
receiving a first message sent by a CE device through a port of the PE device;
judging and obtaining the first message as a protocol message according to the attribute information of the first message.
6. The message forwarding device is applied to PE equipment of an operator edge router, and is characterized by comprising the following components:
a preprocessing module, configured to bind a VPLS instance on a port of the PE device,
the receiving module is used for receiving a protocol message sent by the CE equipment of the user edge equipment through the port of the PE equipment;
the judging and acquiring module is used for acquiring a hardware attribute CID value of the VPLS instance if the VPLS instance bound by the port enables a protocol message transparent transmission function;
the judging and forwarding module is used for forwarding the protocol message if judging that the CID value is obtained as a first preset value;
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 judging and forwarding module is specifically configured to:
and matching the CID value of the VPLS instance corresponding to the port into which the protocol message enters with a first preset value in the first ACL, and forwarding the protocol message according to the action corresponding to the first ACL.
7. The apparatus of claim 6, wherein the preprocessing module is further configured to:
judging whether the VPLS instance enables a protocol message transparent transmission function, 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.
8. An electronic device, comprising:
the device comprises a memory and a processor, wherein 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-5.
9. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to any of claims 1 to 5.
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 CN114039814A (en) 2022-02-11
CN114039814B true 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 (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7698455B2 (en) * 2003-08-01 2010-04-13 Foundry Networks, Inc. Method for providing scalable multicast service in a virtual private LAN service
CN105791109B (en) * 2014-12-25 2020-03-10 中兴通讯股份有限公司 Method, device and node for multicast forwarding of multi-protocol label switching intermediate node

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
CN114039814A (en) 2022-02-11

Similar Documents

Publication Publication Date Title
CN110266592B (en) Communication method and device for SRV6 network and IP MPLS network
US10164838B2 (en) Seamless segment routing
CN110719185B (en) Network slice control method and device and computer readable storage medium
US8806606B2 (en) Service aggregation in a cloud services center
CN107018059B (en) A kind of message forwarding method and device
WO2008092357A1 (en) A method and device for establishing a pseudo wire tunnel and transmitting message using it
WO2014194749A1 (en) Vpn implementation processing method and apparatus for edge device
CN112491701B (en) Message forwarding method and device
WO2015143802A1 (en) Service function chaining processing method and device
EP3512164B1 (en) Pseudo wire load sharing method and apparatus
US9917768B2 (en) System and method for reflecting FEC route information
JP2022537296A (en) EVPN message transfer method, system, storage medium and terminal
CN102571375B (en) Multicast forwarding method and device as well as network device
WO2021093463A1 (en) Packet forwarding method, first network device, and first device group
CN113726915A (en) Network system, message transmission method therein and related device
CN110365578B (en) Network interface control and link switching method, device, network equipment and medium
EP3866413A1 (en) Service flow processing method and device
WO2015100585A1 (en) Fiber-to-the-distribution point device and communication method therefor
CN109495370A (en) A kind of message transmitting method and device based on VPLS
CN117811875A (en) Household intercommunication network access method and device
CN103634210B (en) Find the method and apparatus of the opposite end PE equipment of VPLS example
CN114422415A (en) Egress node processing flows in segmented routing
CN114039814B (en) Message forwarding method and device, electronic equipment and storage medium
CN104471538A (en) Data stream processing method, device and system
KR101851031B1 (en) Pseudo-wire providing an in-band control channel using an offset

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