Virtual Private Network VPN Service Optimization Method and Device
Through the FlowSpec route publishing mechanism, redirection indication information is used to ensure that data flows are accurately directed to the target VPN instance in the BGP network, solving the problem of inaccurate data flow distribution between VPN instances and improving the optimization effect of VPN services.
Patent Information
- Application Number
- CN202110171521.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2016-01-29
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2036-01-29
AI Technical Summary
In a Border Gateway Protocol (BGP)/Multiprotocol Label Switching (MPLS) Internet Protocol (IP) virtual private network (VPN), multiple VPN instances may be configured with the same VPN Export Target and VPN Import Target, resulting in the inability to accurately transfer data The flow is directed to the corresponding VPN instance.
Through the FlowSpec route publishing mechanism, the analysis unit is used to obtain the traffic characteristics of the data flow, and the redirection indication information is used to carry identification information in the second network device to ensure that the data flow is redirected to the target VPN instance and to avoid the data flow being misled to other places. VPN instance.
It achieves accurate distribution and transmission of data flows, avoids data flows being misdirected to the wrong VPN instance, and improves the optimization effect of VPN services.
Smart Images

Figure CN112838975B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to computer networks, and more particularly, to a VPN service optimization method and device. Background Art
[0002] Border Gateway Protocol (BGP): It is a dynamic routing protocol used between autonomous systems (AS). The three earlier versions are BGP-1 (RFC1105), BGP-2 (RFC1163) and BGP-3 (RFC1267). They are mainly used to exchange reachable routing information between ASs, build propagation paths between AS domains, prevent routing loops, and apply some routing policies at the AS level. The current version is BGP-4 (RFC4271). As the de facto Internet external routing protocol standard, BGP is widely used between Internet Service Providers (ISPs).
[0003] Currently, in Border Gateway Protocol (BGP) / Multiprotocol Label Switching (MPLS) Internet Protocol (IP) Virtual Private Network (VPN) networks, VPN target attributes are often used to control the release and reception of VPN routing information between sites. The settings of VPN export target (Export Target) and VPN import target (Import Target) are independent of each other, and multiple values can be set for both, which can achieve flexible VPN access control and thus realize various VPN networking solutions.
[0004] However, in existing network deployments, there may be multiple VPN instances configured with the same VPN ExportTarget and VPN Import Target, which may result in a problem in which the data flow cannot be accurately directed to the corresponding VPN instance. Summary of the invention
[0005] The embodiment of the present invention provides a VPN service optimization method and device, which can accurately distribute the data flow of each VPN instance to the corresponding VPN instance for transmission, thereby optimizing the VPN service to a certain extent.
[0006] In a first aspect, a first network device is proposed for publishing FlowSpec routes, the first network device comprising: an analysis unit, for analyzing a data flow entering a network where the first network device is located, so as to obtain traffic characteristics of a target data flow; a route publishing unit, for publishing a FlowSpec route, the FlowSpec route carrying redirection indication information, the redirection indication information comprising identification information, the identification information being used to uniquely identify a first VPN instance in a second network device, the redirection indication information being used to indicate that a data flow containing traffic characteristics of the target data flow is redirected to the first VPN instance, the second network device being an edge device of a service provider network to which the network is accessed, the first VPN instance being a target VPN instance to which the target data flow in the second network device is directed after being redirected.
[0007] With reference to the first aspect, in a first possible implementation manner, the identification information is specifically implemented as follows: the identification information is the RD or name of the first VPN instance.
[0008] In combination with the first aspect or the first possible implementation of the first aspect, in a second possible implementation, the extended community attribute of the Border Gateway Protocol BGP update message to which the FlowSpec route belongs includes a destination RD field, and the value of the destination RD field is the identification information.
[0009] In a second aspect, a second network device is proposed, which is used as an edge device of a service provider network. The second network device includes: a receiving unit, which is used to receive a FlowSpec route published by a first network device, and the first network device is a network device used for publishing FlowSpec routes in the service provider network. The FlowSpec route carries the traffic characteristics of a target data flow, and the FlowSpec route also carries redirection indication information. The redirection indication includes identification information, and the identification information is used to uniquely identify a first VPN instance in the second network device. The redirection indication information is used to indicate that a data flow that meets the traffic characteristics of the target data flow is redirected to the first VPN instance, and the first VPN instance is the target VPN instance to which the target data flow in the second network device is pointed after being redirected; an analyzing unit, which is used to analyze the data flow passing through the network device; and a redirecting unit, which is used to redirect the first data flow to the first VPN instance if the traffic characteristics of the first data flow passing through the network device include the traffic characteristics of the target data flow.
[0010] In combination with the second aspect, in a first possible implementation manner, the identification information is specifically implemented as follows: the identification information is the RD or name of the first VPN instance.
[0011] In combination with the second aspect or the first possible implementation of the second aspect, in a second possible implementation, the extended community attribute of the Border Gateway Protocol BGP update message to which the FlowSpec route belongs includes a destination RD field, and the value of the destination RD field is the identification information.
[0012] In combination with the second aspect or the first possible implementation of the second aspect or the second possible implementation of the second aspect, in a third possible implementation, the second network device further includes: a route publishing unit, configured to publish the FlowSpec route in the service provider network.
[0013] In a third aspect, a third network device is proposed for VPN route publishing, the third network device comprising: an acquisition unit, used to acquire a first route sent by a fourth network device, the fourth network device is an edge device of the service provider network where the third network device is located, and the first route is a VPN route; a processing unit, used to generate a second route based on a first VPN instance accessed to a fifth network device and the first route, wherein the fifth network device is another edge device of the service provider network, the second route is a VPN route, the second route carries identification information and routing information of the first route, the identification information is used to uniquely identify the first VPN instance in the fifth network device; a route publishing unit, used to send the second route to the fifth network device.
[0014] In combination with the third aspect, in a first possible implementation manner, the identification information includes an RD or a name of the first VPN instance.
[0015] In combination with the third aspect or the first possible implementation method of the third aspect, in a second possible implementation method, the specific implementation is: the extended group attribute of the BGP update message to which the second route belongs includes a destination RD field, and the value of the destination RD field is the identification information; or, the BGP update message to which the second route belongs includes an RD attribute, and the value of the destination RD attribute is the identification information.
[0016] In combination with the third aspect or the first possible implementation of the third aspect or the second possible implementation of the third aspect, in the third possible implementation, the specific implementation is: the second route also carries a transmission policy, and the transmission policy is used to indicate the transmission tunnel used by the second route.
[0017] In a fourth aspect, a fifth network device is proposed, which is used as an edge device of a service provider network. The fifth network device includes: a receiving unit, which is used to receive a second route sent by a third network device, and the third network device is a network device used for VPN route publishing in the service provider network. The second route carries information of a first route sent by a fourth network device to the third network device, and the fourth network device is another edge device of the service provider network. The second route also carries identification information, and the identification information is used to uniquely identify a first VPN instance accessing the fifth network device in the fifth network device, and both the first route and the second route are VPN routes; a route management unit, which is used to add the second route to the routing table of the first VPN instance.
[0018] In conjunction with the fourth aspect, in a first possible implementation manner, the identification information includes an RD or a name of the first VPN instance.
[0019] In combination with the fourth aspect or the first possible implementation of the fourth aspect, in a second possible implementation, the extended group attribute of the BGP update message to which the second route belongs includes a destination RD field, and the value of the destination RD field is the identification information; or, the BGP update message to which the second route belongs includes a destination RD attribute, and the value of the destination RD attribute is the identification information.
[0020] In combination with the fourth aspect or the first possible implementation of the fourth aspect or the second possible implementation of the fourth aspect, in a third possible implementation, the second route also carries a transmission policy, and the transmission policy is used to indicate the transmission tunnel used by the first VPN instance to access the fourth network device through the second route; the routing management unit is also used to use the transmission tunnel for transmission when the data flow of the network device on the first VPN instance accesses the fourth network device through the second route.
[0021] In a fifth aspect, a VPN service optimization method is proposed, comprising: a first network device analyzes a data flow entering a network where the first network device is located to obtain traffic characteristics of a target data flow, the first network device being used for FlowSpec route publishing; the first network device publishes a FlowSpec route, the FlowSpec route carries redirection indication information, the redirection indication information includes identification information, the identification information is used to uniquely identify a first VPN instance in a second network device, the redirection indication information is used to indicate that a data flow including traffic characteristics of the target data flow is redirected to the first VPN instance, the second network device is an edge device of a service provider network to which the network is accessed, and the first VPN instance is a target VPN instance to which the target data flow in the second network device is pointed after being redirected.
[0022] In conjunction with the fifth aspect, in a first possible implementation manner, the identification information is specifically implemented as follows: the identification information is the RD or name of the first VPN instance.
[0023] In combination with the fifth aspect or the first possible implementation of the fifth aspect, in a second possible implementation, the extended community attribute of the Border Gateway Protocol BGP update message to which the FlowSpec route belongs includes a destination RD field, and the value of the destination RD field is the identification information.
[0024] In a sixth aspect, a VPN service optimization method is proposed, including: a second network device receives a FlowSpec route published by a first network device, the first network device is a network device used for publishing FlowSpec routes in a service provider network where the first network device is located, the FlowSpec route carries traffic characteristics of a target data flow, the FlowSpec route also carries redirection indication information, the redirection indication contains identification information, the identification information is used to uniquely identify a first VPN instance in the second network device, the redirection indication information is used to indicate that a data flow that meets the traffic characteristics of the target data flow is redirected to the first VPN instance, the first VPN instance is the target VPN instance to which the target data flow in the second network device is pointed after being redirected; the second network device analyzes the data flow passing through the second network device; if the traffic characteristics of the first data flow passing through the second network device include the traffic characteristics of the target data flow, the second network device redirects the first data flow to the first VPN instance.
[0025] In combination with the sixth aspect, in a first possible implementation manner, the identification information is specifically implemented as follows: the identification information is the RD or name of the first VPN instance.
[0026] In combination with the sixth aspect or the first possible implementation of the sixth aspect, in a second possible implementation, the extended community attribute of the Border Gateway Protocol BGP update message to which the FlowSpec route belongs includes a destination RD field, and the value of the destination RD field is the identification information.
[0027] In combination with the sixth aspect or the first possible implementation of the sixth aspect or the second possible implementation of the sixth aspect, in a third possible implementation, the method further includes: the second network device publishes the FlowSpec route in the service provider network.
[0028] In a seventh aspect, a VPN service optimization method is proposed, comprising: a third network device obtains a first route sent by a fourth network device, the third network device is used for VPN route publishing, the fourth network device is an edge device of a service provider network where the third network device is located, and the first route is a VPN route; the third network device generates a second route based on a first VPN instance accessed to a fifth network device and the first route, wherein the fifth network device is another edge device of the service provider network, the second route is a VPN route, the second route carries identification information and routing information of the first route, and the identification information is used to uniquely identify the first VPN instance in the fifth network device; the third network device sends the second route to the fifth network device.
[0029] In combination with the seventh aspect, in a first possible implementation manner, the identification information includes an RD or a name of the first VPN instance.
[0030] In combination with the seventh aspect or the first possible implementation method of the seventh aspect, in a second possible implementation method, the specific implementation is: the extended group attribute of the BGP update message to which the second route belongs includes a destination route identifier RD field, and the value of the destination RD field is the identification information; or, the BGP update message to which the second route belongs includes a destination route identifier RD attribute, and the value of the destination RD attribute is the identification information.
[0031] In combination with the seventh aspect or the first possible implementation of the seventh aspect or the second possible implementation of the seventh aspect, in a third possible implementation, the specific implementation is: the second route also carries a transmission policy, and the transmission policy is used to indicate the transmission tunnel used by the second route.
[0032] In an eighth aspect, a VPN service optimization method is proposed, comprising: a fifth network device receives a second route sent by a third network device, the fifth network device is an edge device of a service provider network where the fifth network device is located, the third network device is a network device in the service provider network used for VPN route publishing, the second route carries information of a first route sent by a fourth network device to the third network device, the fourth network device is another edge device of the service provider network, the second route also carries identification information, the identification information is used to uniquely identify a first VPN instance accessing the fifth network device in the fifth network device, the first route and the second route are both VPN routes; the fifth network device adds the second route to the routing table of the first VPN instance.
[0033] In combination with the eighth aspect, in a first possible implementation manner, the identification information includes the RD or name of the first VPN instance.
[0034] In combination with the eighth aspect or the first possible implementation method of the eighth aspect, in a second possible implementation method, the extended group attribute of the BGP update message to which the second route belongs includes a destination RD field, and the value of the destination RD field is the identification information; or, the BGP update message to which the second route belongs includes a destination RD attribute, and the value of the destination RD attribute is the identification information.
[0035] In combination with the eighth aspect or the first possible implementation of the eighth aspect or the second possible implementation of the eighth aspect, in a third possible implementation, the second route also carries a transmission policy, and the transmission policy is used to indicate the transmission tunnel used by the fifth network device to access the fourth network device through the second route in the first VPN instance; the method also includes: if the data flow of the fifth network device on the first VPN instance accesses the fourth network device through the second route, then the transmission tunnel is used for transmission.
[0036] In the ninth aspect, a network device is provided for FlowSpec route publishing, the network device comprising a memory and a processor, the memory being used to store instructions, the processor being used to execute the instructions stored in the memory, and the execution of the instructions stored in the memory causing the processor to execute the method executed by the first network device in the fifth aspect or any possible implementation of the fifth aspect.
[0037] In the tenth aspect, a network device is provided for serving as an edge device of a service provider network, the network device comprising a memory and a processor, the memory being used to store instructions, the processor being used to execute the instructions stored in the memory, and the execution of the instructions stored in the memory causing the processor to execute the method executed by the second network device in the sixth aspect or any possible implementation of the sixth aspect.
[0038] In the eleventh aspect, a network device is provided for VPN route publishing, the network device comprising a memory and a processor, the memory being used to store instructions, the processor being used to execute the instructions stored in the memory, and the execution of the instructions stored in the memory causing the processor to execute the method executed by the third network device in the seventh aspect or any possible implementation of the seventh aspect.
[0039] In the twelfth aspect, a network device is provided for serving as an edge device of a service provider network, the network device comprising a memory and a processor, the memory being used to store instructions, the processor being used to execute the instructions stored in the memory, and the execution of the instructions stored in the memory causes the processor to execute the method executed by the fifth network device in the eighth aspect or any possible implementation of the eighth aspect.
[0040] In the thirteenth aspect, a computer-readable storage medium is provided, which stores one or more programs, and the one or more programs include instructions, which when executed by a portable electronic device including multiple applications, can enable the portable electronic device to execute the method executed by the first network device in the fifth aspect or any possible implementation of the fifth aspect.
[0041] In a fourteenth aspect, a computer-readable storage medium is provided, which stores one or more programs, and the one or more programs include instructions, which, when executed by a portable electronic device including multiple applications, can enable the portable electronic device to execute the method executed by the second network device in the sixth aspect or any possible implementation of the sixth aspect.
[0042] In the fifteenth aspect, a computer-readable storage medium is provided, which stores one or more programs, and the one or more programs include instructions, which when executed by a portable electronic device including multiple applications, can enable the portable electronic device to execute the method executed by the third network device in the seventh aspect or any possible implementation of the seventh aspect.
[0043] In the sixteenth aspect, a computer-readable storage medium is provided, which stores one or more programs, and the one or more programs include instructions, which, when executed by a portable electronic device including multiple applications, can enable the portable electronic device to execute the method executed by the fifth network device in the eighth aspect or any possible implementation of the eighth aspect.
[0044] In the seventeenth aspect, a network system is provided, which includes the first network device of the first aspect and the second network device of the second aspect, or includes the network device of the fifth aspect and the network device of the sixth aspect.
[0045] In the eighteenth aspect, a network system is provided, which includes the third network device of the third aspect and the fifth network device of the fourth aspect, or includes the network device of the seventh aspect and the network device of the eighth aspect.
[0046] The VPN service optimization method and network device of the embodiment of the present invention, on the one hand, the first network device publishes a FlowSpec route, and the identification information used in the FlowSpec route can uniquely identify the first VPN instance in the second network device, so that the second network device can accurately guide the target data flow to the first VPN instance, so as to guide the target data flow to the target device corresponding to the target data flow through the first VPN instance, avoid directing the target data flow to a VPN instance other than the first VPN instance, and optimize the VPN service to a certain extent; on the other hand, the third network device establishes a second route for the first VPN instance of the fifth network device according to the first route of the fourth network device, and sends the second route to the fifth network device, so that the fifth network device can add the second route to the routing table of the first VPN instance of the fifth network device, so that the data flow in the first VPN instance of the fifth network device can smoothly access the fourth network device, and the data flow is accurately directed to the corresponding VPN instance, which can optimize the VPN service to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0048] Figure 1 It is a flow chart of a method for optimizing VPN services according to an embodiment of the present invention.
[0049] Figure 2 It is an interactive flow chart of VPN service optimization according to an embodiment of the present invention.
[0050] Figure 3 It is another flow chart of a method for optimizing VPN services according to an embodiment of the present invention.
[0051] Figure 4 It is a schematic diagram of the structure of a network device according to an embodiment of the present invention.
[0052] Figure 5 It is another structural schematic diagram of the network device according to the embodiment of the present invention.
[0053] Figure 6 It is a flow chart of another method for optimizing VPN services according to an embodiment of the present invention.
[0054] Figure 7 This is another interactive flow chart of VPN service optimization according to an embodiment of the present invention.
[0055] Figure 8This is another interactive flow chart of VPN service optimization according to an embodiment of the present invention.
[0056] Fig. 9 It is a flow chart of another method for optimizing VPN services according to an embodiment of the present invention.
[0057] Fig.10 It is another structural diagram of the network device according to the embodiment of the present invention.
[0058] Fig.11 It is another structural diagram of the network device according to the embodiment of the present invention.
[0059] Fig.12 It is a schematic diagram of the structure of a physical device according to an embodiment of the present invention.
[0060] Fig.13 It is a system block diagram of a network system according to an embodiment of the present invention.
[0061] Fig.14 It is another system block diagram of the network system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0063] In order to facilitate understanding of the embodiments of the present invention, several elements that will be introduced in the description of the embodiments of the present invention are first introduced here.
[0064] Border Gateway Protocol (BGP): It is a dynamic routing protocol used between autonomous systems (AS). The three earlier versions are BGP-1 (RFC1105), BGP-2 (RFC1163) and BGP-3 (RFC1267). They are mainly used to exchange reachable routing information between ASs, build propagation paths between AS domains, prevent routing loops, and apply some routing policies at the AS level. The current version is BGP-4 (RFC4271). As the de facto Internet external routing protocol standard, BGP is widely used between Internet Service Providers (ISPs).
[0065] Multi-Protocol Label Switching (MPLS): It is a new generation of IP high-speed backbone network switching standard proposed by the Internet Engineering Task Force (IETF). MPLS uses labels to forward data. When a packet enters the network, it is assigned a short label of fixed length and encapsulated with the packet. During the entire forwarding process, the switching node forwards only according to the label. MPLS seamlessly integrates the flexibility of IP routing technology and the simplicity of ATM label switching technology. MPLS adds a connection-oriented control plane to the connectionless IP network, adding management and operation means to the IP network. In IP networks, MPLS traffic engineering technology has become an important tool for managing network traffic, reducing congestion, and ensuring the QoS of IP networks to a certain extent.
[0066] Internal BGP Protocol (Internal Border Gateway Protocol, IBGP): In order to ensure the connectivity between IBGP peers, it is necessary to establish a full-mesh relationship between IBGP peers. Assuming that there are n routers inside an AS, the number of IBGP connections that should be established is n(n-1) / 2. When the number of IBGP peers is large, the consumption of network resources and CPU resources is very large. IBGP stipulates that the IBGP publisher (IBGP Speaker) is not allowed to pass the prefix learned from an IBGP neighbor to other IBGP neighbors, so IBGP requires logical full connectivity. Purpose: Prevent the formation of BGP routing loops within the AS; ensure that all routers on the BGP routing path know how to forward data packets to the destination.
[0067] Site: A site is a group of IP systems that have IP connectivity with each other, and the IP connectivity of this group of IP systems does not need to be achieved through the service provider network. Sites are divided based on the topological relationship of the equipment, not the geographical location, although in most cases the equipment in a site is geographically adjacent. If two groups of IP systems that are geographically isolated are interconnected using dedicated lines and can communicate with each other without going through the service provider network, then these two groups of IP systems also constitute a site. A site is connected to the service provider network through a customer edge device (CE). A site can contain multiple CEs, but a CE belongs to only one site. Depending on the situation of the site, the common selection schemes for CE devices are as follows: if the site is just a host, then this host is used as a CE device; if the site is a single subnet, a switch is used as a CE device; if the site is multiple subnets, a router is used as a CE device.
[0068] Virtual Private Network (VPN): For multiple sites connected to the same service provider network, they can be divided into different sets by formulating policies. Only sites belonging to the same set can access each other through the service provider network. This set is a VPN.
[0069] Route Reflector (RR), Client, Cluster, Non-Client: In an AS, one router acts as RR and the other routers act as Clients. An IBGP connection is established between the Client and the Route Reflector. The Route Reflector and its clients form a Cluster. The Route Reflector reflects routing information between clients, and there is no need to establish a BGP connection between clients. A BGP device that is neither a reflector nor a client is called a Non-Client. A fully connected relationship must still be established between the Non-Client and the Route Reflector, and between all the Non-Clients.
[0070] CE (Customer Edge): A user edge device that has an interface directly connected to the service provider SP (Service Provider) network. CE can be a router or switch, or a host. Usually, CE cannot "sense" the existence of VPN and does not need to support MPLS.
[0071] PE (Provider Edge): Provider edge equipment is the edge equipment of the service provider network and is directly connected to the CE. In an MPLS network, all VPN processing occurs on the PE, which places high performance requirements on the PE.
[0072] P (Provider): Backbone equipment in the service provider network, not directly connected to the CE. P equipment only needs to have basic MPLS forwarding capabilities and does not maintain VPN information.
[0073] BGP / MPLS IP VPN: Also commonly known as MPLS L3VPN, its basic model consists of three parts: CE, PE, and P. PE and P devices are only managed by SP; CE devices are only managed by users, unless users delegate management rights to SP. One PE can access multiple CE devices. One CE device can also connect to multiple PEs belonging to the same or different service providers.
[0074] VPN instance: VPN instance is also called VPN routing and forwarding table (VRF). There are multiple routing and forwarding tables on PE, including a public network routing and forwarding table and one or more VPN routing and forwarding tables. In other words, there are multiple instances on PE, including a public network instance and one or more VPN instances. Each VPN instance maintains the routes of its own VPN, and the public network instance maintains the public network routes.
[0075] The difference between the public network routing table and the VPN routing table: the public network routing table includes the IPv4 routes of all PE and P devices, which are generated by the routing protocol or static routing of the backbone network. The VPN routing table includes the routes of all sites belonging to the VPN instance, which are obtained through the VPN routing information interaction between CE and PE or between two PEs. The public network routing table is the minimum forwarding information extracted from the public network routing table according to the routing management policy, while the VPN routing table is the minimum forwarding information extracted from the corresponding VPN routing table according to the routing management policy.
[0076] The relationship between VPN, Site, and VPN instance: VPN is a combination of multiple sites, and a site can belong to multiple VPNs. Each site is associated with a VPN instance on the PE. The VPN instance integrates the VPN membership and routing rules of the sites it is associated with. Multiple sites are combined into a VPN according to the rules of the VPN instance.
[0077] Route Distinguisher (RD): It is used to distinguish different VPNs that use the same address space IP address prefix (for example, IPv4 prefix, IPv6 prefix, etc.). VPN instances achieve address space independence through RD. The RD structure allows each service provider to independently allocate RD, but in order to ensure normal routing in the case of dual-homing of CE, RD must be globally unique. The IPv4 address with RD added is called VPN-IPv4 address. After PE receives the IPv4 route from CE, it converts it into a globally unique VPN-IPv4 route and publishes it on the public network. The VPN-IPv6 structure is similar to VPN-IPv4, except that the IPv4 prefix is replaced by the IPv6 prefix. Generally, a unique RD is assigned to a site, which is the identifier of VRF.
[0078] The difference between the public network and the private network: The public network routing table is generated by IGP routing and may contain BGP-4 (IPv4) routes, but no VPN routes; the VRF routing table contains specific VPN routes, which may have routes introduced into the VRF by MP-iBGP routes, and may also have routes obtained by the VRF routing instance from the CE.
[0079] VPN Target: BGP / MPLS IP VPN uses the 64-bit BGP extended community attribute VPN Target (also called Route Target, RT for short) to control the release of VPN routing information. Each VPN instance is associated with one or more VPN Target attributes. There are two types of VPN Target attributes: Export Target and Import Target.
[0080] Export Target: After the local PE learns IPv4 routes from directly connected sites, it converts them into VPN IPv4 routes and sets the Export Target attribute for these routes. The Export Target attribute is advertised along with the routes as an extended community attribute of BGP.
[0081] Import Target: When a PE receives a VPN-IPv4 route advertised by another PE, it checks its Export Target attribute. When this attribute matches the Import Target of a VPN instance on the PE, the PE adds the route to the routing table of the VPN instance.
[0082] BGP Flow Specification (FlowSpec) (RFC 5575) function: By passing BGP Flow Specification routes, the traffic policy is passed to the BGP Flow Specification peer to achieve the purpose of controlling attack traffic.
[0083] BGP Flow Specification routing: RFC5575 defines a BGP Flow Specification routing, which includes a new type of BGP network layer reachability information and extended community attributes. Through this new network layer reachability information and extended community attributes, BGP Flow Specification routing can carry traffic matching conditions and actions to be performed after traffic matching.
[0084] BGP Flow Specification peer relationship: established between the device that creates the BGP Flow Specification route and the network ingress device, used to transmit the BGP Flow Specification route. When the BGP Flow Specification peer receives the BGP Flow Specification route, it converts the preferred route into a traffic control policy at the forwarding level to achieve the purpose of controlling attack traffic.
[0085] RFC 5575 defines 12 commonly used traffic matching rules (destination address, source address, IP protocol number, port number, destination port number, source port number, ICMP type, ICMP encoding, TCP flags, DSCP, fragmentation type, etc.). These 12 rules are encapsulated in the BGP Flow Specification route and transmitted as network layer reachability information.
[0086] RFC 5575 defines four common traffic processing behaviors (dropping traffic, limiting traffic rate, modifying the DSCP value of the message, and redirecting to VPN). These four processing behaviors are carried as extended community attributes in BGP FlowSpec routes.
[0087] Figure 1 It is a flow chart of a method for optimizing VPN services according to an embodiment of the present invention. Figure 1 The method is performed by the first network device. In the embodiment of the present invention, the first network device is used for FlowSpec route publishing, and can be a dedicated traffic analysis server, or an SDN controller, etc.
[0088] 101. A first network device analyzes a data flow entering a network where the first network device is located to obtain a flow characteristic of a target data flow. The first network device is used for FlowSpec routing publication.
[0089] The target data flow refers to the data flow to be processed by the FlowSpec route to be published. For example, the target data flow may be an attack data flow, etc. In the embodiment of the present invention, the first network device may analyze the data flow in a variety of ways to determine the target data flow. For example, taking the attack data flow as an example, the attack data flow may be determined by NetStream detection, etc. The first network device may detect the attack data flow therein through detection, and then obtain the traffic characteristics of the attack data flow, for example, the IP address of the device attacked by the Distributed Denial of Service (DDoS) attack, etc.
[0090] 102. The first network device publishes a FlowSpec route, which carries redirection indication information. The redirection indication information includes identification information, which is used to uniquely identify the first VPN instance in the second network device. The redirection indication information is used to indicate that the data flow containing the traffic characteristics of the target data flow is redirected to the first VPN instance. The second network device is an edge device of the service provider network to which the network is accessed, and the first VPN instance is the target VPN instance to which the target data flow in the second network device is pointed after being redirected.
[0091] It should be understood that the FlowSpec route may include parameters of the target data flow and a redirection indication. The parameters of the target data flow may be the traffic characteristics of the target data flow, which are used to indicate the target data flow to be processed by the FlowSpec; the redirection indication is used to redirect the data flow having the same traffic characteristics as the traffic characteristics of the target data flow to the first VPN instance, so as to guide the target data flow to the target device through the first VPN instance.
[0092] It should be understood that after the target data flow is redirected to the target VPN instance, according to the routing forwarding table recorded in the VPN instance, the target data flow will be directed to the Site associated with the target VPN instance, thereby directing to the CE device corresponding to the Site.
[0093] In an embodiment of the present invention, a first network device publishes a FlowSpec route, and the identification information used in the FlowSpec route can uniquely identify a first VPN instance in a second network device, so that the second network device can accurately direct a target data flow to the first VPN instance, so as to direct the target data flow to a target device corresponding to the target data flow through the first VPN instance, avoid directing the target data flow to a VPN instance other than the first VPN instance, and optimize the VPN service to a certain extent.
[0094] Optionally, the identification information is the RD or name of the first VPN instance.
[0095] Optionally, the extended community attribute of the Border Gateway Protocol BGP update message to which the FlowSpec route belongs includes a destination RD field, and the value of the destination RD field is the identification information.
[0096] The method of the embodiment of the present invention will be further described below in conjunction with specific embodiments.
[0097] Figure 2 It is an interactive flow chart of VPN service optimization in an embodiment of the present invention. In an embodiment of the present invention, the first network device is a traffic analysis server, the target data flow is an attack data flow, and the target device is a traffic cleaning server. In an embodiment of the present invention, VPN service optimization is achieved by adjusting the FlowSpec route. Among them, AS200 is a service provider network, and S1, S2, S3 and D1 are private networks (local networks). In the network of AS200, RTA, RTB and RTD are provider edge devices (Provider Edge, PE), RTC is a backbone device (Provider), S1 and S2 are RTA's private network, S3 is RTB's private network, D1 is RTD's private network, and the attacked, traffic cleaning server and traffic analysis server are located on D1. Of course, it should be understood that the traffic analysis server may not be on D1, for example, on S1, S2 or S3. Figure 2 In the example, the VPN Target attributes of RTA, RTB, and RTD are configured as follows:
[0098] RTA:
[0099]
[0100] RTB:
[0101]
[0102] RTD:
[0103]
[0104] like Figure 2 As shown, the attack source performs a DDos attack on the device with IP address 20.1.1.1 (of course, other attack methods are also possible, and this embodiment of the present invention takes this as an example). Among them, the device 20.1.1.1 is located in the private network D1 where RTD is located. In the embodiment of the present invention, the IP address 20.1.1.1 is the traffic feature of the target data flow.
[0105] The traffic analysis server in the private network D1 can detect through NetStream that the destination IP 20.1.1.1 is under DDoS attack. At this time, the traffic analysis server can generate a FlowSpec route based on the attack characteristics and publish it to the connected edge device RTD. Among them, the FlowSpec route carries redirection indication information, and the redirection indication contains the first VPN that can uniquely identify the access to the traffic cleaning server in the private network D1.
[0106] For example, a FlowSpec route may contain the following information:
[0107] Rule: dest-ip 20.1.1.1, dest-port 80
[0108] Action: redirect vpn-rd 100:1.
[0109] Among them, 100:1 is the RD of the first VPN in the private network D1.
[0110] Alternatively, a FlowSpec route can contain the following information:
[0111] Rule: dest-ip 20.1.1.1, dest-port 80
[0112] Action: redirect vpn-rn scrubbing-vpn1.
[0113] Wherein, scrubbing-vpn1 is the name of the first VPN in the private network D1.
[0114] In one implementation of the embodiment of the present invention, the RD of the redirected VPN instance may be mapped to the "Redirect Extended Community attribute" in the BGP Update message of the FlowSpec route.
[0115] Currently, the "redirect to specific vrf" defined in RFC5575 supports specifying three types of destination RTs:
[0116]
[0117] In the embodiment of the present invention, a new type value of "redirect RD type value" can be applied to map the three types of RDs into the following three forms of redirect RD type values:
[0118]
[0119] The redirect RD type value is to be allocated, for example, it can be 0x8308, 0x83408, 0x8508, etc. A structure of the redirect RD type value can be as follows:
[0120]
[0121] It should be understood that after the redirect RD type value is officially allocated by IETF, it will use the value specified by IETF. Except for the change in the Type field (the newly applied "redirect RD type value" type value), other fields remain unchanged.
[0122] When the edge device RTD receives the FlowSpec route published by the traffic analysis server, it can publish the FlowSpec route to other edge devices RTA and RTB of AS200.
[0123] Each device generates traffic matching rules based on the FlowSpec rules. Traffic that meets the matching conditions is redirected to the private network D1 and forwarded to the traffic cleaning server for cleaning.
[0124] For example, RTA receives the FlowSpec route and matches the VPN instance with RD "100:1" in the RTA device according to the specified action: "Action: redirect vpn-rd100:1". In the embodiment of the present invention, vpn-instance scrubbing-vpn1 is found in RTA. Because RD is unique on a device, it can only belong to one VPN instance. Its attack traffic steering process:
[0125] (1) After the attack traffic matching the traffic characteristics described by the FlowSpec route enters RTA, it is directed to vpn-instance scrubbing-vpn1 at RTA;
[0126] (2) In this VPN instance, there is only one default route with the next hop being RTD, so the traffic is forwarded to RTD.
[0127] (3) When the traffic reaches RTD, it finds that there is only one default route pointing to the cleaning server, so the traffic is forwarded to the cleaning server.
[0128] Through the method of the embodiment of the present invention, the purpose of accurately selecting the "destination redirection VPN instance" by BGP FlowSpec is achieved, the data flow is accurately directed to the corresponding VPN instance, and the VPN service is optimized to a certain extent.
[0129] Figure 3 It is another flow chart of a method for optimizing VPN services according to an embodiment of the present invention. Figure 3 The method is performed by the second network device.
[0130] 301. A second network device receives a FlowSpec route published by a first network device. The first network device is a network device used for publishing FlowSpec routes in a service provider network where the first network device is located. The FlowSpec route carries traffic characteristics of a target data flow. The FlowSpec route also carries redirection indication information. The redirection indication includes identification information. The identification information is used to uniquely identify a first VPN instance in the second network device. The redirection indication information is used to indicate that a data flow that meets the traffic characteristics of the target data flow is redirected to the first VPN instance. The first VPN instance is the target VPN instance to which the target data flow in the second network device is pointed after being redirected.
[0131] It should be understood that in the embodiment of the present invention, the FlowSpec route may be a first network device (eg, Figure 2 The data packet may be directly sent by the traffic analysis server (such as shown) or may be sent by the first network device through other provider edge devices.
[0132] 302: The second network device analyzes a data flow passing through the second network device.
[0133] 303: If the traffic characteristics of the first data flow passing through the second network device include the traffic characteristics of the target data flow, the second network device redirects the first data flow to the first VPN instance.
[0134] In an embodiment of the present invention, the second network device redirects the target data flow to the first VPN instance based on identification information in the FlowSpec route that can uniquely identify the first VPN instance, so as to direct the target data flow to the target device corresponding to the target data flow through the first VPN instance, thereby accurately directing the data flow to the corresponding VPN instance and avoiding directing the target data flow to a VPN instance other than the first VPN instance, thereby optimizing the VPN service to a certain extent.
[0135] Optionally, the identification information is the RD or name of the first VPN instance.
[0136] Optionally, the extended community attribute of the Border Gateway Protocol BGP update message to which the FlowSpec route belongs includes a destination RD field, and the value of the destination RD field is the identification information.
[0137] Optionally, the method further includes the second network device publishing the FlowSpec route in the service provider network.
[0138] The specific implementation of the embodiment of the present invention can refer to Figure 2 The method performed by RTA, RTB and RTD in the illustrated embodiment will not be described in detail in the embodiment of the present invention.
[0139] Figure 4 4 is a schematic diagram of the structure of a network device 400 according to an embodiment of the present invention. The network device 400 is used for FlowSpec route publishing, and the network device 400 may include an analysis unit 401 and a route publishing unit 402.
[0140] The analyzing unit 401 is used to analyze the data flow entering the network where the network device 400 is located to obtain the flow characteristics of the target data flow.
[0141] The route publishing unit 402 is used to publish a FlowSpec route, which carries redirection indication information. The redirection indication information includes identification information, which is used to uniquely identify the first VPN instance in the second network device. The redirection indication information is used to indicate that the data flow containing the traffic characteristics of the target data flow is redirected to the first VPN instance. The second network device is an edge device of the service provider network to which the network is accessed, and the first VPN instance is the target VPN instance to which the target data flow in the second network device is pointed after being redirected.
[0142] In the embodiment of the present invention, the network device 400 publishes a FlowSpec route, in which identification information that can uniquely identify the first VPN instance in the provider edge device is used, so that the provider edge device can accurately direct the target data flow to the first VPN instance, so as to direct the target data flow to the target device corresponding to the target data flow through the first VPN instance, avoid directing the target data flow to a VPN instance other than the first VPN instance, and optimize the VPN service to a certain extent.
[0143] Optionally, the identification information is the RD or name of the first VPN instance.
[0144] In addition, the network device 400 may also execute Figure 1 The method executed by the first network device in the embodiment shown in the figure realizes the flow cleaning server in Figure 2The functions of the illustrated embodiment will not be described in detail in the embodiment of the present invention.
[0145] Figure 5 5 is a schematic diagram of the structure of a network device 500 according to an embodiment of the present invention. The network device 500 is used as an edge device of a service provider network, and the network device 500 may include a receiving unit 501, an analyzing unit 502, and a redirecting unit 503.
[0146] A receiving unit 501 is used to receive a FlowSpec route published by a first network device, where the first network device is a network device used for publishing FlowSpec routes in the service provider network, where the FlowSpec route carries traffic characteristics of a target data flow, and the FlowSpec route also carries redirection indication information, where the redirection indication includes identification information, where the identification information is used to uniquely identify a first VPN instance in the network device 500, and where the redirection indication information is used to indicate that a data flow that meets the traffic characteristics of the target data flow is redirected to the first VPN instance, where the first VPN instance is a target VPN instance to which the target data flow in the network device 500 is directed after being redirected;
[0147] An analysis unit 502, configured to analyze data flows passing through the network device 500;
[0148] The redirecting unit 503 is configured to redirect the first data flow passing through the network device 500 to the first VPN instance if the traffic characteristics of the first data flow include the traffic characteristics of the target data flow.
[0149] In the embodiment of the present invention, the provider edge device 500 redirects the target data flow to the first VPN instance according to the identification information in the FlowSpec route that can uniquely identify the first VPN instance, so as to direct the target data flow to the target device corresponding to the target data flow through the first VPN instance, thereby accurately directing the data flow to the corresponding VPN instance and avoiding directing the target data flow to a VPN instance other than the first VPN instance, thereby optimizing the VPN service to a certain extent.
[0150] Optionally, the identification information is the RD or name of the first VPN instance.
[0151] Optionally, the extended community attribute of the Border Gateway Protocol BGP update message to which the FlowSpec route belongs includes a destination RD field, and the value of the destination RD field is the identification information.
[0152] Optionally, the network device 500 may further include a route publishing unit 504, configured to publish the FlowSpec route in the service provider network.
[0153] In addition, the network device 500 may also execute Figure 3 The method performed by the second network device in the embodiment shown in the figure realizes RTA, RTB and RTD in Figure 2 The functions of the illustrated embodiment will not be described in detail in the embodiment of the present invention.
[0154] Figure 6 It is a flow chart of another method for optimizing VPN services according to an embodiment of the present invention. Figure 6 The method is performed by a third network device. In the embodiment of the present invention, the third network device may be a controller or the like.
[0155] 601. A third network device obtains a first route sent by a fourth network device. The third network device is used for VPN route publishing. The fourth network device is an edge device of a service provider network where the third network device is located. The first route is a VPN route.
[0156] 602, the third network device generates a second route based on the first VPN instance accessing the fifth network device and the first route, wherein the fifth network device is another edge device of the service provider network, the second route is a VPN route, and the second route carries identification information and routing information of the first route, and the identification information is used to uniquely identify the first VPN instance in the fifth network device.
[0157] It should be understood that in the fifth network device, multiple VPN instances may be accessed simultaneously, and the first VPN instance is any one of the VPN instances.
[0158] 603. The third network device sends the second route to the fifth network device.
[0159] In the embodiment of the present invention, the third network device establishes a second route for the first VPN instance of the fifth network device according to the first route of the fourth network device, and sends the second route to the fifth network device, so that the fifth network device can add the second route to the routing table of the first VPN instance of the fifth network device, thereby enabling the data flow in the first VPN instance of the fifth network device to smoothly access the fourth network device, accurately directing the data flow to the corresponding VPN instance, and optimizing the VPN service to a certain extent.
[0160] Optionally, the identification information includes the RD or name of the first VPN instance.
[0161] Optionally, the extended community attribute of the BGP update message to which the second route belongs includes a destination RD field, and the value of the destination RD field is the identification information; or, the BGP update message to which the second route belongs includes a destination RD attribute, and the value of the destination RD attribute is the identification information.
[0162] Optionally, the second route also carries a transmission policy, where the transmission policy is used to indicate a transmission tunnel used by the second route.
[0163] The method of the embodiment of the present invention will be further described below in conjunction with specific embodiments.
[0164] Figure 7 It is a flow chart of VPN route publishing according to an embodiment of the present invention. Figure 7 In the figure, PE1, PE2, and PE3 are provider edge devices, P is the backbone device of the service provider network; CE1 is the site, CE1 is the CE of Site1, CE2 is the CE of Site2, CE3 is the CE of Site3, and CE4 is the CE of Site4; PE1 is the PE of site1 and site2, PE2 is the PE of site3, and PE3 is the PE of site4; site1, site2, site3, and site4 belong to the same virtual private network VPN-A, and the VPN Target attribute configurations of PE1, PE2, and PE3 are as follows:
[0165] PE1:
[0166]
[0167] PE2:
[0168]
[0169] PE3:
[0170]
[0171] The VPN instance vpn1 of PE1 is associated with site site1; the VPN instance vpn1 of PE2 is associated with site site3; and the VPN instance vpn1 of PE3 is associated with site site4. The data flow from CE1, CE2, and CE3 to CE4 is as follows: Figure 7 As shown by the dotted arrow in .
[0172] The specific process is as follows:
[0173] S71 and CE4 advertise routes to P3.
[0174] CE4's prefix 12.16.2.0 / 24 is advertised to PE3:
[0175] Prefix Nexthop
[0176] 12.16.2.0 / 24 CE4
[0177] S72, the private network routing table of vpn1 on PE3 is updated.
[0178] On PE3, the following routes exist in the VPN1 private network routing table:
[0179] Prefix Nexthop
[0180] 12.16.2.0 / 24 CE4
[0181] S73: The VPNv4 routing table on PE3 is updated and sent to the controller.
[0182] On PE3, the above routes in the VPN1 private network routing table are sent to the VPNv4 routing table on PE3, assigned Label: L1, and sent to the controller. The VPNv4 routing table contains the following routes:
[0183]
[0184] S74, the controller obtains route 1.
[0185] On the controller, you can see the VPNv4 route advertised by PE3, called route 1:
[0186]
[0187] S75: The controller generates route 2 and route 3 according to route 1, and publishes them to PE1.
[0188] According to the control policy deployed on the controller, the controller generates VPNv4 route 2 for vpn1 on PE1 based on route 1. Route 2 may carry identification information that can uniquely identify vpn1, such as RD or name. Taking RD as an example, the field name of the RD that uniquely identifies vpn1 may be the destination RD. Route 2 is as follows:
[0189]
[0190] Similarly, the controller generates VPNv4 route 3 for vpn2 on PE1 based on route 1, and carries policy B, for example, specifying that the route uses a TE tunnel:
[0191]
[0192] One implementation method of the embodiment of the present invention is to map the above-mentioned destination RD (i.e., VPN RD) to the "destination RD extended community attribute" in the BGP update (Update) message of the Flowspec route, and the "destination RD extended community attribute" is a newly added type and value in the extended community attribute in the BGPUpdate message.
[0193] The three types of RDs currently defined in RFC4364 are as follows:
[0194]
[0195] In the embodiment of the present invention, a new type value of "destination RD type value" can be applied in the BGP update (Update) message to which the Flowspec route belongs, and the three types of RDs are respectively mapped into the following three forms of "destination RD extended community attributes":
[0196]
[0197] The destination RD type value is yet to be assigned, for example, it can be 0x11, etc. After being officially assigned by the IETF, the value specified by the IETF will be used.
[0198] Except for the change in the Type field (the newly applied "destination RD type value"), other fields remain unchanged.
[0199] The destination RD extended community attribute is sent along with the VPNv4 / VPNv6 route sent by the controller to the forwarder.
[0200] Alternatively, another implementation of the embodiment of the present invention can represent the above-mentioned destination RD by adding a destination RD attribute in the BGP Update message of the Flowspec route. In the destination RD attribute, its attribute value encapsulates one or more RDs, and the destination AS and destination LSR ID are added before each RD. The definition of RD is the same as RFC4364 and has not been modified.
[0201] The Value part of the destination RD attribute is defined as follows:
[0202]
[0203]
[0204] Destination AS: Destination AS
[0205] Destination LSR ID: Destination LSR ID
[0206] Destination RD: destination RD
[0207] The destination RD attribute is sent along with the VPNv4 / VPNv6 route sent by the controller to the forwarder.
[0208] Of course, it should be understood that in actual applications, it may not be called "destination RD extended community attribute" or "destination RD attribute", but may be named other attributes, and the embodiment of the present invention does not limit this.
[0209] The controller advertises the generated route 2 to PE1 and the generated route 3 to PE1.
[0210] S76, PE1 allocates a VPN instance according to the route.
[0211] PE1 receives route 2 and finds that RD 100:1 belongs to VPN instance vpn1 based on the destination RD 100:1 carried in route 2. It then adds route 2 to the routing table of VPN instance vpn1. At the same time, based on policy A carried in route 2, the GRE tunnel will be used when the destination prefix accessed by the data flow of VPN instance vpn1 of PE1 is 12.16.2.0 / 24.
[0212] PE1 receives route 3 and finds that RD 100:2 belongs to VPN instance vpn2 based on the destination RD 100:2 carried in route 3. It then adds route 3 to the routing table of VPN instance vpn2. At the same time, based on policy A carried in route 2, the GRE tunnel will be used when the destination prefix accessed by the data flow of PE1's VPN instance vpn2 is 12.16.2.0 / 24.
[0213] Figure 8 It is a flow chart of VPN route publishing according to an embodiment of the present invention. Figure 8 The scenario shown is a scenario of cross-domain access of a VPN instance. Figure 8 In the figure, in the autonomous system AS1 of operator 1, P is the backbone device of the service provider network, PE1, PE2 and ABSR1 are provider edge devices, and ABSR1 is the provider edge device in AS1 adjacent to another area (AS2 of operator 2); CE1 is a site. CE1 is the CE of Site1, CE2 is the CE of Site2, and CE3 is the CE of Site3; PE1 is the PE of site1 and site2, and PE2 is the PE of site3. In the autonomous system AS2 of operator 2, PE3 and ABSR2 are provider edge devices, and ABSR2 is the provider edge device in AS2 adjacent to another area (AS1 of operator 1); CE4 is the CE of Site4; PE3 is the PE of site4. site1, site2, site3, and site4 belong to the same virtual private network VPN-A.
[0214] Among them, the VPN instance vpn1 of PE1 is associated with the site site1, the VPN instance vpn1 of PE2 is associated with the site site3, and the VPN instance vpn1 of PE3 is associated with the site site4.
[0215] The VPN Target attribute configurations of PE1, PE2, and PE3 are as follows:
[0216] PE1:
[0217]
[0218] PE2:
[0219]
[0220] PE3:
[0221]
[0222] The specific process is as follows:
[0223] S81 and CE4 advertise routes to P3.
[0224] CE4's prefix 12.16.2.0 / 24 is advertised to PE3:
[0225] Prefix Nexthop
[0226] 12.16.2.0 / 24 CE4
[0227] S82, the private network routing table of vpn1 on PE3 is updated.
[0228] On PE3, the following routes exist in the VPN1 private network routing table:
[0229] Prefix Nexthop
[0230] 12.16.2.0 / 24 CE4
[0231] S83: The VPNv4 routing table on PE3 is updated and sent to ASBR2.
[0232] On PE3, the above routes in the VPN1 private network routing table are sent to the VPNv4 routing table on PE3, assigned Label: L1, and sent to ASBR2. The VPNv4 routing table contains the following routes:
[0233]
[0234] S84: The VPNv4 routing table on ASBR2 is updated and sent to ASBR1.
[0235] After receiving the route sent in step S83, ASBR2 saves the route and generates a new VPNv4 route, in which the next hop information is ASBR2. At the same time, ASBR2 assigns Label: L2 to the new VPNv4 route, and the new VPNv4 route is sent to ASBR1:
[0236]
[0237] S85: The VPNv4 routing table on ASBR1 is updated and sent to the controller.
[0238] After receiving the route sent by ASBR2, ASBR1 saves the route and generates a new VPNv4 route, in which the next hop information is ASBR1. At the same time, ASBR1 assigns the label L3 to the new VPNv4 route, and sends the new VPNv4 route to the controller:
[0239]
[0240] S86: The controller obtains route 1.
[0241] On the controller, you can see the VPNv4 route advertised by PE3, called route 1:
[0242]
[0243] S87: The controller generates route 2 and route 3 according to route 1, and publishes them to PE1.
[0244] According to the control policy deployed on the controller, the controller generates VPNv4 route 2 for vpn1 on PE1 based on route 1. Route 2 may carry identification information that can uniquely identify vpn1, such as RD or name. Taking RD as an example, the field name of the RD that uniquely identifies vpn1 may be the destination RD. Route 2 is as follows:
[0245]
[0246] Similarly, the controller generates VPNv4 route 3 for vpn2 on PE1 based on route 1, and carries policy B, for example, specifying that the route uses a TE tunnel:
[0247]
[0248] For details on how to implement the RD field, refer to Figure 7 The step S75 of the illustrated embodiment will not be described in detail in the embodiment of the present invention.
[0249] The controller advertises the generated route 2 to PE1 and the generated route 3 to PE1.
[0250] S88, PE1 allocates VPN instances according to the routes.
[0251] PE1 receives route 2 and finds that RD 100:1 belongs to VPN instance vpn1 based on the destination RD 100:1 carried in route 2. It then adds route 2 to the routing table of VPN instance vpn1. At the same time, based on policy A carried in route 2, the GRE tunnel will be used when the destination prefix accessed by the data flow of VPN instance vpn1 of PE1 is 12.16.2.0 / 24.
[0252] PE1 receives route 3 and finds that RD 100:2 belongs to VPN instance vpn2 based on the destination RD 100:2 carried in route 3. It then adds route 3 to the routing table of VPN instance vpn2. At the same time, based on policy A carried in route 3, the GRE tunnel will be used when the destination prefix accessed by the data flow of VPN instance vpn2 of PE1 is 12.16.2.0 / 24.
[0253] Fig. 9 It is a flow chart of another method for optimizing VPN services according to an embodiment of the present invention. Fig. 9 The method is performed by a fifth network device.
[0254] 901, a fifth network device receives a second route sent by a third network device, the fifth network device is an edge device of a service provider network where the fifth network device is located, the third network device is a network device in the service provider network used for publishing VPN routes, the second route carries information of a first route sent by a fourth network device to the third network device, the fourth network device is another edge device of the service provider network, the second route also carries identification information, the identification information is used to uniquely identify a first VPN instance accessing the fifth network device in the fifth network device, and both the first route and the second route are VPN routes.
[0255] 902: The fifth network device adds the second route to the routing table of the first VPN instance.
[0256] In the embodiment of the present invention, the fifth network device adds the second route to the routing table of the first VPN instance based on the identification information in the second route that can uniquely identify the first VPN instance and the routing information of the fourth network device, so that the data flow in the first VPN instance can smoothly access the first PE, and the data flow is accurately directed to the corresponding VPN instance, which can optimize the VPN service to a certain extent.
[0257] Optionally, the identification information includes the RD or name of the first VPN instance.
[0258] Optionally, the extended community attribute of the BGP update message to which the second route belongs includes a destination RD field, and the value of the destination RD field is the identification information; or, the BGP update message to which the second route belongs includes an RD attribute, and the value of the destination RD attribute is the identification information.
[0259] Optionally, the second route also carries a transmission policy, which is used to instruct the fifth network device to access the transmission tunnel used by the fourth network device through the second route in the first VPN instance; the method also includes: if the data flow of the fifth network device on the first VPN instance accesses the fourth network device through the second route, then use the transmission tunnel for transmission.
[0260] The specific implementation of the embodiment of the present invention can refer to Figure 8 The method performed by PE1 and PE3 in the embodiment shown, or Fig. 9 The method performed by ABSR1 and PE1 in the illustrated embodiment will not be described in detail in the embodiment of the present invention.
[0261] Fig.10 1 is a schematic diagram of the structure of a network device 1000 according to an embodiment of the present invention. The network device 1000 may include:
[0262] An acquiring unit 1001 is configured to acquire a first route sent by a fourth network device, where the fourth network device is an edge device of a service provider network where the network device 1000 is located, and the first route is a VPN route;
[0263] The processing unit 1002 is configured to generate a second route according to a first VPN instance accessing a fifth network device and the first route, wherein the fifth network device is another edge device of the service provider network, the second route is a VPN route, the second route carries identification information and routing information of the first route, and the identification information is used to uniquely identify the first VPN instance in the fifth network device;
[0264] The route publishing unit 1003 is configured to send the second route to the fifth network device.
[0265] In the embodiment of the present invention, the network device 100 establishes a second route for the first VPN instance of the fifth network device according to the first route of the fourth network device, and sends the second route to the fifth network device, so that the fifth network device can add the second route to the routing table of the first VPN instance of the fifth network device, thereby enabling the data flow in the first VPN instance of the fifth network device to smoothly access the fourth network device, accurately directing the data flow to the corresponding VPN instance, and optimizing the VPN service to a certain extent.
[0266] Optionally, the identification information includes the RD or name of the first VPN instance.
[0267] Optionally, the extended community attribute of the BGP update message to which the second route belongs includes a destination RD field, and the value of the destination RD field is the identification information; or, the BGP update message to which the second route belongs includes a destination RD attribute, and the value of the destination RD attribute is the identification information.
[0268] Optionally, the second route also carries a transmission policy, where the transmission policy is used to indicate a transmission tunnel used by the second route.
[0269] The network device 1000 may also perform Figure 6 The method executed by the third network device in the embodiment shown in the figure is implemented by the controller in Figure 7 , Figure 8 The functions of the illustrated embodiment will not be described in detail in the embodiment of the present invention.
[0270] Fig.11 1 is a schematic diagram of the structure of a network device 1100 according to an embodiment of the present invention. The network device 1100 is used as an edge device of a service provider network, and the network device 1100 may include: a receiving unit 1101 and a routing management unit 1102 .
[0271] A receiving unit 1101 is configured to receive a second route sent by a third network device, where the third network device is a network device used for VPN route publishing in the service provider network, where the second route carries information about a first route sent by a fourth network device to the third network device, where the fourth network device is another edge device of the service provider network, where the second route also carries identification information, where the identification information is used to uniquely identify a first VPN instance accessing the network device 1000 in the network device 1000, and where both the first route and the second route are VPN routes;
[0272] The route management unit 1102 is configured to add the second route to the routing table of the first VPN instance.
[0273] In the embodiment of the present invention, the network device 1100 adds the second route to the routing table of the first VPN instance based on the identification information in the second route that can uniquely identify the first VPN instance and the routing information of the fourth network device, so that the data flow in the first VPN instance can smoothly access the first PE, and the data flow is accurately directed to the corresponding VPN instance, which can optimize the VPN service to a certain extent.
[0274] Optionally, the identification information includes the RD or name of the first VPN instance.
[0275] Optionally, the second route also carries a transmission policy, which is used to indicate the transmission tunnel used by the first VPN instance to access the fourth network device through the second route; the routing management unit 1102 is also used to use the transmission tunnel for transmission when the data flow of the network device 1000 on the first VPN instance accesses the fourth network device through the second route.
[0276] The network device 1100 may also perform Fig. 9 The method executed by the fifth network device in the embodiment shown in the figure is implemented Figure 7 The functions of PE1 and PE3 in the embodiment shown, or Figure 8 The functions of ABSR1 and PE1 in the illustrated embodiment will not be described in detail in the embodiment of the present invention.
[0277] The embodiment of the present invention further provides a network device 1. The schematic diagram of the physical device structure of the network device 1 can be shown as follows: Fig.12 As shown, it includes a processor 1202 , a memory 1203 , a transmitter 1201 and a receiver 1204 .
[0278] The receiver 1204, the transmitter 1201, the processor 1202 and the memory 1203 are interconnected via a bus 1205 system. The bus 1205 may be an ISA bus, a PCI bus or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0279] The memory 1203 is used to store programs. Specifically, the program may include program code, and the program code includes computer operation instructions. The memory 1203 may include a read-only memory and a random access memory, and provides instructions and data to the processor 1202. The memory 1203 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage.
[0280] The processor 1202 executes the program stored in the memory 1203 .
[0281] Specifically, in the network device 1, the processor 1202 may be used to execute Figure 1 The method executed by the first network device in the embodiment shown in the figure realizes the flow cleaning server in Figure 2 Functionality of the illustrated embodiment.
[0282] The processor 1202 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 1202 or the instruction in the form of software. The above processor 1202 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1203, and the processor 1202 reads the information in the memory 1203 and completes the steps of the above method in combination with its hardware.
[0283] The embodiment of the present invention further provides a network device 2, the physical device structure diagram of which can be shown as follows: Fig.12 As shown, the entity units it contains are similar to those of the network device 1 and will not be described in detail.
[0284] Specifically, in the network device 2, the processor 1202 may be used to execute Figure 3 The method performed by the second network device in the embodiment shown in the figure realizes RTA, RTB and RTD in Figure 2 Functionality of the illustrated embodiment.
[0285] The embodiment of the present invention further proposes a network device 3, the physical device structure diagram of which can be shown as follows: Fig.12 As shown, the entity units it contains are similar to those of the network device 1 and will not be described in detail.
[0286] Specifically, in the network device 3, the processor 1202 may be used to execute Figure 6 The method executed by the third network device in the embodiment shown in the figure is implemented by the controller in Figure 7 , Figure 8 Functionality of the illustrated embodiment.
[0287] The embodiment of the present invention further proposes a network device 4, the physical device structure diagram of which can be shown as follows: Fig.12 As shown, the entity units it contains are similar to those of the network device 1 and will not be described in detail.
[0288] Specifically, in the network device 4, the processor 1202 may be used to execute Fig. 9 The method executed by the fifth network device in the embodiment shown in the figure is implemented Figure 7 The functions of PE1 and PE3 in the embodiment shown, or Figure 8 Functions of ABSR1 and PE1 in the illustrated embodiment.
[0289] The embodiment of the present invention further provides a computer-readable storage medium 1, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by a portable electronic device including a plurality of application programs, enable the portable electronic device to execute Figure 1 The method is executed by the first network device in the illustrated embodiment.
[0290] The embodiment of the present invention further provides a computer-readable storage medium 2, wherein the computer-readable storage medium stores one or more programs, wherein the one or more programs include instructions, which, when executed by a portable electronic device including a plurality of application programs, enable the portable electronic device to execute Figure 3 The method is performed by the second network device in the illustrated embodiment.
[0291] The embodiment of the present invention further provides a computer-readable storage medium 3, wherein the computer-readable storage medium stores one or more programs, wherein the one or more programs include instructions, which, when executed by a portable electronic device including a plurality of application programs, enable the portable electronic device to execute Figure 6 The method shown in the embodiment is performed by the third network device.
[0292] The embodiment of the present invention further provides a computer-readable storage medium 4, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by a portable electronic device including a plurality of application programs, enable the portable electronic device to execute Fig. 9 The method is performed by the fifth network device in the illustrated embodiment.
[0293] Fig.13 1 is a system block diagram of a network system 1300 according to an embodiment of the present invention. Fig.13As shown, the network system 1300 may include a network device 1301 and a network device 1302. The network device 1301 may be Figure 4 The network device 400 of the embodiment shown, or the network device 1 described above, the network device 1302 may be Figure 5 The network device 500 of the illustrated embodiment, or the network device 2 described above.
[0294] Fig.14 1 is a system block diagram of a network system 1400 according to an embodiment of the present invention. Fig.14 As shown, the network system 1400 may include a network device 1401 and a network device 1402. The network device 1401 may be Fig.10 The network device 1000 of the embodiment shown, or the network device 3 described above, the network device 1402 may be Fig.11 The network device 1100 of the illustrated embodiment, or the network device 4 described above.
[0295] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0296] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0297] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0298] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0299] In addition, 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.
[0300] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0301] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A third network device, characterized in that: include: An acquiring unit, configured to acquire a first route announced by a fourth network device, wherein the first route is a VPN route; a processing unit, configured to generate a second route according to a first VPN instance accessing a fifth network device and the first route, wherein the second route is a VPN route, the second route carries first identification information and routing information of the first route, and the first identification information is used to uniquely identify the first VPN instance in the fifth network device; A route publishing unit is used to send the second route to the fifth network device.
2. The third network device according to claim 1, characterized in that: The processing unit is further configured to: Generate a third route according to the second VPN instance accessing the fifth network device and the first route, wherein the third route is a VPN route, the third route carries another identification information and the routing information of the first route, and the another identification information is used to uniquely identify the second VPN instance in the fifth network device; The route publishing unit is further configured to send the third route to the fifth network device.
3. The third network device according to claim 1, characterized in that: The first identification information includes a routing identifier RD or a name of the first VPN instance.
4. The third network device according to claim 2, characterized in that: The other identification information includes a routing identifier RD or a name of the second VPN instance.
5. The third network device according to claim 3, characterized in that: The extended community attribute of the Border Gateway Protocol BGP update message to which the second route belongs includes a destination RD field, and the value of the destination RD field is the first identification information; or The BGP update message to which the second route belongs includes a destination RD attribute, and a value of the destination RD attribute is the first identification information.
6. The third network device according to claim 4, characterized in that: The extended community attribute of the Border Gateway Protocol BGP update message to which the third route belongs includes a destination RD field, and the value of the destination RD field is the other identification information; or The BGP update message to which the third route belongs includes a destination RD attribute, and the value of the destination RD attribute is the other identification information.
7. The third network device according to claim 1, 3 or 5, characterized in that: The second route also carries a transmission policy, where the transmission policy is used to indicate a transmission tunnel used by the first VPN instance to access the fourth network device through the second route.
8. The third network device according to claim 2, 4 or 6, characterized in that: The third route also carries a transmission policy, where the transmission policy is used to indicate a transmission tunnel used by the second VPN instance to access the fourth network device through the third route.
9. The third network device according to any one of claims 1 to 6, characterized in that: The first route includes second identification information, where the second identification information is used to uniquely identify a third VPN instance in the fourth network device, and the first identification information is different from the second identification information.
10. A fifth network device, characterized in that: The device comprises a processor and a memory, wherein the processor is configured to execute a program in the memory to cause the fifth network device to: receiving a second route sent by a third network device, where the second route carries routing information of a first route notified by the fourth network device to the third network device, and the second route further carries first identification information, where the first identification information is used to uniquely identify a first VPN instance accessing the fifth network device in the fifth network device, and both the first route and the second route are VPN routes; Add the second route to the routing table of the first VPN instance.
11. The fifth network device according to claim 10, characterized in that: The fifth network device is further configured to: A third route sent by the third network device is received, where the third route is a VPN route, and the third route carries another identification information and the routing information of the first route, where the another identification information is used to uniquely identify a second VPN instance in the fifth network device.
12. The fifth network device according to claim 10, characterized in that: The first identification information includes a routing identifier RD or a name of the first VPN instance.
13. The fifth network device according to claim 11, characterized in that: The other identification information includes a routing identifier RD or a name of the second VPN instance.
14. The fifth network device according to claim 10, characterized in that: The extended community attribute of the Border Gateway Protocol BGP update message to which the second route belongs includes a destination RD field, and the value of the destination RD field is the first identification information; or The BGP update message to which the second route belongs includes a destination RD attribute, and a value of the destination RD attribute is the first identification information.
15. The fifth network device according to claim 13, characterized in that: The extended community attribute of the Border Gateway Protocol BGP update message to which the third route belongs includes a destination RD field, and the value of the destination RD field is the other identification information; or The BGP update message to which the third route belongs includes a destination RD attribute, and the value of the destination RD attribute is the other identification information.
16. The fifth network device according to any one of claims 10 to 15, characterized in that: The first route includes second identification information, where the second identification information is used to uniquely identify a third VPN instance in the fourth network device, and the first identification information is different from the second identification information.
17. The fifth network device according to any one of claims 10 to 15, characterized in that: The second route also carries a transmission policy, where the transmission policy is used to indicate a transmission tunnel used by the first VPN instance to access the fourth network device through the second route; The fifth network device is further configured to use the transmission tunnel for transmission when the data flow of the fifth network device on the first VPN instance accesses the fourth network device through the second route.
18. The fifth network device according to claim 11, 13 or 15, characterized in that: The third route also carries a transmission policy, where the transmission policy is used to indicate a transmission tunnel used by the second VPN instance to access the fourth network device through the third route; The fifth network device is further configured to use the transmission tunnel for transmission when the data flow of the fifth network device on the second VPN instance accesses the fourth network device through the third route.
19. A method for optimizing the service of a virtual private network (VPN), the method being executed by a third network device, characterized in that: The method comprises: Acquire a first route announced by a fourth network device, where the first route is a VPN route; Generate a second route according to the first VPN instance accessing the fifth network device and the first route, wherein the second route is a VPN route, the second route carries first identification information and routing information of the first route, and the first identification information is used to uniquely identify the first VPN instance in the fifth network device; The second route is sent to the fifth network device.
20. The method of claim 19, wherein: The method further comprises: generating a third route according to the second VPN instance accessing the fifth network device and the first route, wherein the third route is a VPN route, and the third route carries another identification information and the routing information of the first route, wherein the another identification information is used to uniquely identify the second VPN instance in the fifth network device; The third route is sent to the fifth network device.
21. The method of claim 19, wherein: The first identification information includes a routing identifier RD or a name of the first VPN instance.
22. The method of claim 20, wherein: The other identification information includes a routing identifier RD or a name of the second VPN instance.
23. The method according to any one of claims 19 to 22, characterized in that The extended community attribute of the Border Gateway Protocol BGP update message to which the second route belongs includes a destination RD field, and the value of the destination RD field is the first identification information; or The BGP update message to which the second route belongs includes a destination RD attribute, and a value of the destination RD attribute is the first identification information.
24. The method according to claim 20 or 22, characterized in that The extended community attribute of the Border Gateway Protocol BGP update message to which the third route belongs includes a destination RD field, and the value of the destination RD field is the other identification information; or The BGP update message to which the third route belongs includes a destination RD attribute, and the value of the destination RD attribute is the other identification information.
25. The method according to any one of claims 19 to 22, characterized in that The second route also carries a transmission policy, where the transmission policy is used to indicate a transmission tunnel used by the first VPN instance to access the fourth network device through the second route.
26. The method according to claim 20 or 22, characterized in that The third route also carries a transmission policy, where the transmission policy is used to indicate a transmission tunnel used by the second VPN instance to access the fourth network device through the third route.
27. The method according to any one of claims 19 to 22, characterized in that The first route includes second identification information, where the second identification information is used to uniquely identify a third VPN instance in the fourth network device, and the first identification information is different from the second identification information.
28. A method for optimizing the service of a virtual private network VPN, the method being executed by a fifth network device, characterized in that: The method comprises: receiving a second route sent by a third network device, where the second route carries routing information of a first route notified by the fourth network device to the third network device, and the second route further carries first identification information, where the first identification information is used to uniquely identify a first VPN instance accessing the fifth network device in the fifth network device, and both the first route and the second route are VPN routes; Add the second route to the routing table of the first VPN instance.
29. The method of claim 28, wherein: The method further comprises: A third route sent by the third network device is received, where the third route is a VPN route, and the third route carries another identification information and the routing information of the first route, where the another identification information is used to uniquely identify a second VPN instance in the fifth network device.
30. The method of claim 28, wherein: The first identification information includes a routing identifier RD or a name of the first VPN instance.
31. The method of claim 29, wherein: The other identification information includes a routing identifier RD or a name of the second VPN instance.
32. The method according to any one of claims 28 to 31, characterized in that The extended community attribute of the Border Gateway Protocol BGP update message to which the second route belongs includes a destination RD field, and the value of the destination RD field is the first identification information; or The BGP update message to which the second route belongs includes a destination RD attribute, and a value of the destination RD attribute is the first identification information.
33. The method according to claim 29 or 31, characterized in that The extended community attribute of the Border Gateway Protocol BGP update message to which the third route belongs includes a destination RD field, and the value of the destination RD field is the other identification information; or The BGP update message to which the third route belongs includes a destination RD attribute, and the value of the destination RD attribute is the other identification information.
34. The method according to any one of claims 28 to 31, characterized in that The second route also carries a transmission policy, where the transmission policy is used to indicate a transmission tunnel used by the first VPN instance to access the fourth network device through the second route; The method further comprises: When the data flow of the fifth network device on the first VPN instance accesses the fourth network device through the second route, the transmission tunnel is used for transmission.
35. The method according to claim 29 or 31, characterized in that The third route also carries a transmission policy, where the transmission policy is used to indicate a transmission tunnel used by the second VPN instance to access the fourth network device through the third route; The method further comprises: When the data flow of the fifth network device on the second VPN instance accesses the fourth network device through the third route, the transmission tunnel is used for transmission.
36. The method according to any one of claims 28 to 31, characterized in that The first route includes second identification information, where the second identification information is used to uniquely identify a third VPN instance in the fourth network device, and the first identification information is different from the second identification information.
37. A first network device, used for routing and publishing flow specification rules FlowSpec, characterized in that: include: An acquisition unit, used for acquiring traffic characteristics of a target data flow; A route publishing unit, used for publishing a FlowSpec route, wherein the FlowSpec route carries the traffic characteristics of a target data flow and redirection indication information, wherein the redirection indication information includes identification information, wherein the identification information is used for uniquely identifying a first virtual private network VPN instance in a second network device, and the redirection indication information is used for indicating that a data flow containing the traffic characteristics of the target data flow is redirected to the first VPN instance, wherein the first VPN instance is a target VPN instance to which the data flow containing the traffic characteristics of the target data flow in the second network device is pointed after being redirected.
38. The first network device according to claim 37, characterized in that The identification information is a routing identifier RD or a name of the first VPN instance.
39. The first network device according to claim 37 or 38, characterized in that: The extended community attribute of the Border Gateway Protocol BGP update message to which the FlowSpec route belongs includes a destination RD field, and the value of the destination RD field is the identification information.
40. A second network device, characterized in that: include: A receiving unit receives a flow specification rule FlowSpec route published by a first network device, wherein the first network device is a network device used for publishing FlowSpec routes in a service provider network, wherein the FlowSpec route carries traffic characteristics of a target data flow, and wherein the FlowSpec route also carries redirection indication information, wherein the redirection indication includes identification information, wherein the identification information is used to uniquely identify a first virtual private network VPN instance in the second network device, and wherein the redirection indication information is used to indicate that a data flow that meets the traffic characteristics of the target data flow is redirected to the first VPN instance, wherein the first VPN instance is a target VPN instance to which a data flow that includes the traffic characteristics of the target data flow in the second network device is directed after being redirected; A redirecting unit is used to redirect the first data flow to the first VPN instance if the traffic characteristics of the first data flow passing through the second network device include the traffic characteristics of the target data flow.
41. The second network device according to claim 40, characterized in that: The identification information is a routing identifier RD or a name of the first VPN instance.
42. The second network device according to claim 40 or 41, characterized in that: Also includes: A route publishing unit is used to publish the FlowSpec route in the service provider network.
43. The second network device according to claim 40 or 41, characterized in that: The extended community attribute of the Border Gateway Protocol BGP update message to which the FlowSpec route belongs includes a destination RD field, and the value of the destination RD field is the identification information.
44. A third network device, used for virtual private network VPN route publishing, characterized in that: The third network device includes a processor and a memory, wherein the processor is configured to execute a program in the memory to cause the third network device to: Acquire a first route sent by a fourth network device, where the fourth network device is an edge device of a service provider network where the third network device is located, and the first route is a VPN route; Generate a second route according to a first VPN instance accessed to a fifth network device and the first route, wherein the fifth network device is another edge device of the service provider network, the second route is a VPN route, the second route carries first identification information and routing information of the first route, and the first identification information is used to uniquely identify the first VPN instance in the fifth network device; The second route is sent to the fifth network device.
45. The third network device according to claim 44, characterized in that: The first identification information includes a routing identifier RD or a name of the first VPN instance.
46. The third network device according to claim 44 or 45, characterized in that: The extended community attribute of the Border Gateway Protocol BGP update message to which the second route belongs includes a destination RD field, and the value of the destination RD field is the first identification information; or The BGP update message to which the second route belongs includes a destination RD attribute, and a value of the destination RD attribute is the first identification information.
47. The third network device according to claim 44 or 45, characterized in that: The second route also carries a transmission policy, where the transmission policy is used to indicate a transmission tunnel used by the second route.
48. The third network device according to claim 44 or 45, characterized in that: The first route includes second identification information, where the second identification information is used to uniquely identify a third VPN instance in the fourth network device, and the first identification information is different from the second identification information.
49. A fifth network device, characterized in that: The device comprises a processor and a memory, wherein the processor is used to execute a program in the memory, so as to cause the fifth network device to: receiving a second route sent by a third network device, the third network device being a network device used for publishing virtual private network VPN routes in a service provider network, the second route carrying routing information of a first route sent by a fourth network device to the third network device, the fourth network device being another edge device of the service provider network, the second route further carrying first identification information, the first identification information being used to uniquely identify a first VPN instance accessing the fifth network device in the fifth network device, the first route and the second route both being VPN routes; Add the second route to the routing table of the first VPN instance.
50. The fifth network device according to claim 49, characterized in that The first identification information includes a routing identifier RD or a name of the first VPN instance.
51. The fifth network device according to claim 49 or 50, characterized in that: The extended community attribute of the Border Gateway Protocol BGP update message to which the second route belongs includes a destination RD field, and the value of the destination RD field is the first identification information; or The BGP update message to which the second route belongs includes a destination RD attribute, and a value of the destination RD attribute is the first identification information.
52. The fifth network device according to claim 49 or 50, characterized in that: The second route also carries a transmission policy, where the transmission policy is used to indicate a transmission tunnel used by the first VPN instance to access the fourth network device through the second route; When the data flow of the fifth network device on the first VPN instance accesses the fourth network device through the second route, the transmission tunnel is used for transmission.
53. The fifth network device according to claim 49 or 50, characterized in that: The first route includes second identification information, where the second identification information is used to uniquely identify a third VPN instance in the fourth network device, and the first identification information is different from the second identification information.
54. A network system, characterized in that: include: The third network device according to any one of claims 1 to 9; as well as The fifth network device as claimed in any one of claims 10 to 18.
55. A network system, characterized in that: include: The first network device according to any one of claims 37 to 39; as well as The second network device as described in any one of claims 40 to 43.
56. A network system, characterized in that: include: The third network device according to any one of claims 44 to 48; as well as A fifth network device as described in any one of claims 49 to 53.
