WO2022237879A1 - 一种路由获取方法、装置、存储介质及电子装置 - Google Patents

一种路由获取方法、装置、存储介质及电子装置 Download PDF

Info

Publication number
WO2022237879A1
WO2022237879A1 PCT/CN2022/092504 CN2022092504W WO2022237879A1 WO 2022237879 A1 WO2022237879 A1 WO 2022237879A1 CN 2022092504 W CN2022092504 W CN 2022092504W WO 2022237879 A1 WO2022237879 A1 WO 2022237879A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
policy
traffic
extended
action
Prior art date
Application number
PCT/CN2022/092504
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 EP22806841.7A priority Critical patent/EP4340318A1/en
Publication of WO2022237879A1 publication Critical patent/WO2022237879A1/zh

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/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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects
    • 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/34Source 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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Definitions

  • Embodiments of the present disclosure relate to the communication field, and in particular, relate to a method for acquiring a route, a method for sending a route, a device storage medium, and an electronic device.
  • Routing table entries only contain prefix mask information for destination address matching and traffic outbound interface information. Later, with the needs of network business development (such as anti-DDOS attacks, traffic engineering) , support traffic policy (such as: static policy routing, etc.), need to forward routing table items to be able to further subdivide the data flow, not limited to match the data flow according to the destination address, but also include the source address, ip protocol number, port number, etc. ; The processing action information on the flow is not limited to forwarding from a certain outgoing interface, but also includes processing actions such as rate limiting, discarding, and redirection.
  • the biggest limitation of policy routing is that it is a local behavior and needs to be configured on a device-by-device basis. Manual configuration requires a lot of work, high requirements for operation and maintenance personnel, and poor maintainability of network optimization.
  • Embodiments of the present disclosure provide a method for obtaining a route, a method for sending a route, a device storage medium, and an electronic device, so as to at least solve the problem of poor network optimization in the related art.
  • a method for obtaining a route including:
  • Flowspec route from the controller, wherein the Flowspec route includes a target rule, and the target rule is used to indicate that the received traffic is redirected to one or more target traffic engineering paths SR-Policy.
  • the method further includes:
  • the target rule includes a target condition and a target action, wherein the target condition includes a condition for matching the traffic, and the target action is to match the traffic Information about the actions performed by the traffic.
  • the target condition is carried in network layer reachability information NIRL contained in the Flowspec route.
  • the target action is carried in the extended community attribute included in the Flowspec route.
  • the extended community attribute includes a target bit, and the target bit is used to identify a target relationship between the extended community attribute and other received community attributes, wherein the target relationship It includes one of the following: the extended community attribute covers the other community attributes, and the extended community attribute coexists with the other community attributes.
  • the extended community attribute and the other community attributes are sent by the controller at the same moment or at different moments.
  • the extended community attribute and the other community attributes are set for the same group of flows or the same service.
  • the extended community attribute includes a target field, where the value of the target field is a predetermined value, and the predetermined value is used to indicate the identification type of the target SR-Policy.
  • the predetermined value includes at least one of the following:
  • Type value of local ID predefined type value.
  • the extended community attribute includes the identification of the SR-Policy, wherein the meaning of the SR-Policy group identified in the local ID or the predefined type value is the meaning of the SR-Policy group
  • the identifier of the SR-Policy group is carried in the SR-Policy identifier field.
  • the Flowspec route further includes an extended tunnel encapsulation attribute, and when the target SR-Policy includes the SR-Policy type identified by the predetermined value, the tunnel encapsulation attribute is used to Identify the member SR-Policies in the target SR-Policy group.
  • the Flowspec route further includes an extended tunnel encapsulation attribute, and the target action is jointly carried by the extended community attribute and the extended tunnel encapsulation attribute.
  • the redirecting the received traffic to the target SR-Policy based on the target rule includes:
  • the traffic is processed according to the target action, so as to redirect the traffic to the target SR-Policy.
  • Matching the traffic according to the target condition includes: matching the traffic in a pre-generated first flow matching entry, where the first flow matching entry includes a corresponding target condition and a target action,
  • the target condition is used to indicate matching information
  • the target action is used to indicate SR-Policy;
  • processing the traffic according to the target action so as to redirect the traffic to the target SR-Policy includes: in the pre-generated first If the first-class matching entry matches the traffic, redirect the traffic to the target SR-Policy included in the first flow matching entry.
  • the method further includes:
  • the target action corresponding to the traffic is not matched in the pre-generated first flow matching entry, sending a first instruction to a processor to instruct the processor to generate a second flow matching entry, wherein, the second flow matching entry includes information for indicating the target condition.
  • the method also includes:
  • the first flow matching entry is deleted based on the second instruction.
  • a method for sending a route including:
  • Flowspec route Sending a flow specification Flowspec route to the target client, wherein the Flowspec route includes a target rule, and the target rule is used to indicate that the received traffic is redirected to one or more target traffic engineering paths SR-Policy.
  • the method also includes:
  • the target rule includes a target condition and a target action, wherein the target condition includes a condition for matching the traffic, and the target action is action information performed on the traffic after the traffic is matched.
  • the target action is carried in the extended community attribute contained in the Flowspec route.
  • the extended community attribute includes a target field, where the value of the target field is a predetermined value, and the predetermined value is used to indicate the identification type of the target SR-Policy.
  • the extended community attribute includes the identification of the SR-Policy, wherein the meaning of the SR-Policy group identified in the local ID or the predefined type value is the meaning of the SR-Policy group
  • the identifier of the SR-Policy group is carried in the SR-Policy identifier field.
  • a device for obtaining a route including:
  • An acquisition module configured to acquire a flow specification Flowspec route from the controller, wherein the Flowspec route contains a target rule, and the target rule is used to indicate that the received traffic is redirected to one or more target traffic engineering paths SR-Policy.
  • a device for sending a route including:
  • a sending module configured to send a flow specification Flowspec route to a target client, wherein the Flowspec route contains a target rule, and the target rule is used to indicate that the received traffic is redirected to one or more target traffic engineering paths SR-Policy.
  • a computer-readable storage medium wherein a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to perform any one of the above-mentioned methods when running Steps in the examples.
  • an electronic device including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to perform any of the above Steps in the method examples.
  • FIG. 1 is a flowchart of a method for obtaining a route according to an embodiment of the present disclosure
  • FIG. 2 is a flow chart of a route sending method according to an embodiment of the present disclosure
  • Fig. 3 is a structural block diagram of a device for obtaining a route according to an embodiment of the present disclosure
  • FIG. 4 is a structural block diagram of a route sending device according to an embodiment of the present disclosure.
  • Fig. 5 is a schematic structural diagram according to Embodiment 1 of the present disclosure.
  • FIG. 6 is a flow chart according to Embodiment 1 of the present disclosure.
  • Fig. 7 is a schematic diagram of an extended community attribute structure according to a specific embodiment of the present disclosure.
  • Fig. 8 is a schematic diagram of an extended tunnel encapsulation attribute structure according to a specific embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram according to Embodiment 2 of the present disclosure.
  • Fig. 10 is a schematic structural diagram according to Embodiment 5 of the present disclosure.
  • the method embodiments provided in the embodiments of this application can be executed in mobile terminals, computer terminals, or similar devices, where similar devices include but not limited to switches, routers and other interactive devices; mobile terminals can be (but not limited to)
  • mobile phone can also be other equipment with remote communication function.
  • FIG. 1 is a flowchart of a method for obtaining a route according to an embodiment of the present disclosure. As shown in FIG. 1 , the process includes the following steps:
  • Step S202 obtaining a flow specification Flowspec route from the controller, wherein the Flowspec route includes a target rule, and the target rule is used to indicate that the received traffic is redirected to one or more target traffic engineering paths SR-Policy.
  • the controller since the controller sends the Flowspec route containing the target rule to the client, the client can match and filter the traffic according to the target rule, and send the filtered traffic to the processing node corresponding to the target rule, Therefore, the optimization of the traffic transmission path can be realized, and the traffic processing efficiency is improved.
  • the controller can be a device, module or node with logic computing functions, such as CPU, FPGA, etc.
  • the client can be one or more nodes on the SR-Policy
  • the sending of the Flowspec route can be multiple simultaneous sending , can also be sent in sequence, or sent one by one.
  • the controller since the controller sends the Flowspec route containing the target rule to the client, the client can match and filter the traffic according to the target rule, and send the filtered traffic to the processing node corresponding to the target rule, so that Realize the rapid optimization of the path, so as to realize the adjustment and optimization of the traffic path, solve the problem of poor network optimization in related technologies, and improve the efficiency of network optimization; and because the Flowspec route containing the target rule can be in the same One or more Flowspec routes can be sent at different times or at different times, so the same service or traffic received at the same time or at different times can be redirected to one or more SR-policies, which improves the traffic or the same Business processing efficiency.
  • the execution subject of the above steps may be a base station, a terminal, etc., but is not limited thereto.
  • the method further includes:
  • Step S204 after receiving the traffic, redirect the traffic to one or more target SR-Policies based on the target rules.
  • the traffic is matched and filtered according to the target rule, and the filtered traffic is sent to the target SR-Policy to realize traffic redirection.
  • the target rule includes a target condition and a target action, wherein the target condition includes a condition for matching the traffic, and the target action is action information performed on the traffic after the traffic is matched.
  • the conditions for matching the traffic may include (but not limited to) the source address SA of the message, the destination address DA, the format encoding format of the traffic, the identification of the traffic itself, and DSCP (Differentiated Services Code Point, differentiated services code point), etc.; information on actions performed on traffic includes (but is not limited to) information such as instructions for forwarding, identifying, encoding, decoding, and storing operations on traffic, target addresses, and storage locations.
  • DSCP Differentiated Services Code Point, differentiated services code point
  • the target condition is carried in the network layer reachability information NIRL included in the Flowspec route.
  • the target action is carried in the extended community attribute contained in the Flowspec route.
  • the extended community attribute includes a target bit, and the target bit is used to identify a target relationship between the extended community attribute and other received community attributes, wherein the target relationship includes one of the following: The extended community attribute overrides other community attributes, and the extended community attribute coexists with other community attributes.
  • it can be set (but not limited to) in the following way: when the target bit is set to 1, it means that for the same matching condition, the node will generate a new filter rule and will not overwrite the previously generated filter rule Rule; when the target bit is not set, it means that for the same matching condition, the node will only generate one filtering rule, overriding the previously generated filtering rule.
  • the extended community attribute and other community attributes are sent by the controller at the same time or at different times.
  • the extended community attribute and other community attributes are set for the same group of flows or the same service.
  • the extended community attribute includes a target field, where the value of the target field is a predetermined value, and the predetermined value is used to indicate the identification type of the target SR-Policy.
  • the target field may be ID-Type (ID type), or other fields.
  • the predetermined value includes at least one of the following:
  • Type value of local ID predefined type value.
  • the predetermined value can also be the following values:
  • Tunnel ID the corresponding Generalized indirection_id is the tunnel ID.
  • the extended community attribute includes the identification of SR-Policy, wherein, when the local ID identifies the meaning of the SR-Policy group or the predefined type value is the meaning of the SR-Policy group Next, the ID of the SR-Policy group is carried in the SR-Policy ID field.
  • the SR-Policy identification field used to identify the meaning of the SR-Policy group and its member SR-Policies needs to be set in the Flowspec route.
  • the Flowspec route also includes an extended tunnel encapsulation attribute.
  • the tunnel encapsulation attribute is used to identify the target SR-Policy group A member of SR-Policy.
  • the extended tunnel encapsulation attribute can be set, and the extended tunnel encapsulation attribute and the extended community attribute can be jointly carried Action information for the target action.
  • the Flowspec route further includes an extended tunnel encapsulation attribute, and the target action is jointly carried by the extended community attribute and the extended tunnel encapsulation attribute.
  • redirecting the received traffic to the target SR-Policy includes:
  • Step S2042 matching the traffic according to the target condition
  • Step S2044 if the target action corresponding to the traffic is matched, process the traffic according to the target action, so as to redirect the traffic to the target SR-Policy.
  • Matching the traffic according to the target condition includes: matching the traffic in a pre-generated first flow matching entry, wherein the first flow matching entry includes a corresponding target condition and a target action, and the target condition is used to indicate matching information, The target action is used to indicate the SR-Policy;
  • processing the traffic according to the target action to redirect the traffic to the target SR-Policy includes: in the case of matching the traffic in the pre-generated first flow matching entry , redirecting the traffic to the target SR-Policy included in the first flow matching entry.
  • the creation of the first flow matching may be created in the controller, and sent by the controller to the client along with the Flowspec route.
  • the method further includes:
  • the target action corresponding to the traffic is not matched, it is sent to the CPU to trigger the generation of the relevant second flow matching entry.
  • its forwarding action copies the aforementioned latest issued BGP-FS for SRv6 Policy (such as SRv6 Policy-2 delivered at T2).
  • the method also includes:
  • Step S206 receiving a second instruction from the processor
  • Step S208 delete the first flow matching entry based on the second instruction.
  • the platform needs to collect traffic statistics of a specific "flow entry" on the forwarding plane. If no new traffic is found within a certain period of time, the specific "flow entry" will be aged and a delete command will be issued to the forwarding plane. to instruct the forwarding plane to delete a specific flow entry.
  • this embodiment also provides a route sending method, including:
  • Step S302 sending a flow specification Flowspec route to the target client, wherein the Flowspec route includes a target rule, and the target rule is used to indicate that the received traffic is redirected to one or more target traffic engineering paths SR-Policy.
  • the target rule includes a target condition and a target action, wherein the target condition includes a condition for matching the traffic, and the target action is action information performed on the traffic after the traffic is matched.
  • the target condition is carried in the network layer reachability information NIRL included in the Flowspec route.
  • the target action is carried in the extended community attribute contained in the Flowspec route.
  • the extended community attribute includes a target bit, and the target bit is used to identify a target relationship between the extended community attribute and other received community attributes, wherein the target relationship includes one of the following: The extended community attribute overrides other community attributes, and the extended community attribute coexists with other community attributes.
  • the extended community attribute and other community attributes are sent by the controller at the same time or at different times.
  • the extended community attribute and other community attributes are set for the same group of flows or the same service.
  • the extended community attribute includes a target field, where the value of the target field is a predetermined value, and the predetermined value is used to indicate the identification type of the target SR-Policy.
  • the predetermined value includes at least one of the following:
  • Type value of local ID predefined type value.
  • the extended community attribute includes the identification of SR-Policy, wherein, when the local ID identifies the meaning of the SR-Policy group or the predefined type value is the meaning of the SR-Policy group Next, the ID of the SR-Policy group is carried in the SR-Policy ID field.
  • the Flowspec route also includes an extended tunnel encapsulation attribute.
  • the tunnel encapsulation attribute is used to identify the target SR-Policy Members of the group SR-Policy.
  • the Flowspec route further includes an extended tunnel encapsulation attribute, and the target action is jointly carried by the extended community attribute and the extended tunnel encapsulation attribute.
  • the method according to the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is Better implementation.
  • the technical solution of the present disclosure can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to enable a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present disclosure.
  • This embodiment also provides a device for obtaining a route, which is configured to implement the above embodiments and preferred implementation modes, and what has been described will not be repeated here.
  • the term "module” may be a combination of software and/or hardware that realizes a predetermined function.
  • the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
  • Fig. 3 is a structural block diagram of a device for obtaining a route according to an embodiment of the present disclosure. As shown in Fig. 3 , the device includes:
  • the obtaining module 42 is configured to obtain the flow specification Flowspec route from the controller, wherein the Flowspec route contains target rules, and the target rules are used to indicate that the received traffic is redirected to one or more target traffic engineering paths SR-Policy .
  • the device also includes:
  • the redirection module 44 is configured to redirect the traffic to the target SR-Policy based on the target rule after obtaining the flow specification Flowspec route from the controller and after receiving the traffic.
  • the target rule includes a target condition and a target action, wherein the target condition includes a condition for matching the traffic, and the target action is action information performed on the traffic after the traffic is matched.
  • the target condition is carried in the network layer reachability information NIRL included in the Flowspec route.
  • the target action is carried in the extended community attribute contained in the Flowspec route.
  • the extended community attribute includes a target bit, and the target bit is used to identify a target relationship between the extended community attribute and other received community attributes, wherein the target relationship includes one of the following: The extended community attribute overrides other community attributes, and the extended community attribute coexists with other community attributes.
  • the extended community attribute and other community attributes are sent by the controller at the same time or at different times.
  • the extended community attribute and other community attributes are set for the same group of flows or the same service.
  • the extended community attribute includes a target field, where the value of the target field is a predetermined value, and the predetermined value is used to indicate the identification type of the target SR-Policy.
  • the predetermined value includes at least one of the following:
  • Type value of local ID predefined type value.
  • the extended community attribute includes the identification of SR-Policy, wherein, when the local ID identifies the meaning of the SR-Policy group or the predefined type value is the meaning of the SR-Policy group Next, the ID of the SR-Policy group is carried in the SR-Policy ID field.
  • the Flowspec route also includes an extended tunnel encapsulation attribute.
  • the tunnel encapsulation attribute is used to identify the target SR-Policy group A member of SR-Policy.
  • the extended tunnel encapsulation attribute can be set, and the extended tunnel encapsulation attribute and the extended community attribute can be jointly carried Action information for the target action.
  • the Flowspec route further includes an extended tunnel encapsulation attribute, and the target action is jointly carried by the extended community attribute and the extended tunnel encapsulation attribute.
  • the redirection module 44 includes:
  • the matching unit 42 is configured to match the traffic according to the target condition
  • the redirection unit 44 is configured to process the traffic according to the target action if the target action corresponding to the traffic is matched, so as to redirect the traffic to the target SR-Policy.
  • Matching unit 42 includes:
  • the first entry matching subunit 422 is configured to match the traffic in the pre-generated first flow matching entry, where the first flow matching entry includes the corresponding target condition and target action, and the target condition is used to indicate the matching Information, the target action is used to indicate SR-Policy;
  • Redirection unit 44 includes:
  • the redirection subunit 442 is configured to redirect the traffic to the target SR-Policy included in the first flow matching entry when the traffic is matched in the pre-generated first flow matching entry.
  • the device also includes:
  • the second table entry generation unit 424 is configured to, after performing address matching on traffic in the pre-generated first flow matching table entry, if no target action corresponding to the traffic is matched in the pre-generated first flow matching table entry, send The processor sends the first instruction to instruct the processor to generate a second flow matching entry, where the second flow matching entry includes a condition for indicating a target.
  • the device also includes:
  • An instruction receiving module 46 configured to receive a second instruction from the processor
  • the entry deletion module 48 is configured to delete the first flow matching entry based on the second instruction.
  • Fig. 4 is a structural block diagram of a routing sending device according to an embodiment of the present disclosure. As shown in Fig. 4, the device includes:
  • the sending module 52 is configured to send a flow specification Flowspec route to the target client, wherein the Flowspec route contains a target rule, and the target rule is used to indicate that the received traffic is redirected to one or more target traffic engineering paths SR-Policy .
  • the target rule includes a target condition and a target action, wherein the target condition includes a condition for matching the traffic, and the target action is action information performed on the traffic after the traffic is matched.
  • the target condition is carried in the network layer reachability information NIRL included in the Flowspec route.
  • the target action is carried in the extended community attribute contained in the Flowspec route.
  • the extended community attribute includes a target bit, and the target bit is used to identify a target relationship between the extended community attribute and other received community attributes, wherein the target relationship includes one of the following: The extended community attribute overrides other community attributes, and the extended community attribute coexists with other community attributes.
  • the extended community attribute and other community attributes are sent by the controller at the same time or at different times.
  • the extended community attribute and other community attributes are set for the same group of flows or the same service.
  • the extended community attribute includes a target field, where the value of the target field is a predetermined value, and the predetermined value is used to indicate the identification type of the target SR-Policy.
  • the predetermined value includes at least one of the following:
  • Type value of local ID predefined type value.
  • the extended community attribute includes the identification of SR-Policy, wherein, when the local ID identifies the meaning of the SR-Policy group or the predefined type value is the meaning of the SR-Policy group Next, the ID of the SR-Policy group is carried in the SR-Policy ID field.
  • the Flowspec route also includes an extended tunnel encapsulation attribute.
  • the tunnel encapsulation attribute is used to identify the target SR-Policy group A member of SR-Policy.
  • the extended tunnel encapsulation attribute can be set, and the extended tunnel encapsulation attribute and the extended community attribute can be jointly carried Action information for the target action.
  • the Flowspec route further includes an extended tunnel encapsulation attribute, and the target action is jointly carried by the extended community attribute and the extended tunnel encapsulation attribute.
  • the above-mentioned modules can be realized by software or hardware. For the latter, it can be realized by the following methods, but not limited to this: the above-mentioned modules are all located in the same processor; or, the above-mentioned modules can be combined in any combination The forms of are located in different processors.
  • Embodiments of the present disclosure also provide a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps in any one of the above method embodiments when running.
  • the above-mentioned computer-readable storage medium may include but not limited to: U disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM) , mobile hard disk, magnetic disk or optical disk and other media that can store computer programs.
  • ROM read-only memory
  • RAM random access memory
  • mobile hard disk magnetic disk or optical disk and other media that can store computer programs.
  • Embodiments of the present disclosure also provide an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
  • the electronic device may further include a transmission device and an input and output device, wherein the transmission device is connected to the processor, and the input and output device is connected to the processor.
  • Step 701 The BGP FLOWSPEC controller sends flow specification Flowspc routes carrying filtering rules redirected to one or more SR-Policy (Segment Routing-Policy, traffic engineering path).
  • SR-Policy Segment Routing-Policy, traffic engineering path.
  • Step 702 The BGP Flowspec client receives the Flowspec route carrying the extended community attribute, and saves the content of the flow filtering rule.
  • the slicing/application filtering rules include: matching conditions and execution actions after traffic matching; while the matching conditions are carried in NLRI (Network Layer Reachability Information, network layer reachability information), the matching types included in the matching conditions can be existing The defined Flowspec component (flow specification information composition) type, that is, based on the source address/destination address/DSCP of the data packet, etc., the matching process can match the traffic according to the matching conditions; the execution action after the traffic matching is determined by the extended community attribute Carrying, where a bit can be set in the existing redirection community attribute to identify whether the community attribute covers other time/simultaneously sent community attributes or a relationship of co-existence.
  • NLRI Network Layer Reachability Information, network layer reachability information
  • the defined Flowspec component flow specification information composition
  • the matching process can match the traffic according to the matching conditions
  • the execution action after the traffic matching is determined by the extended community attribute Carrying, where a bit can be set in the existing redirection community attribute to identify whether the community attribute covers other time/
  • extended redirection community attributes include the following:
  • Bit N is set to 1, which means that for the same matching condition, the node will generate a new filter rule and will not overwrite the previously generated filter rule;
  • bit N is not set, it means that for the same matching condition, the node will only generate one filtering rule, overriding the previously generated filtering rule.
  • Figure 7 also includes:
  • ID-Type (ID type):
  • Tunnel ID the corresponding Generalized indirection_id is the tunnel ID.
  • Bit N is set to 1, which means that for the same matching condition, the node will generate a new filter rule and will not overwrite the previously generated filter rule;
  • bit N is not set, it means that for the same matching condition, the node will only generate one filtering rule, which will overwrite the previously generated filtering rule.
  • Color+Endpoint is used to identify an SR-Policy. If multiple SR-Policies need to be identified, multiple SR-Policy Sub-TLVs need to be carried. It is also possible to use the BSID to identify an SR-policy, that is, there are various formats of the SR-policy sub-TLV, and only one format is given in this embodiment.
  • a flow filtering rule includes two parts: the matching type and the execution action. Since the matching type is carried in the NLRI in the Flowspec route, the execution action is carried in the extended community attribute.
  • the controller will notify the BGP Flowspec client in real time of the latest redirection strategy for a certain service.
  • the redirection strategy The basic principle is to redirect to a relatively idle cloud resource pool, where the idle status of the cloud resource pool can be obtained through polling, access, and other methods.
  • it is necessary to redirect the filtering rules issued at different times to multiple SR-Policies.
  • the Segment List corresponding to SR-Policy1 in Figure 9 is ⁇ PE1 ⁇
  • the Segment List corresponding to SR-Policy2 The Segment List is ⁇ PE2 ⁇ .
  • a Binding SID is used to identify an SR-Policy.
  • Step 1002 On the gateway PE3, first match the "flow matching rule entry" according to the characteristics ⁇ SA, DA> of the service message, wherein, the content of the entry contained in the "flow matching rule entry" is the same as the traditional policy routing table Items are similar (it can be maintained uniformly during implementation), and can guide business packets to SR Policy to reach the cloud resource pool at the opposite end.
  • SR Policy is SRv6 Policy in PIv6 format.
  • PE3 encapsulates the outer SRv6 Policy for service packets, it needs to perform NAT conversion on the SA of the service packets and change it to the public network IP address of PE3 (PE3-NAT-IP).
  • the controller notifies the BGP Flowspec client of the latest redirection strategy for a certain service in real time.
  • the basic principle is to redirect to a relatively idle cloud resource pool.
  • the BGP Flowspec client receives the flow-route (route) redirected to SRv6 Policy from the controller through BGP-Flowspec.
  • the content carried by the BGP flow-route includes:
  • Matching condition carried by NLRI, and the specific format of matching condition is: match DA:service IP;
  • a flag is extended to the extended community attribute of the extended indirection-id: N, and the flag is used to identify: for the same matching condition, the extended community attribute of multiple extended indirection-ids is carried at different times
  • the non-covering relationship between group attributes is an additional relationship.
  • Other formats remain unchanged.
  • Binding SID is used to associate with SR-Policy
  • Binding SID1 is used to associate with SR-Policy1
  • Binding SID2 is used to associate with SR-Policy2, that is:
  • the controller receives flow-route: match service-1 IP, set Binding SID1, where the Segment List of SRv6 Policy-1 is ⁇ PE1 ⁇ , hoping to direct the service flow to resource pool A.
  • T2 receives flow-route from the controller: match service-1 IP, set Binding SID2, where the Segment List of SRv6 Policy-2 is ⁇ PE2 ⁇ , and it is hoped to direct the service flow to resource pool B.
  • the forwarding plane when the forwarding plane finds that a service packet cannot hit a flow entry (SA, DA), it will send it to the CPU to trigger the generation of related flow entries, and its forwarding action will copy the latest BGP-FS for SRv6 issued above. Policy (such as SRv6 Policy-2 delivered at T2).
  • the platform needs to collect traffic statistics of a specific "flow entry" on the forwarding plane. If no new traffic is found within a certain period of time, the specific "flow entry" will be aged and deleted on the forwarding plane.
  • the controller notifies the BGP Flowspec client of the latest redirection strategy for a certain service in real time.
  • the basic principle is to redirect to a relatively idle cloud resource pool.
  • the BGP Flowspec client receives the flow-route redirected to the SRv6 Policy from the controller through BGP-Flowspec.
  • the content carried by the BGP flow-route includes:
  • Matching conditions carried by NLRI, the specific format is: match DA:service IP;
  • Action after matching Carried jointly by the extended community attribute redirected to the extended indirection-id and the tunnel encapsulation attribute SR-Policy Sub-TLV, the specific format is:
  • action set ⁇ extended community attribute redirected to extended indirection-id: SR Policy group ID, SR-Policy Sub-TLV: color+Endponit>.
  • the SR Policy group has two extensions: one is to use the extended community attribute redirected to the indirection-id format as shown in Figure 7, ID-type
  • ID-type The field defines a new type: SR-Policy group, the corresponding Generalized indirection_id is SR-Policy group or use the existing 0; the other is to use the existing ID-type field, 0: local ID, the corresponding Generalized indirection_id is local ID, the meaning of this local ID is the SR-Policy group.
  • SR-Policy Sub-TLV is used to carry color+endpoint to identify an SR-Policy
  • SR-Policy Sub-TLV is a newly defined tunnel encapsulation attribute Sub-TLV, which can carry multiple.
  • the SR-Policy Sub-TLV carries N bits, and the N bits are set to 1, it means that for the same matching condition, the node will generate a new filter rule and will not overwrite the previously generated filter rule.
  • the forwarding plane when the forwarding plane finds that a service packet cannot hit a flow entry (SA, DA), it will send it to the CPU to trigger the generation of the relevant flow entry, and its forwarding action will copy the latest BGP-FS issued above.
  • SRv6 Policy such as SRv6 Policy-2 delivered at T2).
  • the platform needs to collect traffic statistics of a specific "flow entry" on the forwarding plane. If no new traffic is found within a certain period of time, the specific "flow entry" will be aged and deleted on the forwarding plane.
  • Binding SID is used to identify the SR-Policy, where Binding SID1 identifies SR-Policy1, and Binding SID2 identifies SR-Policy2.
  • the process of "flow filtering rule entry" is described below.
  • Step 1101 The BGP FLOWSPEC controller sends Flowspc routes carrying filter rules redirected to one or more SR-Policies.
  • Step 1102 The BGP Flowspec client generates a "flow matching filter entry".
  • the content carried by BGP flow-route includes:
  • Matching conditions carried by NLRI, the specific format is: match DA;
  • the matched action can be carried by the extended community attribute redirected to the extended indirection-id, and the specific format is:
  • action:set ⁇ Redirect to extended community attribute of extended indirection-id SR Policy group ID: 1, SR-Policy Sub-TLV: color C1+Endponit: PE1, SR-Policy Sub-TLV: color C2+Endponit :PE2>.
  • SR Policy group has two extension methods: one is to use the extended community attribute redirected to the indirection-id format as shown in Figure 7, ID-
  • ID- The type field defines a new type: SR-Policy group, the corresponding Generalized indirection_id is SR-Policy group or use the existing 0; the other is to use the existing ID-type field, 0: local ID, the corresponding Generalized indirection_id is Local ID, the meaning of this local ID is SR-Policy group.
  • the forwarding plane when the forwarding plane finds that a service packet cannot hit a flow entry (DA), it will send it to the CPU to trigger the generation of related flow entries, and its forwarding action will copy the latest issued BGP-FS for SRv6 Policy (such as Binding SID1 and Binding SID2).
  • the platform needs to collect traffic statistics of a specific "flow entry" on the forwarding plane. If no new traffic is found within a certain period of time, the specific "flow entry" will be aged and deleted on the forwarding plane.
  • Step 1201 The BGP FLOWSPEC controller sends Flowspc routes carrying filtering rules redirected to one or more SR-Policies.
  • Step 1202 The BGP Flowspec client generates a "flow matching filter entry".
  • the content carried by BGP flow-route includes:
  • Matching condition carried by NLRI, its format is: match DA;
  • the matched action is jointly carried by the extended community attribute redirected to the extended indirection-id and the tunnel encapsulation attribute, and its format is:
  • SR Policy group has two extensions: one is to use the extended community attribute redirected to the indirection-id format as shown in Figure 7, and the ID-type field definition New type: SR-Policy group, the corresponding Generalized indirection_id is SR-Policy group or use the existing 0; the other is to use the existing ID-type field, 0: local ID, the corresponding Generalized indirection_id is the local ID, The meaning of this local ID is the SR-Policy group.
  • the forwarding plane when the forwarding plane finds that a service packet cannot hit a flow entry (DA), it will send it to the CPU to trigger the generation of related flow entries, and its forwarding action will copy the latest BGP-FS for SRv6 Policy.
  • DA flow entry
  • the platform needs to collect traffic statistics of a specific "flow entry" on the forwarding plane. If no new traffic is found within a certain period of time, the specific "flow entry" will be aged and deleted on the forwarding plane.
  • each module or each step of the above-mentioned disclosure can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network composed of multiple computing devices
  • they can be implemented in program code executable by a computing device, and thus, they can be stored in a storage device to be executed by a computing device, and in some cases, can be executed in an order different from that shown here.
  • steps, or they are made into individual integrated circuit modules, or multiple modules or steps among them are made into a single integrated circuit module to realize.
  • the present disclosure is not limited to any specific combination of hardware and software.

