WO2022088843A1 - 一种路由通告的方法、路由环路的检测方法及设备 - Google Patents
一种路由通告的方法、路由环路的检测方法及设备 Download PDFInfo
- Publication number
- WO2022088843A1 WO2022088843A1 PCT/CN2021/111950 CN2021111950W WO2022088843A1 WO 2022088843 A1 WO2022088843 A1 WO 2022088843A1 CN 2021111950 W CN2021111950 W CN 2021111950W WO 2022088843 A1 WO2022088843 A1 WO 2022088843A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- network device
- advertisement message
- route
- routing
- field
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 125
- 238000001514 detection method Methods 0.000 title claims abstract description 22
- 230000015654 memory Effects 0.000 claims description 39
- 238000012545 processing Methods 0.000 claims description 37
- 230000004044 response Effects 0.000 claims description 8
- 230000005540 biological transmission Effects 0.000 abstract description 12
- 238000013461 design Methods 0.000 description 36
- 230000006870 function Effects 0.000 description 29
- 238000010586 diagram Methods 0.000 description 26
- 230000008569 process Effects 0.000 description 12
- 238000004891 communication Methods 0.000 description 11
- 239000003999 initiator Substances 0.000 description 7
- 239000004744 fabric Substances 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 5
- 238000004590 computer program Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 125000004122 cyclic group Chemical group 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/18—Loop-free operations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
- H04L45/03—Topology update or discovery by updating link state protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
- H04L45/04—Interdomain routing, e.g. hierarchical routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/26—Route discovery packet
Definitions
- the present application relates to the field of communications, and in particular, to a method for route advertisement, a method and device for detecting routing loops.
- network devices need to send route advertisement messages for route advertisement to each other.
- network device A may send a route advertisement message carrying routing information of network device A to network device B.
- network device B After receiving the routing advertisement message from network device A, network device B can generate a route corresponding to the routing information of network device A according to the routing information in the routing advertisement message, so as to transmit the packet to network device A according to the route.
- network device B may also send the route advertisement message to other network devices (eg, network device C), so that other network devices can also send the message to network device B.
- a routing loop problem may occur in the process of transmitting route advertisement messages between network devices.
- a routing loop will cause packets to circulate among multiple network devices and fail to reach the destination device, thus affecting normal service transmission requirements.
- Embodiments of the present application provide a method for route advertisement, a method and device for detecting a routing loop, which are used to solve the problem of routing loops in a network and improve the reliability of service packet transmission.
- a first aspect provides a route advertisement method, which is applied to a first network device, and specifically includes the following steps: the first network device receives a first route advertisement message, where the first route advertisement message includes routing information and a first field .
- the first field of the first route advertisement message includes a device identifier, which is used to indicate that the routing information included in the first route advertisement message comes from a device corresponding to the device identifier.
- the first network device generates a second route advertisement message according to the first route advertisement message, the second route advertisement message includes a second field, and the second field includes the device identifier.
- the first network device sends the second route advertisement message to the second network device.
- the first route advertisement message and the second route advertisement message may be Border Gateway Protocol (Border Gateway Protocol, BGP) update (update) messages.
- BGP Border Gateway Protocol
- the first field and the second field are different fields of the BGP update message.
- the first field is a field representing an originator identifier (Originator ID) attribute
- the second field is a field representing a route origin (source of origin, SoO) attribute.
- the first network device In the case that the first routing advertisement message cannot reach the second network device due to some reasons (eg, cross-network), the first network device generates a second routing advertisement message that can be sent to the second network device according to the first routing advertisement message , wherein the second field of the second route advertisement message carries the value of the first field in the first route advertisement message, so that the second network device can judge whether a routing loop occurs according to whether the value of the second field is its own device identifier , so as to detect routing loops and improve the reliability of service packet transmission.
- some reasons eg, cross-network
- Implementation manner 1 The first network device generates the second route advertisement message according to the routing information included in the first route advertisement message, where the second route advertisement message includes the routing information.
- Implementation mode 2 First, the first network device generates a corresponding route according to the routing information included in the first route advertisement message, and then the first network device generates the second route advertisement according to the route information.
- implementation mode 2 may be specifically as follows: the first network device generates a corresponding private network route according to the routing information included in the first route advertisement message, and copies the private network route to the first virtual private network route.
- the second routing advertisement message is generated according to the VPNv4 routing, so as to realize the transmission of the device identification across the network.
- Implementation mode 3 the first network device deletes the first field of the first route advertisement message and adds the second field to obtain the second route advertisement message.
- the first network device is a first provider edge (Provider Edge, PE) device.
- the first route advertisement message received by the first network device may be to receive the first route advertisement message sent by a route reflector (router reflector, the RR.
- the RR may carry the above-mentioned field representing the Originator ID attribute in the first route advertisement message. , to carry the device identifier in this field.
- the RR is a customer edge (Customer Edge, CE) device.
- the second field may be a field representing the SoO attribute of the origin of the route.
- the field representing the SoO attribute may include the autonomous system (autonomous system, AS) special extended community (specific extended community) attribute field of the BGP update message, the Internet Protocol version 4 address (Internet Protocol version) 4 address, IPv4 address) special extended community (specific extended community) attribute field or opaque extended community (opaque extended community) attribute field.
- the device identifier may be carried in the global administrator field of the AS specific extended community attribute or the global administrator field of the IPv4 address specific extended community attribute. If the device ID is longer, then optionally, a part of the device ID may be carried in the above global administrator field, and the other part may be carried in the local administrator (local administrator) field of the AS specific extended community or the IPv4 address specific extended The local administrator field of the community.
- the device identity may be carried in the value field including the opaque extended community attribute.
- a routing loop detection method is provided, and the method is applied to a second network device, and the second network device may be a PE device.
- the method includes the steps of: the second network device receives a second route advertisement message from the first network device, the second route advertisement message including a field representing the SoO attribute.
- the second network device confirms that the value of the field representing the SoO attribute is the identifier of the second network device, it means that the routing information advertised by the second network device has returned to the network device. 2.
- the network device determines that a routing loop occurs, and implements detection of the routing loop.
- the method further includes: in response to determining that a routing loop occurs, the second network device may directly discard the second routing advertisement message to avoid generating forwarding information according to the second routing advertisement message; or , the second network device generates forwarding information according to the routing information in the second routing advertisement message, and then the second network device can set the forwarding information to be invalid or set to a lower priority to avoid cyclic forwarding of service packets , to ensure the reliability of service packet transmission.
- the forwarding information may be a forwarding entry.
- a certain number of routing loops can be allowed to occur on the second network device.
- the method further includes: when the second network device determines that the number of occurrences of routing loops exceeds a certain threshold, the second network device discards the second route advertisement message, or discards the second route advertisement message according to the second network device.
- the forwarding information obtained from the route advertisement message is invalidated or the priority of the forwarding information is reduced.
- the specific threshold is an integer greater than or equal to 1.
- the method further includes: the second network device receives a first route advertisement message from the first network device, where the first route advertisement message includes routing information and the representation SoO attribute field.
- the second network device confirms that the value of the field representing the SoO attribute in the first route advertisement message is not the identifier of the second network device, it indicates that no routing loop occurs.
- the second network device may generate a third routing advertisement message according to the routing information, where the third routing advertisement message includes the routing information in the first routing advertisement message,
- the second network device may send the third route advertisement message to the RR, so as to realize the advertisement of the routing information.
- the fields of the SoO attribute reference may be made to the above, and details are not repeated here.
- the identifier of the second network device is a router ID (router ID) of the second network device or a serial number in the network, etc., which is not specifically limited in this embodiment of the present application.
- a method for route advertisement is provided, where the method is applied to a first network device, and the first network device may be a PE device.
- the method includes: the first network device generates a first route advertisement message, and the first route advertisement message may be a BGP update message.
- the first route advertisement message includes route information and a field representing the SoO attribute, and the route information may be route information of the first network device or route information of other network devices.
- the field representing the SoO attribute carries the identifier of the first network device, and the identifier of the first network device may be the router ID of the first network device.
- the first network device sends the first route advertisement message to the next-hop network device, that is, the second network device.
- the first network device When the first network device receives the third route advertisement message, and the value of the field representing the SoO attribute included in the third route advertisement message is the identifier of the first network device, it indicates the route advertised by the first network device The information is returned to the network device, so it can be confirmed that a routing loop occurs, and the detection of the routing loop can be realized.
- the first network device may receive a second route advertisement message from another device, and add the field representing the SoO attribute to the second route advertisement message to obtain the first route Announcement message.
- the method further includes: in response to determining that a routing loop occurs, if the first network device does not generate corresponding forwarding information according to the third route advertisement message, the first network device may directly discard all The third route advertisement message is described above. If the first network device has generated corresponding forwarding information according to the third route advertisement message, the first network device may invalidate the forwarding information obtained according to the third route advertisement message or reduce the priority of the forwarding information , to avoid cyclic forwarding of service packets and ensure the reliability of service packet transmission.
- a certain number of routing loops can be allowed to occur on the first network device.
- the method further includes: when the first network device determines that the number of occurrences of routing loops exceeds a certain threshold, the first network device discards the third route advertisement message, or discards the third route advertisement message according to the third The forwarding information obtained from the route advertisement message is invalidated or the priority of the forwarding information is reduced.
- the specific threshold is a positive integer greater than or equal to 1.
- the fields representing SoO attributes include the global administrator field in the AS specific extended community or the global administrator field in the IPv4 address specific extended community.
- the field representing the SoO attribute further includes the local administrator field of the AS specific extended community or the local administrator field of the IPv4 address specific extended community.
- the field representing the SoO attribute includes the value field in the opaque extended community attribute.
- a network device which is applied to a network system including multiple network devices, the multiple network devices include a first network device and a second network device, and the network device is the first network device , the first network device is configured to execute the method in the first aspect or any possible design of the first aspect.
- the first network device includes a unit for performing the method in the first aspect or any possible design of the first aspect.
- the first network device is configured to perform the third aspect or the method in any possible design of the third aspect.
- the first network device includes a unit for performing the third aspect or the method in any possible design of the third aspect.
- a fifth aspect provides a network device, which is characterized in that it is applied to a network system including multiple network devices, the multiple network devices include a first network device and a second network device, and the second network device uses A method for performing the second aspect or any one possible design of the second aspect.
- the second network device includes a unit for performing the method in the second aspect or any possible design of the second aspect.
- a network device applied to a network system including multiple network devices, the multiple network devices include a first network device and a second network device, the network device is a first network device, the first network device
- the device includes: a processor and a network interface.
- the network interface is used for receiving and sending packets.
- the processor is configured to execute the method in the first aspect or any possible design of the first aspect; or, the processor is configured to execute the method in the third aspect or any possible design of the third aspect.
- the first network device further includes a memory, which may be used to store instructions or program codes.
- the processor is used to call the instructions or program codes in the memory to execute the first aspect or the method in any possible design of the first aspect; or, the processor is used to call the instructions or program codes in the memory to execute the third aspect or The method in any possible design of the third aspect.
- a network device is provided, applied to a network system including multiple network devices, the multiple network devices include a first network device and a second network device, the network device is a second network device, the second network device
- the device includes: a processor and a network interface.
- the network interface is used for receiving and sending packets.
- the processor is configured to perform the method in the aforementioned second aspect or any one possible design of the second aspect.
- the second network device further includes a memory, which may be used to store instructions or program codes.
- the processor is configured to invoke the instructions or program codes in the memory to execute the method in the foregoing second aspect or any possible design of the second aspect.
- a network system includes the first network device according to the fourth aspect and the second network device according to the fifth aspect.
- the first network device according to the sixth aspect and the second network device according to the seventh aspect are included.
- a computer-readable storage medium including instructions, programs, or codes, which, when executed on a computer, cause the computer to perform the aforementioned first aspect, second aspect, third aspect, and the aforementioned three aspects.
- a tenth aspect provides a computer program product comprising computer instructions, which, when the computer program product runs on a network device, enables the network device to perform the first aspect, the second aspect, the third aspect, and any of the above three aspects A method provided by one of the possible implementations.
- a chip including a memory and a processor.
- Memory is used to store instructions or program code.
- the processor is used to call and run the instruction or program code from the memory to execute the method in the first aspect or any possible design of the first aspect; or, the processor executes the second aspect or any one of the second aspect the method in one possible design; or, the processor executes the third aspect or the method in any one possible design of the third aspect.
- a twelfth aspect provides a chip, the chip includes a processor, but does not include a memory, the processor is configured to read and execute instructions or program codes stored in the off-chip memory, and when the instructions or program codes are executed When , the processor executes the first aspect or the method in any possible design of the first aspect; or, the processor executes the second aspect or the method in any possible design of the second aspect; or, the processor executes The third aspect or the method in any possible design of the third aspect.
- FIG. 1 is a schematic diagram of a BGP network architecture provided by an embodiment of the present application.
- FIG. 2 is a schematic diagram of another BGP network architecture provided by an embodiment of the present application.
- FIG. 3 is a schematic flowchart of a route advertisement and route loop detection method provided by an embodiment of the present application.
- FIG. 4 is a schematic diagram of the format of a field representing an Originator ID attribute provided by an embodiment of the present application.
- FIG. 5 is a schematic diagram of the format of a field including an AS specific extended community attribute provided by an embodiment of the present application
- FIG. 6 is a schematic diagram of the format of a field including an IPv4 address specific extended community attribute provided by an embodiment of the present application;
- FIG. 7 is a schematic diagram of the format of a field including an opaque extended community attribute provided by an embodiment of the present application.
- FIG. 8 is a schematic flowchart of a method for route advertisement and route loop detection in a cross-network domain scenario provided by an embodiment of the present application
- FIG. 9 is a flowchart of another route advertisement and route loop detection method provided by an embodiment of the present application.
- FIG. 10 is a schematic diagram of a network architecture without a route reflector provided by an embodiment of the present application.
- FIG. 11 is a schematic flowchart of a route advertisement and route loop detection method provided by an embodiment of the present application.
- FIG. 12 is a schematic structural diagram of a network device according to an embodiment of the present application.
- FIG. 13 is a schematic structural diagram of a network device according to an embodiment of the present application.
- FIG. 14 is a schematic structural diagram of a network device according to an embodiment of the present application.
- FIG. 15 is a schematic structural diagram of a network system provided by an embodiment of the present application.
- FIG. 16 is a schematic structural diagram of a network device provided by an embodiment of the present application.
- FIG. 17 is a schematic structural diagram of a network device provided by an embodiment of the present application.
- Routing loop refers to the situation in which a routing advertisement message is advertised by a network device and then returns to the network device after passing through one or more network devices.
- route reflector route reflector
- the figure is a schematic diagram of the network architecture of the Border Gateway Protocol (Border Gateway Protocol, BGP).
- the network architecture includes a network device 101 , a network device 102 , a network device 103 , a network device 104 and a terminal device 105 .
- the terminal device 105 is connected to the network device 101, the network device 101 is connected to the network device 102, the network device 102 is connected to the network device 103, the network device 103 is connected to the network device 104, and the network device 104 is connected to the network device 101 (it needs to be explained).
- the connection between network devices may be a direct connection or an indirect connection).
- the network device 102 and the network device 104 are both route reflectors.
- the network device 101 generates forwarding information 1 of the route to the terminal device 105, the next hop of the forwarding information 1 is the terminal device 105, and the network device 101 sends the route advertisement message 1 to the network device 102, and the route advertisement message 1 carries the terminal Routing information for device 105 . Since the network device 102 is a route reflector, the network device 102 carries an originator identifier (Originator ID) attribute in the route advertisement message 1, thereby obtaining the route advertisement message 2. The value of the Originator ID attribute is the originator identifier, which is used to identify the network device that initiates the route advertisement message 1, which is the network device 101 for FIG. 1 .
- the initiator of the route advertisement message is the network device 101 .
- the network device 102 sends the route advertisement message 2 to the network device 103.
- the network device 103 confirms that the identifier of the initiator carried in it is different from the identifier of the network device 103.
- the information generates forwarding information for the route to the terminal device 105 , the next hop of which is the network device 102 .
- the network device 103 sends the route advertisement message 2 to the network device 104 .
- the network device 104 determines that the route advertisement message 2 already carries the initiator identifier, and does not add a new initiator identifier, continues to reuse the already carried initiator identifier, and directly sends the route advertisement message 2 to the network device 101 .
- the next hop of the forwarding information 1 is the terminal device 105 . If the network device 101 generates the forwarding information 2 of the route to the terminal device 105 after receiving the route advertisement message 2, the next hop of the forwarding information 2 is the network device 104, and selects the forwarding information from the forwarding information 1 and the forwarding information 2.
- the network device 101 determines that the identifier of the initiator in the routing advertisement message 2 is the same as its own, and the network device 101 discards the routing advertisement message 2, that is, does not generate a routing advertisement message reaching the terminal device 105.
- the next hop is the route for network device 104 to avoid routing loop problems.
- the above solution is not applicable to the scenario where there is no route reflector in the network architecture, or the scenario where there is a route reflector but cross-network domain, that is, in the cross-network domain scenario, the above Originator ID-based solution may still cause routing loop problem.
- the following is a detailed introduction to the routing loop problem that may occur in the Originator ID-based solution in the cross-network domain scenario.
- FIG. 2 is a schematic diagram of another network architecture based on BGP.
- the network architecture shown in FIG. 2 includes a network device 201 , a network device 202 , a network device 203 , a network device 204 , a network device 205 , a network device 206 , and a network device 207 .
- the network device 201 is connected to the network device 202, the network device 202 is respectively connected to the network device 203 and the network device 205, the network device 203 is connected to the network device 205 through the network device 204, and the network device 203 and the network device 205 are also connected to the network device 205.
- 206 is connected, and the network device 206 is connected with the network device 207 .
- the network device 201, the network device 202, and the network device 207 are all customer edge (Customer Edge, CE) devices, and the network device 202 is also a route reflector.
- the network device 203, the network device 205, and the network device 206 are all provider edge (Provider Edge, PE) devices, and the network device 204 is a provider (Provider, P) device.
- the above-mentioned CE devices and between CE devices and PE devices transmit route advertisement messages through External Border Gateway Protocol (External Border Gateway Protocol, eBGP), and between PE devices through Internal Border Gateway Protocol (External Border Gateway Protocol, eBGP) Internal Border Gateway Protocol, iBGP) transmits route advertisement messages.
- eBGP External Border Gateway Protocol
- eBGP Internal Border Gateway Protocol
- iBGP Internal Border Gateway Protocol
- the network device 201 generates and sends a routing advertisement message 1 to the network device 202.
- the network device 202 After receiving the routing advertisement message 1, the network device 202 generates a routing information corresponding to the routing advertisement message 1 (that is, the routing information reaching the network device 201).
- the forwarding information 1 of the route (that is, the route reaching the network device 201 ), the next hop of the forwarding information 1 is the network device 201 .
- the network device 202 carries the Originator ID attribute in the route advertisement message 1 to obtain the route advertisement message 2, wherein the value of the Originator ID attribute is used to identify the network device 201.
- the network device 202 sends the route advertisement message 2 to the network device 203 .
- the network device 203 Since the network device 203 is a PE device, after receiving the route advertisement message 2, the network device 203 generates a private network route corresponding to the routing information of the network device 201, and copies the private network route to the VPNv4 route. After duplication, the network device 203 generates a route advertisement message 3 according to the VPNv4 route, and sends it to the network device 204 of the VPNv4 network. It should be noted that the route advertisement message 3 sent by the network device 203 to the network device 204 includes the routing information of the network device 201, but does not include the Originator ID attribute.
- the Originator ID attribute can only be added when the route reflector reflects routes in the same network, that is to say, the Originator ID attribute can be added only when the route is passed inside the private network or within the VPNv4 network.
- the Originator ID attribute cannot be passed between the VPNv4 network.
- the network device 205 After the network device 205 receives the route advertisement message 3 sent by the network device 204, it generates a VPNv4 route to the network device 201 according to the route advertisement message 3, and copies the VPNv4 route to the private network route. After duplication, the network device 205 generates a route advertisement message 4 according to the private network route, and sends the route advertisement message 4 to the network device 202 through the private network neighbor.
- the network device 202 After receiving the route advertisement message 4 from the network device 205, the network device 202 generates the forwarding information 2 of the route corresponding to the routing information of the route advertisement message 4 (that is, the route to the network device 201). One hop is network device 205 . That is, the route to the network device 201 has two pieces of forwarding information, that is, forwarding information 1 and forwarding information 2 . If the network device 202 chooses to forward the information 2 to the outside, a routing loop of the network device 202 - the network device 203 - the network device 204 - the network device 205 - the network device 202 will be formed.
- embodiments of the present application provide a method for route advertisement, a method and device for detecting a routing loop, so as to detect routing loops and avoid the problem of routing loops.
- the route advertisement and route loop detection methods provided by the embodiments of the present application may be applied to the network architecture shown in FIG. 2 .
- the above-mentioned network devices 201 to 207 may be physical devices such as routers, switches, and servers with routing functions, or may be virtual devices with routing or switch functions.
- this figure is a schematic flowchart of a route advertisement and route loop detection method provided by an embodiment of the present application.
- the route advertisement and route loop detection method specifically includes the following steps.
- a first network device receives a first route advertisement message, where the first route advertisement message includes routing information and a first field, and the first field includes a device identifier.
- the first network device may be the network device 203 in FIG. 2 , that is, the first network device may be a PE device.
- the first network device receives the first route advertisement message, where the first route advertisement message may be a BGP update message.
- the first route advertisement message may come from a route reflector, and the route reflector may be a CE device with a route reflector function, such as the network device 202 in FIG. 2 .
- the first route advertisement message includes routing information. After receiving the first route advertisement message, the first network device may generate forwarding information of the route corresponding to the routing information.
- the network device 203 receives the BGP update message 1 from the network device 202, the BGP update message 1 carries the routing information of the network device 201, and the network device 202 generates forwarding information of the route to the network device 201 according to the routing information of the network device 201 .
- the first route advertisement message may further include a device identifier, and the routing information included in the first route advertisement message comes from the device corresponding to the device identifier.
- the device identification may be carried in the first field of the first route advertisement message. If the first route advertisement message is a BGP update message, the first field may be a field representing the Originator ID attribute.
- the BGP update message 1 received by the network device 203 from the network device 202 carries a field representing the Originator ID attribute
- the field representing the Originator ID attribute carries the device identifier of the network device 201, which represents the routing information of the BGP update message 1 From network device 201 .
- the device identifier of the network device 201 may be a router identifier (router identifier, router ID) of the network device 201 or a device identifier that uniquely identifies the network device 201, such as the serial number of the network device 201 in the network.
- the figure is a schematic diagram of the format of the field representing the Originator ID attribute.
- the fields used to carry the Originator ID attribute include flags, type code, length, and value fields.
- the value of the flags field may be 0x80
- the value of the type code field may be 0x09
- the value of the length field may be 0x04
- the value of the value field may be the initiator identifier.
- the first network device generates a second route advertisement message according to the first route advertisement message, where the second route advertisement message includes a second field, and the second field includes a device identifier.
- the second route advertisement message may be a BGP update message.
- the second route advertisement message includes a second field, where the second field may be a field representing the SoO attribute, and the value of the field representing the SoO attribute includes the foregoing device identifier. That is to say, the device identification included in the second field is the same as the device identification included in the first field.
- the first network device After receiving the first routing advertisement message, the first network device generates a second routing advertisement message according to the routing information included in the first routing advertisement message, where the second routing advertisement message includes routing information and second field.
- the network device 203 After receiving the BGP update message 1, the network device 203 generates a BGP update message 2 according to the routing information reaching the network device 201.
- the BGP update message 2 includes the routing information reaching the network device 201 and a field representing the SoO attribute.
- the value of the field representing the SoO attribute is the router ID of the network device 201 .
- the first network device may first generate a route corresponding to the routing information contained in the first network device, and then generate the second route advertisement message according to the route.
- the route may be a VPNv4 route, an Internet Protocol version 4 (Internet Protocol version 4, IPv4) route or an Internet Protocol version 6 (Internet Protocol version 6, IPv6) route.
- the network device 203 first generates a private network route to the network device 201 according to the BGP update message 1, then copies the private network route to the VPNv4 route, and generates a BGP update message 2 based on the VPNv4 route.
- the BGP update message 2 carries a field representing the SoO attribute, and the value of the field representing the SoO attribute is the router ID of the network device 201.
- the first network device after receiving the first route advertisement message, if the first network device includes the first field, delete the first field or set the value of the first field to 0, and A second field is added to obtain a second route advertisement message.
- the value of the second field is the same as the value of the first field, and both are the device identifier of the source device of the routing information in the first routing advertisement message.
- the network device 203 may delete the field representing the Originator ID attribute in the BGP update message 1, that is, delete the router ID of the network device 201, and add a field representing the SoO attribute, where the value of the field representing the SoO attribute includes the value of the network device 201 router ID, get BGP update message 2.
- the field representing the SoO attribute may be included in an autonomous system (autonomous system, AS) special extended community (specific extended community) attribute field, an Internet Protocol version 4 address (Internet Protocol version 4 address, IPv4 address) ) special extended community attribute field or opaque extended community attribute field.
- AS autonomous system
- AS special extended community
- IPv4 address Internet Protocol version 4 address
- FIG. 5 is a schematic diagram of the format of a field including an AS specific extended community attribute.
- the fields including the AS specific extended community attribute include the type field, sub-type, global administrator field, and local administrator field of the extended community attribute.
- the value of the type field of the extended community attribute is 0x00 or 0x40, which is used to indicate that the extended community attribute is an AS specific extended community attribute.
- the value of the sub-type field may be used to indicate that one of the subtypes of the attribute is a SoO attribute.
- the above device identifiers can be all carried in the global administrator field, or part of them can be carried in the global administrator field, and the other part can be carried in the local administrator field.
- the fields including the IPv4 address specific extended community attribute include the type field, sub-type, global administrator field and its continuous (cont.) field (the cont. field is optional) of the extended community attribute, and the local administrator field .
- the value of the type field of the extended community attribute is 0x01 or 0x41, which is used to indicate that the extended community attribute is an IPv4 address specific extended community attribute.
- the value of the sub-type field may be used to indicate that one of the subtypes of the attribute is a SoO attribute.
- the above device identifiers can be all carried in the global administrator field, or part of them can be carried in the global administrator field, and the other part can be carried in the local administrator field.
- the figure is a schematic diagram of the format of the field including the opaque extended community attribute.
- the fields including the opaque extended community attribute include the type field, sub-type, value field and continuous (cont.) field of the extended community attribute (the cont. field is an optional field).
- the value of the type field of the extended community attribute is 0x03 or 0x43, which is used to indicate that the extended community attribute is the opaque extended community attribute.
- the value of the sub-type field may be used to indicate that one of the subtypes of the attribute is a SoO attribute.
- the above device identifier can be carried in the value field.
- S103 The first network device sends the second route advertisement message to the second network device.
- the first route advertisement message may come from a route reflector.
- the second network device may be, for example, any one of the network devices 205 or 206 in FIG. 2 , that is, the second network device may be a PE device.
- S104 The second network device receives the second route advertisement message.
- the second network device determines whether the value of the second field in the second route advertisement message is the device identifier of the second network device, and if so, confirms that a routing loop occurs, and executes S106; if not, executes S107.
- the second network device determines that the value of the second field in the second routing advertisement message is the device identifier of the second network device, a routing loop occurs; if the second field in the second routing advertisement message is If the value of is not the device identifier of the second network device, it means that there is no routing loop.
- the second network device In response to determining that a routing loop occurs, the second network device discards the second routing advertisement message, or invalidates the forwarding information obtained according to the second routing advertisement message or lowers the priority of the forwarding information .
- the second network device may directly discard the second route advertisement message.
- the second network device may set the forwarding information to be invalid or reduce the validity of the forwarding information.
- the purpose of the priority is not to forward the service packet according to the forwarding information, so as to prevent the service packet from entering the forwarding loop.
- the second network device sends a second route advertisement message.
- the second network device may send a second route advertisement message to the next-hop device.
- the network device 205 when the network device 202 is a route reflector, when the network device 205 receives the BGP update message 2 from the network device 203, the value of the field representing the SoO attribute in the BGP update message 2 is the network device 201 The router ID of the network device 205 is not the router ID of the network device 205, so the network device 205 confirms that no routing loop occurs. Then, the network device 205 can generate a BGP update message 3 according to the BGP update message 2, the BGP update message 3 does not include a field representing the SoO attribute, and sends the BGP update message 3 to the network device 202 based on eBGP.
- the network device 202 Since the network device 202 is a route reflector, the network device 202 adds a field representing the Originator ID attribute in the BGP update message 3, and the value of the field is the router ID of the network device 205, obtains the BGP update message 4, and sends it to the network Device 203 sends the BGP update message 4. After receiving the BGP update message 4, the network device 203 generates a BGP update message 5 according to the BGP update message 4, and sends the BGP update message 5 to the network device 205. Wherein, the BGP update message 5 includes a value representing the SoO attribute, and the value representing the SoO attribute is the router ID of the network device 205.
- the network device 205 can discard the BGP update message 5 or use the BGP update message 5 according to the BGP update message 5.
- the obtained forwarding information is invalidated or the priority of the forwarding information is reduced, thereby avoiding the formation of a routing loop of network device 205 - network device 204 - network device 203 - network device 202 - network device 205 and service packets in the routing loop.
- a forwarding loop is formed in the road.
- a certain number of routing loops may be allowed to occur on the second network device. That is, when the second network device determines that the number of occurrences of routing loops exceeds a certain threshold, it discards the second routing advertisement message, or invalidates or lowers the priority of the forwarding information obtained according to the second routing advertisement message.
- the second network device may use a counter to count the number of occurrences of routing loops, that is, increment the value of the counter by 1 every time a routing loop occurs. When the value of the counter reaches a specific threshold, discard the routing advertisement message when the counter reaches the specific threshold, or invalidate the forwarding information obtained according to the routing advertisement message or reduce the priority of the forwarding information.
- the first network device may take the route as a unit to count the number of times that a routing loop occurs on the route. For example, the network device 205 counts the number of times a routing loop occurs on the route to the network device 201 . If the value of the counter reaches a certain threshold, the most recently received route advertisement message corresponding to the route to the network device 201 is discarded, or the forwarding information corresponding to the route advertisement message is invalidated or the priority of the forwarding information is reduced.
- the first network device may count the times of occurrence of routing loops in units of forwarding information. For example, the network device 205 counts the number of times a routing loop occurs in a certain forwarding information of a route to the network device 201 . If the value of the counter reaches a certain threshold, discard the most recently received route advertisement message corresponding to the forwarding information, or invalidate the forwarding information or reduce the priority of the forwarding information.
- the first network device in the case that the first route advertisement message cannot reach the second network device due to some reasons (for example, across networks), the first network device generates a route advertisement message that can be sent to the second network device according to the first route advertisement message.
- the second route advertisement message wherein the second field of the second route advertisement message carries the value of the first field in the first route advertisement message, so that the second network device can judge whether the value of the second field is its own device identification. Check whether a routing loop occurs, so as to detect routing loops and improve the reliability of service packet transmission.
- FIG. 8 is a schematic flowchart of the route advertisement and route loop detection method. The method specifically includes the following steps:
- the network device 201 sends a BGP update message 1 to the network device 202 based on eBGP, where the BGP update message 1 carries the routing information of the network device 201.
- the network device 202 After receiving the BGP update message 1, the network device 202 adds a field representing the Originator ID attribute in the BGP update message 1 to obtain a BGP update message 2, wherein the value of the field representing the Originator ID attribute is the value of the network device 201 router ID.
- the network device 202 is a route reflector.
- the network device 202 sends a BGP update message 2 to the network device 203 based on eBGP.
- the network device 203 receives the BGP update message 2, generates the forwarding information 1 of the private network route corresponding to the routing information of the network device 201, copies the forwarding information 1 of the private network route into the VPNv4 routing table, and according to the VPNv4 routing table
- the forwarding information 1' corresponding to the routing information of the network device 201 in the BGP update message 3 includes a field representing the SoO attribute, and the value of the field representing the SoO attribute is the router ID of the network device 201.
- the forwarding information 1 of the private network route reaching the network device 201 may include an Originator ID attribute, and the value of the Originator ID attribute includes the router ID of the network device 201.
- the forwarding information copied into the VPNv4 routing table may also include the router ID of the network device 201 .
- the network device 203 sends a BGP update message 3 to the network device 204 based on iBGP.
- the network device 203 and the network device 204 may be BGP neighbors of each other.
- the network device 204 After receiving the BGP update message 3, the network device 204 sends the BGP update message 3 to the network device 205 based on iBGP.
- the network device 205 After receiving the BGP update message 3, the network device 205 determines whether the value of the SoO attribute in the BGP update message 3 is its own router ID.
- the judgment result of the network device 205 is No, that is, no routing loop occurs.
- the network device 205 Based on the judgment result being No, the network device 205 generates forwarding information 2 of the VPNv4 route corresponding to the routing information of the network device 201 carried in the BGP update message 3, and copies the forwarding information 2 of the VPNv4 route to the private network In the routing table, and according to the forwarding information 2' corresponding to the routing information of the network device 201 in the private network routing table, a BGP update message 4 is generated, and the BGP update message 4 includes the routing information of the network device 201.
- the network device 205 sends a BGP update message 4 to the network device 202 based on eBGP.
- the network device 202 After receiving the BGP update message 4, the network device 202 adds a field representing the Originator ID attribute in the BGP update message 4 to obtain a BGP update message 5, wherein the value of the field representing the Originator ID attribute is the value of the network device 205 router ID.
- the network device 202 sends a BGP update message 5 to the network device 203 based on eBGP.
- the network device 203 After receiving the BGP update message 5, the network device 203 generates a BGP update message 6 according to the BGP update message 5, and the value of the SoO attribute in the BGP update message 6 is the router ID of the network device 205.
- the network device 203 can replace the router ID of the network device 201 in the forwarding information 1 of the private network route reaching the network device 201 and the forwarding information 1' of the VPNv4 routing table with the network device 201.
- the router ID of the device 205 can generate the BGP update message 6 based on the updated forwarding information 1' of the VPNv4 routing table.
- the network device 203 sends a BGP update message 6 to the network device 204 based on iBGP.
- the network device 204 After receiving the BGP update message 6, the network device 204 sends the BGP update message 6 to the network device 205 based on iBGP.
- the judgment result of the network device 204 is yes.
- the network device 205 can confirm that the BGP update message sent by itself has returned to itself. The update message 5 is discarded, so that the message will not be transmitted back and forth along the network device 203 - network device 202 - network device 205 - network device 204 - network device 203 to ensure the reliability of transmission.
- the network device 205 may not discard the BGP update message 5, but continue to send the network Device 202 sends the BGP update message 5 and sets the value of the counter to 1.
- the steps performed by the network device 202, the network device 203 and the network device 204 are similar to S210-S214, and are not repeated here until the BGP update message 5 reaches the network device 205 again.
- the network device 205 determines that the value of the SoO attribute carried in the BGP update message 5 is the router ID of the network device 205, and sets the value of the counter to 2.
- the network device 205 confirms that the value of the counter reaches a certain threshold, then discards the BGP update message 5.
- the network device 205 first determines whether the value of the SoO attribute field is its own router ID, and if so, generates forwarding information of the route corresponding to the routing information of the network device 201.
- the network device 205 may also generate the forwarding information first, and then determine whether the value of the SoO attribute field is its own router ID. When the determination result is yes, the network device 205 may invalidate the forwarding information or lower the priority of the forwarding information to avoid routing loops.
- FIG. 9 is a flowchart of another method for route advertisement and route loop detection provided by an embodiment of the present application.
- This method can be applied to the scenario of network architecture without route reflector. See, for example, Figure 10, which is a schematic diagram of a network architecture without route reflectors.
- the network architecture includes a network device 301, a network device 302, a network device 303 and a network device 304, the network device 301 is connected to the network device 302, the network device 302 is connected to the network device 303, the network device 303 is connected to the network device 304, and the network device 304 Connect to the network device 302 .
- the network device 301, the network device 302, the network device 303, and the network device 304 may be physical devices such as routers, switches, and servers with routing functions, or may be virtual devices with routing or switch functions.
- the route advertisement and route loop detection method shown in FIG. 9 includes the following steps:
- a first network device generates a first route advertisement message, where the first route advertisement message includes a field representing the SoO attribute, where the field representing the SoO attribute carries the identifier of the first network device.
- the first network device may be, for example, the network device 302 in FIG. 10 .
- the first network device may be a PE device or a CE device, which is not specifically limited in this application.
- the first routing advertisement message generated by the first network device includes routing information, and the routing information may be routing information of the first network device or routing information of other devices.
- the first route advertisement message may be a BGP update message.
- the first route advertisement message may also include a field representing the SoO attribute, and the value of the field representing the SoO attribute includes the identifier of the first network device.
- the identifier of the first network device may be, for example, the router ID of the first network device or the serial number of the first network device in the network, etc., which is not specifically limited in this embodiment of the present application.
- the first network device may acquire the second route advertisement message, and add a field representing the SoO attribute to the second route advertisement message to obtain the first route advertisement message.
- the format of the field representing the SoO attribute may refer to the above, which will not be repeated here.
- the network device 302 generates a BGP update message, the BGP update message includes the routing information of the network device 302 and a field representing the SoO attribute, and the value of the field representing the SoO attribute is the router ID of the network device 302.
- the network device 302 receives a BGP update message from the network device 301, where the BGP update message carries the routing information of the network device 301.
- the network device 302 may add a field representing the SoO attribute in the BGP update message, and the value of the field representing the SoO attribute is the router ID of the network device 302.
- S302 The first network device sends the first route advertisement message to the second network device.
- the second network device is a next-hop network device of the first network device, which may specifically be a PE device, a P device, or a CE device, such as the network device 303 in FIG. 10 .
- This embodiment of the present application does not Make specific restrictions.
- the first network device receives a third route advertisement message, where the third route advertisement message includes a field representing the SoO attribute.
- the first network device receives the third route advertisement message, and the third route advertisement message and the first route advertisement message may be the same route advertisement message, or may be different route advertisement messages.
- the first network device confirms that the value of the field representing the SoO attribute in the third route advertisement message is the identifier of the first network device, and the first network device determines that a routing loop occurs.
- the first network device When the first network device confirms that the value of the field representing the SoO attribute in the received third routing advertisement message is the identifier of the first network device, it means that the routing information in the third routing advertisement message is the one advertised by the first network device. routing information so that the first network device can determine that a routing loop has occurred.
- the network device 303 sends the received BGP update message from the network device 302 to the network device 304, and the network device 304 sends the BGP update message to the network device 302.
- the network device 302 receives the BGP update message, it is judged that the value of the field representing the SoO attribute in the BGP update message is the router ID of the network device 302, then it is confirmed that a routing loop occurs, that is, the BGP update that the network device 302 once sent. The message came back to the network device.
- the first network device In response to determining that a routing loop occurs, the first network device discards the third routing advertisement message, or invalidates the forwarding information obtained according to the third routing advertisement message or reduces the validity of the forwarding information priority.
- the first network device may have two possible processing modes:
- the second network device may directly discard the third routing advertisement message.
- the first network device may set the forwarding information to be invalid or reduce the validity of the forwarding information.
- the purpose of the priority is not to forward the packet according to the forwarding information, so as to prevent the packet from entering the forwarding loop.
- the network device 302 can directly discard the BGP update message, or generate the BGP update message according to the routing information of the network device 301 in the BGP update message.
- the forwarding information of the route is invalid or the priority of the forwarding information is lowered to prevent the packet from entering the forwarding loop.
- a certain number of routing loops may be allowed to occur on the first network device. That is, when the first network device determines that the number of occurrences of routing loops exceeds a certain threshold, it discards the third routing advertisement message, or invalidates or lowers the priority of the forwarding information obtained according to the third routing advertisement message.
- the first network device may use a counter to count the number of occurrences of routing loops, that is, increment the value of the counter by 1 every time a routing loop occurs. When the value of the counter reaches a specific threshold, discard the routing advertisement message when the counter reaches the specific threshold, or invalidate the forwarding information obtained according to the routing advertisement message or reduce the priority of the forwarding information.
- the first network device carries a field representing the SoO attribute in the published routing advertisement message, and the value of the field is the identifier of the first network device, so that the first network device can determine whether the received routing advertisement message includes its own.
- the identifier is used to determine whether a routing loop occurs, so as to detect routing loops and improve the reliability of service packet transmission.
- FIG. 9 is described in detail below with reference to FIG. 10 and FIG. 11 , taking an application scenario as an example.
- 11 is a schematic flowchart of the route advertisement and route loop detection method. The method specifically includes the following steps:
- the network device 301 sends a BGP update message 1 to the network device 302, where the BGP update message 1 includes the routing information of the network device 301.
- the network device 301 is a CE device
- the network device 302 is a PE device
- the first route advertisement message includes routing information to reach the network device 301
- the first route advertisement message includes the route information reaching the connecting network device 301 routing information of the user network.
- the network device 302 After receiving the BGP update message 1, the network device 302 generates forwarding information 1 of the route corresponding to the routing information of the network device 301, and adds a field representing the SoO attribute in the BGP update message 1 to obtain the BGP update message 2, wherein The value of the field representing the SoO attribute is the router ID of the network device 302 .
- the next hop of the forwarding information 1 of the route corresponding to the routing information of the network device 301 is the network device 301 .
- the network device 302 sends the BGP update message 2 to the network device 303.
- the network device 302 determines whether the value of the field representing the SoO attribute in the BGP update message 2 is the router ID of the network device 302.
- the network device 302 determines that the value in the SoO attribute in the BGP update message 2 is the router ID of the network device 302, it means that the BGP update message 2 published by the network device 302 has returned to itself, so in order to avoid the routing loop problem, The network device 302 discards the BGP update message 2, and does not generate corresponding forwarding information according to the BGP update message 2, so that the message will not be cyclically transmitted between the network device 303-network device 302-network device 303, ensuring reliable transmission. sex.
- the network device 302 may not discard the BGP update message 2, but continue to send the network Device 303 sends the BGP update message 2 and sets the value of the counter to 1.
- the steps performed by the network device 303 and the network device 304 are similar to S404-S405, which will not be repeated here until the BGP update message 2 reaches the network device 302 again.
- the network device 302 judges that the value of the SoO attribute carried in the BGP update message 5 is the router ID of the network device 302, and sets the value of the counter to 2.
- the network device 302 confirms that the value of the counter reaches a certain threshold, then discards the BGP update message 2.
- the network device 302 after receiving the BGP update message 2, the network device 302 first judges whether the value of the field representing the SoO attribute is its own router ID, and determines whether to generate corresponding forwarding information based on the judgment result. In other examples, the network device 302 may first generate forwarding information 2 corresponding to the route according to the routing information of the network device 301 in the BGP update message 2, and the next hop of the forwarding information 2 is the network device 304, and then determine the BGP update message In 2, whether the value of the field representing the SoO attribute is its own router ID.
- the network device 302 can set the forwarding information 2 to be invalid, and only keep the forwarding information 1; Priority, so that the network device 302 forwards the packet to the network device 301 through the forwarding information 1, so as to avoid the packet from forming a forwarding loop between the network device 302-network device 303-network device 304-network device 302.
- FIG. 12 shows a possible schematic diagram of the structure of the network device involved in the above embodiment.
- the network device 1200 may implement the function of the first network device in the example shown in FIG. 3 , or the network device 1200 may The function of the network device 203 in the embodiment shown in 8.
- the network device 1200 includes: a receiving unit 1201 , a processing unit 1202 and a sending unit 1203 . These units may perform the corresponding functions of the first network device in the above method example.
- a processing unit 1202 configured to support the network device 1200 to execute S102 in FIG. 3;
- a sending unit 1203, configured to support the network device 1200 to execute S103 in FIG.
- the receiving unit 1201 is configured to receive a first route advertisement message, where the first field of the first route advertisement message includes a device identifier, and the routing information included in the first route advertisement message comes from the corresponding device identifier. device; the processing unit 1202 is configured to generate a second routing advertisement message according to the first routing advertisement message, the second field of the second routing advertisement message includes the device identifier, the first field and the second routing advertisement message The fields are different fields; the sending unit 1203 is configured to send the second route advertisement message to the second network device.
- the specific execution process please refer to the detailed description of the corresponding steps in the embodiment shown in FIG. 3 or FIG. 8 , which will not be repeated here.
- each functional unit in the embodiments of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
- the acquiring unit and the processing unit may be the same unit or different units.
- the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
- FIG. 13 shows a possible schematic diagram of the structure of the network device involved in the above embodiment.
- the network device 1300 may implement the function of the second network device in the example shown in FIG. 3 , or the network device 1300 may The function of the network device 205 in the embodiment shown in 8.
- the network device 1300 includes: a receiving unit 1301 and a processing unit 1302 . These units may perform the corresponding functions of the second network device in the above method examples.
- the receiving unit 1301 is configured to receive a second route advertisement message from the first network device, where the second route advertisement message includes a field indicating the SoO attribute of the origin of the route; the processing unit 1302 is configured to confirm the indication When the value of the field of the route origin SoO attribute is the identifier of the second network device, it is determined that a routing loop occurs.
- the specific execution process please refer to the detailed description of the corresponding steps in the embodiment shown in FIG. 3 or FIG. 8 , which will not be repeated here.
- FIG. 14 shows a possible schematic diagram of the structure of the network device involved in the above embodiment.
- the network device 1400 may implement the function of the first network device in the example shown in FIG. 9 , or the network device 1400 may implement the function of the first network device in the example shown in The function of the network device 302 in the embodiment shown in 11.
- the network device 1400 includes: a processing unit 1401 and a sending unit 1402 . These units may perform the corresponding functions of the second network device in the above method examples.
- the processing unit 1401 is configured to generate a first route advertisement message, where the first route advertisement message includes a field representing the SoO attribute of the origin of the route, and the field representing the SoO attribute carries the identifier of the first network device;
- the sending unit 1402 is configured to send the first route advertisement message to the second network device.
- an embodiment of the present invention provides a network system 1500, where the system 1500 is used to implement the methods for route advertisement and route loop detection in the foregoing method embodiments.
- the system 1500 includes a network device 1501 and a network device 1502 .
- the network device 1501 can implement the functions of the first network device in the embodiment shown in FIG. 3 , the network device 203 in the embodiment shown in FIG. 8 , or the network device 1300 in FIG. 13 , and the network device 1502 can implement the functions shown in FIG. 3 . Functions of the second network device in the embodiment, the network device 205 in the embodiment shown in FIG. 8 or the network device 1400 in FIG. 14 .
- the network device 1501 may implement the functions of the first network device in the embodiment shown in FIG. 9 , the network device 302 in the embodiment shown in FIG. 11 , or the network device 1400 in FIG. 14 , and the network device 1502 may implement the functions shown in FIG. 9 .
- the functions of the second network device in the embodiment shown in FIG. 11 and the network device 303 in the embodiment shown in FIG. 11 are shown.
- For the specific execution process please refer to the detailed description of the corresponding steps in the embodiment shown in FIG. 3 or FIG. 8 or FIG. 9 or FIG. 33 , which will not be repeated here.
- FIG. 16 is a schematic structural diagram of a device 1600 provided by an embodiment of the present application.
- the network device 1200 in FIG. 12 , the network device 1300 in FIG. 13 , and the network device 1400 in FIG. 14 may be implemented by the devices shown in FIG. 16 .
- the device 1600 includes at least one processor 1601 , a communication bus 1602 and at least one network interface 1604 , and optionally, the device 1600 may further include a memory 1603 .
- the processor 1601 may be a general-purpose central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits (integrated circuits) for controlling the execution of programs in the present application. , IC).
- the processor may be configured to process the packet to implement the route advertisement and route loop detection methods provided in the embodiments of the present application.
- the processor may be configured to receive a first route advertisement message, and generate a second route advertisement message according to the first route advertisement message, For sending the second route advertisement message to the second network device, the specific function implementation may refer to the processing part corresponding to the first network device in the method embodiment.
- the second network device in FIG. 3 is implemented by the device shown in FIG.
- the processor may be configured to receive a second route advertisement message from the first network device, where the second route advertisement message includes The field representing the SoO attribute of the origin of the route; confirming that the value of the field representing the SoO property of the origin of the route is the identifier of the second network device, and it is determined that a routing loop occurs. processing part.
- the first network device in FIG. 9 is implemented by the device shown in FIG.
- the processor may generate a first route advertisement message, where the first route advertisement message includes a field representing the SoO attribute of the origin of the route, The field representing the SoO attribute carries the identifier of the first network device; the first route advertisement message is sent to the second network device, and the specific function implementation can refer to the processing part of the second network device in the method embodiment
- Communication bus 1602 is used to transfer information between processor 1601 , network interface 1604 and memory 1603 .
- the memory 1603 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, and the memory 1603 can also be a random access memory (RAM) or can store information and other types of dynamic storage devices for instructions, also can be compact disc read-only Memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray optical disks, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, without limitation.
- the memory 1603 can exist independently and is connected to the processor 1601 through the communication bus 1602 .
- the memory 1603 may also be integrated with the processor 1601.
- the memory 1603 is used to store program codes or instructions for executing the solutions of the present application, and the execution is controlled by the processor 1601 .
- the processor 1601 is used to execute program codes or instructions stored in the memory 1603 .
- One or more software modules may be included in the program code.
- the processor 1601 may also store program codes or instructions for executing the solutions of the present application, in which case the processor 1601 does not need to read the program codes or instructions from the memory 1603.
- the network interface 1604 may be a device such as a transceiver for communicating with other devices or a communication network, which may be Ethernet, a radio access network (RAN), or a wireless local area network (WLAN), or the like.
- the network interface 1604 may be configured to receive packets sent by other nodes in the segment routing network, and may also send packets to other nodes in the segment routing network.
- the network interface 1604 may be an ethernet (ethernet) interface, a fast ethernet (FE) interface, or a gigabit ethernet (GE) interface, and the like.
- the device 1600 may include multiple processors, such as the processor 1601 and the processor 405 shown in FIG. 16 .
- processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
- a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
- FIG. 17 is a schematic structural diagram of a device 1700 provided by an embodiment of the present application.
- the first network device and the second network device in FIG. 3 and the first network device in FIG. 9 may be implemented by the devices shown in FIG. 17 .
- the device 1700 includes a main control board and one or more interface boards.
- the main control board communicates with the interface board.
- the main control board is also called the main processing unit (MPU) or the route processor card (route processor card).
- the main control board includes a CPU and memory.
- the main control board is responsible for the control and management of various components in the device 1700, including Route calculation, device management and maintenance functions.
- Interface boards also known as line processing units (LPUs) or line cards, are used to receive and send messages.
- the communication between the main control board and the interface board or between the interface board and the interface board is through a bus.
- the interface boards communicate through a switch fabric board.
- the device 1700 also includes a switch fabric board.
- the switch fabric board is communicatively connected to the main control board and the interface board.
- the switch fabric board is used for forwarding the interface board.
- the data between them, the switch fabric board can also be called a switch fabric unit (SFU).
- the interface board includes a CPU, a memory, a forwarding engine, and an interface card (IC), wherein the interface card may include one or more network interfaces.
- the network interface can be an Ethernet interface, an FE interface, or a GE interface.
- the CPU is connected in communication with the memory, the forwarding engine and the interface card, respectively.
- the memory is used to store the forwarding table.
- the forwarding engine is used to forward the received packet based on the forwarding table stored in the memory. If the destination address of the received packet is the IP address of the device 1700, the packet is sent to the CPU of the main control board or interface board for processing. Processing; if the destination address of the received message is not the IP address of the device 1700, then look up the forwarding table according to the destination, if the next hop and outbound interface corresponding to the destination address are found from the forwarding table, the message Forwarding to the outbound interface corresponding to the destination address.
- the forwarding engine may be a network processor (NP).
- the interface card also known as the daughter card, can be installed on the interface board and is responsible for converting photoelectric signals into data frames, and after checking the validity of the data frames, forwards them to the forwarding engine for processing or the interface board CPU.
- the CPU can also perform the function of a forwarding engine, such as implementing soft forwarding based on a general-purpose CPU, so that a forwarding engine is not required in the interface board.
- the forwarding engine may be implemented by an ASIC or a field programmable gate array (FPGA).
- the memory that stores the forwarding table may also be integrated into the forwarding engine as part of the forwarding engine.
- An embodiment of the present application further provides a chip system, including: a processor, where the processor is coupled with a memory, the memory is used to store a program or an instruction, and when the program or instruction is executed by the processor, the The chip system implements the method for the first network device or the second network device in the embodiment shown in FIG. 3 and the method for the first network device in the embodiment shown in FIG. 9 .
- the number of processors in the chip system may be one or more.
- the processor can be implemented by hardware or by software.
- the processor may be a logic circuit, an integrated circuit, or the like.
- the processor may be a general-purpose processor implemented by reading software codes stored in memory.
- there may also be one or more memories in the chip system.
- the memory may be integrated with the processor, or may be provided separately from the processor, which is not limited in this application.
- the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip, or can be provided on different chips.
- the setting method of the processor is not particularly limited.
- the chip system may be an FPGA, an ASIC, a system on chip (system on chip, SoC), a CPU, an NP, or a digital signal processing circuit (digital signal processor, DSP), can also be a microcontroller (micro controller unit, MCU), can also be a programmable logic device (programmable logic device, PLD) or other integrated chips.
- SoC system on chip
- DSP digital signal processing circuit
- MCU microcontroller
- PLD programmable logic device
- each step in the above method embodiments may be implemented by a hardware integrated logic circuit in a processor or an instruction in the form of software.
- the method steps disclosed in conjunction with the embodiments of the present application may be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
- Embodiments of the present application also provide a computer-readable storage medium, including instructions, which, when executed on a computer, cause the computer to execute the methods in the foregoing embodiments.
- At least one item (piece) refers to one or more, and “multiple” refers to two or more.
- At least one item(s) below” or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s).
- at least one item (a) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple .
- “A and/or B” is considered to include A alone, B alone, and A+B.
- the disclosed system, apparatus and method may be implemented in other manners.
- the apparatus embodiments described above are only illustrative.
- the division of the units is only a logical module division.
- multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
- the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be acquired according to actual needs to achieve the purpose of the solution in this embodiment.
- each module unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
- the above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of software module units.
- the integrated unit if implemented in the form of a software module unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium.
- the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .
- the functions described in the present invention may be implemented in hardware, software, firmware, or any combination thereof.
- the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
- Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another.
- a storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请实施例公开了一种路由通告的方法、路由环路的检测方法及设备,用于解决网络中的路由环路问题,提高业务报文传输的可靠性。其中,路由通告方法包括如下步骤:第一网络设备接收第一路由通告消息,所述第一路由通告消息的第一字段包括设备标识,所述第一路由通告消息包含的路由信息来自所述设备标识对应的设备;所述第一网络设备根据所述第一路由通告消息生成第二路由通告消息,所述第二路由通告消息的第二字段包括所述设备标识,所述第一字段和所述第二字段为不同字段;所述第一网络设备向第二网络设备发送所述第二路由通告消息。
Description
本申请要求于2020年10月28日提交国家知识产权局、申请号为202011176874.4、发明名称为“一种通过BGP SoO属性实现环路检测的方法”的中国专利申请的优先权,以及要求于2021年1月13日提交国家知识产权局、申请号为202110045032.3、发明名称为“一种路由通告的方法、路由环路的检测方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及通信领域,尤其涉及一种路由通告的方法、路由环路的检测方法及设备。
为了实现报文在网络设备之间的传输,网络设备之间需要相互发送用于路由通告的路由通告消息。例如,网络设备A可以向网络设备B发送携带有网络设备A的路由信息的路由通告消息。网络设备B在接收到来自网络设备A的路由通告消息之后,可以根据该路由通告消息中的路由信息生成对应网络设备A的路由信息的路由,以根据该路由将报文传输给网络设备A。并且,网络设备B还可以将该路由通告消息发送给其他网络设备(例如网络设备C),以使其他网络设备也能够将报文发给网络设备B。
目前,在一些场景中,网络设备之间在传输路由通告消息的过程中可能会出现路由环路的问题。路由环路会造成报文在多个网络设备之间循环往复而无法到达目的设备,从而影响正常的业务传输需求。
发明内容
本申请实施例提供了一种路由通告的方法、路由环路的检测方法及设备,用于解决网络中的路由环路问题,提高业务报文传输的可靠性。
第一方面,提供了一种路由通告的方法,该方法应用于第一网络设备,具体包括如下步骤:第一网络设备接收第一路由通告消息,第一路由通告消息包括路由信息和第一字段。所述第一路由通告消息的第一字段包括设备标识,用于指示所述第一路由通告消息包含的路由信息来自所述设备标识对应的设备。所述第一网络设备根据所述第一路由通告消息生成第二路由通告消息,所述第二路由通告消息包括第二字段,该第二字段包括所述设备标识。所述第一网络设备向第二网络设备发送所述第二路由通告消息。其中,第一路由通告消息和第二路由通告消息可以为边界网关协议(Border Gateway Protocol,BGP)更新(update)消息。所述第一字段和所述第二字段为BGP update消息的不同字段。例如,第一字段为表示发起者标识(originator identifier,Originator ID)属性的字段,第二字段为表示路由起源(source of origin,SoO)属性的字段。在第一路由通告消息因为某些原因(例如跨网络)而无法到达第二网络设备的情况下,第一网络设备根据第一路由通告消息生成能够发往第二网络设备的第二路由通告消息,其中第二路由通告消息的第二字段携带第一 路由通告消息中第一字段的值,以使第二网络设备能够根据第二字段的值是否为自己的设备标识而判断是否出现路由环路,从而实现对路由环路的检测,提高业务报文传输的可靠性。
所述第一网络设备根据所述第一路由通告消息生成第二路由通告消息可以有如下三种可能的实现方式:
实现方式一:所述第一网络设备根据所述第一路由通告消息包含的所述路由信息生成所述第二路由通告消息,所述第二路由通告消息包含所述路由信息。
实现方式二:首先,所述第一网络设备根据所述第一路由通告消息包括的所述路由信息生成对应的路由,然后,所述第一网络设备根据所述路由生成所述第二路由通告消息。
可选的,实现方式二可以具体为:所述第一网络设备根据所述第一路由通告消息包括的所述路由信息生成对应的私网路由,将所述私网路由复制到虚拟专用网络第四版(virtual private network version 4,VPNv4)路由中,并根据所述VPNv4路由生成所述第二路由通告消息,实现跨网络传递设备标识。
实现方式三:所述第一网络设备删除所述第一路由通告消息的所述第一字段,并添加所述第二字段,得到所述第二路由通告消息。
上述三种可能的实现方式并不构成对本申请实施例的限定,本领域技术人员可以根据实际情况自行设计。
作为一种可能的设计,所述第一网络设备为第一运营商边缘(Provider Edge,PE)设备。所述第一网络设备接收第一路由通告消息可以是接收路由反射器(router reflector,RR发送的所述第一路由通告消息。RR可以在第一路由通告消息中携带上述表示Originator ID属性的字段,以在该字段中携带设备标识。可选的,所述RR为用户边缘(Customer Edge,CE)设备。
如前文所提,所述第二字段可以为表示路由起源SoO属性的字段。作为一种可能的设计,该表示SoO属性的字段可以包括所述BGP update消息的自治系统(autonomous system,AS)特殊扩展团体(specific extended community)属性字段、第四版互联网协议地址(Internet Protocol version 4 address,IPv4 address)特殊扩展团体(specific extended community)属性字段或不透明扩展团体(opaque extended community)属性字段。
具体的,设备标识可以携带在AS specific extended community属性的全球管理者(global administrator)字段或IPv4 address specific extended community属性的global administrator字段。若设备标识较长,那么可选的,该设备标识可以一部分携带在上述global administrator字段中,另外一部分携带在所述AS specific extended community的本地管理者(local administrator)字段或所述IPv4 address specific extended community的local administrator字段。
或者,设备标识可以携带在包括opaque extended community属性中的值(value)字段。
第二方面,提供了一种路由环路检测方法,该方法应用于第二网络设备,第二网络设备可以为PE设备。该方法包括如下步骤:第二网络设备接收来自第一网络设备的第二路由通告消息,所述第二路由通告消息包括表示SoO属性的字段。关于第二路由通告消息的描 述可以参见上文,此处不再赘述。当所述第二网络设备确认所述表示SoO属性的字段的值为所述第二网络设备的标识时,说明第二网络设备发布出去的路由信息又回到了该网络设备,因此,所述第二网络设备确定出现路由环路,实现对路由环路的检测。
作为一种可能的设计,所述方法还包括:响应于确定出现路由环路,所述第二网络设备可以直接丢弃所述第二路由通告消息,避免根据第二路由通告消息生成转发信息;或者,第二网络设备根据第二路由通告消息中的路由信息生成转发信息,然后,第二网络设备可以将该转发信息置为无效或设置为较低的优先级,以避免业务报文出现循环转发,保证业务报文传输的可靠性。其中,转发信息可以为转发表项。
作为一种可能的设计,可以允许第二网络设备出现一定次数的路由环路。具体的,所述方法还包括:在所述第二网络设备确定出现路由环路次数超过特定阈值时,所述第二网络设备丢弃所述第二路由通告消息,或者,将根据所述第二路由通告消息得到的转发信息置为无效或降低所述转发信息的优先级。其中,所述特定阈值为大于或等于1的整数。
作为一种可能的设计,所述方法还包括:所述第二网络设备接收来自所述第一网络设备的第一路由通告消息,所述第一路由通告消息包括路由信息和所述表示SoO属性的字段。当所述第二网络设备确认所述第一路由通告消息中所述表示SoO属性的字段的值不为所述第二网络设备的标识时,说明没有出现路由环路。当第二网络设备的下一跳为RR时,所述第二网络设备可以根据所述路由信息生成第三路由通告消息,所述第三路由通告消息包括第一路由通告消息中的路由信息,并且,所述第二网络设备可以向RR发送所述第三路由通告消息,实现路由信息的通告。关于SoO属性的字段的描述可以参见上文,此处不再赘述。
作为一种可能的设计,所述第二网络设备的标识为所述第二网络设备的路由器标识(router ID)或者在网络中的编号等,本申请实施例不做具体限定。
第三方面,提供了一种路由通告的方法,该方法应用于第一网络设备,第一网络设备可以是PE设备。具体的,所述方法包括:第一网络设备生成第一路由通告消息,第一路由通告消息可以是BGP update消息。所述第一路由通告消息包括路由信息和表示SoO属性的字段,该路由信息可以是第一网络设备的路由信息,也可以是其他网络设备的路由信息。所述表示SoO属性的字段携带所述第一网络设备的标识,第一网络设备的标识可以是第一网络设备的router ID。所述第一网络设备向下一跳网络设备,即第二网络设备,发送所述第一路由通告消息。当第一网络设备接收到第三路由通告消息,且所述第三路由通告消息包括的表示SoO属性的字段的值为所述第一网络设备的标识时,说明第一网络设备发布出去的路由信息又回到了该网络设备,所以可以确认出现路由环路,实现对路由环路的检测。
作为一种可能的设计,所述第一网络设备可以接收来自其他设备的第二路由通告消息,并在所述第二路由通告消息中添加所述表示SoO属性的字段,得到所述第一路由通告消息。
作为一种可能的设计,所述方法还包括:响应于确定出现路由环路,若第一网络设备未根据第三路由通告消息生成对应的转发信息,那么所述第一网络设备可以直接丢弃所述第三路由通告消息。若第一网络设备已根据第三路由通告消息生成对应的转发信息,那么,第一网络设备可以将根据所述第三路由通告消息得到的转发信息置为无效或降低所述转发 信息的优先级,以避免业务报文循环转发,保证业务报文传输的可靠性。
作为一种可能的设计,可以允许第一网络设备出现一定次数的路由环路。具体的,所述方法还包括:在所述第一网络设备确定出现路由环路次数超过特定阈值时,所述第一网络设备丢弃所述第三路由通告消息,或者,将根据所述第三路由通告消息得到的转发信息置为无效或降低所述转发信息的优先级。其中,所述特定阈值为大于或等于1的正整数。
作为一种可能的设计,表示SoO属性的字段包括AS specific extended community中的global administrator字段或IPv4 address specific extended community中的global administrator字段。
作为一种可能的设计,所述表示SoO属性的字段还包括所述AS specific extended community的local administrator字段或所述IPv4 address specific extended community的local administrator字段。
作为一种可能的设计,所述表示SoO属性的字段包括opaque extended community属性中的值value字段。
第四方面,提供了一种网络设备,应用于包括多个网络设备的网络系统,所述多个网络设备包括第一网络设备和第二网络设备,所述网络设备为所述第一网络设备,所述第一网络设备用于执行第一方面或第一方面的任意一种可能的设计中的方法。具体地,所述第一网络设备包括用于执行第一方面或第一方面的任意一种可能的设计中的方法的单元。或者,所述第一网络设备用于执行第三方面或第三方面的任意一种可能的设计中的方法。具体地,所述第一网络设备包括用于执行第三方面或第三方面的任意一种可能的设计中的方法的单元。
第五方面,提供了一种网络设备,其特征在于,应用于包括多个网络设备的网络系统,所述多个网络设备包括第一网络设备和第二网络设备,所述第二网络设备用于执行第二方面或第二方面的任意一种可能的设计中的方法。具体地,所述第二网络设备包括用于执行第二方面或第二方面的任意一种可能的设计中的方法的单元。
第六方面,提供了一种网络设备,应用于包括多个网络设备的网络系统,多个网络设备包括第一网络设备和第二网络设备,该网络设备为第一网络设备,该第一网络设备包括:处理器和网络接口。网络接口用于报文的接收和发送。处理器用于执行前述第一方面或第一方面的任意一种可能的设计中的方法;或,处理器用于执行前述第三方面或第三方面的任意一种可能的设计中的方法。
在一种可能的设计中,该第一网络设备还包括存储器,存储器可以用于存储指令或程序代码。处理器用于调用存储器中的指令或程序代码执行前述第一方面或第一方面的任意一种可能的设计中的方法;或,处理器用于调用存储器中的指令或程序代码执行前述第三方面或第三方面的任意一种可能的设计中的方法。
第七方面,提供了一种网络设备,应用于包括多个网络设备的网络系统,多个网络设备包括第一网络设备和第二网络设备,该网络设备为第二网络设备,该第二网络设备包括:处理器和网络接口。网络接口用于报文的接收和发送。处理器用于执行前述第二方面或第二方面的任意一种可能的设计中的方法。
在一种可能的设计中,该第二网络设备还包括存储器,存储器可以用于存储指令或程序代码。处理器用于调用存储器中的指令或程序代码执行前述第二方面或第二方面的任意一种可能的设计中的方法。
第八方面,提供了一种网络系统,其特征在于,所述网络系统包括如第四方面所述的第一网络设备和第五方面所述的第二网络设备。或者,包括如第六方面所述的第一网络设备和第七方面所述的第二网络设备。
第九方面,提供了一种计算机可读存储介质,包括指令、程序或代码,当其在计算机上执行时,使得计算机执行前述第一方面、第二方面、第三方面以及上述三个方面的任意一种可能的实现方式之一所述的方法。
第十方面,提供了一种包括计算机指令的计算机程序产品,当该计算机程序产品在网络设备上运行时,使得网络设备执行第一方面、第二方面、第三方面以及上述三个方面的任意一种可能的实现方式之一提供的方法。
第十一方面,提供了一种芯片,包括存储器和处理器。存储器用于存储指令或程序代码。处理器用于从存储器中调用并运行该指令或程序代码,以执行上述第一方面或第一方面的任意一种可能的设计中的方法;或,处理器执行第二方面或第二方面任意一种可能的设计中的方法;或,处理器执行第三方面或第三方面任意一种可能的设计中的方法。
第十二方面,提供了一种芯片,上述芯片包括处理器,但不包括存储器,处理器用于读取并执行所述芯片外的存储器中存储的指令或程序代码,当指令或程序代码被执行时,处理器执行第一方面或第一方面的任意一种可能的设计中的方法;或,处理器执行第二方面或第二方面任意一种可能的设计中的方法;或,处理器执行第三方面或第三方面任意一种可能的设计中的方法。
图1为本申请实施例提供的BGP网络架构示意图;
图2为本申请实施例提供的另一个BGP网络架构示意图;
图3为本申请实施例提供的路由通告和路由环路检测方法的流程示意图;
图4为本申请实施例提供的表示Originator ID属性的字段的格式示意图;
图5为本申请实施例提供的包括AS specific extended community属性的字段的格式示意图;
图6为本申请实施例提供的包括IPv4 address specific extended community属性的字段的格式示意图;
图7为本申请实施例提供的包括opaque extended community属性的字段的格式示意图;
图8为本申请实施例提供的跨网络域场景下路由通告和路由环路检测方法的流程示意图;
图9为本申请实施例提供的另外一种路由通告和路由环路检测方法的流程图;
图10为本申请实施例提供的没有路由反射器的网络架构的示意图;
图11为本申请实施例提供的路由通告和路由环路检测方法的流程示意图;
图12为本申请实施例提供的一种网络设备的结构示意图;
图13为本申请实施例提供的一种网络设备的结构示意图;
图14为本申请实施例提供的一种网络设备的结构示意图;
图15为本申请实施例提供的一种网络系统的结构示意图;
图16是本申请实施例提供的一种网络设备的结构示意图;
图17是本申请实施例提供的一种网络设备的结构示意图。
在介绍具体的技术方案之前,首先介绍一下本申请实施例涉及到的关键术语。
路由环路:是指路由通告消息由某个网络设备发布之后,经过一个或多个网络设备之后再次回到该网络设备的情况。
由于路由环路问题可能会造成业务中断,严重影响通信质量。目前已有一些技术手段能够解决该路由环路问题,其中一种技术手段应用于包括路由反射器(router reflector,RR)的网络架构中。
参见图1,该图为边界网关协议(Border Gateway Protocol,BGP)的网络架构示意图。该网络架构包括网络设备101、网络设备102、网络设备103、网络设备104和终端设备105。其中,终端设备105与网络设备101连接,网络设备101与网络设备102连接,网络设备102和网络设备103连接,网络设备103与网络设备104连接,网络设备104与网络设备101连接(需要说明的是,在本申请实施例中网络设备之间的连接可以是直接连接,也可以是间接连接)。其中,网络设备102和网络设备104均为路由反射器。
网络设备101生成到达终端设备105的路由的转发信息1,该转发信息1的下一跳为终端设备105,并且,网络设备101向网络设备102发送路由通告消息1,路由通告消息1中携带终端设备105的路由信息。由于网络设备102为路由反射器,则网络设备102在路由通告消息1中携带发起者标识(originator identifier,Originator ID)属性,从而得到路由通告消息2。其中,Originator ID属性的值为发起者标识,用于标识发起路由通告消息1的网络设备,对于图1而言即为网络设备101。也就是说,根据路由通告消息2可以知道该路由通告消息的发起者为网络设备101。然后,网络设备102向网络设备103发送该路由通告消息2,网络设备103在接收到该路由通告消息2之后,确认其中携带的发起者标识与网络设备103的标识不同,根据终端设备105的路由信息生成到达终端设备105的路由的转发信息,该转发信息的下一跳是网络设备102。并且,网络设备103向网络设备104发送该路由通告消息2。网络设备104确定路由通告消息2中已经携带了发起者标识,就不再增加新的发起者标识,继续复用已经携带的发起者标识,并直接向网络设备101发送该路由通告消息2。
由于网络设备101在发送路由通告消息1之前,就已经生成与终端设备105的路由信息对应的路由的转发信息1,该转发信息1的下一跳为终端设备105。若网络设备101在接收到路由通告消息2之后,生成到达终端设备105的路由的转发信息2,该转发信息2的下一跳为网络设备104,并且从转发信息1和转发信息2中选择转发信息2向外发布路由, 那么网络设备103在接收到目的设备为终端设备105的业务报文之后,该业务报文将进入到网络设备103-网络设备102-网络设备101-网络设备104-网络设备103的循环,而无法到达终端设备105,从而造成路由环路问题。
为了解决该问题,基于目前的方案,网络设备101确定该路由通告消息2中的发起者标识与自己的标识相同,则网络设备101将该路由通告消息2丢弃,即不生成到达终端设备105的下一跳为网络设备104的路由,以避免路由环路问题。
然而,上述方案不适用于网络架构中没有路由反射器的场景,或者虽然具有路由反射器但跨网络域的场景,即在跨网络域场景下,采用上述基于Originator ID的方案还是可能会出现路由环路的问题。下面结合一个例子具体介绍跨网络域场景下,基于Originator ID的方案可能会出现的路由环路问题。
参见图2,该图为基于BGP的另外一个网络架构示意图。
图2所示的网络架构包括网络设备201、网络设备202、网络设备203、网络设备204、网络设备205、网络设备206和网络设备207。其中,网络设备201与网络设备202连接,网络设备202分别与网络设备203及网络设备205连接,网络设备203通过网络设备204与网络设备205连接,网络设备203和网络设备205还均与网络设备206连接,网络设备206与网络设备207连接。
其中,网络设备201、网络设备202和网络设备207均为用户边缘(Customer Edge,CE)设备,网络设备202还为路由反射器。网络设备203、网络设备205和网络设备206均为运营商边缘(Provider Edge,PE)设备,网络设备204为运营商(Provider,P)设备。在一种可能的实现方式中,上述CE设备之间以及CE设备和PE设备之间通过外部边界网关协议(External Border Gateway Protocol,eBGP)传输路由通告消息,PE设备之间通过内部边界网关协议(Internal Border Gateway Protocol,iBGP)传输路由通告消息。
网络设备201生成并向网络设备202发送路由通告消息1,网络设备202在接收到该路由通告消息1之后,生成与该路由通告消息1中的路由信息(即到达网络设备201的路由信息)对应的路由(即到达网络设备201的路由)的转发信息1,该转发信息1的下一跳为网络设备201。并且,网络设备202基于其反射路由器的功能,在该路由通告消息1中携带Originator ID属性,得到路由通告消息2,其中,该Originator ID属性的值用于标识网络设备201。网络设备202向网络设备203发送路由通告消息2。由于网络设备203是PE设备,所以网络设备203在接收到路由通告消息2之后,生成对应网络设备201的路由信息的私网路由,并将该私网路由复制到VPNv4路由中。在复制之后,网络设备203根据VPNv4路由生成路由通告消息3,并发往VPNv4网络的网络设备204。需要注意的是,网络设备203向网络设备204发送的路由通告消息3中包括网络设备201的路由信息,但不包括Originator ID属性。因为目前的协议规定,Originator ID属性只能是路由反射器在相同的网络内反射路由时才添加Originator ID属性,也就是说,在私网内部或者VPNv4网络内部传递才能添加Originator ID属性,私网和VPNv4网络之间无法传递Originator ID属性。
当网络设备205接收到网络设备204发送的路由通告消息3之后,根据路由通告消息 3生成到达网络设备201的VPNv4路由,并将该VPNv4路由复制到私网路由中。在复制之后,网络设备205根据私网路由生成路由通告消息4,并通过私网邻居向网络设备202发送该路由通告消息4。
网络设备202在接收到来自网络设备205的路由通告消息4之后,生成与该路由通告消息4的路由信息对应的路由(即到达网络设备201的路由)的转发信息2,该转发信息2的下一跳为网络设备205。也就是说,到达网络设备201的路由具有两条转发信息,即转发信息1和转发信息2。若网络设备202选择转发信息2向外部通告,那么就会形成网络设备202-网络设备203-网络设备204-网络设备205-网络设备202的路由环路。
为了克服上述技术问题,本申请实施例提供一种路由通告的方法、路由环路检测方法及设备,实现对路由环路的检测,避免出现路由环路问题。
本申请实施例提供的路由通告和路由环路检测方法可以应用于图2所示的网络架构中。上述网络设备201至网络设备207可以为路由器(router)、交换机(switch)、具备路由功能的服务器等实体设备,也可以是具备路由或交换机功能的虚拟装置。
下面结合图2和图3对该方法进行详细介绍。
参见图3,该图为本申请实施例提供的路由通告和路由环路检测方法的流程示意图。
该路由通告和路由环路检测方法具体包括如下步骤。
S101:第一网络设备接收第一路由通告消息,第一路由通告消息包括路由信息和第一字段,第一字段包括设备标识。
在本申请实施例中,第一网络设备可以是图2中的网络设备203,即第一网络设备可以是PE设备。
第一网络设备接收第一路由通告消息,该第一路由通告消息可以是BGP update消息。其中第一路由通告消息可以来自路由反射器,该路由反射器可以是具有路由反射器功能的CE设备,例如图2中的网络设备202。
第一路由通告消息中包括路由信息。在接收到第一路由通告消息之后,第一网络设备可以生成对应该路由信息的路由的转发信息。
例如,网络设备203接收来自网络设备202的BGP update消息1,该BGP update消息1携带有网络设备201的路由信息,网络设备202根据网络设备201的路由信息生成到达网络设备201的路由的转发信息。
当第一路由通告消息来自路由反射器,那么第一路由通告消息还可以包括设备标识,第一路由通告消息包括的路由信息来自该设备标识对应的设备。该设备标识可以携带在第一路由通告消息的第一字段中。若第一路由通告消息为BGP update消息,那么该第一字段可以是表示Originator ID属性的字段。
例如,网络设备203接收到的来自网络设备202的BGP update消息1中携带表示Originator ID属性的字段,该表示Originator ID属性的字段中携带网络设备201的设备标识,表示BGP update消息1的路由信息来自网络设备201。其中,网络设备201的设备标识可以是网络设备201的路由器标识(router identifier,router ID)或者网络设备201在网络中的编号等唯一标识该网络设备201的设备标识。
参见图4,该图为表示Originator ID属性的字段的格式示意图。在该图中,用于携带Originator ID属性的字段包括标志位(flags)、类型码(type code)、长度(length)以及值(value)字段。其中,flags字段的值可以为0x80,type code字段的值可以为0x09,length字段的值可以为0x04,value字段的值可以为发起者标识。
S102:第一网络设备根据所述第一路由通告消息生成第二路由通告消息,所述第二路由通告消息包括第二字段,第二字段包括设备标识。
在本申请实施例中,第二路由通告消息可以是BGP update消息。第二路由通告消息中包括第二字段,该第二字段可以为表示SoO属性的字段,该表示SoO属性的字段的值包括上述设备标识。也就是说,第二字段包括的设备标识与第一字段包括的设备标识相同。
作为第一种可能的实现方式,第一网络设备在接收到第一路由通告消息之后,根据第一路由通告消息包括的路由信息生成第二路由通告消息,该第二路由通告消息包括路由信息和第二字段。
例如,网络设备203在接收到BGP update消息1之后,根据其中到达网络设备201的路由信息生成BGP update消息2,该BGP update消息2包括到达网络设备201的路由信息和表示SoO属性的字段,该表示SoO属性的字段的值为网络设备201的router ID。
作为第二种可能的实现方式,第一网络设备在接收到第一路由通告消息之后,第一网络设备可以先生成对应其包含的路由信息的路由,然后根据该路由生成第二路由通告消息。其中,该路由可以是VPNv4路由、互联网协议第四版(Internet Protocol version 4,IPv4)路由或互联网协议第六版(Internet Protocol version 6,IPv6)路由。
例如,网络设备203先根据BGP update消息1生成到达网络设备201的私网路由,然后将该私网路由拷贝到VPNv4路由中,并基于该VPNv4路由生成BGP update消息2。该BGP update消息2中携带表示SoO属性的字段,该表示SoO属性的字段的值为网络设备201的router ID。
作为第三种可能的实现方式,第一网络设备在接收到第一路由通告消息之后,若其中包括第一字段,则将该第一字段删除或将该第一字段的值置为0,并添加第二字段,得到第二路由通告消息。其中,第二字段的值与第一字段的值相同,均为第一路由通告消息中路由信息的来源设备的设备标识。
例如,网络设备203可以将BGP update消息1中表示Originator ID属性的字段删除,即删除网络设备201的router ID,并添加表示SoO属性的字段,该表示SoO属性的字段的值包括网络设备201的router ID,得到BGP update消息2。
在本申请实施例中,该表示SoO属性的字段可以包含在自治系统(autonomous system,AS)特殊扩展团体(specific extended community)属性字段、第四版互联网协议地址(Internet Protocol version 4 address,IPv4 address)特殊扩展团体属性字段或不透明(opaque)扩展团体(extended community)属性字段。
参见图5,该图为包括AS specific extended community属性的字段的格式示意图。在该图中,包括AS specific extended community属性的字段包括扩展团体属性的类型字段、子类型(sub-type)、全球管理者(global administrator)字段以及本地管理者(local administrator) 字段。其中,扩展团体属性的类型字段的值为0x00或0x40,用于表示该扩展团体属性为AS specific extended community属性。sub-type字段的值可以用于指示该属性的其中一个子类型为SoO属性。上述设备标识可以全部携带在global administrator字段中,或者一部分携带在global administrator字段中,另一部分携带在local administrator字段中。
参见图6,该图为包括IPv4 address specific extended community属性的字段的格式示意图。在该图中,包括IPv4 address specific extended community属性的字段包括扩展团体属性的类型字段、sub-type、global administrator字段及其连续(cont.)字段(cont.字段为可选字段)以及local administrator字段。其中,扩展团体属性的类型字段的值为0x01或0x41,用于表示该扩展团体属性为IPv4 address specific extended community属性。sub-type字段的值可以用于指示该属性的其中一个子类型为SoO属性。上述设备标识可以全部携带在global administrator字段中,或者一部分携带在global administrator字段中,另一部分携带在local administrator字段中。
参见图7,该图为包括opaque extended community属性的字段的格式示意图。在该图中,包括opaque extended community属性的字段包括扩展团体属性的类型字段、sub-type、value字段及连续(cont.)字段(cont.字段为可选字段)。其中,扩展团体属性的类型字段的值为0x03或0x43,用于表示该扩展团体属性为opaque extended community属性。sub-type字段的值可以用于指示该属性的其中一个子类型为SoO属性。上述设备标识可以携带在value字段中。
上述携带设备标识的字段的可能的几种实现方式并不构成对本申请实施例技术方案的限定,本领域技术人员可以根据实际情况自行设计。
S103:第一网络设备向第二网络设备发送所述第二路由通告消息。
如前文所提,第一路由通告消息可以来自路由反射器。当第一路由通告消息来自路由反射器时,第二网络设备可以例如是图2中的网络设备205或网络设备206中的任意一个网络设备,即第二网络设备可以是PE设备。
S104:第二网络设备接收第二路由通告消息。
S105:第二网络设备判断第二路由通告消息中第二字段的值是否为第二网络设备的设备标识,若是,则确认出现路由环路,并执行S106;若否,则执行S107。
在本申请实施例中,如果第二网络设备判断出第二路由通告消息中第二字段的值为第二网络设备的设备标识,则出现路由环路;如果第二路由通告消息中第二字段的值不为第二网络设备的设备标识,则说明没有出现路由环路。
S106:响应于确定出现路由环路,第二网络设备丢弃所述第二路由通告消息,或者,将根据所述第二路由通告消息得到的转发信息置为无效或降低所述转发信息的优先级。
在出现路由环路的情况下,第二网络设备对第二路由通告消息的处理可以有两种可能的实现方式:
作为第一种可能的实现方式,若第二网络设备没有根据第二路由通告消息中的路由信息生成对应的转发信息时,第二网络设备可以直接丢弃该第二路由通告消息。
作为第二种可能的实现方式,若第二网络设备已经根据第二路由通告消息中的路由信 息生成对应的转发信息时,第二网络设备可以将该转发信息置为无效或降低该转发信息的优先级,其目的在于,不根据该转发信息转发业务报文,避免业务报文进入转发循环。
当然,上述两种可能的实现方式并不构成对本申请实施例提供的技术方案的限定,本领域技术人员可以根据实际情况自行设计。
S107:第二网络设备发送第二路由通告消息。
在没有出现路由环路的情况下,第二网络设备可以向下一跳设备发送第二路由通告消息。
结合图2,在网络设备202为路由反射器的情况下,当网络设备205接收到来自网络设备203的BGP update消息2时,该BGP update消息2中表示SoO属性的字段的值为网络设备201的router ID,而不是网络设备205的router ID,所以网络设备205确认没有出现路由环路。然后,网络设备205可以根据BGP update消息2生成BGP update消息3,BGP update消息3中不包括表示SoO属性的字段,并基于eBGP向网络设备202发送该BGP update消息3。由于网络设备202为路由反射器,因此,网络设备202在该BGP update消息3中添加表示Originator ID属性的字段,该字段的值为网络设备205的router ID,得到BGP update消息4,并向网络设备203发送该BGP update消息4。网络设备203接收到该BGP update消息4之后,根据该BGP update消息4生成BGP update消息5,并向网络设备205发送该BGP update消息5。其中,该BGP update消息5包括表示SoO属性的值,该表示SoO属性的值为网络设备205的router ID。那么,当网络设备205接收到BGP update消息5之后,确认该BGP update消息5中表示SoO属性的值为自己的router ID,网络设备205可以将该BGP update消息5丢弃或者将根据BGP update消息5得到的转发信息置为无效或降低该转发信息的优先级,从而避免形成网络设备205-网络设备204-网络设备203-网络设备202-网络设备205的路由环路以及业务报文在该路由环路中形成转发循环。
此外,在一些场景下,可以允许第二网络设备出现一定次数的路由环路。即,第二网络设备在确定出现路由环路次数超过特定阈值时,丢弃第二路由通告消息,或者,将根据第二路由通告消息得到的转发信息置为无效或降低该转发信息的优先级。具体的,第二网络设备可以利用计数器统计出现路由环路的次数,即每出现一次路由环路,就将计数器的值加1。当该计数器的值达到特定阈值,则丢弃计数器达到特定阈值时的路由通告消息,或者将根据该路由通告消息得到的转发信息置为无效或降低该转发信息的优先级。
作为一种可能的实现方式,第一网络设备可以以路由为单位统计该路由出现路由环路的次数。例如,网络设备205统计到达网络设备201的路由出现路由环路的次数。如果计数器的值达到特定阈值,则丢弃最近一次接收到的对应到达网络设备201的路由的路由通告消息,或者将该路由通告消息对应的转发信息置为无效或降低该转发信息的优先级。
作为另一种可能的实现方式,第一网络设备可以以转发信息为单位统计出现路由环路的次数。例如,网络设备205统计到达网络设备201的路由的某个转发信息出现路由环路的次数。如果计数器的值达到特定阈值,则丢弃最近一次接收到的对应该转发信息的路由通告消息,或者将该转发信息置为无效或降低该转发信息的优先级。
上述可能的实现方式并不构成对本申请实施例技术方案的限定,本领域技术人员可以 根据实际情况自行设计。
综上所述,在第一路由通告消息因为某些原因(例如跨网络)而无法到达第二网络设备的情况下,第一网络设备根据第一路由通告消息生成能够发往第二网络设备的第二路由通告消息,其中第二路由通告消息的第二字段携带第一路由通告消息中第一字段的值,以使第二网络设备能够根据第二字段的值是否为自己的设备标识而判断是否出现路由环路,从而实现对路由环路的检测,提高业务报文传输的可靠性。
下面结合图2和图8对跨网络域场景下克服路由环路问题的路由环路检测方法进行介绍。其中,图8为该路由通告和路由环路检测方法的流程示意图。该方法具体包括如下步骤:
S201:网络设备201基于eBGP向网络设备202发送BGP update消息1,该BGP update消息1中携带有网络设备201的路由信息。
S202:网络设备202在接收到BGP update消息1之后,在BGP update消息1中添加表示Originator ID属性的字段,得到BGP update消息2,其中,该表示Originator ID属性的字段的值为网络设备201的router ID。
如前文所提,网络设备202为路由反射器。
S203:网络设备202基于eBGP向网络设备203发送BGP update消息2。
S204:网络设备203接收BGP update消息2,生成与网络设备201的路由信息对应的私网路由的转发信息1,将该私网路由的转发信息1拷贝到VPNv4路由表中,并根据VPNv4路由表中与网络设备201的路由信息对应的转发信息1’生成BGP update消息3,BGP update消息3中包括表示SoO属性的字段,该表示SoO属性的字段的值为网络设备201的router ID。
其中,到达网络设备201的私网路由的转发信息1可以包括Originator ID属性,该Originator ID属性的值包括网络设备201的router ID。拷贝到VPNv4路由表中的转发信息也可以包括该网络设备201的router ID。
S205:网络设备203基于iBGP向网络设备204发送BGP update消息3。
在本申请实施例中,网络设备203与网络设备204可以互为BGP邻居。
S206:网络设备204在接收到BGP update消息3之后,基于iBGP向网络设备205发送BGP update消息3。
S207:网络设备205在接收到BGP update消息3之后,判断BGP update消息3中SoO属性的值是否为自己的router ID。
由于BGP update消息3中的SoO属性的值为网络设备201的router ID,所以网络设备205的判断结果为否,即未出现路由环路。
S208:基于判断结果为否,网络设备205生成与BGP update消息3中携带的网络设备201的路由信息对应的VPNv4的路由的转发信息2,并将该VPNv4的路由的转发信息2拷贝到私网路由表中,以及根据私网路由表中与网络设备201的路由信息对应的转发信息2’生成BGP update消息4,BGP update消息4中包括网络设备201的路由信息。
S209:网络设备205基于eBGP向网络设备202发送BGP update消息4。
S210:网络设备202在接收到BGP update消息4后,在BGP update消息4中添加表示Originator ID属性的字段,得到BGP update消息5,其中,该表示Originator ID属性的字段的值为网络设备205的router ID。
S211:网络设备202基于eBGP向网络设备203发送BGP update消息5。
S212:网络设备203在接收到BGP update消息5之后,根据BGP update消息5生成BGP update消息6,BGP update消息6中SoO属性的值为网络设备205的router ID。
可选的,网络设备203在接收到BGP update消息5之后,可以将到达网络设备201的私网路由的转发信息1和VPNv4路由表的转发信息1’中的网络设备201的router ID替换为网络设备205的router ID。因而,网络设备203可以基于更新之后的VPNv4路由表的转发信息1’生成BGP update消息6。
S213:网络设备203基于iBGP向网络设备204发送BGP update消息6。
S214:网络设备204在接收到BGP update消息6之后,基于iBGP向网络设备205发送BGP update消息6。
S215:网络设备205在接收到BGP update消息6之后,判断SoO属性的值是否为自己的router ID。
由于BGP update消息6中的SoO属性的值为网络设备205的router ID,所以网络设备204的判断结果为是。
S216:基于判断结果为是,网络设备205丢弃BGP update消息6。
由于BGP update消息5中的SoO属性的值为网络设备205的router ID,所以网络设备205可以确认自己发出去的BGP update消息又回到了自己,所以为了避免形成路由环路,网络设备205将BGP update消息5丢弃,这样报文就不会沿着网络设备203-网络设备202-网络设备205-网络设备204-网络设备203循环往复传输,保证传输的可靠性。
在一些示例中,若允许网络设备205出现一定次数的路由环路(例如2次),那么网络设备205在执行S216首次判断结果为是时,可以不丢弃BGP update消息5,而是继续向网络设备202发送该BGP update消息5,并将计数器的值置为1。网络设备202、网络设备203以及网络设备204执行的步骤与S210-S214类似,此处不再赘述,直到该BGP update消息5再次到达网络设备205。网络设备205判断该BGP update消息5中携带的SoO属性的值为网络设备205的router ID,将计数器的值置为2。网络设备205确认该计数器的值到达特定阈值,则将该BGP update消息5丢弃。
此外,在上述示例中,网络设备205先判断SoO属性字段的值是否为自己的router ID,如果是,则生成对应网络设备201的路由信息的路由的转发信息。可选的,网络设备205还可以先生成该转发信息,然后再判断SoO属性字段的值是否为自己的router ID。在判断结果为是时,网络设备205可以将该转发信息置为无效或者降低该转发信息的优先级,以避免路由环路。
参见图9,该图为本申请实施例提供的另外一种路由通告和路由环路检测方法的流程 图。该方法可以适用于没有路由反射器的网络架构的场景。例如,参见图10,该图为没有路由反射器的网络架构的示意图。该网络架构包括网络设备301、网络设备302、网络设备303和网络设备304,网络设备301和网络设备302连接,网络设备302和网络设备303连接,网络设备303和网络设备304连接,网络设备304和网络设备302连接。网络设备301、网络设备302、网络设备303和网络设备304可以为路由器(router)、交换机(switch)、具备路由功能的服务器等实体设备,也可以是具备路由或交换机功能的虚拟装置。
图9所示的路由通告和路由环路检测方法包括如下步骤:
S301:第一网络设备生成第一路由通告消息,所述第一路由通告消息包括表示SoO属性的字段,该表示SoO属性的字段携带所述第一网络设备的标识。
在本申请实施例中,第一网络设备可以例如为图10中的网络设备302。第一网络设备可以是PE设备,也可以是CE设备,本申请不做具体限定。
第一网络设备生成的第一路由通告消息中包括路由信息,该路由信息可以是第一网络设备的路由信息,也可以是其他设备的路由信息。第一路由通告消息可以是BGP update消息。第一路由通告消息中除了可以包括路由信息以外,还可以包括表示SoO属性的字段,该表示SoO属性的字段的值包括第一网络设备的标识。该第一网络设备的标识例如可以是第一网络设备的router ID或第一网络设备在网络中的编号等,本申请实施例不做具体限定。
作为其中一种可能的实现方式,第一网络设备可以获取第二路由通告消息,并在所述第二路由通告消息中添加表示SoO属性的字段,得到所述第一路由通告消息。其中,表示SoO属性的字段的格式可以参见上文,此处不再赘述。
例如,网络设备302生成BGP update消息,该BGP update消息包括网络设备302的路由信息和表示SoO属性的字段,该表示SoO属性的字段的值为网络设备302的router ID。
再例如,网络设备302接收来自网络设备301的BGP update消息,该BGP update消息中携带网络设备301的路由信息。网络设备302可以在BGP update消息中添加表示SoO属性的字段,该表示SoO属性的字段的值为网络设备302的router ID。
S302:第一网络设备向第二网络设备发送所述第一路由通告消息。
在本申请实施例中,第二网络设备为第一网络设备的下一跳网络设备,具体可以是PE设备、P设备或CE设备,例如为图10中的网络设备303,本申请实施例不做具体限定。
S303:第一网络设备接收第三路由通告消息,所述第三路由通告消息包括表示SoO属性的字段。
在本申请实施例中,第一网络设备接收第三路由通告消息,该第三路由通告消息与第一路由通告消息可以是同一个路由通告消息,也可以是不同的路由通告消息。
S304:第一网络设备确认所述第三路由通告消息中所述表示SoO属性的字段的值为所述第一网络设备的标识,所述第一网络设备确定出现路由环路。
当第一网络设备确认接收到的第三路由通告消息中表示SoO属性的字段的值为所述第一网络设备的标识,说明第三路由通告消息中的路由信息为第一网络设备曾经发布的路由信息,因而第一网络设备可以确定出现路由环路。
例如,网络设备303将接收到的来自网络设备302的BGP update消息发送给网络设备 304,网络设备304向网络设备302发送该BGP update消息。网络设备302接收到该BGP update消息之后,判断出BGP update消息中的表示SoO属性的字段的值为网络设备302的router ID,则确认出现路由环路,即网络设备302曾经发出去的BGP update消息又回到了该网络设备。
S305:响应于确定出现路由环路,所述第一网络设备丢弃所述第三路由通告消息,或者,将根据所述第三路由通告消息得到的转发信息置为无效或降低所述转发信息的优先级。
在本申请实施例中,当确认出现路由环路之后,第一网络设备可以有两种可能的处理方式:
作为第一种可能的实现方式,若第一网络设备没有根据第三路由通告消息中的路由信息生成对应的转发信息时,第二网络设备可以直接丢弃该第三路由通告消息。
作为第二种可能的实现方式,若第一网络设备已经根据第三路由通告消息中的路由信息生成对应的转发信息时,第一网络设备可以将该转发信息置为无效或降低该转发信息的优先级,其目的在于,不根据该转发信息转发报文,避免报文进入转发循环。
例如,网络设备302接收到来自网络设备304的BGP update消息,并确认出现路由环路之后,网络设备302可以直接丢弃该BGP update消息,或者将根据BGP update消息中网络设备301的路由信息生成的路由的转发信息置为无效或者降低该转发信息的优先级,以避免报文进入转发循环。
此外,在一些场景下,可以允许第一网络设备出现一定次数的路由环路。即,第一网络设备在确定出现路由环路次数超过特定阈值时,丢弃第三路由通告消息,或者,将根据第三路由通告消息得到的转发信息置为无效或降低该转发信息的优先级。具体的,第一网络设备可以利用计数器统计出现路由环路的次数,即每出现一次路由环路,就将计数器的值加1。当该计数器的值达到特定阈值,则丢弃计数器达到特定阈值时的路由通告消息,或者将根据该路由通告消息得到的转发信息置为无效或降低该转发信息的优先级。
第一网络设备通过在发布的路由通告消息中携带表示SoO属性的字段,该字段的值为第一网络设备的标识,使得第一网络设备可以通过判断接收到的路由通告消息中是否包括自己的标识来确定是否出现路由环路,实现对路由环路的检测,提高业务报文传输的可靠性。
下面结合图10和图11,以一个应用场景为例对图9所示的路由通告和路由环路检测方法进行详细介绍。其中,图11为该路由通告和路由环路检测方法的流程示意图。该方法具体包括如下步骤:
S401:网络设备301向网络设备302发送BGP update消息1,该BGP update消息1包括网络设备301的路由信息。
作为第一种可能的实现方式,网络设备301为CE设备,网络设备302为PE设备,第一路由通告消息包含的到达网络设备301的路由信息,或第一路由通告消息包含到达连接网络设备301的用户网络的路由信息。
S402:网络设备302在接收到BGP update消息1之后,生成对应网络设备301的路由 信息的路由的转发信息1,并在BGP update消息1中添加表示SoO属性的字段,得到BGP update消息2,其中该表示SoO属性的字段的值为网络设备302的router ID。
其中,对应网络设备301的路由信息的路由的转发信息1的下一跳为网络设备301。
S403:网络设备302向网络设备303发送BGP update消息2。
S404:网络设备303在接收到BGP update消息2之后,向网络设备304发送BGP update消息2。
S405:网络设备304在接收到BGP update消息2之后,向网络设备302发送BGP update消息2。
S406:网络设备302判断BGP update消息2中表示SoO属性的字段的值是否为网络设备302的router ID。
S407:基于判断结果为是,网络设备302丢弃BGP update消息2。
当网络设备302判断出BGP update消息2中SoO属性中的值为网络设备302的router ID时,说明该网络设备302发布出去的BGP update消息2又回到了自己,所以为了避免路由环路问题,网络设备302将BGP update消息2丢弃,不根据BGP update消息2生成对应的转发信息,这样报文就不会在网络设备303-网络设备302-网络设备303之间循环往复传输,保证传输的可靠性。
在一些示例中,若允许网络设备302出现一定次数的路由环路(例如2次),那么网络设备302在执行S407首次判断结果为是时,可以不丢弃BGP update消息2,而是继续向网络设备303发送该BGP update消息2,并将计数器的值置为1。网络设备303以及网络设备304执行的步骤与S404-S405类似,此处不再赘述,直到该BGP update消息2再次到达网络设备302。网络设备302判断该BGP update消息5中携带的SoO属性的值为网络设备302的router ID,将计数器的值置为2。网络设备302确认该计数器的值到达特定阈值,则将该BGP update消息2丢弃。
在上述例子中,网络设备302在接收到BGP update消息2之后,先判断其中的表示SoO属性的字段的值是否为自己的router ID,基于判断结果确定是否生成对应的转发信息。在其他的示例中,网络设备302可以先根据BGP update消息2中网络设备301的路由信息生成对应路由的转发信息2,该转发信息2的下一跳为网络设备304,然后再判断BGP update消息2中的表示SoO属性的字段的值是否为自己的router ID。由于判断结果为是,则网络设备302可以将该转发信息2置为无效,只保留转发信息1;或者,网络设备302将该转发信息2的优先级降低,以使其低于转发信息1的优先级,以使网络设备302通过转发信息1向网络设备301转发报文,避免报文在网络设备302-网络设备303-网络设备304-网络设备302之间形成转发循环。
图12示出了上述实施例中所涉及的网络设备的一种可能的结构示意图,该网络设备1200可以实现图3所示实例中第一网络设备的功能,或者,该网络设备1200可以实现图8所示实施例中网络设备203的功能。参阅图12,该网络设备1200包括:接收单元1201、处理单元1202和发送单元1203。这些单元可以执行上述方法示例中第一网络设备的相应 功能。接收单元1201,用于支持网络设备1200执行图3中S101;处理单元1202,用于支持网络设备1200执行图3中的S102;发送单元1203,用于支持网络设备1200执行图3中S103;和/或本文所描述的技术中第一网络设备执行的其它过程。举例来说,接收单元1201,用于接收第一路由通告消息,所述第一路由通告消息的第一字段包括设备标识,所述第一路由通告消息包含的路由信息来自所述设备标识对应的设备;处理单元1202,用于根据所述第一路由通告消息生成第二路由通告消息,所述第二路由通告消息的第二字段包括所述设备标识,所述第一字段和所述第二字段为不同字段;发送单元1203,用于向第二网络设备发送所述第二路由通告消息。具体执行过程请参考上述图3或图8所示实施例中相应步骤的详细描述,这里不再一一赘述。
需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。本申请实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。例如,上述实施例中,获取单元和处理单元可以是同一个单元,也不同的单元。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
图13示出了上述实施例中所涉及的网络设备的一种可能的结构示意图,该网络设备1300可以实现图3所示实例中第二网络设备的功能,或者,该网络设备1300可以实现图8所示实施例中网络设备205的功能。参阅图13,该网络设备1300包括:接收单元1301和处理单元1302。这些单元可以执行上述方法示例中第二网络设备的相应功能。举例来说,接收单元1301,用于接收来自第一网络设备的第二路由通告消息,所述第二路由通告消息包括表示路由起源SoO属性的字段;处理单元1302,用于在确认所述表示路由起源SoO属性的字段的值为所述第二网络设备的标识时,确定出现路由环路。具体执行过程请参考上述图3或图8所示实施例中相应步骤的详细描述,这里不再一一赘述。
图14示出了上述实施例中所涉及的网络设备的一种可能的结构示意图,该网络设备1400可以实现图9所示实例中第一网络设备的功能,或者,该网络设备1400可以实现图11所示实施例中网络设备302的功能。参阅图14,该网络设备1400包括:处理单元1401和发送单元1402。这些单元可以执行上述方法示例中第二网络设备的相应功能。举例来说,处理单元1401,用于生成第一路由通告消息,所述第一路由通告消息包括表示路由起源SoO属性的字段,所述表示SoO属性的字段携带所述第一网络设备的标识;发送单元1402,用于向第二网络设备发送所述第一路由通告消息。具体执行过程请参考上述图9或图11所示实施例中相应步骤的详细描述,这里不再一一赘述。
参阅图15所示,发明实施例提供了一种网络系统1500,该系统1500用于实现前述方法实施例中的路由通告和路由环路检测的方法。该系统1500包括网络设备1501和网络设备1502。网络设备1501可以实现图3所示的实施例中的第一网络设备、图8所示实施例中网络设备203或图13中的网络设备1300的功能,网络设备1502可以实现图3所示的实 施例中第二网络设备、图8所示实施例中网络设备205或图14中的网络设备1400的功能。或者,网络设备1501可以实现图9所示的实施例中的第一网络设备、图11所示实施例中网络设备302或图14中的网络设备1400的功能,网络设备1502可以实现图9所示的实施例中的第二网络设备、图11所示实施例中网络设备303的功能。具体执行过程请参考上述图3或图8或图9或图33所示实施例中相应步骤的详细描述,这里不再一一赘述。
图16是本申请实施例提供的一种设备1600的结构示意图。图12中的网络设备1200、图13中的网络设备1300和图14中的网络设备1400可以通过图16所示的设备来实现。参见图16,该设备1600包括至少一个处理器1601,通信总线1602以及至少一个网络接口1604,可选地,该设备1600还可以包括存储器1603。
处理器1601可以是一个通用中央处理器(central processing unit,CPU)、特定应用集成电路(application-specific integrated circuit,ASIC)或一个或多个用于控制本申请方案程序执行的集成电路(integrated circuit,IC)。处理器可以用于对报文进行处理,以实现本申请实施例中提供的路由通告和路由环路检测的方法。
比如,当图3中的第一网络设备通过图16所示的设备来实现时,该处理器可以用于接收第一路由通告消息,根据所述第一路由通告消息生成第二路由通告消息,向第二网络设备发送所述第二路由通告消息,具体功能实现可参考方法实施例中对应第一网络设备的处理部分。又比如,当图3中的第二网络设备通过图16所示的设备来实现时,该处理器可以用于接收来自第一网络设备的第二路由通告消息,所述第二路由通告消息包括表示路由起源SoO属性的字段;确认所述表示路由起源SoO属性的字段的值为所述第二网络设备的标识,确定出现路由环路,具体功能实现可参考方法实施例中第二网络设备的处理部分。又比如,当图9中的第一网络设备通过图16所示的设备来实现时,该处理器可以生成第一路由通告消息,所述第一路由通告消息包括表示路由起源SoO属性的字段,所述表示SoO属性的字段携带所述第一网络设备的标识;向第二网络设备发送所述第一路由通告消息,具体功能实现可参考方法实施例中第二网络设备的处理部分
通信总线1602用于在处理器1601、网络接口1604和存储器1603之间传送信息。
存储器1603可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,存储器1603还可以是随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,也可以是只读光盘(compact disc read-only Memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器1603可以是独立存在,通过通信总线1602与处理器1601相连接。存储器1603也可以和处理器1601集成在一起。
可选地,存储器1603用于存储执行本申请方案的程序代码或指令,并由处理器1601来控制执行。处理器1601用于执行存储器1603中存储的程序代码或指令。程序代码中可以包括一个或多个软件模块。可选地,处理器1601也可以存储执行本申请方案的程序代码 或指令,在这种情况下处理器1601不需要到存储器1603中读取程序代码或指令。
网络接口1604可以为收发器一类的装置,用于与其它设备或通信网络通信,通信网络可以为以太网、无线接入网(RAN)或无线局域网(wireless local area networks,WLAN)等。在本申请实施例中,网络接口1604可以用于接收分段路由网络中的其他节点发送的报文,也可以向分段路由网络中的其他节点发送报文。网络接口1604可以为以太接口(ethernet)接口、快速以太(fast ethernet,FE)接口或千兆以太(gigabit ethernet,GE)接口等。
在具体实现中,作为一种实施例,设备1600可以包括多个处理器,例如图16中所示的处理器1601和处理器405。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
图17是本申请实施例提供的一种设备1700的结构示意图。图3中的第一网络设备和第二网络设备、图9中的第一网络设备可以通过图17所示的设备来实现。参见图17所示的设备结构示意图,设备1700包括主控板和一个或多个接口板。主控板与接口板通信连接。主控板也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板包括CPU和存储器,主控板负责对设备1700中各个组件的控制和管理,包括路由计算、设备管理和维护功能。接口板也称为线处理单元(line processing unit,LPU)或线卡(line card),用于接收和发送报文。在一些实施例中,主控板与接口板之间或接口板与接口板之间通过总线通信。在一些实施例中,接口板之间通过交换网板通信,在这种情况下设备1700也包括交换网板,交换网板与主控板、接口板通信连接,交换网板用于转发接口板之间的数据,交换网板也可以称为交换网板单元(switch fabric unit,SFU)。接口板包括CPU、存储器、转发引擎和接口卡(interface card,IC),其中接口卡可以包括一个或多个网络接口。网络接口可以为Ethernet接口、FE接口或GE接口等。CPU与存储器、转发引擎和接口卡分别通信连接。存储器用于存储转发表。转发引擎用于基于存储器中保存的转发表转发接收到的报文,如果接收到的报文的目的地址为设备1700的IP地址,则将该报文发送给主控板或接口板的CPU进行处理;如果接收到的报文的目的地址不是设备1700的IP地址,则根据该目的地查转发表,如果从转发表中查找到该目的地址对应的下一跳和出接口,将该报文转发到该目的地址对应的出接口。转发引擎可以是网络处理器(network processor,NP)。接口卡也称为子卡,可安装在接口板上,负责将光电信号转换为数据帧,并对数据帧进行合法性检查后转发给转发引擎处理或接口板CPU。在一些实施例中,CPU也可执行转发引擎的功能,比如基于通用CPU实现软转发,从而接口板中不需要转发引擎。在一些实施例中,转发引擎可以通过ASIC或现场可编程门阵列(field programmable gate array,FPGA)实现。在一些实施例中,存储转发表的存储器也可以集成到转发引擎中,作为转发引擎的一部分。
本申请实施例还提供一种芯片系统,包括:处理器,所述处理器与存储器耦合,所述 存储器用于存储程序或指令,当所述程序或指令被所述处理器执行时,使得该芯片系统实现上述图3所示实施例中第一网络设备或第二网络设备、图9所示实施例中第一网络设备的方法。
可选地,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。可选地,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请并不限定。示例性的,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型,以及存储器与处理器的设置方式不作具体限定。
示例性的,该芯片系统可以是FPGA,可以是ASIC,还可以是系统芯片(system on chip,SoC),还可以是CPU,还可以是NP,还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。
应理解,上述方法实施例中的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
本申请实施例还提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行前述实施例中的方法。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包括,例如,包括了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
本申请中“至少一项(个)”是指一个或者多个,“多个”是指两个或两个以上。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。本申请中认为“A和/或B”包括单独A,单独B,和A+B。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑模块划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显 示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要获取其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各模块单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件模块单元的形式实现。
所述集成的单元如果以软件模块单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。
Claims (53)
- 一种路由通告的方法,其特征在于,包括:第一网络设备接收第一路由通告消息,所述第一路由通告消息的第一字段包括设备标识,所述第一路由通告消息包含的路由信息来自所述设备标识对应的设备;所述第一网络设备根据所述第一路由通告消息生成第二路由通告消息,所述第二路由通告消息的第二字段包括所述设备标识,所述第一字段和所述第二字段为不同字段;所述第一网络设备向第二网络设备发送所述第二路由通告消息。
- 根据权利要求1所述的方法,其特征在于,所述第一网络设备根据所述第一路由通告消息生成第二路由通告消息包括:所述第一网络设备根据所述第一路由通告消息包含的所述路由信息生成所述第二路由通告消息,所述第二路由通告消息包含所述路由信息。
- 根据权利要求1所述的方法,其特征在于,所述第一网络设备根据所述第一路由通告消息生成第二路由通告消息包括:所述第一网络设备根据所述第一路由通告消息包括的所述路由信息生成对应的路由;所述第一网络设备根据所述路由生成所述第二路由通告消息。
- 根据权利要求3所述的方法,其特征在于,所述第一网络设备根据所述第一路由通告消息包括的所述路由信息生成对应的路由包括:所述第一网络设备根据所述第一路由通告消息包括的所述路由信息生成对应的私网路由;所述第一网络设备根据所述路由生成所述第二路由通告消息包括:所述第一网络设备将所述私网路由复制到虚拟专用网络第四版VPNv4路由中,并根据所述VPNv4路由生成所述第二路由通告消息。
- 根据权利要求1所述的方法,其特征在于,所述第一网络设备根据所述第一路由通告消息生成第二路由通告消息包括:所述第一网络设备删除所述第一路由通告消息的所述第一字段,并添加所述第二字段,得到所述第二路由通告消息。
- 根据权利要求1-5任一项所述的方法,其特征在于,所述第一网络设备为第一运营商边缘PE设备,所述第一网络设备接收第一路由通告消息包括:所述第一网络设备接收路由反射器RR发送的所述第一路由通告消息。
- 根据权利要求6所述的方法,其特征在于,所述RR为用户边缘CE设备。
- 根据权利要求1-7任一项所述的方法,其特征在于,所述第一路由通告消息和所述第二路由通告消息分别为边界网关协议更新BGP update消息。
- 根据权利要求8所述的方法,其特征在于,所述第二字段为表示路由起源SoO属性的字段。
- 根据权利要求9所述的方法,其特征在于,所述表示SoO属性的字段包括所述BGP update消息的自治系统特殊扩展团体AS specific extended community中的全球管理者global administrator字段或所述BGP update消息的第四版互联网协议地址特殊扩展团体IPv4 address specific extended community中的global administrator字段。
- 根据权利要求10所述的方法,其特征在于,所述表示SoO属性的字段还包括所述AS specific extended community的本地管理者local administrator字段或所述IPv4 address specific extended community的local administrator字段。
- 根据权利要求9所述的方法,其特征在于,所述表示SoO属性的字段包括不透明扩展团体属性opaque extended community中的值value字段。
- 一种路由环路检测方法,其特征在于,所述方法包括:第二网络设备接收来自第一网络设备的第二路由通告消息,所述第二路由通告消息包括表示路由起源SoO属性的字段;所述第二网络设备确认所述表示路由起源SoO属性的字段的值为所述第二网络设备的标识,所述第二网络设备确定出现路由环路。
- 根据权利要求13所述的方法,其特征在于,所述方法还包括:响应于确定出现路由环路,所述第二网络设备丢弃所述第二路由通告消息,或者,将根据所述第二路由通告消息得到的转发信息置为无效或降低所述转发信息的优先级。
- 根据权利要求13所述的方法,其特征在于,所述方法还包括:在所述第二网络设备确定出现路由环路次数超过特定阈值时,所述第二网络设备丢弃所述第二路由通告消息,或者,将根据所述第二路由通告消息得到的转发信息置为无效或降低所述转发信息的优先级。
- 根据权利要求15所述的方法,其特征在于,所述特定阈值等于1,或所述特定阈值为大于1的正整数。
- 根据权利要求13-16任一项所述的方法,其特征在于,所述方法还包括:所述第二网络设备接收来自所述第一网络设备的第一路由通告消息,所述第一路由通告消息包括路由信息和所述表示路由起源SoO属性的字段;所述第二网络设备确认所述第一路由通告消息中所述表示SoO属性的字段的值不为所述第二网络设备的标识,所述第二网络设备根据所述路由信息生成第三路由通告消息,所述第三路由通告消息包括所述路由信息;所述第二网络设备向路由反射器RR发送所述第三路由通告消息。
- 根据权利要求13-17任一项所述的方法,其特征在于,所述第一网络设备和所述第二网络设备分别为运营商边缘PE设备。
- 根据权利要求13-18任一项所述的方法,其特征在于,所述表示SoO属性的字段包括自治系统特殊扩展团体AS specific extended community或第四版互联网协议地址特殊扩展团体IPv4 address specific extended community中的全球管理者global administrator字段。
- 根据权利要求19所述的方法,其特征在于,所述表示SoO属性的字段还包括所述AS specific extended community或IPv4 address specific extended community中的地方管理者local administrator字段。
- 根据权利要求13-18任一项所述的方法,其特征在于,所述表示SoO属性的字段包括不透明扩展团体opaque extended community属性中的值value字段。
- 根据权利要求13-21任一项所述的方法,其特征在于,所述第二网络设备的标识为所述第二网络设备的路由器标识router ID。
- 一种路由通告的方法,其特征在于,所述方法包括:第一网络设备生成第一路由通告消息,所述第一路由通告消息包括表示路由起源SoO属性的字段,所述表示SoO属性的字段携带所述第一网络设备的标识;所述第一网络设备向第二网络设备发送所述第一路由通告消息。
- 根据权利要求23所述的方法,其特征在于,所述第一网络设备生成第一路由通告消息包括:所述第一网络设备获取第二路由通告消息;所述第一网络设备在所述第二路由通告消息中添加所述表示SoO属性的字段,得到所述第一路由通告消息。
- 根据权利要求23或24所述的方法,其特征在于,所述方法还包括:所述第一网络设备接收第三路由通告消息,所述第三路由通告消息包括所述表示SoO属性的字段;所述第一网络设备确认所述第三路由通告消息中所述表示SoO属性的字段的值为所述第一网络设备的标识,所述第一网络设备确定出现路由环路。
- 根据权利要求25所述的方法,其特征在于,所述方法还包括:响应于确定出现路由环路,所述第一网络设备丢弃所述第三路由通告消息,或者,将根据所述第三路由通告消息得到的转发信息置为无效或降低所述转发信息的优先级。
- 根据权利要求25所述的方法,其特征在于,所述方法还包括:在所述第一网络设备确定出现路由环路次数超过特定阈值时,所述第一网络设备丢弃所述第三路由通告消息,或者,将根据所述第三路由通告消息得到的转发信息置为无效或降低所述转发信息的优先级。
- 根据权利要求27所述的方法,其特征在于,所述特定阈值等于1,或所述特定阈值为大于1的正整数。
- 根据权利要求23-28任一项所述的方法,其特征在于,所述表示SoO属性的字段包括自治系统特殊扩展团体AS specific extended community中的全球管理者global administrator字段或第四版互联网协议地址特殊扩展团体IPv4 address specific extended community中的global administrator字段。
- 根据权利要求29所述的方法,其特征在于,所述表示SoO属性的字段还包括所述AS specific extended community的本地管理者local administrator字段或所述IPv4 address specific extended community的local administrator字段。
- 根据权利要求23-28任一项所述的方法,其特征在于,所述表示SoO属性的字段包括不透明扩展团体opaque extended community属性中的值value字段。
- 根据权利要求23-31任一项所述的方法,其特征在于,所述第一网络设备的标识为所述第一网络设备的路由器标识router ID。
- 根据权利要求23-32任一项所述的方法,其特征在于,所述第一网络设备和所述第 二网络设备分别为运营商边缘PE设备。
- 一种网络设备,其特征在于,应用于包括多个网络设备的网络系统,所述多个网络设备包括第一网络设备和第二网络设备,所述网络设备为所述第一网络设备,所述网络设备包括:接收单元,用于接收第一路由通告消息,所述第一路由通告消息的第一字段包括设备标识,所述第一路由通告消息包含的路由信息来自所述设备标识对应的设备;处理单元,用于根据所述第一路由通告消息生成第二路由通告消息,所述第二路由通告消息的第二字段包括所述设备标识,所述第一字段和所述第二字段为不同字段;发送单元,用于向第二网络设备发送所述第二路由通告消息。
- 根据权利要求34所述的网络设备,其特征在于,所述处理单元,用于根据所述第一路由通告消息包含的所述路由信息生成所述第二路由通告消息,所述第二路由通告消息包含所述路由信息。
- 根据权利要求34所述的网络设备,其特征在于,所述处理单元,用于根据所述第一路由通告消息包括的所述路由信息生成对应的路由,根据所述路由生成所述第二路由通告消息。
- 根据权利要求36所述的网络设备,其特征在于,所述处理单元,用于根据所述第一路由通告消息包括的所述路由信息生成对应的私网路由,将所述私网路由复制到虚拟专用网络第四版VPNv4路由中,并根据所述VPNv4路由生成所述第二路由通告消息。
- 根据权利要求34所述的网络设备,其特征在于,所述处理单元,用于删除所述第一路由通告消息的所述第一字段,并添加所述第二字段,得到所述第二路由通告消息。
- 根据权利要求34-38任一项所述的网络设备,其特征在于,所述第一路由通告消息和所述第二路由通告消息分别为边界网关协议更新BGP update消息。
- 根据权利要求39所述的网络设备,其特征在于,所述第二字段为表示路由起源SoO属性的字段。
- 一种网络设备,其特征在于,应用于包括多个网络设备的网络系统,所述多个网络设备包括第一网络设备和第二网络设备,所述网络设备为所述第二网络设备,所述网络设备包括:接收单元,用于接收来自第一网络设备的第二路由通告消息,所述第二路由通告消息包括表示路由起源SoO属性的字段;处理单元,用于在确认所述表示路由起源SoO属性的字段的值为所述第二网络设备的标识时,确定出现路由环路。
- 根据权利要求41所述的网络设备,其特征在于,所述处理单元,还用于响应于确定出现路由环路,丢弃所述第二路由通告消息,或者,将根据所述第二路由通告消息得到的转发信息置为无效或降低所述转发信息的优先级。
- 根据权利要求41所述的网络设备,其特征在于,所述处理单元,还用于确定出现路由环路次数超过特定阈值时,丢弃所述第二路由通告消息,或者,将根据所述第二路由通告消息得到的转发信息置为无效或降低所述转发信息的优先级。
- 根据权利要求41-43任一项所述的网络设备,其特征在于,还包括:发送单元;所述接收单元,还用于接收来自所述第一网络设备的第一路由通告消息,所述第一路由通告消息包括路由信息和所述表示路由起源SoO属性的字段;所述处理单元,还用于在确认所述第一路由通告消息中所述表示SoO属性的字段的值不为所述第二网络设备的标识时,根据所述路由信息生成第三路由通告消息,所述第三路由通告消息包括所述路由信息;所述发送单元,用于向路由反射器RR发送所述第三路由通告消息。
- 一种网络设备,其特征在于,应用于包括多个网络设备的网络系统,所述多个网络设备包括第一网络设备和第二网络设备,所述网络设备为所述第一网络设备,所述网络设备包括:处理单元,用于生成第一路由通告消息,所述第一路由通告消息包括表示路由起源SoO属性的字段,所述表示SoO属性的字段携带所述第一网络设备的标识;发送单元,用于向第二网络设备发送所述第一路由通告消息。
- 根据权利要求45所述的网络设备,其特征在于,所述处理单元,用于获取第二路由通告消息,在所述第二路由通告消息中添加所述表示SoO属性的字段,得到所述第一路由通告消息。
- 根据权利要求45或46所述的网络设备,其特征在于,所述网络设备还包括:接收单元,用于接收第三路由通告消息,所述第三路由通告消息包括所述表示SoO属性的字段;所述处理单元,还用于在确认所述第三路由通告消息中所述表示SoO属性的字段的值为所述第一网络设备的标识时,确定出现路由环路。
- 根据权利要求47所述的网络设备,其特征在于,所述处理单元,还用于响应于确定出现路由环路,丢弃所述第三路由通告消息,或者,将根据所述第三路由通告消息得到的转发信息置为无效或降低所述转发信息的优先级。
- 根据权利要求47所述的网络设备,其特征在于,所述网络设备还包括:所述处理单元,还用于在确定出现路由环路次数超过特定阈值时,丢弃所述第三路由通告消息,或者,将根据所述第三路由通告消息得到的转发信息置为无效或降低所述转发信息的优先级。
- 一种网络系统,其特征在于,所述网络系统包括如权利要求34-40任一项所述的第一网络设备和如权利要求41-44任一项所述的第二网络设备。
- 一种网络系统,其特征在于,所述网络系统包括如权利要求45-49任一项所述的第一网络设备和所述的第二网络设备。
- 一种计算机可读存储介质,其特征在于,包括指令、程序或代码,当其在计算机上执行时,使得所述计算机执行如权利要求1至33任一权利要求所述的方法。
- 一种芯片,其特征在于,包括存储器和处理器,存储器用于存储指令或程序代码,处理器用于从存储器中调用并运行该指令或程序代码,以执行如权利要求1至33任一权利要求所述的方法。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP21884575.8A EP4216506A4 (en) | 2020-10-28 | 2021-08-11 | ROUTING ADVERTISING METHOD, ROUTING LOOP DETECTION METHOD, AND DEVICE |
US18/307,883 US20230269174A1 (en) | 2020-10-28 | 2023-04-27 | Route Advertisement Method, Route Loop Check Method, and Device |
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011176874 | 2020-10-28 | ||
CN202011176874.4 | 2020-10-28 | ||
CN202110045032.3 | 2021-01-13 | ||
CN202110045032.3A CN114500362A (zh) | 2020-10-28 | 2021-01-13 | 一种路由通告的方法、路由环路的检测方法及设备 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US18/307,883 Continuation US20230269174A1 (en) | 2020-10-28 | 2023-04-27 | Route Advertisement Method, Route Loop Check Method, and Device |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022088843A1 true WO2022088843A1 (zh) | 2022-05-05 |
Family
ID=81381816
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/111950 WO2022088843A1 (zh) | 2020-10-28 | 2021-08-11 | 一种路由通告的方法、路由环路的检测方法及设备 |
Country Status (3)
Country | Link |
---|---|
US (1) | US20230269174A1 (zh) |
EP (1) | EP4216506A4 (zh) |
WO (1) | WO2022088843A1 (zh) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101505227A (zh) * | 2009-03-11 | 2009-08-12 | 华为技术有限公司 | 一种实现点到多点伪线的方法、设备和系统 |
CN105721297A (zh) * | 2016-01-28 | 2016-06-29 | 北京国电通网络技术有限公司 | 基于sdn网络中路由环路的检测方法及系统 |
CN106789625A (zh) * | 2016-12-26 | 2017-05-31 | 北京华为数字技术有限公司 | 一种环路检测方法及装置 |
CN108768723A (zh) * | 2018-05-29 | 2018-11-06 | 北京星网锐捷网络技术有限公司 | 一种业务收敛方法、设备、介质和系统 |
US20180351863A1 (en) * | 2017-05-31 | 2018-12-06 | Juniper Networks, Inc. | Routing protocol signaling of multiple next hops and their relationship |
CN111740961A (zh) * | 2020-05-26 | 2020-10-02 | 北京华三通信技术有限公司 | 通信方法及装置 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7609628B2 (en) * | 2005-09-07 | 2009-10-27 | At&T Intellectual Property I, L.P. | System and method for fault-tolerance in an inter-carrier network interface |
CN111385204B (zh) * | 2018-12-27 | 2022-03-29 | 中国移动通信集团贵州有限公司 | 业务传输方法、装置、设备及介质 |
-
2021
- 2021-08-11 WO PCT/CN2021/111950 patent/WO2022088843A1/zh unknown
- 2021-08-11 EP EP21884575.8A patent/EP4216506A4/en active Pending
-
2023
- 2023-04-27 US US18/307,883 patent/US20230269174A1/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101505227A (zh) * | 2009-03-11 | 2009-08-12 | 华为技术有限公司 | 一种实现点到多点伪线的方法、设备和系统 |
CN105721297A (zh) * | 2016-01-28 | 2016-06-29 | 北京国电通网络技术有限公司 | 基于sdn网络中路由环路的检测方法及系统 |
CN106789625A (zh) * | 2016-12-26 | 2017-05-31 | 北京华为数字技术有限公司 | 一种环路检测方法及装置 |
US20180351863A1 (en) * | 2017-05-31 | 2018-12-06 | Juniper Networks, Inc. | Routing protocol signaling of multiple next hops and their relationship |
CN108768723A (zh) * | 2018-05-29 | 2018-11-06 | 北京星网锐捷网络技术有限公司 | 一种业务收敛方法、设备、介质和系统 |
CN111740961A (zh) * | 2020-05-26 | 2020-10-02 | 北京华三通信技术有限公司 | 通信方法及装置 |
Non-Patent Citations (1)
Title |
---|
See also references of EP4216506A4 |
Also Published As
Publication number | Publication date |
---|---|
EP4216506A4 (en) | 2024-01-24 |
US20230269174A1 (en) | 2023-08-24 |
EP4216506A1 (en) | 2023-07-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5345942B2 (ja) | Pbtネットワークの中間ノードにおけるイーサネットoam | |
WO2021164249A1 (zh) | 一种发送报文的方法、设备及系统 | |
WO2020135395A1 (zh) | 一种跨内部网关协议的前缀标识通告方法和装置 | |
US8665782B2 (en) | Loop-detection in moving networks | |
CN109218456B (zh) | Mac地址表的老化时间的处理方法及装置 | |
CN111371634B (zh) | 一种通信方法、装置及系统 | |
EP2337275B1 (en) | Method of automatically discovering an adjacent network node | |
WO2013166911A1 (zh) | 一种处理网络中设备组标识符冲突的方法和路由网桥 | |
WO2022088843A1 (zh) | 一种路由通告的方法、路由环路的检测方法及设备 | |
KR101874575B1 (ko) | 최대 어웨이 지속기간 | |
CN108768845B (zh) | 一种多归属主机路由同步方法及装置 | |
WO2022042403A1 (zh) | 生成路由信息、发送位置信息及转发报文的方法及设备 | |
Cisco | DECnet Commands | |
Cisco | DECnet Commands | |
Cisco | DECnet Commands | |
Cisco | DECnet Commands | |
Cisco | DECnet Commands | |
Cisco | DECnet Commands | |
Cisco | DECnet Commands | |
Cisco | DECnet Commands | |
Cisco | DECnet Commands | |
Cisco | DECnet Commands | |
Cisco | DECnet Commands | |
Cisco | DECnet Commands | |
Cisco | DECnet Commands |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
ENP | Entry into the national phase |
Ref document number: 2021884575 Country of ref document: EP Effective date: 20230419 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |