CN113794643A - Flow forwarding method and node equipment - Google Patents
Flow forwarding method and node equipment Download PDFInfo
- Publication number
- CN113794643A CN113794643A CN202111017102.0A CN202111017102A CN113794643A CN 113794643 A CN113794643 A CN 113794643A CN 202111017102 A CN202111017102 A CN 202111017102A CN 113794643 A CN113794643 A CN 113794643A
- Authority
- CN
- China
- Prior art keywords
- address information
- tunnel
- address
- traffic
- reaching
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 25
- 238000013507 mapping Methods 0.000 claims abstract description 43
- 238000010586 diagram Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4633—Interconnection of networks using encapsulation techniques, e.g. tunneling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/34—Source routing
Abstract
The present specification provides a traffic forwarding method and a node device, where the method includes: receiving traffic to be forwarded, acquiring a target destination address of the traffic to be forwarded, acquiring a target tunnel from a mapping relation between address information and the tunnel according to the target destination address, and sending the traffic to be forwarded through the target tunnel. By the method, the node equipment can automatically establish the mapping relation between the tunnel and the destination address and match the tunnel with the corresponding forwarding tunnel according to the traffic to be forwarded, thereby avoiding manual tunnel configuration.
Description
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a traffic forwarding method and a node device.
Background
SR (Segment Routing) adopts a source path selection mechanism, encapsulates in advance a SID (Segment Identifier) to be assigned by a path passing through a node at a source node, and when a packet passes through an SR node, the node forwards the packet according to the SID of the packet. Other nodes than the source node need not maintain path state. MPLS SR (Segment Routing with MPLS, MPLS Segment Routing) refers to forwarding a packet using SR and a label as SID in an MPLS network.
As shown in fig. 1, a establishes 4 tunnels, two of which point to B, 1 to C, and 1 to D.
If there are 6 addresses in fig. 1 that need to be added with traffic, according to the connected nodes, the traffic is added from a, the traffic enters from PORT1, and the combination with policy routing will configure policy routing configuration on PORT1, and configure ACL according to the destination address, so that different destination addresses walk different tunnels. As in the case of multiple addresses in the above figure, it is necessary to specify an address and walk a tunnel. If the address quantity is huge, the configuration is complicated and the maintenance is inconvenient
Disclosure of Invention
The present disclosure provides a traffic forwarding method and a node device, by which the node device can automatically establish a mapping relationship between a tunnel and a destination address, and match a corresponding forwarding tunnel according to traffic to be forwarded, thereby avoiding manual tunnel configuration.
The embodiment of the disclosure provides a method for forwarding traffic, which is applied to node equipment and comprises the following steps:
receiving traffic to be forwarded and acquiring a target destination address of the traffic to be forwarded;
acquiring a target tunnel from the mapping relation between the address information and the tunnel according to the target destination address;
and sending the traffic to be forwarded through the target tunnel.
The method for acquiring the mapping relation between the destination address and the tunnel comprises the following steps:
receiving address information sent by each next hop node;
selecting a tunnel reaching each address information according to the link attribute of each address information, and establishing a mapping relation between the selected tunnel and the address information;
wherein the link attributes include: link overhead information or hop count values.
Optionally, the selecting a tunnel reaching each address information according to the link attribute of each address information, and establishing a mapping relationship between the selected tunnel and the address information includes:
generating an SPF tree according to the address information sent by each next hop node;
acquiring overhead information of each address according to the generated SPF tree;
and selecting a tunnel reaching each address information according to the overhead information, and establishing a mapping relation between the selected tunnel and the address information.
Optionally, the selecting a tunnel to reach each address information according to the overhead information includes:
and determining the nearest tunnel reaching each address information according to the overhead information, and establishing a mapping relation between each address information and the corresponding nearest tunnel.
Optionally, the determining, according to the overhead information, a closest tunnel to each address information includes:
and determining the nearest tunnel reaching each address information according to the overhead information according to the mapping relation between the SPF spanning tree and the LSDB.
Optionally, the selecting a tunnel reaching each address information according to the link attribute of each address information, and establishing a mapping relationship between the selected tunnel and the address information includes:
acquiring hop values reaching each address information;
and determining the nearest tunnel reaching each address information according to the hop value, and establishing the mapping relation between each address information and the corresponding nearest tunnel.
By the method, the node equipment can establish the mapping relation between the target address and the forwarding tunnel, and when the node equipment receives the traffic to be forwarded, the node equipment can match the corresponding forwarding tunnel according to the target address of the traffic to be forwarded and forward the traffic, so that the complicated work of manually configuring forwarding ACL in the node equipment is avoided.
An embodiment of the present disclosure further provides a node device, where the node device includes:
the receiving module is used for receiving the traffic to be forwarded and acquiring a target destination address of the traffic to be forwarded;
the acquisition module is used for acquiring a target tunnel from the mapping relation between the address information and the tunnel according to the target destination address;
and the forwarding module is used for sending the flow to be forwarded through the target tunnel.
The acquisition module is further configured to receive address information sent by each next hop node, select a tunnel reaching each address information according to a link attribute of each address information, and establish a mapping relationship between the selected tunnel and the address information;
wherein the link attributes include: link overhead information or hop count values.
The acquisition module is specifically configured to generate an SPF tree according to address information sent by each next hop node, obtain overhead information reaching each address information according to the generated SPF tree, select a tunnel reaching each address information according to the overhead information, and establish a mapping relationship between the selected tunnel and the address information.
The obtaining module is specifically configured to obtain a hop value to reach each address information, determine a nearest tunnel to reach each address information according to the hop value, and establish a mapping relationship between each address information and the corresponding nearest tunnel.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present specification and together with the description, serve to explain the principles of the specification.
Fig. 1 is a schematic diagram of a network architecture according to an embodiment of the present disclosure.
Fig. 2 is a schematic flow chart of a traffic forwarding method according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the specification, as detailed in the appended claims.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present specification. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The embodiment of the present disclosure provides a method for forwarding traffic, where the method is applied to a node device, where the node device may be a router, a switch, a server (supporting a virtual routing device), and the like deployed in a network, and as shown in fig. 2, the method includes:
s201, receiving traffic to be forwarded, and acquiring a target destination address of the traffic to be forwarded;
s202, according to the target destination address, acquiring a target tunnel from the mapping relation between the address information and the tunnel;
s203, the traffic to be forwarded is sent through the target tunnel.
In this embodiment, the node device may be a head node device or an intermediate node device, and the node device may receive traffic to be forwarded through a traffic ingress interface and obtain a target destination address of the traffic to be forwarded.
In step S202, the mapping relationship between the address information and the tunnel may be stored in a mapping relationship table, and when the node Device is disposed in the network, the node Device may receive the address information transmitted by other node devices (downstream node devices), as shown in fig. 1, when the scheme in the present embodiment is applied to the node Device a, the node Device a may receive the address information 31.1.1.1 and 41.2.1.1 transmitted by the node Device B, the address information 41.1.1.1 and 51.2.1.1 transmitted by the node Device C, and the address information 51.1.1.1 and 31.2.1.1 transmitted by the node Device D.
After receiving the address information sent by other node devices, the node Device (Device a) may select a tunnel reaching each address information according to its own link attribute reaching other destination addresses, where the link attribute may include link overhead information and hop value. (wherein each address information can be published via dynamic IGP routing protocols)
In general, a node device may select a tunnel with the lowest link overhead or the lowest hop count to reach certain address information as a tunnel mapped with the certain address information.
For example, after the node device receives each address information, an SPF tree may be generated (an SPF algorithm calculates a distance from each router to each destination router using each router as a root, each router calculates a topology structure diagram of a routing domain according to a unified database, the structure diagram is similar to a tree and is called a shortest path tree in the SPF algorithm), overhead information reaching each address information is obtained through the SPF tree, a tunnel reaching each address information is selected according to the overhead information, and a mapping relationship is established.
For example, as shown in fig. 1, when the node Device a receives the address 31.1.1.1, it can be known that the tunnel1 is closest to 31.1.1.1 (the overhead is lowest) according to the SPF tree, and at this time, a mapping relationship between 31.1.1.1 and tunnel1 can be established, and according to this way, a mapping relationship between each address information and its corresponding tunnel can be automatically established on the Device a.
And when the subsequent Device A receives the traffic to be forwarded, matching the mapping relation between the tunnel and the address information by using the destination address of the traffic to be forwarded to acquire the corresponding tunnel, and forwarding the traffic to be forwarded by using the acquired tunnel.
It can be seen from the above embodiments that the node device can obtain the link attribute of each address message through the address messages sent by other node devices, and establish the mapping relationship between each address message and the tunnel according to the link attribute, and when the traffic needs to be forwarded, the corresponding tunnel can be directly selected from the mapping relationship according to the destination address of the traffic to forward the traffic, thereby avoiding setting an ACL entry in the node device manually, and simplifying manual operation.
Based on the foregoing method embodiment, an embodiment of the present disclosure further provides a node device, where the node device may be a router, a switch, a server, and the like, and the node device includes:
the receiving module is used for receiving the traffic to be forwarded and acquiring a target destination address of the traffic to be forwarded;
the acquisition module is used for acquiring a target tunnel from the mapping relation between the address information and the tunnel according to the target destination address;
and the forwarding module is used for sending the flow to be forwarded through the target tunnel.
The acquiring module is further configured to receive address information sent by each next hop node, select a tunnel reaching each address information according to a link attribute of each address information, and establish a mapping relationship between the selected tunnel and the address information, where the link attribute includes: link overhead information or hop count values.
The acquiring module is specifically configured to generate an SPF tree according to address information sent by each next hop node, obtain overhead information reaching each address information according to the generated SPF tree, select a tunnel reaching each address information according to the overhead information, and establish a mapping relationship between the selected tunnel and the address information.
The obtaining module is specifically configured to obtain a hop count value for reaching each address information, determine a nearest tunnel for reaching each address information according to the hop count value, and establish a mapping relationship between each address information and the corresponding nearest tunnel
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Other embodiments of the present description will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the specification following, in general, the principles of the specification and including such departures from the present disclosure as come within known or customary practice within the art to which the specification pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
It will be understood that the present description is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
The above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.
Claims (10)
1. A method for forwarding traffic, the method being applied to a node device, the method comprising:
receiving traffic to be forwarded and acquiring a target destination address of the traffic to be forwarded;
acquiring a target tunnel from the mapping relation between the address information and the tunnel according to the target destination address;
and sending the traffic to be forwarded through the target tunnel.
2. The method of claim 1, wherein the step of obtaining the mapping relationship between the destination address and the tunnel comprises:
receiving address information sent by each next hop node;
selecting a tunnel reaching each address information according to the link attribute of each address information, and establishing a mapping relation between the selected tunnel and the address information;
wherein the link attributes include: link overhead information or hop count values.
3. The method according to claim 2, wherein the selecting a tunnel to each address information according to the link attribute of each address information and establishing a mapping relationship between the selected tunnel and the address information comprises:
generating an SPF tree according to the address information sent by each next hop node;
acquiring overhead information of each address according to the generated SPF tree;
and selecting a tunnel reaching each address information according to the overhead information, and establishing a mapping relation between the selected tunnel and the address information.
4. The method of claim 3, wherein selecting the tunnel to reach each address information according to the overhead information comprises:
and determining the nearest tunnel reaching each address information according to the overhead information, and establishing a mapping relation between each address information and the corresponding nearest tunnel.
5. The method according to claim 4, wherein the determining a nearest tunnel to each address information according to the overhead information specifically comprises:
and determining the nearest tunnel reaching each address information according to the overhead information according to the mapping relation between the SPF spanning tree and the LSDB.
6. The method according to claim 2, wherein the selecting a tunnel to each address information according to the link attribute of each address information and establishing a mapping relationship between the selected tunnel and the address information comprises:
acquiring hop values reaching each address information;
and determining the nearest tunnel reaching each address information according to the hop value, and establishing the mapping relation between each address information and the corresponding nearest tunnel.
7. A node apparatus, characterized in that the node apparatus comprises:
the receiving module is used for receiving the traffic to be forwarded and acquiring a target destination address of the traffic to be forwarded;
the acquisition module is used for acquiring a target tunnel from the mapping relation between the address information and the tunnel according to the target destination address;
and the forwarding module is used for sending the flow to be forwarded through the target tunnel.
8. The node apparatus of claim 7,
the acquisition module is further configured to receive address information sent by each next hop node, select a tunnel reaching each address information according to a link attribute of each address information, and establish a mapping relationship between the selected tunnel and the address information;
wherein the link attributes include: link overhead information or hop count values.
9. The node apparatus of claim 8,
the acquisition module is specifically configured to generate an SPF tree according to address information sent by each next hop node, obtain overhead information reaching each address information according to the generated SPF tree, select a tunnel reaching each address information according to the overhead information, and establish a mapping relationship between the selected tunnel and the address information.
10. The node apparatus of claim 8,
the obtaining module is specifically configured to obtain a hop value to reach each address information, determine a nearest tunnel to reach each address information according to the hop value, and establish a mapping relationship between each address information and the corresponding nearest tunnel.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111017102.0A CN113794643A (en) | 2021-08-31 | 2021-08-31 | Flow forwarding method and node equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111017102.0A CN113794643A (en) | 2021-08-31 | 2021-08-31 | Flow forwarding method and node equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113794643A true CN113794643A (en) | 2021-12-14 |
Family
ID=79182488
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111017102.0A Pending CN113794643A (en) | 2021-08-31 | 2021-08-31 | Flow forwarding method and node equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113794643A (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101984595A (en) * | 2010-11-03 | 2011-03-09 | 北京星网锐捷网络技术有限公司 | Method, system and device for building trans-regional flow engineering tunnel |
CN104022936A (en) * | 2014-06-20 | 2014-09-03 | 杭州华三通信技术有限公司 | Method and device for establishing tunnel |
CN104683210A (en) * | 2015-03-10 | 2015-06-03 | 杭州华三通信技术有限公司 | Automatic tunnel establishing method and device |
US20170163536A1 (en) * | 2015-12-02 | 2017-06-08 | Nicira, Inc. | Load balancing over multiple tunnel endpoints |
CN108768856A (en) * | 2018-05-31 | 2018-11-06 | 新华三技术有限公司 | A kind of route processing method and device |
CN109039918A (en) * | 2018-10-30 | 2018-12-18 | 新华三技术有限公司 | A kind of file transmitting method and device |
CN111917625A (en) * | 2020-07-17 | 2020-11-10 | 中盈优创资讯科技有限公司 | Method, device and nodes for realizing difference from VXLAN service to SR domain |
CN112702253A (en) * | 2020-12-11 | 2021-04-23 | 邦彦技术股份有限公司 | MPLS tunnel creating method, system and storage medium based on network link quality |
-
2021
- 2021-08-31 CN CN202111017102.0A patent/CN113794643A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101984595A (en) * | 2010-11-03 | 2011-03-09 | 北京星网锐捷网络技术有限公司 | Method, system and device for building trans-regional flow engineering tunnel |
CN104022936A (en) * | 2014-06-20 | 2014-09-03 | 杭州华三通信技术有限公司 | Method and device for establishing tunnel |
CN104683210A (en) * | 2015-03-10 | 2015-06-03 | 杭州华三通信技术有限公司 | Automatic tunnel establishing method and device |
US20170163536A1 (en) * | 2015-12-02 | 2017-06-08 | Nicira, Inc. | Load balancing over multiple tunnel endpoints |
CN108768856A (en) * | 2018-05-31 | 2018-11-06 | 新华三技术有限公司 | A kind of route processing method and device |
CN109039918A (en) * | 2018-10-30 | 2018-12-18 | 新华三技术有限公司 | A kind of file transmitting method and device |
CN111917625A (en) * | 2020-07-17 | 2020-11-10 | 中盈优创资讯科技有限公司 | Method, device and nodes for realizing difference from VXLAN service to SR domain |
CN112702253A (en) * | 2020-12-11 | 2021-04-23 | 邦彦技术股份有限公司 | MPLS tunnel creating method, system and storage medium based on network link quality |
Non-Patent Citations (1)
Title |
---|
秦丰林等: "基于P2P的IPv6虚拟网络构造", 《计算机工程》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11831526B2 (en) | Service chain fault detection method and apparatus | |
US10021023B2 (en) | Packet forwarding method, controller, forwarding device, and network system | |
CN107925613B (en) | Method, device and system for forwarding message in Service Function Chain (SFC) | |
US11943136B2 (en) | Advanced preferred path route graph features in a network | |
US8724494B2 (en) | Network multi-path discovery | |
US9525619B2 (en) | Scalable edge node protection using segment routing | |
WO2017016254A1 (en) | Ipv6 message encapsulation processing method and apparatus | |
CN112118182B (en) | IP path tunnel for traffic engineering | |
CN108259341B (en) | Prefix label distribution method and SDN controller | |
CN106487686B (en) | SR forwarding entry generation method and device | |
US11632322B2 (en) | Preferred path route graphs in a network | |
CN108429680B (en) | Route configuration method, system, medium and equipment based on virtual private cloud | |
US20230078123A1 (en) | Method for Forwarding Packet in SRV6 Service Function Chain and SF Device | |
CN113411258B (en) | Message processing method and device | |
CN110324159B (en) | Link configuration method, controller and storage medium | |
US11362954B2 (en) | Tunneling inter-domain stateless internet protocol multicast packets | |
EP3054634A1 (en) | Scheme for performing one-pass tunnel forwarding function on two-layer network structure | |
CN111837368B (en) | Advertising and programming of preferred path routing using interior gateway protocols | |
CN108667709B (en) | Message forwarding method and device | |
US20150288595A1 (en) | Control apparatus, communication system, control information creation method, and program | |
CN105530185A (en) | Overlay routing network, routing method based on overlay routing network, and router | |
CN109039903B (en) | Route determining method, device and machine-readable storage medium | |
CN113794643A (en) | Flow forwarding method and node equipment | |
CN110391984B (en) | Message forwarding method and device | |
CN113542126A (en) | Generalized SRv6 full-path compression method and device |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20211214 |