Landscapes

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

Abstract

本公开实施例提供了一种路由获取方法、路由发送方法、装置、存储介质及电子装置,其路由获取方法包括:获取来自控制器的流规格Flowspec路由,其中,Flowspec路由中包含有目标规则,目标规则用于指示将接收到的流量重定向到一个或多个目标流量工程路径SR-Policy。

Description

一种路由获取方法、装置、存储介质及电子装置
相关申请的交叉引用
本公开基于2021年5月12日提交的发明名称为“一种路由获取方法、装置、存储介质及电子装置”的中国专利申请CN202110519239.X,并且要求该专利申请的优先权,通过引用将其所公开的内容全部并入本公开。
技术领域
本公开实施例涉及通信领域,具体而言,涉及一种路由获取方法、路由发送方法、装置存储介质及电子装置。
背景技术
传统的路由最初设计是为流量转发的,路由表项中只包含用于目的地址匹配的前缀掩码信息及流量出接口信息,后来随着网络业务发展的需要(如防DDOS攻击、流量工程),支持流量策略(如:静态策略路由等),需要转发路由表项能够将数据流能够进一步细分,不局限于根据目的地址匹配数据流,还包括源地址、ip协议号,端口号等等;对流的处理动作信息,也不局限于从某个出接口转发出去,还包括限速、丢弃、重定向等等处理动作。但策略路由最大的局限是属于本地行为,需要逐台设备配置,手工配置工作量大,对运维人员要求高,及网络调优可维护性差等问题。
发明内容
本公开实施例提供了一种路由获取方法、路由发送方法、装置存储介质及电子装置,以至少解决相关技术中网络调优性差的问题。
根据本公开的一个实施例,提供了一种路由获取方法,包括:
获取来自控制器的流规格Flowspec路由,其中,所述Flowspec路由中包含有目标规则,所述目标规则用于指示将接收到的流量重定向到一个或多个目标流量工程路径SR-Policy。
在一个示例性实施例中,在获取来自控制器的流规格Flowspec路由之后,所述方法还包括:
在接收到所述流量之后,基于所述目标规则,将所述流量重定向到所述目标SR-Policy。
在一个示例性实施例中,所述目标规则包括目标条件以及目标动作,其中,所述目标条件包括对所述流量进行匹配的条件,所述目标动作为在对所述流量进行匹配之后对所述流量所执行的动作信息。
在一个示例性实施例中,所述目标条件携带在所述Flowspec路由中包含的网络层可达性信息NIRL中。
在一个示例性实施例中,所述目标动作携带在所述Flowspec路由中包含的扩展的团体属性中。
在一个示例性实施例中,所述扩展的团体属性包括目标比特位,所述目标比特位用于标识所述扩展的团体属性与接收到的其他团体属性的目标关系,其中,所述目标关系包括以下 之一:由所述扩展的团体属性覆盖所述其他团体属性,所述扩展的团体属性与所述其他团体属性共存。
在一个示例性实施例中,所述扩展的团体属性与所述其他团体属性是由所述控制器在同一时刻或者在不同时刻所发送的。
在一个示例性实施例中,所述扩展的团体属性与所述其他团体属性是针对同一组流或同一个服务所设置的。
在一个示例性实施例中,所述扩展的团体属性中包括有目标字段,其中,所述目标字段的值为预定值,所述预定值用于指示所述目标SR-Policy的标识类型。
在一个示例性实施例中,所述预定值包括以下至少之一:
本地ID的类型值、预定义的类型值。
在一个示例性实施例中,所述扩展的团体属性中包括有所述SR-Policy的标识,其中,在本地ID标识SR-Policy组的含义或者预定义的类型值是SR-Policy组的含义时的情况下,所述SR-Policy组的标识携带在SR-Policy标识字段中。
在一个示例性实施例中,所述Flowspec路由还包括扩展的隧道封装属性,在所述目标SR-Policy中包括所述预定值标识的SR-Policy类型的情况下,所述隧道封装属性用于标识所述目标SR-Policy组中的成员SR-Policy。
在一个示例性实施例中,所述Flowspec路由还包括扩展的隧道封装属性,所述目标动作由所述扩展的团体属性和所述扩展的隧道封装属性联合携带。
在一个示例性实施例中,所述基于所述目标规则,将接收到的所述流量重定向到所述目标SR-Policy包括:
按照所述目标条件对所述流量进行匹配;
在匹配到与所述流量对应的目标动作的情况下,按照所述目标动作对所述流量进行处理,以将所述流量重定向到所述目标SR-Policy。
在一个示例性实施例中,
按照所述目标条件对所述流量进行匹配包括:在预先生成的第一流匹配表项中对所述流量进行匹配,其中,所述第一流匹配表项中包括有对应的目标条件以及目标动作,所述目标条件用于指示匹配信息,所述目标动作用于指示SR-Policy;
在匹配到与所述流量对应的目标动作的情况下,按照所述目标动作对所述流量进行处理,以将所述流量重定向到所述目标SR-Policy包括:在预先生成的所述第一流匹配表项中匹配到与所述流量的情况下,将所述流量重定向到所述第一流匹配表项中包括的所述目标SR-Policy中。
在一个示例性实施例中,在预先生成的第一流匹配表项中对所述流量进行地址匹配之后,所述方法还包括:
在预先生成的所述第一流匹配表项中未匹配到与所述流量对应的所述目标动作情况下,向处理器发送第一指令,以指示所述处理器生成第二流匹配表项,其中,所述第二流匹配表项中包括有用于指示所述目标条件。
在一个示例性实施例中,所述方法还包括:
接收来自处理器的第二指令;
基于第二指令删除所述第一流匹配表项。
根据本公开的另一个实施例,提供了一种路由发送方法,包括:
向目标客户端发送流规格Flowspec路由,其中,所述Flowspec路由中包含有目标规则,所述目标规则用于指示将接收到的流量重定向到一个或多个目标流量工程路径SR-Policy。
在一个示例性实施例中,所述方法还包括:
所述目标规则包括目标条件以及目标动作,其中,所述目标条件包括对所述流量进行匹配的条件,所述目标动作为在对所述流量进行匹配之后对所述流量所执行的动作信息。
在一个示例性实施例中,所述目标动作携带在所述Flowspec路由中包含的扩展的团体属性中。
在一个示例性实施例中,所述扩展的团体属性中包括有目标字段,其中,所述目标字段的值为预定值,所述预定值用于指示所述目标SR-Policy的标识类型。
在一个示例性实施例中,所述扩展的团体属性中包括有所述SR-Policy的标识,其中,在本地ID标识SR-Policy组的含义或者预定义的类型值是SR-Policy组的含义时的情况下,所述SR-Policy组的标识携带在SR-Policy标识字段中。
根据本公开的另一个实施例,提供了一种路由获取装置,包括:
获取模块,设置为获取来自控制器的流规格Flowspec路由,其中,所述Flowspec路由中包含有目标规则,所述目标规则用于指示将接收到的流量重定向到一个或多个目标流量工程路径SR-Policy。
根据本公开的另一个实施例,提供了一种路由发送装置,包括:
发送模块,设置为向目标客户端发送流规格Flowspec路由,其中,所述Flowspec路由中包含有目标规则,所述目标规则用于指示将接收到的流量重定向到一个或多个目标流量工程路径SR-Policy。
根据本公开的又一个实施例,还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。
根据本公开的又一个实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。
附图说明
图1是根据本公开实施例的一种路由获取方法的流程图;
图2是根据本公开实施例的一种路由发送方法的流程图;
图3是根据本公开实施例的一种路由获取装置的结构框图;
图4是根据本公开实施例的一种路由发送装置的结构框图;
图5是根据本公开具体实施例一的结构示意图;
图6是根据本公开具体实施例一的流程图;
图7是根据本公开具体实施例的扩展的团体属性结构示意图;
图8是根据本公开具体实施例的扩展的隧道封装属性结构示意图;
图9是根据本公开具体实施例二的结构示意图;
图10是根据本公开具体实施例五的结构示意图。
具体实施方式
下文中将参考附图并结合实施例来详细说明本公开的实施例。
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
本申请实施例中所提供的方法实施例可以在移动终端、计算机终端或者类似的装置中执行,其中,类似的装置,包括不限于交换机、路由器等交互装置;移动终端可以(但不限于)是手机,也可以是其它具有远程通信功能的设备。
在本实施例中提供了一种路由获取方法,图1是根据本公开实施例的一种路由获取方法的流程图,如图1所示,该流程包括如下步骤:
步骤S202,获取来自控制器的流规格Flowspec路由,其中,Flowspec路由中包含有目标规则,目标规则用于指示将接收到的流量重定向到一个或者多个目标流量工程路径SR-Policy。
在本实施例中,由于控制器将包含有目标规则的Flowspec路由发送至客户端,因而客户端可以根据目标规则对流量进行匹配过滤,并将过滤后的流量发送至目标规则对应的处理节点,因而可以实现对流量的传输路径的优化,提高了流量处理效率。
其中,控制器可以是具有逻辑计算功能的装置、模块或节点,如,CPU、FPGA等,客户端可以是SR-Policy上的一个或多个节点,Flowspec路由的发送可以是多个同时发送的,也可以是多个依次发送的,还可以是逐个依次发送的。
通过上述步骤,由于控制器将包含有目标规则的Flowspec路由发送至客户端,因而客户端可以根据目标规则对流量进行匹配过滤,并将过滤后的流量发送至目标规则对应的处理节点,因而可以实现对路径的快速优化,从而实现对流量路径的调整、调优,解决了相关技术中网络调优性差的问题,提高了网络调优效率;且由于包含有目标规则的Flowspec路由可以是在同一时刻或者不同时刻发送的,以及Flowspec路由的可以是一个或者多个,因而可以实现将同一时刻或不同时刻接收的同一业务或流量重定向至一条或者多条SR-policy上,提高了流量或者同一业务的处理效率。
其中,上述步骤的执行主体可以为基站、终端等,但不限于此。
在一个可选的实施例中,在获取来自控制器的流规格Flowspec路由之后,该方法还包括:
步骤S204,在接收到流量之后,基于目标规则,将流量重定向到一个或者多个目标SR-Policy。
在本实施例中,在接收到流量后,根据目标规则对流量进行匹配过滤后,将过滤后的流量发送至目标SR-Policy,实现对流量的重定向。
在一个可选的实施例中,目标规则包括目标条件以及目标动作,其中,目标条件包括对流量进行匹配的条件,目标动作为在对流量进行匹配之后对流量所执行的动作信息。
在本实施例中,对流量进行匹配的条件可以包括(但不限于)报文的源地址SA、目标地 址DA、流量的格编码式、流量自身的标识、DSCP(Differentiated Services Code Point,差分服务代码点)等;对流量所执行的动作信息包括(但不限于)对流量执行转发、识别、编解码、存储等操作的指令、目标地址、存储位置等信息。
需要说明的是,目标条件和目标动作均可以包括有多个,此时对应的动作信息和条件也可以有多个。
在一个可选的实施例中,目标条件携带在Flowspec路由中包含的网络层可达性信息NIRL中。
在一个可选的实施例中,目标动作携带在Flowspec路由中包含的扩展的团体属性中。
在一个可选的实施例中,扩展的团体属性包括目标比特位,目标比特位用于标识扩展的团体属性与接收到的其他团体属性的目标关系,其中,目标关系包括以下之一:由扩展的团体属性覆盖其他团体属性,扩展的团体属性与其他团体属性共存。
在本实施例中,可以(但不限于)通过以下方式进行设置:当目标比特位设置为1时,表示针对同一个匹配条件,节点会新生成一条过滤规则,且不会覆盖先前生成的过滤规则;当目标比特位不设置时,表示针对同一个匹配条件,节点会只生成一条过滤规则,覆盖先前生成的过滤规则。
在一个可选的实施例中,扩展的团体属性与其他团体属性是由控制器在同一时刻或者在不同时刻所发送的。
在一个可选的实施例中,扩展的团体属性与其他团体属性是针对同一组流或同一个服务所设置的。
在一个可选的实施例中,扩展的团体属性中包括有目标字段,其中,目标字段的值为预定值,预定值用于指示目标SR-Policy的标识类型。
在本实施例中,目标字段可以是ID-Type(ID类型),也可以是其它字段。
在一个可选的实施例中,预定值包括以下至少之一:
本地ID的类型值、预定义的类型值。
在本实施例中,预定值还可以是以下值:
1:SID(index),对应的Generalized indirection_id为SID(index);
2:SID(Label),对应的Generalized indirection_id为SID(Label);
3:BSID(index),对应的Generalized indirection_id为BSID(index);
4:BSID(label),对应的Generalized indirection_id为BSID(label);
5:隧道ID,对应的Generalized indirection_id为隧道ID。
在一个可选的实施例中,扩展的团体属性中包括有SR-Policy的标识,其中,在本地ID标识SR-Policy组的含义或者预定义的类型值是SR-Policy组的含义时的情况下,SR-Policy组的标识携带在SR-Policy标识字段中。
在本实施例中,为实现对SR-Policy组的含义进行标识,需要在Flowspec路由中设置用于标识SR-Policy组及其成员SR-Policy的含义的SR-Policy标识字段。
在一个可选的实施例中,Flowspec路由还包括扩展的隧道封装属性,在目标SR-Policy中包括预定值标识的SR-Policy类型的情况下,隧道封装属性用于标识目标SR-Policy组中的成员SR-Policy。
在本实施例中,在SR-Policy有较多个情况下,为实现携带目标SR-Policy组的效果,可以设置扩展的隧道封装属性,并由扩展的隧道封装属性与扩展的团体属性联合携带目标动作的动作信息。
在一个可选的实施例中,Flowspec路由还包括扩展的隧道封装属性,目标动作由扩展的团体属性和扩展的隧道封装属性联合携带。
在一个可选的实施例中,基于目标规则,将接收到的流量重定向到目标SR-Policy包括:
步骤S2042,按照目标条件对流量进行匹配;
步骤S2044,在匹配到与流量对应的目标动作的情况下,按照目标动作对流量进行处理,以将流量重定向到目标SR-Policy。
在一个可选的实施例中,
按照目标条件对流量进行匹配包括:在预先生成的第一流匹配表项中对流量进行匹配,其中,第一流匹配表项中包括有对应的目标条件以及目标动作,目标条件用于指示匹配信息,目标动作用于指示SR-Policy;
在匹配到与流量对应的目标动作的情况下,按照目标动作对流量进行处理,以将流量重定向到目标SR-Policy包括:在预先生成的第一流匹配表项中匹配到与流量的情况下,将所流量重定向到第一流匹配表项中包括的目标SR-Policy中。
在本实施例中,第一流匹配的创建可以是在控制器创建,并随Flowspec路由被控制器发送至客户端。
在一个可选的实施例中,在预先生成的第一流匹配表项中对流量进行地址匹配之后,该方法还包括:
在预先生成的第一流匹配表项中未匹配到与流量对应的目标动作情况下,向处理器发送第一指令,以指示处理器生成第二流匹配表项,其中,第二流匹配表项中包括有用于指示目标条件。
在本实施例中,在未匹配到与流量对应的目标动作情况下,上送CPU,以触发生成相关的第二流匹配表项,此时其转发动作拷贝前述最新下发的BGP-FS for SRv6 Policy(比如T2时刻下发的SRv6 Policy-2)。
在一个可选的实施例中,该方法还包括:
步骤S206,接收来自处理器的第二指令;
步骤S208,基于第二指令删除所述第一流匹配表项。
在本实施例中,平台需收集转发面的特定“流表项”的流量统计,若发现一定时间内无新增流量,则老化该特定“流表项”并向转发面下发删除指令,以指示转发面将特定流表项进行删除。
在一个可选的实施例中,如图2所示,本实施例还提供一种路由发送方法,包括:
步骤S302,向目标客户端发送流规格Flowspec路由,其中,Flowspec路由中包含有目标规则,目标规则用于指示将接收到的流量重定向到一个或多个目标流量工程路径SR-Policy。
在一个可选的实施例中,目标规则包括目标条件以及目标动作,其中,目标条件包括对流量进行匹配的条件,目标动作为在对流量进行匹配之后对流量所执行的动作信息。
在一个可选的实施例中,目标条件携带在Flowspec路由中包含的网络层可达性信息NIRL中。
在一个可选的实施例中,目标动作携带在Flowspec路由中包含的扩展的团体属性中。
在一个可选的实施例中,扩展的团体属性包括目标比特位,目标比特位用于标识扩展的团体属性与接收到的其他团体属性的目标关系,其中,目标关系包括以下之一:由扩展的团体属性覆盖其他团体属性,扩展的团体属性与其他团体属性共存。
在一个可选的实施例中,扩展的团体属性与其他团体属性是由控制器在同一时刻或者在不同时刻所发送的。
在一个可选的实施例中,扩展的团体属性与其他团体属性是针对同一组流或同一个服务所设置的。
在一个可选的实施例中,扩展的团体属性中包括有目标字段,其中,目标字段的值为预定值,预定值用于指示目标SR-Policy的标识类型。
在一个可选的实施例中,预定值包括以下至少之一:
本地ID的类型值、预定义的类型值。
在一个可选的实施例中,扩展的团体属性中包括有SR-Policy的标识,其中,在本地ID标识SR-Policy组的含义或者预定义的类型值是SR-Policy组的含义时的情况下,SR-Policy组的标识携带在SR-Policy标识字段中。
在一个可选的实施例中,Flowspec路由还包括扩展的隧道封装属性,在目标SR-Policy中包括所述预定值标识的SR-Policy类型的情况下,隧道封装属性用于标识目标SR-Policy组中的成员SR-Policy。
在一个可选的实施例中,Flowspec路由还包括扩展的隧道封装属性,目标动作由扩展的团体属性和扩展的隧道封装属性联合携带。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本公开各个实施例所述的方法。
在本实施例中还提供了一种路由获取装置,该装置设置为实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图3是根据本公开实施例的一种路由获取装置的结构框图,如图3所示,该装置包括:
获取模块42,设置为获取来自控制器的流规格Flowspec路由,其中,Flowspec路由中包含有目标规则,目标规则用于指示将接收到的流量重定向到一个或多个目标流量工程路径SR-Policy。
在一个可选的实施例中,该装置还包括:
重定向模块44,设置为在获取来自控制器的流规格Flowspec路由之后,在接收到流量 之后,基于目标规则,将流量重定向到目标SR-Policy。
在一个可选的实施例中,目标规则包括目标条件以及目标动作,其中,目标条件包括对流量进行匹配的条件,目标动作为在对流量进行匹配之后对流量所执行的动作信息。
在一个可选的实施例中,目标条件携带在Flowspec路由中包含的网络层可达性信息NIRL中。
在一个可选的实施例中,目标动作携带在Flowspec路由中包含的扩展的团体属性中。
在一个可选的实施例中,扩展的团体属性包括目标比特位,目标比特位用于标识扩展的团体属性与接收到的其他团体属性的目标关系,其中,目标关系包括以下之一:由扩展的团体属性覆盖其他团体属性,扩展的团体属性与其他团体属性共存。
在一个可选的实施例中,扩展的团体属性与其他团体属性是由控制器在同一时刻或者在不同时刻所发送的。
在一个可选的实施例中,扩展的团体属性与其他团体属性是针对同一组流或同一个服务所设置的。
在一个可选的实施例中,扩展的团体属性中包括有目标字段,其中,目标字段的值为预定值,预定值用于指示目标SR-Policy的标识类型。
在一个可选的实施例中,预定值包括以下至少之一:
本地ID的类型值、预定义的类型值。
在一个可选的实施例中,扩展的团体属性中包括有SR-Policy的标识,其中,在本地ID标识SR-Policy组的含义或者预定义的类型值是SR-Policy组的含义时的情况下,SR-Policy组的标识携带在SR-Policy标识字段中。
在一个可选的实施例中,Flowspec路由还包括扩展的隧道封装属性,在目标SR-Policy中包括预定值标识的SR-Policy类型的情况下,隧道封装属性用于标识目标SR-Policy组中的成员SR-Policy。
在本实施例中,在SR-Policy有较多个情况下,为实现携带目标SR-Policy组的效果,可以设置扩展的隧道封装属性,并由扩展的隧道封装属性与扩展的团体属性联合携带目标动作的动作信息。
在一个可选的实施例中,Flowspec路由还包括扩展的隧道封装属性,目标动作由扩展的团体属性和扩展的隧道封装属性联合携带。
在一个可选的实施例中,重定向模块44包括:
匹配单元42,设置为按照目标条件对流量进行匹配;
重定向单元44,设置为在匹配到与流量对应的目标动作的情况下,按照目标动作对流量进行处理,以将流量重定向到目标SR-Policy。
在一个可选的实施例中,
匹配单元42包括:
第一表项匹配子单元422,设置为在预先生成的第一流匹配表项中对流量进行匹配,其中,第一流匹配表项中包括有对应的目标条件以及目标动作,目标条件用于指示匹配信息,目标动作用于指示SR-Policy;
重定向单元44包括:
重定向子单元442,设置为在预先生成的第一流匹配表项中匹配到与流量的情况下,将所流量重定向到第一流匹配表项中包括的目标SR-Policy中。
在一个可选的实施例中,该装置还包括:
第二表项生成单元424,设置为在预先生成的第一流匹配表项中对流量进行地址匹配之后,在预先生成的第一流匹配表项中未匹配到与流量对应的目标动作情况下,向处理器发送第一指令,以指示处理器生成第二流匹配表项,其中,第二流匹配表项中包括有用于指示目标条件。
在一个可选的实施例中,该装置还包括:
指令接收模块46,设置为接收来自处理器的第二指令;
表项删除模块48,设置为基于第二指令删除第一流匹配表项。
图4是根据本公开实施例的一种路由发送装置的结构框图,如图4所示,该装置包括:
发送模块52,设置为向目标客户端发送流规格Flowspec路由,其中,Flowspec路由中包含有目标规则,目标规则用于指示将接收到的流量重定向到一个或多个目标流量工程路径SR-Policy。
在一个可选的实施例中,目标规则包括目标条件以及目标动作,其中,目标条件包括对流量进行匹配的条件,目标动作为在对流量进行匹配之后对流量所执行的动作信息。
在一个可选的实施例中,目标条件携带在Flowspec路由中包含的网络层可达性信息NIRL中。
在一个可选的实施例中,目标动作携带在Flowspec路由中包含的扩展的团体属性中。
在一个可选的实施例中,扩展的团体属性包括目标比特位,目标比特位用于标识扩展的团体属性与接收到的其他团体属性的目标关系,其中,目标关系包括以下之一:由扩展的团体属性覆盖其他团体属性,扩展的团体属性与其他团体属性共存。
在一个可选的实施例中,扩展的团体属性与其他团体属性是由控制器在同一时刻或者在不同时刻所发送的。
在一个可选的实施例中,扩展的团体属性与其他团体属性是针对同一组流或同一个服务所设置的。
在一个可选的实施例中,扩展的团体属性中包括有目标字段,其中,目标字段的值为预定值,预定值用于指示目标SR-Policy的标识类型。
在一个可选的实施例中,预定值包括以下至少之一:
本地ID的类型值、预定义的类型值。
在一个可选的实施例中,扩展的团体属性中包括有SR-Policy的标识,其中,在本地ID标识SR-Policy组的含义或者预定义的类型值是SR-Policy组的含义时的情况下,SR-Policy组的标识携带在SR-Policy标识字段中。
在一个可选的实施例中,Flowspec路由还包括扩展的隧道封装属性,在目标SR-Policy中包括预定值标识的SR-Policy类型的情况下,隧道封装属性用于标识目标SR-Policy组中的成员SR-Policy。
在本实施例中,在SR-Policy有较多个情况下,为实现携带目标SR-Policy组的效果,可以设置扩展的隧道封装属性,并由扩展的隧道封装属性与扩展的团体属性联合携带目标动作的动作信息。
在一个可选的实施例中,Flowspec路由还包括扩展的隧道封装属性,目标动作由扩展的团体属性和扩展的隧道封装属性联合携带。
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。
本公开的实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。
在一个示例性实施例中,上述计算机可读存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。
本公开的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。
在一个示例性实施例中,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。
本实施例中的具体示例可以参考上述实施例及示例性实施方式中所描述的示例,本实施例在此不再赘述。
下面结合具体实施例对本公开进行说明。
具体实施例一
如图5及图6所示,本公开的具体实施步骤主要包括:
步骤701:BGP FLOWSPEC控制器发送携带重定向到一个或者多个SR-Policy(Segment Routing-Policy,流量工程路径)的过滤规则的流规格Flowspc路由。
步骤702:BGP Flowspec客户端接收携带所述扩展的团体属性的Flowspec路由,保存流过滤规则的内容。
其中,切片/应用过滤规则包括:匹配条件及流量匹配后的执行动作;而匹配条件由NLRI(Network Layer Reachability Information,网络层可达性消息)中携带,匹配条件包含的匹配类型可以是现有定义的Flowspec component(流规格信息组成)类型,即基于数据包源地址/目的地址/DSCP等,匹配过程则可以根据匹配条件来对流量进行匹配;流量匹配后的执行动作则由扩展的团体属性携带,其中,可以通过在现有的重定向团体属性设置一个比特位用于标识所述的团体属性是覆盖其他时刻/同时发送的团体属性还是共同存在的关系。
需要说明的是,扩展的重定向团体属性包括以下内容:
1)重定向到indirection-id(间接ID)的扩展的团体属性格式如图7所示,图中:
比特位N设置为1,表示针对同一个匹配条件,节点会新生成一条过滤规则,且不会覆盖先前生成的过滤规则;
比特位N比特不设置,表示针对同一个匹配条件,节点会只生成一条过滤规则,覆盖先前生成的过滤规则。
除此之外,图7中还包括:
ID-Type(ID类型):
0:本地ID,对应的Generalized indirection_id为本地ID;
1:SID(index),对应的Generalized indirection_id为SID(index);
2:SID(Label),对应的Generalized indirection_id为SID(Label);
3:BSID(index),对应的Generalized indirection_id为BSID(index);
4:BSID(label),对应的Generalized indirection_id为BSID(label);
5:隧道ID,对应的Generalized indirection_id为隧道ID。
2)重定向到indirection-id的扩展的团体属性格式如图7所示,其中,可以使用新定义的内容对ID-type字段进行定义,使对应的ID-type字段对应的Generalized indirection_id为SR-Policy组,也可以使用现有的定义内容来定义ID-type字段,如0:本地ID,此时对应的Generalized indirection_id为本地ID,则该本地ID的含义是指示SR-Policy组。
另外,如图8所示,还可以在隧道封装属性下面,定义新的隧道封装属性Sub-TLV:SR-Policy Sub-TLV,图中:
比特位N设置为1,表示针对同一个匹配条件,节点会新生成一条过滤规则,不会覆盖先前生成的过滤规则;
比特位N不设置,表示针对同一个匹配条件,节点会只生成一条过滤规则,覆盖先前生成的过滤规则。
其中,Color+Endpoint用于标识一条SR-Policy,如果需要标识多个SR-Policy则需要携带多个SR-Policy Sub-TLV。还可以使用BSID标识一条SR-policy,即SR-policy sub-TLV的格式是多样的,本实施例仅给出一种格式。
此时,流量匹配后的执行动作可以由<重定向到扩展的indirection-id的扩展的团体属性,新的隧道封装属性Sub-TLV:SR-Policy Sub-TLV>共同携带,以实现携带多个SR-Policy的效果。
需要说明的是,流过滤规则包括两部分内容:匹配类型及执行动作,由于匹配类型由Flowspec路由中的NLRI中携带,执行动作由扩展的团体属性携带。
具体实施例二
如图9所示,在主机client 1需要访问远端的计算资源Service 1的情况下,控制器会实时告知BGP Flowspec客户端针对某种服务的最新重定向策略,此时,该重定向策略的基本原则是重定向到比较空闲的云资源池,其中,云资源池的空闲状态可以通过轮询、访问等方式获得。为实现重定向策略,需要不同时刻下发的过滤规则能够重定向到多个SR-Policy上,具体的,图9中SR-Policy1对应的段列表Segment List为{PE1},SR-Policy2对应的Segment List为{PE2}该实施例中,此时,使用Binding SID标识一条SR-Policy。
此时,具体步骤如下:
步骤1001:主机client 1需要访问远端的计算资源Service 1时,生成业务报文<SA=client1-IP,DA=service1-IP>,并将业务报文发送至网关PE3。
步骤1002:在网关PE3上,首先根据业务报文的特征<SA,DA>,匹配“流匹配规则表项”, 其中,“流匹配规则表项”包含的表项内容与传统的策略路由表项类似(在实现时可以统一维护),能够将业务报文引导至SR Policy到达对端的云资源池,此时,SR Policy为PIv6格式的SRv6 Policy。
需要说明的是,PE3在为业务报文封装外层的SRv6 Policy前,需要将业务报文的SA进行NAT转换,改为PE3的公网IP地址(PE3-NAT-IP)。
其中,关于“流过滤规则表项”的创建,主要分两步:
1)控制器实时告知BGP Flowspec客户端针对某种服务的最新重定向策略,基本原则是重定向到比较空闲的云资源池。
随后BGP Flowspec客户端通过BGP-Flowspec从控制器接收重定向至SRv6 Policy的flow-route(路由),BGP flow-route携带的内容包括:
匹配条件:由NLRI进行携带,且匹配条件具体格式为:match DA:service IP;
匹配后的动作:由重新向到扩展的indirection-id的扩展的团体属性进行携带,具体格式为:
action:set<重新向到扩展的indirection-id的扩展的团体属性:Binding SID1>。
其中,重新向到扩展的indirection-id的扩展的团体属性扩展一个标志位:N,该标志位用于标识:对于同一个匹配条件,不同时刻携带多个扩展的indirection-id的扩展的团体属性时,团体属性之间非覆盖关系,是额外增加的关系。其他的格式不变。
其中,Binding SID用于关联SR-Policy,Binding SID1用于关联SR-Policy1,Binding SID2用于关联SR-Policy2,即:
T1时刻从控制器接收flow-route:match service-1 IP,set Binding SID1,其中,SRv6 Policy-1的Segment List为{PE1},希望将业务流引导至资源池A。
T2时刻从控制器接收flow-route:match service-1 IP,set Binding SID2,其中,SRv6 Policy-2的Segment List为{PE2},希望将业务流引导至资源池B。
2)BGP Flowspec客户端生成“流匹配过滤表项”中的两条条目。
其中,“流匹配过滤表项”的内容如表1所示。
表1
Figure PCTCN2022092504-appb-000001
另外,当转发面发现业务报文无法命中一个流表项(SA,DA)时,就会上送CPU,触发生成相关的流表项,其转发动作拷贝前述最新下发的BGP-FS for SRv6 Policy(比如T2时刻下发的SRv6 Policy-2)。
另外,平台需收集转发面的特定“流表项”的流量统计,若发现一定时间内无新增流量,则老化该特定“流表项”并向转发面下发删除。
具体实施例三:
工作场景如具体实施例二,但是与具体实施例二不同之处在于,本实施例中,采用color+Endpoint来标识SR-Policy,且“流过滤规则表项”的创建不同,本实施例中的“流过滤规则表项”的创建分两步:
1)控制器实时告知BGP Flowspec客户端针对某种服务的最新重定向策略,基本原则是重定向到比较空闲的云资源池。
随后BGP Flowspec客户端通过BGP-Flowspec从控制器接收重定向至SRv6 Policy的flow-route,BGP flow-route携带的内容包括:
匹配条件:由NLRI进行携带,具体格式为:match DA:service IP;
匹配后的动作:由重新向到扩展的indirection-id的扩展的团体属性以及隧道封装属性SR-Policy Sub-TLV联合携带,具体格式为:
action:set<重新向到扩展的indirection-id的扩展的团体属性:SR Policy组标识,SR-Policy Sub-TLV:color+Endponit>。
其中,对于重新向到扩展的indirection-id的扩展的团体属性,SR Policy组有两种扩展:一种是使用重定向到indirection-id的扩展的团体属性格式如图7所示,ID-type字段定义新的类型:SR-Policy组,对应Generalized indirection_id为SR-Policy组或者使用现有的0;另外一种是使用现有的ID-type字段,0:本地ID,对应的Generalized indirection_id为本地ID,这个本地ID的含义是SR-Policy组。
其中SR-Policy Sub-TLV用于携带color+endpoint用于标识一条SR-Policy,SR-Policy Sub-TLV是新定义的隧道封装属性Sub-TLV,可以携带多个。
比如:
T1时刻从控制器接收flow-route:match service-1 IP,set<重新向到扩展的indirection-id的扩展的团体属性:SR Policy组标识:1,SR-Policy Sub-TLV:color C1+Endponit:PE1>,其中,SRv6 Policy-1的Segment List为{PE1},希望将业务流引导至资源池A。
T2时刻从控制器接收flow-route:match service-1IP,set<重新向到扩展的indirection-id的扩展的团体属性:SR Policy组标识:1,SR-Policy Sub-TLV:color C2+Endponit:PE2>,其中,SRv6 Policy-2的Segment List为{PE2},希望将业务流引导至资源池B。
其中,由于SR-Policy Sub-TLV携带了N比特,且N比特设置为1,表示针对同一个匹配条件,节点会新生成一条过滤规则,不会覆盖先前生成的过滤规则。
2)BGP Flowspec客户端生成“流匹配过滤表项”中的两条条目。
“流匹配过滤表项”的内容如表2所示:
表2
Figure PCTCN2022092504-appb-000002
Figure PCTCN2022092504-appb-000003
另外,在转发面发现业务报文无法命中一个流表项(SA,DA)的情况下,就会上送CPU,触发生成相关的流表项,其转发动作拷贝前述最新下发的BGP-FS for SRv6 Policy(比如T2时刻下发的SRv6 Policy-2)。
平台需收集转发面的特定“流表项”的流量统计,若发现一定时间内无新增流量,则老化该特定“流表项”并向转发面下发删除。
具体实施例四:
与具体实施例二不同之处在于,在本实施例中,同一时刻,针对一组流量,会同时重定向到多个SR-Policy,此时,采用Binding SID来标识SR-Policy,其中,Binding SID1标识SR-Policy1,Binding SID2标识SR-Policy2,下面来描述“流过滤规则表项”的过程。
本实施例具体包括以下步骤:
步骤1101:BGP FLOWSPEC控制器发送携带重定向到一个或者多个SR-Policy的过滤规则的Flowspc路由。
步骤1102:BGP Flowspec客户端生成“流匹配过滤表项”。
其中,BGP flow-route携带的内容包括:
匹配条件:由NLRI携带,具体格式为:match DA;
匹配后的动作,可以由重新向到扩展的indirection-id的扩展的团体属性携带,具体格式为:
action:set<重新向到扩展的indirection-id的扩展的团体属性:Binding SID1,Binding SID2>。
也可以由重新向到扩展的indirection-id的扩展的团体属性以及隧道封装属性联合携带,具体格式为:
action:set<重新向到扩展的indirection-id的扩展的团体属性:SR Policy组标识:1,SR-Policy Sub-TLV:color C1+Endponit:PE1,SR-Policy Sub-TLV:color C2+Endponit:PE2>。
其中,对于重新向到扩展的indirection-id的扩展的团体属性:SR Policy组有两种扩展方式:一种是使用重定向到indirection-id的扩展的团体属性格式如图7所示,ID-type字段定义新的类型:SR-Policy组,对应Generalized indirection_id为SR-Policy组或者使用现有的0;另外一种是使用现有的ID-type字段,0:本地ID,对应的Generalized indirection_id为本地ID,这个本地ID的含义是SR-Policy组。
同时,重新向到扩展的indirection-id的扩展的团体属性扩展一个标志位:N,用于标识对于同一个匹配条件,同时刻携带多个扩展的indirection-id的扩展的团体属性时,团体属性之间非覆盖关系,是额外增加的关系。其他的格式不变。
其中,“流匹配过滤表项”的局部内容如表3所示:
表3
匹配条件 流量匹配后的action
<DA> Binding SID1
<DA> Binding SID2
另外,当转发面发现业务报文无法命中一个流表项(DA)时,就会上送CPU,触发生成相关的流表项,其转发动作拷贝最新下发的BGP-FS for SRv6 Policy(比如Binding SID1及Binding SID2)。
平台需收集转发面的特定“流表项”的流量统计,若发现一定时间内无新增流量,则老化该特定“流表项”并向转发面下发删除。
具体实施例五:
与具体实施例二不同之处在于,如图10所示,在本实施例中,同一时刻,针对一组流量,会同时重定向到多个SR-Policy,且本实施例采用color+endpoint来标识SR-Policy,其中,color C1+Endponit:D标识SR-Policy1,color C2+Endponit:D标识SR-Policy2,下面来描述“流过滤规则表项”的过程。
步骤1201:BGP FLOWSPEC控制器发送携带重定向到一个或者多个SR-Policy的过滤规则的Flowspc路由。
步骤1202:BGP Flowspec客户端生成“流匹配过滤表项”。
其中,BGP flow-route携带的内容包括:
匹配条件:由NLRI携带,其格式为:match DA;
匹配后的动作,由重新向到扩展的indirection-id的扩展的团体属性以及隧道封装属性联合携带,其格式为:
action:set<重新向到扩展的indirection-id的扩展的团体属性:SR Policy组标识:1,SR-Policy Sub-TLV:color C1+Endponit:D,SR-Policy Sub-TLV:color C2+Endponit:D>。
其中重新向到扩展的indirection-id的扩展的团体属性:SR Policy组有两种扩展:一种是使用重定向到indirection-id的扩展的团体属性格式如图7所示,ID-type字段定义新的类型:SR-Policy组,对应Generalized indirection_id为SR-Policy组或者使用现有的0;另外一种是使用现有的ID-type字段,0:本地ID,对应的Generalized indirection_id为本地ID,这个本地ID的含义是SR-Policy组。
“流匹配过滤表项”的局部内容如表4所示:
表4
Figure PCTCN2022092504-appb-000004
另外,当转发面发现业务报文无法命中一个流表项(DA)时,就会上送CPU,触发生成 相关的流表项,其转发动作拷贝最新下发的BGP-FS for SRv6 Policy。
平台需收集转发面的特定“流表项”的流量统计,若发现一定时间内无新增流量,则老化该特定“流表项”并向转发面下发删除。
显然,本领域的技术人员应该明白,上述的本公开的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本公开不限制于任何特定的硬件和软件结合。
以上所述仅为本公开的优选实施例而已,并不用于限制本公开,对于本领域的技术人员来说,本公开可以有各种更改和变化。凡在本公开的原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。

