CN108777654B - Message forwarding method and routing equipment - Google Patents

Message forwarding method and routing equipment Download PDF

Info

Publication number
CN108777654B
CN108777654B CN201811089420.6A CN201811089420A CN108777654B CN 108777654 B CN108777654 B CN 108777654B CN 201811089420 A CN201811089420 A CN 201811089420A CN 108777654 B CN108777654 B CN 108777654B
Authority
CN
China
Prior art keywords
message
forwarding
destination address
virtual private
equipment
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
CN201811089420.6A
Other languages
Chinese (zh)
Other versions
CN108777654A (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.)
Shenzhen Forward Industrial Co Ltd
Original Assignee
Shenzhen Forward Industrial 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 Shenzhen Forward Industrial Co Ltd filed Critical Shenzhen Forward Industrial Co Ltd
Priority to CN201811089420.6A priority Critical patent/CN108777654B/en
Publication of CN108777654A publication Critical patent/CN108777654A/en
Application granted granted Critical
Publication of CN108777654B publication Critical patent/CN108777654B/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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering

Landscapes

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

Abstract

The invention provides a message forwarding method and routing equipment, wherein the method comprises the following steps: analyzing the received message to obtain key information of the message; judging whether the message is a message to the equipment or not according to the destination address; if yes, sending the message to a control plane for analysis; if not, judging whether the virtual private line label is effective, if so, acquiring the output interface information of the message according to the virtual private line label and the VPN mark, and forwarding the message in the virtual private line network according to the output interface information; if the message is invalid, acquiring forwarding information and outgoing interface information of the message according to the VPN identification and the destination address, and forwarding the message in a common network according to the forwarding information and the outgoing interface information. The invention provides a forwarding method of a network layer protocol message, which combines virtual private network forwarding and ordinary network forwarding, and simultaneously meets various forwarding requirements and increases the diversity of message forwarding approaches.

Description

