Route advertisement method, device, and system

A route advertisement method is applied to a network in which a cross-domain end-to-end tunnel carries a service. The cross-domain end-to-end tunnel crosses at least two Interior Gateway Protocol (IGP) network domains, and the at least two IGP network domains include a first network device, a second network device, and a third network device. The route advertisement method includes receiving, by the first network device, Border Gateway Protocol (BGP) service routing information from the second network device, where the BGP service routing information includes a destination address and a next-hop address to the destination address, skipping, by the first network device, performing route recursion on the next-hop address, and advertising, by the first network device, the BGP service routing information to the third network device.

TECHNICAL FIELD

This application relates to the communications field, and in particular, to a route advertisement method, a device, and a system.

BACKGROUND

With the continuous evolution of network technologies, it is possible to build an end-to-end tunnel across a plurality of network domains. For example, in a software-defined networking (SDN) architecture based on an idea of control and forwarding separation, a centralized control and management device (for example, an SDN controller) may collect and manage network topologies of a plurality of Interior Gateway Protocol (IGP) network domains in a centralized manner, and compute an end-to-end tunnel across a plurality of IGP network domains. Various services may be carried on the end-to-end tunnel. For example, a virtual private network (VPN) service may be carried on an end-to-end segment routing-traffic engineering (SR-TE) tunnel. For another example, a service that supports the Internet Protocol version 6 (IPv6) may be carried on an end-to-end tunnel that supports the Internet Protocol version 4 (IPv4), to implement an IPv6 network over an IPv4 network (that is, IPv6 over IPv4).

However, in a scenario in which a service is carried on the end-to-end tunnel, when service routing information (for example, VPN routing information or IPv6 routing information) is advertised according to the Border Gateway Protocol (BGP), a problem that a service cannot be created exists.

SUMMARY

Embodiments of the present disclosure provide a route advertisement method, a device, and a system, to resolve a problem that a service cannot be created when BGP service routing information is advertised in a scenario in which a service is carried on a cross-domain end-to-end tunnel.

According to a first aspect, an embodiment of this application provides a route advertisement method. The method is applied to a network in which a cross-domain end-to-end tunnel carries a service, the cross-domain end-to-end tunnel crosses at least two IGP network domains, and the at least two IGP network domains include a first network device, a second network device, and a third network device. According to the method, the first network device receives BGP service routing information from the second network device, where the BGP service routing information includes a destination address and a next-hop address to the destination address; the first network device does not perform route recursion on the next-hop address before advertising the BGP service routing information to the third network device; and the first network device sends the BGP service routing information to the third network device.

After receiving the BGP service routing information from an upstream network device, a non-border network device (the first network device) in the cross-domain network does not perform route recursion on the next-hop address before continuing to advertise the BGP service routing information to a downstream network device. This facilitates service creation.

In a possible design, before the first network device receives BGP service routing information from the second network device, the method further includes: the first network device obtains first policy information, where the first policy information indicates the first network device not to perform route recursion.

A function (or a capability) of enabling (or activating), based on a user requirement, the network device not to perform route recursion is provided by using the first policy information. This helps manage or use a network on demand, and improve flexibility of network management.

In a possible design, that the first network device does not perform route recursion on the next-hop address includes: the first network device does not perform route recursion on the next-hop address according to the indication of the first policy information.

The network device determines, according to the indication of the first policy information, not to perform route recursion. This helps manage a network on demand, and improve flexibility of network management.

In a possible design, the first policy information further includes specified address information, the specified address information indicates an address set, and correspondingly, the first policy information indicates the first network device not to perform route recursion on the BGP service routing information whose destination address is in the address set.

The first policy information includes the specified address information, so that route recursion may not be performed on a BGP route within a specific address range, thereby enriching technique implementation means and improving flexibility of use.

In a possible design, that the first network device does not perform route recursion on the next-hop address includes: when the first network device determines that the destination address is in the address set, the first network device does not perform route recursion on the next-hop address according to the indication of the first policy information.

The network device determines, according to the indication of the first policy information, not to perform route recursion on the next-hop address that satisfies a requirement. This helps manage a network on demand, and improve flexibility of network management.

In a possible design, that the first network device obtains the first policy information includes at least one of the following manners: the first network device obtains the first policy information according to a command line configuration; the first network device receives a first message from a control and management device, where the first message includes the first policy information; and the first network device runs algorithm software to automatically generate the first policy information.

A plurality of manners of obtaining the first policy information are provided, so that technique implementation means are enriched, and usability is improved.

In a possible design, the method further includes: when advertising the BGP service routing information to the third network device, the first network device does not change the next-hop address in the BGP service routing information.

The next-hop address in the BGP service routing information is not changed, so that service creation reliability is improved.

In a possible design, before the first network device advertises the BGP service routing information to the third network device, the method further includes: the first network device obtains second policy information, where the second policy information indicates the first network device not to change the next-hop address in the BGP service routing information when the first network device advertises the BGP service routing information to the third network device.

