WO2017198131A1 - 用于重定向数据流的方法和系统、网络设备和控制设备 - Google Patents

用于重定向数据流的方法和系统、网络设备和控制设备 Download PDF

Info

Publication number
WO2017198131A1
WO2017198131A1 PCT/CN2017/084373 CN2017084373W WO2017198131A1 WO 2017198131 A1 WO2017198131 A1 WO 2017198131A1 CN 2017084373 W CN2017084373 W CN 2017084373W WO 2017198131 A1 WO2017198131 A1 WO 2017198131A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
network device
next hop
forwarding
routing
Prior art date
Application number
PCT/CN2017/084373
Other languages
English (en)
French (fr)
Inventor
王海波
庄顺万
饶远
曹瑞卿
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP17798694.0A priority Critical patent/EP3447976B1/en
Priority to EP22196755.7A priority patent/EP4161025A1/en
Publication of WO2017198131A1 publication Critical patent/WO2017198131A1/zh
Priority to US16/195,103 priority patent/US10715430B2/en
Priority to US16/904,129 priority patent/US11855887B2/en

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/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/033Topology update or discovery by updating distance vector protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/38Flow based routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/122Avoiding congestion; Recovering from congestion by diverting traffic away from congested entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/18End to end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2483Traffic characterised by specific attributes, e.g. priority or QoS involving identification of individual flows
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/64Routing or path finding of packets in data switching networks using an overlay routing layer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/329Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the application layer [OSI layer 7]