Message forwarding method and routing equipment
Technical Field
The present invention relates to the field of data network communication technologies, and in particular, to a packet forwarding method and a routing device.
Background
With the development of network technology and the popularization of mobile internet, people's life, work and study have become more and more undiscovered from the internet. A Router (Router) is a computer network device that can transmit data packets to a destination (a transmission path for selecting data) through a network, and this process is called routing. The router is a device for connecting two or more individual networks, and operates in a third layer of the OSI model, that is, a network layer, such as an Internet Protocol (IP) layer, and mainly completes processing and forwarding of messages such as IPv4(Internet Protocol version4, fourth version of Internet Protocol), IPv6(Internet Protocol version6, sixth version of Internet Protocol), MPLS (Multi Protocol Label Switch ), and the like.
Currently, a router can be logically divided into three layers, namely a data forwarding plane, a control plane and a management plane. The main task of the data forwarding plane of a router is to process and forward various types of data from different ports. However, with the development of the internet, new services and new requirements are continuously emerging, the virtual private network needs a dedicated network layer protocol at a network layer, and the original data plane message forwarding mode is not suitable any more, which brings great inconvenience to message forwarding.
Disclosure of Invention
Aiming at the defects in the prior art, the embodiments of the present invention aim to provide a message forwarding method and a routing device, so as to solve the defects in the prior art.
According to an embodiment of the present invention, a method for forwarding a packet is provided, including:
analyzing a received message to obtain key information of the message, wherein the key information at least comprises a destination address, a VPN mark and a virtual private line label;
judging whether the message is a message to the equipment or not according to the destination address;
if the message is the message of the equipment, sending the message to a control plane for analysis;
if the message is not the message of the equipment, judging whether the virtual private line label is effective, if the virtual private line label is effective, acquiring outlet interface information of the message according to the virtual private line label and the VPN mark, and forwarding the message in a virtual private network according to the outlet interface information;
if the virtual private line label is invalid, obtaining the forwarding information and the outgoing interface information of the message according to the VPN identification and the destination address, and forwarding the message in a common network according to the forwarding information and the outgoing interface information.
In the above message forwarding method, the destination address includes an area identifier and a device name.
In the above message forwarding method, the determining whether the message is a message to the device according to the destination address includes:
comparing the area identification of the destination address with the area identification of the current equipment and comparing the equipment name of the destination address with the equipment name of the current equipment;
if the area identification of the destination address is the same as the area identification of the current equipment and the equipment name of the destination address is the same as the equipment name of the current equipment, the message is the message to the equipment;
and if the area identifier of the destination address is different from the area identifier of the current equipment and/or the equipment name of the destination address is different from the equipment name of the current equipment, the message is not the message of the equipment.
In the above message forwarding method, the "acquiring the outgoing interface information of the message according to the virtual private line label and the VPN identifier" includes:
and inquiring a pre-stored virtual private line label forwarding table according to the virtual private line label and the VPN identification to acquire the outlet interface information of the message.
In the above message forwarding method, the virtual private line label forwarding table is a forwarding table with a fixed length and an accurate matching function.
In the above message forwarding method, the "acquiring forwarding information and outgoing interface information of the message according to the VPN identifier and the destination address" includes:
if the area identification of the destination address is different from the area identification of the current equipment, inquiring a pre-stored area ID forwarding table according to the VPN identification and the area identification of the destination address, and acquiring forwarding information and output interface information of the message;
and if the area identifier of the destination address is the same as the area identifier of the current equipment and the equipment name of the destination address is different from the equipment name of the current equipment, inquiring a pre-stored equipment ID forwarding table according to the VPN identifier and the equipment name of the destination address, and acquiring forwarding information and outgoing interface information of the message.
In the above message forwarding method, the area ID forwarding table and the device ID forwarding table are both fixed-length accurately matched forwarding tables.
In the above message forwarding method, the key information further includes a message forwarding priority.
In the above packet forwarding method, the method further includes:
and when the virtual private line label is invalid, determining the service quality guarantee parameter of the message according to the corresponding relation between the prestored message forwarding priority and the service quality guarantee parameter, and forwarding the message according to the service quality guarantee parameter.
In the above packet forwarding method, the method further includes:
and before forwarding the message, performing link layer encapsulation processing on the message.
In the above packet forwarding method, the method further includes:
and if the forwarding information and the output interface information of the message cannot be acquired, discarding the message.
Another embodiment of the present invention provides a packet forwarding apparatus, including:
the analysis acquisition module is used for analyzing the received message and acquiring key information of the message, wherein the key information at least comprises a destination address, a VPN (virtual private network) identifier and a virtual private line label;
the first judging module is used for judging whether the message is the message of the equipment according to the destination address;
the processing module sends the message to a control plane for analysis if the message is the message of the equipment;
the second judgment module is used for judging whether the virtual private line label is valid or not if the message is not the message of the equipment;
the first acquiring and forwarding module is used for acquiring outlet interface information of the message according to the virtual private line label and the VPN identification and forwarding the message in a virtual private network according to the outlet interface information if the virtual private line label is valid;
and if the virtual private line label is invalid, the second acquiring and forwarding module is used for acquiring forwarding information and outgoing interface information of the message according to the VPN identification and the destination address, and forwarding the message in a common network according to the forwarding information and the outgoing interface information.
Yet another embodiment of the present invention provides a routing device, which includes a memory for storing a computer program and a processor for executing the computer program to make the routing device execute the message forwarding method described above.
Still another embodiment of the present invention provides a computer-readable storage medium storing the computer program used in the above-described routing apparatus.
The message forwarding method and the routing device provided by the embodiment of the invention at least provide the following technical effects: the forwarding method of the network layer protocol message combines virtual private network forwarding and ordinary network forwarding, meets the forwarding requirements of various networks, increases the diversity of message forwarding ways and improves the message forwarding efficiency; the forwarding mode is easy to realize on hardware, and the complexity of hardware realization is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a flowchart illustrating a message forwarding method according to a first embodiment of the present invention.
Fig. 2a to fig. 2b are schematic flowcharts of a message forwarding method according to a second embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a message forwarding apparatus according to an embodiment of the present invention.
Description of the main element symbols:
400-a message forwarding device; 410-a resolution acquisition module; 420-a first judgment module; 430-a processing module; 440-a second judgment module; 450-a first acquisition forwarding module; 460-second acquisition forwarding module.
Detailed Description
Various embodiments of the present disclosure will be described more fully hereinafter. The present disclosure is capable of various embodiments and of modifications and variations therein. However, it should be understood that: there is no intention to limit the various embodiments of the disclosure to the specific embodiments disclosed herein, but rather, the disclosure is to cover all modifications, equivalents, and/or alternatives falling within the spirit and scope of the various embodiments of the disclosure.
Hereinafter, the term "includes" or "may include" used in various embodiments of the present disclosure indicates the presence of the disclosed functions, operations, or elements, and does not limit the addition of one or more functions, operations, or elements. Furthermore, as used in various embodiments of the present disclosure, the terms "comprising," "having," and their derivatives, are intended to be only representative of the particular features, integers, steps, operations, elements, components, or combinations of the foregoing, and should not be construed as first excluding the existence of, or adding to one or more other features, integers, steps, operations, elements, components, or combinations of the foregoing.
In various embodiments of the disclosure, the expression "or" at least one of a or/and B "includes any or all combinations of the words listed simultaneously. For example, the expression "a or B" or "at least one of a or/and B" may include a, may include B, or may include both a and B.
Expressions (such as "first", "second", and the like) used in various embodiments of the present disclosure may modify various constituent elements in the various embodiments, but may not limit the respective constituent elements. For example, the above description does not limit the order and/or importance of the elements described. The foregoing description is for the purpose of distinguishing one element from another. For example, the first user device and the second user device indicate different user devices, although both are user devices. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the scope of various embodiments of the present disclosure.
It should be noted that: if it is described that one constituent element is "connected" to another constituent element, the first constituent element may be directly connected to the second constituent element, and a third constituent element may be "connected" between the first constituent element and the second constituent element. In contrast, when one constituent element is "directly connected" to another constituent element, it is understood that there is no third constituent element between the first constituent element and the second constituent element.
The term "user" used in various embodiments of the present disclosure may indicate a person using an electronic device or a device using an electronic device (e.g., an artificial intelligence electronic device).
The terminology used in the various embodiments of the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the various embodiments of the present disclosure. As used herein, the singular forms are intended to include the plural forms as well, unless the context clearly indicates otherwise. Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of the present disclosure belong. The terms (such as those defined in commonly used dictionaries) should be interpreted as having a meaning that is consistent with their contextual meaning in the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined in various embodiments of the present disclosure.
Example 1
Fig. 1 is a flowchart illustrating a message forwarding method according to a first embodiment of the present invention. The method comprises the following steps:
step S110, analyzing the received message and obtaining the key information of the message.
The key information includes destination address, VPN identification, virtual special line label, message forwarding priority, source port, destination port, input interface and other information. The destination address includes an area identification and a device name.
The message may include a PPP (point-to-point protocol) message, an ethernet message, an FR (frame relay protocol) message, etc. of the key information.
And analyzing the message, acquiring message header information, and acquiring the key information according to the message header information.
Step S120, determine whether the packet is a packet to the current device.
When the destination address in the message is consistent with the destination address of the current device, the message is considered to be the message sent to the current device, and the process proceeds to step S130; when the destination address in the message is not consistent or not completely consistent with the destination address of the current device, the message is not considered to be the message sent to the current device, and the process proceeds to step S140.
Step S130, sending the message to a control plane for analysis.
If the message is sent to the current equipment by other equipment, after receiving the message, the current equipment sends the message to a control plane for analysis and correspondingly processes the analyzed message.
Step S140, determine whether the virtual private line tag is valid.
If the message is not the message to the device, judging whether the virtual private line tag in the message is valid according to the content of the virtual private line tag status bit, namely whether the message is the message of the virtual private network, if the virtual private line tag is valid, the received message is the message of the virtual private network, and proceeding to step S150; if the virtual private line label is invalid, the received message is a message of a general network, and the process proceeds to step S160.
For example, if the content of the status bit of the virtual private line tag is 1, the virtual private line tag is valid; if the content of the status bit of the virtual private line tag is 0, the virtual private line tag is invalid.
Step S150, according to the virtual private line label and the VPN mark, the output interface information of the message is obtained, and the message is forwarded in the virtual private line network according to the output interface information.
If the received message is a message of a virtual private network, in this embodiment, the virtual private line tag and the VPN identifier may be used as keywords, and a pre-stored virtual private line tag forwarding table is searched in a fixed-length precise matching manner to obtain a record corresponding to the keywords, where the record includes the virtual private line tag and the VPN identifier at the same time, and the outgoing interface information of the message is obtained according to the content in the record. In some other embodiments, the virtual private line label and the VPN identifier may also be used to generate a corresponding hash value through a hash algorithm, and the generated hash value is used as an index, and a pre-stored virtual private line label forwarding table is searched in a fixed-length precise matching manner to obtain the outgoing interface information of the packet.
Compared with the traditional longest prefix matching method, the fixed-length accurate matching search hardware is easier to realize, the search efficiency is higher, and only one search is needed. Because one device in the private network layer protocol has only one address, compared with the common network device which needs one address for each interface, the table entry size searched based on the fixed length precise matching is smaller.
Further, the virtual private line label forwarding table is a forwarding table with a fixed length and an accurate matching function.
The egress interface information includes ID of the egress interface, link layer encapsulation of the ingress interface, and the like.
The virtual private line label forwarding table at least stores a virtual private line label, a VPN mark, outlet interface information and the like.
After the output interface information of the message is acquired, the current equipment forwards the message in the virtual private network according to the output interface information.
Step S160, obtaining the forwarding information and the outgoing interface information of the packet according to the VPN identifier and the destination address, and forwarding the packet in the normal network according to the forwarding information and the outgoing interface information.
If the received message is not a message of the virtual private network, in this embodiment, the VPN identifier and the destination address may be used as keywords, and a pre-stored area ID forwarding table or device ID forwarding table is searched in a fixed-length precise matching manner to obtain a record corresponding to the keyword, where the record includes the VPN identifier and the destination address at the same time, and the forwarding information and the egress interface information of the message are obtained according to the content in the record. In some other embodiments, the VPN identifier and the destination address may further generate a corresponding hash value through a hash algorithm, and the generated hash value is used as an index, and a pre-stored area ID forwarding table or device ID forwarding table is searched in a fixed-length precise matching manner, so as to obtain forwarding information and egress interface information of the packet.
Further, the area ID forwarding table and the device ID forwarding table are both fixed-length accurately matched forwarding tables.
The forwarding information at least includes the path information of the message forwarding, and the address, name and other information of the device in the path for forwarding each time.
The area ID forwarding table at least comprises VPN identification, destination address, forwarding information, outgoing interface information and the like.
The equipment ID forwarding table at least comprises a VPN mark, a destination address, forwarding information, outgoing interface information and the like.
After the forwarding information and the outgoing interface information of the message are obtained, the address information of the equipment which sends the next hop of the message is determined according to the forwarding information, and the message is forwarded in a common network according to the address information and the outgoing interface information of the equipment which sends the next hop of each forwarding node.
Example 2
Fig. 2a to fig. 2b are schematic flowcharts of a message forwarding method according to a second embodiment of the present invention.
Step S210, parsing the received message, and obtaining key information of the message.
This step is the same as step S110 in embodiment 1, and is not described again here.
Step S220, determine whether the area id of the destination address is the same as the area id of the current device and whether the device name of the destination address is the same as the device name of the current device.
Comparing the obtained destination address with the address of the current device, judging whether the area identifier of the destination address is the same as the area identifier of the current device and whether the device name of the destination address is the same as the device name of the current device, if the area identifier of the destination address is the same as the area identifier of the current device and the device name of the destination address is the same as the device name of the current device, judging that the message is a message sent to the current device through other devices, and proceeding to step S230; if the area identifier of the destination address is different from the area identifier of the current device and the device name of the destination address is different from the device name of the current device, determining that the message is not a message sent to the current device by other devices, and proceeding to step S240; if the area identifier of the destination address is not the same as the area identifier of the current device or the device name of the destination address is not the same as the device name of the current device, it is determined that the packet is not a packet sent to the current device by another device, and the process proceeds to step S240.
Step S230, sending the message to the control plane for parsing.
This step is the same as step S130 in embodiment 1, and is not described again here.
Step S240, determining whether the virtual private line tag is valid.
If the virtual private line tag is valid, go to step S250; if the virtual private line tag is invalid, the process proceeds to step S290.
Step S250, querying a pre-stored forwarding table of the virtual private line label according to the virtual private line label and the VPN identifier, and acquiring the egress interface information of the packet.
Step S260, determining whether the outgoing interface information of the packet can be acquired.
Judging whether a record corresponding to the virtual private line label and the VPN identification of the message exists in the virtual private line label forwarding table, if the record corresponding to the virtual private line label and the VPN identification of the message does not exist in the virtual private line label forwarding table, the current equipment cannot acquire the outgoing interface information of the message according to the record, and advancing to the step S270; if a record corresponding to the virtual private line label and the VPN identifier of the packet exists in the virtual private line label forwarding table, the current device may obtain the outgoing interface information of the packet according to the record, and then proceed to step S280.
Step S270, discarding the message.
And when the outgoing interface information of the message cannot be acquired, discarding the message without forwarding.
Step S280, the message is forwarded in the virtual private network according to the output interface information.
Step S290, determine whether the area id of the destination address is different from the area id of the current device.
There may be three cases of determining whether the area identifier of the destination address is different from the area identifier of the current device:
in the first case, the area id of the destination address is different from the area id of the current device, and the device name of the destination address is the same as the device name of the current device, and the process proceeds to step S320.
In the second case, the area identifier of the destination address is different from the area identifier of the current device, and the device name of the destination address is different from the device name of the current device, and the process proceeds to step S320.
In the third case, the area id of the destination address is the same as the area id of the current device, and the process proceeds to step S300.
Step S300, determine whether the area id of the destination address is the same as the area id of the current device and whether the device name of the destination address is different from the device name of the current device.
If the area id of the destination address is the same as the area id of the current device, it is determined whether the device name of the destination address is different from the device name of the current device, and if the area id of the destination address is the same as the area id of the current device and the device name of the destination address is different from the device name of the current device, the process proceeds to step S310.
If the area id of the destination address is not the same as the area id of the current device and the device name of the destination address is the same as the device name of the current device, the process proceeds to step S320.
Step S310, according to the VPN identification and the device name of the destination address, inquiring a pre-stored device ID forwarding table, and acquiring the forwarding information and the output interface information of the message.
And when the area identifier of the destination address is the same as the area identifier of the current equipment and the equipment name of the destination address is different from the equipment name of the current equipment, using the VPN identifier and the equipment name of the destination address as keywords, searching whether a record corresponding to the VPN identifier and the equipment name of the destination address exists in a pre-stored equipment ID forwarding table, and acquiring forwarding information and outgoing interface information of the message according to the content of the record.
Step S320, querying a pre-stored area ID forwarding table according to the VPN identifier and the area identifier of the destination address, and obtaining forwarding information and egress interface information of the packet.
When the area identification of the destination address is different from the area identification of the current equipment and the equipment name of the destination address is the same as the equipment name of the current equipment, or when the area identification of the destination address is different from the area identification of the current equipment and the equipment name of the destination address is different from the equipment name of the current equipment, the area identification of the VPN identification and the area identification of the destination address are used as keywords, whether a record corresponding to the area identification of the VPN identification and the area identification of the destination address exists in a pre-stored area ID forwarding table or not is searched, and forwarding information and outgoing interface information of the message are obtained according to the content of the record.
Step S330, determining whether forwarding information and egress interface information of the packet can be obtained.
If a record corresponding to the VPN identifier and the area identifier of the destination address exists in the area ID forwarding table, the current device can obtain forwarding information and outgoing interface information of the packet according to the record, and then proceed to step S350;
or when the area identifier of the destination address is the same as the area identifier of the current device and the device name of the destination address is different from the device name of the current device, using the VPN identifier and the device name of the destination address as keywords, if a record corresponding to the VPN identifier and the device name of the destination address exists in the device ID forwarding table, the current device can obtain forwarding information and outgoing interface information of the packet according to the record, and then proceed to step S350.
If there is no record corresponding to the VPN identifier and the area identifier of the destination address in the area ID forwarding table, the current device cannot obtain forwarding information and outgoing interface information of the packet according to the record, and then proceeds to step S340;
or there is no record corresponding to the VPN identifier and the device name of the destination address in the device ID forwarding table, and the current device cannot acquire the forwarding information and the egress interface information of the packet according to the record, and then proceeds to step S340.
Step S340, discard the packet.
Step S350, determining the service quality guarantee parameters of the message according to the corresponding relation between the pre-stored message forwarding priority and the service quality guarantee parameters, and forwarding the message according to the service quality guarantee parameters.
The key information also comprises message forwarding priority information of the message.
The current device also stores the corresponding relation between the message forwarding priority and the service quality guarantee parameter.
For example, the correspondence between the packet forwarding priority and the qos guarantee parameter may be represented by a table.
Message forwarding priority Quality of service assurance parameters
1 A
2 B
…… ……
As shown in the above table, the packet forwarding priority 1 corresponds to the qos guarantee parameter a, the packet forwarding priority 2 corresponds to the qos guarantee parameter B, and so on.
The service quality assurance parameters include the flow and sequence of transmitting the messages.
And adjusting the flow in the forwarding process according to the service quality guarantee parameter, scheduling the sequence of the queue and the like.
Example 3
Fig. 3 is a schematic structural diagram of a message forwarding apparatus according to an embodiment of the present invention. The message forwarding apparatus 400 corresponds to the message forwarding method in embodiment 1, and any optional items in embodiment 1 are also applicable to this embodiment, and are not described in detail here.
The packet forwarding apparatus 400 includes: the analysis module 410, the first determining module 420, the processing module 430, the second determining module 440, the first obtaining and forwarding module 450, and the second obtaining and forwarding module 460.
The analysis obtaining module 410 is configured to analyze the received packet and obtain key information of the packet, where the key information at least includes a destination address, a VPN identifier, and a virtual private line label.
The first determining module 420 is configured to determine whether the packet is a packet addressed to the device according to the destination address.
If the message is a message to the device, the processing module 430 sends the message to a control plane for analysis.
A second determining module 440, wherein if the packet is not a packet of the device, the second determining module 440 is configured to determine whether the virtual private line label is valid.
A first obtaining and forwarding module 450, wherein if the virtual private line label is valid, the first obtaining and forwarding module 450 is configured to obtain the outgoing interface information of the packet according to the virtual private line label and the VPN identifier, and forward the packet in the virtual private network according to the outgoing interface information.
A second obtaining and forwarding module 460, if the virtual private line label is invalid, the second obtaining and forwarding module 460 is configured to obtain forwarding information and outgoing interface information of the packet according to the VPN identifier and the destination address, and forward the packet in a common network according to the forwarding information and the outgoing interface information.
Another embodiment of the present invention further provides a routing device, where the routing device includes a memory and a processor, where the memory is used to store a computer program, and the processor runs the computer program to make the routing device execute the above-mentioned message forwarding method.
Still another embodiment of the present invention also provides a computer-readable storage medium storing the computer program used in the above-described routing apparatus.
Therefore, the embodiment of the invention provides a message forwarding method and routing equipment, provides a network layer protocol message forwarding method combining virtual private network forwarding and common network forwarding, meets the forwarding requirements of various networks, increases the diversity of message forwarding paths, and improves the message forwarding efficiency; the table entries stored in advance are inquired by using the keywords or the hash value in a fixed-length accurate matching mode, so that the search hardware is easier to realize, the search efficiency is higher, and only one search is needed; because one device in the virtual private network layer protocol only has one address, compared with the common network device in which each interface needs one address, the table entry size searched based on fixed length precise matching is smaller; the forwarding mode is easy to realize on hardware, and the complexity of hardware realization is reduced.
In the several embodiments provided in the present application, it should be understood that the disclosed system and method may be implemented in other ways. The system embodiments described above are merely illustrative, and the flowcharts and block diagrams in the figures, for example, illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, each functional module or unit in each embodiment of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention or a part of the technical solution that contributes to the prior art in essence can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention.