A function (or a capability) of enabling (or activating), based on a user requirement, the network device not to change the next-hop address in the BGP service routing information is provided by using the second policy information. This helps manage or use a network on demand, and improve flexibility of network management.

In a possible design, that the first network device does not change the next-hop address in the BGP service routing information when advertising the BGP service routing information to the third network device includes: when the first network device advertises the BGP service routing information to the third network device, the first network device does not change the next-hop address in the BGP service routing information according to the second policy information.

The network device determines, according to the indication of the second policy information, not to change the next-hop address in the BGP service routing information. This helps manage a network on demand, and improve flexibility of network management.

In a possible design, that the first network device obtains the second policy information includes at least one of the following manners: the first network device obtains the second policy information according to a command line configuration; the first network device receives a second message from a control and management device, where the second message includes the second policy information; and the first network device runs algorithm software to automatically generate the second policy information.

A plurality of manners of obtaining the second policy information are provided, so that technique implementation means are enriched, and usability is improved.

In a possible design, the BGP service routing information includes BGP VPN routing information, BGP IPv6 routing information, or IPv4 routing information.

By using BGP routing information to carry VPN routing information, IPv6 routing information, or IPv4 routing information, a VPN service, an IPv4 over IPv6 service, or an IPv6 over IPv4 service can be carried on the cross-domain end-to-end tunnel.

According to a second aspect, an embodiment of this application provides a route advertisement method, applied to a network in which a cross-domain end-to-end tunnel carries a service. The cross-domain end-to-end tunnel crosses at least two interior gateway protocol IGP network domains, and the at least two IGP network domains include a first network device, a second network device, and a third network device. According to the method, a control and management device sends a first message to the first network device, where the first message includes first policy information, and the first policy information indicates the first network device not to perform route recursion.

A function (or a capability) of enabling (or activating), based on a user requirement, the network device not to perform route recursion is provided by using the first policy information. This helps manage or use a network on demand, and improve flexibility of network management.

In a possible design, the first policy information further includes specified address information, the specified address information indicates an address set, and correspondingly, the first policy information indicates the first network device not to perform route recursion on BGP service routing information whose destination address is in the address set.

The network device determines, according to the indication of the first policy information, not to perform route recursion on a next-hop address that satisfies a requirement. This helps manage a network on demand, and improve flexibility of network management.

In a possible design, the control and management device sends a second message to the first network device, where the second message includes second policy information, and the second policy information indicates the first network device not to change the next-hop address in the BGP service routing information when the first network device advertises the BGP service routing information to the third network device.

A function (or a capability) of enabling (or activating), based on a user requirement, the network device not to change the next-hop address in the BGP service routing information is provided by using the second policy information. This helps manage or use a network on demand, and improve flexibility of network management.

In a possible design, the BGP service routing information includes BGP VPN routing information, BGP IPv6 routing information, or IPv4 routing information.

By using BGP routing information to carry VPN routing information, IPv6 routing information, or IPv4 routing information, a VPN service, an IPv4 over IPv6 service, or an IPv6 over IPv4 service can be carried on the cross-domain end-to-end tunnel.

According to a third aspect, an embodiment of this application provides a network device, used as a first network device. The first network device includes a memory and a processor connected to the memory. The processor is configured to execute a computer-readable instruction in the memory, to perform the method in any one of the first aspect or the possible implementations of the first aspect.

According to a fourth aspect, the present disclosure provides a computer-readable medium, including an instruction. When the instruction is run on a computer, the computer is enabled to perform the method in any one of the first aspect or the possible implementations of the first aspect.

According to a fifth aspect, an embodiment of this application provides a control and management device. The control and management device includes a memory and a processor connected to the memory. The processor is configured to execute a computer-readable instruction in the memory, to perform the method in any one of the second aspect or the possible implementations of the second aspect.

According to a sixth aspect, the present disclosure provides a computer-readable medium, including an instruction. When the instruction is run on a computer, the computer is enabled to perform the method in any one of the second aspect or the possible implementations of the second aspect.

According to a seventh aspect, the present disclosure provides a system. The system includes the first network device according to the third aspect or the fourth aspect and the control and management device according to the fifth aspect or the sixth aspect.

DESCRIPTION OF EMBODIMENTS

In order to enable a person skilled in the art to better understand the solutions in the present disclosure, the following describes the embodiments of the present disclosure in more detail with reference to accompanying drawings and implementations. It is clear that the described embodiments are some rather than all of the embodiments of the present disclosure. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present disclosure without creative efforts shall fall within the protection scope of the present disclosure.