Claims (26)

  1. 一种路由获取方法,包括:
    获取来自控制器的流规格Flowspec路由,其中,所述Flowspec路由中包含有目标规则,所述目标规则用于指示将接收到的流量重定向到一个或多个目标流量工程路径SR-Policy。
  2. 根据权利要求1所述的方法,其中,在获取来自控制器的流规格Flowspec路由之后,所述方法还包括:
    在接收到所述流量之后,基于所述目标规则,将所述流量重定向到所述目标SR-Policy。
  3. 根据权利要求1所述的方法,其中,所述目标规则包括目标条件以及目标动作,其中,所述目标条件包括对所述流量进行匹配的条件,所述目标动作为在对所述流量进行匹配之后对所述流量所执行的动作信息。
  4. 根据权利要求3所述的方法,其中,所述目标条件携带在所述Flowspec路由中包含的网络层可达性信息NIRL中。
  5. 根据权利要求3所述的方法,其中,所述目标动作携带在所述Flowspec路由中包含的扩展的团体属性中。
  6. 根据权利要求5所述的方法,其中,所述扩展的团体属性包括目标比特位,所述目标比特位用于标识所述扩展的团体属性与接收到的其他团体属性的目标关系,其中,所述目标关系包括以下之一:由所述扩展的团体属性覆盖所述其他团体属性,所述扩展的团体属性与所述其他团体属性共存。
  7. 根据权利要求6所述的方法,其中,所述扩展的团体属性与所述其他团体属性是由所述控制器在同一时刻或者在不同时刻所发送的。
  8. 根据权利要求7所述的方法,其中,所述扩展的团体属性与所述其他团体属性是针对同一组流或同一个服务所设置的。
  9. 根据权利要求5所述的方法,其中,所述扩展的团体属性中包括有目标字段,其中,所述目标字段的值为预定值,所述预定值用于指示所述目标SR-Policy的标识类型。
  10. 根据权利要求9所述的方法,其中,所述预定值包括以下至少之一:
    本地ID的类型值、预定义的类型值。
  11. 根据权利要求5所述的方法,其中,所述扩展的团体属性中包括有所述SR-Policy的标识,其中,在本地ID标识SR-Policy组的含义或者预定义的类型值是SR-Policy组的含义时的情况下,所述SR-Policy组的标识携带在SR-Policy标识字段中。
  12. 根据权利要求9所述的方法,其中,所述Flowspec路由还包括扩展的隧道封装属性,在所述目标SR-Policy中包括所述预定值标识的SR-Policy类型的情况下,所述扩展的隧道封装属性用于标识所述目标SR-Policy组中的成员SR-Policy。
  13. 根据权利要求5所述的方法,其中,所述Flowspec路由还包括扩展的隧道封装属性, 所述目标动作由所述扩展的团体属性和所述扩展的隧道封装属性联合携带。
  14. 根据权利要求3所述的方法,其中,所述基于所述目标规则,将接收到的所述流量重定向到所述目标SR-Policy包括:
    按照所述目标条件对所述流量进行匹配;
    在匹配到与所述流量对应的目标动作的情况下,按照所述目标动作对所述流量进行处理,以将所述流量重定向到所述目标SR-Policy。
  15. 根据权利要求14所述的方法,其中,
    按照所述目标条件对所述流量进行匹配包括:在预先生成的第一流匹配表项中对所述流量进行匹配,其中,所述第一流匹配表项中包括有对应的目标条件以及目标动作,所述目标条件用于指示匹配信息,所述目标动作用于指示SR-Policy;
    在匹配到与所述流量对应的目标动作的情况下,按照所述目标动作对所述流量进行处理,以将所述流量重定向到所述目标SR-Policy包括:在预先生成的所述第一流匹配表项中匹配到与所述流量的情况下,将所述流量重定向到所述第一流匹配表项中包括的所述目标SR-Policy中。
  16. 根据权利要求15所述的方法,其中,在预先生成的第一流匹配表项中对所述流量进行地址匹配之后,所述方法还包括:
    在预先生成的所述第一流匹配表项中未匹配到与所述流量对应的所述目标动作情况下,向处理器发送第一指令,以指示所述处理器生成第二流匹配表项,其中,所述第二流匹配表项中包括有用于指示所述目标条件。
  17. 根据权利要求15所述的方法,其中,所述方法还包括:
    接收来自处理器的第二指令;
    基于第二指令删除所述第一流匹配表项。
  18. 一种路由发送方法,包括:
    向目标客户端发送流规格Flowspec路由,其中,所述Flowspec路由中包含有目标规则,所述目标规则用于指示将接收到的流量重定向到一个或多个目标流量工程路径SR-Policy。
  19. 根据权利要求18所述的方法,其中,所述方法还包括:
    所述目标规则包括目标条件以及目标动作,其中,所述目标条件包括对所述流量进行匹配的条件,所述目标动作为在对所述流量进行匹配之后对所述流量所执行的动作信息。
  20. 根据权利要求19所述的方法,其中,所述目标动作携带在所述Flowspec路由中包含的扩展的团体属性中。
  21. 根据权利要求20所述的方法,其中,所述扩展的团体属性中包括有目标字段,其中,所述目标字段的值为预定值,所述预定值用于指示所述目标SR-Policy的标识类型。
  22. 根据权利要求20所述的方法,其中,所述扩展的团体属性中包括有所述SR-Policy的标识,其中,在本地ID标识SR-Policy组的含义或者预定义的类型值是SR-Policy组的含 义时的情况下,所述SR-Policy组的标识携带在SR-Policy标识字段中。
  23. 一种路由获取装置,包括:
    获取模块,设置为获取来自控制器的流规格Flowspec路由,其中,所述Flowspec路由中包含有目标规则,所述目标规则用于指示将接收到的流量重定向到一个或多个目标流量工程路径SR-Policy。
  24. 一种路由发送装置,包括:
    发送模块,设置为向目标客户端发送流规格Flowspec路由,其中,所述Flowspec路由中包含有目标规则,所述目标规则用于指示将接收到的流量重定向到一个或多个目标流量工程路径SR-Policy。
  25. 一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,其中,所述计算机程序被处理器执行时实现所述权利要求1至22任一项中所述的方法的步骤。
  26. 一种电子装置,包括存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现所述权利要求1至22任一项中所述的方法的步骤。