Claims (8)

1. A message forwarding method is characterized by comprising the following steps:
analyzing a received message to obtain key information of the message, wherein the key information at least comprises a destination address, a VPN (virtual private network) identifier and a virtual private line label, and the destination address comprises an area identifier and an equipment name;
comparing the area identification of the destination address with the area identification of the current equipment and comparing the equipment name of the destination address with the equipment name of the current equipment;
if the area identification of the destination address is the same as the area identification of the current equipment and the equipment name of the destination address is the same as the equipment name of the current equipment, the message is the message to the equipment;
if the area identification of the destination address is different from the area identification of the current equipment and/or the equipment name of the destination address is different from the equipment name of the current equipment, the message is not the message of the equipment;
if the message is the message of the equipment, sending the message to a control plane for analysis;
if the message is not the message of the equipment, judging whether the virtual private line label is effective or not;
if the virtual private line label is valid, acquiring outlet interface information of the message according to the virtual private line label and the VPN mark and forwarding the message in a virtual private line network according to the outlet interface information;
if the virtual private line label is invalid, obtaining the forwarding information and the outgoing interface information of the message according to the VPN identification and the destination address, and forwarding the message in a common network according to the forwarding information and the outgoing interface information.
2. The message forwarding method according to claim 1, wherein the "obtaining the outgoing interface information of the message according to the virtual private line label and the VPN identifier" comprises:
and inquiring a pre-stored virtual private line label forwarding table according to the virtual private line label and the VPN identification to acquire the outlet interface information of the message.
3. The message forwarding method of claim 2, wherein the virtual private line label forwarding table is a fixed-length exact-match forwarding table.
4. The message forwarding method according to claim 1, wherein the "obtaining forwarding information and egress interface information of the message according to the VPN identifier and the destination address" comprises:
if the area identification of the destination address is different from the area identification of the current equipment, inquiring a pre-stored area ID forwarding table according to the VPN identification and the area identification of the destination address, and acquiring forwarding information and output interface information of the message;
and if the area identifier of the destination address is the same as the area identifier of the current equipment and the equipment name of the destination address is different from the equipment name of the current equipment, inquiring a pre-stored equipment ID forwarding table according to the VPN identifier and the equipment name of the destination address, and acquiring forwarding information and outgoing interface information of the message.
5. The message forwarding method of claim 4, wherein the area ID forwarding table and the device ID forwarding table are both fixed-length exact-match forwarding tables.
6. The message forwarding method of claim 1 wherein the critical information further comprises a message forwarding priority.
7. The packet forwarding method of claim 6, further comprising:
and when the virtual private line label is invalid, determining the service quality guarantee parameter of the message according to the corresponding relation between the prestored message forwarding priority and the service quality guarantee parameter, and forwarding the message according to the service quality guarantee parameter.
8. A routing device, characterized in that the routing device comprises a memory for storing a computer program and a processor for executing the computer program to cause the routing device to perform the message forwarding method according to any one of claims 1-7.
CN201811089420.6A 2018-09-18 2018-09-18 Message forwarding method and routing equipment Active CN108777654B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811089420.6A CN108777654B (en) 2018-09-18 2018-09-18 Message forwarding method and routing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811089420.6A CN108777654B (en) 2018-09-18 2018-09-18 Message forwarding method and routing equipment

