Packet forwarding method, first network device, and first device group
Patent Information
- Application Number
- JP2022527897
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-02-11
- Filing Date
- 2020-09-23
- Publication Date
- 2024-08-19
- Estimated Expiration
- 2040-09-23
Smart Images

Figure 0007536093000015 
Figure 0007536093000010 
Figure 0007536093000009
Abstract
Description
[Technical field]
[0001] This application claims priority to Chinese Patent Application No. 201911115998.9, filed on November 15, 2019, entitled “MULTICAST PACKET FORWARDING METHOD, DEVICE, AND SYSTEM,” and also claims priority to Chinese Patent Application No. 202010086666.9, filed on February 11, 2020, entitled “PACKET FORWARDING METHOD, FIRST NETWORK DEVICE, AND FIRST DEVICE GROUP,” which are incorporated herein by reference in their entireties.
[0002] The present application relates to the field of network communication, and more particularly to a packet forwarding method, a first network device, and a first device group. [Background technology]
[0003] Multicast is a data transmission mode in Transmission Control Protocol (TCP) / Internet Protocol (IP) networks in which data is efficiently sent to multiple receivers simultaneously using a single multicast address.
[0004] A multicast receiver may send a multicast join message to a network device, and the network device may send the multicast join message to a multicast source using a router connected to the network device. The multicast source uses a router connected to the multicast source to send multicast traffic to the network device, and uses the network device to forward the multicast traffic to the multicast receiver. In the conventional technical solution, when the communication link between the multicast source and the router connected to the multicast source is broken, the network device connected to the multicast receiver needs to send a multicast join message to another router. This leads to a long service recovery time. Summary of the Invention
[0005] The present application provides a packet forwarding method to reduce service restoration time when any network device in a first device group fails or a link corresponding to the network device fails.
[0006] According to a first aspect, a packet forwarding method is provided. The method includes: a first network device receives a first multicast packet sent by a multicast source device and forwarded by a first device group, the first device group including a second network device and a third network device, and the first multicast packet is forwarded to the first network device by one network device in the first device group. The first network device determines that the first multicast packet is a multicast packet forwarded by the first device group according to a reverse path forwarding RPF entry, the RPF entry includes a first sub-entry and a second sub-entry, the first sub-entry instructs the first network device to forward the first multicast packet sent by the second network device, and the second sub-entry instructs the first network device to forward the first multicast packet sent by the third network device. The first network device transmits the first multicast packet to a multicast destination device according to the RPF entry.
[0007] In this technical solution, the network device may forward a multicast packet sent by any device in the first device group according to the RPF entry. When one network device in the first device group fails or a link corresponding to the network device fails, the network device may forward a multicast packet delivered by another network device corresponding to a normal link in the first device group according to the RPF entry. This shortens the service recovery time when one network device in the first device group fails or a link corresponding to the network device fails.
[0008] In a possible implementation, when the first communication link is in a normal state, the first network device sends a first multicast packet to the multicast destination device according to the first sub-entry.
[0009] The first communication link is a communication link from the multicast source device to the second network device and from there to the first network device.
[0010] In another possible implementation, when the second communication link is in a normal state, the first network device receives a first multicast packet forwarded via the first communication link, where a metric of the first communication link is less than a metric of the second communication link.
[0011] A link metric in this application may be a link quality or a link bandwidth, etc. The second communication link is a communication link from the multicast source device to a third network device and from there to the first network device.
[0012] In another possible implementation, when a metric of a link from the multicast source to the second network device is less than a metric of a link from the multicast source to a third network device, the second network device forwards a first multicast packet transmitted from the multicast source to the first network device.
[0013] In another possible implementation, when the priority of the first communication link is higher than the priority of the second communication link, the second network device forwards the first multicast packet transmitted from the multicast source to the first network device.
[0014] In another possible implementation, when the first communication link is in a failed state and the second communication link is in a normal state, the first network device sends a first multicast packet to the multicast destination device according to the second sub-entry.
[0015] In another possible implementation, before the first network device determines that the first multicast packet is a multicast packet forwarded by the first device group according to the reverse path forwarding RPF entry, the method includes the first network device receiving first control information sent by the second network device, the first control information including a second identifier, the second identifier being an identifier of the second network device. The first network device generates a first sub-entry based on the second identifier, the first sub-entry being a correspondence between the second identifier and a multicast source group (S, G) corresponding to the first multicast packet.
[0016] The first network device receives second control information transmitted by a third network device, the second control information including a third identifier, the third identifier being an identifier of the third network device. The first network device generates a second sub-entry based on the third identifier, the second sub-entry being a correspondence between the third identifier and a multicast source group (S, G) corresponding to the first multicast packet.
[0017] In another possible implementation, the second identifier and the third identifier are Internet Protocol IP addresses, or Internet Protocol version 6 IPv6 addresses.
[0018] In another possible implementation, the first control information further includes a first device group identifier. The second control information further includes a first device group identifier. The first device group identifier is an identifier of the first device group. The method further includes the first network device determining an RPF entry based on the first device group identifier.
[0019] Specifically, the first network device determines the first sub-entry and the second sub-entry to be RPF entries based on the first device group identifier.
[0020] In another possible implementation, the first device group identifier is an IP address, an IPv6 address, or an integer.
[0021] In another possible implementation, the first device group identifier may be the same IP address or an anycast IP address configured on the second network device and the third network device.
[0022] In another possible implementation, before the second network device sends the first control message to the first network device or the third network device sends the second control message to the first network device, the method further includes configuring a first device group identifier on the second network device and the third network device in the first device group.
[0023] According to a second aspect, a packet forwarding method is provided, the method including a second network device in a first device group transmitting a second identifier and a first device group identifier to the first network device, the first device group including the second network device and a third network device, the second identifier being an identifier of the second network device and the first device group identifier being an identifier of the first device group, and the third network device in the first device group transmitting the third identifier and the first device group identifier to the first network device.
[0024] The third identifier is an identifier of a third network device, and the second identifier, the third identifier, and the first device group identifier are used to trigger the first network device to generate a reverse path forwarding RPF entry based on the second identifier, the third identifier, and the first device group identifier, the RPF entry including a first sub-entry and a second sub-entry, the first sub-entry instructing the first network device to forward a first multicast packet sent by a second network device in the first device group, and the second sub-entry instructing the first network device to forward a first multicast packet sent by a third network device in the first device group.
[0025] The method further includes a network device in the first device group receiving the first multicast packet transmitted by the multicast source device. The network devices in the first device group forward the first multicast packet to the first network device.
[0026] In another possible implementation, a network device in a first device group receives a unicast packet transmitted by a multicast source, and the first multicast packet is encapsulated in the unicast packet.
[0027] In another possible implementation, the destination address of the unicast packet is the first device group identifier or an anycast IP address, or may be an integer.
[0028] In another possible implementation, the first communication link is in a normal state. The first communication link is a communication link from the multicast source device to the second network device and from there to the first network device. The second network device in the first device group forwards the first multicast packet received from the multicast source device to the first network device.
[0029] In another possible implementation, the second communication link is in a normal state. The second communication link is a communication link from the multicast source device to the third network device and from there to the first network device. The metric of the first communication link is less than the metric of the second communication link.
[0030] In another possible implementation, when a metric of a link from the multicast source to the second network device is less than a metric of a link from the multicast source to a third network device, the second network device forwards a first multicast packet transmitted from the multicast source to the first network device.
[0031] In another possible implementation, when the priority of the first communication link is higher than the priority of the second communication link, the second network device forwards the first multicast packet transmitted from the multicast source to the first network device.
[0032] In another possible implementation, when the first communication link is in a failed state and the second communication link is in a normal state, the third network device in the first device group forwards the first multicast packet received from the multicast source device to the first network device.
[0033] In another possible implementation, the first device group identifier is an IP address, an IPv6 address, or an integer.
[0034] In another possible implementation, the first device group identifier may be the same IP address or an anycast IP address configured on the second network device and the third network device.
[0035] In another possible implementation, before the second network device sends the first control message to the first network device or the third network device sends the second control message to the first network device, the method further includes configuring a first device group identifier on the second network device and the third network device in the first device group.
[0036] The advantageous effects of the second aspect and any possible implementations of the second aspect correspond to the advantageous effects of the first aspect and any possible implementations of the first aspect, and are not described in detail again in this specification.
[0037] According to a third aspect, there is provided a first network device, the first network device comprising: a receiving module configured to receive a first multicast packet transmitted by a multicast source device and forwarded by a first device group, the first device group including a second network device and a third network device, the first multicast packet being forwarded by one network device in the first device group to the first network device; a determination module configured to determine, according to a reverse path forwarding RPF entry, that the first multicast packet is a multicast packet forwarded by a first device group, the RPF entry including a first sub-entry and a second sub-entry, the first sub-entry instructing the first network device to forward the first multicast packet sent by the second network device, and the second sub-entry instructing the first network device to forward the first multicast packet sent by the third network device; a sending module configured to send a first multicast packet to a multicast destination device according to the RPF entry; Includes.
[0038] The first communication link is in a normal state. The first communication link is a communication link from the multicast source device to the second network device and from there to the first network device. The sending module is specifically configured to send the first multicast packet to the multicast destination device according to the first sub-entry.
[0039] The second communication link is in a normal state. The second communication link is a communication link from the multicast source device to the third network device and from there to the first network device. The receiving module is specifically configured to receive the first multicast packet forwarded via the first communication link. A metric of the first communication link is less than a metric of the second communication link.
[0040] In another possible implementation, when a metric of a link from the multicast source to the second network device is less than a metric of a link from the multicast source to a third network device, the second network device forwards a first multicast packet transmitted from the multicast source to the first network device.
[0041] In another possible implementation, when the priority of the first communication link is higher than the priority of the second communication link, the second network device forwards the first multicast packet transmitted from the multicast source to the first network device.
[0042] In another possible implementation, when the first communication link is in a failed state and the second communication link is in a normal state, the transmitting module is specifically configured to transmit the first multicast packet to the multicast destination device according to the second sub-entry.
[0043] In another possible implementation, the receiving module is further configured to receive first control information transmitted by a second network device, the first control information including a second identifier, the second identifier being an identifier of the second network device. The first network device further includes a generating module configured to generate a first sub-entry based on the second identifier, the first sub-entry being a correspondence between the second identifier and a multicast source group (S, G) corresponding to the first multicast packet. The receiving module is further configured to receive second control information transmitted by a third network device, the second control information including a third identifier, the third identifier being an identifier of the third network device. The generating module is further configured to generate a second sub-entry based on the third identifier, the second sub-entry being a correspondence between the third identifier and a multicast source group (S, G) corresponding to the first multicast packet.
[0044] In another possible implementation, the second identifier and the third identifier are Internet Protocol IP addresses, or Internet Protocol version 6 IPv6 addresses.
[0045] In another possible implementation, the first control information further includes a first device group identifier. The second control information further includes a first device group identifier. The first device group identifier is an identifier of a first device group. The determination module is specifically configured to determine an RPF entry based on the first device group identifier.
[0046] In another possible implementation, the first device group identifier is an IP address, an IPv6 address, or an integer.
[0047] In another possible implementation, the first device group identifier may be the same IP address or an anycast IP address configured on the second network device and the third network device.
[0048] In another possible implementation, before the second network device sends the first control message to the first network device or the third network device sends the second control message to the first network device, the method further includes configuring a first device group identifier on the second network device and the third network device in the first device group.
[0049] According to a fourth aspect, a first device group is provided. The first device group includes a second network device and a third network device. The first device group includes: a transmitting module configured to transmit the second identifier and the first device group identifier to the first network device using a second network device in a first device group, the first device group including the second network device and a third network device, the second identifier being an identifier of the second network device and the first device group identifier being an identifier of the first device group; The sending module is further configured to send, with a third network device in the first device group, the third identifier and the first device group identifier to the first network device, where the third identifier is an identifier of the third network device, and the second identifier, the third identifier, and the first device group identifier are used to trigger the first network device to generate a reverse path forwarding RPF entry based on the second identifier, the third identifier, and the first device group identifier, where the RPF entry includes a first sub-entry and a second sub-entry, where the first sub-entry instructs the first network device to forward the first multicast packet sent by the second network device in the first device group, and the second sub-entry instructs the first network device to forward the first multicast packet sent by the third network device in the first device group.
[0050] In a possible implementation, the first device group further includes a receiving module configured to receive, using a network device in the first device group, a first multicast packet transmitted by the multicast source device, and the transmitting module is further configured to forward, using the network device in the first device group, the first multicast packet to the first network device.
[0051] In another possible implementation, the transmitting module is specifically configured to receive, using a network device in a first device group, a unicast packet transmitted by a multicast source, where the first multicast packet is encapsulated in the unicast packet.
[0052] In another possible implementation, the destination address of the unicast packet is the first device group identifier or an anycast IP address, or may be an integer.
[0053] In another possible implementation, the first communication link is in a normal state. The first communication link is a communication link from the multicast source device to the second network device and from there to the first network device. The sending module is specifically configured to forward the first multicast packet received from the multicast source device to the first network device by using the second network device in the first device group.
[0054] In another possible implementation, the second communication link is in a normal state. The second communication link is a communication link from the multicast source device to the third network device and from there to the first network device. The metric of the first communication link is less than the metric of the second communication link.
[0055] In another possible implementation, when a metric of a link from the multicast source to the second network device is less than a metric of a link from the multicast source to a third network device, the second network device forwards a first multicast packet transmitted from the multicast source to the first network device.
[0056] In another possible implementation, when the priority of the first communication link is higher than the priority of the second communication link, the second network device forwards the first multicast packet transmitted from the multicast source to the first network device.
[0057] In another possible implementation, when the first communication link is in a failed state and the second communication link is in a normal state, the transmitting module is specifically configured to forward the first multicast packet received from the multicast source device to the first network device using a third network device in the first device group.
[0058] In another possible implementation, the first device group identifier is an IP address, an IPv6 address, or an integer.
[0059] In another possible implementation, the first device group identifier may be the same IP address or an anycast IP address configured on the second network device and the third network device.
[0060] In another possible implementation, before the second network device sends the first control message to the first network device or the third network device sends the second control message to the first network device, the method further includes configuring a first device group identifier on the second network device and the third network device in the first device group.
[0061] According to a fifth aspect, a first network device is provided. The first network device includes a processor, a memory, an interface, and a bus. The interface may be implemented wirelessly or wired, and may be a network adapter in particular. The processor, the memory, and the interface are connected via the bus.
[0062] The interface may specifically include a transmitter and a receiver, and is configured for the first network device to perform the above-mentioned receiving and transmitting. For example, the interface is configured to support receiving a first multicast packet sent from a multicast source device and forwarded by a first device group. In another example, the interface is configured to support sending a first multicast packet to a multicast destination device according to the RPF entry. In another example, the interface is configured to support sending a first multicast packet to a multicast destination device according to the second sub-entry.
[0063] The processor is configured to execute the process performed by the first network device in the aforementioned embodiment. For example, the processor is configured to determine that the first multicast packet is a multicast packet forwarded by the first device group according to the reverse path forwarding RPF entry, generate a first sub-entry based on the second identifier, generate a second sub-entry based on the third identifier, and / or execute other processes for the techniques described herein. The memory includes an operating system and an application, and is configured to store programs, codes, or instructions. When executing the programs, codes, or instructions, the processor or hardware device may complete the processing process of the first network device in the embodiment of the method. Optionally, the memory may include a read-only memory (ROM) and a random access memory (RAM). The ROM includes a basic input / output system (BIOS) or an embedded system, and the RAM includes an application and an operating system. When the first network device needs to run, the BIOS or the boot loader of the embedded system built in the ROM is used to boot and start the system, and make the first network device boot into a normal running state. After entering into a normal running state, the first network device runs the application and the operating system in the RAM to complete the processing process of the first network device in the embodiment of the method.
[0064] In practical applications, the first network device may include any number of interfaces, processors, or memories.
[0065] According to a sixth aspect, a computer-readable medium is provided. The computer-readable medium stores a program code. When the computer program code is run on a computer, the computer can execute the method according to the first aspect or any one of the possible implementations of the first aspect. The computer-readable storage includes, but is not limited to, one or more of read-only memory (ROM), programmable read-only memory (PROM), erasable PROM (EPROM), flash memory, electrically EPROM (EEPROM), and hard drive.
[0066] According to a seventh aspect, a computer readable medium is provided. The computer readable medium stores program code. When the computer program code is run on a computer, the computer is enabled to execute the method according to the second aspect or any one of the possible implementations of the second aspect. medium includes, but is not limited to, one or more of read-only memory (ROM), programmable read-only memory (PROM), erasable PROM (EPROM), flash memory, electrically EPROM (EEPROM), and a hard drive.
[0067] According to an eighth aspect, there is provided a computer program product, comprising computer program code which, when run on a computer, enables the computer to perform a method according to the first aspect or any one of the possible implementations of the first aspect.
[0068] According to a ninth aspect, there is provided a computer program product, comprising computer program code which, when run on a computer, enables the computer to perform a method according to the first aspect or any one of the possible implementations of the first aspect.
[0069] According to a tenth aspect, a chip is provided. The chip includes a processor and a data interface. The processor reads instructions stored in the memory using the data interface to execute the method according to the first aspect or any one of the possible implementations of the first aspect. In a specific implementation process, the chip may be implemented in the form of a central processing unit (CPU), a microcontroller unit (MCU), a microprocessing unit (MPU), a digital signal processor (DSP), a system-on-a-chip (SoC), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or a programmable logic device (PLD).
[0070] According to an eleventh aspect, a chip is provided. The chip includes a processor and a data interface. The processor reads instructions stored in the memory using the data interface to execute the method according to the second aspect or any one of the possible implementations of the second aspect. In a specific implementation process, the chip may be implemented in the form of a central processing unit (CPU), a microcontroller unit (MCU), a microprocessing unit (MPU), a digital signal processor (DSP), a system-on-a-chip (SoC), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or a programmable logic device (PLD).
[0071] According to a twelfth aspect, there is provided a system including a first network device and a first device group. [Brief description of the drawings]
[0072] [Figure 1] FIG. 1 is a schematic diagram illustrating a possible application scenario to which the present application can be applied. [Diagram 2] FIG. 2 is a schematic diagram illustrating another possible application scenario to which the present application can be applied. [Diagram 3] FIG. 3 is a schematic flow chart illustrating a packet forwarding method according to an embodiment of the present application. [Figure 4A] FIG. 4A is a schematic flow chart illustrating another packet forwarding method according to an embodiment of the present application. [Figure 4B] FIG. 4B is a schematic flow chart illustrating another packet forwarding method according to an embodiment of the present application. [Figure 5A]FIG. 5A is a schematic flow chart illustrating another packet forwarding method according to an embodiment of the present application. [Figure 5B] FIG. 5B is a schematic flow chart illustrating another packet forwarding method according to an embodiment of the present application. [Figure 6] FIG. 6 is a schematic diagram showing a structure of a first network device 600 according to an embodiment of the present application. [Figure 7] FIG. 7 is a schematic diagram illustrating a structure of a first device group 700 according to an embodiment of the present application. [Figure 8] FIG. 8 is a schematic diagram showing a hardware structure of a first network device 2000 according to an embodiment of the present application. [Figure 9] FIG. 9 is a schematic diagram showing a hardware structure of another first network device 2100 according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0073] The technical solutions of the present application are described below with reference to the accompanying drawings.
[0074] Multicast is a data transmission mode in Transmission Control Protocol (TCP) / Internet Protocol (IP) networks where data is efficiently sent to multiple receivers simultaneously using one multicast address. A multicast source sends multicast traffic to multicast group members in a multicast group over links in the network, and each multicast group member in the multicast group can receive the multicast traffic. The multicast transmission mode implements a point-to-multipoint data connection between the multicast source and the multicast group members. Multicast traffic needs to be transmitted only once on each network link, making the multicast trafficis replicated only when there is a branch on the link. Therefore, the multicast transmission mode improves data transmission efficiency and reduces the possibility of congestion on the backbone network.
[0075] For ease of explanation, the application scenario to which the embodiments of the present application are applied will be described in detail below with reference to FIGS.
[0076] Figure 1 is a schematic diagram illustrating a multicast scenario to which embodiments of the present application may be applied. As shown in Figure 1, the scenario may include a multicast receiver (receive, RCV) and a multicast source (source, SRC).
[0077] In a possible implementation, a multicast source may be directly connected to at least two routers (R), which may be referred to as the multicast source's dual homing to the at least two routers. A multicast source may be directly connected to two routers, or may be directly connected to three or more routers. This is not particularly limited in this application.
[0078] In another possible implementation, optionally, a customer edge (CE) switch may be included in FIG. 1, and the multicast source may be separately connected to the at least two routers described above using at least two CE switches.
[0079] For ease of explanation, two routers (eg, R1 and R2) are used as illustrative examples in FIG.
[0080] Figure 2 is a schematic diagram showing another possible multicast scenario provided in an embodiment of the present application. As shown in Figure 2, in this scenario, a multicast source is separately connected to at least two routers using switches (SW), CE1 and CE2.
[0081] Two routers (e.g. R1 and R2) are used as an example in Fig. 2. A multicast source is connected to R1 using SW and CE1, and a multicast source is connected to R2 using SW and CE2. 2 is connected to.
[0082] In this embodiment of the present application, a multicast receiver may be called a multicast destination device, and there may be multiple multicast receivers. For ease of explanation, in the scenario of Fig. 1 or Fig. 2, there are two multicast receivers, for example H1 and H2. H1 / H2 are connected to routers L1 / L2 respectively, and routers L1 / L2 are connected to R1 and R2 respectively using P1 / P2.
[0083] The network including R1 / R2, P1 / P2, and L1 / L2 is also called a core network, and is, for example, a network provided by an operator. The network is not particularly limited in this embodiment of the present application, and may be a multicast virtual private network (MVPN) or an Ethernet virtual private network (EVPN). The interface used to connect L1 / L2 to H1 / H2 and the interface used to connect R1 / R2 to a multicast source are user-side interfaces (also called private network-side interfaces or private network interfaces) in the network. The interface used to connect R1 / R2 to P1 / P2 and the interface used to connect L1 / L2 to P1 / P2 are network-side interfaces (also called public network-side interfaces or public network interfaces) in the network.
[0084] A multicast receiver (e.g., H1 / H2) may send a multicast join message to L1 / L2 connected to the multicast receiver. The multicast join message is not particularly limited in this application and may be an Internet group management protocol (IGMP) message or a multicast listener discovery (MLD) message. After receiving the multicast message, L1 / L2 uses a border gateway protocol (BGP) message to notify R1 / R2 of the multicast source of the multicast join message. message The BGP message may be a BGP MVPN route message or a BGP EVPN route message. For example, a BGP MVPN route message may be a C-multicast route message or a leaf AD route message. After receiving the multicast join message, the multicast source may send multicast packets to the multicast receivers.
[0085] It should be understood that in this application, a multicast join message sent by a multicast receiver may include S1G1, where S1 indicates a multicast source (source, S) of a requested multicast packet, and G1 indicates a multicast group (group, G) of the requested multicast packet. After receiving the multicast join message, the multicast source may send a multicast packet to the multicast receiver according to S1G1 of the multicast packet in the multicast join message.
[0086] In the conventional technical solution, L1 is used as an example. After receiving the multicast join related to S1G1 from H1, L1 messageR1 sends a multicast join carrying the "backup" indication to R2, and sends a multicast join carrying the "backup" indication to R2. After R1 and R2 receive the multicast packets from the multicast source, R1 forwards the multicast packets to L1. When R1 fails, L1 sends a multicast join that does not carry the "backup" indication to R2, so that R2 forwards the multicast packets to L1. With this solution, when R1 fails, L1 still receives the multicast join. message must be sent to R2, which leads to long service recovery times.
[0087] The embodiment of the present application provides a packet forwarding method for shortening service recovery time when a network device in a device group that forwards multicast packets fails. The packet forwarding method will be described below with reference to FIG.
[0088] 3 is a schematic flow chart illustrating a packet forwarding method according to an embodiment of the present application. As shown in FIG. 3, the method may include steps 310 to 330. Hereinafter, steps 310 to 330 will be described in detail separately.
[0089] Step 310: A first network device receives a first multicast packet sent from a multicast source device and forwarded by a first device group, where the first device group includes a second network device and a third network device, and the first multicast packet is forwarded to the first network device by one network device in the first multicast group.
[0090] In this embodiment of the present application, the first network device corresponds to L1 / L2 in Fig. 1, and the second network device and the third network device correspond to R1 and R2, respectively. L1 / L2 may receive a first multicast packet sent by a multicast source device and transmitted using any of the network devices of R1 / R2.
[0091] Step 320: The first network device determines, according to the reverse path forwarding RPF entry, that the first multicast packet is a multicast packet forwarded by the first device group.
[0092] It should be understood that reverse path forwarding (RPF) is a technique for preventing multiple forwarding of a multicast data packet. A network device may forward a multicast packet received from an upstream multicast hop (UMH) according to an RPF entry.
[0093] In this embodiment of the present application, the RPF entry includes a first sub-entry and a second sub-entry. The first sub-entry instructs the first network device to forward a first multicast packet sent from a second network device. The second sub-entry instructs the first network device to forward a first multicast packet sent from a third network device.
[0094] Step 330: The first network device sends a first multicast packet to a multicast destination device according to the RPF entry.
[0095] The first network device may forward the transmitted multicast packet using any device in the first device group according to the RPF entry.
[0096] In this technical solution, a network device may forward a multicast packet sent by any device in a first device group according to the RPF entry. When one network device in the first device group fails or a link corresponding to the network device fails, the network device may forward a multicast packet delivered by another network device corresponding to a normal link in the first device group according to the RPF entry. This shortens the service recovery time when one network device in the device group that forwards the multicast packet fails.
[0097] The RPF entry is not particularly limited in this embodiment of the present application. In a possible implementation, the first sub-entry in the RPF entry may be a correspondence between an identifier of a second network device (e.g., the IP address of the second network device) and a multicast source group (S, G) corresponding to the first multicast packet. The second sub-entry in the RPF entry may be a correspondence between an identifier of a third network device (e.g., the IP address of the third network device) and a multicast source group (S, G) corresponding to the first multicast packet. In another possible implementation, the RPF entry may further include a correspondence between an identifier of the first device group and a multicast source group (S, G) corresponding to the first multicast packet, a correspondence between an identifier of the second device group and an identifier of the first device group (first sub-entry), and a correspondence between an identifier of the third network device and an identifier of the first device group (second sub-entry). The first device group includes a second network device and a third network device.
[0098] Hereinafter, using the application scenario shown in FIG. 1, and with reference to the embodiments of FIG. 4A and FIG. 4B, a specific implementation of the packet forwarding method provided in this embodiment of the present application will be described in detail.
[0099] 4A and 4B are schematic flow charts illustrating another packet forwarding method according to an embodiment of the present application. As shown in FIG. 4A and 4B, the method may include steps 410 to 478. Steps 410 to 478 will be described in detail separately.
[0100] It should be appreciated that for ease of explanation, in Figures 4A and 4B, an explanation is provided using an example in which L1 receives an S1G1 multicast join message.
[0101] Step 410: R1 sends a device identifier to L1.
[0102] Step 415: R2 sends the device identifier to L1.
[0103] In a possible implementation, in this embodiment of the present application, the device identifiers (e.g., internet protocol (IP) addresses) of R1 / R2 may be configured. R1 / R2 may be used as a first device group.
[0104] For example, the network including R1 / R2, P1 / P2, and L1 / L2 is an internet protocol version 4 (IPv4) network. The configuration on R1 and R2 is as follows:
[0105] [Table 1]
[0106] In the configuration on R1, "Ip addr 192.168.1.101" indicates IP address 1 of the interface of R1, and "Multicast mvpn-id 192.168.1.101" indicates that the IP address specified based on the mvpn-id in the BGP MVPN will be used as R1's IP address 1 in the MVPN message route. In the configuration on R2, "Ip addr 192.168.1.102 32" indicates IP address 2 of the interface of R2, and "Multicast mvpn-id 192.168.1.102" indicates that the IP address specified based on the mvpn-id in the BGP MVPN will be used as R2's IP address 2 in the MVPN message route.
[0107] The “Ip addr 192.168.1.100” configured on R1 and R2 indicates the identifier of the first device group, i.e., IP address 0, and “Anycast-rpf 192.168.1.100” indicates that IP address 0 is used to identify any one of multiple addresses during the RPF check.
[0108] Please note that "Ip addr 192.168.1.100" is optional. In other words, "Ip addr 192.168.1.100" may be configured on R1 and R2 when the RPF entry is a correspondence between a multicast packet and an identifier of the first device group.
[0109] In another example, the network including R1 / R2, P1 / P2, and L1 / L2 is an internet protocol version 6 (IPv6) network. The configuration on R1 and R2 is as follows:
[0110] [Table 2]
[0111] In the configuration on R1, "Ipv6 addr 2001:DB1::101" indicates IPv6 address 1 of the interface of R1, and "Multicast mvpn-id 2001:DB1::101" indicates that the IP address specified based on the mvpn-id in the BGP MVPN will be used as R1's IPv6 address 1 in the MVPN message route. In the configuration on R2, "Ipv6 addr 2001:DB1::102" indicates IPv6 address 2 of the interface of R2, and "Multicast mvpn-id 2001:DB1::102" indicates that the IP address specified based on the mvpn-id in the BGP MVPN will be used as R2's IPv6 address 2 in the MVPN message route.
[0112] The “IPv6 addr 2001:DB1::100” configured on R1 and R2 indicates the identifier of the first device group, i.e., IPv6 address 0, and “Anycast-rpf 2001:DB1::100” indicates that IPv6 address 0 is used to identify any one of multiple addresses during the RPF check.
[0113] Please note that "Ipv6 addr 2001:DB1::100" is optional. In other words, "Ipv6 addr 2001:DB1::100" may be configured on R1 and R2 when the RPF entry is a correspondence between a multicast packet and an identifier of the first device group.
[0114] There are multiple specific implementations for R1 and R2 to send device identifiers to L1. In the following, we take R1 as an example to detail several possible implementations for R1 to send IP addresses to L1.
[0115] In a possible implementation, R1 may include IP address 1 in the advertised BGP-MVPN routes. For example, R1 may include IP address 1 in the inclusive provider multicast service interface auto-discovery (I-PMSI AD) routes of the BGP-MVPN. In another example, R1 may include IP address 1 in the selective provider multicast service interface auto-discovery (S-PMSI AD) routes of the BGP-MVPN. Optionally, R1 may include IP address 0 in the advertised BGP-MVPN routes.
[0116] Specifically, in one example, R1 sends IP address 1 and IP address 0 to L1 using message 1. A possible structure of message 1 is as follows: message 1={MP_REACH_NLRI attribute<Type1, RD, IP address 1> , Extended_Community attribute<Type2, IP address 0 >}
[0117] Type1 identifies the type of I-PMSI AD route or the type of S-PMSI AD route. RD is a route-distinguisher that distinguishes different VPN instances. IP address 1 is "192.168.1.101" in this embodiment. Type2 identifies the anycast-rpf address object. IP address 0 is "192.168.1.100" in this embodiment.
[0118] Similarly, R2 may include IP address 2 in the BGP-MVPN I-PMSI AD route or the BGP-MVPN S-PMSI AD route. Optionally, R2 may include IP address 0 in the BGP-MVPN I-PMSI AD route or the BGP-MVPN S-PMSI AD route. For details, please refer to the above description. Details will not be repeated here.
[0119] In another possible implementation, R1 may include IP address 1 in the advertised BGP-EVPN route. For example, R1 may include IP address 1 in the BGP-EVPN inclusive multicast Ethernet tag route (IMET). In another example, R1 may include IP address 1 in the BGP-EVPN selective provider multicast service interface auto-discovery (S-PMSI AD) route. Optionally, R1 may include IP address 0 in the advertised BGP-EVPN route.
[0120] Specifically, in one example, another possible structure for message 1 is as follows: message 1={MP_REACH_NLRI attribute<Type1, RD, IP address 1> , Extended_Community attribute<Type2, IP address 0 >}
[0121] Type1 identifies the type of IMET route or the type of S-PMSI AD route. RD is a route-distinguisher that distinguishes different VPN instances. IP address 1 is "192.168.1.101" in this embodiment. Type2 identifies the anycast-rpf address object. IP address 0 is "192.168.1.100" in this embodiment.
[0122] Similarly, R2 may include IP address 2 in the BGP-EVPN IMET route or BGP-MVPN S-PMSI AD route. Optionally, R2 may include IP address 0 in the BGP-EVPN IMET route or BGP-MVPN S-PMSI AD route. For details, please refer to the above description. Details will not be repeated here.
[0123] Step 420: L1 stores the device identifier information of R1 / R2.
[0124] L1 may receive message 1 and message 2 sent from R1 and R2, respectively. The messages may be BGP-MVPN route messages, such as an I-PMSI AD route message or an S-PMSI AD route message, or may be BGP-EVPN route messages, such as an IMET route message or an S-PMSI AD route message.
[0125] In a possible implementation, if message 1 received by L1 contains IP address 1 and message 2 contains IP address 2, L1 may store IP address 1 and IP address 2.
[0126] In another possible implementation, if message 1 received by L1 includes IP address 1 and IP address 0, and message 2 includes IP address 2 and IP address 0, L1 may establish the following mapping relationship: Mapping relationship 1 (IP address 1, IP address 0), and Mapping relationship 2(IP address 2, IP address 0).
[0127] In another possible implementation, if message 1 received by L1 includes IPv6 address 1 and IPv6 address 0, and message 2 includes IPv6 address 2 and IPv6 address 0, then L1 may establish the following mapping relationship: Mapping relationship 3 (IPv6 address 1, IPv6 address 0), and Mapping relationship 4(IPv6 address 2, IPv6 address 0).
[0128] Step 430: L1 receives the S1G1 multicast join message sent from H1.
[0129] The S1G1 multicast join message received by L1 may be an IGMP message or an MLD message, which is not limited in this application. For details, please refer to the above description. Details will not be repeated in this specification.
[0130] Step 440: L1 establishes an RPF entry.
[0131] L1 multicasts from H1 to S1G1 Participation Canada messageAfter receiving S1G1, L1 selects a UMH node corresponding to S1G1. The UMH node is a node from which the L1 node expects to receive S1G1 multicast traffic. Specifically, L1 may obtain the UMH information according to the unicast route to S1. For example, L1 may learn that the next hop of the unicast route to S1 is primary next-hop IP address 1 or secondary next-hop IP address 2. In this case, L1 expects the S1G1 multicast traffic to come from IP address 1.
[0132] L1, in this embodiment of the present application, may forward multicast packets sent from either IP address 1 or IP address 2. Specifically, in one example, L1 may be configured such that L1 may forward multicast packets sent from either IP address 1 or IP address 2.
[0133] For example, if the network including R1 / R2, P1 / P2, and L1 / L2 is an IPv4 network, the configuration on L1 is as follows:
[0134] [Table 3]
[0135] In another example, if the network including R1 / R2, P1 / P2, and L1 / L2 is an IPv6 network, the configuration on L1 is as follows:
[0136] [Table 4]
[0137] "ip vpn vpn1" indicates that a VPN instance is configured, and "ipv4-family" indicates that a VPN IPv4 address family, also called VPNv4, is configured. Alternatively, "ipv6-family" indicates that a VPN IPv6 address family, also called VPNv6, may be configured. "Mvpn" indicates that mvpn is enabled for the VPN instance, which is also called an MVPN instance. "Anycast-rpf enable" indicates that anycast-rpf is enabled. In other words, the anycast-rpf information included in the message sent from R1 / R2 may be processed to identify any one of multiple IP addresses, or an object (e.g., the identifier of the first device group, i.e., IP address 0, in this embodiment of the present application) may be used during the RPF check.
[0138] Please note that "Anycast-rpf enable" is optional. In other words, this configuration may not be set. By default, the system processes the anycast-rpf information included in the received message sent from R1 / R2.
[0139] In this application, based on the configuration "Anycast-rpf enable", after L1 obtains the primary next-hop IP address 1 and the secondary next-hop IP address 2, L1 expects the S1G1 multicast traffic to come from either IP address 1 or IP address 2. Therefore, L1 establishes an RPF entry.
[0140] In the following, we use an example in which the network including R1 / R2, P1 / P2, and L1 / L2 is an IPv4 network.
[0141] The possible RPF entries are (S1, UMH<IP address 1, IP address 2> ) This RPF entry indicates to forward S1G1 multicast packets sent from the device corresponding to IP address 1 or to forward S1G1 multicast packets sent from the device corresponding to IP address 2.
[0142] Another possible RPF entry includes a first subentry and a second subentry. The first subentry indicates to forward S1G1 multicast packets sent from a device corresponding to IP address 1, (S1, UMH<IP address 1> The second subentry indicates that the S1G1 multicast packet sent from the device corresponding to IP address 2 is to be forwarded, (S1, UMH<IP address 2> ).
[0143] Optionally, if message 1 received by L1 contains IP address 1 and IP address 0, and message 2 contains IP address 2 and IP address 0, then L1 may create an RPF entry (S1, Anycast-UMH) based on mapping relationship 1 and mapping relationship 2 to indicate that L1 expects multicast traffic (S1, G1) to come from the device group identified by anycast IP address 0.<IP address 0 > ), (IP address 1, IP address 0), and (IP address 2, IP address 0). Anycast IP address 0 includes device R1, represented with IP address 1, and device R2, represented with IP address 2. IP address 0 may be used to identify either IP address 1 or IP address 0.
[0144] In the following, we use an example in which the network including R1 / R2, P1 / P2, and L1 / L2 is an IPv6 network.
[0145] A possible RPF entry is (S1, UMH< IPv6 address 1, IPv6 address 2>), which indicates to forward S1G1 multicast packets sent by the device corresponding to IPv6 address 1 or to forward S1G1 multicast packets sent by the device corresponding to IPv6 address 2.
[0146] Another possible RPF entry includes a first subentry and a second subentry. The first subentry is (S1, UMH< IPv6 address 1>) indicating forwarding S1G1 multicast packets sent from a device corresponding to IPv6 address 1. The second subentry is (S1, UMH< IPv6 address 2>) indicating forwarding S1G1 multicast packets sent from a device corresponding to IPv6 address 2.
[0147] Optionally, if message 1 received by L1 includes IPv6 Address 1 and IPv6 Address 0, and message 2 includes IPv6 Address 2 and IPv6 Address 0, L1 may determine whether or not the RPF entry (S1, Anycast-UMH<IPv6 address 0> ), (IPv6 address 1, IPv6 address 0), and (IPv6 address 2, IPv6 address 0). IPv6 address 0 may be used to identify either IPv6 address 1 or IPv6 address 0.
[0148] Step 450: L1 joins the multicast message to R1.
[0149] Step 451: L1 joins the multicast message to R2.
[0150] L1 joins the multicast using message 3. messageR1 and join the multicast using message 4. message may be sent to R2. 3 and message 4 It may be a BGP-MVPN message or a BGP-EVPN message.
[0151] Optionally, message 3 sent from L1 to R1 may further carry the IP address 1 of R1 to indicate that R1 has joined the multicast message R1 may then determine that the multicast join was sent to R1 and send a multicast join to the multicast source. Similarly, message 4 sent from L1 to R2 may further carry the IP address 2 of R2, so that R2 may decide to join the multicast source. message has been sent to R2 and may decide to send a multicast join to the multicast source.
[0152] Step 455: R1 joins the multicast message to the multicast source.
[0153] Step 456: R2 joins the multicast message to the multicast source.
[0154] In this embodiment of the present application, R1 or R2 joins the multicast message R1 and R2 may also send a multicast message to the multicast source. In other words, in this embodiment, only step 455 may be performed, only step 456 may be performed, or both steps 455 and 456 may be performed.
[0155] Step 460: The multicast source sends an S1G1 multicast data packet to R1.
[0156] In this application, the multicast source may transmit the S1G1 multicast data packet to both R1 and R2. Alternatively, the multicast source may transmit the S1G1 multicast data packet to one of the nodes R1 and R2. In other words, the multicast source may transmit the S1G1 multicast data packet to R1, or may transmit the S1G1 multicast data packet to R2.
[0157] For ease of explanation, in FIG. 4A and FIG. 4B, an example is provided in which a multicast source sends a S1G1 multicast data packet to R1.
[0158] In a possible implementation, the interface of the multicast source may be configured as an Eth-trunk interface, and the multicast traffic of the multicast source is sent to either R1 or R2. Specifically, the two interfaces used to connect the multicast source to R1 / R2 may be configured as Eth-trunk interfaces. Optionally, the interface of R1 / R2 also needs to be configured as an Eth-trunk interface in some systems. The multicast source sends S1G1 multicast data packets to only one of the interfaces connected to R1 / R2.
[0159] In another possible implementation, both R1 and R2 are multicast participants. message A multicast router may send a multicast packet to the multicast source to ingest the multicast packet to R1 and R2. In this case, R1 / R2 will determine whether any of them will forward the multicast packet based on mutual messages between the devices. And Make a decision.
[0160] In another possible implementation, R1 / R2 may receive multicast packets from a multicast source using one anycast IP address. For example, the multicast packet is encapsulated in a unicast packet, and the destination address of the unicast packet is the anycast IP address. In this way, the multicast packet reaches either R1 or R2, not multiple devices. It should be understood that in this implementation, the unicast packet received by either R1 or R2 includes an outer IP header. R1 or R2 decapsulates the packet when the destination address in the outer IP header in the unicast packet is R1 or R2, and obtains the inner S1G1 multicast data packet.
[0161] Please note that this anycast IP address may be the same as the anycast IP address 0 used for anycast RPF above, or it may be different. This is not particularly limited in this application.
[0162] Please note that for ease of explanation, in FIG. 4A and FIG. 4B, an explanation is provided using an example in which a multicast source sends a S1G1 multicast data packet to R1.
[0163] Step 470: R1 sends the S1G1 multicast data packet to L1.
[0164] Optionally, in one example, R1 may have the following configuration:
[0165] [Table 5]
[0166] "ip vpn vpn1" indicates that a VPN instance is configured, "ipv4-family" indicates that a VPN IPv4 address family, also called VPNv4, is configured. "ipv6-family" indicates that a VPN IPv6 address family, also called VPNv6, is configured. "Mvpn" indicates that MVPN is enabled for the VPN instance, which is also called an MVPN instance. "sender enable" indicates that a node used as a sender of MVPN multicast may forward multicast packets sent from a multicast source. "Anycast-rpf enable" indicates that anycast-rpf is enabled. It can be seen that if "sender-enable" is configured, messages sent from the node to the leaf nodes may carry anycast-rpf information.
[0167] R1 transmits the S1G1 multicast data packets to L1 through the core network in multiple ways. In a possible implementation, R1 may transmit the S1G1 multicast data packets to L1 through a point-to-multipoint (P2MP) tunnel. In another possible implementation, R1 may transmit the S1G1 multicast data packets to L1 through a bit index explicit replication (BIER) multi-protocol label switching (MPLS) tunnel. In another possible implementation, R1 may transmit the S1G1 multicast data packets to L1 through a BIER internet protocol version 6 (BIERv6) tunnel.
[0168] For example, R1 may send an S1G1 multicast data packet to L1 through a P2MP tunnel. The S1G1 multicast data packet may be encapsulated in the following format: (P2MP label, IP packet <s1g1>)
[0169] The P2MP label encapsulated when R1 sends an S1G1 multicast data packet to L1 to the next hop node is a label assigned to the P2MP tunnel by the next hop node between the R1 node and the L1 node. For example, the P1 node encapsulated when R1 sends an S1G1 multicast data packet to P1 is a label assigned to the P2MP tunnel by P1. The P2MP label encapsulated when P1 sends an S1G1 multicast data packet to L1 to the next hop node is a label assigned to the P2MP tunnel by the next hop node between the P1 node and the L1 node. For example, the L1 node encapsulated when P1 sends an S1G1 multicast data packet to L1 is a label assigned to the P2MP tunnel by L1. The P2MP tunnel is a forwarding, etc. Price Russ (forwarding equivalence A P2MP tunnel may be identified using a label class (FEC). The FEC of a P2MP tunnel includes the IP address of the head node and the tunnel ID. For example, (head node R1, tunnel ID=1) is an FEC, and (head node R1, tunnel ID=2) is another FEC. A node assigns labels to a P2MP tunnel, which means that the node generates labels corresponding to the FECs, for example, and assigns the label Label1 to (head node R1, tunnel ID=1) and the label Label2 to (head node R1, tunnel ID=2).
[0170] For example, R1 may send an S1G1 multicast data packet to L1 through a BIER-MPLS tunnel. The S1G1 multicast data packet may be encapsulated in the following format: (BIER Header, Optional VpnLabel, IP packet <s1g1>)
[0171] The BIER label in the BIER header encapsulated when R1 sends a multicast data packet to L1 to the next hop node is the label assigned to the BIER tunnel by the next hop node between the R1 node and the L1 node. For example, the P1 node encapsulated when R1 sends a S1G1 multicast data packet to P1 is the BIER label assigned to the BIER tunnel by P1. The BIER label in the BIER header encapsulated when P1 sends a S1G1 multicast data packet to L1 to the next hop node is the label assigned to the BIER tunnel by the next hop node between the P1 node and the L1 node. For example, the L1 node encapsulated when P1 sends a S1G1 multicast data packet to L1 is the BIER label assigned to the BIER tunnel by L1. The BIER tunnel or the BIER label may correspond to a triplet and may be identified by the triplet (sub-domain-id, bit string length (BSL), and set identifier (SI)). For example, L1 assigns label Label1 to triplet (0,256,0) and P1 assigns label Label2 to triplet (0,256,0). When R1 sends a packet with triplet (0,256,0) to P1, it encapsulates label Label2 as BIER label in the BIER header. P1 learns the triplet (0,256,0) corresponding to the packet based on Label2 and encapsulates label Label1 as BIERLabel in the BIER header when it forwards the packet to L1 based on BIER.
[0172] For example, R1 may send an S1G1 multicast data packet to L1 through a BIERv6 tunnel. The S1G1 multicast data packet may be encapsulated in the following format: (outer IPv6, outer IPv6 extension header <with BIER header>, IP packet <s1g1>)
[0173] The source address in the outer IPv6 encapsulated by R1 is the IPv6 address of the R1 node, the bit position corresponding to the L1 node in the BitString in the BIER header is 1, and the packet sent by R1 is sent to L1 using P1.
[0174] Step 475: L1 determines whether to forward the S1G1 multicast data packet delivered from R1 according to the RPF entry.
[0175] Specifically, L1 performs an anycast RPF check after receiving the S1G1 multicast data packet.
[0176] In a possible implementation, L1 receives a multicast data packet from a P2MP tunnel, and L1 learns the IP address that is the actual source of the packet based on the P2MP label. For example, the P2MP label in the packet received by L1 is Label1, and L1 learns the corresponding (FEC <ip address of head node r1="IP" 1,tunnel id="1">, P2MP Label=Label1). In this case, L1 may know based on Label1 that the packet actually comes from IP address 1. L1 learns that the IP address that is the actual source of the packet can be mapped to IP address 0, i.e., the device group that is the actual source of the packet, according to mapping relationship 1. L1 learns that the expected UMH for the packet is IP address 0, based on the expected Anycast-UMH in the RPF entry. If the two UMHs are the same, the RPF check is successful and L1 may forward the multicast data packet to H1.
[0177] In another possible implementation, L1 receives a multicast data packet from a BIER tunnel, and L1 learns the IP address that the packet actually originates from based on the BIER header. For example, the BIER label in the BIER header of the packet received by L1 is Label1, and L1 stores the correspondence (<0,256,0>,BIER Label=Label1). In this case, L1 may know that the packet corresponds to the triplet <0,256,0> based on Label1. L1 learns the BFIR-id=X in the BIER header, the Sub-domain-id=0 corresponding to the packet, and the corresponding IP address stored in L1.<Sub-domain-id=0,BFIR-id=X,BFIR-prefix=IP address 1> L1 may obtain that the packet actually comes from IP address 1. L1 learns that the IP address from which the packet actually comes may be mapped to IP address 0 according to mapping relationship 1. L1 learns that the expected UMH for the packet is IP address 0 based on the expected Anycast-UMH in the RPF entry. If the two UMHs are the same, then the RPF check is successful and L1 may forward the multicast data packet to H1.
[0178] In another possible implementation, L1 receives a multicast data packet from a BIERv6 tunnel, and L1 learns the actual source IP address of the packet based on the source address in the outer IPv6 header. For example, the source address in the outer IPv6 header of the packet received by L1 is IPv6 address 1. L1 learns that the actual source IP address of the packet can be mapped to IPv6 address 0 according to mapping relationship 3. L1 learns that the expected UMH for the packet is IPv6 address 0 based on the expected Anycast-UMH in the RPF entry. If the two UMHs are the same, the RPF check is successful, and L1 may forward the multicast data packet to H1.
[0179] Step 478: L1 forwards the multicast data packet to H1.
[0180] Optionally, in some embodiments, the failure of the communication link between L1 and the multicast source may be understood as the failure of node R1, the failure of the link between node R1 and the multicast source, or the failure of the link between R1 and P1 / P2. As shown in Figure 4B, the method may further include steps 480 to 497. Hereinafter, steps 480 to 497 will be described in detail separately.
[0181] Step 480: The multicast source sends an S1G1 multicast data packet to R2.
[0182] It should be understood that if the communication link between R1 and the multicast source is broken, for example, as shown in Figure 1, if the device CE1 is broken or the communication link between CE1 and the multicast source is broken, the multicast source may send a multicast data packet to R2, and R2 will send the multicast data packet to L1. The specific implementation of determining the above failure will be described in detail below.
[0183] For example, it is determined that the R1 node is faulty. In this application, if the multicast source detects that the state of the interface connected to R1 is down, the R1 node may be determined to be faulty. The multicast source does not need to send any more multicast data packets to the R1 node. Optionally, if the multicast source detects that the state of the interface connected to R2 is up, the multicast source may also send multicast data packets to R2.
[0184] For example, it is determined that the link between R1 and P1 or the link between R1 and P2 is broken. After R1 detects that the state of the interface of R1 is down, R1 may disable the link between R1 and the multicast source, so that the multicast source detects that the state of the interface connected to R1 is down and the state of the interface connected to R2 is up. In this case, the multicast source sends a multicast data packet to R2.
[0185] Optionally, in some embodiments, after R1 detects that the state of its interface is down, and before R1 disables the link between R1 and the multicast source, the following configurations may be further performed:
[0186] [Table 6]
[0187] Step 490: R2 sends the S1G1 multicast data packet to L1.
[0188] Optionally, in one example, R2 may have the following configuration:
[0189] [Table 7]
[0190] These configurations are similar to the configurations on R1 in step 470. For details, please refer to the explanation of the setting information in step 470. The details will not be described again in this specification.
[0191] After receiving the S1G1 multicast data packet, R2 encapsulates the multicast data packet based on the MVPN configuration on R2, and sends the packet to L1 through the core network. 2 sends S1G1 multicast data packets to L1 through the core network in multiple ways. 2 sends S1G1 multicast data packets to L1 through a P2MP tunnel. In another possible implementation, R 2 may send S1G1 multicast data packets to L1 through a BIER-MPLS tunnel. 2 may send S1G1 multicast data packets to L1 through the BIERv6 tunnel. The specific implementation is similar to the implementation in step 470. For details, please refer to the description of step 470. In this specification, the details are not described again.
[0192] Step 495: L1 determines whether to forward the S1G1 multicast data packet delivered from R2 according to the RPF entry.
[0193] Specifically, L1 performs an anycast RPF check after receiving the S1G1 multicast data packet.
[0194] In a possible implementation, L1 receives a multicast data packet from a P2MP tunnel, and L1 learns the IP address that is the actual source of the packet based on the P2MP label. For example, the P2MP label in the packet received by L1 is Label2, and L1 learns the corresponding (FEC <ip address of head node r1="IP" 2,tunnel id="1">, P2MP Label=Label2). In this case, L1 may know based on Label2 that the packet actually comes from IP address 2. L1 learns that the expected UMH for the packet is IP address 0 based on the expected Anycast-UMH in the RPF entry. If the two UMHs are the same, the RPF check is successful and L1 may forward the multicast data packet to H1.
[0195] In another possible implementation, L1 receives a multicast data packet from a BIER tunnel, and L1 learns the IP address that the packet actually originates from based on the BIER header. For example, the BIER label in the BIER header of the packet received by L1 is Label1, and L1 stores the correspondence (<0,256,0>,BIER Label=Label1). In this case, L1 may know that the packet corresponds to the triplet <0,256,0> based on Label1. L1 learns the BFIR-id=Y in the BIER header, the Sub-domain-id=0 corresponding to the packet, and the correspondence stored in L1.<Sub-domain-id=0,BFIR-id=Y,BFIR-prefix=IP address 2> L1 may obtain that the packet actually comes from IP address 2. L1 learns that the IP address from which the packet actually comes may be mapped to IP address 0 according to mapping relationship 2. L1 learns that the expected UMH for the packet is IP address 0 based on the expected Anycast-UMH in the RPF entry. If the two UMHs are the same, then the RPF check is successful and L1 may forward the multicast data packet to H1.
[0196] In another possible implementation, L1 receives a multicast data packet from a BIERv6 tunnel, and L1 learns the actual source IPv6 address of the packet based on the outer IPv6 header, e.g., source address, i.e., IPv6 address 2 in the outer IPv6 header of the packet received by L1. L1 learns that the actual source IP address of the packet can be mapped to IPv6 address 0 according to mapping relationship 4. L1 learns that the expected UMH for the packet is IPv6 address 0 based on the expected Anycast-UMH in the RPF entry. If the two UMHs are the same, the RPF check is successful, and L1 may forward the multicast data packet to H1.
[0197] Step 497: L1 forwards the multicast data packet to H1.
[0198] In the above technical solution, on the one hand, when there is no failure, the traffic sent from the multicast source is sent only to R1, and only R1 sends the traffic to L1 through the core network. Therefore, there is only one copy of the multicast traffic in the core network, and there is no need to use another copy of the multicast traffic. On the other hand, when the link between the R1 node and the multicast source is broken, the traffic sent from the multicast source is sent only to R2, and only R2 sends the traffic to L1 through the core network, and R2 does not need to wait for L1 to send a multicast join message. This can implement faster service recovery.
[0199] Hereinafter, using the scenario shown in FIG. 2 as an example, and with reference to the embodiments of FIG. 5A and FIG. 5B, a specific implementation of the packet forwarding method provided in the embodiments of the present application will be described in detail.
[0200] 5A and 5B are schematic flow charts illustrating another packet forwarding method according to an embodiment of the present application. As shown in FIG. 5A and 5B, the method may include steps 510 to 595. Hereinafter, steps 510 to 595 will be described in detail separately.
[0201] Step 510: R1 sends a device identifier to L1.
[0202] Step 511: R2 sends a device identifier to L1.
[0203] Step 520: L1 stores the device identifier information of R1 / R2.
[0204] Step 530: L1 receives the S1G1 multicast join message sent from H1.
[0205] Step 540: L1 establishes an RPF entry.
[0206] Step 550: L1 joins the multicast message to R1.
[0207] Step 551: L1 joins the multicast message to R2.
[0208] Step 555: R1 joins the multicast message to the multicast source.
[0209] Step 556: R2 joins the multicast message to the multicast source.
[0210] Step 560: R1 sends the common IP address identifier of R1 / R2 to SW.
[0211] Step 561: R2 sends the common IP address identifier of R1 / R2 to SW.
[0212] Please note that step 560 and step 561 are optional. The common IP address identifier of R1 / R2 may also be configured on SW in this embodiment of the present application.
[0213] In some embodiments, for example, R1 / R2 in the segmented MVPN further sends the common IP address identifier of R1 / R2 to SW. SW may statically configure the common IP address identifier of R1 and R2. In this application, the common IP address identifier may be, for example, IP address 0, or another common identifier (for example, an integer). For ease of explanation, the following will be described using an example in which IP address 0 (192.168.1.100) in the above configuration example is used as the common IP address identifier of R1 / R2.
[0214] In a possible implementation, R1 / R2 may include IP address 0 in the advertised BGP-MVPN route. For example, R1 / R2 may include IP address 0 in the BGP-MVPN I-PMSI AD route. In another example, R1 / R2 may further include IP address 0 in the BGP-MVPN S-PMSI AD route.
[0215] In another possible implementation, R1 / R2 may include IP address 0 in the advertised BGP-EVPN route. For example, R1 / R2 may include IP address 0 in the BGP-MVPN IMET route. In another example, R1 / R2 may further include IP address 0 in the BGP-EVPN S-PMSI AD route.
[0216] The format of the message is similar to the structure of message 1 or message 2 in step 410. For details, please refer to the description of step 410. Details will not be repeated here.
[0217] In another possible implementation, the common IP address or anycast address of R1 and R2 may be statically configured on the SW and used as a destination address for SW to send packets to a device group including R1 and R2. For example, SW may configure the destination address of a generic routing encapsulation (GRE) tunnel as the common IP address of R1 and R2, in which case SW encapsulates the multicast data packet into the GRE tunnel, i.e., encapsulates the outer IP header and the GRE header into the multicast data packet. Here, the destination address in the outer IP header is the anycast address of R1 and R2.
[0218] It should be understood that for ease of explanation, in FIG. 5A and FIG. 5B, an explanation is provided using an example in which R1 sends a common IP address identifier SW of R1 / R2.
[0219] Step 570: The multicast source sends an S1G1 multicast data packet to the SW.
[0220] Step 580: SW sends the S1G1 multicast data packet to R1.
[0221] In the scenario of FIG. 2, the multicast source may first send a S1G1 multicast data packet to the SW, and the SW encapsulates an outer unicast IP header into the S1G1 multicast data packet, where the destination address in the outer unicast IP header is the common IP address identifier of R1 / R2. For example, the SW encapsulates an outer unicast IP header into the S1G1 multicast data packet, where the destination address in the outer unicast IP header is IP address 0 (192.168.1.100). After receiving the packet sent from the SW, either of R1 / R2 decapsulates the packet based on whether the destination address in the outer IP header of the packet is either of R1 / R2 to obtain the inner S1G1 multicast data packet. Either of R1 / R2 sends the S1G1 multicast data packet to L1 through the core network.
[0222] For ease of explanation, in FIG. 5A and FIG. 5B, an example is provided in which SW sends a S1G1 multicast data packet to R1.
[0223] Step 585: R1 sends the S1G1 multicast data packet to L1.
[0224] This step corresponds to step 470. For details, please refer to the description of step 470. Details will not be repeated here.
[0225] Step 590: L1 determines whether to forward the S1G1 multicast data packet delivered from R1 according to the RPF entry.
[0226] Step 595: L1 forwards the multicast data packet to H1.
[0227] This step corresponds to step 478. For details, please refer to the description of step 478. Details will not be repeated here.
[0228] In the scenario of Fig. 2, if the communication link between L1 and the multicast source is broken, where the communication link failure can be understood as R1 is broken, device CE1 is broken, SW device is broken, or the link between R1 and P1 / P2 is broken, then the multicast source may send a multicast data packet to R2, and R2 sends the multicast data packet to L1. The specific implementation method corresponds to steps 480 to 497 in Fig. 4A and Fig. 4B. For details, please refer to the description of Fig. 4A and Fig. 4B. The details will not be repeated in this specification.
[0229] Above, the packet forwarding method provided in the embodiment of the present application has been described in detail with reference to Figures 1 to 5A and 5B. Hereinafter, the device embodiment of the present application will be described in detail with reference to Figures 6 to 8. It should be understood that the description of the method embodiment corresponds to the description of the device embodiment. Therefore, for the parts not described in detail, please refer to the method embodiment.
[0230] 6 is a schematic diagram showing the structure of a first network device 600 according to an embodiment of the present application. The first network device 600 shown in FIG. 6 may perform the corresponding steps performed by the first network device in the method of the above embodiment. As shown in FIG. 6, the first network device 600 includes a receiving module 610, a determining module 620, and a sending module 630.
[0231] The receiving module 610 is configured to receive a first multicast packet transmitted from a multicast source device and forwarded by a first device group, where the first device group includes a second network device and a third network device, and the first multicast packet is forwarded to the first network device by one network device in the first multicast group.
[0232] The determination module 620 determines, according to a reverse path forwarding RPF entry, that the first multicast packet is a multicast packet forwarded by the first device group, where the RPF entry includes a first sub-entry and a second sub-entry, and the first sub-entry instructs the first network device to forward the first multicast packet sent from the second network device. The second sub-entry instructs the first network device to forward the first multicast packet sent from the third network device.
[0233] The sending module 630 is configured to send the first multicast packet to the multicast destination device according to the RPF entry.
[0234] In possible implementation, the first communication link is in a normal state. The first communication link is a communication link from a multicast source device to a second network device and from there to the first network device. The sending module 630 is specifically configured to send a first multicast packet to a multicast destination device according to the first sub-entry.
[0235] In another possible implementation, the second communication link is in a normal state. The second communication link is a communication link from a multicast source device to a third network device and from there to the first network device. The receiving module 610 is specifically configured to receive a first multicast packet forwarded via the first communication link. The metric of the first communication link is less than the metric of the second communication link.
[0236] In another possible implementation, when the first communication link is in a failed state and the second communication link is in a normal state, the transmitting module 630 is specifically configured to transmit the first multicast packet to the multicast destination device according to the second sub-entry.
[0237] In another possible implementation, the receiving module 610 is further configured to receive first control information transmitted from a second network device, where the first control information includes a second identifier, and the second identifier is an identifier of the second network device. The first network device further includes a generating module configured to generate a first sub-entry based on the second identifier, where the first sub-entry is a correspondence between the second identifier and a multicast source group (S, G) corresponding to the first multicast packet. The receiving module is further configured to receive second control information transmitted from a third network device, where the second control information includes a third identifier, and the third identifier is an identifier of the third network device. The generating module is further configured to generate a second sub-entry based on the third identifier, where the second sub-entry is a correspondence between the third identifier and a multicast source group (S, G) corresponding to the first multicast packet.
[0238] In another possible implementation, the second identifier and the third identifier are Internet Protocol IP addresses or Internet Protocol version 6 IPv6 addresses.
[0239] In another possible implementation, the first device group identifier is an IP address, an IPv6 address, or an integer.
[0240] In another possible implementation, the first control information further includes a first device group identifier. The second control information further includes a first device group identifier. The first device group identifier is an identifier of a first device group. The determining module 620 is specifically configured to determine an RPF entry based on the first device group identifier.
[0241] 7 is a schematic diagram showing the structure of a first device group 700 according to an embodiment of the present application. The first device group 700 shown in FIG. 7 may perform the corresponding steps performed by the first device group in the method of the above embodiment. As shown in FIG. 7, the first device group 700 includes a transmission module 710.
[0242] The transmitting module 710 is configured to transmit the second identifier and the first device group identifier to the first network device using a second network device in the first device group, where the first device group includes the second network device and a third network device, the second identifier is an identifier of the second network device, and the first device group identifier is an identifier of the first device group.
[0243] The transmitting module 710 is further configured to transmit, with a third network device in the first device group, the third identifier and the first device group identifier to the first network device, where the third identifier is an identifier of the third network device, and the second identifier, the third identifier, and the first device group identifier are used to trigger the first network device to generate a reverse path forwarding RPF entry based on the second identifier, the third identifier, and the first device group identifier, the RPF entry including a first sub-entry and a second sub-entry, where the first sub-entry instructs the first network device to forward the first multicast packet transmitted from the second network device in the first device group, and the second sub-entry instructs the first network device to forward the first multicast packet transmitted from the third network device in the first device group.
[0244] In a possible implementation, the first device group 700 further includes a receiving module 720 configured to receive, using the network devices in the first device group, the first multicast packet transmitted from the multicast source device. The transmitting module is further configured to forward, using the network devices in the first device group, the first multicast packet to the first network devices.
[0245] In another possible implementation, the transmitting module 710 is specifically configured to receive, using network devices in a first device group, a unicast packet transmitted from a multicast source, where the first multicast packet is encapsulated in the unicast packet.
[0246] In another possible implementation, the destination address of the unicast packet is the first device group identifier.
[0247] In another possible implementation, the first communication link is in a normal state. The first communication link is a communication link from the multicast source device to the second network device and from there to the first network device. The sending module 710 is specifically configured to forward the first multicast packet received from the multicast source device to the first network device by using the second network device in the first device group.
[0248] In another possible implementation, the second communication link is in a normal state. The second communication link is a communication link from the multicast source device to the third network device and from there to the first network device. The metric of the first communication link is less than the metric of the second communication link.
[0249] In another possible implementation, when the first communication link is in a failed state and the second communication link is in a normal state, the transmitting module 710 is specifically configured to forward the first multicast packet received from the multicast source device to the first network device using a third network device in the first device group.
[0250] In another possible implementation, the first device group identifier is an IP address, an IPv6 address, or an integer.
[0251] 8 is a schematic diagram showing a hardware structure of a first network device 2000 according to an embodiment of the present application. The first network device 2000 shown in FIG. 8 may perform the corresponding steps performed by the first network device in the method of the above embodiment.
[0252] 8, the first network device 2000 includes a processor 2001, a memory 2002, an interface 2003, and a bus 2004. The interface 2003 may be implemented wirelessly or wired, and may be specifically a network adapter. The processor 2001, the memory 2002, and the interface 2003 are connected via the bus 2004.
[0253] The interface 2003 may specifically include a transmitter and a receiver, and is configured for the first network device to perform the above-mentioned receiving and transmitting. For example, the interface 2003 is configured to support receiving a first multicast packet sent from a multicast source device and forwarded by a first device group. In another example, the interface is configured to support sending the first multicast packet to a multicast destination device according to the RPF entry. In another example, the interface is configured to support sending the first multicast packet to a multicast destination device according to the second sub-entry.
[0254] The processor 2001 is configured to perform the processing performed by the first network device in the above-mentioned embodiment. For example, the processor is configured to determine that the first multicast packet is a multicast packet forwarded by the first device group according to a reverse path forwarding RPF entry, generate a first sub-entry based on a second identifier, generate a second sub-entry based on a third identifier, and / or perform other processes for the techniques described herein.
[0255] For example, the processor 2001 is configured to support steps 410 to 495 in FIG. 4A and FIG. 4B. The memory 2002 includes an operating system 20021 and an application 20022, and is configured to store programs, codes, or instructions. When executing the programs, codes, or instructions, the processor or hardware device may complete the processing process of the first network device in the embodiment of the method. Optionally, the memory 2002 may include a read-only memory (ROM) and a random access memory (RAM). The ROM includes a basic input / output system (BIOS) or an embedded system, and the RAM includes an application and an operating system. When the first network device 2000 needs to run, the boot loader of the BIOS or the embedded system embedded in the ROM is used to boot and start the system and boot the first network device 2000 into a normal run state. After entering the normal running state, the first network device 2000 runs the applications and the operating system in the RAM to complete the processing process of the first network device 2000 in the method embodiment.
[0256] It can be understood that Fig. 8 only shows a simplified design of the first network device 2000. In practical applications, the first network device may include any number of interfaces, processors, or memories.
[0257] 9 is a schematic diagram showing a hardware structure of another first network device 2100 according to an embodiment of the present application. The first network device 2100 shown in FIG. 9 can perform the corresponding steps performed by the first network device in the method of the above embodiment.
[0258] As shown in FIG. 9, the first network device 2100 includes a main control board 2110, an interface board 2130, a switching board 2120 and an interface board 2140. The main control board 2110, the interface boards 2130 and 2140 and the switching board 2120 are connected to a system backboard via a system bus to interoperate. The main control board 2110 is configured to complete functions such as system management, device maintenance and protocol processing. The switching board 2120 is configured to exchange data between the interface boards (the interface boards are also called line cards or service boards). The interface boards 2130 and 2140 are configured to provide various service interfaces (e.g., a POS interface, a GE interface and an ATM interface) and forward data packets.
[0259] The interface board 2130 may include a central processing unit 2131, a forwarding entry memory 2134, a physical interface card 2133, and a network processor 2132. The central processing unit 2131 is configured to control and manage the interface board and communicate with the central processing unit on the main control board. The forwarding entry memory 2134 is configured to store RPF entries. The physical interface card 2133 is configured to receive and transmit traffic. The network Processor 2132 is configured to control the physical interface card 2133 to receive and transmit traffic based on the entries.
[0260] Specifically, the physical interface card 2133 is configured to receive a first multicast packet sent from a multicast source device and forwarded by a first device group. After receiving the first multicast packet, the physical interface card 2133 uses the central processing unit 2131 to send the first multicast packet to the central processing unit 2111. The central processing unit 2111 processes the first multicast packet.
[0261] The central processing unit 2111 is further configured to determine, according to the reverse path forwarding RPF entry, that the first multicast packet is a multicast packet forwarded by the first device group, and / or perform other processes for the techniques described herein.
[0262] It should be understood that in this embodiment of the present application, the operations on the interface board 2140 are not inconsistent with the operations on the interface board 2130. For the sake of brevity, details will not be described. It should be understood that the first network device 2100 of this embodiment may correspond to the functions and / or various steps performed in the method embodiments. Details will not be repeated here.
[0263] It should be further noted that there may be one or more main control boards, and when there are multiple main control boards, the main control boards may include an active main control board and a standby main control board. There may be one or more interface boards. A first network device with stronger data processing capability provides more interface boards. There may be one or more physical interface cards on the interface board. There may be no switching board or there may be one or more switching boards. When there are multiple switching boards, both load sharing and redundant backup may be implemented. In a centralized forwarding architecture, the first network device may not need a switching board, and the interface board provides the function of processing service data of the entire system. In a distributed forwarding architecture, the first network device may have at least one switching board, and data exchange between multiple interface boards is implemented using the switching board to provide large-volume data exchange and processing capability. Thus, the data access and processing capability of the first network device in the distributed architecture is better than that of the device in the centralized architecture. The specific architecture used depends on the specific networking deployment scenario. This is not limited in this specification.
[0264] The embodiment of the present application further provides a computer-readable medium configured to store a computer program. The computer program includes instructions used to execute the method in any possible implementation of any one of the above aspects. The readable medium may be a read-only memory (ROM) and a random access memory (RAM). This is not limited in the embodiment of the present application.
[0265] An embodiment of the present application further provides a computer program product, applied to a first network device, the computer program product comprising a series of instructions, which when executed cause the first network device to perform an operation of the method according to the aforementioned aspect.
[0266] An embodiment of the present application further provides a computer program product, applied to a first device group, the computer program product comprising a series of instructions that, when executed, perform operations of the first device group in the method according to the aforementioned aspect.
[0267] It should be understood that the sequence numbers of the above processes do not mean the order of execution in various embodiments of the present application. The order of execution of the processes shall be determined according to the functions and internal logic of those processes, and should not be construed as any limitation on the implementation process of the embodiments of the present application.
[0268] Those skilled in the art may realize that the units and algorithm steps may be implemented by electronic hardware, or a combination of computer software and electronic hardware, in combination with the examples described in the embodiments disclosed herein. Whether a function is executed by hardware or software depends on the specific application field and design constraints of the technical solution. Those skilled in the art may use various methods to implement the described functions for each specific application field, but the implementation should not be considered to go beyond the scope of the present application.
[0269] For the sake of convenience and concise description, the detailed operation processes of the above-mentioned systems, devices and units may be referred to the corresponding processes in the method embodiments, which can be clearly understood by those skilled in the art, and the details will not be described repeatedly in this specification.
[0270] In some embodiments provided in the present application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the described device embodiment is merely an example. For example, the division into units is merely a division of logical functions, and other divisions may be possible in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not implemented. Furthermore, the shown or described mutual couplings or direct couplings or communication connections may be implemented through some interfaces. Indirect couplings or communication connections between devices or units may be implemented in electronic, mechanical, or other forms.
[0271] The units described as separate parts may or may not be physically separated, and the parts shown as units may or may not be physical units, may be located in one location, or may be distributed over multiple network units. Some or all of these units may be selected according to actual requirements to achieve the objectives of the solutions of the embodiments.
[0272] Furthermore, the functional units in the embodiments of the present application may be integrated into a single processing unit, each of the units may exist physically alone, or two or more units may be integrated into a single unit.
[0273] When functions are implemented in the form of a software functional unit and sold or used as an independent product, these functions may be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application, the part contributing to the prior art, or part of these technical solutions may be implemented in the form of a software product. The computer software product includes some instructions stored in a storage medium, instructing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. The aforementioned storage medium includes any medium that can store program code, a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0274] The above description is merely a specific implementation of the present application, and is not intended to limit the scope of protection of the present application. Any variation or replacement that is easily apparent to a person skilled in the art within the technical scope disclosed in the present application shall be included in the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the scope of protection of the claims.< / ip> < / ip>
Claims
1. 1. A packet forwarding method, comprising: receiving, by a first network device, first control information transmitted by a second network device, the first control information including a second identifier, the second identifier being an identifier of the second network device; the first network device generating a first sub-entry based on the second identifier, the first sub-entry being a correspondence between the second identifier and multicast source group (S, G) information corresponding to a first multicast packet; receiving, by the first network device, second control information transmitted by a third network device, the second control information including a third identifier, the third identifier being an identifier of the third network device; the first network device generating a second sub-entry based on the third identifier, the second sub-entry being a correspondence between the third identifier and multicast source group (S, G) information corresponding to the first multicast packet; receiving, by a first network device, a first multicast packet transmitted by a multicast source device and forwarded by a first device group, the first device group including a second network device and a third network device, the first multicast packet being forwarded to the first network device by one network device in the first device group; the first network device determining, according to multicast source group (S, G) information included in the first multicast packet and a reverse path forwarding (RPF) entry, that the first multicast packet is a multicast packet forwarded by the first device group, the RPF entry instructing the first network device to forward the first multicast packet sent by a network device in the first device group, the RPF entry including the first sub-entry and the second sub-entry, the first sub-entry instructing the first network device to forward the first multicast packet sent by the second network device, and the second sub-entry instructing the first network device to forward the first multicast packet sent by the third network device; the first network device sending the first multicast packet to a multicast destination device according to the RPF entry; A packet forwarding method comprising:
2. a first communication link is in a normal state, the first communication link being a communication link from the multicast source device to the second network device and from there to the first network device; The step of the first network device transmitting the first multicast packet to a multicast destination device according to the RPF entry includes:
2. The method of claim 1, comprising the step of: the first network device transmitting the first multicast packet to the multicast destination device according to the first sub-entry.
3. a second communication link is in a normal state, the second communication link being a communication link from the multicast source device to the third network device and from there to the first network device; The step of receiving, by the first network device, a first multicast packet transmitted by a multicast source device and forwarded by a first device group, comprises:
3. The method of claim 2, comprising the step of the first network device receiving the first multicast packet forwarded over the first communications link, wherein a metric of the first communications link is less than a metric of the second communications link.
4. When the first communication link is in a fault state and the second communication link is in a normal state, The step of the first network device transmitting the first multicast packet to a multicast destination device according to the RPF entry includes:
2. The method of claim 1, comprising the step of: the first network device transmitting the first multicast packet to the multicast destination device according to the second sub-entry.
5. The method of claim 4 , wherein the second identifier and the third identifier are Internet Protocol (IP) addresses or Internet Protocol version 6 (IPv6) addresses.
6. the first control information further includes a first device group identifier, the second control information further includes the first device group identifier, the first device group identifier being an identifier of the first device group, and the method further comprises: The method of claim 4 or 5, further comprising the step of the first network device identifying the RPF entry based on the first device group identifier when the RPF entry is established.
7. The method of claim 6 , wherein the first device group identifier is an IP address, an IPv6 address, or an integer. The method described.
8. A first network device, a receiving module configured to receive a first multicast packet transmitted by a multicast source device and forwarded by a first device group, the first device group including a second network device and a third network device, the first multicast packet being forwarded to the first network device by one network device in the first device group; and a determination module configured to determine that the first multicast packet is a multicast packet forwarded by the first device group according to multicast source group (S, G) information and a reverse path forwarding (RPF) entry included in the first multicast packet, the RPF entry instructing the first network device to forward the first multicast packet sent by a network device in the first device group, the RPF entry including a first sub-entry and a second sub-entry, the first sub-entry instructing the first network device to forward the first multicast packet sent by the second network device, and the second sub-entry instructing the first network device to forward the first multicast packet sent by the third network device; and a transmitting module configured to transmit the first multicast packet to a multicast destination device according to the RPF entry; Equipped with The receiving module is further configured to receive first control information transmitted by the second network device, the first control information including a second identifier, the second identifier being an identifier of the second network device; a generating module configured to generate the first sub-entry based on the second identifier, the first sub-entry being a correspondence between the second identifier and multicast source group (S, G) information corresponding to the first multicast packet; The receiving module is further configured to receive second control information transmitted by the third network device, the second control information including a third identifier, the third identifier being an identifier of the third network device; The generating module is further configured to generate the second sub-entry based on the third identifier, the second sub-entry being a correspondence between the third identifier and multicast source group (S, G) information corresponding to the first multicast packet. A first network device.
9. a first communication link is in a normal state, the first communication link being a communication link from the multicast source device to the second network device and from there to the first network device; The first network device of claim 8 , wherein the transmission module is specifically configured to transmit the first multicast packet to the multicast destination device according to the first sub-entry.
10. a second communication link is in a normal state, the second communication link being a communication link from the multicast source device to the third network device and from there to the first network device; The first network device of claim 9, wherein the receiving module is specifically configured to receive the first multicast packet forwarded via the first communications link, and a metric of the first communications link is less than a metric of the second communications link.
11. When the first communication link is in a fault state and the second communication link is in a normal state, The first network device of claim 8 , wherein the transmission module is specifically configured to transmit the first multicast packet to the multicast destination device according to the second sub-entry.
12. The first network device of claim 11 , wherein the second identifier and the third identifier are Internet Protocol (IP) addresses or Internet Protocol version 6 (IPv6) addresses.
13. the first control information further includes a first device group identifier, the second control information further includes the first device group identifier, the first device group identifier being an identifier of the first device group; The first network device according to claim 11 or 12, wherein the determination module is specifically configured to identify the RPF entry based on the first device group identifier when the RPF entry is established.
14. The first network device of claim 13 , wherein the first device group identifier is an IP address, an IPv6 address, or an integer.
15. A first network device comprising a processor and a memory, the memory configured to store a program, and the processor configured to call the program from the memory and run the program to execute the method of any one of claims 1 to 7.
16. A computer readable storage medium comprising a computer program, which when run on a computer enables the computer to carry out the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Path calculation method, and path calculation program
JP2004023179A
Communication system, and communication control method
JP2012054861A
Method and apparatus at multiple rendezvous points for collaboratively processing multicast traffic from a mobile multicast source
JP2012529198A
Multicast distribution system, router, and multicast distribution method
JP2013118537A
Method, device and system for protecting multicast traffic
US20100091648A1