Before the technical solutions of the embodiments of the present disclosure are described, an application scenario of the embodiments of the present disclosure is first illustrated. The present disclosure is applied to a network in which a cross-domain end-to-end tunnel carries a service. The cross-domain end-to-end tunnel is a tunnel that crosses at least two IGP network domains. The cross-domain end-to-end tunnel is a complete tunnel instead of a segmented tunnel formed by splicing a plurality of tunnels in separate network domains (a tunnel in a single network domain is a tunnel that crosses only one network domain). The cross-domain end-to-end tunnel is a tunnel including two end nodes and at least one intermediate node, and a node may also be referred to as a network device. The cross-domain end-to-end tunnel may be a bidirectional tunnel between the two end nodes, or may be a bidirectional tunnel including two unidirectional tunnels in opposite directions. For example, a unidirectional tunnel1from an end node A to an end node B and a unidirectional tunnel2from the end node B to the end node A form a bidirectional tunnel between the end node A and the end node B. The IGP network domain is a network on which routing information is exchanged according to IGP, and is also referred to as an IGP domain. A network including the at least two IGP network domains is also referred to as a cross-domain network. Usually, one autonomous system (AS) is one IGP network domain. However, sometimes, one AS has a relatively large scale, and because performance of a network device is insufficient to support route calculation in such a large-scale network, or to facilitate maintenance and management, an operator divides the AS into a plurality of IGP network domains, to adapt to the performance of the network device or satisfy a management requirement.

It should be noted that the cross-domain end-to-end tunnel may be in a form of an SR-TE tunnel, a segment routing-best effort (SR-BE) tunnel, a resource reservation protocol-traffic engineering (RSVP-TE) tunnel, a multi-protocol label switching (MPLS) label switched path (LSP) tunnel, a generic routing encapsulation (GRE) tunnel, an IPv4 tunnel (for example, in an IPv6 over IPv4 scenario), an IPv6 tunnel (for example, in an IPv4 over IPv6 scenario), or the like. Only an example is provided herein, and this is not limited. In addition, the end-to-end tunnel may be established by using a centralized control and management device, or may be established in another manner.

The cross-domain network includes a plurality of network devices. The network device is a device that performs a routing and forwarding function, and may be a device such as a router, a switch, or a forwarder. The router, the switch, or the forwarder may be a physical device, or may be a virtual device (such as a virtual server, a virtual router, a virtual switch, or a virtual forwarder) implemented based on a virtualization technology. In the cross-domain network, a network device connected to a device in a service network (for example, a service network1and a service network2shown inFIG.1in the following) is also referred to as a border network device, and a network device not connected to a device in the service network is also referred to as a non-border network device.

FIG.1is a schematic diagram of an application scenario in which a cross-domain end-to-end tunnel carries a service. The schematic diagram includes three IGP network domains: an IGP domain1, an IGP domain2, and an IGP domain3. The IGP domain1includes a network device1and a network device2, the IGP domain2includes the network device2and a network device3, and the IGP domain3includes the network device3and a network device4. The network device2is connected to the IGP domain1and the IGP domain2, and the network device3is connected to the IGP domain2and the IGP domain3. A control and management device performs centralized control, and establishes an end-to-end tunnel crossing the three IGP domains between the network device1and the network device4. A service between a service network1and a service network2may be carried on the end-to-end tunnel. The end-to-end tunnel is also referred to as a public network tunnel or an outer tunnel. BGP peers are respectively established between the network device1and the network device2, between the network device2and the network device3, and between the network device3and the network device4, and BGP service routing information is advertised between the BGP peers through a BGP update message, to implement service creation. In a direction in which the network device1advertises a BGP service route to the network device4, a previous node is referred to as an upstream node of a following node, and the following node is referred to as a downstream node of the previous node. For example, the network device2is a downstream node of the network device1, and the network device1is an upstream node of the network device2. The BGP service routing information includes a destination address and a next-hop address. For example, the destination address may be carried in a multiprotocol reachable NLRI (MP_REACH_NLRI) attribute defined by BGP, and the next-hop address may be carried in a NEXT_HOP attribute defined by BGP. For details about the MP_REACH_NLRI attribute and the NEXT_HOP attribute, refer to the request for comments (RFC) 4271 released by the Internet Engineering Task Force (IETF). Content of this document and parts related to this aspect seem to be copied as a whole, and are incorporated by reference (incorporated by reference) into this specification. For a description of a contradiction or conflict that the document has with this application, a description of this application shall prevail. In this specification, for brevity, details are not described herein. The service may be a VPN service, an IPv6 service, or the like. If the service is the VPN service, the service network1and the service network2are two site networks of a VPN, and the service routing information is VPN routing information. In this case, the destination address is a private network address of the VPN, for example, may be a VPN-IPv4 address, a VPN-IPv6 address, or a media access control (MAC) address in an Ethernet VPN (EVPN). If the service is the IPv6 service, the service network1and the service network2are IPv6 networks, and the service routing information is IPv6 routing information. In this way, an IPv6 over IPv4 network is implemented. When the service routing information is the IPv6 routing information, the destination address is an IPv6 address. It should be noted that, if the destination address is an IP address (including an IPv4 address and an IPv6 address), the destination address is also referred to as an IP address prefix or an IP prefix.