Publications (2)

Publication Number Publication Date
CN108777654A CN108777654A (en) 2018-11-09
CN108777654B true CN108777654B (en) 2020-12-29

Family

ID=64029477

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811089420.6A Active CN108777654B (en) 2018-09-18 2018-09-18 Message forwarding method and routing equipment

Country Status (1)

Country Link
CN (1) CN108777654B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114143257B (en) * 2020-09-03 2023-04-28 华为技术有限公司 Method for generating table entry, method for sending message, equipment and system
CN114024898B (en) * 2021-11-09 2023-06-30 湖北天融信网络安全技术有限公司 Message transmission method, device, equipment and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100493022C (en) * 2003-12-01 2009-05-27 华为技术有限公司 Method for securing service quality in skeletal network of two-stage virtual special network
US8213435B2 (en) * 2005-04-28 2012-07-03 Cisco Technology, Inc. Comprehensive model for VPLS
CN102316014B (en) * 2010-07-01 2015-01-21 杭州华三通信技术有限公司 Load sharing method and router under hierarchical virtual dedicated local area network service environment
CN102185778B (en) * 2011-05-11 2014-09-10 杭州华三通信技术有限公司 Method and device for transmitting data based on VLL (Virtual Lease Line)
CN102413060B (en) * 2011-12-31 2014-10-29 杭州华三通信技术有限公司 User private line communication method and equipment used in VPLS (Virtual Private LAN (Local Area Network) Service) network
CN107306222B (en) * 2016-04-25 2020-09-25 华为技术有限公司 Method and equipment for establishing traffic engineering tunnel on label switching path
US9853833B2 (en) * 2016-05-16 2017-12-26 Cisco Technology, Inc. Individual virtual private local area network service conversion to a different virtual private network service