Definitions

  • the present invention relates to the field of communications and, more particularly, to a method and system for redirecting a data stream, a network device, and a control device.
  • the forwarding device can be a network device such as a router or a switch.
  • the control device can be used to control traffic of the network, and the forwarding device is used to receive data.
  • the packet is forwarded.
  • the forwarding device may query a Forwarding Information Base (FIB) according to the destination Internet Protocol (IP) address of the received data packet, and according to the forwarding table in the FIB table that matches the destination IP address.
  • IP Internet Protocol
  • a flow rule forwarding table including at least one flow specification rule may be set on the forwarding device, where the flow rule may include a flow matching condition and an action taken for the matched flow, and the flow matching condition may include Destination IP address, source IP address, destination port, etc. This action can include dropping, redirecting to a specific port, and so on.
  • the forwarding device may first query the flow rule forwarding table when receiving the data packet.
  • the FIB can continue to be queried to determine the outbound interface of the packet.
  • the control device may send the flow rule to the router, where the flow rule indicates that the next hop of the specific flow is redirected to another forwarding device, and after the forwarding device receives the flow rule delivered by the control device, the forwarding device may The flow rule is added to the flow rule forwarding table of the forwarding device, and the flow matching rule is performed according to the flow rule forwarding table.
  • the space of the flow rule forwarding table is generally small, which limits the number of streams that the forwarding device can adjust.
  • the embodiments of the present invention provide a method and a system for redirecting a data stream, and a network device and a control device, which can overcome the prior art that the number of data streams that can be adjusted is small due to limited space of the flow rule forwarding table. defect.
  • a first aspect provides a method for redirecting a data stream, including: receiving, by a network device, a control message sent by a control device, where the control message carries redirection routing information and a redirect routing indication of the data stream, where the data stream is
  • the redirect routing information includes destination address information of the data stream and redirected next hop information of the network device, where the redirect routing indication is used to indicate that the redirect routing information of the data stream is converted into a forwarding table in the target forwarding table.
  • the table space of the target forwarding table is larger than the table space of the flow rule forwarding table of the network device; the network device is determined according to the Indicates to the route, and converts the redirected routing information of the data flow into a forwarding entry in the target forwarding table.
  • the redirected next hop information of the network device may be used to represent the information of the BGP next hop corresponding to the network device on the routing path after the redirecting of the data flow.
  • the BGP next hop corresponding to the network device may be directly or indirectly connected to the network device.
  • the redirected next hop information of the network device may include an IP address of the redirected next hop (ie, the BGP next hop) of the network device.
  • the method for redirecting a data stream is provided by the embodiment of the present invention.
  • the control device sends a control message to the network device by using the control device, where the control message carries redirection routing information and a redirection route indication of the data flow, where the redirection route indication is used.
  • the forwarding entry wherein the table space of the target forwarding table is larger than the table space of the flow rule forwarding table, and can overcome the prior art that the network device receives the redirect routing information of the data flow to the flow rule forwarding table.
  • the flow rules forward the limitations of the size of the table, thereby increasing the number of data streams that the system can adjust.
  • the target forwarding table is a FIB table.
  • control message is a BGP FlowSpec message.
  • the redirection route indication includes a conversion indication and a conversion description; the conversion indication is used to indicate that the redirection routing information of the data stream is converted; the conversion description is used to The conversion process is to convert the redirected routing information of the data stream into a forwarding entry in the forwarding table.
  • the forwarding entry converted by the redirect routing information of the data stream includes: the destination address information corresponding to The destination address and the information of the next hop corresponding to the redirected next hop information.
  • the redirect routing indication further includes a conversion manner indicating that the redirected next hop information is converted to the information of the forwarding next hop.
  • the redirect routing indication is further used to indicate a conversion manner of converting the redirected next hop information to information for forwarding the next hop.
  • the redirect routing indication may include a conversion mode indication, where the conversion mode indication is used to indicate a conversion manner of converting the redirected next hop information to forwarding the next hop information.
  • the redirection route indication indicates the redirected next hop information
  • the method for converting the information of the next hop to the forwarding includes: querying the routing information table of the network device, converting the redirected next hop information to the information of forwarding the next hop; or querying the network device by querying
  • the flow rule routing table converts the redirected next hop information to the information of forwarding the next hop; or first queries the flow rule routing table of the network device, and the redirect does not exist in the flow rule routing table When the routing entry matching the information is matched, the routing information table of the network device is queried, and the redirected next hop information is converted to the information of the forwarding next hop.
  • a traffic action field in an extended community attribute of the BGP FlowSpec message is used to carry the conversion indication.
  • the traffic action field in the extended community attribute may be used to carry the transition indication, where optionally, the transition indication may occupy one bit in the traffic action field.
  • control message is A BGP FlowSpec message
  • the community field in the broad community attribute of the BGP FlowSpec message is used to carry the translation description.
  • the broad community attribute in the BGP FlowSpec message includes a parameter type length value TLV, where the parameter TLV includes The TLV is marked, and the TLV is used to indicate a conversion manner of converting the redirected next hop information into information for forwarding the next hop.
  • the parameter TLV of the tag type may be included, and the parameter TLV of the tag type is used to carry the indication of the conversion mode in the redirect route indication.
  • the network device converts the redirect routing information of the data flow into a forwarding table in the target forwarding table.
  • the item includes: the network device determines a destination address corresponding to the destination address information of the data stream; the network device converts the redirected next hop information of the network device into information for forwarding the next hop; the network device will be used by the destination device A forwarding entry consisting of the address and the information of the forwarded next hop is added to the target forwarding table of the network device.
  • the MP_REACH_NLRI field of the BGP FlowSpec message is used to carry destination address information of the data flow.
  • the network device may obtain the destination address information of the data flow from the MP_REACH_NLRI field of the BGP FlowSpec message, and determine the destination address corresponding to the destination address information as the destination address in the translated forwarding entry.
  • the prefix field in the MP_REACH_NLRI field includes only the destination prefix type.
  • the extended community attribute of the BGP FlowSpec message may include a Redirect to IP field, where the Redirect to IP field may be used to carry the redirected next hop information of the network device.
  • the network device may obtain the redirected next hop information of the network device from the Redirect to IP field of the extended community attribute, and determine the information of the forwarded next hop corresponding to the obtained redirected next hop information. And determining the determined forwarding next hop information as the information of forwarding the next hop in the converted conversion entry.
  • the redirecting route indication is further used to indicate a conversion manner of converting the redirected next hop information to the information of forwarding the next hop, and the network device may perform the conversion manner indicated by the redirect routing indication, The method of converting the redirected next hop information to the information for forwarding the next hop.
  • the network device may query the routing information table to determine whether a routing entry matching the redirected next hop information exists in the routing information table, and determine, according to the matched routing entry, the forwarding next Jump information.
  • the network device may query the flow rule routing table to determine whether a routing entry matching the redirected next hop information exists in the routing rule routing table, and determine the forwarding according to the matched routing entry. The next hop information.
  • the network device may first query the flow rule routing table of the network device to determine whether a routing entry matching the redirected next hop information exists in the flow rule routing table. If the routing entry matching the redirected next hop information does not exist in the routing rule routing table, the network device may query the routing information table of the network device to convert the redirected next hop information to the forwarding The next hop information.
  • the information of forwarding the next hop may include the IP address of the forwarding next hop and/or the corresponding outbound interface of the forwarding next hop on the network device, and the like.
  • the network device adds, to the network device, a forwarding entry that is determined by the determined destination address and the information of the forwarded next hop.
  • Goal turn The method includes: if the target forwarding entry including the destination address exists in the target forwarding table of the network device, the network device replaces the information of the forwarding next hop in the target forwarding entry with the redirected next hop information Corresponding forwarding information of the next hop; and/or if the target forwarding entry including the destination address does not exist in the target forwarding table of the network device, the network device creates the determined destination address in the target forwarding table and Forwards the forwarding entry consisting of the information of the next hop.
  • the method before the network device receives the control message sent by the control device, the method further includes: the network device sending the first capability to the control device The first capability information is used to indicate that the network device has the capability of receiving the redirected route indication; the network device receives the second capability information sent by the control device, where the second capability information is used to indicate that the control device has the sending The network device receives the control message sent by the control device, and the network device receives the control message sent by the control device according to the first capability information.
  • the network device sends the first capability information to the control device, where the network device sends the first BGP OPEN message to the control device,
  • the first BGP OPEN message carries the first capability information.
  • the network device receives the second capability information sent by the control device, where the network device receives the second BGP OPEN message sent by the control device, and the second BGP OPEN The message carries the second capability information.
  • the method further includes: setting a priority of the forwarding entry converted by the redirect routing information of the data flow to a highest priority.
  • a method for redirecting a data stream including: the control device determines redirection routing information of the data stream, where the redirection routing information of the data stream includes destination address information of the data stream and a target network Redirecting next hop information of the device; the control device sends a control message to the target network device, where the control message carries redirect routing information and a redirect routing indication of the data flow, where the redirect routing indication is used to indicate the data
  • the redirected routing information of the flow is converted into a forwarding entry in the target forwarding table, where the tablespace of the target forwarding table is larger than the tablespace of the flow rule forwarding table of the target network device.
  • the target forwarding table is a FIB table.
  • control message is a BGP FlowSpec message.
  • the redirect routing indication includes a transition indication and a conversion description; the transition indication is used to indicate that the redirect routing information of the data stream is converted; the conversion description is used to The conversion process is to convert the redirected routing information of the data stream into a forwarding entry in the forwarding table.
  • the forwarding entry converted by the redirect routing information of the data stream includes: the destination address information corresponding to The destination address and the information of the next hop corresponding to the redirected next hop information.
  • the redirect routing indication further includes a conversion manner indicating that the redirected next hop information is converted to the information of the forwarding next hop.
  • the redirect routing indication is further used to indicate a conversion manner of converting the redirected next hop information to information for forwarding the next hop.
  • the redirect routing indication may include a conversion mode indication, where the conversion mode indication is used to indicate a conversion manner of converting the redirected next hop information to forwarding the next hop information.
  • the redirection route indication indicates the redirected next hop information Switch to the turn
  • the method for converting the information of the next hop includes: querying the routing information table of the network device, converting the redirected next hop information to the information of forwarding the next hop; or querying the flow rule routing of the network device a table, the redirected next hop information is converted to the information of the forwarding next hop; or the flow rule routing table of the network device is first queried, and the redirected next hop information does not exist in the flow rule routing table.
  • the routing entry is queried, the routing information table of the network device is queried, and the redirected next hop information is converted to the information of the forwarding next hop.
  • the traffic action field in the extended community attribute of the BGP FlowSpec message is used to carry the conversion indication.
  • the traffic action field in the extended community attribute may be used to carry the transition indication, where optionally, the transition indication may occupy one bit in the traffic action field.
  • control message is a BGP FlowSpec message
  • the community field in the broad community attribute of the BGP FlowSpec message is used to carry the conversion description.
  • the broad community attribute in the BGP FlowSpec message includes a parameter type length value TLV, where the parameter TLV includes The TLV is marked, and the TLV is used to indicate a conversion manner of converting the redirected next hop information into information for forwarding the next hop.
  • the MP_REACH_NLRI field of the BGP FlowSpec message is used to carry destination address information of the data flow.
  • the extended community attribute of the BGP FlowSpec message may include a Redirect to IP field, where the Redirect to IP field may be used to carry the redirected next hop information of the network device.
  • the method before the control device sends the control message to the target network device, the method further includes: receiving, by the control device, the target network device First capability information, the first capability information is used to indicate that the network device has the capability of receiving the redirect routing indication; the control device sends second capability information to the target network device, where the second capability information is used to indicate the control The device has the capability of sending the redirected route indication; the control device sends a control message to the target network device, including: the control device sends the control message to the target network device according to the received first capability information.
  • the control device receives, by the control device, the first capability information that is sent by the target network device, a BGP OPEN message, the first BGP OPEN message carries the first capability information, and the control device sends the second capability information to the target network device, where the control device sends a second BGP OPEN message to the target network device, where The second BGP OPEN message carries the second capability information.
  • a network device for performing the method of the first aspect or any of the possible implementations of the first aspect.
  • a control device for performing the method of any of the possible implementations of the second aspect or the second aspect.
  • another network device comprising: a storage unit for storing instructions for executing instructions stored in the memory, and a processor for executing the instructions stored by the memory The execution causes the processor to perform the method of the first aspect or any possible implementation of the first aspect.
  • control apparatus comprising: a storage unit for storing instructions for executing instructions stored in the memory, and a processor for executing the instructions stored by the memory The execution causes the processor to perform the method of the second aspect or any possible implementation of the second aspect.
  • a seventh aspect a computer readable medium for storing a computer program, the computer program comprising instructions for performing the method of the first aspect or any of the possible implementations of the first aspect.
  • a ninth aspect a system for redirecting a data stream, comprising the network device of any of the foregoing third aspect or the third aspect, and any one of the fourth aspect or the fourth aspect A control device in a possible implementation; or the system includes the network device in any one of the possible implementations of the fifth or fifth aspect, and any possible implementation of the sixth or sixth aspect Control device in the middle.
  • FIG. 1 is a schematic structural diagram of a system according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a method for redirecting a data flow according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram showing an example format of a traffic action field of a BGP Flowspec message in a method for redirecting a data flow according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram showing an example format of a broad community attribute of a BGP Flowspec message in a method for redirecting a data flow according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram showing an example format of an RPD capability field of a BGP OPEN message in a method for redirecting a data flow according to an embodiment of the present disclosure
  • FIG. 6 is a schematic block diagram of a network device according to an embodiment of the present invention.
  • FIG. 7 is a schematic block diagram of a control device according to an embodiment of the present invention.
  • FIG. 8 is a schematic block diagram of a network device according to another embodiment of the present invention.
  • FIG. 9 is a schematic block diagram of a control device according to another embodiment of the present invention.
  • FIG. 10 is a schematic block diagram of a system for redirecting a data flow according to an embodiment of the present invention.
  • FIG. 1 exemplarily shows an SDN 100 to which an embodiment of the present invention is applied.
  • the network 100 includes a traffic analysis device 110, a control device 120, and a plurality of routers 130.
  • the traffic analysis device 110 is configured to collect traffic information of the network.
  • the traffic analysis device 110 may be specifically uTraffic.
  • the control device 120 can be configured to perform flow control of the network based on the traffic information from the traffic analysis device 110.
  • the control device 120 can be specifically an intelligent network.
  • the network controller (SNC) but the embodiment of the present invention is not limited thereto.
  • Router 130 can be used to forward data streams.
  • FIG. 1 exemplarily shows six routers: R1 to R6, where R1 to R4 belong to an autonomous system (AS) 1, and R5 belongs to an Internet Service Provider (ISP) 1 AS2, R6 belong to AS3 served by ISP 2, it should be understood that FIG. 1 exemplarily shows only one control device and six routers, which may include any other number of control devices and routers, embodiments of the present invention There is no limit to this.
  • AS autonomous system
  • ISP Internet Service Provider
  • R1 to D may have two paths of X and Y, wherein path X sequentially passes through R1, R2, and R5, and path Y follows Via R1, R2 and R6.
  • path X sequentially passes through R1, R2, and R5
  • path Y follows Via R1, R2 and R6.
  • the route priority of X is higher than Y
  • R2 receives a packet with a destination address of D from R1
  • path X is preferred to forward the packet.
  • the bandwidth used to connect X and Y is limited. Excessive traffic may cause X's link load to be heavy. In this case, some traffic that needs to flow through X needs to be adjusted to the path. Y.
  • control device 120 may utilize the traffic information from the traffic analysis device 110 to obtain an adjusted path of the specific flow that needs to be adjusted and an adjusted border gateway protocol corresponding to one or more routers on the path of the specific flow. (Border Gateway Protocol, BGP) information about the next hop.
  • BGP Border Gateway Protocol
  • the control device 120 may send the traffic rule to the relevant router, and specify the adjusted BGP next hop corresponding to the router in the traffic rule, but the embodiment of the present invention is not limited thereto.
  • the router may store the flow rule to the flow rule forwarding table of the router, and forward the received data stream that satisfies the flow rule according to the flow rule forwarding table. Perform redirection processing.
  • the flow forwarding table of the existing forwarding device has a small table space, generally 32kB, 64kB, and 96kB, etc., thereby limiting the number of data streams that the forwarding device can adjust.
  • the network device may refer to a traditional router, a switch, and the like in a traditional Path Computation Element (PCE) network, or may be a router in the SDN based on control forwarding and separation.
  • PCE Path Computation Element
  • the routing and forwarding device, such as a switch, is not limited in this embodiment of the present invention.
  • FIG. 2 exemplarily illustrates a method 200 for redirecting a data stream provided by an embodiment of the present invention.
  • the method 200 can be applied to the SDN 100 as shown in FIG. 1, but the embodiment of the present invention is not limited thereto.
  • the control device determines redirection routing information of the data flow to be redirected.
  • control device may be specifically an SNC, but the embodiment of the present invention does not limit this.
  • the control device can obtain the traffic information of the network, for example, obtain the traffic information from the traffic analysis device, and determine the data flow that needs to be redirected and the redirect routing information of the data flow according to the obtained traffic information. For example, in the example shown in FIG. 1, when the control device finds that the current load of the link from R2 to R5 is heavy according to the traffic information, it can be determined that some data streams on the links of R2 to R5 are adjusted to other The link, for example, adjusts the routing path of a particular data stream from X to Y.
  • the redirection routing information of the data stream may include information of a redirection path (ie, an adjusted routing path) of the data stream, and is used for performing redirection processing on the data stream.
  • the redirection routing information of the data stream may include destination address information of the data stream and redirected next hop information of the target network device, where the destination address information of the data stream may include a destination Internet protocol of the data stream. (Internet Protocol, IP) address, etc.
  • IP Internet Protocol
  • the redirected next hop information of the target network device may indicate information of the redirected next hop corresponding to the target network device, for example, the IP address of the redirected next hop, etc.
  • the redirected next hop corresponding to the target network device may be specifically the BGP next hop corresponding to the target network device on the adjusted routing path of the data flow, and the corresponding network device corresponding to the hop
  • the next hop may be directly or indirectly connected to the target network device, and may be the same or different AS as the target network device, which is not limited in this embodiment of the present invention.
  • the target network device may be a network device on the routing path of the data stream, and when redirecting the data stream, the next hop of the target network device needs to be adjusted.
  • the target network device may be specifically in the foregoing example. R2.
  • the number of the target network devices may be one or more, and if the number of the target network devices is multiple, each of the plurality of target network devices may correspond to different redirects.
  • the next hop correspondingly, the control device may determine the redirected next hop information corresponding to each of the plurality of target network devices, but the embodiment of the present invention is not limited thereto.
  • the redirection routing information of the data stream may further include other information, which is not limited in this embodiment of the present invention.
  • the control device sends a control message to the target network device, where the control message may include redirection routing information and a redirect routing indication of the data flow, where the redirect routing indication is used to redirect the data flow.
  • the information is converted into a forwarding entry in the target forwarding table, where the table space of the target forwarding table is larger than the table space of the flow rule forwarding table of the target network device.
  • control message may be specifically a BGP flow rule (FlowSpec) message or other type of message, but the embodiment of the present invention is not limited thereto.
  • FlowSpec BGP flow rule
  • the control device may send a control message to each of the plurality of target network devices, where the control message is sent to each target network device.
  • the redirected next hop information of the data stream carried in the data stream may include the destination address information of the data stream and the redirected next hop information of the target network device, but the embodiment of the present invention is not limited thereto.
  • the redirect routing indication may include a conversion indication and a conversion description, wherein the conversion indication is used to indicate that the redirect routing information of the data stream is converted, and the conversion description may be used to explain or interpret the conversion.
  • This action is processed.
  • the conversion description is used to indicate that the conversion process specifically converts the redirect routing information of the data stream into a forwarding entry in the target forwarding table.
  • the conversion description is used to specifically limit the conversion process indicated by the conversion indication to: converting to a forwarding entry in the target forwarding table, but the embodiment of the present invention is not limited thereto.
  • the redirect routing indication may be used to indicate that the target network device converts the redirect routing information of the data flow into a forwarding entry in the target forwarding table, where the target forwarding table may be used by the target network device to receive the data flow.
  • the forwarding process is performed.
  • the target forwarding table may be specifically a FIB, but the embodiment of the present invention is not limited thereto.
  • the target network device receives the control message sent by the control device, and converts the redirect routing information of the data flow into a forwarding entry in the target forwarding table according to the control message.
  • the target network device may specifically convert the redirect routing information of the data flow to the forwarding in the target forwarding table according to the conversion indication and the conversion description. Publish the item.
  • the target forwarding table of the target network device may include at least one forwarding entry, where, optionally, each forwarding entry may include a destination address and information for forwarding the next hop, for example, the forwarding next hop is in the target network.
  • the manner in which the target network device converts the redirected routing information of the data flow into the forwarding entry in the target forwarding table may be predefined or pre-configured by the control device. Or the control device The manner in which the target network device converts the redirected routing information of the data flow into a forwarding entry in the target forwarding table may be indicated in the control message.
  • the target network device converts the redirected routing information of the data flow into a forwarding entry in the target forwarding table.
  • the target network device uses the destination address corresponding to the destination address information of the data stream as the destination address in the translated forwarding entry, and the target network device converts the redirected next hop information of the target network device into forwarding.
  • One-hop information, and the information of forwarding the next hop is used as information for forwarding the next hop in the converted forwarding entry.
  • the manner in which the target network device converts the redirected next hop information of the target network device into the information for forwarding the next hop may be predefined or pre-configured by the control device.
  • the control device may indicate, in the control message, a conversion manner in which the target network device converts the redirected next hop information of the target network device into information for forwarding the next hop.
  • the redirect routing indication is further used to indicate a conversion manner of converting the redirected next hop information of the target network device to the information of forwarding the next hop.
  • the target network device may convert the redirected next hop information of the target network device into the information of forwarding the next hop according to the conversion manner indicated by the redirect routing indication, but the embodiment of the present invention is not limited thereto.
  • the redirect routing indication may further include a conversion mode indication, where the conversion mode indication may be used to indicate that the redirected next hop information of the target network device is converted into information for forwarding the next hop.
  • the conversion mode indication may be used to indicate that the redirected next hop information of the target network device is converted into information for forwarding the next hop.
  • the target network device may convert the redirected next hop information of the target network device into the information of forwarding the next hop by using any one of the following conversion modes:
  • the RIB may belong to the control plane of the target network device.
  • the RIB may specifically include a routing table generated by the target network device according to BGP, and may also include a VPN route generated by the target network device according to an Interior Gateway Protocol (IGP) or a virtual private network (VPN) protocol.
  • IGP Interior Gateway Protocol
  • VPN virtual private network
  • the target network device may determine whether a routing entry matching the redirected next hop information exists in the RIB, and determine, according to the information in the matched routing entry, the redirected next hop information.
  • the information of the next hop is forwarded, but the embodiment of the present invention is not limited thereto.
  • the flow rule routing table may be specifically a routing table including a flow rule, and may optionally belong to a control plane of the target network device. Specifically, the target network device may determine whether a routing entry matching the redirected next hop information exists in the flow rule routing table, and determine the redirected next hop according to the information in the matched routing entry. The information corresponding to the next hop is forwarded by the information, but the embodiment of the present invention is not limited thereto.
  • the target network device may first determine whether there is a routing entry in the flow rule routing table that matches the redirected next hop information of the target network device. If there is a matching routing entry, the target network device may be based on the The information in the assigned routing entry determines the information of the forwarding next hop corresponding to the redirected next hop information of the target network device. If there is no matching routing entry in the flow rule routing table, the target network device may query the RIB table to determine whether there is a routing entry in the RIB that matches the redirected next hop information of the target network device.
  • embodiments of the invention are not limited thereto.
  • control message may be used by the target network device to convert the redirected next hop information of the target network device into the information of forwarding the next hop by using any one of the foregoing three manners. This is not limited.
  • the BGP FlowSpec message may include a Traffic Action field, for example, an Extended Community attribute in the BGP FlowSpec message includes the traffic action field.
  • the traffic action field can be used to carry the conversion indication.
  • the traffic action field may include 48 bits, and FIG. 3 shows the format of the last byte of the traffic action field (including the last 8 bits of bits 40 to 47), where the bit 47 is used to indicate a terminal action (Terminal Action), and the bit 46 is used to indicate a sample action.
  • the switch instruction may also be referred to as a Route Policy Distribution (RPD), which may occupy the flow action field. Any one or more of bits 0 to 45. In the example shown in FIG. 3, the bit 45 in the flow action field is used to indicate the RPD action. At this time, the bit 0 to the bit 44 in the flow action field may be reserved, but the embodiment of the present invention is This is not limited.
  • the BGP FlowSpec message may further include a Wide Community attribute, and the conversion description may be carried in the wide community attribute.
  • the broad community attribute may include a community field, which may indicate downloading to the FIB (Download FIB), that is, indicating that the conversion process is specifically used to weight the data stream.
  • the directional routing information is downloaded to the FIB.
  • the community field is set to 0x90000001, it indicates that the download is to the FIB, or may also correspond to other values, specifically by the Internet Number Assignment Office (Internet).
  • the Assigned Number Authority (IANA) registry is not limited in this embodiment of the present invention.
  • the broad community attribute may also be used to carry the conversion mode indication.
  • the broad community attribute may be included in a Container Type field, a Hop Count field, a length field, a Community field, a Source AS Number field, and a context AS.
  • a Context AS Number field and a Parameter(s) Type Length Value (TLV) field wherein the hop value field is used to indicate the extent to which the broad attribute is propagated, for example, the hop value field is set to 0 is used to indicate that the router requesting the message does not propagate the wide community, the community field is used to define the action that the target network device needs to perform, and the source AS number field is used to indicate the AS number of the community, context AS The number field indicates the AS context used to interpret the community.
  • the parameter TLV field includes a type field, a length field, and a value field.
  • the embodiment of the present invention defines a new type of parameter TLV, that is, a Flags TLV, and the type of the tag TLV (Type The domain can be used to carry the type number of the tag TLV.
  • the tag TLV has a type number of 40, and the actual type number can be assigned and maintained by the IANA registry, and the present invention is implemented. This example does not limit this.
  • the length (Length) field of the tag TLV may be used to indicate the length of the tag TLV or the length of the value field used to indicate the tag TLV, and the value field of the tag TLV may be used to indicate the target network device
  • the manner in which the redirected next hop information is converted into the information of the next hop is forwarded, that is, the manner of indicating the information of the next hop to be forwarded corresponding to the redirected next hop information of the target network device.
  • the broad community attribute of the BGP FlowSpec message may always set the tag TLV. If the value of the value field of the tag TLV is set to 1, the router may be instructed to query the flow rule routing table. The redirected next hop information of the target network device is converted into the information of forwarding the next hop, and if the value of the value field of the marked TLV is set to 0, it may indicate that the target network device is heavy by querying the common routing table. The directional next hop information is converted into information for forwarding the next hop. As an alternative example, if the value of the value field of the tag TLV is set to 2 in decimal (the corresponding binary is 10), it can be used to indicate that the common routing table is queried by first querying the flow rule routing table.
  • the redirected next hop information of the target network device is converted into information for forwarding the next hop.
  • the tag TLV occupies 4 bytes, but the embodiment of the present invention is not limited thereto.
  • the tag TLV may not always be set in the BGP FlowSpec message. At this time, if the tag TLV is set in the extensive community attribute of the BGP FlowSpec message, it may be instructed to convert the redirected next hop information of the target network device into the information of forwarding the next hop by querying the flow rule routing table; and if BGP If the tag TLV is not set in the wide community attribute of the flow spec message, the redirected next hop information of the target network device may be converted into the information of forwarding the next hop by querying the common routing table.
  • the BGP FlowSpec message may include a Multiprotocol Reachable Network Layer Reachability Information (NLRI), MP_REACH_NLRI field, and the MP_REACH_NLRI field may be used to carry the data.
  • MP_REACH_NLRI may belong to a path attribute, and optionally, an MP_REACH_NLRI field may be included in an Extended Community attribute of the BGP FlowSpec message.
  • the MP_REACH_NLRI attribute may be composed of one or more triplets ⁇ address family information, next hop information, network reachability information>. Accordingly, the MP_REACH_NLRI field may include an address family information field and a next hop.
  • the Next Hop Network Address Information field and the NLRI domain wherein, optionally, the address family information field may include a 2-byte Address Family Identifier and a 1-byte sub-address family identifier (Subsequent) Address Family Identifier (SAFI), AFI can be used to identify the network layer protocol, SAFI can be used to identify the type of NLRI; the next hop network address information field can include the next hop network address; the NLRI domain can include the length field, the label field, and a prefix field, where the prefix field may correspond to different matching conditions, such as a destination address, a source address, a destination port, a source port, a message length, and the like.
  • SAFI Subsequent Address Family Identifier
  • the prefix field may include only Destination address, a matching condition, for example, the prefix field includes only type 1, and accordingly, the target network device can
  • the prefix field in the MP_REACH_NLRI field of the BGP FlowSpec message obtains the destination address of the data stream, and the obtained destination address is used as the destination address in the translated forwarding entry, but the embodiment of the present invention does not limit this.
  • the extended community attribute in the BGP FlowSpec message may further include a redirect to IP (Redirect to IP) field, where the redirect to IP field may include a target address field,
  • the target address field can be used to carry the redirected next hop information of the target network device.
  • the target network device may obtain the redirected next hop information of the target network device from the target address field in the IP field, but the embodiment of the present invention is not limited thereto.
  • the target network device determines the destination address of the data stream and the information of the forwarding next hop of the data stream corresponding to the target network device
  • the destination address of the data stream may correspond to the target network device.
  • the forwarding entry composed of the information of the next hop of the data stream is added to the target forwarding table.
  • the target network device may determine whether there is a forwarding entry in the target forwarding table that matches a destination address of the data flow; if the target A forwarding entry matching the destination address of the data flow exists in the target forwarding table of the network device, that is, the forwarding entry including the destination address of the data flow exists in the target forwarding table, and the target network device can match the target
  • the information of the forwarding next hop in the forwarding entry is replaced with the information of the forwarding next hop of the data stream corresponding to the target network device.
  • the router may replace the outbound interface in the matching forwarding entry with the target. The outbound interface corresponding to the next hop of the data stream corresponding to the network device.
  • the target network device may create a new forwarding entry in the target forwarding table, where the new forwarding
  • the publication item includes the destination address of the data stream and the information of the forwarding next hop of the data stream corresponding to the target network device, but the embodiment of the present invention is not limited thereto.
  • the method 200 may further include S240:
  • the target network device When receiving the data packet corresponding to the destination address information of the data stream, the target network device forwards the data packet according to the converted forwarding entry in the target forwarding table.
  • the target network device may forward the data packet according to the information of forwarding the next hop in the converted forwarding entry.
  • the target network device may also set the priority of the forwarding entry converted by the redirect routing information of the data flow to the highest priority.
  • the target network device may also set the priority of the forwarding entry converted by the redirect routing information of the data flow to the highest priority.
  • the BGP or the IGP in the public network also learns the route with the same destination address as the destination address of the data stream, the forwarding entry converted by the redirected routing information of the data flow may be used as the optimal forwarding table.
  • the item is sent to the target forwarding table, which is not limited by the embodiment of the present invention.
  • control device may further perform capability negotiation with the target network device to confirm whether the other party supports the redirect routing indication, for example, to confirm whether the other party has the RPD capability.
  • the method 200 can also include S250 and S260.
  • the target network device may send, to the control device, first capability information, where the first capability information is used to indicate that the target network device has the capability of receiving and processing a redirect route indication, that is, having a redirect route for the data flow.
  • the ability to convert information into forwarding entries in the target forwarding table, for example, the target network device has the ability to receive RPDs.
  • the target network device may carry the first capability information in an BGP start (OPEN) message.
  • the capability code (Capability Code) of the redirect route indication may be set to 129
  • the capability value (Capability Value) field indicated by the redirect route may include an AFI domain, an ASFI domain, and a send/receive (SEND/).
  • RECEIVE RECEIVE
  • the AFI field can occupy 2 bytes, its value can be set to 1, the ASFI field can occupy 1 byte, and its value can be set to 133
  • Send/Receive The domain can occupy 1 byte and is used to indicate what kind of RPD capability the local device supports.
  • the Send/Receive field is set to Send, for example, if the value is set to 2, it can indicate that the redirect route can be generated.
  • the indication that is, the ability to generate a control message carrying the redirected route indication, assuming that the Send/Receive field is set to Receive, for example, its value is set to 1, which may indicate that the local machine can receive and process the redirected route indication, that is, has the identification
  • the capability of the control message carrying the redirected route indication is processed, but the embodiment of the present invention does not limit this.
  • control device sends second capability information to the target network device, where the second capability information is used to indicate that the control device has the capability of sending a redirect route indication.
  • control device may carry the second capability information in the BGP OPEN message.
  • BGP OPEN message For the specific format of the BGP OPEN message, refer to the description above. For brevity, details are not described herein again.
  • control device may determine, according to the received first capability information, that the target network device has a support connection. Receive the ability to redirect the route indication and send the above control message to the router.
  • the method for redirecting a data stream sends a control message to the target network device by using the control device, where the control message carries redirection routing information and a redirection route indication of the data stream, where the redirection
  • the routing indication is used to indicate that the target network device converts the redirected routing information of the data flow into a forwarding entry in the target forwarding table, and the target network device converts the redirected routing information of the data flow into A forwarding entry in the target forwarding table, where the table space of the target forwarding table is larger than the table space of the flow rule forwarding table, which can overcome the prior art that the target network device adds the redirected routing information of the data flow to the
  • the flow rule forwards the table and is subject to the limitation of the size of the flow rule forwarding table, thereby increasing the number of streams that the system can adjust.
  • the embodiment of the present invention converts the redirection routing information of the data stream into a forwarding entry in the target forwarding table of the network device, where the table space of the target forwarding table is larger than the table space of the flow rule forwarding table. It can improve the number of data streams that the system can adjust, thus improving the load balancing effect of the system.
  • the routing path of the data stream with the destination address D needs to be adjusted from X to Y.
  • the control device is an SNC and the traffic analysis device is uTraffic, but the embodiment of the present invention is not limited thereto.
  • the SNC can establish a BGP neighbor with the routers 1 to 6 (ie, R1 to R6 in FIG. 1) of the forwarding plane.
  • the SNC can send an OPEN message to each router, where the OPEN message carries the second capability.
  • the information, the second capability information indicates that the SNC has the capability of generating and sending a redirection route indication (ie, the SEND capability), and correspondingly, each router can send an OPEN message to the SNC, where the first capability information is carried, the first capability.
  • the information indicates that the router has the ability to receive and process redirected route indications (ie, Receive capability).
  • the SNC can generate a traffic adjustment result according to the destination address of the data stream that needs to be adjusted and the next hop R6.
  • the traffic shaping policy is: for the data flow whose destination address is D, the next hop is redirected from R5 to R6.
  • the SNC may send a BGP FlowSpec message to the R2, where the BGP FlowSpec message carries the redirected routing information with the redirected routing indication, to instruct the R2 to convert the redirected routing information into a forwarding entry in the target forwarding table, where optionally
  • the prefix field in the MP_REACH_NLRI field in the BGP FlowSpec message may include only a destination prefix (Destination Prefix), and an R flag (ie, a transition indication) is set in the traffic action field, and the BGP FlowSpec message may carry a Wide Community. Attribute, the Community field in this attribute can indicate DOWNLOAD FIB, and FLAG is set to iterate the public network unicast routing table.
  • the R2 may add the forwarding entry corresponding to the redirected routing information in the BGP FlowSpec message to the target forwarding table according to the redirect routing indication carried in the BGP FlowSpec message. Specifically, R2 may iterate the redirected next hop R6 in the BGP FlowSpec message to the forwarding next hop of R2 and the real outgoing interface, and then forward the forwarding entry consisting of the destination address (ie, D) and the forwarding next hop. Issued to the target forwarding table.
  • R2 may forcibly optimize the foregoing Redirects the forwarding entry for routing information conversion.
  • R2 may forward the user stream to R6 according to the forwarding entry converted by the redirect routing information in the target forwarding table.
  • the forwarding path of the R2 needs to be adjusted as an example.
  • the multiple routers may The forwarding path is adjusted in a similar manner to the R2, which is not limited in this embodiment of the present invention.
  • FIG. 1 and FIG. 3 to FIG. 5 are intended to help those skilled in the art to better understand the embodiments of the present invention and not to limit the scope of the embodiments of the present invention. It will be obvious to those skilled in the art that various modifications and changes can be made in accordance with the examples of FIG. 1 and FIG. 3 to FIG. 5, and such modifications or variations are also within the scope of the embodiments of the present invention.
  • a method for redirecting a data stream according to an embodiment of the present invention is described in detail above with reference to FIG. 1 to FIG. 5.
  • a network device, a control device, and a use according to an embodiment of the present invention will be described with reference to FIG. 6 to FIG. A system that redirects data streams.
  • FIG. 6 exemplarily shows a network device 300 provided by an embodiment of the present invention.
  • the network device 300 includes:
  • the receiving unit 310 is configured to receive a control message sent by the control device, where the control message carries redirection routing information and a redirect routing indication of the data stream, where the redirection routing information of the data stream includes destination address information of the data stream and the network
  • the redirected next hop information of the device is used to indicate that the redirected routing information of the data flow is converted into a forwarding entry in the target forwarding table, where the table space of the target forwarding table is larger than the network device.
  • the processing unit 320 is configured to convert the redirect routing information of the data stream into a forwarding entry in the target forwarding table according to the redirect routing indication received by the receiving unit 310.
  • the redirect routing indication includes a conversion indication and a conversion description, where the conversion indication is used to indicate that the redirect routing information of the data stream is converted, and the conversion description is used to indicate that the conversion processing is to use the data
  • the redirected routing information of the flow is converted into a forwarding entry in the forwarding table.
  • the processing unit 320 may convert the redirect routing information of the data stream into a forwarding entry in the target forwarding table according to the conversion indication and the conversion description.
  • the target forwarding table may be specifically a FIB, but the embodiment of the present invention is not limited thereto.
  • the forwarding entry converted by the redirected routing information of the data flow includes: a destination address corresponding to the destination address information and a forwarding next corresponding to the redirected next hop information Jump information.
  • the redirect routing indication is further used to indicate a conversion manner of converting the redirected next hop information to the information of forwarding the next hop.
  • the redirect routing indication may further include a conversion mode indication, where the conversion mode indication may be used to indicate a conversion manner of converting the redirected next hop information of the network device to the information of forwarding the next hop.
  • the redirected route indication indicates that the converted manner may include any one of the following three conversion manners:
  • control message is a BGP FlowSpec message or other type of message.
  • control message is a BGP FlowSpec message
  • traffic action field in the extended community attribute of the BGP FlowSpec message is used to carry the conversion indication.
  • the transition indication may occupy one bit of the traffic action field.
  • control message is a BGP FlowSpec message
  • the community field in the broad community attribute of the BGP FlowSpec message is used to carry the conversion description.
  • the broad community attribute in the BGP FlowSpec message includes a parameter TLV, where the parameter TLV includes a tag TLV, and the tag TLV is used to indicate that the redirected next hop information is determined.
  • the corresponding manner of forwarding the information of the next hop is a conversion mode for indicating that the redirected next hop information of the target network device is converted into the information for forwarding the next hop.
  • the tagged TLV can be used to carry a translation mode indication of the redirected route indication.
  • the MP_REACH_NLRI field of the BGP FlowSpec message is used to carry the destination address information of the data stream.
  • the extended community attribute of the BGP FlowSpec message may include a redirect to IP (Redirect to IP) field, where the Redirect to IP field may be used to carry the network device. Redirect the next hop information.
  • redirect to IP redirect to IP
  • the processing unit 320 may be specifically configured to: determine a destination address corresponding to the destination address information of the data stream; convert the redirected next hop information of the network device into information for forwarding the next hop; A forwarding entry consisting of the address and the information of the forwarded next hop is added to the target forwarding table of the network device.
  • the processing unit 320 may be instructed according to the redirect routing indication.
  • the conversion mode of the network device converts the redirected next hop information of the network device into the information of forwarding the next hop, but the embodiment of the present invention is not limited thereto.
  • the processing unit 320 when the processing unit 320 adds a forwarding entry consisting of the destination address and the information of the forwarded next hop to the target forwarding table of the network device, the processing unit 320 may be in the target forwarding table of the network device.
  • the information of the forwarding next hop in the target forwarding entry is replaced with the information of the forwarding next hop corresponding to the redirected next hop information; and/or
  • a forwarding entry composed of the destination address and the information of the forwarded next hop is created in the target forwarding table.
  • the network device 300 may further include: a sending unit, configured to send, to the control device, first capability information, where the receiving device 310 receives the control message sent by the control device, where the first capability information is used to indicate the The network device has the capability of receiving the redirected route indication; correspondingly, the receiving unit 310 is further configured to receive the second capability information sent by the control device, where the second capability information is used to indicate that the control device has the redirect route The ability to indicate.
  • a sending unit configured to send, to the control device, first capability information, where the receiving device 310 receives the control message sent by the control device, where the first capability information is used to indicate the The network device has the capability of receiving the redirected route indication; correspondingly, the receiving unit 310 is further configured to receive the second capability information sent by the control device, where the second capability information is used to indicate that the control device has the redirect route The ability to indicate.
  • the receiving unit 310 may be specifically configured to receive a control message that is sent by the control device according to the first capability information sent by the sending unit.
  • the sending unit may be configured to send a first BGP OPEN message to the control device, where the first BGP OPEN message carries the first capability information;
  • the receiving unit 310 may be specifically configured to receive a second BGP OPEN message sent by the control device,
  • the second BGP OPEN message carries the second capability information.
  • the processing unit 320 is further configured to set a priority of the forwarding entry converted by the redirect routing information of the data flow to a highest priority.
  • the network device 300 herein is embodied in the form of a functional unit.
  • the term "unit” herein may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor for executing one or more software or firmware programs (eg, a shared processor, a proprietary processor, or a group). Processors, etc.) and memory, merge logic, and/or other suitable components that support the described functionality.
  • ASIC application specific integrated circuit
  • the network device 300 may correspond to the target network device in the foregoing embodiment, such as a forwarding device such as a router or a switch, and may be used to perform the foregoing method and the target network device. Corresponding processes and/or steps are not repeated here to avoid repetition.
  • FIG. 7 schematically shows a control device 400 provided by an embodiment of the present invention.
  • the control device 400 includes:
  • the processing unit 410 is configured to determine redirection routing information of the data stream, where the redirection routing information of the data stream includes destination address information of the data stream and redirected next hop information of the target network device.
  • the sending unit 420 is configured to send, to the target network device, a control message, where the control message carries redirection routing information and a redirection routing indication of the data stream determined by the processing unit 410, where the redirection routing indication is used to indicate the data
  • the redirected routing information of the flow is converted into a forwarding entry in the target forwarding table, where the tablespace of the target forwarding table is larger than the tablespace of the flow rule forwarding table of the target network device.
  • the redirect routing indication includes a conversion indication and a conversion description, where the conversion indication is used to indicate that the redirect routing information of the data stream is converted, and the conversion description is used to indicate that the conversion processing is to use the data
  • the redirected routing information of the flow is converted into a forwarding entry in the target forwarding table.
  • the target forwarding table may specifically be a FIB.
  • the forwarding entry converted by the redirected routing information of the data flow includes: a destination address corresponding to the destination address information and a forwarding next corresponding to the redirected next hop information Jump information.
  • the redirecting route indication is further used to: determine a manner of forwarding the next hop corresponding to the redirected next hop information, that is, converting the redirected next hop information of the target network device to forwarding the next hop The way information is converted.
  • the redirect routing indication further includes a conversion mode indication, where the conversion manner indicates a conversion manner for indicating that the redirected next hop information of the target network device is converted into information for forwarding the next hop.
  • the redirected route indication indicates that the converted manner may include any one of the following three conversion manners:
  • the flow rule routing table of the target network device is queried first, and when the routing entry matching the redirected next hop information does not exist in the routing rule routing table, the routing information table of the target network device is queried, and the target is obtained.
  • the redirected next hop information of the network device is converted into information for forwarding the next hop.
  • control message is a BGP FlowSpec message.
  • the control message is a BGP FlowSpec message
  • the BGP FlowSpec message includes an extended community attribute, and the traffic action field in the extended community attribute is used to carry the conversion indication.
  • the transition indication may occupy one bit in the traffic action field.
  • control message is a BGP FlowSpec message
  • the community field in the broad community attribute in the BGP FlowSpec message may be used to carry the conversion description.
  • the broad community attribute in the BGP FlowSpec message includes a parameter TLV, where the parameter TLV includes a tag TLV, and the tag TLV is used to indicate that the redirected next hop information is determined.
  • the corresponding manner of forwarding the information of the next hop is a conversion mode for indicating that the redirected next hop information of the target network device is converted into the information for forwarding the next hop.
  • the tagged TLV can be used to carry a translation mode indication of the redirected route indication.
  • the MP_REACH_NLRI field of the BGP FlowSpec message is used to carry the destination address information of the data stream.
  • the extended community attribute of the BGP FlowSpec message may include a Redirect to IP field, where the Redirect to IP field may be used to carry the redirected next hop information of the network device.
  • control device 400 further includes: a receiving unit, configured to receive first capability information sent by the target network device, where the sending, by the sending unit 420, the first capability information, where the first capability information is used Instructing the network device to have the capability to receive the redirect route indication;
  • the sending unit 420 is further configured to send, to the target network device, second capability information, where the second capability information is used to indicate that the control device has the capability of sending the redirected route indication.
  • the sending unit 420 may send the control message to the target network device according to the first capability information received by the receiving unit.
  • the receiving unit may be configured to receive the first BGP OPEN message sent by the target network device, where the first BGP OPEN message carries the first capability information;
  • the sending unit 420 is specifically configured to send a second BGP OPEN message to the target network device, where the second BGP OPEN message carries the second capability information.
  • control device 400 herein is embodied in the form of a functional unit.
  • control device 400 may correspond to the control device in the foregoing embodiment, and may be used to perform various processes and/or steps corresponding to the control device in the foregoing method embodiments. Avoid repetition and we will not repeat them here.
  • FIG. 8 exemplarily shows a network device 500 provided by an embodiment of the present invention.
  • the network device 500 includes:
  • the receiver 510 is configured to receive a control message sent by the control device, where the control message carries redirection routing information and a redirection route indication of the data stream, where the redirection routing information of the data stream includes destination address information of the data stream and the network
  • the redirected next hop information of the device is used to indicate that the redirected routing information of the data flow is converted into a forwarding entry in the target forwarding table, where the table space of the target forwarding table is larger than the network device.
  • the processor 520 is configured to convert the redirect routing information of the data stream into a forwarding entry in the target forwarding table according to the redirect routing indication received by the receiver 510.
  • the redirect routing indication includes a conversion indication and a conversion description, where the conversion indication is used to indicate that the redirect routing information of the data stream is converted, and the conversion description is used to indicate that the conversion processing is to use the data
  • the redirected routing information of the flow is converted into a forwarding entry in the forwarding table.
  • the processor 520 may specifically convert the redirect routing information of the data stream into a forwarding entry in the target forwarding table according to the conversion indication and the conversion description.
  • the target forwarding table may be specifically a FIB, but the embodiment of the present invention is not limited thereto.
  • the forwarding entry converted by the redirected routing information of the data flow includes: a destination address corresponding to the destination address information and a forwarding next corresponding to the redirected next hop information Jump information.
  • the redirect routing indication is further used to indicate a conversion manner of converting the redirected next hop information to the information of forwarding the next hop.
  • the redirect routing indication may further include a conversion mode indication, where the conversion mode indication may be used to indicate a conversion manner of converting the redirected next hop information of the network device to the information of forwarding the next hop.
  • the redirected route indication indicates that the converted manner may include any one of the following three conversion manners:
  • the redirecting One-hop information is converted to information that forwards the next hop.
  • control message is a BGP FlowSpec message or other type of message.
  • control message is a BGP FlowSpec message
  • traffic action field in the extended community attribute of the BGP FlowSpec message is used to carry the conversion indication.
  • the transition indication may occupy one bit of the traffic action field.
  • control message is a BGP FlowSpec message
  • the community field in the broad community attribute of the BGP FlowSpec message is used to carry the conversion description.
  • the broad community attribute in the BGP FlowSpec message includes a parameter TLV, where the parameter TLV includes a tag TLV, and the tag TLV is used to indicate that the redirected next hop information is determined.
  • the corresponding manner of forwarding the information of the next hop is a conversion mode for indicating that the redirected next hop information of the target network device is converted into the information for forwarding the next hop.
  • the tagged TLV can be used to carry a translation mode indication of the redirected route indication.
  • the MP_REACH_NLRI field of the BGP FlowSpec message is used to carry the destination address information of the data stream.
  • the extended community attribute of the BGP FlowSpec message may include a redirect to IP (Redirect to IP) field, where the Redirect to IP field may be used to carry the network device. Redirect the next hop information.
  • redirect to IP redirect to IP
  • the processor 520 is specifically configured to: determine a destination address corresponding to the destination address information of the data stream; convert the redirected next hop information of the network device into information for forwarding the next hop; A forwarding entry consisting of the address and the information of the forwarded next hop is added to the target forwarding table of the network device.
  • the processor 520 may indicate according to the redirect routing indication.
  • the conversion mode of the network device converts the redirected next hop information of the network device into the information of forwarding the next hop, but the embodiment of the present invention is not limited thereto.
  • the processor 520 adds a forwarding entry consisting of the determined destination address and the information of forwarding the next hop.
  • the processor 520 may forward the next hop in the target forwarding entry when the target forwarding entry including the destination address exists in the target forwarding table of the network device.
  • the information is replaced with the information of the forwarding next hop corresponding to the redirected next hop information; and/or when the target forwarding entry including the destination address does not exist in the target forwarding table of the network device, in the target forwarding table.
  • the network device 500 may further include: a transmitter, configured to send the first capability information to the control device, where the receiver 510 receives the control message sent by the control device, where the first capability information is used to indicate the The network device has the capability of receiving the redirected route indication; correspondingly, the receiver 510 is further configured to receive the second capability information sent by the control device, where the second capability information is used to indicate that the control device has the redirect route The ability to indicate.
  • a transmitter configured to send the first capability information to the control device, where the receiver 510 receives the control message sent by the control device, where the first capability information is used to indicate the The network device has the capability of receiving the redirected route indication; correspondingly, the receiver 510 is further configured to receive the second capability information sent by the control device, where the second capability information is used to indicate that the control device has the redirect route The ability to indicate.
  • the receiver 510 may be specifically configured to receive a control message that is sent by the control device according to the first capability information sent by the transmitter.
  • the transmitter may be configured to send a first BGP OPEN message to the control device, where the first BGP OPEN message carries the first capability information;
  • the receiver 510 is specifically configured to receive a second BGP OPEN message sent by the control device, where the second BGP OPEN message carries the second capability information.
  • the processor 520 is further configured to set a priority of a forwarding entry converted by the redirect routing information of the data flow to a highest priority.
  • the network device 500 can also include a memory, which can include read only memory and random access memory, and provides instructions and data to the processor.
  • a portion of the memory may also include a non-volatile random access memory.
  • the memory can also store information of the device type.
  • the network device 500 may correspond to a target network device in a method for redirecting a data stream according to an embodiment of the present invention, and the above and other operations and/or functions of respective modules in the network device 500 are respectively.
  • the above and other operations and/or functions of respective modules in the network device 500 are respectively.
  • FIG. 9 schematically shows a control device 600 provided by an embodiment of the present invention.
  • the control device 600 includes:
  • the processor 610 is configured to determine redirection routing information of the data stream, where the redirection routing information of the data stream includes destination address information of the data stream and redirected next hop information of the target network device.
  • the transmitter 620 is configured to send, to the target network device, a control message, where the control message carries redirection routing information and a redirection routing indication of the data stream determined by the processor 610, where the redirection routing indication is used to indicate the data
  • the redirected routing information of the flow is converted into a forwarding entry in the target forwarding table, where the tablespace of the target forwarding table is larger than the tablespace of the flow rule forwarding table of the target network device.
  • the redirect routing indication includes a conversion indication and a conversion description, where the conversion indication is used to indicate that the redirect routing information of the data stream is converted, and the conversion description is used to indicate that the conversion processing is to use the data
  • the redirected routing information of the flow is converted into a forwarding entry in the target forwarding table.
  • the target forwarding table may specifically be a FIB.
  • the forwarding entry converted by the redirected routing information of the data flow includes: a destination address corresponding to the destination address information and a forwarding next corresponding to the redirected next hop information Jump information.
  • the redirect routing indication is further used to indicate a conversion manner of converting the redirected next hop information of the target network device to information for forwarding the next hop.
  • the redirect routing indication further includes a conversion mode indication, where the conversion manner indicates a conversion manner for indicating that the redirected next hop information of the target network device is converted into information for forwarding the next hop.
  • the redirected route indication indicates that the converted manner may include any one of the following three conversion manners:
  • the flow rule routing table of the target network device is queried first, and when the routing entry matching the redirected next hop information does not exist in the routing rule routing table, the routing information table of the target network device is queried, and the target is obtained.
  • the redirected next hop information of the network device is converted into information for forwarding the next hop.
  • control message is a BGP FlowSpec message.
  • the control message is a BGP FlowSpec message
  • the BGP FlowSpec message includes an extended community attribute, and the traffic action field in the extended community attribute is used to carry the conversion indication.
  • the transition indication may occupy one bit in the traffic action field.
  • control message is a BGP FlowSpec message
  • the community field in the broad community attribute in the BGP FlowSpec message may be used to carry the conversion description.
  • the BGP FlowSpec message includes a parameter TLV, where the parameter TLV includes a tag TLV, where the tag TLV is used to indicate information about the forwarding next hop corresponding to the redirected next hop information.
  • the tagged TLV can be used to carry a translation mode indication of the redirected route indication.
  • the MP_REACH_NLRI field of the BGP FlowSpec message is used to carry the destination address information of the data stream.
  • the extended community attribute of the BGP FlowSpec message may include a Redirect to IP field, where the Redirect to IP field may be used to carry the redirected next hop information of the network device.
  • control device 600 further includes: a receiver, configured to receive first capability information sent by the target network device, where the transmitter 620 sends a control message to the target network device, where the first capability information is used by Instructing the network device to have the capability to receive the redirect route indication;
  • the transmitter 620 is further configured to send the second capability information to the target network device, where the second capability information is used to indicate that the control device has the capability of sending the redirect route indication.
  • the transmitter 620 can send the control message to the target network device according to the first capability information received by the receiver.
  • the receiver may be configured to receive the first BGP OPEN message sent by the target network device, where the first BGP OPEN message carries the first capability information;
  • the transmitter 620 is specifically configured to send a second BGP OPEN message to the target network device, where the second BGP OPEN message carries the second capability information.
  • control device 600 can also include a memory, which can include read only memory and random access memory, and provides instructions and data to the processor.
  • a portion of the memory may also include non-volatile random access memory Reservoir.
  • the memory can also store information of the device type.
  • the control device 600 may correspond to a control device in a method for redirecting a data stream according to an embodiment of the present invention, and the above-described and other operations and/or functions of the respective modules in the control device 600 are respectively
  • the processes and/or steps corresponding to the control device in the foregoing method embodiments are implemented, and are not described herein for brevity.
  • the processor may be a central processing unit (CPU), and the processor may also be other general purpose processors, digital signal processors (DSPs), and application specific integrated circuits (ASICs). , off-the-shelf programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • each step of the above method may be completed by an integrated logic circuit of hardware in a processor or an instruction in a form of software.
  • the steps of the method disclosed in the embodiments of the present invention may be directly implemented as a hardware processor, or may be performed by a combination of hardware and software modules in the processor.
  • the software module can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like.
  • the storage medium is located in a memory, and the processor executes instructions in the memory, in combination with hardware to perform the steps of the above method. To avoid repetition, it will not be described in detail here.
  • FIG. 10 shows a system 700 for redirecting a data stream provided by an embodiment of the present invention.
  • the system 700 includes a control device 710 and at least one network device 720.
  • the control device 710 may be specifically the foregoing control device 300.
  • the network device 720 may be specifically the network device 400.
  • the device 720 may be specifically the above-mentioned control device 500.
  • the network device 720 may be specifically the foregoing network device 600, which is not limited in this embodiment of the present invention.
  • association relationship describing an associated object indicates that there may be three relationships.
  • a and/or B may indicate that A exists separately, and A and B exist simultaneously, and B cases exist alone.
  • the character / in this paper generally indicates that the contextual object is an OR relationship.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple networks. On the unit. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention contributes in essence or to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .

Landscapes

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

Abstract

本发明公开了一种用于重定向数据流的方法和系统以及网络设备和控制设备,能够克服现有技术中由于流规则转发表的空间有限而导致能够调整的数据流数量较少的缺陷。该方法包括:网络设备接收控制设备发送的控制消息,该控制消息携带数据流的重定向路由信息和重定向路由指示,该数据流的重定向路由信息包括该数据流的目的地址信息和该网络设备的重定向下一跳信息,该重定向路由指示用于指示将该数据流的重定向路由信息转换为目标转发表中的转发表项,其中,该目标转发表的表空间大于该网络设备的流规则转发表的表空间;该网络设备根据该重定向路由指示,将该数据流的重定向路由信息转换为该目标转发表中的转发表项。

Description

用于重定向数据流的方法和系统、网络设备和控制设备
本申请要求于2016年5月18日提交中国专利局、申请号为CN 201610332658.1、发明名称为“用于重定向数据流的方法和系统、网络设备和控制设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信领域,并且更具体地,涉及用于重定向数据流的方法和系统、网络设备和控制设备。
背景技术
软件定义网络(Software Defined Networking,SDN)包括控制设备和转发设备,转发设备可以是路由器、交换机等网络设备,其中,控制设备可以用于进行网络的流量控制,转发设备用于对接收到的数据包进行转发处理。具体地,转发设备可以根据接收到的数据包的目的互联网协议(Internet Protocol,IP)地址,查询转发信息表(Forwarding Information Base,FIB),并根据FIB表中与该目的IP地址匹配的转发表项中的出接口,转发该数据包。但是有些情况下,用户希望对经过转发设备的数据包进行干预,例如,对访问某个目的IP地址的具有特定源IP地址的消息进行抑制,丢弃相应数据,等等。这时,可以在转发设备上设置包括至少一个流规则(Flow Specification Rule)的流规则转发表,其中,流规则可以包括流匹配条件以及针对匹配的流所采取的动作,该流匹配条件可以包括目的IP地址、源IP地址、目的端口等等,该动作可以包括丢弃、重定向到某个特定端口等等。这样,转发设备在收到数据包时,可以先查询流规则转发表,如果流规则转发表中存在与该数据包匹配的流规则,则可以执行该匹配的流规则中的相应动作,此后,如果需要转发该数据包,则可以继续查询FIB,以确定该数据包的出接口。
在现有技术中,当流经某个转发设备的流数量较多而导致该路由器的负荷较重时,可以将流经该转发设备的流调整到其它路径。具体地,控制设备可以将流规则下发给路由器,其中,该流规则指示将特定流的下一跳重定向到另一个转发设备,转发设备收到控制设备下发的流规则之后,可以将该流规则添加至该转发设备的流规则转发表中,并根据该流规则转发表对符合条件的流进行重定向处理。
然而,流规则转发表的空间一般较小,这样会限制转发设备能够调整的流数目。
发明内容
本发明实施例提供了一种用于重定向数据流的方法和系统以及网络设备和控制设备,能够克服现有技术中由于流规则转发表的空间有限而导致能够调整的数据流数量较少的缺陷。
第一方面,提供了一种用于重定向数据流的方法,包括:网络设备接收控制设备发送的控制消息,该控制消息携带数据流的重定向路由信息和重定向路由指示,该数据流的重定向路由信息包括该数据流的目的地址信息和该网络设备的重定向下一跳信息,该重定向路由指示用于指示将该数据流的重定向路由信息转换为目标转发表中的转发表项,其中,该目标转发表的表空间大于该网络设备的流规则转发表的表空间;该网络设备根据该重定 向路由指示,将该数据流的重定向路由信息转换为该目标转发表中的转发表项。
可选地,该网络设备的重定向下一跳信息可以用于表表示:在该数据流的重定向之后的路由路径上,该网络设备对应的BGP下一跳的信息。
可选地,该网络设备对应的BGP下一跳可以与该网络设备直接或间接连接。
可选地,该网络设备的重定向下一跳信息可以包括该网络设备的重定向下一跳(即BGP下一跳)的IP地址。
本发明实施例提供的用于重定向数据流的方法,通过控制设备向网络设备发送控制消息,该控制消息携带数据流的重定向路由信息和重定向路由指示,其中,该重定向路由指示用于指示网络设备将该数据流的重定向路由信息转换为目标转发表中的转发表项,该网络设备根据该重定向路由指示,将该数据流的重定向路由信息转换为目标转发表中的转发表项,其中,该目标转发表的表空间大于该流规则转发表的表空间,能够克服现有技术中由于网络设备将该数据流的重定向路由信息添加至该流规则转发表而受到的流规则转发表的大小的限制的缺陷,从而增加系统能够调整的数据流的数目。
可选地,该目标转发表为FIB表。
可选地,该控制消息为BGP FlowSpec消息。
在第一方面的第一种可能的实现方式中,该重定向路由指示包括转换指示和转换说明;该转换指示用于指示将该数据流的重定向路由信息进行转换处理;该转换说明用于说明该转换处理为将该数据流的重定向路由信息转换为转发表中的转发表项。
结合上述可能的实现方式,在第一方面的第二种可能的实现方式中,在该目标转发表中,由该数据流的重定向路由信息转换的转发表项包括:该目的地址信息所对应的目的地址和该重定向下一跳信息所对应的转发下一跳的信息。
此时,可选地,该重定向路由指示还包括指示将该重定向下一跳信息转换至该转发下一跳的信息的转换方式。
具体地,该重定向路由指示还用于指示将该重定向下一跳信息转换至转发下一跳的信息的转换方式。
该重定向路由指示可以包括转换方式指示,其中,该转换方式指示用于指示将该重定向下一跳信息转换至转发下一跳的信息的转换方式。
结合上述可能的实现方式,在第一方面的第三种可能的实现方式中,该重定向路由指示(或该重定向路由指示中的转换方式指示)所指示的将该重定向下一跳信息转换至该转发下一跳的信息的转换方式,包括:通过查询该网络设备的路由信息表,将该重定向下一跳信息转换至该转发下一跳的信息;或通过查询该网络设备的流规则路由表,将该重定向下一跳信息转换至该转发下一跳的信息;或先查询该网络设备的流规则路由表,并且在该流规则路由表中不存在该重定向下一跳信息匹配的路由表项时,通过查询该网络设备的路由信息表,将该重定向下一跳信息转换至该转发下一跳的信息。
结合上述可能的实现方式,在第一方面的第四种可能的实现方式中,若该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息的扩展团体属性中的流量动作字段用于承载该转换指示。
具体地,该扩展团体属性中的流量动作字段可以用于承载该转换指示,其中,可选地,该转换指示可以占用该流量动作字段中的一个比特位。
结合上述可能的实现方式,在第一方面的第五种可能的实现方式中,若该控制消息为 BGP FlowSpec消息,该BGP FlowSpec消息的广泛团体属性中的团体字段用于承载该转换说明。
结合上述可能的实现方式,在第一方面的第六种可能的实现方式中,若该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息中的广泛团体属性包括参数类型长度值TLV,该参数TLV包括标记TLV,该标记TLV用于指示将该重定向下一跳信息转换为转发下一跳的信息的转换方式。
具体地,在该BGP FlowSpec消息中,可以包括标记类型的参数TLV,该标记类型的参数TLV用于承载该重定向路由指示中的转换方式指示。
结合上述可能的实现方式,在第一方面的第七种可能的实现方式中,该网络设备根据该重定向路由指示,将该数据流的重定向路由信息转换为该目标转发表中的转发表项,包括:该网络设备确定该数据流的目的地址信息所对应的目的地址;该网络设备将该网络设备的重定向下一跳信息转换为转发下一跳的信息;该网络设备将由该目的地址和该转发下一跳的信息组成的转发表项添加至该网络设备的目标转发表。
可选地,如果该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息的MP_REACH_NLRI字段用于承载该数据流的目的地址信息。
此时,该网络设备可以具体从该BGP FlowSpec消息的MP_REACH_NLRI字段中获取该数据流的目的地址信息,并将该目的地址信息对应的目的地址确定为该转换的转发表项中的目的地址。
可选地,该MP_REACH_NLRI字段中的前缀字段仅包括目的前缀类型。
可选地,如果该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息的扩展团体属性可以包括Redirect to IP字段,该Redirect to IP字段可以用于承载该网络设备的重定向下一跳信息。
此时,该网络设备可以具体从该扩展团体属性的Redirect to IP字段中获取该网络设备的重定向下一跳信息,确定获取到的重定向下一跳信息对应的转发下一跳的信息,并将确定的该转发下一跳信息确定为该转换的转换表项中的转发下一跳的信息。
可选地,该重定向路由指示还用于指示将该重定向下一跳信息转换至转发下一跳的信息的转换方式,该网络设备可以根据该重定向路由指示所指示的转换方式,将该重定向下一跳信息转换至转发下一跳的信息的转换方式。
可选地,该网络设备可以查询路由信息表,以确定该路由信息表中是否存在与该重定向下一跳信息匹配的路由表项,并根据该匹配的路由表项,确定该转发下一跳的信息。
可选地,该网络设备可以查询流规则路由表,以确定该流规则路由表中是否存在与该重定向下一跳信息匹配的路由表项,并根据该匹配的路由表项,确定该转发下一跳的信息。
可选地,该网络设备可以首先查询该网络设备的流规则路由表,以确定该流规则路由表中是否存在与该重定向下一跳信息匹配的路由表项。如果该流规则路由表中不存在与该重定向下一跳信息匹配的路由表项,则该网络设备可以通过查询该网络设备的路由信息表,将该重定向下一跳信息转换至该转发下一跳的信息。
可选地,该转发下一跳的信息可以包括该转发下一跳的IP地址和/或该转发下一跳在该网络设备上对应的出接口,等等。
结合上述可能的实现方式,在第一方面的第八种可能的实现方式中,该网络设备将由确定的该目的地址和该的转发下一跳的信息组成的转发表项添加至该网络设备的目标转 发表,包括:若该网络设备的目标转发表中存在包括该目的地址的目标转发表项,该网络设备将该目标转发表项中的转发下一跳的信息替换为该重定向下一跳信息对应的转发下一跳的信息;和/或若该网络设备的目标转发表中不存在包括该目的地址的目标转发表项,该网络设备在该目标转发表中创建由该确定的目的地址和转发下一跳的信息组成的转发表项。
结合上述可能的实现方式,在第一方面的第九种可能的实现方式中,在该网络设备接收控制设备发送的控制消息之前,该方法还包括:该网络设备向该控制设备发送第一能力信息,该第一能力信息用于指示该网络设备具有接收该重定向路由指示的能力;该网络设备接收该控制设备发送的第二能力信息,该第二能力信息用于指示该控制设备具有发送该重定向路由指示的能力;该网络设备接收控制设备发送的控制消息,包括:该网络设备接收该控制设备根据该第一能力信息发送的控制消息。
结合上述可能的实现方式,在第一方面的第十种可能的实现方式中,该网络设备向该控制设备发送第一能力信息,包括:该网络设备向该控制设备发送第一BGP OPEN消息,该第一BGP OPEN消息中携带该第一能力信息;该网络设备接收该控制设备发送的第二能力信息,包括:该网络设备接收该控制设备发送的第二BGP OPEN消息,该第二BGP OPEN消息携带该第二能力信息。
结合上述可能的实现方式,在第一方面的第十一种可能的实现方式中,该方法还包括:将由该数据流的重定向路由信息转换的转发表项的优先级设置为最高优先级。
第二方面,提供了另一种用于重定向数据流的方法,包括:控制设备确定数据流的重定向路由信息,该数据流的重定向路由信息包括该数据流的目的地址信息和目标网络设备的重定向下一跳信息;该控制设备向该目标网络设备发送控制消息,该控制消息携带该数据流的重定向路由信息和重定向路由指示,该重定向路由指示用于指示将该数据流的重定向路由信息转换为目标转发表中的转发表项,其中,该目标转发表的表空间大于该目标网络设备的流规则转发表的表空间。
可选地,该目标转发表为FIB表。
可选地,该控制消息为BGP FlowSpec消息。
在第二方面的第一种可能的实现方式中,该重定向路由指示包括转换指示和转换说明;该转换指示用于指示将该数据流的重定向路由信息进行转换处理;该转换说明用于说明该转换处理为将该数据流的重定向路由信息转换为转发表中的转发表项。
结合上述可能的实现方式,在第二方面的第二种可能的实现方式中,在该目标转发表中,由该数据流的重定向路由信息转换的转发表项包括:该目的地址信息所对应的目的地址和该重定向下一跳信息所对应的转发下一跳的信息。
此时,可选地,该重定向路由指示还包括指示将该重定向下一跳信息转换至该转发下一跳的信息的转换方式。
具体地,该重定向路由指示还用于指示将该重定向下一跳信息转换至转发下一跳的信息的转换方式。
该重定向路由指示可以包括转换方式指示,其中,该转换方式指示用于指示将该重定向下一跳信息转换至转发下一跳的信息的转换方式。
结合上述可能的实现方式,在第二方面的第三种可能的实现方式中,该重定向路由指示(或该重定向路由指示中的转换方式指示)所指示的将该重定向下一跳信息转换至该转 发下一跳的信息的转换方式,包括:通过查询该网络设备的路由信息表,将该重定向下一跳信息转换至该转发下一跳的信息;或通过查询该网络设备的流规则路由表,将该重定向下一跳信息转换至该转发下一跳的信息;或先查询该网络设备的流规则路由表,并且在该流规则路由表中不存在该重定向下一跳信息匹配的路由表项时,通过查询该网络设备的路由信息表,将该重定向下一跳信息转换至该转发下一跳的信息。
结合上述可能的实现方式,在第二方面的第四种可能的实现方式中,若该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息的扩展团体属性中的流量动作字段用于承载该转换指示。
具体地,该扩展团体属性中的流量动作字段可以用于承载该转换指示,其中,可选地,该转换指示可以占用该流量动作字段中的一个比特位。
结合上述可能的实现方式,在第二方面的第五种可能的实现方式中,若该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息的广泛团体属性中的团体字段用于承载该转换说明。
结合上述可能的实现方式,在第二方面的第六种可能的实现方式中,若该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息中的广泛团体属性包括参数类型长度值TLV,该参数TLV包括标记TLV,该标记TLV用于指示将该重定向下一跳信息转换为转发下一跳的信息的转换方式。
可选地,如果该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息的MP_REACH_NLRI字段用于承载该数据流的目的地址信息。
可选地,如果该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息的扩展团体属性可以包括Redirect to IP字段,该Redirect to IP字段可以用于承载该网络设备的重定向下一跳信息。
结合上述可能的实现方式,在第二方面的第七种可能的实现方式中,在该控制设备向该目标网络设备发送控制消息之前,该方法还包括:该控制设备接收该目标网络设备发送的第一能力信息,该第一能力信息用于指示该网络设备具有接收该重定向路由指示的能力;该控制设备向该目标网络设备发送第二能力信息,该第二能力信息用于指示该控制设备具有发送该重定向路由指示的能力;该控制设备向该目标网络设备发送控制消息,包括:该控制设备根据接收到的该第一能力信息,向该目标网络设备发送该控制消息。
结合上述可能的实现方式,在第二方面的第八种可能的实现方式中,该控制设备接收该目标网络设备发送的第一能力信息,包括:该控制设备接收该目标网络设备发送的第一BGP OPEN消息,该第一BGP OPEN消息中携带该第一能力信息;该控制设备向该目标网络设备发送第二能力信息,包括:该控制设备向该目标网络设备发送第二BGP OPEN消息,该第二BGP OPEN消息携带该第二能力信息。
第三方面,提供了一种网络设备,用于执行第一方面或第一方面的任一种可能的实现方式中的方法。
第四方面,提供了一种控制设备,用于执行第二方面或第二方面的任一种可能的实现方式中的方法。
第五方面,提供了另一种网络设备,包括:存储单元和处理器,该存储单元用于存储指令,该处理器用于执行该存储器存储的指令,并且当该处理器执行该存储器存储的指令时,该执行使得该处理器执行第一方面或第一方面的任意可能的实现方式中的方法。
第六方面,提供了另一种控制设备,包括:存储单元和处理器,该存储单元用于存储指令,该处理器用于执行该存储器存储的指令,并且当该处理器执行该存储器存储的指令时,该执行使得该处理器执行第二方面或第二方面的任意可能的实现方式中的方法。
第七方面,提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行第一方面或第一方面的任意可能的实现方式中的方法的指令。
第八方面,提供了另一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行第二方面或第二方面的任意可能的实现方式中的方法的指令。
第九方面,提供了一种用于重定向数据流的系统,包括上述第三方面或第三方面的任一种可能的实现方式中的网络设备以及第四方面或第四方面的任一种可能的实现方式中的控制设备;或者,该系统包括上述第五方面或第五方面的任一种可能的实现方式中的网络设备以及第六方面或第六方面的任一种可能的实现方式中的控制设备。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面所描述的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例应用的系统架构示意图。
图2为本发明实施例提供的用于重定向数据流的方法的示意性流程图。
图3为本发明实施例提供的用于重定向数据流的方法中的BGP Flowspec消息的流量动作字段的示例格式示意图。
图4为本发明实施例提供的用于重定向数据流的方法中的BGP Flowspec消息的广泛团体属性的示例格式示意图。
图5为本发明实施例提供的用于重定向数据流的方法中的BGP OPEN消息的RPD能力字段的示例格式示意图
图6为本发明实施例提供的网络设备的示意性框图。
图7为本发明实施例提供的控制设备的示意性框图。
图8为本发明另一实施例提供的网络设备的示意性框图。
图9为本发明另一实施例提供的控制设备的示意性框图。
图10为本发明实施例提供的用于重定向数据流的系统的示意性框图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明的一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都应属于本发明保护的范围。
图1示例性地示出了本发明实施例应用的SDN 100。该网络100包括流量分析设备110、控制设备120和多个路由器130,其中,流量分析设备110用于收集网络的流量信息,可选地,流量分析设备110可以具体为uTraffic。控制设备120可以用于基于来自于流量分析设备110的流量信息,进行网络的流量控制,可选地,该控制设备120可以具体为智能网 络控制设备(Smart Network Controller,SNC),但本发明实施例不限于此。
路由器130可以用于对数据流进行转发处理。图1示例性地示出了六个路由器:R1至R6,其中,R1至R4属于自治系统(Autonomous System,AS)1,R5属于由互联网服务提供商(Internet Service Provider,ISP)1提供服务的AS2,R6属于由ISP 2提供服务的AS3,应理解,图1仅示例性地示出了一个控制设备和六个路由器,该网络100可以包括任意其它数量的控制设备和路由器,本发明实施例对此不做限定。
在图1所示的例子中,假设R1接入的业务的目的地址为D,并且由R1到D可以具有X和Y两条路径,其中,路径X依次经由R1、R2和R5,路径Y依次经由R1、R2和R6。假设X的路由优先级高于Y,则当R2接收到来自于R1的目的地址为D的数据包时,会优选路径X转发该数据包。然而,对于R2来说,用于连接X和Y的带宽是有限的,过多的流量可能会导致X的链路负荷较重,此时,需要将部分原本需要流经X的流量调整到路径Y。
具体地,控制设备120可以利用来自于流量分析设备110的流量信息,得到需要调整的特定流的调整后的路径以及该特定流的路径上的一个或多个路由器对应的调整后的边界网关协议(Border Gateway Protocol,BGP)下一跳的信息。该控制设备120可以将流量规则下发给相关路由器,并在该流量规则中指定该路由器对应的调整后的BGP下一跳,但本发明实施例不限于此。
在现有技术中,路由器在接收到该控制设备发送的流规则之后,可以将该流规则存储至路由器的流规则转发表,并根据流规则转发表对接收到的满足该流规则的数据流进行重定向处理。然而,现有的转发设备的流规则转发表的表空间较小,一般为32kB、64kB和96kB,等等,从而限制了转发设备能够调整的数据流的数目。
应理解,在本发明实施例中,网络设备可以指传统路径计算单元(Path Computation Element,PCE)网络中的传统路由器、交换机等路由转发设备,也可以是基于控制转发分离的SDN中的路由器或交换机等路由转发设备,本发明实施例对此不做限定。
图2示例性地示出了本发明实施例提供的用于重定向数据流的方法200。该方法200可以应用于如图1所示的SDN 100,但本发明实施例不限于此。
S210,控制设备确定待重定向的数据流的重定向路由信息。
作为一个可选例子,该控制设备可以具体为SNC,但本发明实施例对此不做限定。该控制设备可以获取网络的流量信息,例如,获取来自于流量分析设备的流量信息,并根据获取到的该流量信息,确定需要重定向的数据流以及该数据流的重定向路由信息。例如,在图1所示的例子中,当控制设备根据流量信息,发现由R2至R5的链路的当前负荷较重,则可以确定将R2至R5的链路上的部分数据流调整到其它链路,例如,将特定数据流的路由路径由X调整到Y。
该数据流的重定向路由信息可以包括该数据流的重定向路径(即调整后的路由路径)的信息,用于对该数据流进行重定向处理。具体地,该数据流的重定向路由信息可以包括该数据流的目的地址信息和目标网络设备的重定向下一跳信息,其中,该数据流的目的地址信息可以包括该数据流的目的互联网协议(Internet Protocol,IP)地址,等等,目标网络设备的重定向下一跳信息可以表示该目标网络设备对应的重定向下一跳的信息,例如,该重定向下一跳的IP地址,等等,该目标网络设备对应的重定向下一跳可以具体为该数据流的调整后的路由路径上该目标网络设备对应的BGP下一跳,该目标网络设备对应的重定 向下一跳可以与该目标网络设备直接或间接连接,可以与该目标网络设备属于相同或不同的AS,本发明实施例对此不做限定。
该目标网络设备可以为该数据流的路由路径上的网络设备,并且在重定向该数据流时,需要调整该目标网络设备的下一跳,例如,该目标网络设备可以具体为上述例子中的R2。可选地,该目标网络设备的数量可以为一个或多个,其中,如果该目标网络设备的数量为多个,则该多个目标网络设备中每个目标网络设备可以对应于不同的重定向下一跳,相应地,该控制设备可以确定该多个目标网络设备中每个目标网络设备对应的重定向下一跳信息,但本发明实施例不限于此。
可选地,该数据流的重定向路由信息还可以包括其他信息,本发明实施例对此不做限定。
S220,该控制设备向该目标网络设备发送控制消息,该控制消息可以包括该数据流的重定向路由信息和重定向路由指示,其中,该重定向路由指示用于将该数据流的重定向路由信息转换为目标转发表中的转发表项,其中,该目标转发表的表空间大于该目标网络设备的流规则转发表的表空间。
可选地,该控制消息可以具体为BGP流规则(FlowSpec)消息或其它类型的消息,但本发明实施例不限于此。
可选地,如果该目标网络设备的数量为多个,则该控制设备可以向该多个目标网络设备中的每个目标网络设备发送控制消息,其中,向每个目标网络设备发送的控制消息中携带的该数据流的重定向下一跳信息可以包括该数据流的目的地址信息和该每个目标网络设备的重定向下一跳信息,但本发明实施例不限于此。
作为一个可选例子,该重定向路由指示可以包括转换指示和转换说明,其中,该转换指示用于指示对该数据流的重定向路由信息进行转换处理,该转换说明可以用于说明或解释转换处理这个动作,例如,该转换说明用于说明该转换处理具体为将该数据流的重定向路由信息转换为目标转发表中的转发表项。此时,该转换说明用于将该转换指示所指示的转换处理具体限定为:转换为目标转发表中的转发表项,但本发明实施例不限于此。
该重定向路由指示可以用于指示目标网络设备将数据流的重定向路由信息转换为目标转发表中的转发表项,其中,该目标转发表可以用于该目标网络设备对接收到的数据流进行转发处理,例如,该目标转发表可以具体为FIB,但本发明实施例不限于此。
S230,目标网络设备接收该控制设备发送的控制消息,并根据该控制消息,将该数据流的重定向路由信息转换为目标转发表中的转发表项。
可选地,如果该该重定向路由指示包括转换指示和转换说明,该目标网络设备可以具体根据该转换指示和转换说明,将该数据流的重定向路由信息转换为该目标转发表中的转发表项。
该目标网络设备的目标转发表可以包括至少一个转发表项,其中,可选地,每个转发表项可以包括目的地址和转发下一跳的信息,例如,该转发下一跳在该目标网络设备上对应的出接口、该转发下一跳的IP地址,等等,其中,该转发下一跳可以与该目标网络设备直接连接,并且该目标网络设备可以具体通过该目标网络设备上的与该转发下一跳对应的出接口连接至该转发下一跳,但本发明实施例不限于此。
可选地,在本发明实施例中,该目标网络设备将该数据流的重定向路由信息转换为目标转发表中的转发表项的方式可以预先定义或者由控制设备预先配置。或者,该控制设备 可以在该控制消息中指示该目标网络设备将该数据流的重定向路由信息转换为目标转发表中的转发表项的方式。
作为一个可选例子,如果该目标转发表的转发表项包括目的地址和转发下一跳的信息,则该目标网络设备将该数据流的重定向路由信息转换为目标转发表中的转发表项可以包括:该目标网络设备将该数据流的目的地址信息对应的目的地址作为转换的转发表项中的目的地址,该目标网络设备将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息,并且将该转发下一跳的信息作为转换的转发表项中的转发下一跳的信息。
可选地,该目标网络设备将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息的转换方式可以预先定义或者由该控制设备预先配置。或者,该控制设备可以在该控制消息中指示该目标网络设备将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息的转换方式。例如,该重定向路由指示还用于指示将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息的转换方式。
此时,该目标网络设备可以根据该重定向路由指示所指示的转换方式,将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息,但本发明实施例不限于此。
作为一个可选例子,该重定向路由指示还可以包括转换方式指示,该转换方式指示可以用于指示将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息的转换方式,但本发明实施例不限于此。
作为一个可选例子,该目标网络设备可以通过以下转换方式中的任意一种将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息:
(1)、通过查询该目标网络设备的路由信息表(Routing Information Base,RIB),将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息。
可选地,RIB可以属于该目标网络设备的控制面。RIB具体可以包括该目标网络设备根据BGP生成的路由表,也可以包括该目标网络设备根据内部网关协议(Interior Gateway Protocol,IGP)或根据虚拟专用网络(Virtual Private Network,VPN)协议生成的VPN路由表,本发明实施例对此不做限定。
具体地,该目标网络设备可以确定该RIB中是否存在与该重定向下一跳信息匹配的路由表项,并根据该匹配的路由表项中的信息,确定该重定向下一跳信息所对应的转发下一跳的信息,但本发明实施例不限于此。
(2)、通过查询该目标网络设备的流规则路由表,将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息。
该流规则路由表可以具体为包括流规则的路由表,可选地可以属于该目标网络设备的控制面。具体地,该目标网络设备可以确定该流规则路由表中是否存在与该重定向下一跳信息匹配的路由表项,并根据该匹配的路由表项中的信息,确定该重定向下一跳信息所对应的转发下一跳的信息,但本发明实施例不限于此。
(3)、先查询该目标网络设备的流规则路由表,以确定该流规则路由表中是否存在与该目标网络设备的重定向下一跳信息匹配的路由表项,并且在该流规则路由表中不存在该目标网络设备的重定向下一跳信息匹配的路由表项时,通过查询该目标网络设备的路由信息表,将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息。
该目标网络设备可以首先确定流规则路由表中是否存在与该目标网络设备的重定向下一跳信息匹配的路由表项,如果存在匹配的路由表项,则该目标网络设备可以根据该匹 配的路由表项中的信息,确定该目标网络设备的重定向下一跳信息所对应的转发下一跳的信息。如果该流规则路由表中不存在匹配的路由表项,则该目标网络设备可以通过查询RIB表,以确定该RIB中是否存在与该目标网络设备的重定向下一跳信息匹配的路由表项,但本发明实施例不限于此。
可选地,该控制消息可以指示该目标网络设备采用上述三种转换方式中的任意一种将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息,本发明实施例对此不做限定。
可选地,如果该控制消息具体为BGP FlowSpec消息,则该BGP FlowSpec消息可以包括流量动作(Traffic Action)字段,例如,该BGP FlowSpec消息中的扩展团体(Extended Community)属性包括该流量动作字段,该流量动作字段可以用于承载该转换指示。作为一个例子,该流量动作字段可以包括48个比特位,图3示出了该流量动作字段的最后一个字节(包括比特位40至47这最后8个比特位)的格式,其中,比特位47用于指示终结动作(Terminal Action),比特位46用于指示采样(Sample)这个动作,该转换指示也可以称为路由策略分发(Route Policy Distribution,RPD),可以占用该流量动作字段中的比特位0至45中的任意一个或多个比特位。在图3所示的例子中,该流量动作字段中的比特位45用于指示RPD这个动作,此时,该流量动作字段中的比特位0至比特位44可以保留,但本发明实施例对此不作限定。
如果该控制消息具体为BGP FlowSpec消息,可选地,该BGP FlowSpec消息还可以包括广泛团体(Wide Community)属性,此时,该转换说明可以承载在该广泛团体属性中。作为一个可选例子,如图4所示,该广泛团体属性可以包括团体(Community)字段,该团体字段可以指示下载至FIB(Download FIB),即指示转换处理具体用于将该数据流的重定向路由信息下载到FIB中,其中,在图4所示的例子中,当该团体字段设置为0x90000001时,表示下载至FIB,或者也可以对应于其它数值,具体可以由互联网号码分配局(Internet Assigned Number Authority,IANA)登记处分配,本发明实施例对此不做限定。
如果该重定向路由指示还包括转换方式指示,作为一个可选例子,该广泛团体属性还可以用于承载该转换方式指示。如图4所示,该广泛团体属性可以包括在容器类型(Container Type)字段、跳数值(Hop Count)字段、长度字段、团体(Community)字段、源AS号(Source AS Number)字段、上下文AS号(Context AS Number)字段和参数类型长度值(Parameter(s)Type Length Value(TLV))字段,其中,该跳数值字段用于指示传播该广泛属性的程度,例如,该跳数值字段设置为0用于表示请求接收到该消息的路由器不传播该广泛团体,团体字段用于定义该目标网络设备需要执行的动作,源AS号字段用于表示引起(Originate)该团体的AS号,上下文AS号字段表示用于解释该团体的AS上下文。如图4所示,该参数TLV字段包括类型域、长度域和数值域,其中,本发明实施例定义了一种新类型的参数TLV,即标记(Flags)TLV,该标记TLV的类型(Type)域可以用于承载该标记TLV的类型编号,例如,在图4所示的例子中,该标记TLV的类型编号为40,其实际的类型编号可以由IANA登记处分配并维护,本发明实施例对此不做限定。该标记TLV的长度(Length)域可以用于指示该标记TLV的长度或用于指示该标记TLV的数值域的长度,该标记TLV的数值(Value)域可以用于指示将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息的转换方式,即用于指示确定该目标网络设备的重定向下一跳信息对应的转发下一跳的信息的方式。
作为一个可选例子,该BGP FlowSpec消息的广泛团体属性可以总是设置该标记TLV,其中,如果该标记TLV的数值域的取值设置为1,则可以指示通过查询流规则路由表,将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息,而如果该标记TLV的数值域的取值设置为0,则可以指示通过查询普通路由表,将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息。作为另一个可选例子,如果该标记TLV的数值域的取值设置为十进制的2(对应二进制为10),则可以用于指示通过先查询流规则路由表再查询普通路由表的方式,将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息。这样,通过设置该标记TLV的数值域的不同数值,可以指示采用上述三种转换方式中的任意一种方式。在图4所示的例子中,该标记TLV占用4个字节,但本发明实施例不限于此。
作为另一个可选例子,BGP FlowSpec消息中也可以不总是设置该标记TLV。此时,如果BGP FlowSpec消息的广泛团体属性中设置该标记TLV,则可以指示通过查询流规则路由表将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息;而如果BGP FlowSpec消息中的广泛团体属性中未设置该标记TLV,则可以指示通过查询普通路由表,将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息。
如果该控制消息具体为BGP FlowSpec消息,可选地,则该BGP FlowSpec消息可以包括多协议可达(Multiprotocol Reachable Network Layer Reachability Information(NLRI),MP_REACH_NLRI)字段,并且该MP_REACH_NLRI字段可以用于承载该数据流的目的地址信息。MP_REACH_NLRI可以属于路径属性,并且可选地,MP_REACH_NLRI字段可以包括在该BGP FlowSpec消息的扩展团体(Extended Community)属性中。作为一个可选例子,MP_REACH_NLRI属性可以由一个或多个三元组<地址族信息、下一跳信息、网络可达性信息>组成,相应地,MP_REACH_NLRI字段可以包括地址族信息域、下一跳网络地址信息(Next Hop Network Address Information)域和NLRI域,其中,可选地,地址族信息域可以包括2字节的地址族标识(Address Family Identifier)和1字节的子地址族标识(Subsequent Address Family Identifier,SAFI),AFI可以用于标识网络层协议,SAFI可以用于标识NLRI的类型;下一跳网络地址信息域可以包括下一跳网络地址;NLRI域可以包括长度域、标签域和前缀域,其中,该前缀域可以对应不同的匹配条件,例如目的地址、源地址、目的端口、源端口、消息长度等等,可选地,在本发明实施例中,该前缀域可以仅包括目的地址这一种匹配条件,例如该前缀域仅包括类型1,相应地,该目标网络设备可以从该BGP FlowSpec消息中的MP_REACH_NLRI字段中的前缀域获取该数据流的目的地址,并将获取到的该目的地址作为转换的转发表项中的目的地址,但本发明实施例对此不做限定。
如果该控制消息具体为BGP FlowSpec消息,可选地,该BGP FlowSpec消息中的扩展团体属性还可以包括重定向到IP(Redirect to IP)字段,该重定向到IP字段可以包括目标地址域,该目标地址域可以用于承载该目标网络设备的重定向下一跳信息。此时,该目标网络设备可以从该重定向到IP字段中的目标地址域获取该目标网络设备的重定向下一跳信息,但本发明实施例不限于此。
可选地,当该目标网络设备确定了该数据流的目的地址和该目标网络设备对应的该数据流的转发下一跳的信息之后,可以将由该数据流的目的地址和该目标网络设备对应的该数据流的转发下一跳的信息组成的转发表项添加至目标转发表中。具体地,该目标网络设备可以确定该目标转发表中是否存在与该数据流的目的地址匹配的转发表项;如果该目标 网络设备的目标转发表中存在与该数据流的目的地址匹配的转发表项,即该目标转发表中存在包括该数据流的目的地址的转发表项,则该目标网络设备可以将该匹配的转发表项中的转发下一跳的信息替换为该目标网络设备对应的该数据流的转发下一跳的信息,例如,该路由器可以将该匹配的转发表项中的出接口替换为该目标网络设备对应的该数据流的转发下一跳所对应的出接口。可选地,如果该目标转发表中不存在与该数据流的目的地址匹配的转发表项,则该目标网络设备可以在该目标转发表中创建新的转发表项,其中,该新的转发表项包括数据流的目的地址和该目标网络设备对应的该数据流的转发下一跳的信息,但本发明实施例不限于此。
作为另一个可选实施例,如图2所示,该方法200还可以包括S240:
该目标网络设备在接收到目的地址与该数据流的目的地址信息对应的数据包时,根据该目标转发表中的转换的转发表项,转发该数据包。
具体地,如果该目标网络设备在接收到数据包之后,发现该数据包的目的地址与该目标转发表中由该数据流的重定向路由信息转换的转发表项中的目的地址相同,则该目标网络设备可以根据该转换的转发表项中的转发下一跳的信息,转发该数据包。
作为另一个可选实施例,该目标网络设备还可以将由该数据流的重定向路由信息转换的转发表项的优先级设置为最高优先级。这样,如果公网中的BGP或IGP也同时学习到了目的地址与该数据流的目的地址相同的路由,则可以优选由该数据流的重定向路由信息转换的转发表项作为最优的转发表项下发到目标转发表中,本发明实施例对此不做限定。
作为另一个可选实施例,在S210之前,该控制设备还可以与目标网络设备进行能力协商,以确认对方是否支持重定向路由指示,例如,确认对方是否具有RPD能力。相应地,该方法200还可以包括S250和S260。
在S250中,该目标网络设备可以向控制设备发送第一能力信息,该第一能力信息用于指示该目标网络设备具有接收并处理重定向路由指示的能力,即具有将数据流的重定向路由信息转换为目标转发表中的转发表项的能力,例如,该目标网络设备具有RPD的接收能力。
可选地,该目标网络设备可以在BGP开始(OPEN)消息中携带该第一能力信息。作为一个可选例子,该重定向路由指示的能力码(Capability Code)可以设置为129,该重定向路由指示的能力值(Capability Value)域可以包括AFI域、ASFI域和发送/接收(SEND/RECEIVE)域,其中,在图5所示的例子中,AFI域可以占用2个字节,其值可以设置为1,ASFI域可以占用1个字节,其值可以设置为133,Send/Receive域可以占用1个字节,用于指示本机具体支持什么样的RPD能力,具体地,假设该Send/Receive域设置为Send,例如其值设置为2,则可以表示本能够生成重定向路由指示,即具有生成携带有重定向路由指示的控制消息的能力,假设该Send/Receive域设置为Receive,例如其值设置为1,可以表示本机能够接收并处理重定向路由指示,即具有识别并处理携带有重定向路由指示的控制消息的能力,但本发明实施例对此不做限定。
在S260中,该控制设备向该目标网络设备发送第二能力信息,该第二能力信息用于指示该控制设备具有发送重定向路由指示的能力。
可选地,该控制设备可以在BGP OPEN消息中携带该第二能力信息,其中,BGP OPEN消息的具体格式可以参见上面描述,为了简洁,这里不再赘述。
此时,该控制设备可以在根据接收到的该第一能力信息,确定该目标网络设备具有支持接 收重定向路由指示的能力,并向该路由器发送上述控制消息。
因此,根据本发明实施例的用于重定向数据流的方法,通过控制设备向目标网络设备发送控制消息,该控制消息携带数据流的重定向路由信息和重定向路由指示,其中,该重定向路由指示用于指示目标网络设备将该数据流的重定向路由信息转换为目标转发表中的转发表项,该目标网络设备根据该重定向路由指示,将该数据流的重定向路由信息转换为目标转发表中的转发表项,其中,该目标转发表的表空间大于该流规则转发表的表空间,能够克服现有技术中由于目标网络设备将该数据流的重定向路由信息添加至该流规则转发表而受到的流规则转发表的大小的限制的缺陷,从而增加系统能够调整的流的数目。
此外,现有技术中由于网络设备的流规则转发表的表空间大小有限,使得系统能够调整的数据流的数目有限,导致控制设备只能调流到一定程度而无法继续,从而影响系统的负载均衡效果,而本发明实施例通过将数据流的重定向路由信息转换为网络设备的目标转发表中的转发表项,其中,该目标转发表的表空间大于该流规则转发表的表空间,能够提高系统能够调整的数据流的数量,从而提升系统的负载均衡的效果。
下面将结合具体例子对本发明实施例提供的用于重定向数据流的方法做更详细的说明。例如,图1所示的例子中,目的地址为D的数据流的路由路径需要从X调整到Y,这里假设控制设备为SNC,流量分析设备为uTraffic,但本发明实施例不限于此。
SNC可以与转发平面的路由器1至路由器6(即图1中的R1至R6)建立BGP邻居,在建立BGP邻居的过程中,SNC可以向各个路由器发送OPEN消息,该OPEN消息中携带第二能力信息,该第二能力信息表示该SNC具有生成并发送重定向路由指示的能力(即SEND能力),相应地,各个路由器可以分别向SNC发送OPEN消息,其中携带第一能力信息,该第一能力信息表示路由器具有接收并处理重定向路由指示的能力(即Receive能力)。
SNC可以根据需要调整的数据流的目的地址和重定向下一跳R6,生成调流结果。对于R2,调流的策略为:对于目的地址为D的数据流,将其下一跳由R5重定向至R6。SNC可以向R2发送BGP FlowSpec消息,该BGP FlowSpec消息携带具有重定向路由指示的重定向路由信息,以指示R2将该重定向路由信息转换为目标转发表中的转发表项,其中,可选地,该BGP FlowSpec消息中的MP_REACH_NLRI字段中的前缀字段可以仅包含目的前缀(Destination Prefix),流量动作字段中设置R标记(即转换指示),同时,该BGP FlowSpec消息可以携带广泛团体(Wide Community)属性,该属性中的团体(Community)字段可以指示DOWNLOAD FIB,FLAG设置为迭代公网单播路由表。
R2在接收到SNC下发的BGP FlowSpec消息之后,可以根据该BGP FlowSpec消息中携带的重定向路由指示,将该BGP FlowSpec消息中的重定向路由信息对应的转发表项添加至目标转发表。具体地,R2可以将该BGP FlowSpec消息中的重定向下一跳R6迭代到R2的转发下一跳和真实的出接口,然后将由目的地址(即D)和转发下一跳组成的转发表项下发到目标转发表中。
此外,可选地,当R2将上述转发表项下发到目标转发表中之后,如果R2同时又从普通的公网单播邻居学习到了具有相同目的前缀的路由,则R2可以强制优选上述由重定向路由信息转换的转发表项。
当R2接收到目的地址为D的用户流之后,R2可以根据该目标转发表中的由重定向路由信息转换的转发表项,将该用户流转发至R6。
上述例子中以仅需要对R2的转发路径进行调整为例进行描述,可选地,如果需要重定向的数据流的路由路径中存在多个需要调整转发路径的路由器,则该多个路由器可以以与R2类似的方式调整转发路径,本发明实施例对此不做限定。
应注意,图1以及图3至图5的例子是为了帮助本领域技术人员更好地理解本发明实施例,而非要限制本发明实施例的范围。本领域技术人员根据所给出的图1以及图3至图5的例子,显然可以进行各种等价的修改或变化,这样的修改或变化也落入本发明实施例的范围内。
应理解,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。
上文中结合图1至图5,详细描述了根据本发明实施例的用于重定向数据流的方法,下面将结合图6至图10,描述根据本发明实施例的网络设备、控制设备和用于重定向数据流的系统。
图6示例性地示出了本发明实施例提供的网络设备300。该网络设备300包括:
接收单元310,用于接收控制设备发送的控制消息,该控制消息携带数据流的重定向路由信息和重定向路由指示,该数据流的重定向路由信息包括该数据流的目的地址信息和该网络设备的重定向下一跳信息,该重定向路由指示用于指示将该数据流的重定向路由信息转换为目标转发表中的转发表项,其中,该目标转发表的表空间大于该网络设备的流规则转发表的表空间;
处理单元320,用于根据该接收单元310接收到的该重定向路由指示,将该数据流的重定向路由信息转换为该目标转发表中的转发表项。
可选地,该重定向路由指示包括转换指示和转换说明,其中,该转换指示用于指示将该数据流的重定向路由信息进行转换处理,该转换说明用于说明该转换处理为将该数据流的重定向路由信息转换为转发表中的转发表项。
此时,该处理单元320可以具体根据该转换指示和转换说明,将该数据流的重定向路由信息转换为该目标转发表中的转发表项。
可选地,该目标转发表可以具体为FIB,但本发明实施例不限于此。
可选地,在该目标转发表中,由该数据流的重定向路由信息转换的转发表项包括:该目的地址信息所对应的目的地址和该重定向下一跳信息所对应的转发下一跳的信息。
此时,可选地,该重定向路由指示还用于指示将该重定向下一跳信息转换至该转发下一跳的信息的转换方式。
例如,该重定向路由指示还可以包括转换方式指示,该转换方式指示可以用于指示将该网络设备的重定向下一跳信息转换为转发下一跳的信息的转换方式。
可选地,该重定向路由指示所指示的转换方式可以包括以下三种转换方式中的任意一种:
通过查询该网络设备的路由信息表,将该重定向下一跳信息转换至转发下一跳的信息;
通过查询该网络设备的流规则路由表,将该重定向下一跳信息转换至转发下一跳的信息;
先查询该网络设备的流规则路由表,并且在该流规则路由表中不存在该重定向下一跳信息匹配的路由表项时,通过查询该网络设备的路由信息表,将该重定向下一跳信息转换 至转发下一跳的信息。
可选地,该控制消息为BGP FlowSpec消息或其它类型的消息。
作为一个可选实施例,如果该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息的扩展团体属性中的流量动作字段用于承载该转换指示。
可选地,该转换指示可以占用该流量动作字段的一个比特位。
作为一个可选实施例,如果该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息的广泛团体属性中的团体字段用于承载该转换说明。
作为一个可选实施例,如果该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息中的广泛团体属性包括参数TLV,该参数TLV包括标记TLV,该标记TLV用于指示确定该重定向下一跳信息所对应的转发下一跳的信息的方式,即用于指示将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息的转换方式。
例如,该标记TLV可以用于承载该重定向路由指示的转换方式指示。
作为一个可选实施例,如果该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息的MP_REACH_NLRI字段用于承载该数据流的目的地址信息。
作为一个可选实施例,如果该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息的扩展团体属性可以包括重定向至IP(Redirect to IP)字段,该Redirect to IP字段可以用于承载该网络设备的重定向下一跳信息。
可选地,该处理单元320可以具体用于:确定该数据流的目的地址信息所对应的目的地址;将该网络设备的重定向下一跳信息转换为转发下一跳的信息;将由该目的地址和该转发下一跳的信息组成的转发表项添加至该网络设备的目标转发表。
可选地,如果该重定向路由指示还用于指示将该网络设备的重定向下一跳信息转换为转发下一跳的信息的转换方式,该处理单元320可以根据该重定向路由指示所指示的转换方式,将该网络设备的重定向下一跳信息转换为转发下一跳的信息,但本发明实施例不限于此。
可选地,在该处理单元320将由该目的地址和该转发下一跳的信息组成的转发表项添加至该网络设备的目标转发表时,该处理单元320可以在该网络设备的目标转发表中存在包括该目的地址的目标转发表项时,将该目标转发表项中的转发下一跳的信息替换为该重定向下一跳信息对应的转发下一跳的信息;和/或在该网络设备的目标转发表中不存在包括该目的地址的目标转发表项时,在该目标转发表中创建由该目的地址和该转发下一跳的信息组成的转发表项。
可选地,该网络设备300还可以包括:发送单元,用于在该接收单元310接收控制设备发送的控制消息之前,向该控制设备发送第一能力信息,该第一能力信息用于指示该网络设备具有接收该重定向路由指示的能力;相应地,该接收单元310还用于接收该控制设备发送的第二能力信息,该第二能力信息用于指示该控制设备具有发送该重定向路由指示的能力。
此时,该接收单元310可以具体用于接收该控制设备根据该发送单元发送的该第一能力信息发送的控制消息。
作为一个可选实施例,该发送单元可以具体用于向该控制设备发送第一BGP OPEN消息,该第一BGP OPEN消息中携带该第一能力信息;
相应地,该接收单元310可以具体用于接收该控制设备发送的第二BGP OPEN消息, 该第二BGP OPEN消息携带该第二能力信息。
可选地,该处理单元320还可以用于将由该数据流的重定向路由信息转换的转发表项的优先级设置为最高优先级。
应理解,这里的网络设备300以功能单元的形式体现。这里的术语“单元”可以指应用特有集成电路(Application Specific Integrated Circuit,ASIC)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。在一个可选例子中,本领域技术人员可以理解,网络设备300可以对应于上述实施例中的目标网络设备,例如路由器、交换机等转发设备,可以用于执行上述方法实施例中与目标网络设备对应的各个流程和/或步骤,为避免重复,在此不再赘述。
图7示意性地示出了本发明实施例提供的控制设备400。该控制设备400包括:
处理单元410,用于确定数据流的重定向路由信息,该数据流的重定向路由信息包括该数据流的目的地址信息和目标网络设备的重定向下一跳信息;
发送单元420,用于向该目标网络设备发送控制消息,该控制消息携带该处理单元410确定的该数据流的重定向路由信息和重定向路由指示,该重定向路由指示用于指示将该数据流的重定向路由信息转换为目标转发表中的转发表项,其中,该目标转发表的表空间大于该目标网络设备的流规则转发表的表空间。
可选地,该重定向路由指示包括转换指示和转换说明,其中,该转换指示用于指示将该数据流的重定向路由信息进行转换处理,该转换说明用于说明该转换处理为将该数据流的重定向路由信息转换为该目标转发表中的转发表项。
可选地,该目标转发表具体可以为FIB。
可选地,在该目标转发表中,由该数据流的重定向路由信息转换的转发表项包括:该目的地址信息所对应的目的地址和该重定向下一跳信息所对应的转发下一跳的信息。
可选地,该重定向路由指示还用于指示:确定该重定向下一跳信息所对应的转发下一跳的方式,即将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息的转换方式。
此时,可选地,重定向路由指示还包括转换方式指示,该转换方式指示用于指示将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息的转换方式。
可选地,该重定向路由指示所指示的转换方式可以包括以下三种转换方式中的任意一种:
通过查询该目标网络设备的路由信息表,将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息;
通过查询该目标网络设备的流规则路由表,将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息;
先查询该目标网络设备的流规则路由表,并且在该流规则路由表中不存在该重定向下一跳信息匹配的路由表项时,通过查询该目标网络设备的路由信息表,将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息。
可选地,该控制消息为BGP FlowSpec消息。
作为一个可选实施例,若该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息包括扩展团体属性,该扩展团体属性中的流量动作字段用于承载该转换指示。
可选地,该转换指示可以占用该流量动作字段中的一个比特位。
作为一个可选实施例,若该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息中的广泛团体属性中的团体字段可以用于承载该转换说明。
作为一个可选实施例,如果该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息中的广泛团体属性包括参数TLV,该参数TLV包括标记TLV,该标记TLV用于指示确定该重定向下一跳信息所对应的转发下一跳的信息的方式,即用于指示将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息的转换方式。
例如,该标记TLV可以用于承载该重定向路由指示的转换方式指示。
作为一个可选实施例,如果该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息的MP_REACH_NLRI字段用于承载该数据流的目的地址信息。
作为一个可选实施例,如果该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息的扩展团体属性可以包括Redirect to IP字段,该Redirect to IP字段可以用于承载该网络设备的重定向下一跳信息。
可选地,该控制设备400还包括:接收单元,用于在该发送单元420向该目标网络设备发送控制消息之前,接收该目标网络设备发送的第一能力信息,该第一能力信息用于指示该网络设备具有接收该重定向路由指示的能力;
相应地,该发送单元420还用于向该目标网络设备发送第二能力信息,该第二能力信息用于指示该控制设备具有发送该重定向路由指示的能力。
此时,该发送单元420可以根据该接收单元接收到的该第一能力信息,向该目标网络设备发送该控制消息。
可选地,该接收单元可以具体用于接收该目标网络设备发送的第一BGP OPEN消息,该第一BGP OPEN消息中携带该第一能力信息;
相应地,该发送单元420可以具体用于向该目标网络设备发送第二BGP OPEN消息,该第二BGP OPEN消息携带该第二能力信息。
应理解,这里的控制设备400以功能单元的形式体现。在一个可选例子中,本领域技术人员可以理解,控制设备400可以对应于上述实施例中的控制设备,可以用于执行上述方法实施例中与控制设备对应的各个流程和/或步骤,为避免重复,在此不再赘述。
图8示例性地示出了本发明实施例提供的网络设备500。该网络设备500包括:
接收器510,用于接收控制设备发送的控制消息,该控制消息携带数据流的重定向路由信息和重定向路由指示,该数据流的重定向路由信息包括该数据流的目的地址信息和该网络设备的重定向下一跳信息,该重定向路由指示用于指示将该数据流的重定向路由信息转换为目标转发表中的转发表项,其中,该目标转发表的表空间大于该网络设备的流规则转发表的表空间;
处理器520,用于根据该接收器510接收到的该重定向路由指示,将该数据流的重定向路由信息转换为该目标转发表中的转发表项。
可选地,该重定向路由指示包括转换指示和转换说明,其中,该转换指示用于指示将该数据流的重定向路由信息进行转换处理,该转换说明用于说明该转换处理为将该数据流的重定向路由信息转换为转发表中的转发表项。
此时,该处理器520可以具体根据该转换指示和转换说明,将该数据流的重定向路由信息转换为该目标转发表中的转发表项。
可选地,该目标转发表可以具体为FIB,但本发明实施例不限于此。
可选地,在该目标转发表中,由该数据流的重定向路由信息转换的转发表项包括:该目的地址信息所对应的目的地址和该重定向下一跳信息所对应的转发下一跳的信息。
此时,可选地,该重定向路由指示还用于指示将该重定向下一跳信息转换至该转发下一跳的信息的转换方式。
例如,该重定向路由指示还可以包括转换方式指示,该转换方式指示可以用于指示将该网络设备的重定向下一跳信息转换为转发下一跳的信息的转换方式。
可选地,该重定向路由指示所指示的转换方式可以包括以下三种转换方式中的任意一种:
通过查询该网络设备的路由信息表,将该重定向下一跳信息转换至转发下一跳的信息;
通过查询该网络设备的流规则路由表,将该重定向下一跳信息转换至转发下一跳的信息;
先查询该网络设备的流规则路由表,并且在该流规则路由表中不存在该重定向下一跳信息匹配的路由表项时,通过查询该网络设备的路由信息表,将该重定向下一跳信息转换至转发下一跳的信息。
可选地,该控制消息为BGP FlowSpec消息或其它类型的消息。
作为一个可选实施例,如果该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息的扩展团体属性中的流量动作字段用于承载该转换指示。
可选地,该转换指示可以占用该流量动作字段的一个比特位。
作为一个可选实施例,如果该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息的广泛团体属性中的团体字段用于承载该转换说明。
作为一个可选实施例,如果该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息中的广泛团体属性包括参数TLV,该参数TLV包括标记TLV,该标记TLV用于指示确定该重定向下一跳信息所对应的转发下一跳的信息的方式,即用于指示将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息的转换方式。
例如,该标记TLV可以用于承载该重定向路由指示的转换方式指示。
作为一个可选实施例,如果该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息的MP_REACH_NLRI字段用于承载该数据流的目的地址信息。
作为一个可选实施例,如果该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息的扩展团体属性可以包括重定向至IP(Redirect to IP)字段,该Redirect to IP字段可以用于承载该网络设备的重定向下一跳信息。
可选地,该处理器520可以具体用于:确定该数据流的目的地址信息所对应的目的地址;将该网络设备的重定向下一跳信息转换为转发下一跳的信息;将由该目的地址和该转发下一跳的信息组成的转发表项添加至该网络设备的目标转发表。
可选地,如果该重定向路由指示还用于指示将该网络设备的重定向下一跳信息转换为转发下一跳的信息的转换方式,该处理器520可以根据该重定向路由指示所指示的转换方式,将该网络设备的重定向下一跳信息转换为转发下一跳的信息,但本发明实施例不限于此。
可选地,在该处理器520将由确定的目的地址和转发下一跳的信息组成的转发表项添 加至该网络设备的目标转发表时,该处理器520可以在该网络设备的目标转发表中存在包括该目的地址的目标转发表项时,将该目标转发表项中的转发下一跳的信息替换为该重定向下一跳信息对应的转发下一跳的信息;和/或在该网络设备的目标转发表中不存在包括该目的地址的目标转发表项时,在该目标转发表中创建由该目的地址和该转发下一跳的信息组成的转发表项。
可选地,该网络设备500还可以包括:发送器,用于在该接收器510接收控制设备发送的控制消息之前,向该控制设备发送第一能力信息,该第一能力信息用于指示该网络设备具有接收该重定向路由指示的能力;相应地,该接收器510还用于接收该控制设备发送的第二能力信息,该第二能力信息用于指示该控制设备具有发送该重定向路由指示的能力。
此时,该接收器510可以具体用于接收该控制设备根据该发送器发送的该第一能力信息发送的控制消息。
作为一个可选实施例,该发送器可以具体用于向该控制设备发送第一BGP OPEN消息,该第一BGP OPEN消息中携带该第一能力信息;
相应地,该接收器510可以具体用于接收该控制设备发送的第二BGP OPEN消息,该第二BGP OPEN消息携带该第二能力信息。
可选地,该处理器520还可以用于将由该数据流的重定向路由信息转换的转发表项的优先级设置为最高优先级。
可选地,该网络设备500还可以包括存储器,该存储器可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器的一部分还可以包括非易失性随机存取存储器。例如,存储器还可以存储设备类型的信息。
根据本发明实施例的网络设备500可对应于根据本发明实施例的用于重定向数据流的方法中的目标网络设备,并且网络设备500中的各个模块的上述和其它操作和/或功能分别为了实现上述方法实施例中与目标网络设备相对应的流程和/或步骤,为了简洁,在此不再赘述。
图9示意性地示出了本发明实施例提供的控制设备600。该控制设备600包括:
处理器610,用于确定数据流的重定向路由信息,该数据流的重定向路由信息包括该数据流的目的地址信息和目标网络设备的重定向下一跳信息;
发送器620,用于向该目标网络设备发送控制消息,该控制消息携带该处理器610确定的该数据流的重定向路由信息和重定向路由指示,该重定向路由指示用于指示将该数据流的重定向路由信息转换为目标转发表中的转发表项,其中,该目标转发表的表空间大于该目标网络设备的流规则转发表的表空间。
可选地,该重定向路由指示包括转换指示和转换说明,其中,该转换指示用于指示将该数据流的重定向路由信息进行转换处理,该转换说明用于说明该转换处理为将该数据流的重定向路由信息转换为该目标转发表中的转发表项。
可选地,该目标转发表具体可以为FIB。
可选地,在该目标转发表中,由该数据流的重定向路由信息转换的转发表项包括:该目的地址信息所对应的目的地址和该重定向下一跳信息所对应的转发下一跳的信息。
可选地,该重定向路由指示还用于指示将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息的转换方式。
此时,可选地,重定向路由指示还包括转换方式指示,该转换方式指示用于指示将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息的转换方式。
可选地,该重定向路由指示所指示的转换方式可以包括以下三种转换方式中的任意一种:
通过查询该目标网络设备的路由信息表,将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息;
通过查询该目标网络设备的流规则路由表,将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息;
先查询该目标网络设备的流规则路由表,并且在该流规则路由表中不存在该重定向下一跳信息匹配的路由表项时,通过查询该目标网络设备的路由信息表,将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息。
可选地,该控制消息为BGP FlowSpec消息。
作为一个可选实施例,若该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息包括扩展团体属性,该扩展团体属性中的流量动作字段用于承载该转换指示。
可选地,该转换指示可以占用该流量动作字段中的一个比特位。
作为一个可选实施例,若该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息中的广泛团体属性中的团体字段可以用于承载该转换说明。
作为一个可选实施例,该BGP FlowSpec消息中的广泛团体属性包括参数TLV,该参数TLV包括标记TLV,该标记TLV用于指示确定该重定向下一跳信息所对应的转发下一跳的信息的方式,即用于指示将该目标网络设备的重定向下一跳信息转换为转发下一跳的信息的转换方式。
例如,该标记TLV可以用于承载该重定向路由指示的转换方式指示。
作为一个可选实施例,如果该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息的MP_REACH_NLRI字段用于承载该数据流的目的地址信息。
作为一个可选实施例,如果该控制消息为BGP FlowSpec消息,该BGP FlowSpec消息的扩展团体属性可以包括Redirect to IP字段,该Redirect to IP字段可以用于承载该网络设备的重定向下一跳信息。
可选地,该控制设备600还包括:接收器,用于在该发送器620向该目标网络设备发送控制消息之前,接收该目标网络设备发送的第一能力信息,该第一能力信息用于指示该网络设备具有接收该重定向路由指示的能力;
相应地,该发送器620还用于向该目标网络设备发送第二能力信息,该第二能力信息用于指示该控制设备具有发送该重定向路由指示的能力。
此时,该发送器620可以根据该接收器接收到的该第一能力信息,向该目标网络设备发送该控制消息。
可选地,该接收器可以具体用于接收该目标网络设备发送的第一BGP OPEN消息,该第一BGP OPEN消息中携带该第一能力信息;
相应地,该发送器620可以具体用于向该目标网络设备发送第二BGP OPEN消息,该第二BGP OPEN消息携带该第二能力信息。
可选地,该控制设备600还可以包括存储器,该存储器可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器的一部分还可以包括非易失性随机存取存 储器。例如,存储器还可以存储设备类型的信息。
根据本发明实施例的控制设备600可对应于根据本发明实施例的用于重定向数据流的方法中的控制设备,并且控制设备600中的各个模块的上述和其它操作和/或功能分别为了实现上述方法实施例中与控制设备相对应的流程和/或步骤,为了简洁,在此不再赘述。
应理解,在本发明实施例中,处理器可以是中央处理单元(Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本发明实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器执行存储器中的指令,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。
图10示出了本发明实施例提供的用于重定向数据流的系统700。该系统700包括控制设备710和至少一个网络设备720,其中,可选地,该控制设备710可以具体为上述控制设备300,相应地,网络设备720可以具体为上述网络设备400;或者,该控制设备720可以具体为上述控制设备500,相应地,网络设备720可以具体为上述网络设备600,本发明实施例对此不做限定。
应理解,本文对各个实施例的描述侧重于强调各个实施例之间的不同之处,而未提及的相同或相似部分可以相互参考。
还应理解,在本发明实施例中,术语和/或仅仅是一种描述关联对象的关联关系,表示可以存在三种关系。例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符/,一般表示前后关联对象是一种或的关系。
本领域普通技术人员可以意识到,结合本文中所公开的实施例中描述的各方法步骤和单元,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各实施例的步骤及组成。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。本领域普通技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络 单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。

Claims (45)

  1. 一种用于重定向数据流的方法,其特征在于,包括:
    网络设备接收控制设备发送的控制消息,所述控制消息携带数据流的重定向路由信息和重定向路由指示,所述数据流的重定向路由信息包括所述数据流的目的地址信息和所述网络设备的重定向下一跳信息,所述重定向路由指示用于指示将所述数据流的重定向路由信息转换为目标转发表中的转发表项,其中,所述目标转发表的表空间大于所述网络设备的流规则转发表的表空间;
    所述网络设备根据所述重定向路由指示,将所述数据流的重定向路由信息转换为所述目标转发表中的转发表项。
  2. 根据权利要求1所述的方法,其特征在于,所述重定向路由指示包括转换指示和转换说明,其中,所述转换指示用于指示将所述数据流的重定向路由信息进行转换处理,所述转换说明用于说明所述转换处理为将所述数据流的重定向路由信息转换为转发表中的转发表项;
    所述网络设备根据所述转换指示和所述转换说明,将所述数据流的重定向路由信息转换为所述目标转发表中的转发表项。
  3. 根据权利要求2所述的方法,其特征在于,所述控制消息为边界网关协议BGP流规则FlowSpec消息,所述BGP FlowSpec消息的扩展团体属性中的流量动作字段用于承载所述转换指示。
  4. 根据权利要求2或3所述的方法,其特征在于,若所述控制消息为BGP FlowSpec消息,所述BGP FlowSpec消息的广泛团体属性中的团体字段用于承载所述转换说明。
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,在所述目标转发表中,由所述数据流的重定向路由信息转换的转发表项包括:所述目的地址信息所对应的目的地址和所述重定向下一跳信息所对应的转发下一跳的信息;
    所述重定向路由指示还包括指示将所述重定向下一跳信息转换至所述转发下一跳的信息的转换方式。
  6. 根据权利要求5所述的方法,其特征在于,所述重定向路由指示所指示的将所述重定向下一跳信息转换至所述转发下一跳的信息的转换方式包括:
    通过查询所述网络设备的路由信息表,将所述重定向下一跳信息转换为转发下一跳的信息;或
    通过查询所述网络设备的流规则路由表,将所述重定向下一跳信息转换为转发下一跳的信息;或
    先查询所述网络设备的流规则路由表,并且在所述流规则路由表中不存在所述重定向下一跳信息匹配的路由表项时,通过查询所述网络设备的路由信息表,将所述重定向下一跳信息转换为转发下一跳的信息。
  7. 根据权利要求5或6所述的方法,其特征在于,若所述控制消息为BGP FlowSpec消息,所述BGP FlowSpec消息中的广泛团体属性包括参数类型长度值TLV,所述参数TLV包括标记TLV,所述标记TLV用于指示将所述重定向下一跳信息转换至所述转发下一跳的信息的转换方式。
  8. 根据权利要求1至7中任一项所述的方法,其特征在于,所述网络设备根据所述 重定向路由指示,将所述数据流的重定向路由信息转换为所述目标转发表中的转发表项包括:
    所述网络设备确定所述数据流的目的地址信息所对应的目的地址;
    所述网络设备将所述网络设备的重定向下一跳信息转换为转发下一跳的信息;
    所述网络设备将由所述目的地址和所述转发下一跳的信息组成的转发表项添加至所述网络设备的目标转发表。
  9. 根据权利要求8所述的方法,其特征在于,若所述重定向路由指示还包括指示将所述重定向下一跳信息转换至所述转发下一跳的信息的转换方式,所述网络设备将所述网络设备的重定向下一跳信息转换为转发下一跳的信息包括:
    所述网络设备根据所述重定向路由指示所指示的转换方式,通过查询所述网络设备的路由信息表,将所述网络设备的重定向下一跳信息转换为转发下一跳的信息;或
    所述网络设备根据所述重定向路由指示所指示的转换方式,通过查询所述网络设备的流规则路由表,将所述网络设备的重定向下一跳信息转换为转发下一跳的信息;或
    所述网络设备根据所述重定向路由指示所指示的转换方式,先查询所述网络设备的流规则路由表,并且在所述流规则路由表中不存在所述重定向下一跳信息匹配的路由表项时,通过查询所述网络设备的路由信息表,将所述网络设备的重定向下一跳信息转换为转发下一跳的信息。
  10. 根据权利要求8或9所述的方法,其特征在于,所述网络设备将由所述目的地址和所述转发下一跳的信息组成的转发表项添加至所述网络设备的目标转发表包括:
    若所述网络设备的目标转发表中存在包括所述目的地址的目标转发表项,所述网络设备将所述目标转发表项中的转发下一跳的信息替换为所述重定向下一跳信息对应的转发下一跳的信息;和/或
    若所述网络设备的目标转发表中不存在包括所述目的地址的目标转发表项,所述网络设备在所述目标转发表中创建由所述目的地址和所述转发下一跳的信息组成的转发表项。
  11. 根据权利要求1至10中任一项所述的方法,其特征在于,在所述网络设备接收控制设备发送的控制消息之前,所述方法还包括:
    所述网络设备向所述控制设备发送第一能力信息,所述第一能力信息用于指示所述网络设备具有接收所述重定向路由指示的能力;
    所述网络设备接收所述控制设备发送的第二能力信息,所述第二能力信息用于指示所述控制设备具有发送所述重定向路由指示的能力;
    所述网络设备接收控制设备发送的控制消息包括:
    所述网络设备接收所述控制设备根据所述第一能力信息发送的控制消息。
  12. 根据权利要求11所述的方法,其特征在于,所述网络设备向所述控制设备发送第一能力信息包括:
    所述网络设备向所述控制设备发送第一BGP开始OPEN消息,所述第一BGP OPEN消息中携带所述第一能力信息;
    所述网络设备接收所述控制设备发送的第二能力信息包括:
    所述网络设备接收所述控制设备发送的第二BGP OPEN消息,所述第二BGP OPEN消息携带所述第二能力信息。
  13. 根据权利要求1至12中任一项所述的方法,其特征在于,所述方法还包括:将 由所述数据流的重定向路由信息转换的转发表项的优先级设置为最高优先级。
  14. 一种用于重定向数据流的方法,其特征在于,包括:
    控制设备确定数据流的重定向路由信息,所述数据流的重定向路由信息包括所述数据流的目的地址信息和目标网络设备的重定向下一跳信息;
    所述控制设备向所述目标网络设备发送控制消息,所述控制消息携带所述数据流的重定向路由信息和重定向路由指示,所述重定向路由指示用于指示将所述数据流的重定向路由信息转换为目标转发表中的转发表项,其中,所述目标转发表的表空间大于所述目标网络设备的流规则转发表的表空间。
  15. 根据权利要求14所述的方法,其特征在于,所述重定向路由指示包括转换指示和转换说明,其中,所述转换指示用于指示将所述数据流的重定向路由信息进行转换处理,所述转换说明用于说明所述转换处理为将所述数据流的重定向路由信息转换为转发表中的转发表项。
  16. 根据权利要求15所述的方法,其特征在于,所述控制消息为边界网关协议BGP流规则FlowSpec消息,所述BGP FlowSpec消息的扩展团体属性中的流量动作字段用于承载所述转换指示。
  17. 根据权利要求15或16所述的方法,其特征在于,若所述控制消息为BGP FlowSpec消息,所述BGP FlowSpec消息的广泛团体属性中的团体字段用于承载所述转换说明。
  18. 根据权利要求14至17中任一项所述的方法,其特征在于,在所述目标转发表中,由所述数据流的重定向路由信息转换的转发表项包括:所述目的地址信息所对应的目的地址和所述重定向下一跳信息所对应的转发下一跳的信息;
    所述重定向路由指示还包括指示将所述重定向下一跳信息转换至所述转发下一跳的信息的转换方式。
  19. 根据权利要求18所述的方法,其特征在于,所述重定向路由指示所指示的将所述重定向下一跳信息转换至所述转发下一跳的信息的转换方式包括:
    通过查询所述网络设备的路由信息表,将所述重定向下一跳信息转换为转发下一跳的信息;或
    通过查询所述网络设备的流规则路由表,将所述重定向下一跳信息转换为转发下一跳的信息;或
    先查询所述网络设备的流规则路由表,并且在所述流规则路由表中不存在所述重定向下一跳信息匹配的路由表项时,通过查询所述网络设备的路由信息表,将所述重定向下一跳信息转换为转发下一跳的信息。
  20. 根据权利要求18或19所述的方法,其特征在于,若所述控制消息为BGP FlowSpec消息,所述BGP FlowSpec消息中的广泛团体属性包括参数类型长度值TLV,所述参数TLV包括标记TLV,所述标记TLV用于指示将所述重定向下一跳信息转换为转发下一跳的信息的转换方式。
  21. 根据权利要求14至20中任一项所述的方法,其特征在于,在所述控制设备向所述目标网络设备发送控制消息之前,所述方法还包括:
    所述控制设备接收所述目标网络设备发送的第一能力信息,所述第一能力信息用于指示所述网络设备具有接收所述重定向路由指示的能力;
    所述控制设备向所述目标网络设备发送第二能力信息,所述第二能力信息用于指示所 述控制设备具有发送所述重定向路由指示的能力;
    所述控制设备向所述目标网络设备发送控制消息包括:
    所述控制设备根据接收到的所述第一能力信息,向所述目标网络设备发送所述控制消息。
  22. 根据权利要求21所述的方法,其特征在于,所述控制设备接收所述目标网络设备发送的第一能力信息包括:
    所述控制设备接收所述目标网络设备发送的第一BGP开始OPEN消息,所述第一BGP OPEN消息中携带所述第一能力信息;
    所述控制设备向所述目标网络设备发送第二能力信息包括:
    所述控制设备向所述目标网络设备发送第二BGP OPEN消息,所述第二BGP OPEN消息携带所述第二能力信息。
  23. 一种网络设备,其特征在于,包括:
    接收单元,用于接收控制设备发送的控制消息,所述控制消息携带数据流的重定向路由信息和重定向路由指示,所述数据流的重定向路由信息包括所述数据流的目的地址信息和所述网络设备的重定向下一跳信息,所述重定向路由指示用于指示将所述数据流的重定向路由信息转换为目标转发表中的转发表项,其中,所述目标转发表的表空间大于所述网络设备的流规则转发表的表空间;
    处理单元,用于根据所述接收单元接收到的所述重定向路由指示,将所述数据流的重定向路由信息转换为所述目标转发表中的转发表项。
  24. 根据权利要求23所述的网络设备,其特征在于,所述重定向路由指示包括转换指示和转换说明,其中,所述转换指示用于指示将所述数据流的重定向路由信息进行转换处理,所述转换说明用于说明所述转换处理为将所述数据流的重定向路由信息转换为转发表中的转发表项;
    所述处理单元具体用于根据所述转换指示和所述转换说明,将所述数据流的重定向路由信息转换为所述目标转发表中的转发表项。
  25. 根据权利要求24所述的网络设备,其特征在于,所述控制消息为边界网关协议BGP流规则FlowSpec消息,所述BGP FlowSpec消息的扩展团体属性中的流量动作字段用于承载所述转换指示。
  26. 根据权利要求24或25所述的网络设备,其特征在于,若所述控制消息为BGP FlowSpec消息,所述BGP FlowSpec消息的广泛团体属性中的团体字段用于承载所述转换说明。
  27. 根据权利要求23至26中任一项所述的网络设备,其特征在于,在所述目标转发表中,由所述数据流的重定向路由信息转换的转发表项包括:所述目的地址信息所对应的目的地址和所述重定向下一跳信息所对应的转发下一跳的信息;
    所述重定向路由指示还包括指示将所述重定向下一跳信息转换至所述转发下一跳的信息的转换方式。
  28. 根据权利要求27所述的网络设备,其特征在于,所述重定向路由指示所指示的将所述重定向下一跳信息转换至所述转发下一跳的信息的转换方式,包括:
    通过查询所述网络设备的路由信息表,将所述重定向下一跳信息转换为转发下一跳的信息;或
    通过查询所述网络设备的流规则路由表,将所述重定向下一跳信息转换为转发下一跳的信息;或
    先查询所述网络设备的流规则路由表,并且在所述流规则路由表中不存在所述重定向下一跳信息匹配的路由表项时,通过查询所述网络设备的路由信息表,将所述重定向下一跳信息转换为转发下一跳的信息。
  29. 根据权利要求27或28所述的网络设备,其特征在于,若所述控制消息为BGP FlowSpec消息,所述BGP FlowSpec消息中的广泛团体属性包括参数类型长度值TLV,所述参数TLV包括标记TLV,所述标记TLV用于指示将所述重定向下一跳信息转换为转发下一跳的信息的转换方式。
  30. 根据权利要求23至29中任一项所述的网络设备,其特征在于,所述处理单元具体用于:
    确定所述数据流的目的地址信息所对应的目的地址;
    将所述网络设备的重定向下一跳信息转换为转发下一跳的信息;
    将由所述目的地址和所述转发下一跳的信息组成的转发表项添加至所述网络设备的目标转发表。
  31. 根据权利要求30所述的网络设备,其特征在于,若所述重定向路由指示还包括指示将所述重定向下一跳信息转换至所述转发下一跳的信息的转换方式,所述处理单元具体用于:
    根据所述重定向路由指示所指示的转换方式,通过查询所述网络设备的路由信息表,将所述网络设备的重定向下一跳信息转换为转发下一跳的信息;或
    根据所述重定向路由指示所指示的转换方式,通过查询所述网络设备的流规则路由表,将所述网络设备的重定向下一跳信息转换为转发下一跳的信息;或
    根据所述重定向路由指示所指示的转换方式,先查询所述网络设备的流规则路由表,并且在所述流规则路由表中不存在所述重定向下一跳信息匹配的路由表项时,通过查询所述网络设备的路由信息表,将所述网络设备的重定向下一跳信息转换为转发下一跳的信息。
  32. 根据权利要求30或31所述的网络设备,其特征在于,所述处理单元具体用于:
    若所述网络设备的目标转发表中存在包括所述目的地址的目标转发表项,将所述目标转发表项中的转发下一跳的信息替换为所述重定向下一跳信息对应的转发下一跳的信息;和/或
    若所述网络设备的目标转发表中不存在包括所述目的地址的目标转发表项,在所述目标转发表中创建由所述目的地址和所述转发下一跳的信息组成的转发表项。
  33. 根据权利要求23至32中任一项所述的网络设备,其特征在于,所述网络设备还包括:
    发送单元,用于在所述接收单元接收控制设备发送的控制消息之前,向所述控制设备发送第一能力信息,所述第一能力信息用于指示所述网络设备具有接收所述重定向路由指示的能力;
    所述接收单元还用于接收所述控制设备发送的第二能力信息,所述第二能力信息用于指示所述控制设备具有发送所述重定向路由指示的能力;
    所述接收单元具体用于接收所述控制设备根据所述发送单元发送的所述第一能力信 息发送的控制消息。
  34. 根据权利要求33所述的网络设备,其特征在于,所述发送单元具体用于向所述控制设备发送第一BGP开始OPEN消息,所述第一BGP OPEN消息中携带所述第一能力信息;
    所述接收单元具体用于接收所述控制设备发送的第二BGP OPEN消息,所述第二BGP OPEN消息携带所述第二能力信息。
  35. 根据权利要求23至34中任一项所述的网络设备,其特征在于,所述处理单元还用于将由所述数据流的重定向路由信息转换的转发表项的优先级设置为最高优先级。
  36. 一种控制设备,其特征在于,包括:
    处理单元,用于确定数据流的重定向路由信息,所述数据流的重定向路由信息包括所述数据流的目的地址信息和目标网络设备的重定向下一跳信息;
    发送单元,用于向所述目标网络设备发送控制消息,所述控制消息携带所述处理单元确定的所述数据流的重定向路由信息和重定向路由指示,所述重定向路由指示用于指示将所述数据流的重定向路由信息转换为目标转发表中的转发表项,其中,所述目标转发表的表空间大于所述目标网络设备的流规则转发表的表空间。
  37. 根据权利要求36所述的控制设备,其特征在于,所述重定向路由指示包括转换指示和转换说明,其中,所述转换指示用于指示将所述数据流的重定向路由信息进行转换处理,所述转换说明用于说明所述转换处理为将所述数据流的重定向路由信息转换为转发表中的转发表项。
  38. 根据权利要求37所述的控制设备,其特征在于,所述控制消息为边界网关协议BGP流规则FlowSpec消息,所述BGP FlowSpec消息的扩展团体属性中的流量动作字段用于承载所述转换指示。
  39. 根据权利要求37或38所述的控制设备,其特征在于,若所述控制消息为BGP FlowSpec消息,所述BGP FlowSpec消息的广泛团体属性中的团体字段用于承载所述转换说明。
  40. 根据权利要求36至39中任一项所述的控制设备,其特征在于,在所述目标转发表中,由所述数据流的重定向路由信息转换的转发表项包括:所述目的地址信息所对应的目的地址和所述重定向下一跳信息所对应的转发下一跳的信息;
    所述重定向路由指示还包括指示将所述重定向下一跳信息转换至所述转发下一跳的信息的转换方式。
  41. 根据权利要求40所述的控制设备,其特征在于,所述重定向路由指示所指示的将所述重定向下一跳信息转换至所述转发下一跳的信息的转换方式,包括:
    通过查询所述网络设备的路由信息表,将所述重定向下一跳信息转换为转发下一跳的信息;或
    通过查询所述网络设备的流规则路由表,将所述重定向下一跳信息转换为转发下一跳的信息;或
    先查询所述网络设备的流规则路由表,并且在所述流规则路由表中不存在所述重定向下一跳信息匹配的路由表项时,通过查询所述网络设备的路由信息表,将所述重定向下一跳信息转换为转发下一跳的信息。
  42. 根据权利要求40或41所述的控制设备,其特征在于,若所述控制消息为BGP  FlowSpec消息,所述BGP FlowSpec消息中的广泛团体属性包括参数类型长度值TLV,所述参数TLV包括标记TLV,所述标记TLV用于指示将所述重定向下一跳信息转换为转发下一跳的信息的转换方式。
  43. 根据权利要求36至42中任一项所述的控制设备,其特征在于,所述控制设备还包括:
    接收单元,用于在所述发送单元向所述目标网络设备发送控制消息之前,接收所述目标网络设备发送的第一能力信息,所述第一能力信息用于指示所述网络设备具有接收所述重定向路由指示的能力;
    所述发送单元还用于向所述目标网络设备发送第二能力信息,所述第二能力信息用于指示所述控制设备具有发送所述重定向路由指示的能力;
    所述发送单元用于根据所述接收单元接收到的所述第一能力信息,向所述目标网络设备发送所述控制消息。
  44. 根据权利要求43所述的控制设备,其特征在于,所述接收单元具体用于接收所述目标网络设备发送的第一BGP开始OPEN消息,所述第一BGP OPEN消息中携带所述第一能力信息;
    所述发送单元具体用于向所述目标网络设备发送第二BGP OPEN消息,所述第二BGP OPEN消息携带所述第二能力信息。
  45. 一种用于重定向数据流的系统,其特征在于,包括:如权利要求23至35所述的网络设备和如权利要求36至44所述的控制设备。
PCT/CN2017/084373 2016-05-18 2017-05-15 用于重定向数据流的方法和系统、网络设备和控制设备 WO2017198131A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP17798694.0A EP3447976B1 (en) 2016-05-18 2017-05-15 Method and system for redirecting data stream, and network device and control device
EP22196755.7A EP4161025A1 (en) 2016-05-18 2017-05-15 Data flow redirection method and system, network device, and control device
US16/195,103 US10715430B2 (en) 2016-05-18 2018-11-19 Data flow redirection method and system, network device, and control device
US16/904,129 US11855887B2 (en) 2016-05-18 2020-06-17 Data flow redirection method and system, network device, and control device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610332658.1 2016-05-18
CN201610332658.1A CN107404439B (zh) 2016-05-18 2016-05-18 用于重定向数据流的方法和系统、网络设备和控制设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/195,103 Continuation US10715430B2 (en) 2016-05-18 2018-11-19 Data flow redirection method and system, network device, and control device

Publications (1)

Publication Number Publication Date
WO2017198131A1 true WO2017198131A1 (zh) 2017-11-23

Family

ID=60324847

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/084373 WO2017198131A1 (zh) 2016-05-18 2017-05-15 用于重定向数据流的方法和系统、网络设备和控制设备

Country Status (4)

Country Link
US (2) US10715430B2 (zh)
EP (2) EP4161025A1 (zh)
CN (1) CN107404439B (zh)
WO (1) WO2017198131A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11924103B2 (en) * 2020-09-22 2024-03-05 Huawei Technologies Co., Ltd. Traffic processing method, apparatus, and network device

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107404439B (zh) * 2016-05-18 2020-02-21 华为技术有限公司 用于重定向数据流的方法和系统、网络设备和控制设备
CN110324241B (zh) * 2018-03-30 2022-05-31 北京华为数字技术有限公司 一种流量转发路径的调整方法、报文转发方法和装置
US11658909B2 (en) * 2018-04-10 2023-05-23 Kentik Technologies, Inc. Analyzing network traffic by enriching inbound network flows with exit data
CN108965137B (zh) * 2018-07-20 2021-03-19 新华三技术有限公司 一种报文处理方法和装置
CN109510776B (zh) * 2018-10-12 2022-07-12 新华三技术有限公司合肥分公司 流量控制方法及装置
CN112751763A (zh) * 2019-10-30 2021-05-04 北京华为数字技术有限公司 一种报文转发方法、设备、存储介质及系统
US12095660B2 (en) * 2020-02-13 2024-09-17 Futurewei Technologies, Inc. Method for multi-segment flow specifications
CN116192777B (zh) * 2022-12-30 2024-06-04 中国联合网络通信集团有限公司 路径学习方法、装置及存储介质

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404612A (zh) * 2008-11-20 2009-04-08 杭州华三通信技术有限公司 实现数据流硬件转发的方法和系统以及网络路由设备
CN101582846A (zh) * 2009-06-10 2009-11-18 杭州华三通信技术有限公司 路由下发方法、报文转发方法、转发引擎和报文转发设备

Family Cites Families (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08242240A (ja) * 1995-03-06 1996-09-17 Hitachi Ltd Atm交換機およびパス切替方法
US7307990B2 (en) * 1999-01-19 2007-12-11 Cisco Technology, Inc. Shared communications network employing virtual-private-network identifiers
US7590119B2 (en) * 2005-01-27 2009-09-15 Cisco Technology, Inc. Method and apparatus for context-based prefix updates in border gateway protocol
US7768921B2 (en) * 2006-10-30 2010-08-03 Juniper Networks, Inc. Identification of potential network threats using a distributed threshold random walk
CN101212420B (zh) * 2006-12-27 2010-09-29 华为技术有限公司 重定向器、中继、路由信息配置系统及更新方法
CN101098308B (zh) * 2007-06-26 2012-04-25 华为技术有限公司 网络中节点负载分担的方法及系统
WO2009015578A1 (fr) * 2007-08-02 2009-02-05 Hangzhou H3C Technologies Co., Ltd. Procédé et dispositif de sécurité réseau servant à appliquer un traitement de sécurité à des paquets
GB0804920D0 (en) * 2008-03-17 2008-04-16 Ericsson Telefon Ab L M Method and apparatus for ethernet re-routing
CN101252523B (zh) * 2008-04-18 2011-07-20 杭州华三通信技术有限公司 报文重定向方法、还原重定向报文特征信息的方法及装置
CN101340372B (zh) * 2008-08-21 2012-09-19 中国移动通信集团公司 号码自动路由方法、更新方法、撤销方法、路由器及设备
US8320361B2 (en) * 2009-02-27 2012-11-27 Cisco Technology, Inc. Advertising alternate paths at border gateway protocol route reflectors
WO2011150074A2 (en) * 2010-05-26 2011-12-01 University Of Florida Research Foundation, Inc. Consistent updates for packet classification devices
JP5850471B2 (ja) * 2010-08-20 2016-02-03 日本電気株式会社 通信システム、制御装置、ノード制御方法およびプログラム
WO2012137501A1 (en) * 2011-04-04 2012-10-11 Nec Corporation Control server, network control method, and program
US8830820B2 (en) * 2011-10-14 2014-09-09 Google Inc. Semi-centralized routing
JP5797849B2 (ja) * 2011-11-03 2015-10-21 華為技術有限公司Huawei Technologies Co.,Ltd. ホストが仮想プライベートネットワークに参加/離脱するための境界ゲートウェイプロトコルの拡張
CN102447639B (zh) 2012-01-17 2016-03-09 华为技术有限公司 一种策略路由方法及装置
US9137142B2 (en) * 2012-03-31 2015-09-15 Juniper Networks, Inc. Reduced traffic loss for border gateway protocol sessions in multi-homed network connections
US20150334024A1 (en) * 2012-04-20 2015-11-19 Jeffrey Clifford Mogul Controlling Data Rates of Data Flows Based on Information Indicating Congestion
US8909736B1 (en) * 2012-07-12 2014-12-09 Juniper Networks, Inc. Content delivery network referral
US9847910B2 (en) * 2012-08-31 2017-12-19 Bce Inc. IP MPLS PoP virtualization and fault tolerant virtual router
WO2014052485A1 (en) * 2012-09-26 2014-04-03 Huawei Technologies Co. Ltd. Overlay virtual gateway for overlay networks
CN102946354B (zh) * 2012-11-15 2016-11-23 华为技术有限公司 一种报文转发的方法、装置及网络设备
CN103874157B (zh) * 2012-12-12 2017-07-07 华为技术有限公司 路由转发、建立路由表、和获取内容的方法及其装置
US20150003458A1 (en) * 2013-06-27 2015-01-01 Futurewei Technologies, Inc. Boarder Gateway Protocol Signaling to Support a Very Large Number of Virtual Private Networks
US9485187B2 (en) * 2013-07-08 2016-11-01 Futurewei Technologies, Inc. Intelligent software-defined networking based service paths
CN105450525B (zh) * 2014-05-28 2018-05-01 国际商业机器公司 用于路由交换设备使用的方法和设备
US9634936B2 (en) * 2014-06-30 2017-04-25 Juniper Networks, Inc. Service chaining across multiple networks
WO2016000184A1 (zh) * 2014-06-30 2016-01-07 华为技术有限公司 一种交换机模式切换方法、设备及系统
US20180048593A1 (en) * 2015-02-17 2018-02-15 Hewlett Packard Enterprise Development Lp Flow entry generating and packet processing based on flow entry
US9699064B2 (en) * 2015-07-20 2017-07-04 Telefonaktiebolaget Lm Ericsson (Publ) Method and an apparatus for network state re-construction in software defined networking
CN107404439B (zh) * 2016-05-18 2020-02-21 华为技术有限公司 用于重定向数据流的方法和系统、网络设备和控制设备

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404612A (zh) * 2008-11-20 2009-04-08 杭州华三通信技术有限公司 实现数据流硬件转发的方法和系统以及网络路由设备
CN101582846A (zh) * 2009-06-10 2009-11-18 杭州华三通信技术有限公司 路由下发方法、报文转发方法、转发引擎和报文转发设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3447976A4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11924103B2 (en) * 2020-09-22 2024-03-05 Huawei Technologies Co., Ltd. Traffic processing method, apparatus, and network device

Also Published As

Publication number Publication date
US10715430B2 (en) 2020-07-14
US20190104060A1 (en) 2019-04-04
CN107404439A (zh) 2017-11-28
EP4161025A1 (en) 2023-04-05
CN107404439B (zh) 2020-02-21
EP3447976A1 (en) 2019-02-27
US20200389395A1 (en) 2020-12-10
US11855887B2 (en) 2023-12-26
EP3447976A4 (en) 2019-07-31
EP3447976B1 (en) 2023-05-03

Similar Documents

Publication Publication Date Title
WO2017198131A1 (zh) 用于重定向数据流的方法和系统、网络设备和控制设备
US10601707B2 (en) Segment routing using a remote forwarding adjacency identifier
JP7520170B2 (ja) パケット処理方法および装置、デバイス、ならびにシステム
US10164838B2 (en) Seamless segment routing
US10749794B2 (en) Enhanced error signaling and error handling in a network environment with segment routing
US9954779B2 (en) Method, apparatus, and system for supporting flexible lookup keys in software-defined networks
EP3402141B1 (en) Virtual private network (vpn) service optimization method and device
US8665887B2 (en) Number automatic routing method, updating method, withdrawing method, router and device
CN106059924B (zh) 一种管理信息的方法,装置及系统
CN107770073B (zh) 一种信息同步的方法,装置及系统
WO2021000848A1 (zh) 一种报文转发方法、报文处理方法及装置
CN112118178B (zh) 网络装置和用于ip网络中基于类别的流量工程的方法
CN111837368B (zh) 使用内部网关协议通告和编程优选路径路由
WO2020021558A1 (en) Methods, apparatus and machine-readable media relating to path computation in a communication network
Tatipamula et al. TRANSMISSION CONTROL PROTOCOL/INTERNET PROTOCOL OVERVIEW

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2017798694

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2017798694

Country of ref document: EP

Effective date: 20181123

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17798694

Country of ref document: EP

Kind code of ref document: A1