The embodiments of the present disclosure provide a method. In an application scenario in which a cross-domain end-to-end tunnel carries a service, after receiving BGP service routing information (including a destination address and a next-hop address to the destination address) from an upstream network device, before continuing to advertise the BGP service routing information to a downstream network device, a non-border network device in a cross-domain network does not perform route recursion on the next-hop address and does not change the next-hop address.

It should be noted that, route recursion refers to recursive route lookup, and is specifically an operation of performing recursive route lookup for an Internet Protocol (IP) address in a NEXT_HOP attribute. Recursive route lookup includes recursive IP lookup and recursive tunnel lookup. When a network device receives BGP routing information, if an IP address in a NEXT_HOP attribute is a next-hop address that is not directly to the network device, recursive route lookup needs to be performed on IP addresses in the NEXT_HOP attribute to determine a direct next-hop address (that is, recursive IP lookup) or tunnel identifier (that is, recursive tunnel lookup), so as to determine whether a route to the IP address in the NEXT_HOP attribute is reachable.

The method in the embodiments of the present disclosure helps normally create a service in the network scenario in which a cross-domain end-to-end tunnel carries a service, thereby avoiding a problem that if route recursion fails when a network device performs route recursion on a next-hop address before the network device advertises BGP service routing information, advertisement (that is, distribution) of the BGP service routing information is terminated, and consequently, a service cannot be normally created.

The foregoing describes the application scenario of the embodiments of the present disclosure, and the following further describes the embodiments of the present disclosure in detail based on the application scenario inFIG.1. The following first network device is a network device not connected to a device in a service network, that is, a non-border network device, in at least two IGP network domains in which a cross-domain end-to-end tunnel is located. For example, the first network device may be the network device2or the network device3inFIG.1, a route reflector (RR)1or an RR2in the followingFIG.3A, an autonomous system border router (Autonomous System Border Router, ASBR)1, an ASBR2, an ASBR3, an ASBR4, an ASBR5, an ASBR6, an ASBR7, or an ASBR8in the followingFIG.3B, or a router2, a router3, or a router4in the followingFIG.3C.

FIG.2is a schematic flowchart of a route advertisement method according to an embodiment of the present disclosure. The method includes the following content.

301. A control and management device generates a first message, where the first message includes first policy information, and the first policy information indicates the first network device not to perform route recursion.

302. The control and management device sends the first message to the first network device.

303. The first network device receives the first message. The first network device obtains the first policy information from the first message and stores the first policy information.

FIG.1is used as an example. A network device1receives BGP service routing information sent by a network device5, where the BGP service routing information includes a destination address (for example, an IP address 50.1.1.1/32 in a service network1) and a next-hop address (for example, an IP address of the network device5). The network device1updates the next-hop address to an IP address of the network device1(for example, the IP address of the network device1is 10.1.1.1/32), and continues to send the BGP service routing information to a network device2, a network device3, and a network device4in sequence. When the first network device is the network device2, a third network device is the network device3, and the first policy information indicates the network device2not to perform route recursion on the next-hop address. Likewise, when the first network device is the network device3, the third network device is the network device4, and the first policy information indicates the network device3not to perform route recursion on the next-hop address.

A function (or a capability) of enabling (or activating), based on a user requirement, the network device not to perform route recursion is provided by using the first policy information. This helps manage or use a network on demand, and improve flexibility of network management.

In a specific implementation, the first policy information further includes specified address information, the specified address information indicates an address set, and correspondingly, the first policy information indicates the first network device not to perform route recursion on a next-hop address in BGP service routing information whose destination address is in the address set.

FIG.1is used as an example. The destination address in the BGP service routing information is 50.1.1.1/32, and the next-hop address is the IP address of the network device1, for example, 10.1.1.1/32. If the address set is {50.1.1.1/32, 60.1.1.1/32 . . . }, the destination address is in the address set. Therefore, when the first network device is the network device2, and the third network device is the network device3, the first policy information indicates the network device2not to perform route recursion on the next-hop address in the BGP service routing information. Likewise, when the first network device is the network device3, and the third network device is the network device4, the first policy information indicates the network device3not to perform route recursion on the next-hop address in the BGP service routing information.

The first policy information includes the specified address information, so that route recursion may not be performed on a BGP route within a specific address range, thereby enriching technique implementation means and improving flexibility of use.

304. The control and management device generates a second message, where the second message includes second policy information, and the second policy information indicates the first network device not to change the next-hop address in the BGP service routing information when the first network device advertises the BGP service routing information to the third network device.

305. The control and management device sends the second message to the first network device.

306. The first network device receives the second message. The first network device obtains the second policy information from the second message and stores the second policy information.

FIG.1is used as an example. When the first network device is the network device2, the third network device is the network device3, and the second policy information indicates the network device2not to change the next-hop address in the BGP service routing information when the network device2advertises the BGP service routing information to the network device3.

