WO2021164245A1 - 负载分担的方法、第一网络设备 - Google Patents

负载分担的方法、第一网络设备 Download PDF

Info

Publication number
WO2021164245A1
WO2021164245A1 PCT/CN2020/116048 CN2020116048W WO2021164245A1 WO 2021164245 A1 WO2021164245 A1 WO 2021164245A1 CN 2020116048 W CN2020116048 W CN 2020116048W WO 2021164245 A1 WO2021164245 A1 WO 2021164245A1
Authority
WO
WIPO (PCT)
Prior art keywords
load sharing
network device
bier
message
link
Prior art date
Application number
PCT/CN2020/116048
Other languages
English (en)
French (fr)
Inventor
谢经荣
夏阳
刘学海
张峰
秦苏林
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021164245A1 publication Critical patent/WO2021164245A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/16Multipoint routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/122Avoiding congestion; Recovering from congestion by diverting traffic away from congested entities

Definitions

  • This application relates to the field of network communication, and more specifically, to a method for load sharing and a first network device.
  • IP multicast technology realizes point-to-multipoint efficient data transmission in an IP network, which can effectively save network bandwidth and reduce network load. For this reason, the industry has proposed a new technology for constructing multicast data forwarding paths, called bit indexed explicit replication (BIER) technology, which proposes a new technology that does not require Construct the multicast technology architecture of the multicast distribution tree.
  • BIER bit indexed explicit replication
  • bit index forwarding table In the process of forwarding BIER packets, a bit index forwarding table (BIFT) needs to be established so that nodes in the BIER domain can forward according to the BIFT and the bit string carried in the BIER header to achieve the original Multicast data packets can be sent to all destination addresses.
  • BIFT bit index forwarding table
  • the present application provides a load sharing method and a first network device, which can reduce the overhead of BIFT table entries and save memory space while realizing load balancing.
  • a load sharing method which includes: a first network device determines a first load sharing group corresponding to a BFR neighbor of a first forwarding router of the first network device according to a bit index forwarding table BIFT, and The first load sharing group includes at least two link interfaces between the first network device and the first BFR neighbor, and the at least two link interfaces are used to forward bit index-based Explicitly copy the BIER message; the first network device performs a modulo operation on the number of available link interfaces in the first load sharing group according to the header information of the BIER message to obtain the The first link interface in the first load sharing group; the first network device forwards the BIER message to the first BFR neighbor through the first link interface.
  • link interface of the network device in the available state (up) in this application can be understood as the link of the network device is normal and packet forwarding can be performed.
  • the link interface of the network device being in an unavailable state (down) can be understood as a link failure of the network device, and packet forwarding cannot be performed.
  • the first link interface of the first network device may serve as a member in the first load sharing group, and all link interfaces in the first load sharing group may be in an available state or may be in a partially unavailable state.
  • the number of link interfaces in the first load sharing group may be an integer greater than 1, which is not specifically limited in this application.
  • member may refer to an interface between a network device in a load sharing group and a load sharing link, and the interface includes an Ethernet port.
  • the embodiment of the present application does not specifically limit the header information of the BIER message.
  • the message header information is the value of the entropy field in the BIER header.
  • the message header information is the value of the flow label field in the IPv6 header, or is based on the value of the flow label field. Value is the result of hashing the value of the source IP address field in the IPv6 header.
  • multiple parallel links between the two nodes can be configured as a parallel link group, and in a BIFT entry according to the next The hop BFR neighbor determines a parallel link group, and then selects a link in the parallel link group to forward the BIER message through the modulo algorithm.
  • the hop BFR neighbor determines a parallel link group, and then selects a link in the parallel link group to forward the BIER message through the modulo algorithm.
  • the first network device may directly receive the BIER message, and forward the BIER message to the first BFR neighbor through the first link interface.
  • what the first network device receives is a multicast packet
  • the first network device may also perform BIER encapsulation on the multicast packet to obtain a BIER packet, and pass the first The link interface forwards the BIER message to the first BFR neighbor.
  • the method before the first network device determines the first load sharing group corresponding to the BFR neighbor of the first forwarding router of the first network device according to the bit index forwarding table BIFT, the method It also includes: the first network device generates a first index routing table BIRT, the first BIRT contains the identifier of the first BFR neighbor and the identifier of the first load sharing group; the first network device The BIFT is established according to the first BIRT.
  • BIRT bit index routing table
  • BFR-NBR BFR neighbor
  • BIRT may also include the next hop out interface information to reach the BFR-NBR.
  • the technical solution also includes that, in the BIRT before generating the BIFT entry, the identifier of the first BFR neighbor and the identifier of the first load sharing group are included.
  • the method further includes: the first network device generates a second BIRT, and the second BIRT includes the identifier of the second BFR neighbor of the first network device and the second BIRT
  • the identifier of the load sharing group, the second load sharing group includes at least two link interfaces between the first network device and the second BFR neighbor, and the at least two link interfaces are used to load
  • the BIER message is forwarded in a sharing manner; the first network device establishes the BIFT according to the second BIRT, and the BIFT includes the second BFR neighbor and the second load sharing group.
  • the method further includes: the first network device determines the first state table entry corresponding to the first load sharing group according to the identifier of the first load sharing group, the The first status table entry includes the number of link interfaces in the first load sharing group whose status is available.
  • the BIER message includes a BIER header and an inner multicast message
  • the message header information is the value of the entropy field in the BIER header.
  • the BIER message includes an Internet Protocol version 6 IPv6 header and an inner multicast message
  • the IPv6 header includes a source IP address field and a flow label field
  • the message header information It is the value of the flow label field, or the result obtained by hashing the value of the source IP address field according to the value of the flow label field.
  • the method further includes: if the state of the first link interface is unavailable, the first network device performs the first load sharing group according to the header information of the BIER message In the first load sharing group, the number of link interfaces whose status is available is modulo arithmetic to obtain the second link interface that forwards the BIER packet in the first load sharing group; the first network device connects The BIER message is forwarded to the first BFR neighbor.
  • the method further includes: the first network device determines that the state of the first link interface is unavailable according to the state of each link interface in the first load sharing group.
  • the state of each link interface in the first load sharing group is a bit string with K bits, where K is a positive integer greater than 1, and in the bit string The position of each bit represents a link interface in the first load sharing group, the value of the bit represents the status information of the link interface, and the first network device according to the corresponding link interface in the bit string The value of the bit determines that the state of the first link interface is unavailable.
  • a first network device including:
  • the determining module is configured to determine the first load sharing group corresponding to the BFR neighbor of the first forwarding router of the first network device according to the bit index forwarding table BIFT, and the first load sharing group includes the first network device and the At least two link interfaces between the neighbors of the first BFR, where the at least two link interfaces are used to forward an explicit copy BIER message based on a bit index in a load sharing manner;
  • the determining module is further configured to perform a modulo operation on the number of available link interfaces in the first load sharing group according to the header information of the BIER message to obtain the first load sharing group The first link interface in
  • the sending module is configured to forward the BIER message to the first BFR neighbor through the first link interface.
  • the link interface of the network device is in an available state (up), which can be understood as the link of the network device is normal and packet forwarding can be performed.
  • the link interface of the network device being in an unavailable state (down) can be understood as a link failure of the network device, and packet forwarding cannot be performed.
  • the first link interface of the first network device may serve as a member in the first load sharing group, and all link interfaces in the first load sharing group may be in an available state or may be in a partially unavailable state.
  • the number of link interfaces in the first load sharing group may be an integer greater than 1, which is not specifically limited in this application.
  • member may refer to an interface between a network device in a load sharing group and a load sharing link, and the interface includes an Ethernet port.
  • the embodiment of the present application does not specifically limit the header information of the BIER message.
  • the message header information is the value of the entropy field in the BIER header.
  • the message header information is the value of the flow label field in the IPv6 header, or is based on the value of the flow label field. Value is the result of hashing the value of the source IP address field in the IPv6 header.
  • the first network device further includes: a receiving module, configured to receive the BIER message.
  • the receiving module is configured to receive a multicast message
  • the first network device further includes an encapsulation module configured to perform BIER encapsulation on the multicast message to obtain a BIER message .
  • it also includes:
  • a generating module configured to generate a first index routing table BIRT, the first BIRT containing the identifier of the first BFR neighbor and the identifier of the first load sharing group;
  • the generating module is further configured to establish the BIFT according to the first BIRT.
  • the generating module is further configured to: generate a second BIRT, the second BIRT containing the identifier of the second BFR neighbor of the first network device and the second load sharing group
  • the second load sharing group includes at least two link interfaces between the first network device and the second BFR neighbor, and the at least two link interfaces are used for load sharing Forward the BIER message;
  • the generating module is further configured to: establish the BIFT according to the second BIRT, and the BIFT further includes the second BFR neighbor and the second load sharing group.
  • the determining module is further configured to determine a first state table entry corresponding to the first load sharing group according to the identifier of the first load sharing group, and the first state table The item includes the number of available link interfaces in the first load sharing group.
  • the BIER message includes a BIER header and an inner multicast message
  • the message header information is the value of the entropy field in the BIER header.
  • the BIER message includes an Internet Protocol version 6 IPv6 header and an inner multicast message
  • the IPv6 header includes a source IP address field and a flow label field
  • the message header information It is the value of the flow label field, or the result obtained by hashing the value of the source IP address field according to the value of the flow label field.
  • the determining module is further configured to: if the state of the first link interface is unavailable, according to the header information of the BIER message, the state in the first load sharing group is Perform a modulo operation on the number of available link interfaces to obtain the second link interface that forwards the BIER packet in the first load sharing group;
  • the sending module is further configured to forward the BIER message to the first BFR neighbor through the second link interface.
  • the determining module is further configured to determine that the state of the first link interface is unavailable according to the state of each link interface in the first load sharing group.
  • the state of each link interface in the first load sharing group is a bit string with K bits, where K is a positive integer greater than 1, and in the bit string The position of each bit indicates a link interface in the first load sharing group, and the value of this bit indicates the status information of the link interface.
  • the determining module is specifically configured to determine that the state of the first link interface is unavailable according to the value of the bit corresponding to the first link interface in the bit string.
  • a first network device in a third aspect, includes a processor, a memory, an interface, and a bus.
  • the interface can be implemented in a wireless or wired manner, specifically, it can be a network card.
  • the above-mentioned processor, memory and interface are connected by a bus.
  • the interface may specifically include a transmitter and a receiver, which are used by the first network device to implement the foregoing transmission and reception.
  • this interface is used to support the explicit copy of the BIER message of the received bit index.
  • the interface is used to support forwarding the BIER message to the first BFR neighbor through the first link interface.
  • the interface is used to support forwarding the BIER message to the first BFR neighbor through the second link interface.
  • the processor is used to execute the processing performed by the first network device in the foregoing embodiment.
  • the processor is configured to determine the first load sharing group corresponding to the BFR neighbor of the first forwarding router of the first network device according to the bit index forwarding table BIFT; and/or other processes used in the technology described herein.
  • the memory includes an operating system and application programs, which are used to store programs, codes, or instructions. When the processor or hardware device executes these programs, codes, or instructions, the processing process involving the first network device in the method embodiment can be completed.
  • the memory may include read-only memory (ROM) and random access memory (RAM).
  • the ROM includes a basic input/output system (BIOS) or an embedded system
  • the RAM includes an application program and an operating system.
  • the system is booted by the BIOS solidified in the ROM or the bootloader in the embedded system to guide the first network device into a normal operating state.
  • the application program and the operating system run in the RAM, thereby completing the processing procedure involving the first network device in the method embodiment.
  • the processor is used to execute:
  • the first load sharing group corresponding to the BFR neighbor of the first forwarding router of the first network device according to the bit index forwarding table BIFT, where the first load sharing group includes the first network device and the first BFR At least two link interfaces between neighbors, where the at least two link interfaces are used to forward an explicit duplicate BIER message based on a bit index in a load sharing manner; according to the pair of message header information of the BIER message Perform a modulo operation on the number of link interfaces in the first load sharing group whose status is available to obtain the first link interface in the first load sharing group; The message is forwarded to the first BFR neighbor.
  • multiple parallel links between the two nodes can be configured as a parallel link group, and in a BIFT entry according to the next The hop BFR neighbor determines a parallel link group, and then selects a link in the parallel link group to forward the BIER message through the modulo algorithm.
  • the hop BFR neighbor determines a parallel link group, and then selects a link in the parallel link group to forward the BIER message through the modulo algorithm.
  • the method before the first network device determines the first load sharing group corresponding to the BFR neighbor of the first forwarding router of the first network device according to the bit index forwarding table BIFT, the method further includes: generating a first index routing table BIRT, where the first BIRT includes the identifier of the first BFR neighbor and the identifier of the first load sharing group; and establishing the BIFT according to the first BIRT.
  • BIRT bit index routing table
  • BFR-NBR BFR neighbor
  • BIRT may also include the next hop out interface information to reach the BFR-NBR.
  • the technical solution also includes that, in the BIRT before generating the BIFT entry, the identifier of the first BFR neighbor and the identifier of the first load sharing group are included.
  • the method further includes: generating a second BIRT, the second BIRT containing the identifier of the second BFR neighbor of the first network device and the identifier of the second load sharing group,
  • the second load sharing group includes at least two link interfaces between the first network device and the second BFR neighbor, and the at least two link interfaces are used to forward the BIER message;
  • the BIFT is established according to the second BIRT, and the BIFT further includes the second BFR neighbor and the second load sharing group.
  • the method further includes: determining, according to the identifier of the first load sharing group, a first state table entry corresponding to the first load sharing group, in the first state table entry Including the number of link interfaces in the first load sharing group whose status is available.
  • the BIER message includes a BIER header and an inner multicast message
  • the message header information is the value of the entropy field in the BIER header.
  • the BIER message includes an Internet Protocol version 6 IPv6 header and an inner multicast message
  • the IPv6 header includes a source IP address field and a flow label field
  • the message header information It is the value of the flow label field, or the result obtained by hashing the value of the source IP address field according to the value of the flow label field.
  • the method further includes: if the state of the first link interface is unavailable, the state in the first load sharing group is available according to the header information of the BIER message Perform modulo operation on the number of link interfaces to obtain the second link interface that forwards the BIER packet in the first load sharing group; forward the BIER packet to the first BFR through the second link interface Neighbor.
  • the method further includes: determining that the state of the first link interface is unavailable according to the state of each link interface in the first load sharing group.
  • the state of each link interface in the first load sharing group is a bit string with K bits, where K is a positive integer greater than 1, and in the bit string The position of each bit represents a link interface in the first load sharing group, the value of the bit represents the status information of the link interface, and the first network device according to the corresponding link interface in the bit string The value of the bit determines that the state of the first link interface is unavailable.
  • the first network device may include any number of interfaces, processors or memories.
  • a computer program product includes computer program code, which when the computer program code runs on a computer, causes the computer to execute the methods in the foregoing aspects.
  • a computer-readable medium stores program code, which when the computer program code runs on a computer, causes the computer to execute the methods in the above-mentioned aspects.
  • These computer-readable storages include but are not limited to one or more of the following: read-only memory (ROM), programmable ROM (programmable ROM, PROM), erasable PROM (erasable PROM, EPROM), Flash memory, electrically EPROM (electrically EPROM, EEPROM) and hard drive (harddrive).
  • a chip in a sixth aspect, includes a processor and a data interface, wherein the processor reads instructions stored in a memory through the data interface to execute the first aspect or any one of the possible implementation manners of the first aspect In the method.
  • the chip can be based on central processing unit (CPU), microcontroller (microcontroller unit, MCU), microprocessor (microprocessing unit, MPU), digital signal processing (digital signal processing, DSP). ), system on chip (SoC), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or programmable logic device (PLD) The form of realization.
  • a system which includes the above-mentioned first network device.
  • Fig. 1 is a schematic networking diagram of a BIER technology provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a BIER header format provided by an embodiment of the present application.
  • Figure 3 is a process of establishing a BIER forwarding table and forwarding BIER messages based on BIER technology.
  • Fig. 4 is a schematic diagram of a BIERv6 encapsulated message format provided by an embodiment of the present application.
  • Fig. 5 is a schematic diagram of possible application scenarios applicable to this application.
  • FIG. 6 is a schematic flowchart of a load sharing method provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a first network device 700 provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of the hardware structure of the first network device 2000 according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of the hardware structure of another first network device 2100 according to an embodiment of the present application.
  • Multicast is a method of sending data to multiple transmission control protocol (transmission control protocol, TCP)/Internet protocol (Internet protocol, IP) networks at the same time in an efficient manner by using a multicast address.
  • the multicast source sends the multicast stream to the members of the multicast group in the multicast group via the link in the network, and all the members of the multicast group in the multicast group can receive the multicast stream.
  • the multicast transmission mode realizes the point-to-multipoint data connection between the multicast source and the members of the multicast group. Because the multicast stream only needs to be delivered once on each network link, and the multicast will be replicated only when there is a branch on the link. Therefore, the multicast transmission method improves the data transmission efficiency and reduces the possibility of congestion in the backbone network.
  • IP multicast technology realizes point-to-multipoint efficient data transmission in an IP network, which can effectively save network bandwidth and reduce network load. Therefore, it has a wide range of applications in many aspects such as real-time data transmission, multimedia conferences, data copying, interactive network television (internet protocol television, IPTV), games and simulation.
  • the multicast technology uses a multicast protocol to construct a control plane multicast tree, and then uses the multicast tree to logically tree the network plane to realize multicast point-to-multipoint data forwarding.
  • This kind of intermediate nodes with the construction of a distribution tree as the core needs to maintain the state of complex multicast forwarding information.
  • this kind of multicast technology is facing increasing costs and challenges in operation and maintenance.
  • bit indexed explicit replication BIER
  • BFR bit-forwarding router
  • BIER domain A multicast forwarding domain composed of the above-mentioned one or more BFRs.
  • BIER domain A multicast forwarding domain composed of the above-mentioned one or more BFRs.
  • BIER domain A multicast forwarding domain composed of the above-mentioned one or more BFRs.
  • BIER domain A multicast forwarding domain composed of the above-mentioned one or more BFRs.
  • BIER domain BIER domain
  • BFIR BIER forwarding ingress router
  • the BFR that decapsulates the original multicast data message from the BIER message is called the BIER forwarding egress router (BFER).
  • BFER BIER forwarding egress router
  • the above-mentioned edge BFR can be configured with a globally unique bit position identifier in the entire BIER subdomain (subdomain, SD).
  • a value can be configured for each edge BFR as a BFR identifier (BFRID).
  • BFRID can be a value between 1 and 256. All BFR IDs in the BIER domain form a bit string.
  • a possible BIER message format is: BIER header + original multicast data message.
  • BIER header For example, a possible BIER message format is: BIER header + original multicast data message.
  • a specific BIER header needs to be additionally encapsulated. All destination nodes of the original multicast data packet are marked in the form of bit string in the BIER header.
  • the BFR in the BIER domain can be forwarded according to the bit index forwarding table (BIFT) and the bit string carried in the BIER header to ensure that the original multicast data message can be sent to all destination addresses.
  • BIFT bit index forwarding table
  • the original multicast data packet following the BIER header can be an Internet Protocol Version 6 (IPv6) multicast packet, or it can also be Internet Protocol Version 4 (IPv4). Multicast packets.
  • IPv6 Internet Protocol Version 6
  • IPv4 Internet Protocol Version 4
  • FIG. 2 is a schematic block diagram of a possible BIER header format.
  • the BIER header can include but is not limited to: a bit index forwarding table identifier (BIFT ID) with a length of 20 bits, bit string length (BSL), 64 bit (8 Bytes), for example, the transmission type (traffic class, TC), traffic class (TC) field, entropy (entropy) field, and version number (version number) of the original multicast data packet following the BIER header , Ver), proto field, etc.
  • BIFT ID bit index forwarding table identifier
  • the length is 20 bits, which is a label (label, L) under the BIER-multi-protocol label switching (multiprotocol label switching, MPLS) encapsulation.
  • the BIFT ID can be a BIFT-id, and it can include a combination of sub-domain (SD)/bit string length (BSL)/set identifier (SI), and different BIFT IDs can correspond to Different SD/BSL/SI combinations.
  • a BIER domain can be configured as different sub-domain SD according to the requirements of actual business scenarios, and each sub-domain SD is represented by a sub-domain identifier (SD-ID). For example, the value of SD-ID is [0-255] and the length is 8 bits.
  • SD-ID sub-domain identifier
  • the BIER domain can be configured as different SDs, and different VPNs can be configured to use different SDs according to different services such as virtual private networks (virtual private networks, VPNs). For example, VPN 1 uses SD 0, and VPN 2 uses SD 1.
  • BSL is the length of the bit string included in the BIER header. There may be multiple types of BSL, which are not specifically limited in the embodiment of the present application. Specifically, the message is identified by 4 bits, for example, when the BSL is 64 bits, the message is identified by 0001, when the BSL is 128 bits, the message is identified by 0010, and when the BSL is 512 bits, the message The text is identified by 0100, and so on.
  • SI can be understood as a collection of multiple edge BFRs or configured BFR IDs in the network.
  • the BFR in the BIER domain can determine which SD the BIER message belongs to, the BSL used, and which SI group the message belongs to according to the BIFT ID in the BIER header.
  • the forwarding entry on which the forwarding plane forwards is based is based on the bit string in the message to determine which BFER the message is sent to.
  • the BFR can obtain the BIER message belongs to SD 0 according to the BIFT ID in the BIER header.
  • the BSL used in the BIER header is 256 bits and belongs to set 1 (including BFR).
  • the length is 4bit, which is the version number of the IP, the value 4 represents IPv4, and the value 6 represents IPv6.
  • the entropy of multiple packets belonging to one flow is the same, and the entropy of multiple packets of different flows is different.
  • packets are forwarded, different flows can be shared on different links based on entropy, and multiple packets of the same flow will go on the same link.
  • the proto field equal to 4 indicates that the original multicast data message behind the BIER header is an IPv4 message
  • the proto field equal to 6 indicates that the original multicast data message behind the BIER header is an IPv6 message.
  • Figure 3 is a process of establishing a BIER forwarding table and forwarding BIER messages based on BIER technology.
  • the BIER domain as shown in Figure 3 can include nodes PE1, PE2, PE3, PE4, P2, P3, where the nodes PE1, PE2, PE3, and PE4 belong to the edge BFR in the BIER domain, and the nodes P2 and P3 belong to the BIER intermediate forwarding nodes. .
  • the node PE1 is located at the entrance of the BIER domain and is responsible for BIER encapsulation of the original multicast data message, which corresponds to the BFIR in FIG. 1.
  • Nodes E2, PE3, and PE4 are located at the exit of the BIER domain, and are responsible for decapsulating the original multicast data message from the BIER message, which corresponds to the BFER in Figure 1.
  • a unique BFR-ID can be assigned to each edge BFR in the BIER domain.
  • the BFR-IDs configured for the node PE1, the node PE2, the node PE3, and the node PE4 are 1, respectively. 2, 3, 4.
  • the BFR forwarded in the middle, for example, the node P2 and the node P3 do not allocate the BFR-ID. Therefore, the BFR-ID corresponding to the node P2 and the node P3 is 0.
  • the bit string encapsulated in the BIER header of the data traffic marks all the destination nodes of the traffic. For example, the bit string corresponding to node D with BFR-ID 1 is 0001, the bit string corresponding to node F with BFR-ID 2 is 0010, the bit string corresponding to node E with BFR-ID 3 is 0100, and the bit string corresponding to node E with BFR-ID is 3 is 0100.
  • the bit string corresponding to node A with an ID of 4 is 1000.
  • the BFR-ID value assigned to the edge BFR in each BIER domain can be flooded to other BFRs in the BIER domain through a routing protocol, and the flooded BIER information also includes the IP address and encapsulation information of the edge BFR.
  • the flooded BIER information of the node PE1 will carry the IP address of the node PE1 and the BIFT-id.
  • the BFR in the BIER domain (for example, the nodes PE2, PE3, and PE4 in Figure 3) can establish BIFT entries based on the flooded BIER information, so that after the BFR in Figure 3 receives the BIER message, it can be based on the established BIFT entries To complete the forwarding of the BIER message to the destination node.
  • node PE1 For node PE1, if a BIER message needs to be sent to the BFER with BFR-IDs 2, 3, and 4, the BIER message needs to be sent to the neighbors of node PE1 (the neighbors of PE1 shown in Figure 3 have two One, namely nodes P2 and P3), the edge BFR with BFR-ID of 1 is itself, therefore, the BIFT entry established by node PE1 is as follows:
  • BIFT is used to indicate that when there is a BIER message in the bit string from right to left, the second bit and the third bit are 1, the BIER message will be sent to the neighbor of node PE1 (node P2) , And node P2 forwards the BIER message to node PE2 and node PE3 with BFR-IDs 2 and 3 respectively.
  • the bit string of a BIER message from right to left is 1, the BIER message will be sent to the neighbor of node PE1 (node P3), and node P3 will forward the BIER message to BFR-ID For the 4 node PE4.
  • Another possible BIER message format is: IPv6 header + BIER header + original multicast data message.
  • the BIER message format is a message format encapsulated by BIERv6.
  • the BIER header can be located in the IPv6 extension header.
  • the BIER header is used as the option type of the IPv6 extension header.
  • the options are composed of a type-length-value (type-length-value, TLV) structure, and the BIER header is used as The value part of TLV.
  • IPv6 header The fields included in the IPv6 header are described in detail below.
  • Version number (version, Ver): The version number of the IP, and the value is 6 for IPv6.
  • Traffic class (TC) field identifies the priority of the message
  • Flow label (FL) field multiple packets belonging to one flow can be labeled with the same flow label, and multiple packets with different flows can be labeled with another flow label value.
  • FL Flow label
  • the payload length (PL) field indicates the length of the message.
  • Next header indicates the type of the next header of the message, for example, it can represent an IPv6 extension header.
  • Hop limit (Hop Limit, HL) field indicates the limit on the number of packets.
  • Source address (SA) field Identifies the source address of the message.
  • DA Destination address
  • the node PE1 As the head node (ingress node) of the IPv6 network, the node PE1, after receiving the user multicast data message, encapsulates the message after the BIERv6 header, that is, after an outer layer Ipv6 header and an Ipv6 extension header containing the BIER header.
  • PE1 encapsulates the destination address of node P2. After node P2 receives the message, it copies the message to PE2 and PE3 according to the BIER header.
  • the message sent to PE2 will change the destination address of the Ipv6 header to the address of PE2, and the message sent to PE3 will change the IPv6 header.
  • the destination address is the destination address of PE3.
  • PE2 and PE3 receive the BIER packet, and according to the bitstring information in the BIER header contains the bit corresponding to their own BFRid value, they decapsulate the packet into an inner multicast data packet, and perform processing on the inner multicast data packet. Forward.
  • the message forwarding process where the next hop of the node PE1 is the node P3 is similar to the foregoing process. For details, please refer to the above description, which will not be repeated here.
  • the next hop of the node PE1 may have a node, for example, the node P2 in the second scenario.
  • the next hop of node PE1 may have at least two nodes, for example, node P2 and node P3 in scenario 1.
  • next hop of PE1 is two nodes P2 and P3, there are two parallel links between node PE1 and node P2, and there are three parallel links between node PE1 and node P3.
  • the link is described as an example.
  • next hop of PE1 is P2
  • next hop of node P2 is P3, and there are two parallel links between node P2 and node P3.
  • the link is described as an example.
  • BIFT forwarding tables may be required. In this way, the overhead of BIFT forwarding entries is relatively large and takes up a large amount of memory space.
  • the load sharing method provided in the embodiments of the present application can reduce the overhead of BIFT forwarding entries and save memory space when the traffic is evenly distributed on multiple parallel links.
  • a load sharing method provided by an embodiment of the present application will be described in detail with reference to FIG. 6.
  • FIG. 6 is a schematic flowchart of a load sharing method provided by an embodiment of the present application. As shown in FIG. 6, the method may include steps 610-630, and steps 610-630 will be described in detail below.
  • Step 610 The first network device determines the first load sharing group corresponding to the BFR neighbor of the first forwarding router of the first network device according to the bit index forwarding table BIFT.
  • the first network device may correspond to the node PE1 in FIG. 5, and the first BFR neighbor serves as one of the next-hop BFR neighbors of the node PE1.
  • the first load sharing group includes at least two link interfaces between the first network device and the first BFR neighbor, and the at least two link interfaces are used for forwarding in a load sharing manner The BIER message.
  • the link group ID1 has two members Link1 and Link2, and its member numbers are 1 and 2, respectively.
  • cfg-member-num indicates the number of configuration members of the parallel link
  • the interface can send BIER packets to the next-hop BFR neighbor P2 through any one of the two outgoing interfaces.
  • act-member-num represents the number of member links that are actually valid and UP.
  • link interface of the network device in the available state (up) in the embodiment of the present application can be understood as the link of the network device is normal and packet forwarding can be performed.
  • the link interface of the network device being in an unavailable state (down) can be understood as a link failure of the network device, and packet forwarding cannot be performed.
  • PE1 may refresh act-member-num and State ⁇ BS> in the parallel link group state table.
  • Step 620 The first network device performs a modulo operation on the number of available link interfaces in the first load sharing group according to the header information of the BIER message to obtain the first link interface in the first load sharing group .
  • the first network device may perform a modulo operation on the act-member-num in the parallel link group state table according to the header information of the BIER message to obtain the first link interface in the first load sharing group.
  • the first link interface of the first network device may serve as a member in the first load sharing group, and all link interfaces in the first load sharing group may be in an available state or may be in a partially unavailable state.
  • the number of link interfaces in the first load sharing group may be an integer greater than 1, which is not specifically limited in this application.
  • member may refer to an interface between a network device in a load sharing group and a load sharing link, and the interface includes an Ethernet port.
  • the embodiment of the present application does not specifically limit the header information of the BIER message.
  • the message header information is the value of the entropy field in the BIER header.
  • the message header information is the value of the flow label field in the IPv6 header, or is based on the value of the flow label field. Value is the result of hashing the value of the source IP address field in the IPv6 header.
  • the first network device may directly receive the BIER message, or, if the first network device receives a multicast message, the first network device may also perform BIER on the multicast message. Encapsulate to obtain the BIER message, which is not specifically limited in this application.
  • Step 630 The first network device forwards the BIER message to the first BFR neighbor through the first link interface.
  • multiple parallel links between two nodes can be configured as a parallel link group, and in a BIFT table entry according to the following One-hop BFR neighbors determine a parallel link group, and then select a link in the parallel link group to forward the BIER message through the modulo algorithm.
  • One-hop BFR neighbors determine a parallel link group, and then select a link in the parallel link group to forward the BIER message through the modulo algorithm.
  • the first network device may form the aforementioned BIFT.
  • BIRT bit index routing table
  • BFR-NBR BFR neighbor
  • BIRT can also include the next hop out interface information to reach the BFR-NBR.
  • the technical solution also includes that, in the BIRT before generating the BIFT entry, the identifier of the first BFR neighbor and the identifier of the first load sharing group are included.
  • the first network device if the first network device has multiple BFR neighbors.
  • the first network device will also generate a second BIRT, the second BIRT contains the identifier of the second BFR neighbor of the first network device and the identifier of the second load sharing group, and the first network device is based on the first network device. 2.
  • the BIRT establishes the BIFT, and the BIFT includes not only the correspondence between the identity of the first BFR neighbor and the identity of the first load sharing group, but also the identity of the second BFR neighbor and the identity of the second load sharing group. Correspondence between.
  • the first network device may also determine a first state table entry corresponding to the first load sharing group according to the identifier of the first load sharing group, and the first state table entry includes the first state table entry. The number of available link interfaces in a load sharing group.
  • Step 1 Configure the node PE1 to generate two parallel link groups and BIFT.
  • Link-group LG1 means parallel link group 1
  • Interface GigabitEthernet 1/0/1 member 1 means interface 1 on node PE1 in parallel link group 1, which serves as the parallel link group 1 A member, numbered 1
  • "Interface GigabitEthernet 1/0/2 member 2” represents the interface 2 in the parallel link group 1 on the node PE1, which is the other member of the parallel link group 1, and the number is 2.
  • "Link-Group LG2" means parallel link group 2
  • Interface GigabitEthernet 1/0/3 member 1 means interface 1 on node PE1 in parallel link group 2, which is a member of parallel link group 2.
  • Use Link-group LG1 means that the configuration node PE1 uses parallel link group 1 in the BIER forwarding process
  • Use Link-group LG2 means that the configuration node PE1 uses parallel link group 2 in the BIER forwarding process.
  • PE1 can generate the following BIFT based on the above configuration.
  • Step 2 The node PE1 receives the multicast data message, and forwards the BIER message according to BIFT.
  • PE1 encapsulates the BIER header for the multicast data message.
  • the bit string of the BIER header contains the position 1 corresponding to the node PE2/PE3/PE4, that is, the second, third, and fourth positions are 1, which is represented by 1110
  • the initial bit string of the BIER header is represented by 1110
  • PE1 forwards the message according to the above BIFT forwarding table, and determines that the message should be sent to P2 and the corresponding bit string should be ANDed with 0110, and a copy should be sent to P3 and the corresponding bit string should be ANDed with 1000 operate.
  • the bit string of the message is 1110
  • the result of ANDing with 0110 is 0110
  • the result of ANDing with 1000 is 1000.
  • PE1 selects the link in the parallel link group, it reads the parallel link group member state table to obtain the act-member-num value, and then according to the field value (BIER The message header information) modulates the act-member-num value to obtain the corresponding link.
  • BIER field value
  • the act-member-num value can be modulated according to the value of the Entropy field in the BIER header, and then the corresponding link can be obtained.
  • this method requires the PE1 node to encapsulate the BIER IPv6 header of the multicast data message, and encapsulate the corresponding Entropy field value of the BIER header during the multicast stream.
  • the value of act-member-num can be modulo the value of other fields in the BIER message.
  • the field value pair act in the IPv6 header can also be used.
  • -Member-num value modulo There are many specific implementation manners, which are not specifically limited in this application.
  • a multicast stream can be determined based on the IPv6 source address and flow label (flow label) fields, and a certain operation can be performed using these two field values to obtain a value.
  • a value can be obtained through a Hash operation, and then the act- The value of member-num is modulo.
  • the value of act-member-num can also be modulo the value of the flow label (flow label) field directly.
  • this method requires that when the PE1 node encapsulates the IPv6 header of the multicast data message, the corresponding IPv6 header stream label field value is encapsulated according to the multicast stream.
  • the embodiment of this application provides a method of using a parallel link group for each BFR_NBR outbound interface link in the BIER, and then selects a link from the link group for forwarding, thereby achieving uniform Under the premise of load sharing, the overhead of BIFT entries is reduced.
  • PE1 refreshes the link group status table. Specifically, the values of act-member-num and Ls ⁇ BS> of the parallel link group 1 may be refreshed.
  • PE1 forwards the received message as shown below.
  • PE1 encapsulates the BIER header for the multicast data message.
  • the bit string of the BIER header contains the position 1 corresponding to the node PE2/PE3/PE4, that is, the second, third, and fourth positions are 1, which is represented by 1110
  • the initial bit string of the BIER header is represented by 1110
  • PE1 forwards the message according to the above BIFT forwarding table, and determines that the message should be sent to P2 and the corresponding bit string should be ANDed with 0110, and a copy should be sent to P3 and the corresponding bit string should be ANDed with 1000 operate.
  • the bit string of the message is 1110
  • the result of ANDing with 0110 is 0110
  • the result of ANDing with 1000 is 1000.
  • steps 3 and 4 when PE1 selects the link in the parallel link group, it reads the parallel link group member state table to obtain the act-member-num value, and then pairs act-member-num according to the field value in the message -Member-num value is modulo to obtain the corresponding link.
  • PE1 selects the link in the parallel link group, it reads the parallel link group member state table to obtain the act-member-num value, and then pairs act-member-num according to the field value in the message -Member-num value is modulo to obtain the corresponding link.
  • the load sharing situation of PE1 for the received packets belonging to multicast stream 1 to multicast stream 12 is as follows.
  • the node implementing the load sharing method provided in the embodiments of the present application may be the same node as the node encapsulating the BIER header or the BIERv6 header, or may be a different node.
  • Step 1 Configure node PE1 to generate parallel link group 2 and BIFT.
  • PE1 can generate the following BIFT based on the above configuration.
  • Step 2 The node PE1 receives the multicast data message, and forwards the BIER message according to BIFT.
  • PE1 encapsulates the BIER header for the multicast data message.
  • the bit string of the BIER header contains the position 1 corresponding to the node PE2/PE3/PE4, that is, the second, third, and fourth positions are 1, which is represented by 1110
  • the initial bit string of the BIER header is represented by 1110
  • PE1 forwards the message according to the above BIFT forwarding table, determines that the message should be sent to P2 and the corresponding bit string needs to be ANDed with 1110; in this example, the bit string of the message is 1110, and 1110 is ANDed The final result is 1110.
  • step 3 when PE1 selects the link in the parallel link group, it reads the parallel link group member state table to obtain the act-member-num value, and then compares the act-member-num value according to the field value in the message.
  • the num value is modulo to obtain the corresponding link.
  • Step 3 Configure node P2 to generate parallel link group 1 and BIFT.
  • P2 can generate the following BIFT based on the above configuration.
  • Step 4 Node P2 receives the multicast data message, and forwards the BIER message according to the above BIFT.
  • PE2 receives the multicast packet encapsulated by BIER, and the bit string in the BIER header is 1110.
  • P2 forwards the message according to the above-mentioned BIFT forwarding table, and determines that the message should be sent to P3 and the corresponding bit string should be ANDed with 1110.
  • the bit string of the message is 1110
  • the result of the AND operation of 1110 is 1110.
  • step 3 when P2 selects the link in the parallel link group, it reads the parallel link group member state table to obtain the act-member-num value, and then pairs the act-member-num value according to the field value in the message.
  • the num value is modulo to obtain the corresponding link.
  • the flow label field of the IPv6 header encapsulated by the node encapsulating the BIERv6 header can not only be used by the BIERv6 forwarding node to perform parallel link load sharing, but can also be used Nodes that are not forwarded by BIERv6 perform parallel link load sharing based on unicast packets.
  • the P2 node is an IPv6 router but does not support BIERv6 forwarding, and all other nodes support BIERv6 forwarding as an example.
  • Step 1 Configure node PE1 to generate parallel link group 2 and BIFT.
  • PE1 can generate the following BIFT based on the above configuration.
  • Step 2 The node PE1 receives the multicast data message, and forwards the BIER message according to BIFT.
  • PE1 encapsulates the BIER header for the multicast data message.
  • the bit string of the BIER header contains the position 1 corresponding to the node PE2/PE3/PE4, that is, the second, third, and fourth positions are 1, which is represented by 1110
  • the initial bit string of the BIER header is represented by 1110
  • PE1 forwards the message according to the above-mentioned BIFT forwarding table, and determines that the message should be sent to P2 and the corresponding bit string should be ANDed with 1110.
  • the bit string of the message is 1110, and the result after AND is 1110.
  • step 3 when PE1 selects the link in the parallel link group, it reads the parallel link group member state table to obtain the act-member-num value, and then compares the act-member-num value according to the field value in the message.
  • the num value is modulo to obtain the corresponding link.
  • the implementation described in this example is used in a BIER IPv6 (or BIERv6) encapsulation, using the IPv6 source address and flow label (Flow Label) fields of the IPv6 packet header to modulate the act-member-num value.
  • BIER IPv6 or BIERv6 encapsulation
  • P2 receives a multicast data message encapsulated with BIERv6 through one of the parallel links, and the outer IPv6 address of the message is the unicast IPv6 address of the P3 node.
  • the flow label value of the IPv6 header of the packet varies according to the multicast flow. For example, the flow label value of the IPv6 header of the packet of 12 multicast flows is 1-12 respectively.
  • P2 performs load sharing on this message, which can be performed in a manner based on the unicast message flow label.
  • PE1 fills in the IPv6 flow label field of these multicast streams from 1 to 12 under BIERv6 encapsulation, and the load sharing of the multicast streams is as follows.
  • the above parallel link group and BIFT are all generated by the node based on the above configuration information.
  • the node can also automatically generate the parallel link group identification and BIFT.
  • the following takes the second scenario shown in FIG. 5 as an example to describe in detail the specific implementation of the node automatically generating the parallel link group identifier and BIFT.
  • Step 1 Do the following configuration on node PE1 to generate parallel link group 2 and BIFT.
  • “Use Link-group Auto-generated” means that the forwarding table of the parallel link group is generated when there is a "parallel link” for the next hop of the node.
  • PE1 can generate the forwarding table of the parallel link group when there is a "parallel link” in the next hop of the BFR_NBR node according to the "Use Link-group Auto-generated” configuration.
  • PE1 can also generate a parallel link group ID for each next hop node that reaches the BFR_NBR node and use the parallel link group ID and flag in the BIER forwarding table.
  • This parallel link group ID may include one link or two or more parallel links, which is not specifically limited in the embodiment of the present application. .
  • PE1 can generate the following BIFT based on the above configuration.
  • Step 2 Perform the following configuration on node P2 to generate parallel link group 1 and BIFT.
  • P2 According to the "Use Link-group Auto-generated" configuration, P2 generates a forwarding table for the parallel link group when there is a "parallel link" on the next hop of the BFR_NBR node.
  • P2 can also generate a parallel link group ID for each next hop node that reaches the BFR_NBR node and use the parallel link group ID and flag in the BIER forwarding table.
  • P2 generates the following BIFT based on the above configuration.
  • Step 3 Node PE1 receives the multicast data message, and forwards the BIER message to node P2 according to BIFT.
  • PE1 encapsulates the BIER header for the multicast data message.
  • the bit string of the BIER header contains the position 1 corresponding to the node PE2/PE3/PE4, that is, the second, third, and fourth positions are 1, which is represented by 1110
  • the initial bit string of the BIER header is represented by 1110
  • PE1 forwards the message according to the above-mentioned BIFT forwarding table, and determines that the message should be sent to P2 and the corresponding bit string should be ANDed with 1110.
  • the bit string of the message is 1110
  • the result of the AND operation of 1110 is 1110.
  • step 3 when PE1 selects the link in the parallel link group, it reads the parallel link group member state table to obtain the act-member-num value, and then compares the act-member-num value according to the field value in the message.
  • the num value is modulo to obtain the corresponding link.
  • Step 4 P2 receives the BIER message, and forwards the BIER message to the node PE2/PE3/PE4 according to BIFT.
  • PE2 receives the multicast packet encapsulated by BIER, and the bit string in the BIER header is 1110.
  • P2 forwards the message according to the above-mentioned BIFT forwarding table, and determines that the message should be sent to P3 and the corresponding bit string should be ANDed with 1110.
  • the bit string of the message is 1110
  • the result of the AND operation of 1110 is 1110.
  • step 3 when P2 selects the link in the parallel link group, it reads the parallel link group member state table to obtain the act-member-num value, and then pairs the act-member-num value according to the field value in the message.
  • the num value is modulo to obtain the corresponding link.
  • PE1 fills in the IPv6 flow label field of these multicast streams from 1 to 12 under BIERv6 encapsulation, and the load sharing of the multicast streams is as follows.
  • the parallel link group can be automatically judged and generated according to the network connection status, thereby further saving the configuration of the parallel link, and the implementation is relatively simple.
  • P2 refreshes the forwarding table according to the "Use Link-group Auto-generated" configuration as follows (the link group may only have 1 Link members).
  • the load sharing to the link is as follows.
  • FIG. 7 is a schematic structural diagram of a first network device 700 provided by an embodiment of the present application.
  • the first network device 700 shown in FIG. 7 can execute the corresponding steps performed by the first network device in the method of the foregoing embodiment.
  • the first network device 700 includes: a determining module 710, a sending module 720,
  • the determining module 710 is configured to determine the first load sharing group corresponding to the BFR neighbor of the first forwarding router of the first network device according to the bit index forwarding table BIFT, the first load sharing group including the first network device and all The at least two link interfaces between the first BFR neighbors, where the at least two link interfaces are used to forward an explicit copy BIER message based on a bit index in a load sharing manner;
  • the determining module 710 is further configured to perform a modulo operation on the number of available link interfaces in the first load sharing group according to the header information of the BIER message to obtain the first load sharing The first link interface in the group;
  • the sending module 720 is configured to forward the BIER message to the first BFR neighbor through the first link interface.
  • the first network device 700 further includes: a receiving module 730, configured to receive the BIER message.
  • the receiving module 730 is configured to receive a multicast message
  • the first network device further includes an encapsulation module, which is configured to perform BIER encapsulation on the multicast message to obtain a BIER message.
  • the first network device 700 further includes a generating module 740, configured to generate a first index routing table BIRT, where the first BIRT includes the identifier of the first BFR neighbor and the first load sharing group The logo;
  • the generating module 740 is further configured to establish the BIFT according to the first BIRT.
  • the generating module 730 is further configured to generate a second BIRT, the second BIRT containing the identifier of the second BFR neighbor of the first network device and the identifier of the second load sharing group, the The second load sharing group includes at least two link interfaces between the first network device and the second BFR neighbor, and the at least two link interfaces are used to forward the BIER report in a load sharing manner. Arts;
  • the generating module 740 is further configured to: establish the BIFT according to the second BIRT, and the BIFT further includes the second BFR neighbor and the second load sharing group.
  • the determining module 710 is further configured to determine a first state table entry corresponding to the first load sharing group according to the identifier of the first load sharing group, and the first state table entry includes the The number of available link interfaces in the first load sharing group.
  • the BIER message includes a BIER header and an inner multicast message
  • the message header information is the value of the entropy field in the BIER header.
  • the BIER message includes an Internet Protocol version 6 IPv6 header and an inner-layer multicast message
  • the IPv6 header includes a source IP address field and a flow label field
  • the message header information is the The value of the flow label field may be a result obtained by hashing the value of the source IP address field according to the value of the flow label field.
  • the determining module 710 is further configured to: if the state of the first link interface is unavailable, determine whether the state in the first load sharing group is available according to the header information of the BIER message Performing a modulo operation on the number of link interfaces in the first load sharing group to obtain a second link interface that forwards the BIER packet in the first load sharing group;
  • the sending module 720 is further configured to forward the BIER message to the first BFR neighbor through the second link interface.
  • the determining module 710 is further configured to determine that the state of the first link interface is unavailable according to the state of each link interface in the first load sharing group.
  • the state of each link interface in the first load sharing group is a bit string with K bits, where K is a positive integer greater than 1, and each bit in the bit string The position of indicates a link interface in the first load sharing group, and the value of the bit indicates the status information of the link interface,
  • the determining module 710 is specifically configured to determine the status of the first link interface as unavailable according to the value of the bit corresponding to the first link interface in the bit string.
  • FIG. 8 is a schematic diagram of the hardware structure of the first network device 2000 according to an embodiment of the present application.
  • the first network device 2000 shown in FIG. 8 can execute the corresponding steps performed by the first network device in the method of the foregoing embodiment.
  • the first network device 2000 includes a processor 2001, a memory 2002, an interface 2003, and a bus 2004.
  • the interface 2003 can be implemented in a wireless or wired manner, specifically, it can be a network card.
  • the above-mentioned processor 2001, memory 2002, and interface 2003 are connected through a bus 2004.
  • the interface 2003 may specifically include a transmitter and a receiver, which are used by the first network device to implement the foregoing transmission and reception.
  • the interface 2003 is used to receive an explicit copy BIER message of the bit index.
  • the interface 2003 is configured to forward the BIER message to the first BFR neighbor through the first link interface.
  • the processor 2001 is configured to execute the processing performed by the first network device in the foregoing embodiment.
  • the first load sharing group corresponding to the BFR neighbor of the first forwarding router of the first network device is determined according to the bit index forwarding table BIFT; and/or other processes used in the technology described herein.
  • the processor 2001 is configured to support step 620 and step 630 in FIG. 6.
  • the memory 2002 includes an operating system 20021 and an application program 20022 for storing programs, codes or instructions. When the processor or hardware device executes these programs, codes or instructions, the processing process involving the first network device in the method embodiment can be completed.
  • 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
  • the RAM includes an application program and an operating system.
  • BIOS basic input/output system
  • the system is booted by the BIOS solidified in the ROM or the bootloader in the embedded system to guide the first network device 2000 into a normal operating state.
  • the application program and the operating system run in the RAM, thereby completing the processing procedure involving the first network device 2000 in the method embodiment.
  • FIG. 8 only shows a simplified design of the first network device 2000.
  • the first network device may include any number of interfaces, processors or memories.
  • FIG. 9 is a schematic diagram of the hardware structure of another first network device 2100 according to an embodiment of the application.
  • the first network device 2100 shown in FIG. 9 can execute the corresponding steps performed by the first network device in the method of the foregoing embodiment.
  • the first network device 2100 includes: a main control board 2110, an interface board 2130, a switching network board 2120, and an interface board 2140.
  • the main control board 2110, the interface boards 2130 and 2140, and the switching network board 2120 are connected to the system backplane through the system bus to achieve intercommunication.
  • the main control board 2110 is used to complete functions such as system management, equipment maintenance, and protocol processing.
  • the switching network board 2120 is used to complete data exchange between various interface boards (interface boards are also called line cards or service boards).
  • the interface boards 2130 and 2140 are used to provide various service interfaces (for example, POS interface, GE interface, ATM interface, etc.), and implement data packet forwarding.
  • 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 used to control and manage the interface board and communicate with the central processing unit on the main control board.
  • the forwarding entry storage 2134 is used to store entries, for example, the above BIFT.
  • the physical interface card 2133 is used to complete the reception and transmission of traffic.
  • the physical interface card 2133 is used to receive the BIER message. After receiving the BIER message, the physical interface card 2133 sends the BIER message to the central processing unit 2111 via the central processing unit 2131, and the central processing unit 2111 Process the BIER message.
  • the operations on the interface board 2140 in the embodiment of the present application are consistent with the operations on the interface board 2130, and will not be repeated for the sake of brevity.
  • the first network device 2100 in this embodiment may correspond to the functions and/or various steps implemented in the foregoing method embodiments, and details are not described herein again.
  • main control boards there may be one or more main control boards, and when there are more than one, it may include a main main control board and a standby main control board.
  • the switching network board may not exist, or there may be one or more. When there are more than one, the load sharing and redundant backup can be realized together. Under the centralized forwarding architecture, the first network device may not need to switch the network board, and the interface board undertakes the processing function of the service data of the entire system.
  • the first network device may have at least one switching network board, and data exchange between multiple interface boards is realized through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capability of the first network device of the distributed architecture is greater than that of the device of the centralized architecture.
  • the specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
  • the embodiments of the present application also provide a computer-readable medium, the computer-readable medium stores program code, and when the computer program code runs on a computer, the computer executes the methods in the above-mentioned aspects.
  • These computer-readable storages include but are not limited to one or more of the following: read-only memory (ROM), programmable ROM (programmable ROM, PROM), erasable PROM (erasable PROM, EPROM), Flash memory, electrically EPROM (electrically EPROM, EEPROM) and hard drive (harddrive).
  • the embodiment of the present application also provides a computer program product, which is applied to a first network device or a BFR neighbor of the first network device, the computer program product includes: computer program code, when the computer program code is run by a computer, causes The computer executes the method in any possible implementation manner of any of the foregoing aspects.
  • the embodiments of the present application also provide a chip system, which is applied to a first network device.
  • the chip system includes: at least one processor, at least one memory, and an interface circuit.
  • the interface circuit is responsible for information between the chip system and the outside world.
  • the at least one memory, the interface circuit, and the at least one processor are interconnected by wires, and instructions are stored in the at least one memory; the instructions are executed by the at least one processor to perform the above-mentioned various aspects The operation of the first network device or the BFR neighbor of the first network device in the method.
  • the chip can be based on central processing unit (CPU), microcontroller (microcontroller unit, MCU), microprocessor (microprocessing unit, MPU), digital signal processing (digital signal processing, DSP). ), system on chip (SoC), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or programmable logic device (PLD) The form of realization.
  • CPU central processing unit
  • MCU microcontroller unit
  • MPU microprocessor
  • DSP digital signal processing
  • SoC system on chip
  • SoC system on chip
  • ASIC application-specific integrated circuit
  • FPGA field programmable gate array
  • PLD programmable logic device
  • the embodiments of the present application also provide a computer program product, which is applied to a first network device or a BFR neighbor of the first network device.
  • the computer program product includes a series of instructions. When the instructions are executed, the foregoing The operations of the first network device or the BFR neighbor of the first network device in the methods described in various aspects.
  • the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not correspond to the embodiments of the present application.
  • the implementation process constitutes any limitation.
  • the disclosed system, device, and method can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disks or optical disks and other media that can store program codes. .