PCT/CN2022/092504 2021-05-12 2022-05-12 一种路由获取方法、装置、存储介质及电子装置 WO2022237879A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP22806841.7A EP4340318A1 (en) 2021-05-12 2022-05-12 Routing obtaining method and apparatus, storage medium, and electronic apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110519239.X 2021-05-12
CN202110519239.XA CN115348206A (zh) 2021-05-12 2021-05-12 一种路由获取方法、装置、存储介质及电子装置

Publications (1)

Publication Number Publication Date
WO2022237879A1 true WO2022237879A1 (zh) 2022-11-17

Family

ID=83947214

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/092504 WO2022237879A1 (zh) 2021-05-12 2022-05-12 一种路由获取方法、装置、存储介质及电子装置

Country Status (3)

Country Link
EP (1) EP4340318A1 (zh)
CN (1) CN115348206A (zh)
WO (1) WO2022237879A1 (zh)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9577943B1 (en) * 2015-03-12 2017-02-21 Juniper Networks, Inc. Tiered services in border gateway protocol flow specification
CN112737950A (zh) * 2020-12-24 2021-04-30 新华三大数据技术有限公司 一种业务流量转发方法及装置

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9577943B1 (en) * 2015-03-12 2017-02-21 Juniper Networks, Inc. Tiered services in border gateway protocol flow specification
CN112737950A (zh) * 2020-12-24 2021-04-30 新华三大数据技术有限公司 一种业务流量转发方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
HUAWEI TECHNOLOGIES CO., LTD.: " Configuration of Ipv4 Public Network BGP Flow Specification Route Redirection to SR-MPLS TE Policy", BGP FLOW SPECIFICATION, 10 October 2020 (2020-10-10), pages 1 - 3, XP093003898, Retrieved from the Internet <URL:https://support.huawei.com/enterprise/zh/doc/EDOC1000173014/cbe74003> [retrieved on 20221201] *