In a specific implementation, the second policy information further includes specified address information, the specified address information indicates an address set, and correspondingly, the second policy information indicates the first network device not to change the next-hop address in the BGP service routing information whose destination address is in the address set. It should be noted that the specified address information included in the second policy information may be the same as or different from the specified address information included in the first policy information. This is not limited herein.

FIG.1is used as an example. The destination address in the BGP service routing information is 50.1.1.1/32, and the next-hop address is the IP address of the network device1, for example, 10.1.1.1/32. If the address set is {50.1.1.1/32, 60.1.1.1/32 . . . }, the destination address is in the address set. Therefore, when the first network device is the network device2, and the third network device is the network device3, the second policy information indicates the network device2not to change the next-hop address in the BGP service routing information.

The second policy information includes the specified address information, so that the next-hop address in the BGP service routing information may not be changed for a BGP route within a specific address range, thereby enriching technique implementation means and improving flexibility of use.

It should be noted that the control and management device generates the first message and/or the second message and sends the first message and/or the second message to the first network device based on a user requirement. A user is a network operator, administrator, or user. The user requirement may be a requirement for using a network, managing a network, or the like. The user requirement may be manually configured and input on the control and management device, or may be automatically obtained by the control and management device after the control and management device receives a requirement message from another application server (for example, a third-party application server). Alternatively, another manner may be used. This is not limited in this specification.

It should be further noted that the first message and the second message are sent by a same control and management device or different control and management devices. The first policy information and the second policy information may be separately carried in two messages, or may be carried in one message.

It should be further noted that the first message and the second message may be sent according to a management channel protocol, or may be sent according to a control channel protocol. Currently, commonly used management channel protocols may include, for example, the Simple Network Management Protocol (SNMP) and the Network Configuration Protocol (NETCONF). Currently, commonly used control channel protocols may include, for example, the OpenFlow protocol, the Path Computation Element Communication Protocol (PCEP), the BGP, and the Interface to Routing System (I2RS) protocol.

The first message and the second message are sent by a same control and management device or different control and management devices, thereby improving flexibility of solution implementation.

It should be further noted that, other than obtaining the first policy information and the second policy information by receiving a message from the control and management device, the first network device may alternatively obtain the first policy information and the second policy information in at least one of the following manners:

(1) The first network device obtains the first policy information and the second policy information according to a command line configuration. For example, an administrator logs in to the first network device to perform a configuration operation by using a command line.

(2) The first network device runs algorithm software to automatically generate the first policy information and/or the second policy information.

A plurality of manners of obtaining the first policy information and the second policy information are provided, so that technique implementation means are enriched, and usability is improved.

307. A second network device sends the BGP service routing information to the first network device.

308. The first network device receives the border gateway protocol BGP service routing information from the second network device, where the BGP service routing information includes the destination address and the next-hop address to the destination address.

309. The first network device determines, according to the first policy information, not to perform route recursion on the next-hop address before advertising the BGP service routing information to the third network device.

FIG.1is used as an example. When the first network device is the network device2, the second network device is the network device1, and the third network device is the network device3, the network device2receives the BGP service routing information from the network device1, and determines, according to the first policy information on the network device2, not to perform route recursion on the next-hop address (which is the IP address of the network device1, for example, 10.1.1.1/32). The network device2continues to advertise the BGP service routing information to the network device3. Alternatively, when the first network device is the network device3, the second network device is the network device2, and the third network device is the network device4. After receiving the BGP service routing message from the network device2, the network device3continues to determine, according to the first policy information on the network device3, not to perform route recursion on the next-hop address (the IP address of the network device1), and then continues to advertise the BGP service routing information to the network device4.

Route recursion is not performed on the next-hop address. This avoids a problem that continuous advertisement or dissemination of the BGP service routing information is terminated due to a route recursion failure, and consequently, a service cannot be created.

In a specific implementation, when the first policy information further includes the specified address information, and the specified address information indicates the address set, the first network device further needs to determine whether the destination address is a destination address in the address set. When the first network device determines that the destination address is a destination address in the address set, the first network device does not perform route recursion on the next-hop address.

FIG.1is used as an example. If the destination address in the BGP service routing information is 50.1.1.1/32, and the address set is {50.1.1.1/32, 60.1.1.1/32 . . . }, the destination address is in the address set. The network device2receives the BGP service routing information from the network device1, and determines, according to the first policy information on the network device2, that the destination address (50.1.1.1/32) is in the address set. Therefore, the network device2does not perform route recursion on the next-hop address (the IP address of the network device1). The network device2continues to advertise the BGP service routing message to the network device3. After receiving the BGP service routing message from the network device2, the network device3continues to determine, according to the first policy information on the network device3, that the destination address (50.1.1.1/32) is in the address set. Therefore, the network device3does not perform route recursion on the next-hop address (the IP address of the network device1), and then continues to advertise the BGP service routing information to the network device4. On the contrary, if the destination address is 80.1.1.1/32 and is not in the address set, the network device2or the network device3stops advertising the BGP service routing information.