Abstract

本申请提供了一种负载分担的方法,该方法包括:根据位索引转发表BIFT确定第一网络设备的第一位转发路由器BFR邻居对应的第一负载分担组,第一负载分担组中包括第一网络设备和第一BFR邻居之间的至少两个链路接口,至少两个链路接口用于以负载分担的方式转发BIER报文;第一网络设备根据BIER报文的报文头信息对第一负载分担组中状态为可用的链路接口的数量进行取模运算,得到第一负载分担组中的第一链路接口;通过第一链路接口将BIER报文转发至第一BFR邻居。本申请提供的技术方案可以在实现负载均衡的情况下减小BIFT表项的开销,节省内存空间。

Description

负载分担的方法、第一网络设备
本申请要求于2020年2月20日提交的申请号为202010104744.3、发明名称为“一种组播负载分担方法、设备及系统”的中国专利申请的优先权以及2020年3月19日提交的申请号为202010194777.1、发明名称为“负载分担的方法、第一网络设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及网络通信领域,并且更具体地,涉及一种负载分担的方法和第一网络设备。
背景技术
网络协议(internet protocol,IP)组播技术实现了IP网络中点到多点的高效数据传送,能够有效地节约网络带宽、降低网络负载。为此,业界提出了一种新的用于构建组播数据转发路径的技术,称为基于位索引的显式复制(bit indexed explicit replication,BIER)技术,该技术提出了一种新的不需要构建组播分发树的组播技术架构。
BIER报文在转发的过程中,需要建立位索引转发表(bit index forwarding table,BIFT),以便于BIER域中的节点根据BIFT以及BIER头中携带的比特串(bit string)进行转发,实现原始组播数据报文能够发送到所有的目的地址。
在对BIER报文进行转发的两个节点之间存在多个并行链路的场景,传统的技术方案中,为了实现负载分担,需要建立多个BIFT表项,如果进一步的想实现负载分担均衡,则需要建立更多的BIFT表项。因此,传统的技术方案中BIFT表项开销较大,会占用较大的内存空间。
因此,如何在实现负载分担均衡的情况下,减小BIFT表项的开销成为当前亟需要解决的技术问题。
发明内容
本申请提供一种负载分担的方法和第一网络设备,可以在实现负载均衡的情况下减小BIFT表项的开销,节省内存空间。
第一方面,提供了一种负载分担的方法,包括:第一网络设备根据位索引转发表BIFT确定所述第一网络设备的第一位转发路由器BFR邻居对应的第一负载分担组,所述第一负载分担组中包括所述第一网络设备和所述第一BFR邻居之间的至少两个链路接口,所述至少两个链路接口用于以负载分担的方式转发基于位索引的显式复制BIER报文;所述第一网络设备根据所述BIER报文的报文头信息对所述第一负载分担组中状态为可用的链路接口的数量进行取模运算,得到所述第一负载分担组中的第一链路接口;所述第一网络设备通过所述第一链路接口将所述BIER报文转发至所述第一BFR邻居。
需要说明的是,本申请中网络设备的链路接口为可用状态(up)可以理解为网络设备 的链路正常,可以进行报文转发。网络设备的链路接口为不可用状态(down)可以理解为网络设备的链路故障,不能进行报文转发。
第一网络设备的第一链路接口可以作为第一负载分担组中的一个成员,该第一负载分担组中的链路接口可以均为可用状态,也可以是部分不可用状态。第一负载分担组中的链路接口的数量可以是大于1的整数,本申请对此不做具体限定。
应理解,在本申请实施方式中,“成员”可以指负载分担组中的网络设备与负载分担链路连接的接口,所述接口包括以太口。
本申请实施例对BIER报文的报文头信息不作具体限定。以BIER报文包括BIER头和内层的组播报文为例,所述报文头信息为BIER头中熵字段的取值。以BIER报文包括外层的IPv6头、BIER头以及内层的组播报文为例,所述报文头信息为IPv6头中流标签字段的取值,或为根据所述流标签字段的取值对IPv6头中的源IP地址字段的取值进行哈希计算得到的结果。
上述技术方案中,针对两个节点之间有多个并行链路的场景,可以将两个节点之间的多个并行链路配置为一个并行链路组,在一个BIFT表项中根据下一跳BFR邻居确定一个并行链路组,再通过取模算法选择并行链路组中的一条链路对BIER报文进行转发。这样,既可以减少BIFT表项,还可以实现流量的均匀分配,达到负载均衡的目的。
应理解,本申请中的并行链路可以理解为两个节点之间有多个物理链路的场景。
在一种可能的实现方式中,第一网络设备可以直接接收到所述BIER报文,并通过第一链路接口将BIER报文转发至第一BFR邻居。
在另一种可能的实现方式中,第一网络设备接收到的是组播报文,所述第一网络设备还可以对该组播报文进行BIER封装,得到BIER报文,并通过第一链路接口将BIER报文转发至第一BFR邻居。
在另一种可能的实现方式中,在所述第一网络设备根据位索引转发表BIFT确定所述第一网络设备的第一位转发路由器BFR邻居对应的第一负载分担组之前,所述方法还包括:所述第一网络设备生成第一位索引路由表BIRT,所述第一BIRT中包含所述第一BFR邻居的标识和所述第一负载分担组的标识;所述第一网络设备根据所述第一BIRT建立所述BIFT。
应理解,在形成上述BIFT之前,需要建立BIER的路由信息,即位索引路由表(bit index routing table,BIRT)。BIRT体现为到达BFER节点的BFR邻居(BFR-NBR),BIRT也可以包含到达BFR-NBR的下一跳出接口信息。本技术方案还包括,在生成BIFT表项之前的BIRT中,包含第一BFR邻居的标识和第一负载分担组的标识。
在另一种可能的实现方式中,所述方法还包括:所述第一网络设备生成第二BIRT,所述第二BIRT中包含所述第一网络设备的第二BFR邻居的标识和第二负载分担组的标识,所述第二负载分担组中包括所述第一网络设备和所述第二BFR邻居之间的至少两个链路接口,所述至少两个链路接口用于以负载分担的方式转发所述BIER报文;所述第一网络设备根据所述第二BIRT建立所述BIFT,所述BIFT中包含所述第二BFR邻居和所述第二负载分担组。
在另一种可能的实现方式中,所述方法还包括:所述第一网络设备根据所述第一负载分担组的标识确定所述第一负载分担组对应的第一状态表项,所述第一状态表项中包括所 述第一负载分担组中状态为可用的链路接口的数量。
在另一种可能的实现方式中,该BIER报文包括BIER头和内层的组播报文,该报文头信息为该BIER头中熵字段的取值。
在另一种可能的实现方式中,该BIER报文包括互联网协议第六版IPv6头以及内层的组播报文,该IPv6头中包括源IP地址字段和流标签字段,该报文头信息为该流标签字段的取值,或为根据该流标签字段的取值对该源IP地址字段的取值进行哈希计算得到的结果。
在另一种可能的实现方式中,该方法还包括:如果该第一链路接口的状态为不可用,该第一网络设备根据该BIER报文的报文头信息对该第一负载分担组中状态为可用的链路接口的数量进行取模运算,得到该第一负载分担组中对该BIER报文进行转发的第二链路接口;该第一网络设备通过该第二链路接口将该BIER报文转发至该第一BFR邻居。
在另一种可能的实现方式中,该方法还包括:该第一网络设备根据该第一负载分担组中各个链路接口的状态确定该第一链路接口的状态为不可用。
在另一种可能的实现方式中,该第一负载分担组中各个链路接口的状态是一个带有K个比特的比特串,其中,该K为大于1的正整数,该比特串中的每一个比特的位置表示该第一负载分担组中的一个链路接口,该比特的取值表示该链路接口的状态信息,该第一网络设备根据比特串中该第一链路接口对应的比特的取值,确定该第一链路接口的状态为不可用。
第二方面,提供了一种第一网络设备,包括:
确定模块,用于根据位索引转发表BIFT确定第一网络设备的第一位转发路由器BFR邻居对应的第一负载分担组,所述第一负载分担组中包括所述第一网络设备和所述第一BFR邻居之间的至少两个链路接口,所述至少两个链路接口用于以负载分担的方式转发基于位索引的显式复制BIER报文;
所述确定模块,还用于根据所述BIER报文的报文头信息对所述第一负载分担组中状态为可用的链路接口的数量进行取模运算,得到所述第一负载分担组中的第一链路接口;
发送模块,用于通过所述第一链路接口将所述BIER报文转发至所述第一BFR邻居。
需要说明的是,本申请中网络设备的链路接口为可用状态(up)可以理解为网络设备的链路正常,可以进行报文转发。网络设备的链路接口为不可用状态(down)可以理解为网络设备的链路故障,不能进行报文转发。
第一网络设备的第一链路接口可以作为第一负载分担组中的一个成员,该第一负载分担组中的链路接口可以均为可用状态,也可以是部分不可用状态。第一负载分担组中的链路接口的数量可以是大于1的整数,本申请对此不做具体限定。
应理解,在本申请实施方式中,“成员”可以指负载分担组中的网络设备与负载分担链路连接的接口,所述接口包括以太口。
本申请实施例对BIER报文的报文头信息不作具体限定。以BIER报文包括BIER头和内层的组播报文为例,所述报文头信息为BIER头中熵字段的取值。以BIER报文包括外层的IPv6头、BIER头以及内层的组播报文为例,所述报文头信息为IPv6头中流标签字段的取值,或为根据所述流标签字段的取值对IPv6头中的源IP地址字段的取值进行哈希计算得到的结果。
在一种可能的实现方式中,所述第一网络设备还包括:接收模块,用于接收所述BIER报文。
在另一种可能的实现方式中,所述接收模块用于接收组播报文,所述第一网络设备还包括封装模块,用于对所述组播报文进行BIER封装,得到BIER报文。
在另一种可能的实现方式中,还包括:
生成模块,用于:生成第一位索引路由表BIRT,所述第一BIRT中包含所述第一BFR邻居的标识和所述第一负载分担组的标识;
所述生成模块,还用于根据所述第一BIRT建立所述BIFT。
在另一种可能的实现方式中,所述生成模块,还用于:生成第二BIRT,所述第二BIRT中包含所述第一网络设备的第二BFR邻居的标识和第二负载分担组的标识,所述第二负载分担组中包括所述第一网络设备和所述第二BFR邻居之间的至少两个链路接口,所述至少两个链路接口用于以负载分担的方式转发所述BIER报文;
所述生成模块,还用于:根据所述第二BIRT建立所述BIFT,所述BIFT中还包含所述第二BFR邻居和所述第二负载分担组。
在另一种可能的实现方式中,所述确定模块还用于:根据所述第一负载分担组的标识确定所述第一负载分担组对应的第一状态表项,所述第一状态表项中包括所述第一负载分担组中状态为可用的链路接口的数量。
在另一种可能的实现方式中,该BIER报文包括BIER头和内层的组播报文,该报文头信息为该BIER头中熵字段的取值。
在另一种可能的实现方式中,该BIER报文包括互联网协议第六版IPv6头以及内层的组播报文,该IPv6头中包括源IP地址字段和流标签字段,该报文头信息为该流标签字段的取值,或为根据该流标签字段的取值对该源IP地址字段的取值进行哈希计算得到的结果。
在另一种可能的实现方式中,该确定模块还用于:如果该第一链路接口的状态为不可用,根据该BIER报文的报文头信息对该第一负载分担组中状态为可用的链路接口的数量进行取模运算,得到该第一负载分担组中对该BIER报文进行转发的第二链路接口;
该发送模块还用于:通过该第二链路接口将该BIER报文转发至该第一BFR邻居。
在另一种可能的实现方式中,该确定模块还用于:根据该第一负载分担组中各个链路接口的状态确定该第一链路接口的状态为不可用。
在另一种可能的实现方式中,该第一负载分担组中各个链路接口的状态是一个带有K个比特的比特串,其中,该K为大于1的正整数,该比特串中的每一个比特的位置表示该第一负载分担组中的一个链路接口,该比特的取值表示该链路接口的状态信息,
该确定模块具体用于:根据比特串中该第一链路接口对应的比特的取值,确定该第一链路接口的状态为不可用。
第二方面和第二方面的任意一个可能的实现方式的有益效果和第一方面以及第一方面的任意一个可能的实现方式的有益效果是对应的,对此,不再赘述。
第三方面,提供了一种第一网络设备,该第一网络设备包括处理器、存储器、接口和总线。其中接口可以通过无线或有线的方式实现,具体来讲可以是网卡。上述处理器、存储器和接口通过总线连接。
该接口具体可以包括发送器和接收器,用于第一网络设备实现上述收发。例如,该接口用于支持接收位索引的显式复制BIER报文。又例如,该接口用于支持通过该第一链路接口将该BIER报文转发至该第一BFR邻居。又例如,该接口用于支持通过该第二链路接口将该BIER报文转发至该第一BFR邻居。
该处理器用于执行上述实施例中由第一网络设备进行的处理。例如,该处理器用于根据位索引转发表BIFT确定所述第一网络设备的第一位转发路由器BFR邻居对应的第一负载分担组;和/或用于本文所描述的技术的其他过程。存储器包括操作系统和应用程序,用于存储程序、代码或指令,当处理器或硬件设备执行这些程序、代码或指令时可以完成方法实施例中涉及第一网络设备的处理过程。可选的,该存储器可以包括只读存储器(read-only memory,ROM)和随机存取存储器(random access memory,RAM)。其中,该ROM包括基本输入/输出系统(basic input/output system,BIOS)或嵌入式系统;该RAM包括应用程序和操作系统。当需要运行第一网络设备时,通过固化在ROM中的BIOS或者嵌入式系统中的bootloader引导系统进行启动,引导第一网络设备进入正常运行状态。在第一网络设备进入正常运行状态后,运行在RAM中的应用程序和操作系统,从而,完成方法实施例中涉及第一网络设备的处理过程。
具体的,该处理器用于执行:
根据位索引转发表BIFT确定所述第一网络设备的第一位转发路由器BFR邻居对应的第一负载分担组,所述第一负载分担组中包括所述第一网络设备和所述第一BFR邻居之间的至少两个链路接口,所述至少两个链路接口用于以负载分担的方式转发基于位索引的显式复制BIER报文;根据所述BIER报文的报文头信息对所述第一负载分担组中状态为可用的链路接口的数量进行取模运算,得到所述第一负载分担组中的第一链路接口;通过所述第一链路接口将所述BIER报文转发至所述第一BFR邻居。
上述技术方案中,针对两个节点之间有多个并行链路的场景,可以将两个节点之间的多个并行链路配置为一个并行链路组,在一个BIFT表项中根据下一跳BFR邻居确定一个并行链路组,再通过取模算法选择并行链路组中的一条链路对BIER报文进行转发。这样,既可以减少BIFT表项,还可以实现流量的均匀分配,达到负载均衡的目的。
应理解,本申请中的并行链路可以理解为两个节点之间有多个物理链路的场景。
在另一种可能的实现方式中,在所述第一网络设备根据位索引转发表BIFT确定所述第一网络设备的第一位转发路由器BFR邻居对应的第一负载分担组之前,所述方法还包括:生成第一位索引路由表BIRT,所述第一BIRT中包含所述第一BFR邻居的标识和所述第一负载分担组的标识;根据所述第一BIRT建立所述BIFT。
应理解,在形成上述BIFT之前,需要建立BIER的路由信息,即位索引路由表(bit index routing table,BIRT)。BIRT体现为到达BFER节点的BFR邻居(BFR-NBR),BIRT也可以包含到达BFR-NBR的下一跳出接口信息。本技术方案还包括,在生成BIFT表项之前的BIRT中,包含第一BFR邻居的标识和第一负载分担组的标识。
在另一种可能的实现方式中,所述方法还包括:生成第二BIRT,所述第二BIRT中包含所述第一网络设备的第二BFR邻居的标识和第二负载分担组的标识,所述第二负载分担组中包括所述第一网络设备和所述第二BFR邻居之间的至少两个链路接口,所述至少两个链路接口用于以负载分担的方式转发所述BIER报文;根据所述第二BIRT建立所 述BIFT,所述BIFT中还包含所述第二BFR邻居和所述第二负载分担组。
在另一种可能的实现方式中,所述方法还包括:根据所述第一负载分担组的标识确定所述第一负载分担组对应的第一状态表项,所述第一状态表项中包括所述第一负载分担组中状态为可用的链路接口的数量。
在另一种可能的实现方式中,该BIER报文包括BIER头和内层的组播报文,该报文头信息为该BIER头中熵字段的取值。
在另一种可能的实现方式中,该BIER报文包括互联网协议第六版IPv6头以及内层的组播报文,该IPv6头中包括源IP地址字段和流标签字段,该报文头信息为该流标签字段的取值,或为根据该流标签字段的取值对该源IP地址字段的取值进行哈希计算得到的结果。
在另一种可能的实现方式中,该方法还包括:如果该第一链路接口的状态为不可用,根据该BIER报文的报文头信息对该第一负载分担组中状态为可用的链路接口的数量进行取模运算,得到该第一负载分担组中对该BIER报文进行转发的第二链路接口;通过该第二链路接口将该BIER报文转发至该第一BFR邻居。
在另一种可能的实现方式中,该方法还包括:根据该第一负载分担组中各个链路接口的状态确定该第一链路接口的状态为不可用。
在另一种可能的实现方式中,该第一负载分担组中各个链路接口的状态是一个带有K个比特的比特串,其中,该K为大于1的正整数,该比特串中的每一个比特的位置表示该第一负载分担组中的一个链路接口,该比特的取值表示该链路接口的状态信息,该第一网络设备根据比特串中该第一链路接口对应的比特的取值,确定该第一链路接口的状态为不可用。
可以理解的是,在实际应用中,第一网络设备可以包含任意数量的接口,处理器或者存储器。
第四方面,提供了一种计算机程序产品,该计算机程序产品包括:计算机程序代码,当该计算机程序代码在计算机上运行时,使得计算机执行上述各方面中的方法。
第五方面,提供了一种计算机可读介质,该计算机可读介质存储有程序代码,当该计算机程序代码在计算机上运行时,使得计算机执行上述各方面中的方法。这些计算机可读存储包括但不限于如下的一个或者多个:只读存储器(read-only memory,ROM)、可编程ROM(programmable ROM,PROM)、可擦除的PROM(erasable PROM,EPROM)、Flash存储器、电EPROM(electrically EPROM,EEPROM)以及硬盘驱动器(harddrive)。
第六方面,提供一种芯片,该芯片包括处理器与数据接口,其中,处理器通过该数据接口读取存储器上存储的指令,以执行第一方面或第一方面任意一种可能的实现方式中的方法。在具体实现过程中,该芯片可以以中央处理器(centralprocessingunit,CPU)、微控制器(microcontroller unit,MCU)、微处理器(micro processing unit,MPU)、数字信号处理器(digital signal processing,DSP)、片上系统(system on chip,SoC)、专用集成电路(application-specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或可编辑逻辑器件(programmable logic device,PLD)的形式实现。
第七方面,提供了一种系统,该系统包括上述第一网络设备。
附图说明
图1是本申请实施例提供的一种BIER技术的示意性组网图。
图2是本申请实施例提供的一种BIER头格式的示意图。
图3是一种基于BIER技术建立BIER转发表以及进行BIER报文转发的过程。
图4是本申请实施例提供的一种BIERv6封装的报文格式示意图。
图5是适用于本申请的可能的应用场景示意图。
图6是本申请实施例提供的的一种负载分担的方法的示意性流程图。
图7是本申请实施例提供的一种第一网络设备700的示意性结构图。
图8是本申请实施例的第一网络设备2000的硬件结构示意图。
图9是本申请实施例的另一种第一网络设备2100的硬件结构示意图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
组播(multicast)是一种通过使用一个组播地址将数据在同一时间以高效的方式发往处于传输控制协议(transmission control protocol,TCP)/互联网协议(internet protocol,IP)网络上的多个接收者的数据传输方式。组播源经由网络中的链路向组播组中的组播组成员发送组播流,该组播组中的组播组成员均可以接收到该组播流。组播传输方式实现了组播源和组播组成员之间的点对多点的数据连接。由于组播流在每条网络链路上只需传递一次,且只有在链路出现支路时,该组播才会被复制。因此,组播传输方式提高了数据传输效率和减少了骨干网络出现拥塞的可能性。
网络协议(internet protocol,IP)组播技术实现了IP网络中点到多点的高效数据传送,能够有效地节约网络带宽、降低网络负载。因此,在实时数据传送、多媒体会议、数据拷贝、交互式网络电视(internet protocol television,IPTV)、游戏和仿真等诸多方面都有广泛的应用。该组播技术使用组播协议构建控制平面组播树,然后利用组播树将网络平面逻辑树状,以实现组播点到多点的数据转发。这种以构建分发树为核心的中间节点都需要维护复杂的组播转发信息状态。在网络规模越来越大,组播数据流量与日俱增的情况下,这种组播技术面临越来越大的成本和运维方面的挑战。
为此,业界提出了一种新的用于构建组播数据转发路径的技术,称为位索引的显式复制(bit indexed explicit replication,BIER)技术,该技术提出了一种不需要构建组播分发树的组播技术架构。如图1所示,支持BIER技术的路由器称为位转发路由器(Bit-forwarding router,BFR),该BFR可接收并转发BIER报文。由上述一个或多个BFR组成的一个组播转发域称为BIER域(BIER domain)。在BIER域的入口,对原始组播数据报文进行BIER封装的BFR称为BIER转发入口路由器(BIER forwarding ingress router,BFIR)。在BIER域的出口,对从BIER报文中解封装出原始组播数据报文的BFR称为BIER转发出口路由器(BIER forwarding egress router,BFER)。应理解,BIER域中的BFIR和BFER可以称为BIER域中的边缘BFR。
为了便于理解,下面结合图2-图4,对BIER技术进行详细描述。
在BIER域中,可以对上述的边缘BFR配置一个在整个BIER子域(sub domain,SD)中全局唯一的比特位置(bit position)标识。作为一个示例,可以为每一个边缘BFR配置 一个值作为BFR标识(BFR identifier,BFRID),例如,BFRID可以是一个1-256之间的数值。BIER域中所有的BFR ID组成一个比特串(bit string)。
例如,一种可能的BIER报文的格式为:BIER头+原始组播数据报文。具体的,原始组播数据报文在BIER域中传输时需要额外封装一个特定的BIER头。BIER头中以bit string的形式标注了该原始组播数据报文的所有目的节点。BIER域中的BFR可以根据位索引转发表(bit index forwarding table,BIFT)以及BIER头中携带的bit string进行转发,保证原始组播数据报文能够发送到所有的目的地址。
应理解,BIER头后面的原始组播数据报文可以是互联网协议第6版(internet protocol version 6,IPv6)组播报文,或者还可以是互联网协议第4版(internet protocol version 4,IPv4)组播报文。
图2是一种可能的BIER头格式的示意性框图。如图2所示,BIER头中可以包含但不限于:一个长度为20bit的位索引转发表标识(bit index forwarding table identifier,BIFT ID)、比特串长度(bit string length,BSL)、64bit(8个字节)的其他字段,例如,BIER头后面的原始组播数据报文的传输类型(traffic class,TC)、流量类型(traffic class,TC)字段、熵(entropy)字段、版本号(version,Ver)、proto字段等。下面分别对BIER头中的字段进行详细描述。
(1)BIFT ID字段
长度为20bit,在BIER-多协议标签交换(multi protocol label switching,MPLS)封装下就是一个标签(label,L)。BIFT ID可以是BIFT-id,可以包括子域(sub-domain,SD)/比特串长度(bit string length,BSL)/集合标识(set identifier,SI)的一个组合,不同的BIFT ID可以对应于不同的SD/BSL/SI组合。
1、子域SD
一个BIER域可以根据实际的业务场景的需求配置为不同的子域SD,每个子域SD由子域标识(sub-domain identifier,SD-ID)来表示。例如,SD-ID的取值为[0-255],长度为8bit。作为一个示例,可以根据业务例如,虚拟私有网(virtual private network,VPN)的不同,将BIER域配置为不同的SD,并配置不同的VPN使用不同的SD。例如,VPN 1使用SD 0,VPN 2使用SD 1。
2、比特串长度(bit string length,BSL)
BSL为BIER头中包括的bit string的长度。BSL可以有多种,本申请实施例对此不做具体限定。具体的,在报文中通过4bit来标识,例如,当BSL为64位时,报文中用0001标识,当BSL为128位时,报文中用0010标识,当BSL为512位时,报文中用0100标识,依次类推。
3、集合标识(set index,SI)
SI可以理解为网络中的多个边缘BFR或配置的BFR ID组成的集合。作为一个示例,BSL为256bit,但是网络中有超过256个边缘BFR,或者配置的BFR ID有超过256个,则需要将这些边缘BFR或BFR ID划分为不同的集合。例如,BFR ID为1至256的256个边缘BFR为集合0(set index0,或SI=0),BFR ID为257至512的256个边缘BFR为集合1(set index 1,或者SI=1)。
BIER域中的BFR在接收到了BIER报文之后,可以根据BIER头中的BIFT ID确定 该BIER报文属于哪个SD,使用的BSL以及报文属于该BSL的哪个SI组成的集合。
(2)比特串(bit string)字段
bit string中的每个bit用来标识边缘BFR,例如bit string的低位(最右)的一个bit用来标识BFR-ID=1的BFER。bit string中从右往左第2个Bit用来标识BFR-ID=2的BFER。转发面转发所依据的转发表项则是根据报文中的bit string决定该报文要往哪几个BFER发送。当BIER域中的BFR在接收到了包含有BIER的报文头时,根据BIER头中携带的bit string以及BIFT ID转发BIER报文。
以BIFT ID=2为例,BFR在接收到了BIER报文之后,可以根据该BIER头中的BIFT ID获取该BIER报文属于SD 0,BIER头中使用的BSL为256bit,属于集合1(包括BFR ID为257至512的256个边缘BFR的集合)。
(3)流量类型(traffic class,TC)字段
标识报文的优先级。
(4)版本号(version,Ver)字段
长度为4bit,是IP的版本号,值为4代表IPv4,值为6代表IPv6。
(5)熵(entropy)字段
属于一个流量的多个报文的熵相同,不同的流量的多个报文的熵不相同。当报文被转发时可以根据熵将不同的流量分担到不同的链路上、而相同流量的多个报文则走相同的链路。
(6)proto字段
proto字段等于4代表BIER头后面的原始组播数据报文为IPv4报文,proto字段等于6代表BIER头后面的原始组播数据报文为IPv6报文。
图3是一种基于BIER技术建立BIER转发表以及进行BIER报文转发的过程。如图3所示的BIER域中可以包括节点PE1、PE2、PE3、PE4、P2、P3,其中,节点PE1、PE2、PE3、PE4属于BIER域内的边缘BFR,节点P2、P3属于BIER中间转发节点。
具体的,节点PE1位于BIER域的入口,负责对原始组播数据报文进行BIER封装,对应于图1中的BFIR。节点E2、PE3、PE4位于BIER域的出口,负责从BIER报文中解封装出原始组播数据报文,对应于图1中的BFER。
本申请实施例中可以为每一个BIER域内的边缘BFR分配一个唯一的BFR-ID,例如,在图3中,为节点PE1、节点PE2、节点PE3、节点PE4配置的BFR-ID分别为1、2、3、4。中间转发的BFR,例如,节点P2、节点P3不分配BFR-ID,因此,节点P2、节点P3对应的BFR-ID为0。
数据流量的BIER头中封装的bit string标注了该流量的所有目的节点。例如,对于BFR-ID为1的节点D对应的bit string为0001,BFR-ID为2的节点F对应的bit string为0010,BFR-ID为3的节点E对应的bit string为0100,BFR-ID为4的节点A对应的bit string为1000。
应理解,为每一个BIER域内的边缘BFR分配的BFR-ID值可以通过路由协议向BIER域内的其他BFR进行泛洪,泛洪的BIER信息中还包括边缘BFR的IP地址、封装信息。例如节点PE1的泛洪的BIER信息会携带节点PE1的IP地址以及BIFT-id。BIER域内的BFR(例如,图3中的节点PE2、PE3、PE4)可以根据泛洪的BIER信息建立BIFT表项, 以便于图3中的BFR接收到BIER报文之后,根据建立的BIFT表项来完成BIER报文到目的节点的转发。
对于节点PE1而言,如果BIER报文的需要发送至BFR-ID分别为2、3、4的BFER,该BIER报文需要先发送至节点PE1的邻居(图3所示的PE1的邻居有两个,分别为节点P2、P3),BFR-ID为1的边缘BFR为其自己,因此,节点PE1建立的BIFT表项如下所示:
BIFT:(转发位掩码(forwarding bit mask,FBM)=0110,下一跳(next hop)=P2);(转发位掩码(forwarding bit mask,FBM)=1000,下一跳(next hop)=P3)。
其中,BIFT用于表示当有BIER报文的bit string从右往左第2个bit位、第3个bit位任意一个为1时,该BIER报文会往节点PE1的邻居(节点P2)发送,并由节点P2将BIER报文转发至BFR-ID分别为2、3的节点PE2、节点PE3。当有BIER报文的bit string从右往左第4个bit位为1时,该BIER报文会往节点PE1的邻居(节点P3)发送,并由节点P3将BIER报文转发至BFR-ID为4的节点PE4。
又如,另一种可能的BIER报文的格式为:IPv6头+BIER头+原始组播数据报文。该BIER报文格式是BIERv6封装的报文格式。具体的,参见图4,BIER头可以位于IPv6扩展头中,例如BIER头作为IPv6扩展头的选项类型、选项由类型-长度-值(type-length-value,TLV)的结构组成,BIER头作为TLV的value部分。
下面对IPv6头中包含的字段进行详细描述。
版本号(version,Ver):IP的版本号,值为6代表IPv6。
流量类型(traffic class,TC)字段:标识报文的优先级;
流标签(flow label,FL)字段:可以将属于一个流量的多个报文打上相同的流标签、不同的流量的多个报文打上另一个流标签值。当报文被转发时可以根据流标签将不同的流量分担到不同的链路上、而相同流量的多个报文则走相同的链路。
载荷长度(payload length,PL)字段:表示报文的长度。
下一个头部(Next Header,NH)字段:表示报文的下一个头部的类型,例如可以是代表一个IPv6扩展头。
跳数限制(Hop Limit,HL)字段:表示报文的条数限制。
源地址(source address,SA)字段:标识报文的源地址。
目的地址(destination address,DA)字段:标识报文的目的地址。
以图3所示的BIER域为例。节点PE1作为Ipv6网络的头节点(ingress节点),收到用户组播数据报文后,将报文封装在BIERv6头后,即由一个外层Ipv6头和包含BIER头的Ipv6扩展头之后。
以节点PE1的下一跳为节点P2为例。如果节点P2支持BIER转发,那么PE1将报文封装节点P2的目的地址。节点P2收到报文后根据BIER头将报文复制给PE2和PE3,其中发给PE2的报文会更改Ipv6头部的目的地址为PE2的地址、发给PE3的报文会更改Ipv6头的目的地址为PE3的目的地址。PE2和PE3收到BIER报文,根据BIER头中的bitstring信息包含有对应于自身BFRid值的bit,将报文解封装出内层组播数据报文,并对内层组播数据报文进行转发。节点PE1的下一跳为节点P3的报文转发过程与上述过程类似,具体的请参考上文中的描述,此处不再赘述。
对于两个节点之间有多个并行链路的情况,为了实现负载分担,需要建立多个BIFT表项。下面结合图5,对适用于本申请实施例的可能的应用场景进行详细描述。
如图5所示,节点PE1的下一跳可以有一个节点,例如,场景二中的节点P2。或者节点PE1的下一跳可以有至少两个节点,例如,场景一中的节点P2和节点P3。节点PE1和其下一跳之间有至少两条并行的链路。
应理解,为了便于描述,场景一中以PE1的下一跳为P2和P3两个节点,节点PE1和节点P2之间有两条并行的链路,节点PE1和节点P3之间有三条并行的链路为例进行描述。同样的,在场景二中,以PE1的下一跳为P2,节点PE1和节点P2之间有三条并行的链路,节点P2的下一跳为P3,节点P2和节点P3之间有二条并行的链路为例进行描述。
在图5所示的两个节点之间有多个并行链路的场景中,传统的技术方案中,为了实现负载分担,需要建立多个BIFT表项。以场景一为例,节点PE1到PE2/PE3的下一跳是P2但出接口有INTF1、INTF2,节点PE1到PE4的下一跳是P3但出接口有INTF3/4/5。PE1建立的多个BIFT转发表项如下所示。
BIFT-1:(FBM=0000 0110,Nexthop=P2,outIntf=INTF1);(FBM=0000 1000,Nexthop=P3,outINTF=INTF3);
BIFT-2:(FBM=0000 0110,Nexthop=P2,outIntf=INTF2);(FBM=0000 1000,Nexthop=P3,outINTF=INTF4);
BIFT-3:(FBM=0000 0110,Nexthop=P2,outIntf=INTF1);(FBM=0000 1000,Nexthop=P3,outINTF=INTF5)。
如果想要实现流量在多个并行链路的均匀分布,可能需要6个BIFT转发表,这样,BIFT转发表项的开销较大,占用较大的内存空间。
本申请实施例提供的负载分担的方法,在实现流量在多个并行链路的均匀分布的情况下,可以减少BIFT转发表项的开销,节省内存空间。下面就结合图6,对本申请实施例提供的一种负载分担的方法进行详细描述。
图6是本申请实施例提供的的一种负载分担的方法的示意性流程图。如图6所示,该方法可以包括步骤610-630,下面分别对步骤610-630进行详细描述。
步骤610:第一网络设备根据位索引转发表BIFT确定所述第一网络设备的第一位转发路由器BFR邻居对应的第一负载分担组。
应理解,第一网络设备可对应于图5中的节点PE1,第一BFR邻居作为节点PE1的其中一个下一跳BFR邻居。
其中,所述第一负载分担组中包括所述第一网络设备和所述第一BFR邻居之间的至少两个链路接口,所述至少两个链路接口用于以负载分担的方式转发所述BIER报文。
具体的,以节点PE1有一个下一跳BFR邻居P2,PE1和P2之间有两条并行的链路为例,那么PE1上建立的BIFT为:
(FBM=0000 0110,BFR_NBR=P2,Flag=并行链路组,Link=并行链路组ID1)。
此外,节点PE1上还有一个并行链路组下的各成员链路表(并行链路组状态表):
(链路组=ID1,Link=Link1,Mem=1);(链路组=ID1,Link=Link2,Mem=2)。
其中,链路组ID1有Link1和Link2两个成员,其成员编号分别为1和2。
此外,节点PE1上还有一个并行链路组下的各成员状态表(并行链路组状态表):
(并行链路组ID=ID1,cfg-member-num=2,act-member-num=2,State<BS>=011)。
其中,cfg-member-num表示并行链路的配置成员个数,cfg-member-num=2表示负载分担组中参数负载分担的链路有2条,也就是说,节点PE1上有两个出接口,可以通过两个出接口中的任意一个,将BIER报文发送至下一跳BFR邻居P2。act-member-num表示当前实际有效且UP的成员链路的个数。State<BS>表示各成员链路的UP/DOWN状态,State<BS>=11中从右往左的比特依次代表各成员链路的状态,比特为1表示成员链路的状态为UP,比特为0表示成员链路的状态为DOWN。因此,State<BS>=11表示PE1和P2之间有两条并行的链路状态均为UP,可以进行BIER报文的转发。
需要说明的是,本申请实施例中网络设备的链路接口为可用状态(up)可以理解为网络设备的链路正常,可以进行报文转发。网络设备的链路接口为不可用状态(down)可以理解为网络设备的链路故障,不能进行报文转发。
可选的,在一些实施例中,如果PE1和P2之间的某一条链路的状态发生变化,PE1可以刷新并行链路组状态表中的act-member-num以及State<BS>。
步骤620:第一网络设备根据BIER报文的报文头信息对第一负载分担组中状态为可用的链路接口的数量进行取模运算,得到第一负载分担组中的第一链路接口。
具体的,第一网络设备可以根据BIER报文的报文头信息并行链路组状态表中的act-member-num进行取模运算,得到第一负载分担组中的第一链路接口。
第一网络设备的第一链路接口可以作为第一负载分担组中的一个成员,该第一负载分担组中的链路接口可以均为可用状态,也可以是部分不可用状态。第一负载分担组中的链路接口的数量可以是大于1的整数,本申请对此不做具体限定。
应理解,在本申请实施方式中,“成员”可以指负载分担组中的网络设备与负载分担链路连接的接口,所述接口包括以太口。
本申请实施例对BIER报文的报文头信息不作具体限定。以BIER报文包括BIER头和内层的组播报文为例,所述报文头信息为BIER头中熵字段的取值。以BIER报文包括外层的IPv6头、BIER头以及内层的组播报文为例,所述报文头信息为IPv6头中流标签字段的取值,或为根据所述流标签字段的取值对IPv6头中的源IP地址字段的取值进行哈希计算得到的结果。
需要说明的是,第一网络设备可以直接接收到所述BIER报文,或者,第一网络设备接收到的是组播报文,所述第一网络设备还可以对该组播报文进行BIER封装,得到BIER报文,本申请对此不做具体限定。
步骤630:第一网络设备通过第一链路接口将BIER报文转发至第一BFR邻居。
本申请实施例中,针对两个节点之间有多个并行链路的场景,可以将两个节点之间的多个并行链路配置为一个并行链路组,在一个BIFT表项中根据下一跳BFR邻居确定一个并行链路组,再通过取模算法选择并行链路组中的一条链路对BIER报文进行转发。这样,既可以减少BIFT表项,还可以实现流量的均匀分配,达到负载均衡的目的。
应理解,本申请中的并行链路可以理解为两个节点之间有多个物理链路的场景。
可选地,在一些实施例中,在步骤610之前,第一网络设备可以形成上述BIFT。
可选地,在一些实施例中,在形成上述BIFT之前,需要建立BIER的路由信息,即位索引路由表(bit index routing table,BIRT)。BIRT体现为到达BFER节点的BFR邻居 (BFR-NBR),BIRT也可以包含到达BFR-NBR的下一跳出接口信息。本技术方案还包括,在生成BIFT表项之前的BIRT中,包含第一BFR邻居的标识和第一负载分担组的标识。
可选地,在一些实施例中,如果第一网络设备有多个BFR邻居。例如,第一网络设备还会生成第二BIRT,所述第二BIRT中包含所述第一网络设备的第二BFR邻居的标识和第二负载分担组的标识,第一网络设备根据所述第二BIRT建立所述BIFT,所述BIFT中不仅包含第一BFR邻居的标识和第一负载分担组的标识之间的对应关系,还包含第二BFR邻居的标识和第二负载分担组的标识之间的对应关系。第一网络设备在执行步骤620之前,还可以根据所述第一负载分担组的标识确定所述第一负载分担组对应的第一状态表项,所述第一状态表项中包括所述第一负载分担组中状态为可用的链路接口的数量。
下面结合图5所示的场景一,对本申请实施例提供的负载分担的方法进行详细描述。应理解,下面的的例子仅仅是为了帮助本领域技术人员理解本申请实施例,而非要将申请实施例限制于所示例的具体数值或具体场景。本领域技术人员根据所给出的的例子,显然可以进行各种等价的修改或变化,这样的修改和变化也落入本申请实施例的范围内。
步骤1:对节点PE1进行配置,以生成两个并行链路组以及BIFT。
Figure PCTCN2020116048-appb-000001
其中,“Link-group LG1”表示并行链路组1,“Interface GigabitEthernet 1/0/1 member 1”表示节点PE1上在并行链路组1中的接口1,其作为并行链路组1中的一个成员,编号为1,“Interface GigabitEthernet 1/0/2 member 2”表示节点PE1上在并行链路组1中的接口2,其作为并行链路组1中的另一个成员,编号为2。“Link-Group LG2”表示并行链路组2,“Interface GigabitEthernet 1/0/3 member 1”表示节点PE1上在并行链路组2中的接口1,其作为并行链路组2中的一个成员,编号为1,“Interface GigabitEthernet 1/0/4 member 2”表示节点PE1上在并行链路组2中的接口2,其作为并行链路组2中的另一个成员,编号为2,“Interface GigabitEthernet 1/0/5 member 3”表示节点PE1上在并行链路组2中的接口3,其作为并行链路组2中的另一个成员,编号为3。
“Use Link-group LG1”表示配置节点PE1在BIER转发过程中使用并行链路组1,“Use Link-group LG2”表示配置节点PE1在BIER转发过程中使用并行链路组2。
PE1可以根据上面的配置生成如下的BIFT。
Figure PCTCN2020116048-appb-000002
步骤2:节点PE1收到组播数据报文,根据BIFT进行BIER报文的转发。
具体的转发过程如下:
1、PE1对组播数据报文封装BIER头,BIER头的位串中包含有节点PE2/PE3/PE4所对应的位置1,即第2位、第3位、第4位置1,用1110表示BIER头的初始位串。
2、PE1根据上述BIFT转发表进行报文转发,确定报文要往P2发送一份并且对应的位串要和0110进行AND操作、要往P3发送一份并且对应的位串要和1000进行AND操作。本示例中,报文的位串为1110,和0110进行AND后的结果为0110,和1000进行AND后的结果为1000。
3、根据BFR_NBR=P2表项中的“Flag=并行链路组”以及“Link=并行链路组ID1”的信息,查询并行链路组ID1的成员,获得成员ID为Link1和Link2。PE1从该两个链路中选取一个链路发送。
4、根据BFR_NBR=P3表项中的“Flag=并行链路组”以及“Link=并行链路组ID2”的信息,查询并行链路组ID2的成员,获得成员ID为Link3、Link4和Link5。PE1从该三个链路中选取一个链路发送。
5、在第3和第4步中,PE1选取并行链路组中的链路时,读取并行链路组成员状态表获得act-member-num值,然后根据报文中的字段值(BIER报文头信息)对act-member-num值取模,获得相应的链路。
一种实现方式,以BIER报文包括BIER头和内层的组播报文为例,可以根据BIER头中的Entropy字段值,对act-member-num值取模,然后获得相应的链路。
应理解,该方式要求PE1节点对组播数据报文封装BIER IPv6头时,根据组播流时封装相应的BIER头部Entropy字段值。
另一种实现方式,可以根据BIER报文的其他字段值对act-member-num值取模。例如在一种BIER IPv6(或BIERv6)的封装中,组播数据报文封装在外层IPv6报文头及IPv6扩展头(携带BIER头)之后,还可以使用IPv6报文头中的字段值对act-member-num值取模。具体的实现方式有多种,本申请对此不做具体限定。作为一个示例,可以根据IPv6源地址和流标签(flow label)字段共同确定一个组播流,使用这两个字段值进行一定的运算获得一个值,例如通过Hash运算获得一个值,再对act-member-num值取模。作为另一个 示例,还可以直接根据流标签(flow label)字段值对act-member-num值取模。
应理解,该方式要求PE1节点对组播数据报文封装BIER IPv6头时,根据组播流封装相应的IPv6头部流标签字段值。
假设PE1上收到的报文属于组播流1~组播流12,这些组播流都需要发送给PE2、PE3、PE4。PE1对这些组播流封装BIER头时Entropy字段分别填写1~12,或者在BIERv6封装下对IPv6流标签字段分别填写1~12,则组播流的负载分担情况如下。
Figure PCTCN2020116048-appb-000003
可以看出,本申请实施例提供的通过在BIER中对每个BFR_NBR的出接口链路使用一个并行链路组的方式,再从链路组中选取一个链路进行转发,从而在实现均匀的负载分担的前提下,减少BIFT表项的开销。
可选的,当并行链路组中的链路发生故障的时候,PE1会刷新链路组状态表。具体的,可以是对并行链路组1的act-member-num以及Ls<BS>的取值进行刷新。
为了便于描述,下面以并行链路组1中的链路1发生故障为例进行说明。
PE1在并行链路组1中的链路1发生故障的时候,刷新后的链路组状态表如下所示。
(并行链路组ID=ID1,cfg-member-num=2,act-member-num=1,Ls<BS>=0010);
(并行链路组ID=ID2,cfg-member-num=3,act-member-num=3,Ls<BS>=0111)。
此后,PE1对收到的报文的转发过程如下所示。
1、PE1对组播数据报文封装BIER头,BIER头的位串中包含有节点PE2/PE3/PE4所对应的位置1,即第2位、第3位、第4位置1,用1110表示BIER头的初始位串。
2、PE1根据上述BIFT转发表进行报文转发,确定报文要往P2发送一份并且对应的位串要和0110进行AND操作、要往P3发送一份并且对应的位串要和1000进行AND操作。本示例中,报文的位串为1110,和0110进行AND后的结果为0110,和1000进行AND后的结果为1000。
3、根据BFR_NBR=P2表项中的“Flag=并行链路组”以及“Link=并行链路组ID1”的信息,查询并行链路组ID1的成员,获得成员ID为Link1和Link2。因为Link1状态为故障状态(Ls<BS>的第1个bit位为0),因此PE1从该两个链路中选取Link2发送。
4、根据BFR_NBR=P3表项中的“Flag=并行链路组”以及“Link=并行链路组ID2”的信息,查询并行链路组ID2的成员,获得成员ID为Link3、Link4和Link5。PE1从该 三个链路中选取一个链路发送。
5、在第3和第4步中,PE1选取并行链路组中的链路时,读取并行链路组成员状态表获得act-member-num值,然后根据报文中的字段值对act-member-num值取模,获得相应的链路。具体的请参考上文中的描述,此处不再赘述。
相应的,PE1对收到的报文属于组播流1~组播流12的负载分担情况如下所示。
Figure PCTCN2020116048-appb-000004
可选的,在一些实施例中,实施本申请实施例提供的负载分担方法的节点可以是和封装BIER头或BIERv6头的节点是同一个节点,或者也可以是不同的节点。
下面结合图5所示的场景二,对封装BIER头或BIERv6头的节点和实施负载分担方法的节点不是同一个节点的场景中,对该节点实施本申请实施例提供的负载分担方法的具体过程进行详细描述。
步骤1:对节点PE1进行配置,以生成并行链路组2以及BIFT。
Figure PCTCN2020116048-appb-000005
PE1可以根据上面的配置生成如下的BIFT。
Figure PCTCN2020116048-appb-000006
Figure PCTCN2020116048-appb-000007
步骤2:节点PE1收到组播数据报文,根据BIFT进行BIER报文的转发。
具体的转发过程如下:
1、PE1对组播数据报文封装BIER头,BIER头的位串中包含有节点PE2/PE3/PE4所对应的位置1,即第2位、第3位、第4位置1,用1110表示BIER头的初始位串。
2、PE1根据上述BIFT转发表进行报文转发,确定报文要往P2发送一份并且对应的位串要和1110进行AND操作;本示例中,报文的位串为1110,和1110进行AND后的结果为1110。
3、根据BFR_NBR=P2表项中的“Flag=并行链路组”以及“Link=并行链路组ID2”的信息,查询并行链路组ID2的成员,获得成员ID为Link3、Link4和Link5。PE1从该三个链路中选取一个链路发送。
4、在第3步中,PE1选取并行链路组中的链路时,读取并行链路组成员状态表获得act-member-num值,然后根据报文中的字段值对act-member-num值取模,获得相应的链路。
步骤3:对节点P2进行配置,以生成并行链路组1以及BIFT。
Figure PCTCN2020116048-appb-000008
P2可以根据上面的配置生成如下的BIFT。
Figure PCTCN2020116048-appb-000009
步骤4:节点P2收到组播数据报文,根据如上的BIFT进行BIER报文的转发。
具体的转发过程如下:
1、PE2收到BIER封装的组播报文,BIER头的位串为1110。
2、P2根据上述BIFT转发表进行报文转发,确定报文要往P3发送一份并且对应的位串要和1110进行AND操作。本示例中,报文的位串为1110,和1110进行AND后的结果为1110。
3、根据BFR_NBR=P3表项中的“Flag=并行链路组”以及“Link=并行链路组ID1” 的信息,查询并行链路组ID1的成员,获得成员ID为Link1和Link2。P2从该两个链路中选取一个链路发送。
4、在第3步中,P2选取并行链路组中的链路时,读取并行链路组成员状态表获得act-member-num值,然后根据报文中的字段值对act-member-num值取模,获得相应的链路。
设PE1上收到的报文属于组播流1~组播流12,这些组播流都需要发送给PE2、PE3、PE4。PE1对这些组播流封装BIER头时Entropy字段分别填写1~12,或者在BIERv6封装下对IPv6流标签字段分别填写1~12,则组播流的负载分担情况如下。
Figure PCTCN2020116048-appb-000010
可选的,在一些实施例中,以BIERv6封装为例,封装BIERv6头的节点所封装的IPv6头的流标签字段,不仅可以被BIERv6转发节点用来进行并行链路的负载分担,还可以被非BIERv6转发的节点根据单播报文进行并行链路的负载分担。
下面结合图5所示的场景二,对上述实现方式进行详细描述。在场景二中,以P2节点为IPv6路由器但不支持BIERv6转发,其它各节点都支持BIERv6转发为例进行描述。
步骤1:对节点PE1进行配置,以生成并行链路组2以及BIFT。
Figure PCTCN2020116048-appb-000011
PE1可以根据上面的配置生成如下的BIFT。
Figure PCTCN2020116048-appb-000012
Figure PCTCN2020116048-appb-000013
步骤2:节点PE1收到组播数据报文,根据BIFT进行BIER报文的转发。
具体的转发过程如下:
1、PE1对组播数据报文封装BIER头,BIER头的位串中包含有节点PE2/PE3/PE4所对应的位置1,即第2位、第3位、第4位置1,用1110表示BIER头的初始位串。
2、PE1根据上述BIFT转发表进行报文转发,确定报文要往P2发送一份并且对应的位串要和1110进行AND操作。本示例中报文的位串为1110,AND后的结果为1110。
3、根据BFR_NBR=P2表项中的“Flag=并行链路组”以及“Link=并行链路组ID2”的信息,查询并行链路组ID2的成员,获得成员ID为Link3、Link4和Link5。PE1从该三个链路中选取一个链路发送。
4、在第3步中,PE1选取并行链路组中的链路时,读取并行链路组成员状态表获得act-member-num值,然后根据报文中的字段值对act-member-num值取模,获得相应的链路。
本例所述的实现方式,用在一种BIER IPv6(或BIERv6)的封装中,使用IPv6报文头的IPv6源地址和流标签(Flow Label)字段对act-member-num值取模。
P2通过并行链路中的一条收到封装了BIERv6的组播数据报文,该报文的外层IPv6地址是P3节点的单播IPv6地址。该报文的IPv6头部流标签值根据组播流的不同而不同,例如12个组播流的报文其IPv6头部流标签值分别为1~12。P2对此报文进行负载分担,可以采用根据单播报文流标签的方式进行。
假设PE1上收到的报文属于组播流1~组播流12,这些组播流都需要发送给PE2、PE3、PE4。PE1对这些组播流在BIERv6封装下对IPv6流标签字段分别填写1~12,则组播流的负载分担情况如下。
Figure PCTCN2020116048-appb-000014
上文中的并行链路组以及BIFT都是节点根据上述配置信息生成的。可选的,在一些 实施例中,节点还可以自动生成并行链路组标识和BIFT。
下面以图5所示的场景二为例,对节点自动生成并行链路组标识和BIFT的具体实现方式进行详细描述。
步骤1:对节点PE1做如下的配置,以生成并行链路组2以及BIFT。
Figure PCTCN2020116048-appb-000015
“Use Link-group Auto-generated”表示对节点的下一跳有“并行链路”的情况生成并行链路组的转发表。PE1可以根据“Use Link-group Auto-generated”的配置,对BFR_NBR节点的下一跳有“并行链路”的情况生成并行链路组的转发表。
PE1还可以对到达BFR_NBR节点的每个下一跳节点节点生成一个并行链路组ID并在BIER转发表中使用并行链路组ID及标志。这个并行链路组ID可以包含一条链路,也可以包含两条或以上的并行链路,本申请实施例对此不做具体限定。。
PE1可以根据上面的配置生成如下的BIFT。
Figure PCTCN2020116048-appb-000016
步骤2:对节点P2做如下的配置,以生成并行链路组1以及BIFT。
Figure PCTCN2020116048-appb-000017
P2根据“Use Link-group Auto-generated”的配置,对BFR_NBR节点的下一跳有“并行链路”的情况生成并行链路组的转发表。
P2还可以对到达BFR_NBR节点的每个下一跳节点节点生成一个并行链路组ID并在BIER转发表中使用并行链路组ID及标志。
P2根据上面的配置生成如下的BIFT。
Figure PCTCN2020116048-appb-000018
Figure PCTCN2020116048-appb-000019
步骤3:节点PE1收到组播数据报文,根据BIFT将BIER报文转发至节点P2。
具体的转发过程如下:
1、PE1对组播数据报文封装BIER头,BIER头的位串中包含有节点PE2/PE3/PE4所对应的位置1,即第2位、第3位、第4位置1,用1110表示BIER头的初始位串。
2、PE1根据上述BIFT转发表进行报文转发,确定报文要往P2发送一份并且对应的位串要和1110进行AND操作。本示例中,报文的位串为1110,和1110进行AND后的结果为1110。
3、根据BFR_NBR=P2表项中的“Flag=并行链路组”以及“Link=并行链路组ID2”的信息,查询并行链路组ID2的成员,获得成员ID为Link3、Link4和Link5。PE1从该三个链路中选取一个链路发送。
4、在第3步中,PE1选取并行链路组中的链路时,读取并行链路组成员状态表获得act-member-num值,然后根据报文中的字段值对act-member-num值取模,获得相应的链路。
步骤4:P2收到BIER报文,根据BIFT将BIER报文转发至节点PE2/PE3/PE4。
具体的转发过程如下:
1、PE2收到BIER封装的组播报文,BIER头的位串为1110。
2、P2根据上述BIFT转发表进行报文转发,确定报文要往P3发送一份并且对应的位串要和1110进行AND操作。本示例中,报文的位串为1110,和1110进行AND后的结果为1110。
3、根据BFR_NBR=P3表项中的“Flag=并行链路组”以及“Link=并行链路组ID1”的信息,查询并行链路组ID1的成员,获得成员ID为Link1和Link2。P2从该两个链路中选取一个链路发送。
4、在第3步中,P2选取并行链路组中的链路时,读取并行链路组成员状态表获得act-member-num值,然后根据报文中的字段值对act-member-num值取模,获得相应的链路。
假设PE1上收到的报文属于组播流1~组播流12,这些组播流都需要发送给PE2、PE3、PE4。PE1对这些组播流在BIERv6封装下对IPv6流标签字段分别填写1~12,则组播流的负载分担情况如下。
Figure PCTCN2020116048-appb-000020
Figure PCTCN2020116048-appb-000021
上述技术方案中,并行链路组可以根据网络连接情况自动判断并生成,从而进一步节省对并行链路的配置,实现较为简单。
可选的,在一些实施例中,当并行链路组ID1中的链路1发生故障时,P2根据“Use Link-group Auto-generated”的配置,刷新转发表如下(链路组可以只有1个链路成员)。
Figure PCTCN2020116048-appb-000022
相应的,对前述组播流1~12,负载分担到链路的情况如下。
Figure PCTCN2020116048-appb-000023
上文结合图1至图6,详细描述了本申请实施例提供的负载分担的方法,下面将结合图7至图9,详细描述本申请的装置的实施例。应理解,方法实施例的描述与装置实施例的描述相互对应,因此,未详细描述的部分可以参见前面方法实施例。
图7是本申请实施例提供的一种第一网络设备700的示意性结构图。图7所示的该第一网络设备700可以执行上述实施例的方法中第一网络设备执行的相应步骤。如图7所示,所述第一网络设备700包括:确定模块710,发送模块720,
确定模块710,用于根据位索引转发表BIFT确定第一网络设备的第一位转发路由器BFR邻居对应的第一负载分担组,所述第一负载分担组中包括所述第一网络设备和所述第一BFR邻居之间的至少两个链路接口,所述至少两个链路接口用于以负载分担的方式转发基于位索引的显式复制BIER报文;
所述确定模块710,还用于根据所述BIER报文的报文头信息对所述第一负载分担组中状态为可用的链路接口的数量进行取模运算,得到所述第一负载分担组中的第一链路接口;
发送模块720,用于通过所述第一链路接口将所述BIER报文转发至所述第一BFR邻 居。
可选的,所述第一网络设备700还包括:接收模块730,用于接收所述BIER报文。
可选的,所述接收模块730用于接收组播报文,所述第一网络设备还包括封装模块,用于对所述组播报文进行BIER封装,得到BIER报文。
可选的,第一网络设备700还包括生成模块740,用于:生成第一位索引路由表BIRT,所述第一BIRT中包含所述第一BFR邻居的标识和所述第一负载分担组的标识;
生成模块740,还用于根据所述第一BIRT建立所述BIFT。
可选的,所述生成模块730,还用于:生成第二BIRT,所述第二BIRT中包含所述第一网络设备的第二BFR邻居的标识和第二负载分担组的标识,所述第二负载分担组中包括所述第一网络设备和所述第二BFR邻居之间的至少两个链路接口,所述至少两个链路接口用于以负载分担的方式转发所述BIER报文;
所述生成模块740,还用于:根据所述第二BIRT建立所述BIFT,所述BIFT中还包含所述第二BFR邻居和所述第二负载分担组。
可选的,所述确定模块710还用于:根据所述第一负载分担组的标识确定所述第一负载分担组对应的第一状态表项,所述第一状态表项中包括所述第一负载分担组中状态为可用的链路接口的数量。
可选的,所述BIER报文包括BIER头和内层的组播报文,所述报文头信息为所述BIER头中熵字段的取值。
可选的,所述BIER报文包括互联网协议第六版IPv6头以及内层的组播报文,所述IPv6头中包括源IP地址字段和流标签字段,所述报文头信息为所述流标签字段的取值,或为根据所述流标签字段的取值对所述源IP地址字段的取值进行哈希计算得到的结果。
可选的,所述确定模块710还用于:如果所述第一链路接口的状态为不可用,根据所述BIER报文的报文头信息对所述第一负载分担组中状态为可用的链路接口的数量进行取模运算,得到所述第一负载分担组中对所述BIER报文进行转发的第二链路接口;
所述发送模块720还用于:通过所述第二链路接口将所述BIER报文转发至所述第一BFR邻居。
可选的,所述确定模块710还用于:根据所述第一负载分担组中各个链路接口的状态确定所述第一链路接口的状态为不可用。
可选的,所述第一负载分担组中各个链路接口的状态是一个带有K个比特的比特串,其中,所述K为大于1的正整数,所述比特串中的每一个比特的位置表示所述第一负载分担组中的一个链路接口,所述比特的取值表示所述链路接口的状态信息,
所述确定模块710具体用于:根据比特串中所述第一链路接口对应的比特的取值,确定所述第一链路接口的状态为不可用。
图8是本申请实施例的第一网络设备2000的硬件结构示意图。图8所示第一网络设备2000可以执行上述实施例的方法中第一网络设备执行的相应步骤。
如图8所示,所述第一网络设备2000包括处理器2001、存储器2002、接口2003和总线2004。其中接口2003可以通过无线或有线的方式实现,具体来讲可以是网卡。上述处理器2001、存储器2002和接口2003通过总线2004连接。
所述接口2003具体可以包括发送器和接收器,用于第一网络设备实现上述收发。例 如,所述接口2003用于接收位索引的显式复制BIER报文。又例如,所述接口2003用于通过所述第一链路接口将所述BIER报文转发至所述第一BFR邻居。
所述处理器2001用于执行上述实施例中由第一网络设备进行的处理。例如,根据位索引转发表BIFT确定所述第一网络设备的第一位转发路由器BFR邻居对应的第一负载分担组;和/或用于本文所描述的技术的其他过程。作为举例,所述处理器2001用于支持图6中的步骤620、步骤630。存储器2002包括操作系统20021和应用程序20022,用于存储程序、代码或指令,当处理器或硬件设备执行这些程序、代码或指令时可以完成方法实施例中涉及第一网络设备的处理过程。可选的,所述存储器2002可以包括只读存储器(read-only memory,ROM)和随机存取存储器(random access memory,RAM)。其中,所述ROM包括基本输入/输出系统(basic input/output system,BIOS)或嵌入式系统;所述RAM包括应用程序和操作系统。当需要运行第一网络设备2000时,通过固化在ROM中的BIOS或者嵌入式系统中的bootloader引导系统进行启动,引导第一网络设备2000进入正常运行状态。在第一网络设备2000进入正常运行状态后,运行在RAM中的应用程序和操作系统,从而,完成方法实施例中涉及第一网络设备2000的处理过程。
可以理解的是,图8仅仅示出了第一网络设备2000的简化设计。在实际应用中,第一网络设备可以包含任意数量的接口,处理器或者存储器。
图9为本申请实施例的另一种第一网络设备2100的硬件结构示意图。图9所示的第一网络设备2100可以执行上述实施例的方法中第一网络设备执行的相应步骤。
如图9所述,第一网络设备2100包括:主控板2110、接口板2130、交换网板2120和接口板2140。主控板2110、接口板2130和2140,以及交换网板2120之间通过系统总线与系统背板相连实现互通。其中,主控板2110用于完成系统管理、设备维护、协议处理等功能。交换网板2120用于完成各接口板(接口板也称为线卡或业务板)之间的数据交换。接口板2130和2140用于提供各种业务接口(例如,POS接口、GE接口、ATM接口等),并实现数据包的转发。
接口板2130可以包括中央处理器2131、转发表项存储器2134、物理接口卡2133和网络处理器2132。其中,中央处理器2131用于对接口板进行控制管理并与主控板上的中央处理器进行通信。转发表项存储器2134用于保存表项,例如,上文中的BIFT。物理接口卡2133用于完成流量的接收和发送。
具体的,物理接口卡2133用于接收BIER报文,物理接口卡2133接收到所述BIER报文后,将所述BIER报文由经由中央处理器2131发送到中央处理器2111,中央处理器2111处理所述BIER报文。
应理解,本申请实施例中接口板2140上的操作与所述接口板2130的操作一致,为了简洁,不再赘述。应理解,本实施例的第一网络设备2100可对应于上述方法实施例所具有的功能和/或所实施的各种步骤,在此不再赘述。
此外,需要说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,第一网络设备的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,第一网络设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发 架构下,第一网络设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的第一网络设备的数据接入和处理能力要大于集中式架构的设备。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。
本申请实施例还提供了一种计算机可读介质,该计算机可读介质存储有程序代码,当该计算机程序代码在计算机上运行时,使得计算机执行上述各方面中的方法。这些计算机可读存储包括但不限于如下的一个或者多个:只读存储器(read-only memory,ROM)、可编程ROM(programmable ROM,PROM)、可擦除的PROM(erasable PROM,EPROM)、Flash存储器、电EPROM(electrically EPROM,EEPROM)以及硬盘驱动器(harddrive)。
本申请实施例还提供了一种计算机程序产品,应用于第一网络设备或第一网络设备的BFR邻居中,该计算机程序产品包括:计算机程序代码,当该计算机程序代码被计算机运行时,使得该计算机执行上述任一方面的任意可能的实现方式中的方法。
本申请实施例还提供了一种芯片系统,应用于第一网络设备中,该芯片系统包括:至少一个处理器、至少一个存储器和接口电路,所述接口电路负责所述芯片系统与外界的信息交互,所述至少一个存储器、所述接口电路和所述至少一个处理器通过线路互联,所述至少一个存储器中存储有指令;所述指令被所述至少一个处理器执行,以进行上述各个方面的所述的方法中所述第一网络设备或第一网络设备的BFR邻居的操作。
在具体实现过程中,该芯片可以以中央处理器(centralprocessingunit,CPU)、微控制器(microcontroller unit,MCU)、微处理器(micro processing unit,MPU)、数字信号处理器(digital signal processing,DSP)、片上系统(system on chip,SoC)、专用集成电路(application-specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或可编辑逻辑器件(programmable logic device,PLD)的形式实现。
本申请实施例还提供了一种计算机程序产品,应用于第一网络设备或第一网络设备的BFR邻居中,所述计算机程序产品包括一系列指令,当所述指令被运行时,以进行上述各个方面的所述的方法中所述第一网络设备或第一网络设备的BFR邻居的操作。
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显 示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (20)

  1. 一种负载分担的方法,其特征在于,所述方法包括:
    第一网络设备根据位索引转发表BIFT确定所述第一网络设备的第一位转发路由器BFR邻居对应的第一负载分担组,所述第一负载分担组中包括所述第一网络设备和所述第一BFR邻居之间的至少两个链路接口,所述至少两个链路接口用于以负载分担的方式转发基于位索引的显式复制BIER报文;
    所述第一网络设备根据所述BIER报文的报文头信息对所述第一负载分担组中状态为可用的链路接口的数量进行取模运算,得到所述第一负载分担组中的第一链路接口;
    所述第一网络设备通过所述第一链路接口将所述BIER报文转发至所述第一BFR邻居。
  2. 根据权利要求1所述的方法,其特征在于,在所述第一网络设备根据位索引转发表BIFT确定所述第一网络设备的第一位转发路由器BFR邻居对应的第一负载分担组之前,所述方法还包括:
    所述第一网络设备生成第一位索引路由表BIRT,所述第一BIRT中包含所述第一BFR邻居的标识和所述第一负载分担组的标识;
    所述第一网络设备根据所述第一BIRT建立所述BIFT。
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    所述第一网络设备生成第二BIRT,所述第二BIRT中包含所述第一网络设备的第二BFR邻居的标识和第二负载分担组的标识,所述第二负载分担组中包括所述第一网络设备和所述第二BFR邻居之间的至少两个链路接口,所述至少两个链路接口用于以负载分担的方式转发所述BIER报文;
    所述第一网络设备根据所述第二BIRT建立所述BIFT,所述BIFT中还包含所述第二BFR邻居和所述第二负载分担组。
  4. 根据权利要求3所述的方法,其特征在于,在所述第一网络设备根据所述BIER报文的报文头信息对所述第一负载分担组中状态为可用的链路接口的数量进行取模运算之前,所述方法还包括:
    所述第一网络设备根据所述第一负载分担组的标识确定所述第一负载分担组对应的第一状态表项,所述第一状态表项中包括所述第一负载分担组中状态为可用的链路接口的数量。
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述BIER报文包括BIER头和内层的组播报文,所述报文头信息为所述BIER头中熵字段的取值。
  6. 根据权利要求1至4中任一项所述的方法,其特征在于,所述BIER报文包括互联网协议第六版IPv6头以及内层的组播报文,所述IPv6头中包括源IP地址字段和流标签字段,所述报文头信息为所述流标签字段的取值,或为根据所述流标签字段的取值对所述源IP地址字段的取值进行哈希计算得到的结果。
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述方法还包括:
    如果所述第一链路接口的状态为不可用,所述第一网络设备根据所述BIER报文的报文头信息对所述第一负载分担组中状态为可用的链路接口的数量进行取模运算,得到所述 第一负载分担组中对所述BIER报文进行转发的第二链路接口;
    所述第一网络设备通过所述第二链路接口将所述BIER报文转发至所述第一BFR邻居。
  8. 根据权利要求7所述的方法,其特征在于,所述方法还包括:
    所述第一网络设备根据所述第一负载分担组中各个链路接口的状态确定所述第一链路接口的状态为不可用。
  9. 根据权利要求8所述的方法,其特征在于,所述第一负载分担组中各个链路接口的状态是一个带有K个比特的比特串,其中,所述K为大于1的正整数,所述比特串中的每一个比特的位置表示所述第一负载分担组中的一个链路接口,所述比特的取值表示所述链路接口的状态信息,
    所述第一网络设备根据所述第一负载分担组中各个链路接口的状态确定所述第一链路接口的状态为不可用,包括:
    所述第一网络设备根据比特串中所述第一链路接口对应的比特的取值,确定所述第一链路接口的状态为不可用。
  10. 一种第一网络设备,其特征在于,包括:
    确定模块,用于根据位索引转发表BIFT确定第一网络设备的第一位转发路由器BFR邻居对应的第一负载分担组,所述第一负载分担组中包括所述第一网络设备和所述第一BFR邻居之间的至少两个链路接口,所述至少两个链路接口用于以负载分担的方式转发基于位索引的显式复制BIER报文;
    所述确定模块,还用于根据所述BIER报文的报文头信息对所述第一负载分担组中状态为可用的链路接口的数量进行取模运算,得到所述第一负载分担组中的第一链路接口;
    发送模块,用于通过所述第一链路接口将所述BIER报文转发至所述第一BFR邻居。
  11. 根据权利要求10所述的第一网络设备,其特征在于,还包括:
    生成模块,用于生成第一位索引路由表BIRT,所述第一BIRT中包含所述第一BFR邻居的标识和所述第一负载分担组的标识;
    所述生成模块,用于根据所述第一BIRT建立所述BIFT。
  12. 根据权利要求11所述的第一网络设备,其特征在于,
    所述生成模块,还用于:生成第二BIRT,所述第二BIRT中包含所述第一网络设备的第二BFR邻居的标识和第二负载分担组的标识,所述第二负载分担组中包括所述第一网络设备和所述第二BFR邻居之间的至少两个链路接口,所述至少两个链路接口用于以负载分担的方式转发所述BIER报文;
    所述生成模块,还用于:根据所述第二BIRT建立所述BIFT,所述BIFT中包含所述第二BFR邻居和所述第二负载分担组。
  13. 根据权利要求12所述的第一网络设备,其特征在于,所述确定模块还用于:
    根据所述第一负载分担组的标识确定所述第一负载分担组对应的第一状态表项,所述第一状态表项中包括所述第一负载分担组中状态为可用的链路接口的数量。
  14. 根据权利要求10至13中任一项所述的第一网络设备,其特征在于,所述BIER报文包括BIER头和内层的组播报文,所述报文头信息为所述BIER头中熵字段的取值。
  15. 根据权利要求10至13中任一项所述的第一网络设备,其特征在于,所述BIER报文包括互联网协议第六版IPv6头以及内层的组播报文,所述IPv6头中包括源IP地址字 段和流标签字段,所述报文头信息为所述流标签字段的取值,或为根据所述流标签字段的取值对所述源IP地址字段的取值进行哈希计算得到的结果。
  16. 根据权利要求10至15中任一项所述的第一网络设备,其特征在于,所述确定模块还用于:
    如果所述第一链路接口的状态为不可用,根据所述BIER报文的报文头信息对所述第一负载分担组中状态为可用的链路接口的数量进行取模运算,得到所述第一负载分担组中对所述BIER报文进行转发的第二链路接口;
    所述发送模块还用于:通过所述第二链路接口将所述BIER报文转发至所述第一BFR邻居。
  17. 根据权利要求16所述的第一网络设备,其特征在于,所述确定模块还用于:
    根据所述第一负载分担组中各个链路接口的状态确定所述第一链路接口的状态为不可用。
  18. 根据权利要求17所述的第一网络设备,其特征在于,所述第一负载分担组中各个链路接口的状态是一个带有K个比特的比特串,其中,所述K为大于1的正整数,所述比特串中的每一个比特的位置表示所述第一负载分担组中的一个链路接口,所述比特的取值表示所述链路接口的状态信息,
    所述确定模块具体用于:
    根据比特串中所述第一链路接口对应的比特的取值,确定所述第一链路接口的状态为不可用。
  19. 一种第一网络设备,其特征在于,包括:处理器和存储器,所述存储器用于存储程序,所述处理器用于从存储器中调用并运行所述程序以执行权利要求1至9中任一项所述的方法。
  20. 一种计算机可读存储介质,其特征在于,包括计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行权利要求1至9中任一项所述的方法。
PCT/CN2020/116048 2020-02-20 2020-09-18 负载分担的方法、第一网络设备 WO2021164245A1 (zh)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202010104744.3 2020-02-20
CN202010104744 2020-02-20
CN202010194777.1 2020-03-19
CN202010194777.1A CN113285878B (zh) 2020-02-20 2020-03-19 负载分担的方法、第一网络设备

Publications (1)

Publication Number Publication Date
WO2021164245A1 true WO2021164245A1 (zh) 2021-08-26

Family

ID=77275233

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/116048 WO2021164245A1 (zh) 2020-02-20 2020-09-18 负载分担的方法、第一网络设备

Country Status (2)

Country Link
CN (1) CN113285878B (zh)
WO (1) WO2021164245A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114666276A (zh) * 2022-04-01 2022-06-24 阿里巴巴(中国)有限公司 一种发送报文的方法和装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104811387A (zh) * 2014-01-24 2015-07-29 思科技术公司 具有位索引显式复制的等价多路径
WO2019214589A1 (zh) * 2018-05-08 2019-11-14 华为技术有限公司 组播数据传输方法、相关装置及系统
CN110535768A (zh) * 2018-05-25 2019-12-03 北京华为数字技术有限公司 组播数据传输方法及相关设备
CN110611577A (zh) * 2018-06-14 2019-12-24 中兴通讯股份有限公司 业务快速切换方法、切换装置、网络设备和存储介质
WO2020001299A1 (zh) * 2018-06-27 2020-01-02 华为技术有限公司 一种发送报文的方法、设备和系统

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101605091B (zh) * 2009-02-13 2012-02-22 华为技术有限公司 一种多端口负载分担方法、装置和网络系统
US10033641B2 (en) * 2014-11-06 2018-07-24 Juniper Networks, Inc. Deterministic and optimized bit index explicit replication (BIER) forwarding
CN110460522B (zh) * 2018-05-08 2021-11-19 华为技术有限公司 组播数据传输方法、相关装置及系统
US20190386837A1 (en) * 2018-06-19 2019-12-19 Juniper Networks, Inc. Forwarding multicast data packets using bit index explicit replication (bier) for bier-incapable network devices
US11374865B2 (en) * 2018-07-02 2022-06-28 Marvell Israel (M.I.S.L) Ltd. Group specific load balancing in network devices

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104811387A (zh) * 2014-01-24 2015-07-29 思科技术公司 具有位索引显式复制的等价多路径
WO2019214589A1 (zh) * 2018-05-08 2019-11-14 华为技术有限公司 组播数据传输方法、相关装置及系统
CN110535768A (zh) * 2018-05-25 2019-12-03 北京华为数字技术有限公司 组播数据传输方法及相关设备
CN110611577A (zh) * 2018-06-14 2019-12-24 中兴通讯股份有限公司 业务快速切换方法、切换装置、网络设备和存储介质
WO2020001299A1 (zh) * 2018-06-27 2020-01-02 华为技术有限公司 一种发送报文的方法、设备和系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114666276A (zh) * 2022-04-01 2022-06-24 阿里巴巴(中国)有限公司 一种发送报文的方法和装置

Also Published As

Publication number Publication date
CN113285878A (zh) 2021-08-20
CN113285878B (zh) 2022-08-26

Similar Documents

Publication Publication Date Title
WO2021063232A1 (zh) 建立bier转发表项的方法、装置和系统
CN109218178B (zh) 一种报文处理方法及网络设备
WO2020182086A1 (zh) 一种bier报文的发送方法和装置
WO2022100554A1 (zh) Bier报文转发的方法、设备以及系统
WO2022062506A1 (zh) 一种数据处理方法、装置、存储介质及电子装置
WO2009012688A1 (fr) Procédé, système et appareil de réacheminement de message dans un réseau privé virtuel à trois couches
CN114465920B (zh) 确定对应关系的方法、装置以及系统
WO2021093463A1 (zh) 报文转发的方法、第一网络设备以及第一设备组
US20220200820A1 (en) Packet Sending Method and Apparatus
WO2021244108A1 (zh) Bier组播流量的统计方法、设备以及系统
WO2021164245A1 (zh) 负载分担的方法、第一网络设备
US20230318974A1 (en) BIER Packet Forwarding Method, Device, and System
US11855888B2 (en) Packet verification method, device, and system
US11784919B2 (en) Method for sending BIERv6 packet and first network device
US20220337521A1 (en) Packet Sending Method, Device and System
WO2022206405A1 (zh) 一种BIERv6报文的处理方法、设备以及系统
WO2021254454A1 (zh) Bier oam检测的方法、设备以及系统
WO2024016869A1 (zh) 一种组播配置方法及装置
WO2024061184A1 (zh) 对应关系的获取方法、参数通告方法、装置、设备及介质
CN117478503A (zh) 一种组播配置方法及装置

Legal Events

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

Ref document number: 20920234

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20920234

Country of ref document: EP

Kind code of ref document: A1