Also Published As

Publication number Publication date
EP4340318A1 (en) 2024-03-20
CN115348206A (zh) 2022-11-15

Similar Documents

Publication Publication Date Title
US10749794B2 (en) Enhanced error signaling and error handling in a network environment with segment routing
US10033648B2 (en) Multicast message forwarding method and device
CN112039748B (zh) 软件定义的网络环境中服务的自动发现和自动扩缩
US9369347B2 (en) Service to node resolution
US8797874B2 (en) Apparatus and system for packet routing and forwarding in an interior network
US8750288B2 (en) Physical path determination for virtual network packet flows
CN107483345B (zh) 业务处理方法、设备及系统
EP2849397A1 (en) Communication system, control device, communication method, and program
CN107046506B (zh) 一种报文处理方法、流分类器和业务功能实例
US11616720B2 (en) Packet processing method and system, and device
US11522795B1 (en) End to end application identification and analytics of tunnel encapsulated traffic in the underlay
WO2021196967A1 (zh) 消息交互方法、装置、设备和存储介质
US10581738B2 (en) Efficient inter-VLAN routing in openflow networks
US20200412646A1 (en) System and method for adding routing paths in a network
CN107566298B (zh) 一种生成表项的方法和设备
WO2022237879A1 (zh) 一种路由获取方法、装置、存储介质及电子装置
WO2022247689A1 (zh) 流量报文转发方法、客户端、控制器及存储介质
WO2018095438A1 (zh) 等价多路径ecmp处理方法及装置
WO2009121261A1 (zh) 路由管理方法、装置和系统
CN111865805A (zh) 一种组播gre报文处理方法及系统
EP3104562B1 (en) Method of aggregation of flows in ict networks
CN115334035B (zh) 一种报文转发方法、装置、电子设备及存储介质
CN104468305A (zh) 实现三层虚拟专用网方法和设备
US11902158B2 (en) System and method for forwarding packets in a hierarchical network architecture using variable length addresses
CN110958185B (zh) 基于业务的QoS配置方法及装置

Legal Events

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

Ref document number: 22806841

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2022806841

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2022806841

Country of ref document: EP

Effective date: 20231212