The first policy information includes the specified address information, so that route recursion may not be performed on a BGP service route within a specific address range, thereby enriching technique implementation means and improving flexibility of use.

310. The first network device does not change the next-hop address in the BGP service routing information according to the indication of the second policy information when the first network device advertises the BGP service routing information to the third network device.

311. Send the BGP service routing information to the third network device.

FIG.1is used as an example. The network device1sends a BGP service route to the network device2, and the next-hop address is the IP address (10.1.1.1/32) of the network device1. The next-hop address in the BGP service routing information received by the network device2from the network device1is the IP address of the network device1. When the network device2continues to advertise the BGP service routing information to the network device3, according to the second policy information on the network device2, the network device2does not change the next-hop address to an IP address of the network device2(an address of the network device2), but still uses the address of the network device1as the next-hop address. Likewise, the network device3does not change the next-hop address according to the second policy information on the network device3, but still uses the address of the network device1as the next-hop address when continuing to advertise the BGP service routing information to the network device4. The network device1is an end node of the cross-domain end-to-end tunnel, and the network device4is the other end node of the cross-domain end-to-end tunnel. When receiving the BGP service routing information, the network device4may perform route recursion by using the IP address of the network device1that is used as the next-hop address, to check whether the cross-domain end-to-end tunnel is reachable. If the cross-domain end-to-end tunnel is reachable, a service can be successfully created through route recursion. If the cross-domain end-to-end tunnel is faulty and unreachable, a service cannot be created through route recursion.

The next-hop address in the BGP service routing information is not changed, so that the next-hop address in the BGP service routing information is always an end node of the cross-domain end-to-end tunnel, and when the BGP service routing information reaches a device (border network device) connected to a service network in a cross-domain network, route recursion may be performed to check reachability of the cross-domain end-to-end tunnel. This ensures that a service is created only when the cross-domain end-to-end tunnel is reachable, thereby improving service creation reliability.

Further, as described in the foregoing307to309, route recursion is not performed on a non-border network device in the cross-domain network, to avoid a problem that when an end node of the cross-domain end-to-end tunnel is used as a next hop to perform route recursion, service route advertisement is terminated due to a recursion failure, and consequently, a service cannot be created. For example, if the network device3inFIG.1performs IP recursion by using the address of the network device1as the next-hop address, a routing entry corresponding to the address of the network device1that is a destination address cannot be found. A reason is that the network device1is a device in the IGP domain1, routing of the network device1is only in a range of the IGP domain1and is only in a routing table of the IGP domain1, and there is no routing to the network device1in the IGP domain2, that is, there is no routing entry corresponding to the address of the network device1in a routing table of the IGP domain2. When the network device3performs tunnel recursion by using the address of the network device1as the next-hop address, because the network device3is an intermediate node on the cross-domain end-to-end tunnel, recursion to the cross-domain end-to-end tunnel cannot be implemented. To be specific, in a tunnel forwarding table, a tunnel identifier corresponding to the address (the next-hop address) of the network device1cannot be found. Therefore, the route recursion performed by the network device3cannot succeed.

To clearer understand specific application scenarios in which a cross-domain end-to-end tunnel carries various services, the followingFIG.3AtoFIG.3Cshow specific application scenarios in which a VPN service and an IPv6 service are carried. The following further explains and describes the embodiments of the present disclosure with reference to specific application scenarios.

FIG.3Ais a schematic diagram of an application scenario in which a cross-domain end-to-end tunnel carries a VPN service. In this scenario, one AS includes three IGP network domains, and a VPN site accesses a network of the AS by using a customer edge (CE) device (the CE device is referred to as a CE for short below). A control and management device performs centralized control, and establishes an end-to-end tunnel crossing the three IGP network domains between provider edge (PE) devices (the PE device is referred to as a PE for short below) to carry a VPN service. For example, an SR-TE tunnel (a public network tunnel) is established between a PE1and a PE2, a CE1and a CE2are respectively located in a site1and a site2of a VPN1, and a service of the VPN1may be carried between the site1and the site2by using the SR-TE tunnel. BGP peers are respectively established between the PE1and an RR1, between the RR1and an RR2, and between the RR2and the PE2. VPN routing information of the CE1and the CE2is advertised and disseminated between the BGP peers of the PE1, the RR1, the RR2, and the PE2by using BGP update messages. Therefore, a VPN private tunnel (namely, an inner tunnel) is established over the public network tunnel (namely, an outer tunnel) between the PE1and the PE2, so that VPN1service interworking between the site1and the site2in different regions is implemented.

