CN112291151A - Message forwarding method, device, network equipment and storage medium - Google Patents

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

Info

Publication number
CN112291151A
CN112291151A CN202011297590.0A CN202011297590A CN112291151A CN 112291151 A CN112291151 A CN 112291151A CN 202011297590 A CN202011297590 A CN 202011297590A CN 112291151 A CN112291151 A CN 112291151A
Authority
CN
China
Prior art keywords
site
forwarded
message
address
destination
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011297590.0A
Other languages
Chinese (zh)
Other versions
CN112291151B (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.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology 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 Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN202011297590.0A priority Critical patent/CN112291151B/en
Publication of CN112291151A publication Critical patent/CN112291151A/en
Application granted granted Critical
Publication of CN112291151B publication Critical patent/CN112291151B/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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Landscapes

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

Abstract

The application relates to a message forwarding method, a message forwarding device, network equipment and a storage medium, and belongs to the technical field of network communication. The method comprises the steps of obtaining a message to be forwarded; acquiring a service ID and a site ID corresponding to a message to be forwarded, wherein the site ID represents the ID of a site to which source network equipment corresponding to a source IP address in the message to be forwarded belongs, and/or the ID of a site to which destination network equipment corresponding to a destination IP address in the message to be forwarded belongs; searching a forwarding rule matched with the service ID and the site ID; and forwarding the message to be forwarded to a forwarding channel specified by the forwarding rule. In the embodiment of the application, by introducing the concept of the sites, the controller can plan the forwarding rules of each site based on the global network when planning the path, and search the forwarding rules matched with the service ID and the site ID corresponding to the message to be forwarded when forwarding the message, so as to forward the message based on the forwarding rules.

Description

Message forwarding method, device, network equipment and storage medium
Technical Field
The present application belongs to the field of network communication technologies, and in particular, to a method and an apparatus for forwarding a packet, a network device, and a storage medium.
Background
In Network networking construction, by introducing Software Defined Network (SDN) technology into a Wide Area Network (WAN), a controller is used to define services in a Network and control traffic in the Network; different services are subjected to differentiated quality service through different strategies, multilink resources are fully utilized, and the bandwidth utilization rate is improved. When a software-defined wide area network (SD-WAN) scheme is deployed, a controller is required to manage all devices in a network, but most of the actual networks are multi-level wide area networks in which multiple vendors are mixed to form a network, and in order to facilitate management of the network by the controller, a device side-hanging manner is usually adopted to meet the requirement that network wide area network boundary devices are devices of the same vendor, but this also results in that uncontrolled network devices (devices of other vendors) need to be passed through between the side-hanging devices.
For the problem caused by crossing a transparent network in the deployment process of a software defined wide area network (SD-WAN), there are two main solutions in the current industry: (1) the controller does not participate in the path planning of the service in the network, only sends the path requirement of the service to the equipment, and the equipment independently and intelligently selects a route and a hop-by-hop route to complete the transmission of the message, so that the controller can pass through each section of tunnel hop-by-hop in the actual network to complete the transmission of the service. According to the scheme, only a local proper path is selected from the point-of-point equipment, a global optimal path cannot be selected from the global network, and meanwhile the consistency of back-and-forth paths of the same service cannot be guaranteed. (2) The controller participates in global path planning in the network, firstly establishes a tunnel between transparent networks, and simultaneously establishes a tunnel at the starting end of a service, and can complete the global path planning on the basis of two layers of tunnels, but due to the introduction of a plurality of layers of tunnels, the forwarding performance of equipment is obviously reduced, and the scheme is not beneficial to scale deployment.
Therefore, under the actual condition of multi-manufacturer equipment mixed networking and side-hung equipment networking, how to give play to the overall management and control of the controller on the network, the overall path planning of the controller for the service, the capability and the advantages of the controller on the aspects of ensuring the consistency of the back-and-forth path of the service and the like are given play to, meanwhile, the burden of the network is not increased by introducing complex technologies such as a plurality of layers of tunnels and the like, the scale network deployment capability of a solution is reduced, and no good solution is provided at present.
Disclosure of Invention
In view of this, an object of the present application is to provide a message forwarding method, an apparatus, a network device, and a storage medium, so as to solve the problem of device performance degradation caused by the need to introduce multiple layers of tunnels to perform the function of global path planning of a controller in the deployment process of the existing software-defined wide area network.
The embodiment of the application is realized as follows:
in a first aspect, an embodiment of the present application provides a packet forwarding method, which is applied to a network device, and the method includes: acquiring a message to be forwarded; acquiring a service ID and a site ID corresponding to the message to be forwarded, wherein the site ID represents an ID of a site to which source network equipment corresponding to a source IP address in the message to be forwarded belongs, and/or an ID of a site to which destination network equipment corresponding to a destination IP address in the message to be forwarded belongs; searching a forwarding rule matched with the service ID and the site ID, wherein the forwarding rule comprises a corresponding relation between the service ID, the site ID and a forwarding channel; and forwarding the message to be forwarded to a forwarding channel specified by the forwarding rule. In the embodiment of the application, by introducing the concept of the sites, the controller can plan the forwarding rules of each site based on the global network when performing path planning, and when forwarding messages, the forwarding rules corresponding to the messages to be forwarded are matched based on the service ID and the site ID, so that efficient forwarding is performed based on the forwarding rules, and the problem that the performance of equipment is reduced because a multilayer tunnel is required to be introduced to perform the function of global path planning of the controller in the deployment process of the existing software-defined wide area network is solved.
With reference to a possible implementation manner of the first aspect, the obtaining a service ID corresponding to the packet to be forwarded includes: and carrying out service classification identification on the message to be forwarded to obtain the service ID. In the embodiment of the application, the corresponding service ID can be rapidly obtained by performing service classification and identification on the message to be forwarded, so that the speed of obtaining the service ID can be improved.
With reference to a possible implementation manner of the embodiment of the first aspect, the characterizing the ID of the station to which the source network device corresponding to the source IP address in the packet to be forwarded belongs, and acquiring the station ID corresponding to the packet to be forwarded includes: acquiring a source IP address carried in the message to be forwarded; obtaining a route containing the source IP address by selecting the route of the source IP address; obtaining a source site ID corresponding to the message to be forwarded based on the route; the forwarding rule includes a corresponding relationship between the service ID, the source site ID and the forwarding channel. In the embodiment of the application, the source IP address carried in the message to be forwarded is acquired, and the route including the source IP address is acquired through IP routing, so that the source site ID corresponding to the message to be forwarded can be acquired, and the speed of acquiring the source site ID corresponding to the message to be forwarded is improved.
With reference to a possible implementation manner of the first aspect, the characterizing, by the site ID, an ID of a site to which a destination network device corresponding to a destination IP address in the to-be-forwarded message belongs, and acquiring the site ID corresponding to the to-be-forwarded message includes: acquiring a destination IP address carried in the message to be forwarded; obtaining a route containing the destination IP address by selecting the destination IP address; obtaining a destination site ID corresponding to the message to be forwarded based on the route; the forwarding rule includes a corresponding relation between the service ID, the destination site ID and the forwarding channel. In the embodiment of the application, the destination IP address carried in the message to be forwarded is obtained, and the route including the destination IP address is obtained through IP routing, so that the destination site ID corresponding to the message to be forwarded can be obtained, and the speed of obtaining the destination site ID corresponding to the message to be forwarded is improved.
With reference to a possible implementation manner of the first aspect, the characterizing, by the site ID, the ID of a site to which a source network device corresponding to a source IP address in the packet to be forwarded belongs and a site to which a destination network device corresponding to a destination IP address belongs, and acquiring the site ID corresponding to the packet to be forwarded includes: acquiring a source IP address and a destination IP address carried in the message to be forwarded; obtaining a route comprising the source IP address and the destination IP address by selecting the source IP address and the destination IP address; obtaining a source site ID and a destination site ID corresponding to the message to be forwarded based on the route; the forwarding rule includes a corresponding relationship between the service ID, the source site ID, the destination site ID and the forwarding channel. In the embodiment of the application, the source IP address and the destination IP address carried in the message to be forwarded are obtained, and the source site ID and the destination site ID corresponding to the message to be forwarded can be quickly obtained based on IP routing, so that the corresponding forwarding rule can be matched for the key based on the service ID, the source site ID and the destination site ID, thereby realizing accurate matching based on the source site ID and the destination site ID, and greatly enhancing the control capability of the rule.
With reference to a possible implementation manner of the embodiment of the first aspect, the network device is further connected to a controller, and before acquiring the site ID corresponding to the packet to be forwarded, the method further includes: receiving the site ID distributed by the controller for the equipment; and taking the site ID distributed by the controller for the equipment as the routing attribute of a routing protocol, and learning and transmitting between different equipment connected with the equipment, so that other equipment also learns the route carrying the site ID of the equipment. In the embodiment of the application, the site ID distributed by the controller to the device is used as the routing attribute of the routing protocol, and the learning and the transmission are performed between different devices connected with the device, so that other devices also learn the route carrying the site ID of the device, and the implementability and the reliability of the scheme are ensured.
With reference to a possible implementation manner of the embodiment of the first aspect, matching a forwarding rule based on the service ID and the site ID includes: and matching forwarding rules based on the service ID and the site domain corresponding to the site ID. In the embodiment of the application, the forwarding rule matched with the service ID and the site domain corresponding to the site ID is further provided, so that the flexibility of the rule is greatly enhanced.
In a second aspect, an embodiment of the present application further provides a packet forwarding apparatus, which is applied to a network device, where the apparatus includes: the system comprises an acquisition module, a matching module and a forwarding module; the obtaining module is used for obtaining the message to be forwarded; the obtaining module is further configured to obtain a service ID and a site ID corresponding to the packet to be forwarded, where the site ID represents; the matching module is used for searching a forwarding rule matched with the service ID and the site ID, wherein the forwarding rule comprises the corresponding relation between the service ID, the site ID and a forwarding channel; and the forwarding module is used for forwarding the message to be forwarded to a forwarding channel specified by the forwarding rule.
With reference to a possible implementation manner of the second aspect, the site ID represents an ID of a site to which a source network device corresponding to a source IP address in the packet to be forwarded belongs, and the obtaining module is configured to: acquiring a source IP address carried in the message to be forwarded; obtaining a route containing the source IP address by selecting the route of the source IP address; obtaining a source site ID corresponding to the message to be forwarded based on the route; the forwarding rule includes a corresponding relationship between the service ID, the source site ID and the forwarding channel.
With reference to a possible implementation manner of the second aspect, the station ID represents an ID of a station to which a destination network device corresponding to a destination IP address in the message to be forwarded belongs, and the obtaining module is configured to: acquiring a destination IP address carried in the message to be forwarded; obtaining a route containing the destination IP address by selecting the destination IP address; obtaining a destination site ID corresponding to the message to be forwarded based on the route; the forwarding rule includes a corresponding relation between the service ID, the destination site ID and the forwarding channel.
With reference to a possible implementation manner of the second aspect, the site ID represents an ID of a site to which a source network device corresponding to a source IP address and a destination network device corresponding to a destination IP address belong in the packet to be forwarded, and the obtaining module is configured to: acquiring a source IP address and a destination IP address carried in the message to be forwarded; obtaining a route comprising the source IP address and the destination IP address by selecting the source IP address and the destination IP address; obtaining a source site ID and a destination site ID corresponding to the message to be forwarded based on the route; the forwarding rule includes a corresponding relationship between the service ID, the source site ID, the destination site ID and the forwarding channel.
In a third aspect, an embodiment of the present application further provides a network device, including: a memory and a processor, the processor coupled to the memory; the memory is used for storing programs; the processor is configured to invoke a program stored in the memory to perform the method according to the first aspect embodiment and/or any possible implementation manner of the first aspect embodiment.
In a fourth aspect, embodiments of the present application further provide a storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the method provided in the foregoing first aspect and/or any one of the possible implementation manners of the first aspect.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and drawings.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts. The foregoing and other objects, features and advantages of the application will be apparent from the accompanying drawings. Like reference numerals refer to like parts throughout the drawings. The drawings are not intended to be to scale as practical, emphasis instead being placed upon illustrating the subject matter of the present application.
Fig. 1 shows a schematic flow chart of a message forwarding method provided in an embodiment of the present application.
Fig. 2 is a schematic diagram illustrating a principle of a message forwarding method according to an embodiment of the present application.
Fig. 3 shows a block diagram of a message forwarding apparatus according to an embodiment of the present application.
Fig. 4 shows a schematic structural diagram of a network device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, relational terms such as "first," "second," and the like may be used solely in the description herein to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Further, the term "and/or" in the present application is only one kind of association relationship describing the associated object, and means that three kinds of relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone.
In view of the fact that in the existing software-defined wide area network deployment process, a plurality of layers of tunnels are required to be introduced to exert the function of global path planning of the controller. In the embodiment of the application, a message forwarding method based on site ID is provided, which not only can play the advantage of global path planning of a controller, but also can avoid introducing multiple layers of tunnels to reduce equipment performance and influence the deployment scale of a software-defined wide area network. The following describes a packet forwarding method provided in this embodiment with reference to fig. 1.
Step S101: and acquiring the message to be forwarded.
A network device (such as a switch and a router) acquires a packet to be forwarded, where the packet to be forwarded carries a five-tuple, that is, a source port, a source IP address, a destination port, a destination IP address, and a protocol number.
Step S102: and acquiring a service ID and a site ID corresponding to the message to be forwarded.
After the message to be forwarded is obtained, the service ID and the site ID corresponding to the message to be forwarded are further obtained, so that the forwarding rule is matched based on the obtained service ID and the site ID, and the message is forwarded.
Optionally, an implementation manner of obtaining the service ID corresponding to the packet to be forwarded may be that the packet to be forwarded is subjected to service classification and identification, so that the corresponding service ID may be obtained.
The site ID represents an ID of a site to which the source IP address and/or the network device corresponding to the destination IP address in the forwarding message belong, that is, the site ID may be an ID of a site to which the source network device corresponding to the source IP address in the message to be forwarded belongs, that is, a source site ID, and/or an ID of a site to which the destination network device corresponding to the destination IP address in the message to be forwarded belongs, that is, a destination site ID.
Optionally, the process of obtaining the source site ID corresponding to the packet to be forwarded may be: and acquiring a source IP address carried in the message to be forwarded, selecting a route from the source IP address to acquire the route containing the source IP address, and acquiring a source site ID corresponding to the message to be forwarded based on the route.
Optionally, the process of obtaining the destination site ID corresponding to the packet to be forwarded may be: acquiring a destination IP address carried in a message to be forwarded; and selecting a route from the target IP address to obtain a route containing the target IP address, and obtaining a target site ID corresponding to the message to be forwarded based on the route.
Optionally, the process of obtaining the source site ID and the destination site ID corresponding to the packet to be forwarded may be: and acquiring a source IP address and a destination IP address carried in the message to be forwarded, and performing routing on the source IP address and the destination IP address to acquire a route comprising the source IP address and the destination IP address. And obtaining a source site ID and a destination site ID corresponding to the message to be forwarded based on the route.
It should be noted that each site corresponds to a unique ID, and a site is an abstract concept, and may be composed of one network device or a plurality of network devices that perform the same function and location in a network, for example, because a network is generally composed of many small and large networks, such as a bank network is composed of each branch network, a city network, and a provincial network. That is, for a network of network points (also called a branch network), two routers are generally required to be interconnected with an upper network (a city network), so that the two routers of the branch network can form a site (the site IDs of the two devices are configured the same), but they belong to two independent devices (IP addresses are different). Of course, a site may also be a logically isolated object on a device (e.g., referred to as a Virtual Private Network (VPN)).
The controller assigns a unique site ID to each site based on the global network, and issues the ID of each site to the corresponding network device, where the ID cannot be changed except for configuration modification. The site ID is transmitted through a routing protocol, the site ID is carried by the route initiated by the site, and the route carrying the site ID can be learned among different sites of the whole network through the notification and the learning of the routing protocol. That is, before acquiring the site ID corresponding to the packet to be forwarded, the method further includes: the network device receives the site ID distributed by the controller for the device, and the network device uses the site ID distributed by the controller for the device as the routing attribute of the routing protocol, and learns and transfers the site ID between different devices connected with the device, so that other devices learn the route carrying the site ID of the device.
The station ID is transferred between the network devices through a routing Protocol, such as Border Gateway Protocol (BGP) routing Protocol, Interior Gateway Protocol (IGP) routing Protocol, etc. The specific transfer of the station ID is to learn and transfer between different devices by taking the station ID as a routing attribute of a routing protocol, so that the devices complete the learning of the station ID while performing the route learning. Taking BGP routing protocol as an example, the site ID is carried by an extended community attribute of the route, which is a newly added extended community attribute with a new attribute type, and the attribute needs to be transparent and transitive, so as to pass through devices that do not recognize the extended community attribute. And other routing protocols expand and carry the site ID information according to the characteristics of the protocol message of the routing protocol.
Step S103: and searching a forwarding rule matched with the service ID and the site ID, wherein the forwarding rule comprises the corresponding relation between the service ID, the site ID and a forwarding channel.
After the service ID and the site ID corresponding to the message to be forwarded are obtained, a forwarding rule matched with the service ID and the site ID is searched for so as to guide the forwarding of the message. The forwarding rule includes a corresponding relationship between a service ID, a site ID and a forwarding channel, and the forwarding channel can be a direct link or a tunnel; the forwarding rules indicate which paths a certain traffic may take to a certain site to reach.
It should be noted that the forwarding rule is calculated after the controller performs the whole network path planning, and the forwarding rule is issued to the network device to guide the service forwarding of the device. The forwarding rule includes a corresponding relationship between the service ID, the site ID and the forwarding channel. The forwarding rule is managed by taking the service ID and the site ID as keys, each message to be forwarded in the equipment can be matched with the forwarding rule through the keys, and if the matching is successful, the message is forwarded according to the matched forwarding rule, so that the purpose of controlling message forwarding is achieved.
According to the design of the rule key and the site ID, the forwarding rule can provide accurate matching of the source site ID and/or the destination site ID, fuzzy matching of a source site domain or a destination site domain, and neglect matching of a source site or a destination site, and the flexibility and the control capability of the rule are greatly enhanced by various matching strategies. For example, if the site ID represents the ID of the site to which the source network device belongs, which is corresponding to the source IP address in the packet to be forwarded, that is, the source site ID, the forwarding rule includes the correspondence between the service ID, the source site ID, and the forwarding channel; if the ID of the site to which the destination network device belongs, which corresponds to the destination IP address in the forwarding message, is also the destination site ID, the forwarding rule includes a correspondence between the service ID, the destination site ID, and the forwarding channel; if the site ID represents the ID of the site to which the source network device corresponding to the source IP address and the destination network device corresponding to the destination IP address belong in the packet to be forwarded, that is, the ID includes the source site ID and the destination site ID, the forwarding rule includes the correspondence between the service ID, the source site ID, the destination site ID, and the forwarding channel.
The forwarding rule for searching for matching with the service ID and the site ID may also be a forwarding rule for searching for matching with a site domain corresponding to the service ID and the site ID. The site domain is composed of sites with the same role, a plurality of sites with the same role form the site domain, and the plurality of site domains form an SD-WAN network. Alternatively, the site ID may consist of two bytes, in the form of n: m, where n denotes the site domain in the network, m denotes the ID of site m in site domain n, and the number of bits used by each of n and m may be determined by the structure and scale of the network.
For ease of understanding the exact match, fuzzy match, and neglect match referred to above, reference may be made to the following matching rules:
d (n: m), S (n: m) represent the full exact match of the source and destination site IDs;
d (n: m) and S (n: 0) represent the precise matching of the ID of the destination station and the fuzzy matching of the domain of the source station;
only configuring D (n: m) to represent the exact match of the ID of the destination site, and neglecting the source site match;
d (n: 0) and S (n: m) represent fuzzy matching of destination site domains and precise matching of source site IDs;
d (n: 0) and S (n: 0) represent fuzzy matching of a destination site domain and fuzzy matching of a source site domain;
only configuration D (n: 0) represents a fuzzy match for the destination site domain, ignoring the source site match.
The forwarding rules corresponding to different service IDs may be different, and when the forwarding rules are matched, the service ID corresponding to the packet to be forwarded is also combined.
Step S104: and forwarding the message to be forwarded to a forwarding channel specified by the forwarding rule.
After the corresponding forwarding rules are matched based on the service ID and the site ID, the message to be forwarded is forwarded to the forwarding channel specified by the forwarding rules and then is output from the equipment, and the next-hop equipment in the network forms a planned path of the message according to the same hop-by-hop strategy.
In order to facilitate understanding of the message forwarding method provided in the embodiment of the present application, contents related to the message forwarding method, such as a configuration process of a site ID and a forwarding rule, will be described below with reference to fig. 2. Wherein, mainly constitute by two parts from whole angle: a configuration process of the station ID and the forwarding rule and a subsequent forwarding process. The configuration process of the site ID and the forwarding rule is composed of a label 1, a label 2, a label 3 and a label 4 in the figure; the forwarding process consists of label 5, label 6, and label 7. Label 1 in the figure indicates that the controller allocates a unique site ID to each site based on the global network, and issues each site ID to the corresponding device side through the management channel; label 2 in the figure indicates that the network device obtains the site ID and then carries the site ID by the routing attribute of the routing protocol, and learns and transfers the site ID information among different devices, so that the whole network device learns the routing and learns the site ID information at the same time; label 3 in the figure indicates that the station ID information is sent to the forwarding plane for data forwarding; label 4 in the figure indicates that the controller issues a forwarding policy (i.e., a forwarding rule) to the device to guide the service forwarding of the device after performing the full network path planning. A label 5 in the figure indicates that a message to be forwarded enters the device, and the forwarding of the service message is guided by matching a forwarding rule issued by the controller; the site ID information in the forwarding rule is obtained from the routing table by using IP routing through the label 6 in the figure; the label 7 in the figure represents the process of the message to be forwarded exiting the device after applying the forwarding rule.
In the embodiment of the application, by introducing the concept of the sites, the controller can plan the forwarding rules of each site based on the global network when planning the path, and match the corresponding forwarding rules based on the service ID and the site ID corresponding to the message to be forwarded when forwarding the message, so as to forward the message based on the forwarding rules. In the method, the stations are introduced, and a unique station ID is allocated to each station, so that point-to-point path planning can be performed.
The embodiment of the present application further provides a message forwarding apparatus 100 applied in a network device, as shown in fig. 3. The packet forwarding apparatus 100 includes: an acquisition module 110, a matching module 120, and a forwarding module 130.
An obtaining module 110, configured to obtain a packet to be forwarded; the obtaining module is further configured to obtain a service ID and a site ID corresponding to the packet to be forwarded, where the site ID represents. Optionally, the obtaining module 110 is configured to perform service classification and identification on the packet to be forwarded, so as to obtain the service ID.
The site ID represents an ID of a site to which the source network device belongs, where the source network device corresponds to a source IP address in the packet to be forwarded, and the obtaining module 110 is configured to obtain the source IP address carried in the packet to be forwarded; obtaining a route containing the source IP address by selecting the route of the source IP address; obtaining a source site ID corresponding to the message to be forwarded based on the route; the forwarding rule includes a corresponding relationship between the service ID, the source site ID and the forwarding channel.
The site ID represents an ID of a site to which a destination network device corresponding to a destination IP address in the message to be forwarded belongs, and the obtaining module 110 is configured to obtain the destination IP address carried in the message to be forwarded; the destination IP address is selected, a route containing the destination IP address is obtained, and a destination site ID corresponding to the message to be forwarded is obtained based on the route; the forwarding rule includes a corresponding relation between the service ID, the destination site ID and the forwarding channel.
The site ID represents IDs of a site to which a source network device corresponding to a source IP address in the packet to be forwarded and a site to which a destination network device corresponding to a destination IP address belongs, and acquires a site ID corresponding to the packet to be forwarded, where the acquiring module 110 is configured to acquire the source IP address and the destination IP address carried in the packet to be forwarded; obtaining a route comprising the source IP address and the destination IP address by selecting the source IP address and the destination IP address; obtaining a source site ID and a destination site ID corresponding to the message to be forwarded based on the route; the forwarding rule includes a corresponding relationship between the service ID, the source site ID, the destination site ID and the forwarding channel.
The matching module 120 is configured to search a forwarding rule matched with the service ID and the site ID, where the forwarding rule includes a correspondence between the service ID, the site ID, and a forwarding channel. Optionally, the matching module 120 is configured to search for a forwarding rule matched with the service ID and a site domain corresponding to the site ID.
A forwarding module 130, configured to forward the packet to be forwarded to the forwarding channel specified by the forwarding rule.
The network device is further connected to a controller, and the apparatus 100 further includes a learning module, configured to receive a site ID distributed by the controller for the device before the obtaining module 110 obtains the site ID corresponding to the packet to be forwarded; and taking the site ID distributed by the controller for the equipment as the routing attribute of a routing protocol, and learning and transmitting between different equipment connected with the equipment, so that other equipment also learns the route carrying the site ID of the equipment.
The message forwarding apparatus 100 provided in the embodiment of the present application has the same implementation principle and technical effect as those of the foregoing method embodiments, and for brief description, reference may be made to corresponding contents in the foregoing method embodiments for parts that are not mentioned in the apparatus embodiments.
As shown in fig. 4, fig. 4 is a block diagram illustrating a network device 200 for establishing an SD-WAN network according to an embodiment of the present application. The network device 200 includes: a transceiver 210, a memory 220, a communication bus 230, and a processor 240.
The elements of the transceiver 210, the memory 220, and the processor 240 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, the components may be electrically coupled to each other via one or more communication buses 230 or signal lines. The transceiver 210 is used for transceiving configuration messages. The memory 220 is used for storing a computer program, such as a software functional module shown in fig. 4, that is, the message forwarding apparatus 100. The message forwarding apparatus 100 includes at least one software functional module, which may be stored in the memory 220 in the form of software or firmware (firmware) or fixed in an Operating System (OS) of the network device 200. The processor 240 is configured to execute an executable module stored in the memory 220, such as a software functional module or a computer program included in the message forwarding apparatus 100. For example, the processor 240 is configured to obtain a packet to be forwarded; acquiring a service ID and a site ID corresponding to the message to be forwarded, wherein the site ID represents an ID of a site to which source network equipment corresponding to a source IP address in the message to be forwarded belongs, and/or an ID of a site to which destination network equipment corresponding to a destination IP address in the message to be forwarded belongs; searching a forwarding rule matched with the service ID and the site ID, wherein the forwarding rule comprises a corresponding relation between the service ID, the site ID and a forwarding channel; and forwarding the message to be forwarded to a forwarding channel specified by the forwarding rule.
The Memory 220 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processor 240 may be an integrated circuit chip having signal processing capabilities. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor 240 may be any conventional processor or the like.
The network device 200 includes, but is not limited to, a switch, a router, and the like.
The embodiment of the present application further provides a non-volatile computer-readable storage medium (hereinafter, referred to as a storage medium), where a computer program is stored on the storage medium, and when the computer program is run by the network device 200, the message forwarding method is executed.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. 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 some 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, functional modules in the embodiments of the present application 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 application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a notebook computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application 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 application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A message forwarding method is applied to a network device, and the method comprises the following steps:
acquiring a message to be forwarded;
acquiring a service ID and a site ID corresponding to the message to be forwarded, wherein the site ID represents an ID of a site to which source network equipment corresponding to a source IP address in the message to be forwarded belongs, and/or an ID of a site to which destination network equipment corresponding to a destination IP address in the message to be forwarded belongs;
searching a forwarding rule matched with the service ID and the site ID, wherein the forwarding rule comprises a corresponding relation between the service ID, the site ID and a forwarding channel;
and forwarding the message to be forwarded to a forwarding channel specified by the forwarding rule.
2. The method according to claim 1, wherein obtaining the service ID corresponding to the packet to be forwarded comprises:
and carrying out service classification identification on the message to be forwarded to obtain the service ID.
3. The method according to claim 1, wherein the step of the site ID representing an ID of a site to which a source network device corresponding to a source IP address in the packet to be forwarded belongs, and acquiring the site ID corresponding to the packet to be forwarded comprises:
acquiring a source IP address carried in the message to be forwarded;
obtaining a route containing the source IP address by selecting the route of the source IP address;
obtaining a source site ID corresponding to the message to be forwarded based on the route; the forwarding rule includes a corresponding relationship between the service ID, the source site ID and the forwarding channel.
4. The method according to claim 1, wherein the step of the site ID representing an ID of a site to which a destination network device corresponding to a destination IP address in the message to be forwarded belongs, and acquiring the site ID corresponding to the message to be forwarded includes:
acquiring a destination IP address carried in the message to be forwarded;
obtaining a route containing the destination IP address by selecting the destination IP address;
obtaining a destination site ID corresponding to the message to be forwarded based on the route; the forwarding rule comprises a corresponding relation between a service ID, a destination site ID and a forwarding channel; alternatively, the first and second electrodes may be,
the step of the site ID representing the ID of the site to which the source network device corresponding to the source IP address in the packet to be forwarded and the destination network device corresponding to the destination IP address belong, and acquiring the site ID corresponding to the packet to be forwarded includes:
acquiring a source IP address and a destination IP address carried in the message to be forwarded;
obtaining a route comprising the source IP address and the destination IP address by selecting the source IP address and the destination IP address;
obtaining a source site ID and a destination site ID corresponding to the message to be forwarded based on the route; the forwarding rule includes a corresponding relationship between the service ID, the source site ID, the destination site ID and the forwarding channel.
5. The method according to claim 3 or 4, wherein the network device is further connected to a controller, and before acquiring the site ID corresponding to the packet to be forwarded, the method further includes:
receiving the site ID distributed by the controller for the equipment;
and taking the site ID distributed by the controller for the equipment as the routing attribute of a routing protocol, and learning and transmitting between different equipment connected with the equipment, so that other equipment also learns the route carrying the site ID of the equipment.
6. A message forwarding apparatus, applied to a network device, the apparatus comprising:
the obtaining module is used for obtaining the message to be forwarded;
the obtaining module is further configured to obtain a service ID and a site ID corresponding to the to-be-forwarded message, where the site ID represents an ID of a site to which source network equipment corresponding to a source IP address in the to-be-forwarded message belongs, and/or an ID of a site to which destination network equipment corresponding to a destination IP address in the to-be-forwarded message belongs;
the matching module is used for searching a forwarding rule matched with the service ID and the site ID, wherein the forwarding rule comprises the corresponding relation between the service ID, the site ID and a forwarding channel;
and the forwarding module is used for forwarding the message to be forwarded to a forwarding channel specified by the forwarding rule.
7. The apparatus according to claim 6, wherein the site ID represents an ID of a site to which a source network device corresponding to a source IP address in the packet to be forwarded belongs, and the obtaining module is configured to:
acquiring a source IP address carried in the message to be forwarded;
obtaining a route containing the source IP address by selecting the route of the source IP address;
obtaining a source site ID corresponding to the message to be forwarded based on the route; the forwarding rule includes a corresponding relationship between the service ID, the source site ID and the forwarding channel.
8. The apparatus according to claim 6, wherein the site ID represents an ID of a site to which a destination network device corresponding to a destination IP address in the message to be forwarded belongs, and the obtaining module is configured to:
acquiring a destination IP address carried in the message to be forwarded;
obtaining a route containing the destination IP address by selecting the destination IP address;
obtaining a destination site ID corresponding to the message to be forwarded based on the route; the forwarding rule comprises a corresponding relation between a service ID, a destination site ID and a forwarding channel; alternatively, the first and second electrodes may be,
the site ID represents an ID of a site to which a source network device corresponding to a source IP address in the packet to be forwarded and a destination network device corresponding to a destination IP address belong, and the obtaining module is configured to:
acquiring a source IP address and a destination IP address carried in the message to be forwarded;
obtaining a route comprising the source IP address and the destination IP address by selecting the source IP address and the destination IP address;
obtaining a source site ID and a destination site ID corresponding to the message to be forwarded based on the route; the forwarding rule includes a corresponding relationship between the service ID, the source site ID, the destination site ID and the forwarding channel.
9. A network device, comprising:
a memory and a processor, the processor coupled to the memory;
the memory is used for storing programs;
the processor to invoke a program stored in the memory to perform the method of any of claims 1-5.
10. A storage medium having stored thereon a computer program which, when executed by a processor, performs the method according to any one of claims 1-5.
CN202011297590.0A 2020-11-18 2020-11-18 Message forwarding method, device, network equipment and storage medium Active CN112291151B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011297590.0A CN112291151B (en) 2020-11-18 2020-11-18 Message forwarding method, device, network equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011297590.0A CN112291151B (en) 2020-11-18 2020-11-18 Message forwarding method, device, network equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112291151A true CN112291151A (en) 2021-01-29
CN112291151B CN112291151B (en) 2022-07-12

Family

ID=74398269

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011297590.0A Active CN112291151B (en) 2020-11-18 2020-11-18 Message forwarding method, device, network equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112291151B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113518104A (en) * 2021-03-11 2021-10-19 网宿科技股份有限公司 Data message processing method, transfer equipment and system
CN114124964A (en) * 2022-01-24 2022-03-01 阿里云计算有限公司 Communication system, channel scheduling method, device and storage medium
CN114844830A (en) * 2022-07-05 2022-08-02 南凌科技股份有限公司 SD-WAN-based site traffic forwarding method, device and storage medium
CN115426314A (en) * 2022-08-08 2022-12-02 中国电信股份有限公司 Communication method, communication device, network equipment and processor readable storage medium

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090073919A1 (en) * 2004-07-30 2009-03-19 Xiaobao Chen Telecommunications apparatus and method
CN101491008A (en) * 2006-07-07 2009-07-22 日本电气株式会社 Station, setting information managing device, wireless communication system, setting information obtaining method, computer-readable medium
US20090299939A1 (en) * 2008-05-30 2009-12-03 International Business Machines Corporation Distributed Rule Processing for Ubiquitous Computing Environments
CN102404353A (en) * 2010-09-09 2012-04-04 上海缘降信息技术有限公司 Terminal content releasing method and system thereof
CN103124236A (en) * 2013-02-27 2013-05-29 迈普通信技术股份有限公司 Method and device for managing routes and tags
CN103312547A (en) * 2013-06-18 2013-09-18 华为技术有限公司 Communication method, communication device and communication system
CN103685006A (en) * 2012-08-30 2014-03-26 杭州华三通信技术有限公司 Packet forwarding method for edge device and edge device
CN103795630A (en) * 2014-01-15 2014-05-14 杭州华三通信技术有限公司 Message transmitting method and device of label switching network
CN104009919A (en) * 2013-02-25 2014-08-27 杭州华三通信技术有限公司 Message forwarding method and device
CN104168184A (en) * 2013-05-17 2014-11-26 杭州华三通信技术有限公司 Message forwarding method and device
US20150213096A1 (en) * 2014-01-29 2015-07-30 Lexmark International Technology Sa Systems and Methods for Searching Content from Multiple Sources
CN105142189A (en) * 2015-08-11 2015-12-09 深圳市华讯方舟科技有限公司 Method and device for roaming control of site
CN105743762A (en) * 2016-03-25 2016-07-06 迈普通信技术股份有限公司 Message forwarding method and equipment in VPLS network
CN106105380A (en) * 2014-03-05 2016-11-09 华为技术有限公司 Control method, system, controller and the access device that data forward
CN108111413A (en) * 2016-11-25 2018-06-01 中国电信股份有限公司 Method for routing, system and the equipment of stacking network
CN110417653A (en) * 2019-07-29 2019-11-05 迈普通信技术股份有限公司 Message forwarding method, device and message transmission control method, device
CN110753010A (en) * 2019-10-22 2020-02-04 新华三信息安全技术有限公司 Message forwarding method and device
CN111817959A (en) * 2020-07-16 2020-10-23 迈普通信技术股份有限公司 Network path management method and device, SDN controller and readable storage medium
CN111884903A (en) * 2020-07-15 2020-11-03 迈普通信技术股份有限公司 Service isolation method and device, SDN network system and routing equipment

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090073919A1 (en) * 2004-07-30 2009-03-19 Xiaobao Chen Telecommunications apparatus and method
CN101491008A (en) * 2006-07-07 2009-07-22 日本电气株式会社 Station, setting information managing device, wireless communication system, setting information obtaining method, computer-readable medium
US20090299939A1 (en) * 2008-05-30 2009-12-03 International Business Machines Corporation Distributed Rule Processing for Ubiquitous Computing Environments
CN102404353A (en) * 2010-09-09 2012-04-04 上海缘降信息技术有限公司 Terminal content releasing method and system thereof
CN103685006A (en) * 2012-08-30 2014-03-26 杭州华三通信技术有限公司 Packet forwarding method for edge device and edge device
CN104009919A (en) * 2013-02-25 2014-08-27 杭州华三通信技术有限公司 Message forwarding method and device
CN103124236A (en) * 2013-02-27 2013-05-29 迈普通信技术股份有限公司 Method and device for managing routes and tags
CN104168184A (en) * 2013-05-17 2014-11-26 杭州华三通信技术有限公司 Message forwarding method and device
CN103312547A (en) * 2013-06-18 2013-09-18 华为技术有限公司 Communication method, communication device and communication system
CN103795630A (en) * 2014-01-15 2014-05-14 杭州华三通信技术有限公司 Message transmitting method and device of label switching network
US20150213096A1 (en) * 2014-01-29 2015-07-30 Lexmark International Technology Sa Systems and Methods for Searching Content from Multiple Sources
CN106105380A (en) * 2014-03-05 2016-11-09 华为技术有限公司 Control method, system, controller and the access device that data forward
CN105142189A (en) * 2015-08-11 2015-12-09 深圳市华讯方舟科技有限公司 Method and device for roaming control of site
CN105743762A (en) * 2016-03-25 2016-07-06 迈普通信技术股份有限公司 Message forwarding method and equipment in VPLS network
CN108111413A (en) * 2016-11-25 2018-06-01 中国电信股份有限公司 Method for routing, system and the equipment of stacking network
CN110417653A (en) * 2019-07-29 2019-11-05 迈普通信技术股份有限公司 Message forwarding method, device and message transmission control method, device
CN110753010A (en) * 2019-10-22 2020-02-04 新华三信息安全技术有限公司 Message forwarding method and device
CN111884903A (en) * 2020-07-15 2020-11-03 迈普通信技术股份有限公司 Service isolation method and device, SDN network system and routing equipment
CN111817959A (en) * 2020-07-16 2020-10-23 迈普通信技术股份有限公司 Network path management method and device, SDN controller and readable storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
ZHENXIA ZHANG: "A Novel Mobility Management Scheme for IEEE 802.11-Based Wireless Mesh Networks", 《IEEE XPLORE》 *
张博文: "基于信息安全度的域间角色权限映射机制", 《百度文库》 *
张昊: "宽带电力线通信系统数据链路层协议仿真与性能研究", 《CNKI中国硕士论文全文数据库》 *
阳辉: "基于语义Web服务的模糊匹配", 《百度文库》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113518104A (en) * 2021-03-11 2021-10-19 网宿科技股份有限公司 Data message processing method, transfer equipment and system
CN114124964A (en) * 2022-01-24 2022-03-01 阿里云计算有限公司 Communication system, channel scheduling method, device and storage medium
CN114124964B (en) * 2022-01-24 2022-06-24 阿里云计算有限公司 Communication system, channel scheduling method, device and storage medium
CN114844830A (en) * 2022-07-05 2022-08-02 南凌科技股份有限公司 SD-WAN-based site traffic forwarding method, device and storage medium
CN115426314A (en) * 2022-08-08 2022-12-02 中国电信股份有限公司 Communication method, communication device, network equipment and processor readable storage medium
CN115426314B (en) * 2022-08-08 2024-05-14 中国电信股份有限公司 Communication method, communication device, network equipment and processor readable storage medium

Also Published As

Publication number Publication date
CN112291151B (en) 2022-07-12

Similar Documents

Publication Publication Date Title
CN112291151B (en) Message forwarding method, device, network equipment and storage medium
CN101902451B (en) Summarization and longest-prefix match within MPLS networks
US7564803B1 (en) Point to multi-point label switched paths with label distribution protocol
US7580359B2 (en) Method and system for maximizing network capacity utilization in multiprotocol label switched networks by moving label switched paths
CN106664252A (en) Method, device and system for realizing service link
EP3697038B1 (en) Support for multiple virtual networks over an underlay network topology
CN111130980B (en) Method and apparatus for implementing a combined virtual private network VPN
CN107733795B (en) Ethernet virtual private network EVPN and public network intercommunication method and device
CN111817869B (en) Network configuration recovery method and related equipment thereof
WO2017124709A1 (en) Method of establishing traffic engineering tunnel and device
US7936668B2 (en) Methods and apparatus for distributing label information
KR101460048B1 (en) Method and apparatus for control of dynamic service chaining by using tagging
CN109729019B (en) Speed limiting method and device for special line service in EVPN (Ethernet virtual private network) networking
US20230300070A1 (en) Packet Sending Method, Device, and System
EP1753176A1 (en) A method for realizing route transmitting in the network
CN103117925A (en) Processing method and processing device for data message forward
CN110519163A (en) Detect outlet of the loop network midpoint to multipoint label switch paths
EP3582454B1 (en) Graceful restart procedures for label switched paths with label stacks
CN113411244A (en) Cross-domain QoS (quality of service) adjusting method and device
CN111464443B (en) Message forwarding method, device, equipment and storage medium based on service function chain
WO2018010576A1 (en) Path establishment method and device, and network node
CN107294849B (en) Method, device and system for establishing service path
CN108966039A (en) A kind of method of multicasting and equipment
CN111865805B (en) Multicast GRE message processing method and system
CN110545240A (en) Method for establishing label forwarding table and forwarding message based on distributed aggregation system

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