Also Published As

Publication number Publication date
CN108777654A (en) 2018-11-09

Similar Documents

Publication Publication Date Title
US11082342B2 (en) System and method to facilitate content forwarding using Bit Index Explicit Replication (BIER) in an Information-Centric Networking (ICN) environment
CN105024985B (en) A kind of message processing method and device
EP3866414A1 (en) Message processing method, apparatus, device and system
EP2544417B1 (en) Communication system, path control apparatus, packet forwarding apparatus and path control method
CN108173982B (en) NAT (network Address translation) processing method and device for cross-board message
CN108989209B (en) BIER MPLS network equipment, message forwarding method and medium thereof
US20190058654A1 (en) Enhanced error signaling and error handling in a network environment with segment routing
CN108768866B (en) Cross-card forwarding method and device for multicast message, network equipment and readable storage medium
CN107547407B (en) Message transmission method, device and implementation device
CN107786437B (en) Message forwarding method and device
CN113411258B (en) Message processing method and device
US10791051B2 (en) System and method to bypass the forwarding information base (FIB) for interest packet forwarding in an information-centric networking (ICN) environment
US8938579B2 (en) Method and system for using range bitmaps in TCAM access
CN106685827B (en) Downlink message forwarding method and AP (access point) equipment
WO2017198131A1 (en) Method and system for redirecting data stream, and network device and control device
CN116800672B (en) Method, device, electronic equipment and storage medium for accelerating message forwarding
CN114640557B (en) Gateway and cloud network system
US20240106751A1 (en) Method and apparatus for processing detnet data packet
US9270593B2 (en) Prediction based methods for fast routing of IP flows using communication/network processors
CN108777654B (en) Message forwarding method and routing equipment
US20230254246A1 (en) Mechanisms for packet path tracing and per-hop delay measurement in segment routing with multiprotocol label switching (sr-mpls) networks
CN108650237B (en) Message security check method and system based on survival time
CN105207904A (en) Message processing method, device and router
CN103581020A (en) Message forwarding method, message forwarding device and message forwarding system
US20200044953A1 (en) Data Packet Fast Routing Method

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