A method implemented in the VPN service scenario shown inFIG.3Ain the present disclosure is consistent with that inFIG.1, and a difference lies in that advertised BGP service routing information is specifically a private network route in the VPN1. As non-border network devices in the cross-domain network, the RR1and the RR2are preset to avoiding performing route recursion or updating a next-hop address. As a border network device in the cross-domain network, the PE1needs to update a next hop to the PE1when advertising BGP VPN routing information. As a border network device in the cross-domain network, the PE2needs to perform route recursion when receiving the BGP VPN routing information, to ensure that a cross-domain end-to-end tunnel, obtained through recursion, from the PE2to the PE1is reachable. In this way, it can be ensured that the BGP VPN routing information advertised by the PE1can be normally disseminated to the PE2through the RR1and the RR2, and that the end-to-end tunnel from the PE2to the PE1is reachable. Then, a VPN1service is created. This facilitates reliable creation of the VPN1service.

FIG.3Bis a schematic diagram of another application scenario in which a cross-domain end-to-end tunnel carries a VPN service. This scenario is similar to that inFIG.3A. A difference lies in that this scenario includes three ASs, and the ASs are interconnected through ASBRs. Each AS is an IGP network domain, and ASs may also be considered as an IGP network domain. A control and management device performs centralized control, and establishes an end-to-end tunnel crossing the three ASs between PEs to carry a VPN service. For example, an RSVP-TE tunnel (public network tunnel) is established between a PE1and a PE2. A service of a VPN1may be carried between a site1and a site2by using the RSVP-TE tunnel. A CE1accesses the PE1and a PE3in an AS1, and a CE2accesses the PE2and a PE4in an AS3. The PE1and the PE3respectively establish BGP peers with an ASBR1and an ASBR5; the ASBR1and the ASBR5respectively establish BGP peers with an ASBR3and an ASBR7; the ASBR3and the ASBR7respectively establish BGP peers with an ASBR4and an ASBR8; and the ASBR4and the ASBR8respectively establish BGP peers with the PE2and the PE4. VPN routing (also referred to as private network routing) information between the site1and the site2is carried in a BGP update message, and is advertised and disseminated through the BGP peers in sequence. Therefore, a VPN private tunnel (namely, an inner tunnel) is established over the public network tunnel (namely, an outer tunnel) between the PE1and the PE2, so that VPN1service interworking between the site1and the site2in different regions is implemented. It should be noted that, similar to a case that a CE may access a PE in a dual-homing mode, to ensure reliability, a plurality of cross-domain end-to-end tunnels may be established between each of the PE1and the PE3and each of the PE2and the PE4. Only one tunnel is used as an example herein, but no limitation is imposed.

A method implemented in the VPN service scenario shown inFIG.3Bin the present disclosure is consistent with that inFIG.1orFIG.3A, but is applied to a scenario of crossing a plurality of AS domains. For details, refer to the foregoing related parts. For brevity, details are not described again.

FIG.3Cis a schematic diagram of an application scenario in which a cross-domain end-to-end tunnel carries an IPv6 service. In this scenario, one AS includes three IGP network domains, and the three IGP network domains are IPv4-based networks. An IPv6 network1and an IPv6 network2access a network of the AS. A router5and a router6are respectively located in the IPv6 network1and the IPv6 network2. A control and management device performs centralized control, and establishes an end-to-end IPv4 tunnel crossing the three IGP network domains between a router1and a router4to carry an IPv6 service. BGP peers are respectively established between the router1and a router2, between the router2and a router3, and between the router3and the router4. IPv6 routing information of the IPv6 network1and the IPv6 network2is advertised and disseminated between the BGP peers of the router1, the router2, the router3, and the router4by using BGP update messages. In this way, an IPv6 tunnel (namely, an inner tunnel) is established over the IPv4 tunnel (namely, an outer tunnel) between the router1and the router4, so that interworking between the IPv6 network1and the IPv6 network2is implemented.

A method implemented in the IPv6 service scenario shown inFIG.3Cin the present disclosure is consistent with that inFIG.1, and a difference lies in that advertised BGP service routing information is specifically an IPv6 address in an IPv6 network, and a tunnel for route recursion is a cross-domain end-to-end IPv4 tunnel. As non-border network devices in the cross-domain network, the router2and the router3are preset to avoiding performing route recursion or updating a next-hop address. As a border network device in the cross-domain network, the router1needs to update a next hop to the router1when advertising BGP IPv6 routing information. As a border network device in the cross-domain network, the router4needs to perform route recursion when receiving the BGP IPv6 routing information, to ensure that a cross-domain end-to-end tunnel, obtained through recursion, from the router4to the router1is reachable. This can ensure that the BGP IPv6 routing information advertised by the router1can be normally disseminated to the router4through the router2and the router3, and that the end-to-end tunnel from the router4to the router1is reachable. Then, an IPv6 over IPv4 service is created. This facilitates reliable creation of the IPv6 over IPv4 service.

It should be noted that an IPv6 over IPv4 service scenario is used as an example inFIG.3C. An IPv4 over IPv6 service is similar, and a difference lies in that a cross-domain tunnel is an IPv6 tunnel, and advertised BGP service routing information is IPv4 routing information. For brevity, details are not described again.

FIG.4is a schematic diagram of a network device according to an embodiment of this application. The network device400is used as a first network device, and is used in a network in which a cross-domain end-to-end tunnel carries a service. The cross-domain end-to-end tunnel crosses at least two IGP network domains, and the at least two IGP network domains include the first network device, a second network device, and a third network device. The first network device includes a processor410, a memory420coupled to the processor410, and a transceiver430. The processor410may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. The processor may alternatively be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof. The processor410may be one processor, or may include a plurality of processors. The transceiver430is configured to receive border gateway protocol BGP service routing information from the second network device, and send the packet to the processor410, for subsequent operation processing. The BGP service routing information includes a destination address and a next-hop address to the destination address. The memory420may include a volatile memory, for example, a random-access memory (RAM). Alternatively, the memory may include a non-volatile memory, for example, a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD). Alternatively, the memory may include a combination of the foregoing types of memories. The memory420stores a computer-readable instruction. The computer-readable instruction includes a software module, for example, a route recursion module422. After executing each software module, the processor410may perform a corresponding operation according to an indication of each software module. In this embodiment, an operation performed by a software module is actually an operation performed by the processor410according to an indication of the software module. The route recursion module422may be configured to perform route recursion on the next-hop address. However, in this embodiment, before advertising the BGP service routing information to the third network device, the processor410does not perform route recursion on the next-hop address by using the route recursion module422. In addition, after executing the computer-readable instruction in the memory420, the processor410may perform, according to an indication of the computer-readable instruction, all operations that can be performed by the first network device, for example, operations performed by the first network device in the embodiments corresponding toFIG.1,FIG.2,FIG.3A,FIG.3B, andFIG.3C.

FIG.5is a schematic diagram of a control and management device500according to an embodiment of this application.

As shown inFIG.5, the control and management device500includes a processor510, a memory520coupled to the processor510, and a transceiver530. The control and management device500may be the control and management device inFIG.1,FIG.2, andFIGS.3A-3C. The processor510may be a CPU, an NP, or a combination of a CPU and an NP. The processor may alternatively be an ASIC, a PLD, or a combination thereof. The PLD may be a CPLD, an FPGA, GAL, or any combination thereof. The processor510may be one processor, or may include a plurality of processors. The memory520may include a volatile memory, for example, a RAM. Alternatively, the memory may include a non-volatile memory, for example, a ROM, a flash memory, an HDD, or an SSD. Alternatively, the memory may include a combination of the foregoing types of memories. The memory520stores a computer-readable instruction, and the computer-readable instruction includes a plurality of software modules, for example, a first message generation module522and a second message generation module524. After executing each software module, the processor510may perform a corresponding operation according to an indication of each software module. In this embodiment, an operation performed by a software module is actually an operation performed by the processor510according to an indication of the software module. The first message generation module522is configured to generate a first message, where the first message includes first policy information, and the first policy information indicates a first network device not to perform route recursion. The second message generation module524is configured to generate a second message, where the second message includes second policy information, and the second policy information indicates the first network device not to change the next-hop address in the BGP service routing information when the first network device advertises the BGP service routing information to the third network device. The transceiver530is configured to send the first message and the second message to the first network device. Specifically, when the computer-readable instruction includes the first message generation module522, the transceiver530is configured to send the first message to the first network device. When the computer-readable instruction includes the second message generation module524, the transceiver530is configured to send the second message to the first network device according to an indication of the processor510. When the computer-readable instruction includes the first message generation module522and the second message generation module524, the transceiver530is configured to send the first message and the second message to the first network device according to an indication of the processor510. In addition, after executing the computer-readable instruction in the memory520, the processor510may perform, according to an indication of the computer-readable instruction, all operations that can be performed by the control and management device, for example, operations performed by the control and management device in the embodiments corresponding toFIG.1,FIG.2,FIG.3A,FIG.3B, andFIG.3C.

FIG.6is a schematic diagram of a route advertisement system according to an embodiment of the present disclosure. As shown inFIG.6, the system600includes a network device610and a control and management device620. The network device610is the first network device described in the embodiments corresponding toFIG.1,FIG.2,FIG.3A,FIG.3B, andFIG.3C, and the control and management device620is the control and management device described in the embodiments corresponding toFIG.1,FIG.2,FIG.3A,FIG.3B, andFIG.3C. For detailed descriptions of the devices in the system, refer to related parts in the embodiments corresponding toFIG.1,FIG.2,FIG.3A,FIG.3B, andFIG.3C. Details are not described herein again.

It should be noted that in the embodiments of the present disclosure, “first” in the first network device, “second” in the second network device, and “third” in the third network device are merely used to distinguish between the three network devices, but do not indicate that there is a sequence relationship, a hierarchy relationship, or another dependency relationship among the three network devices.

It should be understood that a person skilled in the art can obtain, on a basis of reading this application, combinations of optional features, steps, or methods described in the embodiments of this application without creative efforts, and all of the combinations belong to embodiments disclosed in this application. For simple description or writing, different combinations are not described.