WO2022089027A1 - Method, apparatus and system for sending packet, and storage medium - Google Patents

Method, apparatus and system for sending packet, and storage medium Download PDF

Info

Publication number
WO2022089027A1
WO2022089027A1 PCT/CN2021/117322 CN2021117322W WO2022089027A1 WO 2022089027 A1 WO2022089027 A1 WO 2022089027A1 CN 2021117322 W CN2021117322 W CN 2021117322W WO 2022089027 A1 WO2022089027 A1 WO 2022089027A1
Authority
WO
WIPO (PCT)
Prior art keywords
network device
identifier
packet
routing data
network
Prior art date
Application number
PCT/CN2021/117322
Other languages
French (fr)
Chinese (zh)
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 WO2022089027A1 publication Critical patent/WO2022089027A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • 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/58Association of routers
    • H04L45/586Association of routers of virtual routers

Definitions

  • the present application relates to the field of communications, and in particular, to a method, device, system and storage medium for sending a message.
  • Segment routing (SR) networks include virtual network functions (VNFs), distributed virtual routers (DVRs), and border routers.
  • VNF includes multiple virtual machines corresponding to a virtual private network (VPN), and each virtual machine is used to process service packets of the VPN.
  • the number of DVRs may be multiple, and each DVR communicates with at least one virtual machine in the VNF, and the DVR includes a segment identification (SID) of each virtual machine in the at least one virtual machine.
  • the border router includes a route for each virtual machine in the VNF, and a route for a virtual machine includes the VPN ID, the DVR address that communicates with the virtual machine, and the SID of the virtual machine.
  • the border router receives a first service packet, the first service packet is a packet belonging to the VPN, and the first service packet includes the VPN identifier; acquires multiple routes including the VPN identifier, and selects one from the multiple routes routing; generating a second service packet based on the selected route and the first service packet, the packet header of the second service packet includes a destination address and a segment list, and the payload of the second service packet includes the first service packet, The destination address is the DVR address in the selected route, and the segment list includes the SID of the virtual machine in the selected route.
  • the border router sends the second service packet according to the DVR address in the second service packet.
  • the DVR receives the second service packet, obtains the SID of the virtual machine included in the second service packet and the first service packet, and sends the first service packet to the virtual machine corresponding to the SID, and the virtual machine processes the first service message.
  • each border router of the SR network is equal to the cumulative value of the number of virtual machines corresponding to each VPN. For example, assuming there are three VPNs, each corresponding to four virtual machines, each border router includes 12 routes. However, border routers have limited resources and may not be able to save many routes, increasing the burden on border routers.
  • the present application provides a method, apparatus, system and storage medium for sending a message, so as to reduce the burden of border network equipment.
  • the technical solution is as follows:
  • the present application provides a method for sending a message.
  • a first network device receives a first message, and a header of the first message includes a segment identifier, and the segment identifier is associated with the device set.
  • the device set includes multiple second network devices, the entity set includes multiple functional entities, and the second network device in the device set communicates with the functional entities in the entity set.
  • the first network device sends the first packet to the second network device in the device set corresponding to the segment identifier.
  • the edge network device Since the segment identifier included in the first packet corresponds to the device set and the entity set, for the edge network device of the segment routing network, the edge network device only needs to store a piece of routing data including the VPN identifier and the segment identifier.
  • the border network device may generate the first packet based on the routing data, so that the first network device sends the first packet to the second network device in the device set corresponding to the segment identifier. In this way, regardless of the number of functional entities corresponding to the VPN, the number of routing data stored in the border network device will not be affected, and the number of routing data that needs to be stored in the border network device can be greatly reduced, thereby reducing the need for border network devices. burden of equipment.
  • the first network device sends the first packet to a second network device in the device set based on the segment identifier and the sharing factor of the second network device in the device set. In this way, based on the sharing factor of the second network device, a balanced service can be provided for the packets of the VPN.
  • the first network device acquires the sharing factor of the second network device in the device set according to the segment identifier.
  • the first network device includes a plurality of first routing data, and each first routing data includes the segment identifier, a device identifier of a second network device in the device set, and a sharing factor.
  • the first network device acquires the sharing factor of the second network device in the device set according to the plurality of first routing data. In this way, the sharing factor of the second network device can be accurately obtained.
  • the sharing factor of the second network device is used to indicate the number of functional entities communicating with the second network device or the performance of the functional entities. In this way, when a balancing service is provided for the VPN packets based on the sharing factor of the second network device, the balancing effect can be improved.
  • the first network device receives the first routing data sent by the second network device in the device set.
  • the device set corresponds to a set identifier, and the set identifier is part of the content in the segment identifier.
  • the first network device is a data center gateway.
  • the present application provides a method for sending a message.
  • a second network device receives a first message, and a header of the first message includes a segment identifier, and the segment identifier is associated with the device set.
  • the device set includes multiple second network devices, the entity set includes multiple functional entities, and the second network device in the device set communicates with the functional entities in the entity set.
  • the second network device sends a second packet to the functional entity in the entity set corresponding to the segment identifier, where the second packet is generated based on the first packet.
  • the edge network device Since the segment identifier included in the first packet corresponds to the device set and the entity set, for the edge network device of the segment routing network, the edge network device only needs to store a piece of routing data including the VPN identifier and the segment identifier.
  • the border network device may generate the first packet based on the routing data, so that the second network device sends the second packet to the functional entities in the entity set corresponding to the segment identifier. In this way, regardless of the number of functional entities corresponding to the VPN, the number of routing data stored in the border network device will not be affected, and the number of routing data that needs to be stored in the border network device can be greatly reduced, thereby reducing the need for border network devices. burden of equipment.
  • the second network device sends first routing data, where the first routing data includes the segment identifier, the device identifier of the second network device, and the sharing factor of the second network device. In this way, it can be ensured that the first network device forwards the first packet based on the first routing data.
  • the second network device sends second routing data, where the second routing data includes the virtual private network VPN identifier and the segment identifier, and the first packet includes the VPN identifier. This ensures that the border network device can generate and send the first packet based on the second routing data.
  • the device set corresponds to a set identifier, and the set identifier is part of the content in the segment identifier.
  • the present application provides a method for sending a message.
  • a third network device obtains a first message, and a header of the first message includes a segment identifier, and the segment identifier is associated with the device set.
  • the device set includes multiple second network devices, the entity set includes multiple functional entities, and the second network device in the device set communicates with the functional entities in the entity set; the third network device sends first message.
  • the third network device Since the segment identifier included in the first packet corresponds to the device set and the entity set, the third network device only needs to store a piece of routing data including the VPN identifier and the segment identifier, and the third network device can obtain the routing data based on the routing data. first message. In this way, regardless of the number of functional entities corresponding to the VPN, the number of routing data stored in the third network device will not be affected, and the number of routing data to be stored in the third network device can be greatly reduced, thereby reducing the need for burden on third network equipment.
  • the third network device includes second routing data, and the second routing data includes a virtual private network VPN identifier and the segment identifier.
  • the third network device receives the second packet, where the second packet includes the VPN identifier. This ensures that the third network device can generate the first packet according to the second routing data and the second packet.
  • the third network device receives the second routing data. In this way, the third network device can obtain the second routing data to generate the first packet.
  • the device set corresponds to a set identifier, and the set identifier is part of the content in the segment identifier.
  • the third network device is a border network device of the segment routing network.
  • the present application provides an apparatus for sending a message, which is used to execute the method executed by the first network device in the first aspect or any possible implementation manner of the first aspect.
  • the apparatus includes a unit for performing the first aspect or the method performed by the first network device in any possible implementation manner of the first aspect.
  • the present application provides an apparatus for sending a message, which is used to execute the method executed by the second network device in the second aspect or any possible implementation manner of the second aspect.
  • the apparatus includes a unit for performing the second aspect or the method performed by the second network device in any possible implementation manner of the second aspect.
  • the present application provides an apparatus for sending a message, which is used to execute the method executed by a third network device in the third aspect or any possible implementation manner of the third aspect.
  • the apparatus includes a unit for performing the third aspect or the method performed by the third network device in any possible implementation manner of the third aspect.
  • the present application provides an apparatus for sending a message, the apparatus including a transceiver, a processor and a memory.
  • the transceiver, the processor and the memory may be connected through an internal connection.
  • the memory is used to store a program
  • the processor is used to execute the program in the memory and cooperate with the transceiver, so that the apparatus completes the first aspect or any possible implementation of the first aspect by the first network device. method of execution.
  • the present application provides an apparatus for sending a message, the apparatus including a transceiver, a processor and a memory.
  • the transceiver, the processor and the memory may be connected through an internal connection.
  • the memory is used to store a program
  • the processor is used to execute the program in the memory and cooperate with the transceiver, so that the apparatus completes the second aspect or any possible implementation of the second aspect by the second network device. method of execution.
  • the present application provides an apparatus for sending a message, the apparatus including a transceiver, a processor and a memory.
  • the transceiver, the processor and the memory may be connected through an internal connection.
  • the memory is used to store a program
  • the processor is used to execute the program in the memory and cooperate with the transceiver, so that the apparatus completes the third aspect or any possible implementation of the third aspect by the third network device. method of execution.
  • the present application provides a computer program product, the computer program product includes a computer program stored in a computer-readable storage medium, and the computer program is loaded through a device to implement the first aspect and the second aspect above.
  • the present application provides a computer-readable storage medium for storing a computer program, and the computer program is loaded by a device to execute any of the first aspect, the second aspect, the third aspect, and the first aspect. possible implementations, any possible implementations of the second aspect, or instructions for methods of any possible implementations of the third aspect.
  • the present application provides a system for sending a message, the system includes the device described in the fourth aspect, the device described in the fifth aspect, and the device described in the sixth aspect, or, the system Including the device of the seventh aspect, the device of the eighth aspect and the device of the ninth aspect.
  • FIG. 1 is a schematic structural diagram of an SR network provided by an embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of another SR network provided by an embodiment of the present application.
  • FIG. 3 is a flowchart of a method for publishing routing data provided by an embodiment of the present application
  • FIG. 4 is a schematic structural diagram of a routing message provided by an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a forwarding table in a network device provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a forwarding table in another network device provided by an embodiment of the present application.
  • FIG. 7 is a flowchart of a method for sending a message provided by an embodiment of the present application.
  • FIG. 8 is a flowchart of another method for sending a message provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of an apparatus for sending a message provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of another apparatus for sending a message provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of another apparatus for sending a message provided by an embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of another apparatus for sending a message provided by an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of another apparatus for sending a message provided by an embodiment of the present application.
  • FIG. 14 is a schematic structural diagram of another apparatus for sending a message provided by an embodiment of the present application.
  • FIG. 15 is a schematic structural diagram of a system for sending a message according to an embodiment of the present application.
  • an embodiment of the present application provides an SR network, where the SR network includes:
  • a first network device multiple second network devices, at least one third network device, and a VNF, where the VNF includes multiple functional entities.
  • the at least one third network device is located at the border of the SR network. Each third network device communicates with the first network device, the first network device communicates with each second network device, and each second network device communicates with at least one functional entity in the VNF.
  • the functional entities communicating with each second network device are different.
  • each third network device and each second network device are segment routing (SRv6) devices of Internet protocol version 6 (IPv6) and have SRv6 functions, so that each third network device
  • SRv6 segment routing
  • IPv6 Internet protocol version 6
  • each third network device When a packet is received, a packet header may be added to the packet to form a new packet, the packet header includes a segment list, the segment list includes a segment identifier, and each second network device is made to receive the new packet Then, the segment identifier can be obtained from the segment list of the new message, and the new message can be processed according to the segment identifier.
  • the functional entities in the VNF correspond to the VPN, and the VNF includes multiple functional entities corresponding to the VPN, and the multiple functional entities are used to process packets belonging to the VPN.
  • the multiple functional entities are all firewalls for performing address resolution, so that the multiple functional entities can be used to perform address resolution on the packets belonging to the VPN.
  • the VNF includes multiple functional entities corresponding to each VPN in at least one VPN, and the multiple functional entities corresponding to any two VPNs may be completely different, partially the same or completely the same.
  • multiple functional entities corresponding to the VPN are formed into an entity set, that is, the entity set including the multiple functional entities corresponds to the VPN, and the entity set is uniquely identified by a segment identifier .
  • the VPN also corresponds to a device set, and the device set includes a second network device that communicates with each functional entity in the entity set.
  • the device set can also be identified using the segment ID, that is, the segment ID corresponds to the entity set and the device set.
  • the set identifier corresponding to the device set may be part of the content in the segment identifier.
  • the segment ID is B1::11
  • the set ID can be B1:/64.
  • B1:/64 is the content of the first 64 bits of the segment identifier, that is to say, the set identifier is the content of the first 64 bits of the segment identifier. or,
  • the set ID may not be part of the segment ID.
  • the device set is identified by a separate set ID, that is, the set ID corresponds to the device set, and the segment ID corresponds to the entity set.
  • the segment identified as B1::11 includes 128 bits, and the content of the first 64 bits is the highest 64 bits of the segment identified.
  • the second network device For each second network device in the device set, when the segment identifier corresponds to the entity set and the device set, the second network device saves the correspondence between the VPN identifier and the segment identifier. or,
  • the second network device saves the correspondence between the VPN identifier, the segment identifier of the entity set, and the set identifier of the device set .
  • the second network device communicates with at least one functional entity in the entity set through at least one port, and the segment identifier is also bound to the at least one port in the second network device.
  • the second network device may save the correspondence between the segment identifier and the port identifier of each port in the at least one port, so as to implement binding of the segment identifier and the at least one port.
  • the entity set corresponding to a VPN on the VNF includes a first functional entity, a second functional entity and a third functional entity
  • the device set corresponding to the VPN includes a second network device 1 and a second network device 2 .
  • the first network device 1 communicates with the first functional entity and the second functional entity.
  • the second network device 1 communicates with the first functional entity through the first port, and communicates with the second functional entity through the second port.
  • the second network device 1 can store the corresponding relationship between the VPN identifier and the segment identifier as shown in Table 1.
  • the first record in the corresponding relationship includes the VPN identifier Net1 and the segment identifier B1::11, and the segment identifier includes the set identifier. B1:, which can be expressed as B1:/64.
  • the second network device 1 may store the corresponding relationship between the VPN identifier Net1, the segment identifier Bsid1 of the entity set, and the set identifier G1 of the device set as shown in Table 2.
  • the second network device 1 also saves the correspondence between the segment identifier and the port identifier as shown in Table 3.
  • the first correspondence among the correspondences shown in Table 3 stores the segment identifier (Bsid1 or B1::11) and The port identifier P1 of the first port, and the second corresponding relationship stores the segment identifier (Bsid1 or B1::11) and the port identifier P2 of the second port.
  • the second network device 2 communicates with the third functional entity through a port.
  • the second network device 2 may store the corresponding relationship between the VPN identifier and the segment identifier as shown in Table 1, or store the VPN identifier Net1, the segment identifier Bsid1 of the entity set, and the set of the device set as shown in Table 2. Identify the corresponding relationship of G1.
  • the second network device 2 may also store the corresponding relationship between the segment identifier and the port identifier as shown in Table 4.
  • the first corresponding relationship among the corresponding relationships shown in Table 4 stores the segment identifier Bsid1 and the port identifier of the one port. P3.
  • the SR network further includes a network management device.
  • the network management device can deploy the entity set corresponding to the VPN on the VNF, select a plurality of second network devices to form the device set corresponding to the VPN, and configure the device set Each second network device in communicates with one or more functional entities in the set of entities.
  • the network management device may select existing functional entities and/or newly created functional entities in the VNF, and form the selected existing functional entities and/or newly created functional entities into an entity set.
  • the network management device may store in the second network device a corresponding relationship between the VPN identifier and the segment identifier, where the segment identifier corresponds to the entity set and the device set. Or, the network management device saves in the second network device the VPN identifier, the segment identifier of the entity set, and the set identifier of the device set, where the set identifier corresponds to the device set, and the segment identifier corresponds to the entity set. correspond.
  • the process that the above-mentioned network management device saves the above-mentioned corresponding relationships on each second network device in the device set may be:
  • the network management device After configuring each second network device in the device set to communicate with one or more functional entities in the entity set, the network management device allocates segment identifiers corresponding to the entity set and the device set, and sends the device set to the device set.
  • the second network device in sends the VPN identity, the segment identity and the identity of each functional entity that communicates with the second network device.
  • the second network device in the device set receives the VPN identifier, the segment identifier, and the identifier of each functional entity that communicates with the second network device, and stores the correspondence between the VPN identifier and the segment identifier.
  • each functional entity that communicates with the second network device determines the port identifier of the port in the second network device that communicates with the each functional entity, and the segment identifier and each functional entity are identified.
  • the port identifier of the entity communication is stored in the corresponding relationship between the segment identifier and the port identifier. or,
  • the network management device After configuring each second network device in the device set to communicate with one or more functional entities in the entity set, the network management device allocates the segment identifier of the entity set and the set identifier of the device set, and sends the second network device to the second network device.
  • the network device sends the VPN identity, the segment identity of the entity set, the set identity of the device set, and the identity of each functional entity that communicates with the second network device.
  • the second network device in the device set receives the VPN identity, the segment identity of the entity set, the set identity of the device set, and the identity of each functional entity that communicates with the second network device, and saves the VPN identity, the entity identity Correspondence between the segment ID of the set and the set ID of the device set.
  • each functional entity that communicates with the second network device determines the port identifier of the port in the second network device that communicates with the each functional entity, and the segment identifier and each functional entity are identified.
  • the port identifier of the entity communication is stored in the corresponding relationship between the segment identifier and the port identifier.
  • a VNF can be a network device or a device cluster including multiple network devices.
  • the VNF is a network device, multiple functional entities included in the entity set corresponding to one VPN are located in the one network device.
  • the VNF is a device cluster including multiple network devices, multiple functional entities included in an entity set corresponding to a VPN are located on different network devices in the device cluster or on the same network device.
  • the second network device may be an independent physical device, so that the second network device may communicate with functional entities on one or more network devices in the VNF.
  • the second network device may be a virtual device, the second network device is located on a network device in the VNF, the second network device is connected to a network device on the one network device or multiple functional entities to communicate.
  • the communication between the first network device and the second network device may be: a network connection exists between the first network device and the second network device.
  • the communication between the second network device and the functional entity in the VNF may include: when the second network device is an independent physical device, and there is a network connection between the second network device and the functional entity in the VNF; when the second network device is located in the VNF A virtual device on one of the network devices, and an internal connection exists between the second network device and a functional entity in the one network device.
  • the third network device may be an SR network border network device, for example, the third network device is a border router, a switch, a gateway, or other forwarding devices having a function of forwarding packets.
  • the first network device may be a data center gateway (data center gateway, DCGW) or the like.
  • the second network device may be a router, a switch, a gateway, or other forwarding device with the function of forwarding packets; in the case where the second network device is a virtual device, the second network device Can be a DVR.
  • the functional entities on the VNF can be single boards, virtual machines, or containers.
  • a VNF may be a single server or a server cluster including multiple servers.
  • an embodiment of the present application provides a method for publishing routing data.
  • the method can be applied to the network architecture shown in FIG. 1 or FIG. 2 , and the method includes:
  • Step 301 The VNF sends a service route announcement message to the first network device, where the service route announcement message includes the VPN identifier.
  • the VNF sends a service route advertisement message to the first network device through an external border gateway protocol (external border gateway protocol, EBGP), and the service route advertisement message may be an EBGP message.
  • an external border gateway protocol external border gateway protocol, EBGP
  • EBGP external border gateway protocol
  • the VNF sends a service route announcement message after the network management device deploys the entity set corresponding to the VPN on the VNF.
  • the VNF sends a service route advertisement message to the first network device, where the service route advertisement message includes the VPN identifier Net1.
  • Step 302 The first network device receives the service route announcement message, and sends the service route announcement message to each second network device that communicates with the first network device.
  • Each second network device that communicates with the first network device includes the second network device in the device set corresponding to the VPN. Therefore, the first network device sends the service route advertisement information, and the second network device in the device set receives the service route advertisement information.
  • Step 303 The second network device receives the service routing announcement message, and sends the first routing data and the second routing data to the first network device.
  • the second network device before sending the first routing data and the second routing data, the second network device generates the following two types of first routing data and second routing data, which are:
  • the first routing data includes a segment identifier, a device identifier of the second network device, and a sharing factor of the second network device, where the sharing factor of the second network device is used to indicate the function of communicating with the second network device
  • the number and/or performance of the entity, and the segment ID is the segment ID corresponding to the VPN.
  • the second routing data includes the VPN identifier and the segment identifier.
  • the first routing data includes the set identifier of the device set, the device identifier of the second network device, and the sharing factor of the second network device
  • the second routing data includes the VPN identifier, the device set corresponding to the VPN.
  • the second network device when the set identifier is part of the segment identifier, the second network device generates the first routing data and the second routing data in the first form. In the case that the set identifier is not part of the segment identifier, the second network device generates the above-mentioned second type of first routing data and second routing data.
  • the second network device receives the service route announcement message, where the service route announcement message includes the VPN identifier.
  • the second network device In the case where the corresponding relationship between the VPN identifier and the segment identifier is stored in the second network device, the second network device generates and sends the first routing data and the second routing data in the first form.
  • the generation process is as follows:
  • the second network device queries the corresponding relationship between the VPN identifier and the segment identifier according to the VPN identifier, and if the corresponding segment identifier is queried, determines each function in the entity set corresponding to the VPN that communicates with the second network device according to the segment identifier. entity, and then determine a sharing factor for indicating the number and/or performance of each functional entity.
  • the second network device sends first routing data including the VPN identifier, the device identifier of the second network device and the sharing factor to the first network device, and sends second routing data including the VPN identifier and the segment identifier. Wherein, if the second network device does not query the corresponding segment identifier, it indicates that the second network device is not the second network device in the device set corresponding to the VPN, and the operation ends.
  • the second network device In the case where the correspondence between the VPN identifier, the segment identifier of the entity set, and the set identifier of the device set is stored in the second network device, the second network device generates and sends the first routing data and the second route in the second form. Data, the generation process is:
  • the second network device queries the corresponding relationship among the VPN identifier, the segment identifier of the entity set, and the set identifier of the device set. If the segment ID of the entity set corresponding to the VPN and the set ID of the device set are queried, according to the segment ID of the entity set, determine each functional entity in the entity set that communicates with the second network device, and then determine the functional entities used to indicate the entity set. The number and/or performance sharing factor of each functional entity. Sending the first routing data including the set ID of the device set, the device ID of the second network device and the sharing factor to the first network device, and sending the VPN ID, the set ID of the device set and the entity set The segment identifies the second routing data.
  • the second network device does not query the segment identifier of the entity set corresponding to the VPN and the set identifier of the device set, it indicates that the second network device is not the second network device in the device set corresponding to the VPN, and the operation ends.
  • the sharing factor of the second network device may be the number of functional entities communicating with the second network device, or the sharing factor of the second network device may be the performance of the functional entities communicating with the second network device.
  • the total number of packets that the functional entity communicating with the second network device can process in a unit time and the total number of packets is used to reflect the performance of the functional entity communicating with the second network device, that is, the total number of packets.
  • the number of packets may be a sharing factor of the second network device.
  • the operation of the second network device determining each functional entity in the entity set that communicates with the second network device may be:
  • the second network device queries the corresponding at least one port identifier from the correspondence between the segment identifier and the port identifier, and the port corresponding to each port identifier in the at least one port identifier communicates with a functional entity in the entity set , so that each functional entity in the entity set that communicates with the second network device is determined based on each port identifier.
  • the second network device counts the number of the functional entities to obtain the sharing factor of the second network device.
  • the second network device obtains the resource quantity of each functional entity from each functional entity, and determines the sharing factor of the second network device according to the resource quantity of each functional entity.
  • the amount of resources of the functional entity may be the amount of computing resources, the amount of storage resources and/or the amount of network resources, etc.
  • the second network device may determine, according to the amount of resources of the functional entity, the packets processed by the functional entity within a unit time. quantity. After the packet quantity of each functional entity is determined, the packet quantity of each functional entity is accumulated to obtain the total packet quantity, that is, the sharing factor of the second network device is obtained.
  • the second network device 1 receives a service route advertisement message, and the service route advertisement message includes the VPN identifier Net1.
  • the second network device 1 queries the VPN identifier and segment identifier as shown in Table 1 according to the VPN identifier Net1 The corresponding relationship is queried, and the corresponding segment ID is B1::11.
  • the corresponding port identifier P1 of the first port and the port identifier P2 of the second port are queried from the correspondence between the segment identifier and the port identifier as shown in Table 3, and it is determined that there are two Two functional entities communicate with the second network device 1 , and the two functional entities are the first functional entity and the second functional entity, so the sharing factor of the second network device 1 is the number of functional entities 2 .
  • the second network device 1 sends the first routing data and the second routing data to the first network device.
  • the first routing data includes the segment identifier B1::11, the device identifier Device1 of the second network device 1, and the sharing factor 2 of the second network device 1, and the second routing data includes the VPN identifier Net1 and the segment identifier B1:: 11.
  • the second network device 1 searches the table 2 according to the VPN identifier Net1 The corresponding relationship between the VPN identifier, the segment identifier of the entity set and the set identifier of the device set is shown, and the segment identifier Bsid1 of the entity set and the set identifier G1 of the device set corresponding to the VPN are queried.
  • the corresponding port identifier P1 of the first port and the port identifier P2 of the second port are queried from the correspondence between the segment identifier and the port identifier as shown in Table 3, and it is determined that there are two Two functional entities communicate with the second network device 1 , and the two functional entities are the first functional entity and the second functional entity, so the sharing factor of the second network device 1 is the number of functional entities 2 .
  • the second network device 1 sends the first routing data and the second routing data to the first network device.
  • the first routing data includes the set identifier G1 of the device set, the device identifier Device1 of the second network device 1, and the second network device 1's device identifier.
  • the second routing data includes the VPN identifier Net1, the set identifier G1 of the device set, and the segment identifier Bsid1 of the entity set.
  • the second network device 2 receives a service route advertisement message, and the service route advertisement message includes the VPN identifier Net1.
  • the second network device 2 queries the VPN identifier and segment identifier as shown in Table 1 according to the VPN identifier Net1 The corresponding relationship is queried, and the corresponding segment ID is B1::11.
  • the port identifier P3 of a corresponding port is queried from the correspondence between the segment identifier and the port identifier as shown in Table 4, and it is determined that there is a functional entity in the entity set that communicates with the second network device 1 , the one functional entity is the third functional entity, so the sharing factor of the second network device 2 is the number of functional entities 1.
  • the second network device 2 sends the first routing data and the second routing data to the first network device.
  • the first routing data includes the segment identifier B1::11, the device identifier Device2 of the second network device 2, and the sharing factor 1 of the second network device 2, and the second routing data includes the VPN identifier Net1 and the segment identifier B1:: 11.
  • the second network device 2 searches the table 2 according to the VPN identifier Net1 The corresponding relationship between the VPN identifier, the segment identifier of the entity set and the set identifier of the device set is shown, and the segment identifier Bsid1 of the entity set and the set identifier G1 of the device set corresponding to the VPN are queried.
  • the port identifier P3 of a corresponding port is queried from the correspondence between the segment identifier and the port identifier as shown in Table 4, and it is determined that there is a functional entity in the entity set that communicates with the second network device 2 , the one functional entity is the third functional entity, so the sharing factor of the second network device 2 is the number of functional entities 1.
  • the second network device 2 sends the first routing data and the second routing data to the first network device, and the first routing data includes the set identifier G1 of the device set, the device identifier Device2 of the second network device 2 and the second network device 2
  • the sharing factor is 1, and the second routing data includes the VPN identifier Net1, the set identifier G1 of the device set, and the segment identifier Bsid1 of the entity set.
  • the second network device may send a routing message to the first network device, where the routing message includes the first routing data and the second routing data.
  • the routing message may include a first type length value (type length value, TLV) and a second TLV
  • the value field of the first TLV includes the first routing data, that is, includes the first routing data.
  • the segment identifier, the device identifier of the second network device, and the sharing factor of the second network device or, include the set identifier of the device set in the first routing data, the device identifier of the second network device, and the second network device. share factor.
  • the value field of the second TLV includes the second routing data, that is, includes the VPN identifier in the second routing data, the segment identifier of the entity set, and the set identifier of the device set, or includes the VPN identifier and segment in the second routing data. logo.
  • Step 304 The first network device receives the first routing data and the second routing data, saves the first routing data, and sends the second routing data to a third network device that communicates with the first network device.
  • the first network device may save the first routing data in the forwarding table, that is, the first routing data is regarded as a forwarding table entry and stored in the forwarding table.
  • the first network device receives the first routing data sent by the second network device 1 and includes the segment identifier B1::11, the device identifier Device1 of the second network device 1 and the sharing factor 2, including the VPN identifier Net1 and Second routing data with segment identifier B1::11, and receiving first routing data sent by second network device 2 including segment identifier B1::11, device identifier Device2 of second network device 2, and sharing factor 1, including VPN
  • the second network device with the identifier Net1 and the segment identifier B1::11 saves the received two first routing data in the forwarding table. Since the received two second routing data are the same, it only needs to send the data to the third network device A second route data.
  • the first network device receives the first routing data sent by the second network device 1 and includes the aggregate identifier G1, the device identifier Device1 of the second network device 1, and the sharing factor 2, including the VPN identifier Net1, the aggregate identifier G1 and the second routing data of the segment identifier Bsid1, and receive the first routing data sent by the second network device 2 including the set identifier G1, the device identifier Device2 of the second network device 2, and the sharing factor 1, including the VPN identifier Net1, the set
  • the second network device with the identifier G1 and the segment identifier Bsid1 saves the received two first routing data in the forwarding table. Since the received two second routing data are the same, it only needs to send one second routing data to the third network device. route data.
  • Step 305 The third network device receives the second routing data, and saves the second routing data.
  • the third network device may combine the second routing data and the interface identifier of the Ethernet interface communicating with the first network device into a forwarding table entry, and save it in the forwarding table.
  • the third network device receives the second routing data including the VPN identification Net1 and the segment identification B1::11, and the second routing data and the Ethernet in the third network device that communicates with the first network device
  • the interface identifier Eth1 of the interface forms a forwarding table entry, and the forwarding table entry is stored in the forwarding table.
  • the third network device receives the second routing data including the VPN identifier Net1, the set identifier G1 and the segment identifier Bsid1, and the second routing data and the third network device communicated with the first network device.
  • the interface identifier Eth1 of the Ethernet interface forms a forwarding table entry, and the forwarding table entry is stored in the forwarding table.
  • the VNF may not send the service route announcement message to the first network device.
  • the network management device deploys the entity set and configures the second network device in the device set to communicate with the functional entities in the entity set
  • the network management device directly sends a service routing announcement message including the VPN identifier to the first network device, and then Begin to execute from step 302 above.
  • the network management device directly sends a service route announcement message including the VPN identifier to each second network device in the device set, and then starts to execute from the above step 303 .
  • each second network device in the device set generates the first routing data and the second routing data when communicating with the functional entity in the entity set, that is, the execution starts from the above step 303 .
  • the second routing data since the second routing data includes the VPN identifier and the segment identifier, or the second routing data includes the VPN identifier, the set identifier of the device set, and the segment identifier of the entity set, that is to say, one VPN corresponds to one entity set , the entity set corresponds to a piece of second routing data, instead of each functional entity in the entity set corresponding to a piece of routing data.
  • the entity set regardless of the number of functional entities in the entity set, it will not affect the number of second routing data stored in the third network device, so that the second routing data that needs to be stored in the third network device can be greatly reduced the amount of data, thereby reducing the burden on the third network device.
  • the third network device is the border network device of the SR network, that is, the burden of the border network device is reduced. And because the number of functional entities in the entity set will not affect the number of second routing data stored in the third network device, a large number of functional entities can be deployed for the VPN in the VNF to process the VPN's report. text, enhanced scalability.
  • an embodiment of the present application provides a method for sending a packet, and the method can be applied to the network architecture shown in FIG. 1 or FIG. 2 .
  • the packet is a first packet, and the packet of the first packet
  • the header includes a segment identifier, or the header of the first packet includes a set identifier and a segment identifier, the segment identifier corresponds to the device set and the entity set, and the set identifier is part of the segment identifier.
  • the method includes:
  • Step 701 The third network device obtains the first packet, the packet header of the first packet includes a segment identifier, the segment identifier corresponds to a device set and an entity set, the device set includes a plurality of second network devices, and the entity The set includes a plurality of functional entities, and the second network device in the device set communicates with the functional entities in the entity set.
  • the entity set corresponds to a VPN, and each functional entity in the entity set can process packets of the VPN.
  • the header of the first packet may include a destination address and a segment list, where the destination address is a set identifier of the device set, and the segment list includes the segment identifier.
  • the set ID is part of the segment ID.
  • the third network device may obtain the first packet in the following two ways, which are:
  • the third network device may directly generate the first packet.
  • the third network device when the third network device needs to send the first packet to the functional entity in the entity set corresponding to the VPN, it can obtain the forwarding table entry including the VPN identifier from the forwarding table saved by itself.
  • the item includes second routing data, and the first message is generated based on the second routing data.
  • the second routing data also includes segment identification.
  • the header of the first message includes the segment identifier.
  • the header of the first packet includes a destination address and a segment list, where the destination address is a set identifier of the device set, and the segment list includes the segment identifier, and the set identifier is part of the segment identifier.
  • the third network device includes a forwarding entry of the VPN identifier Net1, the forwarding entry includes the second routing data and the interface identifier Eth1 of the Ethernet interface, and the second routing data includes the VPN identifier Net1 and the segment identifier. B1::11.
  • the third network device generates the first packet, the packet header of the first packet includes a destination address and a segment list, the destination address is B1:/64, and the segment identifier in the segment list is B1::11.
  • the set ID B1:/64 is the content of the first 64 bits of the segment ID B1::11.
  • the third network device receives the second packet, the second packet includes the VPN identifier, and generates the first packet according to the second routing data.
  • the packet header of the first packet includes the segment identifier, and the first packet includes the segment identifier.
  • the payload includes a second packet, and the second routing data includes the VPN identifier and the segment identifier.
  • the third network device is located at the boundary of the SR network and can be connected to the terminal or the local area network, and is used to receive the second packet from the terminal or the second packet from the local area network.
  • the second network device receives the second packet, obtains the VPN identifier from the second packet, and obtains a forwarding entry including the VPN identifier, where the forwarding entry includes the second routing data, and according to the first Second, the routing data generates the first packet.
  • the second packet when the first packet is generated, the second packet is used as the payload, and a packet header is added on the basis of the payload, the packet header includes a segment list, and the segment list includes the second route. Segment ID in the data.
  • the packet header includes a destination address and a segment list, the destination address is a set identifier of the device set, the segment list includes the segment identifier, and the set identifier is part of the segment identifier.
  • the packet header is an SRv6 packet header
  • the destination address of the SRv6 packet header is part of the segment identifier included in the second routing data
  • the segment list in the SRv6 packet header includes the segment identifier.
  • the third network device obtains the VPN identifier Net1 from the second message, and obtains a forwarding entry including the VPN identifier Net1, and the forwarding entry includes the second routing data and the interface identifier Eth1 of the Ethernet interface,
  • the second routing data includes the VPN identifier Net1 and the segment identifier B1::11
  • the second packet is used as the payload
  • a packet header is added to the payload
  • the destination address of the packet header is the set identifier B1: /64
  • the segment list of the header includes the segment ID B1::11.
  • Step 702 The third network device sends the first packet to the first network device.
  • the forwarding entry acquired by the third network device further includes an interface identifier of an Ethernet interface that communicates with the first network device, and the first packet is sent to the first network device through an Ethernet interface corresponding to the interface identifier.
  • the forwarding entry acquired by the third network device further includes the interface identifier Eth1 of the Ethernet interface, and the first packet is sent to the first network device through the Ethernet interface corresponding to the Eth1.
  • the first network device receives the first packet, and sends the first packet to the second network device in the device set corresponding to the segment identifier.
  • the first network device may send the first packet to one second network device in the device set, or send the first packet to multiple second network devices in the device set. For detailed implementation, see steps 703 and 704 below. .
  • Step 703 The first network device receives the first packet, and obtains the sharing factor of the second network device in the device set according to the segment identifier included in the first packet, where the device set is the set corresponding to the segment identifier.
  • the sharing factor of each second network device in the device set is respectively used to indicate the number and/or performance of functional entities communicating with each second network device.
  • the first network device acquires the segment identifier from the first packet, and acquires at least one piece of first routing data including the segment identifier from the forwarding table stored by itself, and each piece of the at least one piece of first routing data
  • the piece of first routing data also includes a device identifier and a sharing factor of a second network device, and each second network device in the device set corresponding to the set identifier (or the segment identifier) is obtained from each piece of first routing data device identification and sharing factor.
  • the first network device obtains the set ID in the segment ID from the first packet, and obtains at least one piece of first routing data including the set ID from the forwarding table stored by itself, and the at least one piece of first routing data includes the set ID.
  • Each piece of first routing data also includes a device identifier and a sharing factor of a second network device, and the device identifier and sharing factor of each second network device in the device set corresponding to the set identifier are obtained from each piece of first routing data factor.
  • the first network device receives the first packet, obtains the segment identifier B1::11 from the first packet, and acquires two segments including the segment identifier B1::11 from its forwarding table.
  • One piece of routing data, one of the first routing data also includes the device identification Device1 of the second network device 1 and the sharing factor 2
  • the other first routing data also includes the device identification Device2 of the second network device 2 and the sharing factor 1, so as to obtain
  • the device set corresponding to the segment identifier B1::11 includes the device identifier Device1 and the sharing factor 2 of the second network device 1 and the device identifier Device2 and the sharing factor 1 of the second network device 2 .
  • Step 704 The first network device sends the first packet according to the sharing factor of each second network device.
  • the second network device selects a second network device from the device set according to the specified first balancing strategy and the sharing factor of each second network device, and sends a first report to the selected second network device. arts.
  • the first balancing strategy is: the sharing factor of the second network device is proportional to the probability of selecting the second network device. That is, the greater the sharing factor of the second network device, the greater the probability of selecting the second network device.
  • the sharing factor of the second network device 1 in the device set is 2, and the sharing factor of the second network device 1 is 1, so the probability that the first network device selects the second network device 1 is the probability of selecting the second network device 2 twice the probability.
  • the first network device records the device identification of the second network device selected last time, and during this selection, selects a second network device from the device set based on the recorded information, and sends the selected second network device to the selected second network device. Send the first message.
  • the first network device selects the second network device 1 again after selecting the second network device 1 twice in a row. 2, that is to say, when the first network device receives the first first packet and the second first packet belonging to the VPN, it both selects the second network device 1 and sends the first packet to the second network device 1.
  • the first network device both selects the second network device 1 and sends the fourth first packet to the second network device 1 and the fifth first packet
  • the second network device 2 selects the second network device 2 and sends the sixth first packet to the second network device 2;
  • the first network device may also use other methods, such as selecting a second network device from the device set in a polling manner.
  • the polling manner the number of functional entities communicating with each second network device in the device set may be equal or substantially equal.
  • the so-called polling method means that when the first packet is received for the first time, the first second network device is selected from the device set, and the second network device is selected from the device set when the first packet is received for the second time. Two second network devices, and so on, will not be listed one by one.
  • Step 705 The second network device receives the first packet, and sends a second packet to the functional entities in the entity set corresponding to the segment identifier, where the second packet is generated based on the first packet.
  • the second network device selects a functional entity from a plurality of functional entities in the entity set that communicate with the second network device according to the specified second balancing strategy, where the entity set is a segment in the first packet. Identifies the corresponding entity collection.
  • the second network device obtains the segment identifier from the segment list of the first packet, where the segment identifier is used to identify an entity set, and is determined to be bound with the segment identifier each port, determine the functional entity that communicates with each port, that is, obtain at least one functional entity in the entity set that communicates with the second network device, and select one functional entity from the at least one functional entity according to the specified second balancing strategy functional entity.
  • the second network device sends the second packet to the selected functional entity, so that the functional entity can process the second packet.
  • the second packet may be the first packet or a packet from the first packet after removing the SRv6 header.
  • the second balancing strategy may be: the performance of the functional entity is proportional to the probability of selecting the functional entity, that is, the greater the performance of the functional entity, the greater the probability of selecting the functional entity. or,
  • the second balancing strategy may be: polling in sequence, for example, assuming there are three functional entities, the second network device selects the first functional entity for the first time, selects the second functional entity for the second time, and selects the third functional entity for the third time Functional entity; the first functional entity is selected for the fourth time, the second functional entity is selected for the fifth time, the third functional entity is selected for the sixth time, and so on, and will not be listed one by one.
  • the second network device records the functional entity selected last time, and selects a functional entity from the entity set based on the recorded information during this selection, and sends the first message to the selected functional entity. .
  • the operation of determining each port bound to the segment identifier may be:
  • the second network device obtains at least one port identifier from the correspondence between the segment identifier and the port identifier in the second network device, and the port corresponding to each port identifier in the at least one port identifier is the second network device The port that is bound to the segment ID in .
  • the second network device 1 receives the first packet sent by the first network device, and obtains the segment identifier B1::1 from the segment list of the first packet; according to the segment identifier B1::11 , obtain the port identifier P1 of the first port and the port identifier P2 of the second port from the correspondence between the segment identifier and the port identifier as shown in Table 3 above, and then determine the entity set in the entity set with the second network device 1.
  • the second balancing strategy is to poll in sequence, and the second network device 1 selected the first functional entity last time, and therefore selects the second functional entity this time.
  • the second network device 1 sends the first packet to the second functional entity, and the second functional entity receives the first packet and provides a service for the first packet.
  • the third network device receives the second packet, the second packet includes the VPN identifier, obtains the second routing data stored by itself including the VPN identifier, and generates the first packet according to the second routing data , the header of the first packet includes a segment list, and the segment list includes the segment identifier in the second routing data, and the first packet is sent to the first network device. That is, the second routing data includes the VPN identifier and the segment identifier, so that the entity set corresponds to a piece of second routing data, instead of each functional entity in the entity set corresponding to a piece of routing data.
  • the number of data reduces the burden of the third network equipment, that is, the burden of the border network equipment of the SR network.
  • a large number of functional entities can also be deployed for the VPN in the VNF to provide services for the VPN, thereby enhancing scalability.
  • the first network device receives the first packet, obtains the sharing factor of each second network device in the device set according to the segment identifier in the first packet, and selects the second network according to the sharing factor of each second network device
  • the device sends the first packet, so that the first network device performs the first equalization processing on the packets belonging to the VPN according to the sharing factor of each second network device.
  • the second network device determines, according to the segment identifier in the first packet, at least one functional entity in the entity set corresponding to the segment identifier that communicates with the second network device, and determines from the segment identifier according to the second balancing strategy.
  • a functional entity is selected from at least one functional entity, and a first packet is sent to the selected functional entity to implement a second equalization process for the packets belonging to the VPN.
  • the packets belonging to the VPN can be balanced twice, so as to achieve the purpose of balancing the services of the packets belonging to the VPN.
  • an embodiment of the present application provides a method for sending a packet, and the method can be applied to the network architecture shown in FIG. 1 or FIG. 2 .
  • the packet header of the first packet includes a set of ID and segment ID, the set ID corresponds to the device set, and the segment ID corresponds to the entity set.
  • the method includes:
  • Step 801 The third network device obtains a first packet, and the packet header of the first packet includes a set identifier of the device set and a segment list, and the segment list includes the segment identifier.
  • the entity set corresponds to a VPN, and each functional entity in the entity set can process packets of the VPN.
  • the third network device may obtain the first packet in the following two ways, which are:
  • the third network device may directly generate the first packet.
  • the third network device when the third network device needs to send the first packet to the functional entity in the entity set corresponding to the VPN, it can obtain the forwarding table entry including the VPN identifier from the forwarding table saved by itself.
  • the item includes second routing data, and the first message is generated based on the second routing data.
  • the second routing data also includes a set identifier and a segment identifier.
  • the header of the first packet includes a destination address and a segment list, the destination address is the set identifier, and the segment identifier list includes the segment identifier.
  • the third network device includes a forwarding entry of the VPN identifier Net1, the forwarding entry includes the second routing data and the interface identifier Eth1 of the Ethernet interface, the second routing data includes the VPN identifier Net1, the set identifier G1 and segment ID Bsid1.
  • the third network device generates the first packet, the packet header of the first packet includes a destination address and a segment list, the destination address is G1, and the segment identifier in the segment list is Bsid1.
  • the third network device receives the second packet, the second packet includes the VPN identifier, and generates the first packet according to the second routing data, and the packet header of the first packet includes the set of devices corresponding to the VPN.
  • the set identifier and the segment identifier of the entity set, and the payload of the first packet includes the second packet.
  • the second network device obtains the VPN identifier from the second packet, and obtains a forwarding table entry including the VPN identifier from a forwarding table stored by itself, and the forwarding table entry includes the second routing data, according to The second routing data generates the first packet.
  • the second packet is used as the payload, and a packet header is added on the basis of the payload, the packet header includes the segment list and the set identifier included in the second routing data, the segment The list includes segment identifications in the second routing data.
  • the packet header is an SRv6 packet header
  • the destination address of the SRv6 packet header is the set identifier included in the second routing data.
  • the third network device obtains the VPN identifier Net1 from the second message, and obtains a forwarding entry including the VPN identifier Net1, and the forwarding entry includes the second routing data and the interface identifier Eth1 of the Ethernet interface,
  • the second routing data includes the VPN identifier Net1, the set identifier G1, and the segment identifier Bsid1.
  • the second packet is used as the payload, and a packet header is added to the payload, and the destination address of the packet header is the set identifier.
  • G1 the segment list of the packet header includes the segment identifier Bsid1.
  • Step 802 The third network device sends the first packet to the first network device.
  • the forwarding entry acquired by the third network device further includes an interface identifier of an Ethernet interface that communicates with the first network device, and the first packet is sent to the first network device through an Ethernet interface corresponding to the interface identifier.
  • the first network device receives the first packet, and sends the first packet to the second network device in the device set corresponding to the set identifier.
  • the first network device may send the first packet to one second network device in the device set or multiple second network devices in the device set to send the first packet. For detailed implementation, see steps 803 and 804 below.
  • Step 803 The first network device receives the first packet, and obtains the sharing factor of each second network device in the device set according to the set identifier included in the first packet, where the device set is the set corresponding to the set identifier, and each The sharing factors of the second network devices are respectively used to indicate the number and/or performance of functional entities communicating with each second network device.
  • the first network device obtains the set identifier from the first packet, and obtains at least one piece of first routing data including the set identifier from the routing table stored by itself, and each piece of the at least one piece of first routing data
  • the piece of first routing data also includes a device identifier and a sharing factor of a second network device, and the device identifier and sharing factor of each second network device in the device set corresponding to the set identifier are obtained from each piece of first routing data .
  • the first network device receives the first packet, obtains the set identifier G1 from the first packet, and obtains two pieces of first routing data including the set identifier G1 from its forwarding table, one of which is
  • the first routing data further includes the device identifier Device1 and the sharing factor 2 of the second network device 1, and the other first routing data also includes the device identifier Device2 and the sharing factor 1 of the second network device 2, so as to obtain the corresponding set identifier G1.
  • the device set includes the device identifier Device1 and the sharing factor 2 of the second network device 1 and the device identifier Device2 and the sharing factor 1 of the second network device 2 .
  • Steps 804-805 are respectively the same as steps 704-705 in the embodiment shown in FIG. 7, and will not be described in detail here.
  • the second network device 1 receives the first packet sent by the first network device, and obtains the segment identifier Bsid1 from the segment list of the first packet; Obtain the port identifier P1 of the first port and the port identifier P2 of the second port in the correspondence between the segment identifier and the port identifier shown in the above table 3, and then determine the first function in the entity set that communicates with the second network device 1 an entity and a second functional entity; according to the second balancing strategy, one functional entity is selected from the first functional entity and the second functional entity. It is assumed that the second balancing strategy is to poll in sequence, and the second network device 1 selected the first functional entity last time, and therefore selects the second functional entity this time. The second network device 1 sends the first packet to the second functional entity, and the second functional entity receives the first packet and provides a service for the first packet.
  • the third network device receives the second packet, the second packet includes the VPN identifier, obtains the second routing data stored by itself including the VPN identifier, and generates the first packet according to the second routing data , the header of the first packet includes a segment list and a set identifier in the second routing data, the segment list includes a segment identifier in the second routing data, and the first packet is sent to the first network device. That is to say: the second routing data includes the VPN ID, the segment ID of the entity set corresponding to the VPN, and the set ID of the device set, so that the entity set corresponds to a piece of second routing data instead of each function in the entity set An entity corresponds to a piece of routing data.
  • the first network device receives the first packet, obtains the sharing factor of each second network device in the device set according to the set identifier in the first packet, and selects the second network according to the sharing factor of each second network device
  • the device sends the first packet, so that the first network device performs the first equalization processing on the packets belonging to the VPN according to the sharing factor of each second network device.
  • the second network device After receiving the first packet, the second network device determines, according to the segment identifier in the first packet, at least one functional entity in the entity set corresponding to the segment identifier that communicates with the second network device, and determines from the segment identifier according to the second balancing strategy.
  • a functional entity is selected from at least one functional entity, and a first packet is sent to the selected functional entity to implement a second equalization process for the packets belonging to the VPN. In this way, the packets belonging to the VPN can be balanced twice, so as to achieve the purpose of balancing the services of the packets belonging to the VPN.
  • an embodiment of the present application provides an apparatus 900 for sending a packet, and the apparatus 900 may be deployed in the foregoing first network device, including:
  • a receiving unit 901 configured to receive a first packet, the packet header of the first packet includes a segment identifier, the segment identifier corresponds to a device set and an entity set, the device set includes a plurality of second network devices, the entity set Including a plurality of functional entities, the second network device in the device set communicates with the functional entities in the entity set;
  • the sending unit 902 is configured to send the first packet to the second network device in the device set corresponding to the segment identifier.
  • the sending unit 902 is configured to:
  • the first packet is sent to a second network device in the device set.
  • the apparatus 900 further includes:
  • the processing unit 903 is configured to obtain the sharing factor of the second network device in the device set according to the segment identifier.
  • the apparatus 900 includes a plurality of first routing data, and each first routing data includes the segment identifier, the device identifier and the sharing factor of a second network device in the device set;
  • the processing unit 903 is configured to obtain the sharing factor of the second network device in the device set according to the plurality of first routing data.
  • step 703 in the embodiment shown in FIG. 7
  • step 803 in the embodiment shown in FIG. 8 . This will not be described in detail.
  • the receiving unit 901 is further configured to:
  • the first routing data sent by the second network device in the device set is received.
  • step 304 for the detailed implementation process of receiving the first routing data by the receiving unit 901, reference may be made to the relevant content of step 304 in the embodiment shown in FIG. 3, and details are not described herein again.
  • the device set corresponds to a set identifier, and the set identifier is part of the content of the segment identifier.
  • the apparatus 900 is a data center gateway.
  • the edge network device since the segment identifier included in the first packet corresponds to the device set and the entity set, for the edge network device of the segment routing network, the edge network device only needs to store a message including the VPN identifier and the entity set. routing data of the segment identifier, the border network device can generate the first packet based on the routing data, so that the sending unit sends the first packet to the second network device in the device set corresponding to the segment identifier. In this way, regardless of the number of functional entities corresponding to the VPN, the number of routing data stored in the border network device will not be affected, and the number of routing data that needs to be stored in the border network device can be greatly reduced, thereby reducing the need for border network devices. burden of equipment.
  • an embodiment of the present application provides an apparatus 1000 for sending a message.
  • the apparatus 1000 may be deployed in the foregoing second network device, including:
  • a receiving unit 1001 is configured to receive a first packet, where a packet header of the first packet includes a segment identifier, and the segment identifier corresponds to a device set and an entity set, the device set includes multiple second network devices, and the entity set includes multiple second network devices. a functional entity, the second network device in the device set communicates with the functional entity in the entity set;
  • the sending unit 1002 is configured to send a second message to the functional entities in the entity set corresponding to the segment identifier, where the second message is generated based on the first message.
  • step 705 in the embodiment shown in FIG. 7
  • step 805 in the embodiment shown in FIG. 8 .
  • the sending unit 1002 is further configured to:
  • Send first routing data where the first routing data includes the segment identifier, the device identifier of the apparatus 1000, and the sharing factor of the apparatus 1000.
  • the sending unit 1002 is further configured to:
  • Send second routing data where the second routing data includes the virtual private network VPN identifier and the segment identifier, and the first packet includes the VPN identifier.
  • step 303 for a detailed implementation process of sending the first routing data and the second routing data by the sending unit 1002, reference may be made to the relevant content of step 303 in the embodiment shown in FIG. 3, and details are not described herein again.
  • the device set corresponds to a set identifier, and the set identifier is part of the content of the segment identifier.
  • the edge network device since the segment identifier included in the first packet corresponds to the device set and the entity set, for the edge network device of the segment routing network, the edge network device only needs to store a message including the VPN identifier and the entity set.
  • the routing data of the segment identifier the border network device can generate the first packet based on the routing data, so that the sending unit sends the second packet to the functional entities in the entity set corresponding to the segment identifier.
  • the number of routing data stored in the border network device will not be affected, and the number of routing data that needs to be stored in the border network device can be greatly reduced, thereby reducing the need for border network devices. burden of equipment.
  • an embodiment of the present application provides an apparatus 1100 for sending a message, and the apparatus 1100 may be deployed in the foregoing third network device, including:
  • the processing unit 1101 is configured to acquire a first packet, where the packet header of the first packet includes a segment identifier, and the segment identifier corresponds to a device set and an entity set, the device set includes multiple second network devices, and the entity set includes multiple second network devices. a functional entity, the second network device in the device set communicates with the functional entity in the entity set;
  • the sending unit 1102 is configured to send the first packet.
  • step 701 in the embodiment shown in FIG. 7
  • step 801 in the embodiment shown in FIG. 8 .
  • FIG. 8 the relevant content of step 801 in the embodiment shown in FIG. 8 .
  • the apparatus 1100 includes second routing data, and the second routing data includes a virtual private network VPN identifier and the segment identifier, and the apparatus 1100 further includes: a receiving unit 1103,
  • a receiving unit 1103, configured to receive a second packet, where the second packet includes the VPN identifier
  • the processing unit 1101 is configured to generate a first packet according to the second routing data and the second packet.
  • the receiving unit 1103 is further configured to receive second routing data.
  • step 305 for a detailed implementation process of the receiving unit 1103 receiving the second routing data, reference may be made to the relevant content of step 305 in the embodiment shown in FIG. 3 , which will not be described in detail here.
  • the device set corresponds to a set identifier, and the set identifier is part of the segment identifier.
  • the apparatus 1100 is a border network device of a segment routing network.
  • the device since the segment identifier included in the first packet corresponds to the device set and the entity set, the device only needs to save a piece of routing data including the VPN identifier and the segment identifier, and the processing unit can The routing data obtains the first packet. In this way, regardless of the number of functional entities corresponding to the VPN, the number of routing data stored in the device will not be affected, and the number of routing data to be stored in the device can be greatly reduced, thereby reducing the burden on the device. .
  • an embodiment of the present application provides a schematic diagram of an apparatus 1200 for sending a message.
  • the apparatus 1200 may be the first network device in any of the foregoing embodiments.
  • the apparatus 1200 includes at least one processor 1201 , internal connections 1202 , memory 1203 and at least one transceiver 1204 .
  • the apparatus 1200 is an apparatus with a hardware structure, and can be used to implement the functional modules in the apparatus 700 described in FIG. 7 .
  • the processing unit 903 in the apparatus 900 shown in FIG. 9 can be implemented by calling the code in the memory 1203 by the at least one processor 1201, and the receiving unit 901 and the receiving unit 901 in the apparatus 900 shown in FIG.
  • the sending unit 902 can be implemented by the transceiver 1204 .
  • the apparatus 1200 may also be used to implement the function of the first network device in any of the foregoing embodiments.
  • processor 1201 may be a general-purpose central processing unit (central processing unit, CPU), network processor (network processor, NP), microprocessor, application-specific integrated circuit (application-specific integrated circuit, ASIC) , or one or more integrated circuits used to control the execution of the program of this application.
  • CPU central processing unit
  • NP network processor
  • ASIC application-specific integrated circuit
  • the internal connections 1202 described above may include a path to transfer information between the aforementioned components.
  • the internal connection 1202 is a single board or a bus or the like.
  • the above transceiver 1204 is used to communicate with other devices or communication networks.
  • the above-mentioned memory 1203 can be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM) or other types of storage devices that can store information and instructions.
  • ROM read-only memory
  • RAM random access memory
  • Types of dynamic storage devices which can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical storage, CD-ROM storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by Any other medium accessed by the computer, but not limited to this.
  • the memory can exist independently and be connected to the processor through a bus.
  • the memory can also be integrated with the processor.
  • the memory 1203 is used for storing the application program code for executing the solution of the present application, and the execution is controlled by the processor 1201 .
  • the processor 1201 is configured to execute the application program code stored in the memory 1203, and cooperate with at least one transceiver 1204, so that the device 1200 can realize the functions in the method of the present patent.
  • the processor 1201 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 12 .
  • the apparatus 1200 may include multiple processors, such as the processor 1201 and the processor 1207 in FIG. 12 .
  • processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • an embodiment of the present application provides a schematic diagram of an apparatus 1300 for sending a message.
  • the apparatus 1300 may be the second network device in any of the foregoing embodiments.
  • the apparatus 1300 includes at least one processor 1301 , internal connections 1302 , memory 1303 and at least one transceiver 1304 .
  • the apparatus 1300 is an apparatus with a hardware structure, and can be used to implement the functional modules in the apparatus 700 described in FIG. 7 .
  • the receiving unit 1001 and the sending unit 1002 in the apparatus 1000 shown in FIG. 10 can be implemented by the transceiver 1304 .
  • the apparatus 1300 may also be used to implement the function of the second network device in any of the foregoing embodiments.
  • processor 1301 may be a general-purpose central processing unit (central processing unit, CPU), network processor (network processor, NP), microprocessor, application-specific integrated circuit (application-specific integrated circuit, ASIC) , or one or more integrated circuits used to control the execution of the program of this application.
  • CPU central processing unit
  • NP network processor
  • ASIC application-specific integrated circuit
  • the internal connections 1302 described above may include a path to transfer information between the aforementioned components.
  • the internal connection 1302 is a single board or a bus or the like.
  • the above transceiver 1304 is used to communicate with other devices or communication networks.
  • the above-mentioned memory 1303 can be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM) or other types of storage devices that can store information and instructions.
  • ROM read-only memory
  • RAM random access memory
  • Types of dynamic storage devices which can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical storage, CD-ROM storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by Any other medium accessed by the computer, but not limited to this.
  • the memory can exist independently and be connected to the processor through a bus.
  • the memory can also be integrated with the processor.
  • the memory 1303 is used for storing the application code for executing the solution of the present application, and the execution is controlled by the processor 1301 .
  • the processor 1301 is used to execute the application program code stored in the memory 1303 and cooperate with at least one transceiver 1304, so that the device 1300 can realize the functions in the method of the present patent.
  • the processor 1301 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 13 .
  • the apparatus 1300 may include multiple processors, such as the processor 1301 and the processor 1307 in FIG. 13 .
  • processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • an embodiment of the present application provides a schematic diagram of an apparatus 1400 for sending a message.
  • the apparatus 1400 may be the third network device in any of the foregoing embodiments.
  • the apparatus 1400 includes at least one processor 1401 , internal connections 1402 , memory 1403 and at least one transceiver 1404 .
  • the apparatus 1400 is an apparatus with a hardware structure, and can be used to implement the functional modules in the apparatus 1100 described in FIG. 11 .
  • the processing unit 1101 in the apparatus 1100 shown in FIG. 11 can be implemented by calling the code in the memory 1403 by the at least one processor 1401, and the sending unit 1102 and the sending unit 1102 in the apparatus 1100 shown in FIG.
  • the receiving unit 1103 can be implemented by the transceiver 1404 .
  • the apparatus 1400 may also be used to implement the function of the third network device in any of the foregoing embodiments.
  • processor 1401 may be a general-purpose central processing unit (central processing unit, CPU), network processor (network processor, NP), microprocessor, application-specific integrated circuit (application-specific integrated circuit, ASIC) , or one or more integrated circuits used to control the execution of the program of this application.
  • CPU central processing unit
  • NP network processor
  • ASIC application-specific integrated circuit
  • the internal connections 1402 described above may include a path to transfer information between the aforementioned components.
  • the internal connection 1402 is a single board or a bus or the like.
  • the above transceiver 1404 is used to communicate with other devices or communication networks.
  • the above-mentioned memory 1403 can be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM) or other types of storage devices that can store information and instructions.
  • types of dynamic storage devices which can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical storage, CD-ROM storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by Any other medium accessed by the computer, but not limited to this.
  • the memory can exist independently and be connected to the processor through a bus.
  • the memory can also be integrated with the processor.
  • the memory 1403 is used for storing the application code for executing the solution of the present application, and the execution is controlled by the processor 1401 .
  • the processor 1401 is used to execute the application program code stored in the memory 1403 and cooperate with at least one transceiver 1404, so that the apparatus 1400 can realize the functions in the method of the present patent.
  • the processor 1401 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 14 .
  • the apparatus 1400 may include multiple processors, such as the processor 1401 and the processor 1407 in FIG. 14 .
  • processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • an embodiment of the present application provides a system 1500 for sending a message.
  • the system 1500 includes: the apparatus 900 described in FIG. 9 , the apparatus 1000 described in FIG. 10 , and the apparatus described in FIG. 11 . 1100; or, the system 1500 includes: the apparatus 1200 described in FIG. 12 , the apparatus 1300 described in FIG. 13 , and the apparatus 1400 described in FIG. 14 .
  • the apparatus 900 shown in FIG. 9 or the apparatus 1200 shown in FIG. 12 may be the first network device 1501, and the apparatus 1000 shown in FIG. 10 or the apparatus 1300 shown in FIG. 13 may be the second network device 1502 , the apparatus 1100 described in FIG. 11 or the apparatus 1400 described in FIG. 14 may be the third network device 1503 .

Abstract

The present application relates to the field of communications, and provides a method, apparatus and system for sending a packet, and a storage medium. The method comprises: a first network device receives a first packet, wherein a header of the first packet comprises a segment identifier, the segment identifier corresponds to a device set and an entity set, the device set comprises a plurality of second network devices, the entity set comprises a plurality of functional entities, and the second network devices in the device set are in communication with the functional entities in the entity set; and the first network device sends the first packet to the second network devices in the device set corresponding to the segment identifier. The present application can reduce burden of a boundary network device.

Description

发送报文的方法、装置、***及存储介质Method, device, system and storage medium for sending message
本申请要求于2020年10月31日提交的申请号为202011198931.9、发明名称为“发送报文的方法、装置及***”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202011198931.9 and the invention title "Method, Apparatus and System for Sending Messages" filed on October 31, 2020, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请涉及通信领域,特别涉及一种发送报文的方法、装置、***及存储介质。The present application relates to the field of communications, and in particular, to a method, device, system and storage medium for sending a message.
背景技术Background technique
段路由(segment routing,SR)网络包括虚拟网络功能(virtual network function,VNF)、分布式虚拟路由器(distributed virtual router,DVR)和边界路由器。VNF包括虚拟专用网(virtual private network,VPN)对应的多个虚拟机,每个虚拟机用于处理该VPN的业务报文。DVR的数目可以为多个,每个DVR与VNF中的至少一个虚拟机通信,该DVR包括该至少一个虚拟机中的每个虚拟机的段标识(segment identify,SID)。边界路由器包括VNF中的每个虚拟机的路由,一个虚拟机的路由包括该VPN标识、与该虚拟机通信的DVR地址和该虚拟机的SID。Segment routing (SR) networks include virtual network functions (VNFs), distributed virtual routers (DVRs), and border routers. The VNF includes multiple virtual machines corresponding to a virtual private network (VPN), and each virtual machine is used to process service packets of the VPN. The number of DVRs may be multiple, and each DVR communicates with at least one virtual machine in the VNF, and the DVR includes a segment identification (SID) of each virtual machine in the at least one virtual machine. The border router includes a route for each virtual machine in the VNF, and a route for a virtual machine includes the VPN ID, the DVR address that communicates with the virtual machine, and the SID of the virtual machine.
边界路由器接收第一业务报文,第一业务报文是属于该VPN的报文,第一业务报文包括该VPN标识;获取包括该VPN标识的多条路由,从该多条路由中选择一条路由;基于选择的路由和第一业务报文生成第二业务报文,第二业务报文的报文头包括目的地址和段列表,第二业务报文的净荷包括第一业务报文,该目的地址是选择的路由中的DVR地址,该段列表包括选择的路由中的虚拟机的SID。边界路由器根据第二业务报文中的DVR地址,发送第二业务报文。DVR接收第二业务报文,获取第二业务报文包括的虚拟机的SID和第一业务报文,向该SID相对应的虚拟机发送第一业务报文,由该虚拟机处理第一业务报文。The border router receives a first service packet, the first service packet is a packet belonging to the VPN, and the first service packet includes the VPN identifier; acquires multiple routes including the VPN identifier, and selects one from the multiple routes routing; generating a second service packet based on the selected route and the first service packet, the packet header of the second service packet includes a destination address and a segment list, and the payload of the second service packet includes the first service packet, The destination address is the DVR address in the selected route, and the segment list includes the SID of the virtual machine in the selected route. The border router sends the second service packet according to the DVR address in the second service packet. The DVR receives the second service packet, obtains the SID of the virtual machine included in the second service packet and the first service packet, and sends the first service packet to the virtual machine corresponding to the SID, and the virtual machine processes the first service message.
在实现本申请的过程中,发明人发现现有技术至少存在以下问题:In the process of realizing this application, the inventor found that the prior art has at least the following problems:
SR网络的各边界路由器包括的路由数目等于为每个VPN对应的虚拟机数目的累加值。例如,假设有三个VPN,每个VPN对应四个虚拟机,则各边界路由器包括12个路由。而边界路由器的资源有限,可能无法保存众多路由,增加了边界路由器的负担。The number of routes included in each border router of the SR network is equal to the cumulative value of the number of virtual machines corresponding to each VPN. For example, assuming there are three VPNs, each corresponding to four virtual machines, each border router includes 12 routes. However, border routers have limited resources and may not be able to save many routes, increasing the burden on border routers.
发明内容SUMMARY OF THE INVENTION
本申请提供了一种发送报文的方法、装置、***及存储介质,以减轻边界网络设备的负担。所述技术方案如下:The present application provides a method, apparatus, system and storage medium for sending a message, so as to reduce the burden of border network equipment. The technical solution is as follows:
第一方面,本申请提供了一种发送报文的方法,在所述方法中:第一网络设备接收第一报文,第一报文的报文头包括段标识,该段标识与设备集合和实体集合相对应,该设备集合包括多个第二网络设备,该实体集合包括多个功能实体,该设备集合中的第二网络设备与该实体集合中的功能实体通信。第一网络设备向该段标识对应的设备集合中的第二网络设备,发送第一报文。In a first aspect, the present application provides a method for sending a message. In the method, a first network device receives a first message, and a header of the first message includes a segment identifier, and the segment identifier is associated with the device set. Corresponding to the entity set, the device set includes multiple second network devices, the entity set includes multiple functional entities, and the second network device in the device set communicates with the functional entities in the entity set. The first network device sends the first packet to the second network device in the device set corresponding to the segment identifier.
由于该第一报文包括的该段标识与设备集合和实体集合相对应,对于段路由网络的边界 网络设备,该边界网络设备中只需要保存一条包括VPN标识和该段标识的路由数据,该边界网络设备就可以基于该路由数据生成第一报文,使得第一网络设备向该段标识对应的设备集合中的第二网络设备发送第一报文。这样无论该VPN对应的功能实体数目有多少,都不会影响边界网络设备中保存的路由数据的数目,可以大幅度减小在边界网络设备中需要保存的路由数据的数目,从而减轻了边界网络设备的负担。Since the segment identifier included in the first packet corresponds to the device set and the entity set, for the edge network device of the segment routing network, the edge network device only needs to store a piece of routing data including the VPN identifier and the segment identifier. The border network device may generate the first packet based on the routing data, so that the first network device sends the first packet to the second network device in the device set corresponding to the segment identifier. In this way, regardless of the number of functional entities corresponding to the VPN, the number of routing data stored in the border network device will not be affected, and the number of routing data that needs to be stored in the border network device can be greatly reduced, thereby reducing the need for border network devices. burden of equipment.
在一种可能的实现方式中,第一网络设备基于该段标识和该设备集合中的第二网络设备的分担因子,向该设备集合中的一个第二网络设备发送第一报文。这样基于第二网络设备的分担因子,可以为该VPN的报文提供均衡服务。In a possible implementation manner, the first network device sends the first packet to a second network device in the device set based on the segment identifier and the sharing factor of the second network device in the device set. In this way, based on the sharing factor of the second network device, a balanced service can be provided for the packets of the VPN.
在另一种可能的实现方式中,第一网络设备根据该段标识获取该设备集合中的第二网络设备的分担因子。In another possible implementation manner, the first network device acquires the sharing factor of the second network device in the device set according to the segment identifier.
在另一种可能的实现方式中,第一网络设备包括多个第一路由数据,每个第一路由数据包括该段标识、该设备集合中的一个第二网络设备的设备标识和分担因子。第一网络设备根据该多个第一路由数据,获取该设备集合中的第二网络设备的分担因子。如此可以准确地获取到第二网络设备的分担因子。In another possible implementation manner, the first network device includes a plurality of first routing data, and each first routing data includes the segment identifier, a device identifier of a second network device in the device set, and a sharing factor. The first network device acquires the sharing factor of the second network device in the device set according to the plurality of first routing data. In this way, the sharing factor of the second network device can be accurately obtained.
在另一种可能的实现方式中,第二网络设备的分担因子用于指示与第二网络设备通信的功能实体数目或功能实体的性能。这样在基于第二网络设备的分担因子为该VPN的报文提供均衡服务时,可以提高均衡的效果。In another possible implementation manner, the sharing factor of the second network device is used to indicate the number of functional entities communicating with the second network device or the performance of the functional entities. In this way, when a balancing service is provided for the VPN packets based on the sharing factor of the second network device, the balancing effect can be improved.
在另一种可能的实现方式中,第一网络设备接收该设备集合中的第二网络设备发送的第一路由数据。In another possible implementation manner, the first network device receives the first routing data sent by the second network device in the device set.
在另一种可能的实现方式中,设备集合对应一个集合标识,该集合标识是该段标识中的部分内容。In another possible implementation manner, the device set corresponds to a set identifier, and the set identifier is part of the content in the segment identifier.
在另一种可能的实现方式中,第一网络设备为数据中心网关。In another possible implementation manner, the first network device is a data center gateway.
第二方面,本申请提供了一种发送报文的方法,在所述方法中:第二网络设备接收第一报文,第一报文的报文头包括段标识,该段标识与设备集合和实体集合相对应,该设备集合包括多个第二网络设备,该实体集合包括多个功能实体,该设备集合中的第二网络设备与该实体集合中的功能实体通信。第二网络设备向该段标识对应的实体集合中的功能实体发送第二报文,第二报文是基于第一报文生成的。In a second aspect, the present application provides a method for sending a message. In the method, a second network device receives a first message, and a header of the first message includes a segment identifier, and the segment identifier is associated with the device set. Corresponding to the entity set, the device set includes multiple second network devices, the entity set includes multiple functional entities, and the second network device in the device set communicates with the functional entities in the entity set. The second network device sends a second packet to the functional entity in the entity set corresponding to the segment identifier, where the second packet is generated based on the first packet.
由于该第一报文包括的该段标识与设备集合和实体集合相对应,对于段路由网络的边界网络设备,该边界网络设备中只需要保存一条包括VPN标识和该段标识的路由数据,该边界网络设备就可以基于该路由数据生成第一报文,使得第二网络设备向该段标识对应的实体集合中的功能实体发送第二报文。这样无论该VPN对应的功能实体数目有多少,都不会影响边界网络设备中保存的路由数据的数目,可以大幅度减小在边界网络设备中需要保存的路由数据的数目,从而减轻了边界网络设备的负担。Since the segment identifier included in the first packet corresponds to the device set and the entity set, for the edge network device of the segment routing network, the edge network device only needs to store a piece of routing data including the VPN identifier and the segment identifier. The border network device may generate the first packet based on the routing data, so that the second network device sends the second packet to the functional entities in the entity set corresponding to the segment identifier. In this way, regardless of the number of functional entities corresponding to the VPN, the number of routing data stored in the border network device will not be affected, and the number of routing data that needs to be stored in the border network device can be greatly reduced, thereby reducing the need for border network devices. burden of equipment.
在一种可能的实现方式中,第二网络设备发送第一路由数据,第一路由数据包括该段标识、第二网络设备的设备标识和第二网络设备的分担因子。这样可以保证第一网络设备基于第一路由数据转发第一报文。In a possible implementation manner, the second network device sends first routing data, where the first routing data includes the segment identifier, the device identifier of the second network device, and the sharing factor of the second network device. In this way, it can be ensured that the first network device forwards the first packet based on the first routing data.
在另一种可能的实现方式中,第二网络设备发送第二路由数据,第二路由数据包括虚拟专用网络VPN标识和该段标识,第一报文包括该VPN标识。这样可以保证边界网络设备可 以基于第二路由数据生成第一报文并发送第一报文。In another possible implementation manner, the second network device sends second routing data, where the second routing data includes the virtual private network VPN identifier and the segment identifier, and the first packet includes the VPN identifier. This ensures that the border network device can generate and send the first packet based on the second routing data.
在另一种可能的实现方式中,设备集合对应一个集合标识,该集合标识是该段标识中的部分内容。In another possible implementation manner, the device set corresponds to a set identifier, and the set identifier is part of the content in the segment identifier.
第三方面,本申请提供了一种发送报文的方法,在所述方法中:第三网络设备获取第一报文,第一报文的报文头包括段标识,该段标识与设备集合和实体集合相对应,该设备集合包括多个第二网络设备,该实体集合包括多个功能实体,该设备集合中的第二网络设备与该实体集合中的功能实体通信;第三网络设备发送第一报文。In a third aspect, the present application provides a method for sending a message. In the method, a third network device obtains a first message, and a header of the first message includes a segment identifier, and the segment identifier is associated with the device set. Corresponding to the entity set, the device set includes multiple second network devices, the entity set includes multiple functional entities, and the second network device in the device set communicates with the functional entities in the entity set; the third network device sends first message.
由于第一报文包括的该段标识与设备集合和实体集合相对应,第三网络设备中只需要保存一条包括VPN标识和该段标识的路由数据,第三网络设备就可以基于该路由数据获取第一报文。这样无论该VPN对应的功能实体数目有多少,都不会影响第三网络设备中保存的路由数据的数目,可以大幅度减小在第三网络设备中需要保存的路由数据的数目,从而减轻了第三网络设备的负担。Since the segment identifier included in the first packet corresponds to the device set and the entity set, the third network device only needs to store a piece of routing data including the VPN identifier and the segment identifier, and the third network device can obtain the routing data based on the routing data. first message. In this way, regardless of the number of functional entities corresponding to the VPN, the number of routing data stored in the third network device will not be affected, and the number of routing data to be stored in the third network device can be greatly reduced, thereby reducing the need for burden on third network equipment.
在一种可能的实现方式中,第三网络设备包括第二路由数据,第二路由数据包括虚拟专用网络VPN标识和所述段标识。第三网络设备接收第二报文,第二报文包括所述VPN标识。这样保证了第三网络设备根据第二路由数据和第二报文可以生成第一报文。In a possible implementation manner, the third network device includes second routing data, and the second routing data includes a virtual private network VPN identifier and the segment identifier. The third network device receives the second packet, where the second packet includes the VPN identifier. This ensures that the third network device can generate the first packet according to the second routing data and the second packet.
在另一种可能的实现方式中,第三网络设备接收第二路由数据。这样可以使第三网络设备能够得到第二路由数据,来生成第一报文。In another possible implementation manner, the third network device receives the second routing data. In this way, the third network device can obtain the second routing data to generate the first packet.
在另一种可能的实现方式中,设备集合对应一个集合标识,该集合标识是该段标识中的部分内容。In another possible implementation manner, the device set corresponds to a set identifier, and the set identifier is part of the content in the segment identifier.
在另一种可能的实现方式中,第三网络设备为段路由网络的边界网络设备。In another possible implementation manner, the third network device is a border network device of the segment routing network.
第四方面,本申请提供了一种发送报文的装置,用于执行第一方面或第一方面的任意一种可能的实现方式中的由第一网络设备执行的方法。具体地,所述装置包括用于执行第一方面或第一方面的任意一种可能的实现方式中的由第一网络设备执行的方法的单元。In a fourth aspect, the present application provides an apparatus for sending a message, which is used to execute the method executed by the first network device in the first aspect or any possible implementation manner of the first aspect. Specifically, the apparatus includes a unit for performing the first aspect or the method performed by the first network device in any possible implementation manner of the first aspect.
第五方面,本申请提供了一种发送报文的装置,用于执行第二方面或第二方面的任意一种可能的实现方式中的由第二网络设备执行的方法。具体地,所述装置包括用于执行第二方面或第二方面的任意一种可能的实现方式中的由第二网络设备执行的方法的单元。In a fifth aspect, the present application provides an apparatus for sending a message, which is used to execute the method executed by the second network device in the second aspect or any possible implementation manner of the second aspect. Specifically, the apparatus includes a unit for performing the second aspect or the method performed by the second network device in any possible implementation manner of the second aspect.
第六方面,本申请提供了一种发送报文的装置,用于执行第三方面或第三方面的任意一种可能的实现方式中的由第三网络设备执行的方法。具体地,所述装置包括用于执行第三方面或第三方面的任意一种可能的实现方式中的由第三网络设备执行的方法的单元。In a sixth aspect, the present application provides an apparatus for sending a message, which is used to execute the method executed by a third network device in the third aspect or any possible implementation manner of the third aspect. Specifically, the apparatus includes a unit for performing the third aspect or the method performed by the third network device in any possible implementation manner of the third aspect.
第七方面,本申请提供了一种发送报文的装置,所述装置包括收发器、处理器和存储器。其中,所述收发器、所述处理器以及所述存储器之间可以通过内部连接相连。所述存储器用于存储程序,所述处理器用于执行所述存储器中的程序以及配合收发器,使得所述装置完成第一方面或第一方面的任意可能的实现方式中的由第一网络设备执行的方法。In a seventh aspect, the present application provides an apparatus for sending a message, the apparatus including a transceiver, a processor and a memory. Wherein, the transceiver, the processor and the memory may be connected through an internal connection. The memory is used to store a program, and the processor is used to execute the program in the memory and cooperate with the transceiver, so that the apparatus completes the first aspect or any possible implementation of the first aspect by the first network device. method of execution.
第八方面,本申请提供了一种发送报文的装置,所述装置包括收发器、处理器和存储器。其中,所述收发器、所述处理器以及所述存储器之间可以通过内部连接相连。所述存储器用于存储程序,所述处理器用于执行所述存储器中的程序以及配合收发器,使得所述装置完成第二方面或第二方面的任意可能的实现方式中的由第二网络设备执行的方法。In an eighth aspect, the present application provides an apparatus for sending a message, the apparatus including a transceiver, a processor and a memory. Wherein, the transceiver, the processor and the memory may be connected through an internal connection. The memory is used to store a program, and the processor is used to execute the program in the memory and cooperate with the transceiver, so that the apparatus completes the second aspect or any possible implementation of the second aspect by the second network device. method of execution.
第九方面,本申请提供了一种发送报文的装置,所述装置包括收发器、处理器和存储器。其中,所述收发器、所述处理器以及所述存储器之间可以通过内部连接相连。所述存储器用于存储程序,所述处理器用于执行所述存储器中的程序以及配合收发器,使得所述装置完成第三方面或第三方面的任意可能的实现方式中的由第三网络设备执行的方法。In a ninth aspect, the present application provides an apparatus for sending a message, the apparatus including a transceiver, a processor and a memory. Wherein, the transceiver, the processor and the memory may be connected through an internal connection. The memory is used to store a program, and the processor is used to execute the program in the memory and cooperate with the transceiver, so that the apparatus completes the third aspect or any possible implementation of the third aspect by the third network device. method of execution.
第十方面,本申请提供了一种计算机程序产品,所述计算机程序产品包括在计算机可读存储介质中存储的计算机程序,并且所述计算程序通过设备进行加载来实现上述第一方面、第二方面、第三方面、第一方面任意可能的实现方式、第二方面任意可能的实现方式或第三方面任意可能的实现方式的方法的指令。In a tenth aspect, the present application provides a computer program product, the computer program product includes a computer program stored in a computer-readable storage medium, and the computer program is loaded through a device to implement the first aspect and the second aspect above. Instructions for a method of the aspect, the third aspect, any possible implementation of the first aspect, any possible implementation of the second aspect, or any possible implementation of the third aspect.
第十一方面,本申请提供了一种计算机可读存储介质,用于存储计算机程序,所述计算机程序通过设备进行加载来执行上述第一方面、第二方面、第三方面、第一方面任意可能的实现方式、第二方面任意可能的实现方式或第三方面任意可能的实现方式的方法的指令。In an eleventh aspect, the present application provides a computer-readable storage medium for storing a computer program, and the computer program is loaded by a device to execute any of the first aspect, the second aspect, the third aspect, and the first aspect. possible implementations, any possible implementations of the second aspect, or instructions for methods of any possible implementations of the third aspect.
第十二方面,本申请提供了一种发送报文的***,所述***包括第四方面所述的装置、第五方面所述的装置和第六方面所述的装置,或者,所述***包括第七方面所述的装置、第八方面所述的装置和第九方面所述的装置。In a twelfth aspect, the present application provides a system for sending a message, the system includes the device described in the fourth aspect, the device described in the fifth aspect, and the device described in the sixth aspect, or, the system Including the device of the seventh aspect, the device of the eighth aspect and the device of the ninth aspect.
附图说明Description of drawings
图1是本申请实施例提供的一种SR网络的结构示意图;1 is a schematic structural diagram of an SR network provided by an embodiment of the present application;
图2是本申请实施例提供的另一种SR网络的结构示意图;FIG. 2 is a schematic structural diagram of another SR network provided by an embodiment of the present application;
图3是本申请实施例提供的一种发布路由数据的方法流程图;3 is a flowchart of a method for publishing routing data provided by an embodiment of the present application;
图4是本申请实施例提供的一种路由消息的结构示意图;4 is a schematic structural diagram of a routing message provided by an embodiment of the present application;
图5是本申请实施例提供的一种网络设备中的转发表的结构示意图;5 is a schematic structural diagram of a forwarding table in a network device provided by an embodiment of the present application;
图6是本申请实施例提供的另一种网络设备中的转发表的结构示意图;6 is a schematic structural diagram of a forwarding table in another network device provided by an embodiment of the present application;
图7是本申请实施例提供的一种发送报文的方法流程图;7 is a flowchart of a method for sending a message provided by an embodiment of the present application;
图8是本申请实施例提供的另一种发送报文的方法流程图;8 is a flowchart of another method for sending a message provided by an embodiment of the present application;
图9是本申请实施例提供的一种发送报文的装置结构示意图;9 is a schematic structural diagram of an apparatus for sending a message provided by an embodiment of the present application;
图10是本申请实施例提供的另一种发送报文的装置结构示意图;10 is a schematic structural diagram of another apparatus for sending a message provided by an embodiment of the present application;
图11是本申请实施例提供的另一种发送报文的装置结构示意图;11 is a schematic structural diagram of another apparatus for sending a message provided by an embodiment of the present application;
图12是本申请实施例提供的另一种发送报文的装置结构示意图;12 is a schematic structural diagram of another apparatus for sending a message provided by an embodiment of the present application;
图13是本申请实施例提供的另一种发送报文的装置结构示意图;13 is a schematic structural diagram of another apparatus for sending a message provided by an embodiment of the present application;
图14是本申请实施例提供的另一种发送报文的装置结构示意图;14 is a schematic structural diagram of another apparatus for sending a message provided by an embodiment of the present application;
图15是本申请实施例提供的一种发送报文的***结构示意图。FIG. 15 is a schematic structural diagram of a system for sending a message according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图对本申请实施方式作进一步地详细描述。The embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
参见图1,本申请实施例提供了一种SR网络,该SR网络包括:Referring to FIG. 1, an embodiment of the present application provides an SR network, where the SR network includes:
第一网络设备、多个第二网络设备、至少一个第三网络设备和VNF,VNF包括多个功能实体。A first network device, multiple second network devices, at least one third network device, and a VNF, where the VNF includes multiple functional entities.
该至少一个第三网络设备位于SR网络的边界。每个第三网络设备与第一网络设备通信,第一网络设备与每个第二网络设备通信,每个第二网络设备与VNF中的至少一个功能实体通信。The at least one third network device is located at the border of the SR network. Each third network device communicates with the first network device, the first network device communicates with each second network device, and each second network device communicates with at least one functional entity in the VNF.
可选的,与每个第二网络设备通信的功能实体不同。Optionally, the functional entities communicating with each second network device are different.
其中,每个第三网络设备和每个第二网络设备均为互联网协议第6版(internet protocol version 6,IPv6)的分段路由(SRv6)设备并具有SRv6功能,使得每个第三网络设备在接收到报文时,可以在该报文中添加报文头形成新报文,该报文头包括段列表,该段列表包括段标识,以及使得每个第二网络设备接收该新报文后可以从该新报文的段列表中获取段标识,根据该段标识对该新报文进行处理。Wherein, each third network device and each second network device are segment routing (SRv6) devices of Internet protocol version 6 (IPv6) and have SRv6 functions, so that each third network device When a packet is received, a packet header may be added to the packet to form a new packet, the packet header includes a segment list, the segment list includes a segment identifier, and each second network device is made to receive the new packet Then, the segment identifier can be obtained from the segment list of the new message, and the new message can be processed according to the segment identifier.
VNF中的功能实体与VPN相对应,VNF中包括该VPN对应的多个功能实体,该多个功能实体用于处理属于该VPN的报文。例如,假设该多个功能实体均为用于进行地址解析的防火墙,这样该多个功能实体可用于对属于该VPN的报文进行地址解析。The functional entities in the VNF correspond to the VPN, and the VNF includes multiple functional entities corresponding to the VPN, and the multiple functional entities are used to process packets belonging to the VPN. For example, it is assumed that the multiple functional entities are all firewalls for performing address resolution, so that the multiple functional entities can be used to perform address resolution on the packets belonging to the VPN.
VNF包括至少一个VPN中的每个VPN对应的多个功能实体,任意两个VPN对应的多个功能实体可以完全不同,部分相同或完全相同。The VNF includes multiple functional entities corresponding to each VPN in at least one VPN, and the multiple functional entities corresponding to any two VPNs may be completely different, partially the same or completely the same.
在本申请实施例中,将VPN对应的多个功能实体组成一个实体集合,也就是说,包括该多个功能实体的实体集合与该VPN相对应,该实体集合使用一个段标识来唯一地标识。另外,该VPN还对应一个设备集合,该设备集合包括与该实体集合中的每个功能实体通信的第二网络设备。In the embodiment of the present application, multiple functional entities corresponding to the VPN are formed into an entity set, that is, the entity set including the multiple functional entities corresponds to the VPN, and the entity set is uniquely identified by a segment identifier . In addition, the VPN also corresponds to a device set, and the device set includes a second network device that communicates with each functional entity in the entity set.
对于该设备集合,该设备集合也可以使用该段标识来标识,也就是说,该段标识与该实体集合和该设备集合相对应。在此情况下,该设备集合对应的集合标识可以是该段标识中的部分内容。例如,假设该段标识为B1::11,该集合标识可以为B1:/64。其中,B1:/64是该段标识的前64位的内容,也就是说该集合标识是该段标识的前64位的内容。或者,For the device set, the device set can also be identified using the segment ID, that is, the segment ID corresponds to the entity set and the device set. In this case, the set identifier corresponding to the device set may be part of the content in the segment identifier. For example, assuming the segment ID is B1::11, the set ID can be B1:/64. Wherein, B1:/64 is the content of the first 64 bits of the segment identifier, that is to say, the set identifier is the content of the first 64 bits of the segment identifier. or,
该集合标识也可能不是该段标识中的部分内容,此情况下该设备集合使用单独的一个集合标识来标识,即该集合标识与该设备集合相应对,该段标识与该实体集合相对应。The set ID may not be part of the segment ID. In this case, the device set is identified by a separate set ID, that is, the set ID corresponds to the device set, and the segment ID corresponds to the entity set.
其中,该段标识为B1::11包括128位比特,前64位的内容是该段标识的最高64位的比特。The segment identified as B1::11 includes 128 bits, and the content of the first 64 bits is the highest 64 bits of the segment identified.
对于该设备集合中的每个第二网络设备,在该段标识与该实体集合和该设备集合相对应的情况下,该第二网络设备保存该VPN标识和该段标识的对应关系。或者,For each second network device in the device set, when the segment identifier corresponds to the entity set and the device set, the second network device saves the correspondence between the VPN identifier and the segment identifier. or,
在该集合标识与该设备集合相应对,该段标识与该实体集合相对应的情况下,该第二网络设备保存该VPN标识、该实体集合的段标识和该设备集合的集合标识的对应关系。In the case that the set identifier corresponds to the device set, and the segment identifier corresponds to the entity set, the second network device saves the correspondence between the VPN identifier, the segment identifier of the entity set, and the set identifier of the device set .
该第二网络设备通过至少一个端口与该实体集合中的至少一个功能实体通信,在该第二网络设备中该段标识还与该至少一个端口绑定。The second network device communicates with at least one functional entity in the entity set through at least one port, and the segment identifier is also bound to the at least one port in the second network device.
可选的,该第二网络设备可以保存该段标识与该至少一个端口中的每个端口的端口标识的对应关系,以实现该段标识与该至少一个端口绑定。Optionally, the second network device may save the correspondence between the segment identifier and the port identifier of each port in the at least one port, so as to implement binding of the segment identifier and the at least one port.
例如,参见图1,假设一个VPN在VNF上对应的实体集合包括第一功能实体、第二功能实体和第三功能实体,该VPN对应的设备集合包括第二网络设备1和第二网络设备2。第一网络设备1与第一功能实体和第二功能实体通信。其中,第二网络设备1通过第一端口与第一功能实体通信,通过第二端口与第二功能实体通信。For example, referring to FIG. 1 , it is assumed that the entity set corresponding to a VPN on the VNF includes a first functional entity, a second functional entity and a third functional entity, and the device set corresponding to the VPN includes a second network device 1 and a second network device 2 . The first network device 1 communicates with the first functional entity and the second functional entity. The second network device 1 communicates with the first functional entity through the first port, and communicates with the second functional entity through the second port.
第二网络设备1中可以保存如表1所示的VPN标识与段标识的对应关系,该对应关系中第一条记录包括VPN标识Net1和段标识B1::11,该段标识中包括集合标识B1:,可以表示为B1:/64。或者,第二网络设备1中可以保存如表2所示的该VPN标识Net1、该实体集合的段标识Bsid1和该设备集合的集合标识G1的对应关系。The second network device 1 can store the corresponding relationship between the VPN identifier and the segment identifier as shown in Table 1. The first record in the corresponding relationship includes the VPN identifier Net1 and the segment identifier B1::11, and the segment identifier includes the set identifier. B1:, which can be expressed as B1:/64. Alternatively, the second network device 1 may store the corresponding relationship between the VPN identifier Net1, the segment identifier Bsid1 of the entity set, and the set identifier G1 of the device set as shown in Table 2.
第二网络设备1还保存如表3所示的段标识与端口标识的对应关系,该表3所示对应关系中的第一条对应关系保存有该段标识(Bsid1或B1::11)和第一端口的端口标识P1,第二条对应关系保存有该段标识(Bsid1或B1::11)和第二端口的端口标识P2。The second network device 1 also saves the correspondence between the segment identifier and the port identifier as shown in Table 3. The first correspondence among the correspondences shown in Table 3 stores the segment identifier (Bsid1 or B1::11) and The port identifier P1 of the first port, and the second corresponding relationship stores the segment identifier (Bsid1 or B1::11) and the port identifier P2 of the second port.
表1Table 1
VPN标识VPN ID 段标识Segment ID
Net1Net1 B1::11B1::11
表2Table 2
VPN标识VPN ID 实体集合的段标识Segment ID of the entity collection 设备集合的集合标识Collection ID for the device collection
Net1Net1 Bsid1Bsid1 G1G1
表3table 3
Figure PCTCN2021117322-appb-000001
Figure PCTCN2021117322-appb-000001
第二网络设备2通过一个端口与第三功能实体通信。第二网络设备2中可以保存如表1所示的VPN标识与段标识的对应关系,或者,保存如表2所示的该VPN标识Net1、该实体集合的段标识Bsid1和该设备集合的集合标识G1的对应关系。The second network device 2 communicates with the third functional entity through a port. The second network device 2 may store the corresponding relationship between the VPN identifier and the segment identifier as shown in Table 1, or store the VPN identifier Net1, the segment identifier Bsid1 of the entity set, and the set of the device set as shown in Table 2. Identify the corresponding relationship of G1.
第二网络设备2还可以保存如表4所示的段标识与端口标识的对应关系,该表4所示对应关系中的第一条对应关系保存有该段标识Bsid1和该一个端口的端口标识P3。The second network device 2 may also store the corresponding relationship between the segment identifier and the port identifier as shown in Table 4. The first corresponding relationship among the corresponding relationships shown in Table 4 stores the segment identifier Bsid1 and the port identifier of the one port. P3.
表4Table 4
段标识Segment ID 端口标识Port ID
Bsid1或B1::11Bsid1 or B1::11 P3P3
其中,参见图1,该SR网络还包括网络管理设备,网络管理设备可以在VNF上部署VPN对应的实体集合,以及选择多个第二网络设备组成该VPN对应的设备集合,并配置该设备集合中的每个第二网络设备与该实体集合中的一个或多个功能实体通信。1 , the SR network further includes a network management device. The network management device can deploy the entity set corresponding to the VPN on the VNF, select a plurality of second network devices to form the device set corresponding to the VPN, and configure the device set Each second network device in communicates with one or more functional entities in the set of entities.
网络管理设备在部署实体集合时可以选择VNF中已存在的功能实体和/或新创建功能实体,将该选择的已存在的功能实体和/或新创建功能实体组成实体集合。When deploying the entity set, the network management device may select existing functional entities and/or newly created functional entities in the VNF, and form the selected existing functional entities and/or newly created functional entities into an entity set.
对于该设备集合中的每个第二网络设备,网络管理设备可以在该第二网络设备中保存该 VPN标识和段标识的对应关系,该段标识与该实体集合和该设备集合相对应。或者,网络管理设备在该第二网络设备中保存该VPN标识、实体集合的段标识和设备集合的集合标识的对应关系,该集合标识与该设备集合相对应,该段标识与该实体集合相对应。For each second network device in the device set, the network management device may store in the second network device a corresponding relationship between the VPN identifier and the segment identifier, where the segment identifier corresponds to the entity set and the device set. Or, the network management device saves in the second network device the VPN identifier, the segment identifier of the entity set, and the set identifier of the device set, where the set identifier corresponds to the device set, and the segment identifier corresponds to the entity set. correspond.
上述网络管理设备在设备集合中的每个第二网络设备上保存上述各对应关系的过程,可以为:The process that the above-mentioned network management device saves the above-mentioned corresponding relationships on each second network device in the device set may be:
网络管理设备在配置该设备集合中的每个第二网络设备与该实体集合中的一个或多个功能实体通信后,分配与该实体集合和该设备集合相对应的段标识,向该设备集合中的第二网络设备发送VPN标识、该段标识和与该第二网络设备通信的每个功能实体的标识。该设备集合中的第二网络设备接收VPN标识、该段标识和与该第二网络设备通信的每个功能实体的标识,保存VPN标识和该段标识之间的对应关系。以及,根据与该第二网络设备通信的每个功能实体的标识,确定该第二网络设备中的与该每个功能实体通信的端口的端口标识,以及将该段标识和与该每个功能实体通信的端口标识保存在段标识与端口标识的对应关系中。或者,After configuring each second network device in the device set to communicate with one or more functional entities in the entity set, the network management device allocates segment identifiers corresponding to the entity set and the device set, and sends the device set to the device set. The second network device in sends the VPN identity, the segment identity and the identity of each functional entity that communicates with the second network device. The second network device in the device set receives the VPN identifier, the segment identifier, and the identifier of each functional entity that communicates with the second network device, and stores the correspondence between the VPN identifier and the segment identifier. And, according to the identifier of each functional entity that communicates with the second network device, determine the port identifier of the port in the second network device that communicates with the each functional entity, and the segment identifier and each functional entity are identified. The port identifier of the entity communication is stored in the corresponding relationship between the segment identifier and the port identifier. or,
网络管理设备在配置该设备集合中的每个第二网络设备与该实体集合中的一个或多个功能实体通信后,分配该实体集合的段标识和该设备集合的集合标识,向该第二网络设备发送该VPN标识、该实体集合的段标识、该设备集合的集合标识和与该第二网络设备通信的每个功能实体的标识。该设备集合中的第二网络设备接收该VPN标识、该实体集合的段标识、该设备集合的集合标识和与该第二网络设备通信的每个功能实体的标识,保存该VPN标识、该实体集合的段标识和该设备集合的集合标识之间的对应关系。以及,根据与该第二网络设备通信的每个功能实体的标识,确定该第二网络设备中的与该每个功能实体通信的端口的端口标识,以及将该段标识和与该每个功能实体通信的端口标识保存在段标识与端口标识的对应关系中。After configuring each second network device in the device set to communicate with one or more functional entities in the entity set, the network management device allocates the segment identifier of the entity set and the set identifier of the device set, and sends the second network device to the second network device. The network device sends the VPN identity, the segment identity of the entity set, the set identity of the device set, and the identity of each functional entity that communicates with the second network device. The second network device in the device set receives the VPN identity, the segment identity of the entity set, the set identity of the device set, and the identity of each functional entity that communicates with the second network device, and saves the VPN identity, the entity identity Correspondence between the segment ID of the set and the set ID of the device set. And, according to the identifier of each functional entity that communicates with the second network device, determine the port identifier of the port in the second network device that communicates with the each functional entity, and the segment identifier and each functional entity are identified. The port identifier of the entity communication is stored in the corresponding relationship between the segment identifier and the port identifier.
VNF可以是一个网络设备或是包括多个网络设备的设备集群。VNF为一个网络设备时,一个VPN对应的实体集合包括的多个功能实***于该一个网络设备中。VNF为包括多个网络设备的设备集群时,一个VPN对应的实体集合包括的多个功能实***于该设备集群中的不同网络设备上或同一个网络设备上。A VNF can be a network device or a device cluster including multiple network devices. When the VNF is a network device, multiple functional entities included in the entity set corresponding to one VPN are located in the one network device. When the VNF is a device cluster including multiple network devices, multiple functional entities included in an entity set corresponding to a VPN are located on different network devices in the device cluster or on the same network device.
可选的,参见图1,第二网络设备可以是独立的物理设备,这样第二网络设备可以与VNF中的一个或多个网络设备上的功能实体通信。或者,参见图2,对于每个第二网络设备,该第二网络设备可以是虚拟设备,第二网络设备位于VNF中的一个网络设备上,该第二网络设备与该一个网络设备上的一个或多个功能实体通信。Optionally, referring to FIG. 1 , the second network device may be an independent physical device, so that the second network device may communicate with functional entities on one or more network devices in the VNF. Alternatively, referring to FIG. 2, for each second network device, the second network device may be a virtual device, the second network device is located on a network device in the VNF, the second network device is connected to a network device on the one network device or multiple functional entities to communicate.
其中,第一网络设备与第二网络设备通信可以为:第一网络设备与第二网络设备之间存在网络连接。The communication between the first network device and the second network device may be: a network connection exists between the first network device and the second network device.
第二网络设备与VNF中的功能实体通信可以包括:在第二网络设备是一个独立的物理设备,第二网络设备与VNF中的功能实体之间存在网络连接;在第二网络设备是位于VNF中的一个网络设备上的虚拟设备,第二网络设备与该一个网络设备中的功能实体之间存在内部连接。The communication between the second network device and the functional entity in the VNF may include: when the second network device is an independent physical device, and there is a network connection between the second network device and the functional entity in the VNF; when the second network device is located in the VNF A virtual device on one of the network devices, and an internal connection exists between the second network device and a functional entity in the one network device.
可选的,第三网络设备可以为SR网络边界网络设备,例如,第三网络设备为边界路由器、交换机、网关或其他具有转发报文功能的转发设备。第一网络设备可以为数据中心网关(data center gate way,DCGW)等。在第二网络设备是物理设备的情况下,第二网络设备可以为路由器、交换机、网关或其他具有转发报文功能的转发设备;在第二网络设备是虚拟设 备的情况下,第二网络设备可以是DVR。VNF上的功能实体可以为单板、虚拟机或容器等。VNF可是一个服务器或包括多个服务器的服务器集群。Optionally, the third network device may be an SR network border network device, for example, the third network device is a border router, a switch, a gateway, or other forwarding devices having a function of forwarding packets. The first network device may be a data center gateway (data center gateway, DCGW) or the like. In the case where the second network device is a physical device, the second network device may be a router, a switch, a gateway, or other forwarding device with the function of forwarding packets; in the case where the second network device is a virtual device, the second network device Can be a DVR. The functional entities on the VNF can be single boards, virtual machines, or containers. A VNF may be a single server or a server cluster including multiple servers.
参见图3,本申请实施例提供了一种发布路由数据的方法,该方法可以应用于图1或图2所示的网络架构,该方法包括:Referring to FIG. 3 , an embodiment of the present application provides a method for publishing routing data. The method can be applied to the network architecture shown in FIG. 1 or FIG. 2 , and the method includes:
步骤301:VNF向第一网络设备发送业务路由发布消息,该业务路由发布消息包括VPN标识。Step 301: The VNF sends a service route announcement message to the first network device, where the service route announcement message includes the VPN identifier.
可选的,VNF通过外部边界网关协议(external border gateway protocol,EBGP)向第一网络设备发送业务路由发布消息,该业务路由发布消息可以为EBGP消息。Optionally, the VNF sends a service route advertisement message to the first network device through an external border gateway protocol (external border gateway protocol, EBGP), and the service route advertisement message may be an EBGP message.
可选的,VNF在网络管理设备在VNF上部署该VPN对应的实体集合后,发送业务路由发布消息。Optionally, the VNF sends a service route announcement message after the network management device deploys the entity set corresponding to the VPN on the VNF.
假设,VNF向第一网络设备发送业务路由发布消息,该业务路由发布消息包括VPN标识Net1。It is assumed that the VNF sends a service route advertisement message to the first network device, where the service route advertisement message includes the VPN identifier Net1.
步骤302:第一网络设备接收该业务路由发布消息,向与第一网络设备通信的各第二网络设备发送该业务路由发布消息。Step 302: The first network device receives the service route announcement message, and sends the service route announcement message to each second network device that communicates with the first network device.
与第一网络设备通信的各第二网络设备中包括该VPN对应的设备集合中的第二网络设备。所以第一网络设备发送该业务路由发布信息,该设备集合中的第二网络设备会接收到该业务路由发布信息。Each second network device that communicates with the first network device includes the second network device in the device set corresponding to the VPN. Therefore, the first network device sends the service route advertisement information, and the second network device in the device set receives the service route advertisement information.
步骤303:第二网络设备接收该业务路由发布消息,向第一网络设备发送第一路由数据和第二路由数据。Step 303: The second network device receives the service routing announcement message, and sends the first routing data and the second routing data to the first network device.
其中,在发送第一路由数据和第二路由数据之前,第二网络设备生成如下两种第一路由数据和第二路由数据,该两种分别为:Wherein, before sending the first routing data and the second routing data, the second network device generates the following two types of first routing data and second routing data, which are:
第一种,第一路由数据包括段标识、该第二网络设备的设备标识和该第二网络设备的分担因子,该第二网络设备的分担因子用于指示与该第二网络设备通信的功能实体的数目和/或性能,该段标识为该VPN对应的段标识。第二路由数据包括该VPN标识和该段标识。First, the first routing data includes a segment identifier, a device identifier of the second network device, and a sharing factor of the second network device, where the sharing factor of the second network device is used to indicate the function of communicating with the second network device The number and/or performance of the entity, and the segment ID is the segment ID corresponding to the VPN. The second routing data includes the VPN identifier and the segment identifier.
第二种,第一路由数据包括该设备集合的集合标识、该第二网络设备的设备标识和该第二网络设备的分担因子,第二路由数据包括该VPN标识、该VPN对应的设备集合的集合标识和该VPN对应的实体集合的段标识。Second, the first routing data includes the set identifier of the device set, the device identifier of the second network device, and the sharing factor of the second network device, and the second routing data includes the VPN identifier, the device set corresponding to the VPN. The set ID and the segment ID of the entity set corresponding to the VPN.
可选的,在该集合标识是该段标识中的部分内容的情况下,第二网络设备生成上述第一种形式的第一路由数据和第二路由数据。在该集合标识不是该段标识中的部分内容的情况下,第二网络设备生成上述第二种第一路由数据和第二路由数据。Optionally, when the set identifier is part of the segment identifier, the second network device generates the first routing data and the second routing data in the first form. In the case that the set identifier is not part of the segment identifier, the second network device generates the above-mentioned second type of first routing data and second routing data.
在步骤303中,第二网络设备接收该业务路由发布消息,该业务路由发布消息包括该VPN标识。在第二网络设备中保存有VPN标识与段标识的对应关系的情况下,第二网络设备生成并发送上述第一种形式的第一路由数据和第二路由数据,生成过程为:In step 303, the second network device receives the service route announcement message, where the service route announcement message includes the VPN identifier. In the case where the corresponding relationship between the VPN identifier and the segment identifier is stored in the second network device, the second network device generates and sends the first routing data and the second routing data in the first form. The generation process is as follows:
第二网络设备根据该VPN标识,查询VPN标识与段标识的对应关系,如果查询出对应的段标识,根据该段标识,确定该VPN对应的实体集合中的与第二网络设备通信的各功能实体,进而确定用于指示该各功能实体的数目和/或性能的分担因子。第二网络设备向第一网络设备发送包括该VPN标识、该第二网络设备的设备标识和该分担因子的第一路由数据,以及,发送包括该VPN标识和该段标识的第二路由数据。其中,如果第二网络设备没有查询出对应 的段标识,表明第二网络设备不是该VPN对应的设备集合中的第二网络设备,结束操作。The second network device queries the corresponding relationship between the VPN identifier and the segment identifier according to the VPN identifier, and if the corresponding segment identifier is queried, determines each function in the entity set corresponding to the VPN that communicates with the second network device according to the segment identifier. entity, and then determine a sharing factor for indicating the number and/or performance of each functional entity. The second network device sends first routing data including the VPN identifier, the device identifier of the second network device and the sharing factor to the first network device, and sends second routing data including the VPN identifier and the segment identifier. Wherein, if the second network device does not query the corresponding segment identifier, it indicates that the second network device is not the second network device in the device set corresponding to the VPN, and the operation ends.
在第二网络设备中保存有VPN标识、实体集合的段标识和设备集合的集合标识的对应关系的情况下,第二网络设备生成并发送上述第二种形式的第一路由数据和第二路由数据,生成过程为:In the case where the correspondence between the VPN identifier, the segment identifier of the entity set, and the set identifier of the device set is stored in the second network device, the second network device generates and sends the first routing data and the second route in the second form. Data, the generation process is:
第二网络设备根据该VPN标识,查询VPN标识、实体集合的段标识和设备集合的集合标识的对应关系。如果查询出该VPN对应的实体集合的段标识和设备集合的集合标识,根据该实体集合的段标识,确定该实体集合中的与第二网络设备通信的各功能实体,进而确定用于指示该各功能实体的数目和/或性能的分担因子。向第一网络设备发送包括该设备集合的集合标识、该第二网络设备的设备标识和该分担因子的第一路由数据,以及,发送包括该VPN标识、该设备集合的集合标识和该实体集合的段标识的第二路由数据。其中,如果第二网络设备没有查询出该VPN对应的实体集合的段标识和设备集合的集合标识,表明第二网络设备不是该VPN对应的设备集合中的第二网络设备,结束操作。According to the VPN identifier, the second network device queries the corresponding relationship among the VPN identifier, the segment identifier of the entity set, and the set identifier of the device set. If the segment ID of the entity set corresponding to the VPN and the set ID of the device set are queried, according to the segment ID of the entity set, determine each functional entity in the entity set that communicates with the second network device, and then determine the functional entities used to indicate the entity set. The number and/or performance sharing factor of each functional entity. Sending the first routing data including the set ID of the device set, the device ID of the second network device and the sharing factor to the first network device, and sending the VPN ID, the set ID of the device set and the entity set The segment identifies the second routing data. Wherein, if the second network device does not query the segment identifier of the entity set corresponding to the VPN and the set identifier of the device set, it indicates that the second network device is not the second network device in the device set corresponding to the VPN, and the operation ends.
其中,第二网络设备的分担因子可以是与第二网络设备通信的功能实体数目,或者,第二网络设备的分担因子可以是与第二网络设备通信的功能实体的性能。The sharing factor of the second network device may be the number of functional entities communicating with the second network device, or the sharing factor of the second network device may be the performance of the functional entities communicating with the second network device.
可选的,与第二网络设备通信的功能实体在单位时间内能够处理报文的总报文数量,该总报文数量用于反映与第二网络设备通信的功能实体的性能,即该总报文数量可以为第二网络设备的分担因子。Optionally, the total number of packets that the functional entity communicating with the second network device can process in a unit time, and the total number of packets is used to reflect the performance of the functional entity communicating with the second network device, that is, the total number of packets. The number of packets may be a sharing factor of the second network device.
可选的,第二网络设备确定该实体集合中的与第二网络设备通信的各功能实体的操作可以为:Optionally, the operation of the second network device determining each functional entity in the entity set that communicates with the second network device may be:
第二网络设备根据该段标识,从段标识和端口标识的对应关系查询对应的至少一个端口标识,该至少一个端口标识中的每个端口标识对应的端口与该实体集合中的一个功能实体通信,从而基于每个端口标识确定该实体集合中的与第二网络设备通信的各功能实体。第二网络设备统计该各功能实体的数目,得到第二网络设备的分担因子。或者,第二网络设备从该各功能实体中分别获取该各功能实体的资源数量,根据该各功能实体的资源数量确定第二网络设备的分担因子。According to the segment identifier, the second network device queries the corresponding at least one port identifier from the correspondence between the segment identifier and the port identifier, and the port corresponding to each port identifier in the at least one port identifier communicates with a functional entity in the entity set , so that each functional entity in the entity set that communicates with the second network device is determined based on each port identifier. The second network device counts the number of the functional entities to obtain the sharing factor of the second network device. Or, the second network device obtains the resource quantity of each functional entity from each functional entity, and determines the sharing factor of the second network device according to the resource quantity of each functional entity.
可选的,功能实体的资源数量可以为计算资源量、存储资源量和/或网络资源量等,第二网络设备可以根据该功能实体的资源数量确定在单位时间内该功能实体处理的报文数量。在确定出该各功能实体的报文数量后,对该各功能实体的报文数量进行累加,得到总报文数量,即得到第二网络设备的分担因子。Optionally, the amount of resources of the functional entity may be the amount of computing resources, the amount of storage resources and/or the amount of network resources, etc., and the second network device may determine, according to the amount of resources of the functional entity, the packets processed by the functional entity within a unit time. quantity. After the packet quantity of each functional entity is determined, the packet quantity of each functional entity is accumulated to obtain the total packet quantity, that is, the sharing factor of the second network device is obtained.
例如,参见图1或图2,假设第二网络设备1接收到业务路由发布消息,该业务路由发布消息包括VPN标识Net1。在第二网络设备1中保存如表1所示的VPN标识与段标识的对应关系的情况下,第二网络设备1根据该VPN标识Net1,查询如表1所示的VPN标识与段标识的对应关系,并查询出对应的段标识为B1::11。根据该段标识B1::11,从如表3所示的段标识和端口标识的对应关系查询对应的第一端口的端口标识P1和第二端口的端口标识P2,确定该实体集合中有两个功能实体与第二网络设备1通信,该两个功能实体为第一功能实体和第二功能实体,所以第二网络设备1的分担因子为功能实体数目2。第二网络设备1向第一网络设备发送第一路由数据和第二路由数据。其中,第一路由数据包括该段标识B1::11、第二网络设备1的设备标识Device1和第二网络设备1的分担因子2,第二路由数据包括VPN标识Net1和该段标识B1::11。For example, referring to FIG. 1 or FIG. 2, it is assumed that the second network device 1 receives a service route advertisement message, and the service route advertisement message includes the VPN identifier Net1. In the case where the correspondence between the VPN identifier and the segment identifier as shown in Table 1 is stored in the second network device 1, the second network device 1 queries the VPN identifier and segment identifier as shown in Table 1 according to the VPN identifier Net1 The corresponding relationship is queried, and the corresponding segment ID is B1::11. According to the segment identifier B1::11, the corresponding port identifier P1 of the first port and the port identifier P2 of the second port are queried from the correspondence between the segment identifier and the port identifier as shown in Table 3, and it is determined that there are two Two functional entities communicate with the second network device 1 , and the two functional entities are the first functional entity and the second functional entity, so the sharing factor of the second network device 1 is the number of functional entities 2 . The second network device 1 sends the first routing data and the second routing data to the first network device. The first routing data includes the segment identifier B1::11, the device identifier Device1 of the second network device 1, and the sharing factor 2 of the second network device 1, and the second routing data includes the VPN identifier Net1 and the segment identifier B1:: 11.
在第二网络设备1中保存如表2所示的VPN标识、实体集合的段标识与设备集合的集合标识的对应关系的情况下,第二网络设备1根据该VPN标识Net1,查询如表2所示的VPN标识、实体集合的段标识和设备集合的集合标识的对应关系,并查询出该VPN对应的实体集合的段标识Bsid1和设备集合的集合标识G1。根据该实体集合的段标识Bsid1,从如表3所示的段标识和端口标识的对应关系查询对应的第一端口的端口标识P1和第二端口的端口标识P2,确定该实体集合中有两个功能实体与第二网络设备1通信,该两个功能实体为第一功能实体和第二功能实体,所以第二网络设备1的分担因子为功能实体数目2。第二网络设备1向第一网络设备发送第一路由数据和第二路由数据,第一路由数据包括该设备集合的集合标识G1、第二网络设备1的设备标识Device1和第二网络设备1的分担因子2,第二路由数据包括该VPN标识Net1、该设备集合的集合标识G1和该实体集合的段标识Bsid1。In the case where the corresponding relationship between the VPN identifier, the segment identifier of the entity set and the set identifier of the device set as shown in Table 2 is stored in the second network device 1, the second network device 1 searches the table 2 according to the VPN identifier Net1 The corresponding relationship between the VPN identifier, the segment identifier of the entity set and the set identifier of the device set is shown, and the segment identifier Bsid1 of the entity set and the set identifier G1 of the device set corresponding to the VPN are queried. According to the segment identifier Bsid1 of the entity set, the corresponding port identifier P1 of the first port and the port identifier P2 of the second port are queried from the correspondence between the segment identifier and the port identifier as shown in Table 3, and it is determined that there are two Two functional entities communicate with the second network device 1 , and the two functional entities are the first functional entity and the second functional entity, so the sharing factor of the second network device 1 is the number of functional entities 2 . The second network device 1 sends the first routing data and the second routing data to the first network device. The first routing data includes the set identifier G1 of the device set, the device identifier Device1 of the second network device 1, and the second network device 1's device identifier. With a sharing factor of 2, the second routing data includes the VPN identifier Net1, the set identifier G1 of the device set, and the segment identifier Bsid1 of the entity set.
再例如,参见图1或图2,假设第二网络设备2接收到业务路由发布消息,该业务路由发布消息包括VPN标识Net1。在第二网络设备2中保存如表1所示的VPN标识与段标识的对应关系的情况下,第二网络设备2根据该VPN标识Net1,查询如表1所示的VPN标识与段标识的对应关系,并查询出对应的段标识为B1::11。根据该段标识B1::11,从如表4所示的段标识和端口标识的对应关系查询对应的一个端口的端口标识P3,确定该实体集合中有一个功能实体与第二网络设备1通信,该一个功能实体为第三功能实体,所以第二网络设备2的分担因子为功能实体数目1。第二网络设备2向第一网络设备发送第一路由数据和第二路由数据。其中,第一路由数据包括该段标识B1::11、第二网络设备2的设备标识Device2和第二网络设备2的分担因子1,第二路由数据包括VPN标识Net1和该段标识B1::11。For another example, referring to FIG. 1 or FIG. 2, it is assumed that the second network device 2 receives a service route advertisement message, and the service route advertisement message includes the VPN identifier Net1. In the case where the correspondence between the VPN identifier and the segment identifier as shown in Table 1 is stored in the second network device 2, the second network device 2 queries the VPN identifier and segment identifier as shown in Table 1 according to the VPN identifier Net1 The corresponding relationship is queried, and the corresponding segment ID is B1::11. According to the segment identifier B1::11, the port identifier P3 of a corresponding port is queried from the correspondence between the segment identifier and the port identifier as shown in Table 4, and it is determined that there is a functional entity in the entity set that communicates with the second network device 1 , the one functional entity is the third functional entity, so the sharing factor of the second network device 2 is the number of functional entities 1. The second network device 2 sends the first routing data and the second routing data to the first network device. The first routing data includes the segment identifier B1::11, the device identifier Device2 of the second network device 2, and the sharing factor 1 of the second network device 2, and the second routing data includes the VPN identifier Net1 and the segment identifier B1:: 11.
在第二网络设备2中保存如表2所示的VPN标识、实体集合的段标识与设备集合的集合标识的对应关系的情况下,第二网络设备2根据该VPN标识Net1,查询如表2所示的VPN标识、实体集合的段标识和设备集合的集合标识的对应关系,并查询出该VPN对应的实体集合的段标识Bsid1和设备集合的集合标识G1。根据该实体集合的段标识Bsid1,从如表4所示的段标识和端口标识的对应关系查询对应的一个端口的端口标识P3,确定该实体集合中有一个功能实体与第二网络设备2通信,该一个功能实体为第三功能实体,所以第二网络设备2的分担因子为功能实体数目1。第二网络设备2向第一网络设备发送第一路由数据和第二路由数据,第一路由数据包括该设备集合的集合标识G1、第二网络设备2的设备标识Device2和第二网络设备2的分担因子1,第二路由数据包括该VPN标识Net1、该设备集合的集合标识G1和该实体集合的段标识Bsid1。In the case where the corresponding relationship between the VPN identifier, the segment identifier of the entity set and the set identifier of the device set as shown in Table 2 is stored in the second network device 2, the second network device 2 searches the table 2 according to the VPN identifier Net1 The corresponding relationship between the VPN identifier, the segment identifier of the entity set and the set identifier of the device set is shown, and the segment identifier Bsid1 of the entity set and the set identifier G1 of the device set corresponding to the VPN are queried. According to the segment identifier Bsid1 of the entity set, the port identifier P3 of a corresponding port is queried from the correspondence between the segment identifier and the port identifier as shown in Table 4, and it is determined that there is a functional entity in the entity set that communicates with the second network device 2 , the one functional entity is the third functional entity, so the sharing factor of the second network device 2 is the number of functional entities 1. The second network device 2 sends the first routing data and the second routing data to the first network device, and the first routing data includes the set identifier G1 of the device set, the device identifier Device2 of the second network device 2 and the second network device 2 The sharing factor is 1, and the second routing data includes the VPN identifier Net1, the set identifier G1 of the device set, and the segment identifier Bsid1 of the entity set.
在步骤303中,第二网络设备可以向第一网络设备发送路由消息,该路由消息包括第一路由数据和第二路由数据。In step 303, the second network device may send a routing message to the first network device, where the routing message includes the first routing data and the second routing data.
可选的,参见图4,该路由消息中可以包括第一类型长度值(type length value,TLV)和第二TLV,第一TLV的value字段包括第一路由数据,即包括第一路由数据中的该段标识、第二网络设备的设备标识和第二网络设备的分担因子,或者,包括第一路由数据中的该设备集合的集合标识、第二网络设备的设备标识和第二网络设备的分担因子。第二TLV的value字段包括第二路由数据,即包括第二路由数据中的VPN标识、该实体集合的段标识和该设备集合的集合标识,或者,包括第二路由数据中的VPN标识和段标识。Optionally, referring to FIG. 4 , the routing message may include a first type length value (type length value, TLV) and a second TLV, and the value field of the first TLV includes the first routing data, that is, includes the first routing data. The segment identifier, the device identifier of the second network device, and the sharing factor of the second network device, or, include the set identifier of the device set in the first routing data, the device identifier of the second network device, and the second network device. share factor. The value field of the second TLV includes the second routing data, that is, includes the VPN identifier in the second routing data, the segment identifier of the entity set, and the set identifier of the device set, or includes the VPN identifier and segment in the second routing data. logo.
步骤304:第一网络设备接收第一路由数据和第二路由数据,保存第一路由数据,以及向与第一网络设备通信的第三网络设备发送第二路由数据。Step 304: The first network device receives the first routing data and the second routing data, saves the first routing data, and sends the second routing data to a third network device that communicates with the first network device.
第一网络设备接收第一路由数据后可以将第一路由数据保存在转发表中,即将第一路由数据作为一条转发表项,并保存在转发表中。After receiving the first routing data, the first network device may save the first routing data in the forwarding table, that is, the first routing data is regarded as a forwarding table entry and stored in the forwarding table.
例如,参见图5,第一网络设备接收第二网络设备1发送的包括段标识B1::11、第二网络设备1的设备标识Device1和分担因子2的第一路由数据,包括VPN标识Net1和段标识B1::11的第二路由数据,以及接收第二网络设备2发送的包括段标识B1::11、第二网络设备2的设备标识Device2和分担因子1的第一路由数据,包括VPN标识Net1和段标识B1::11的第二网络设备,将接收的两个第一路由数据保存在转发表中,由于接收的两个第二路由数据相同,因此只需要向第三网络设备发送一个第二路由数据。For example, referring to FIG. 5 , the first network device receives the first routing data sent by the second network device 1 and includes the segment identifier B1::11, the device identifier Device1 of the second network device 1 and the sharing factor 2, including the VPN identifier Net1 and Second routing data with segment identifier B1::11, and receiving first routing data sent by second network device 2 including segment identifier B1::11, device identifier Device2 of second network device 2, and sharing factor 1, including VPN The second network device with the identifier Net1 and the segment identifier B1::11 saves the received two first routing data in the forwarding table. Since the received two second routing data are the same, it only needs to send the data to the third network device A second route data.
再例如,参见图6,第一网络设备接收第二网络设备1发送的包括集合标识G1、第二网络设备1的设备标识Device1和分担因子2的第一路由数据,包括VPN标识Net1、集合标识G1和段标识Bsid1的第二路由数据,以及接收第二网络设备2发送的包括集合标识G1、第二网络设备2的设备标识Device2和分担因子1的第一路由数据,包括VPN标识Net1、集合标识G1和段标识Bsid1的第二网络设备,将接收的两个第一路由数据保存在转发表中,由于接收的两个第二路由数据相同,因此只需要向第三网络设备发送一个第二路由数据。For another example, referring to FIG. 6 , the first network device receives the first routing data sent by the second network device 1 and includes the aggregate identifier G1, the device identifier Device1 of the second network device 1, and the sharing factor 2, including the VPN identifier Net1, the aggregate identifier G1 and the second routing data of the segment identifier Bsid1, and receive the first routing data sent by the second network device 2 including the set identifier G1, the device identifier Device2 of the second network device 2, and the sharing factor 1, including the VPN identifier Net1, the set The second network device with the identifier G1 and the segment identifier Bsid1 saves the received two first routing data in the forwarding table. Since the received two second routing data are the same, it only needs to send one second routing data to the third network device. route data.
步骤305:第三网络设备接收第二路由数据,保存第二路由数据。Step 305: The third network device receives the second routing data, and saves the second routing data.
第三网络设备接收第二路由数据后,可以将第二路由数据和与第一网络设备通信的以太网接口的接口标识组成一条转发表项,并保存在转发表中。After receiving the second routing data, the third network device may combine the second routing data and the interface identifier of the Ethernet interface communicating with the first network device into a forwarding table entry, and save it in the forwarding table.
例如,参见图5,第三网络设备接收包括VPN标识Net1和段标识B1::11的第二路由数据,将该第二路由数据和第三网络设备中的与第一网络设备通信的以太网接口的接口标识Eth1组成一条转发表项,将该转发表项保存在转发表中。For example, referring to FIG. 5 , the third network device receives the second routing data including the VPN identification Net1 and the segment identification B1::11, and the second routing data and the Ethernet in the third network device that communicates with the first network device The interface identifier Eth1 of the interface forms a forwarding table entry, and the forwarding table entry is stored in the forwarding table.
再例如,参见图6,第三网络设备接收包括VPN标识Net1、集合标识G1和段标识Bsid1的第二路由数据,将该第二路由数据和第三网络设备中的与第一网络设备通信的以太网接口的接口标识Eth1组成一条转发表项,将该转发表项保存在转发表中。For another example, referring to FIG. 6, the third network device receives the second routing data including the VPN identifier Net1, the set identifier G1 and the segment identifier Bsid1, and the second routing data and the third network device communicated with the first network device. The interface identifier Eth1 of the Ethernet interface forms a forwarding table entry, and the forwarding table entry is stored in the forwarding table.
可选的,VNF可以不向第一网络设备发送业务路由发布消息。而是在网络管理设备部署实体集合以及配置该设备集合中的第二网络设备与实体集合中的功能实体通信后,网络管理设备直接向第一网络设备发送包括VPN标识的业务路由发布消息,然后开始从上述步骤302开始执行。或者,网络管理设备直接向该设备集合中的每个第二网络设备发送包括VPN标识的业务路由发布消息,然后开始从上述步骤303开始执行。或者,设备集合中的每个第二网络设备在与实体集合中的功能实体通信时,生成第一路由数据和第二路由数据,即从上述步骤303开始执行。Optionally, the VNF may not send the service route announcement message to the first network device. Instead, after the network management device deploys the entity set and configures the second network device in the device set to communicate with the functional entities in the entity set, the network management device directly sends a service routing announcement message including the VPN identifier to the first network device, and then Begin to execute from step 302 above. Alternatively, the network management device directly sends a service route announcement message including the VPN identifier to each second network device in the device set, and then starts to execute from the above step 303 . Alternatively, each second network device in the device set generates the first routing data and the second routing data when communicating with the functional entity in the entity set, that is, the execution starts from the above step 303 .
在本申请实施例中,由于第二路由数据包括VPN标识和段标识,或者,第二路由数据包括VPN标识、设备集合的集合标识和实体集合的段标识,也就是说一个VPN对应一个实体集合,该实体集合对应一条第二路由数据,而不是该实体集合中的每个功能实体对应一条路由数据。如此,无论该实体集合中的功能实体数目的多少,都不会影响第三网络设备中保存的第二路由数据的数目,这样可以大幅度减小在第三网络设备中需要保存的第二路由数据的数目,从而减轻了第三网络设备的负担。而第三网络设备是SR网络的边界网络设备,即减轻了边界网络设备的负担。又由于该实体集合中的功能实体数目的多少,都不会影响第三网络设备中保存的第二路由数据的数目,从而可以在VNF中为VPN部署大量的功能实体,来处理该VPN的报文,增强了扩展性。In this embodiment of the present application, since the second routing data includes the VPN identifier and the segment identifier, or the second routing data includes the VPN identifier, the set identifier of the device set, and the segment identifier of the entity set, that is to say, one VPN corresponds to one entity set , the entity set corresponds to a piece of second routing data, instead of each functional entity in the entity set corresponding to a piece of routing data. In this way, regardless of the number of functional entities in the entity set, it will not affect the number of second routing data stored in the third network device, so that the second routing data that needs to be stored in the third network device can be greatly reduced the amount of data, thereby reducing the burden on the third network device. The third network device is the border network device of the SR network, that is, the burden of the border network device is reduced. And because the number of functional entities in the entity set will not affect the number of second routing data stored in the third network device, a large number of functional entities can be deployed for the VPN in the VNF to process the VPN's report. text, enhanced scalability.
参见图7,本申请实施例提供了一种发送报文的方法,该方法可以应用于图1或图2所示的网络架构,该报文为第一报文,第一报文的报文头中包括段标识,或者,第一报文的报文头中包括集合标识和段标识,该段标识与设备集合和实体集合相对应,该集合标识是该段标识中的部分内容。该方法包括:Referring to FIG. 7 , an embodiment of the present application provides a method for sending a packet, and the method can be applied to the network architecture shown in FIG. 1 or FIG. 2 . The packet is a first packet, and the packet of the first packet The header includes a segment identifier, or the header of the first packet includes a set identifier and a segment identifier, the segment identifier corresponds to the device set and the entity set, and the set identifier is part of the segment identifier. The method includes:
步骤701:第三网络设备获取第一报文,第一报文的报文头包括段标识,该段标识与设备集合和实体集合相对应,该设备集合包括多个第二网络设备,该实体集合包括多个功能实体,该设备集合中的第二网络设备与该实体集合中的功能实体通信。Step 701: The third network device obtains the first packet, the packet header of the first packet includes a segment identifier, the segment identifier corresponds to a device set and an entity set, the device set includes a plurality of second network devices, and the entity The set includes a plurality of functional entities, and the second network device in the device set communicates with the functional entities in the entity set.
该实体集合与一个VPN相对应,该实体集合中的各功能实体可以处理该VPN的报文。The entity set corresponds to a VPN, and each functional entity in the entity set can process packets of the VPN.
第一报文的报文头可以包括目的地址和段列表,该目的地址是该设备集合的集合标识,该段列表包括该段标识。该集合标识是该段标识中的部分内容。The header of the first packet may include a destination address and a segment list, where the destination address is a set identifier of the device set, and the segment list includes the segment identifier. The set ID is part of the segment ID.
在步骤701中,第三网络设备可以通过如下两种方式获取第一报文,该两种方式分别为:In step 701, the third network device may obtain the first packet in the following two ways, which are:
第一种方式,第三网络设备可以直接生成第一报文。In the first manner, the third network device may directly generate the first packet.
在第一种方式种,第三网络设备需要向VPN对应的实体集合中的功能实体发送第一报文时,可以从自身保存的转发表中获取包括该VPN标识的转发表项,该转发表项包括第二路由数据,基于该第二路由数据生成第一报文。In the first method, when the third network device needs to send the first packet to the functional entity in the entity set corresponding to the VPN, it can obtain the forwarding table entry including the VPN identifier from the forwarding table saved by itself. The item includes second routing data, and the first message is generated based on the second routing data.
该第二路由数据还包括段标识。第一报文的报文头包括该段标识。或者,第一报文的报文头包括目的地址和段列表,该目的地址是该设备集合的集合标识和该段列表包括该段标识,该集合标识是该段标识中的部分内容。The second routing data also includes segment identification. The header of the first message includes the segment identifier. Alternatively, the header of the first packet includes a destination address and a segment list, where the destination address is a set identifier of the device set, and the segment list includes the segment identifier, and the set identifier is part of the segment identifier.
例如,参见图5,第三网络设备包括VPN标识Net1的转发表项,该转发表项包括第二路由数据和以太网接口的接口标识Eth1,该第二路由数据包括该VPN标识Net1和段标识B1::11。第三网络设备生成第一报文,第一报文的报文头包括目的地址和段列表,该目的地址为B1:/64,该段列表中的段标识为B1::11。集合标识B1:/64是段标识B1::11的前64位比特的内容。For example, referring to FIG. 5 , the third network device includes a forwarding entry of the VPN identifier Net1, the forwarding entry includes the second routing data and the interface identifier Eth1 of the Ethernet interface, and the second routing data includes the VPN identifier Net1 and the segment identifier. B1::11. The third network device generates the first packet, the packet header of the first packet includes a destination address and a segment list, the destination address is B1:/64, and the segment identifier in the segment list is B1::11. The set ID B1:/64 is the content of the first 64 bits of the segment ID B1::11.
第二种方式,第三网络设备接收第二报文,第二报文包括VPN标识,根据第二路由数据生成第一报文,第一报文的报文头包括段标识,第一报文的净荷包括第二报文,该第二路由数据包括该VPN标识和该段标识。In the second method, the third network device receives the second packet, the second packet includes the VPN identifier, and generates the first packet according to the second routing data. The packet header of the first packet includes the segment identifier, and the first packet includes the segment identifier. The payload includes a second packet, and the second routing data includes the VPN identifier and the segment identifier.
第三网络设备位于SR网络的边界,可以与终端或局域网相连,用于接收来自终端的第二报文或来自局域网的第二报文。The third network device is located at the boundary of the SR network and can be connected to the terminal or the local area network, and is used to receive the second packet from the terminal or the second packet from the local area network.
在第二种方式中,第二网络设备接收第二报文,从第二报文中获取该VPN标识,获取包括该VPN标识的转发表项,该转发表项包括第二路由数据,根据第二路由数据生成第一报文。In the second manner, the second network device receives the second packet, obtains the VPN identifier from the second packet, and obtains a forwarding entry including the VPN identifier, where the forwarding entry includes the second routing data, and according to the first Second, the routing data generates the first packet.
可选的,在生成第一报文时,将第二报文的作为净荷,在该净荷的基础上添加一个报文头,该报文头包括段列表,该段列表包括第二路由数据中的段标识。或者,该报文头包括目的地址和段列表,目的地址为该设备集合的集合标识,该段列表包括该段标识,该集合标识是该段标识中的部分内容。Optionally, when the first packet is generated, the second packet is used as the payload, and a packet header is added on the basis of the payload, the packet header includes a segment list, and the segment list includes the second route. Segment ID in the data. Or, the packet header includes a destination address and a segment list, the destination address is a set identifier of the device set, the segment list includes the segment identifier, and the set identifier is part of the segment identifier.
可选的,该报文头为SRv6报文头,该SRv6报文头的目的地址是该第二路由数据包括的段标识中的部分内容,该SRv6报文头中的段列表包括该段标识。Optionally, the packet header is an SRv6 packet header, the destination address of the SRv6 packet header is part of the segment identifier included in the second routing data, and the segment list in the SRv6 packet header includes the segment identifier. .
例如,参见图5,第三网络设备从第二报文中获取VPN标识Net1,获取包括该VPN标识Net1的转发表项,该转发表项包括第二路由数据和以太网接口的接口标识Eth1,第二路由 数据包括该VPN标识Net1和段标识B1::11,将第二报文作为净荷,并在该净荷上添加一个报文头,该报文头的目的地址为集合标识B1:/64,该报文头的段列表包括该段标识B1::11。For example, referring to FIG. 5 , the third network device obtains the VPN identifier Net1 from the second message, and obtains a forwarding entry including the VPN identifier Net1, and the forwarding entry includes the second routing data and the interface identifier Eth1 of the Ethernet interface, The second routing data includes the VPN identifier Net1 and the segment identifier B1::11, the second packet is used as the payload, and a packet header is added to the payload, and the destination address of the packet header is the set identifier B1: /64, the segment list of the header includes the segment ID B1::11.
步骤702:第三网络设备向第一网络设备发送第一报文。Step 702: The third network device sends the first packet to the first network device.
其中,第三网络设备获取的转发表项还包括与第一网络设备通信的以太网接口的接口标识,通过该接口标识对应的以太网接口向第一网络设备发送第一报文。The forwarding entry acquired by the third network device further includes an interface identifier of an Ethernet interface that communicates with the first network device, and the first packet is sent to the first network device through an Ethernet interface corresponding to the interface identifier.
例如,参见图5,第三网络设备获取的转发表项还包括以太网接口的接口标识Eth1,通过该Eth1对应的以太网接口向第一网络设备发送第一报文。For example, referring to FIG. 5 , the forwarding entry acquired by the third network device further includes the interface identifier Eth1 of the Ethernet interface, and the first packet is sent to the first network device through the Ethernet interface corresponding to the Eth1.
第一网络设备接收第一报文,向该段标识对应的设备集合中的第二网络设备发送第一报文。其中,第一网络设备可以向设备集合中的一个第二网络设备发送第一报文,或者,向设备集合中的多个第二网络设备发送第一报文,详细实现见如下步骤703和704。The first network device receives the first packet, and sends the first packet to the second network device in the device set corresponding to the segment identifier. The first network device may send the first packet to one second network device in the device set, or send the first packet to multiple second network devices in the device set. For detailed implementation, see steps 703 and 704 below. .
步骤703:第一网络设备接收第一报文,根据第一报文包括的该段标识获取设备集合中的第二网络设备的分担因子,该设备集合为该段标识对应的集合。Step 703: The first network device receives the first packet, and obtains the sharing factor of the second network device in the device set according to the segment identifier included in the first packet, where the device set is the set corresponding to the segment identifier.
其中,该设备集合中的每个第二网络设备的分担因子分别用于指示与每个第二网络设备通信的功能实体的数目和/或性能。Wherein, the sharing factor of each second network device in the device set is respectively used to indicate the number and/or performance of functional entities communicating with each second network device.
在步骤703中,第一网络设备从第一报文中获取该段标识,从自身保存的转发表中获取包括该段标识的至少一条第一路由数据,该至少一条第一路由数据中的每条第一路由数据还包括一个第二网络设备的设备标识和分担因子,从该每条第一路由数据中获取该集合标识(或该段标识)对应的设备集合中的每个第二网络设备的设备标识和分担因子。或者,第一网络设备从第一报文中获取该段标识中的集合标识,从自身保存的转发表中获取包括该集合标识的至少一条第一路由数据,该至少一条第一路由数据中的每条第一路由数据还包括一个第二网络设备的设备标识和分担因子,从该每条第一路由数据中获取该集合标识对应的设备集合中的每个第二网络设备的设备标识和分担因子。In step 703, the first network device acquires the segment identifier from the first packet, and acquires at least one piece of first routing data including the segment identifier from the forwarding table stored by itself, and each piece of the at least one piece of first routing data The piece of first routing data also includes a device identifier and a sharing factor of a second network device, and each second network device in the device set corresponding to the set identifier (or the segment identifier) is obtained from each piece of first routing data device identification and sharing factor. Alternatively, the first network device obtains the set ID in the segment ID from the first packet, and obtains at least one piece of first routing data including the set ID from the forwarding table stored by itself, and the at least one piece of first routing data includes the set ID. Each piece of first routing data also includes a device identifier and a sharing factor of a second network device, and the device identifier and sharing factor of each second network device in the device set corresponding to the set identifier are obtained from each piece of first routing data factor.
例如,参见图5,第一网络设备接收第一报文,从第一报文中获取该段标识B1::11,从自身的转发表中获取包括该段标识B1::11的两条第一路由数据,其中一条第一路由数据还包括第二网络设备1的设备标识Device1和分担因子2,另一条第一路由数据还包括第二网络设备2的设备标识Device2和分担因子1,从而得到该段标识B1::11对应的设备集合包括的第二网络设备1的设备标识Device1和分担因子2以及第二网络设备2的设备标识Device2和分担因子1。For example, referring to FIG. 5 , the first network device receives the first packet, obtains the segment identifier B1::11 from the first packet, and acquires two segments including the segment identifier B1::11 from its forwarding table. One piece of routing data, one of the first routing data also includes the device identification Device1 of the second network device 1 and the sharing factor 2, and the other first routing data also includes the device identification Device2 of the second network device 2 and the sharing factor 1, so as to obtain The device set corresponding to the segment identifier B1::11 includes the device identifier Device1 and the sharing factor 2 of the second network device 1 and the device identifier Device2 and the sharing factor 1 of the second network device 2 .
步骤704:第一网络设备根据每个第二网络设备的分担因子,发送第一报文。Step 704: The first network device sends the first packet according to the sharing factor of each second network device.
在步骤704中,第二网络设备根据指定的第一均衡策略和每个第二网络设备的分担因子,从该设备集合中选择一个第二网络设备,向选择的第二网络设备发送第一报文。In step 704, the second network device selects a second network device from the device set according to the specified first balancing strategy and the sharing factor of each second network device, and sends a first report to the selected second network device. arts.
可选的,第一均衡策略为:第二网络设备的分担因子与选择第二网络设备的概率成正比。即在第二网络设备的分担因子越大,选择第二网络设备的概率越大。Optionally, the first balancing strategy is: the sharing factor of the second network device is proportional to the probability of selecting the second network device. That is, the greater the sharing factor of the second network device, the greater the probability of selecting the second network device.
例如,该设备集合中的第二网络设备1的分担因子为2,第二网络设备1的分担因子为1,所以第一网络设备选择第二网络设备1的概率是选择第二网络设备2的概率的两倍。For example, the sharing factor of the second network device 1 in the device set is 2, and the sharing factor of the second network device 1 is 1, so the probability that the first network device selects the second network device 1 is the probability of selecting the second network device 2 twice the probability.
例如在实现时,第一网络设备记录上一次选择的第二网络设备的设备标识,在本次选择时,基于记录的信息从该设备集合选择一个第二网络设备,向选择的第二网络设备发送第一报文。以第二网络设备1的分担因子为2,第二网络设备1的分担因子为1的例子来说,第一网络设备每连续选择两次第二网络设备1后,再选择一次第二网络设备2,也就是说第一 网络设备在接收到属于该VPN的第1个第一报文和第2个第一报文时,均选择第二网络设备1并向第二网络设备1发送第1个第一报文和第2个第一报文,在接收到属于该VPN的第3个第一报文时,才选择第二网络设备2并向第二网络设备2发送第3个第一报文。第一网络设备在接收到属于该VPN的第4个第一报文和第5个第一报文时,均选择第二网络设备1并向第二网络设备1发送第4个第一报文和第5个第一报文,在接收到属于该VPN的第6个第一报文时,才选择第二网络设备2并向第二网络设备2发送第6个第一报文;以此类推,就不再一一往下列举。For example, during implementation, the first network device records the device identification of the second network device selected last time, and during this selection, selects a second network device from the device set based on the recorded information, and sends the selected second network device to the selected second network device. Send the first message. Taking the example that the sharing factor of the second network device 1 is 2 and the sharing factor of the second network device 1 is 1, the first network device selects the second network device 1 again after selecting the second network device 1 twice in a row. 2, that is to say, when the first network device receives the first first packet and the second first packet belonging to the VPN, it both selects the second network device 1 and sends the first packet to the second network device 1. the first packet and the second first packet, only when the third first packet belonging to the VPN is received, the second network device 2 is selected and the third first packet is sent to the second network device 2 message. When receiving the fourth first packet and the fifth first packet belonging to the VPN, the first network device both selects the second network device 1 and sends the fourth first packet to the second network device 1 and the fifth first packet, when receiving the sixth first packet belonging to the VPN, selects the second network device 2 and sends the sixth first packet to the second network device 2; By analogy, we will not list them one by one.
可选的,第一网络设备除了通过上述步骤704的方式选择一个第二网络设备,还可以采用其他方式,例如,采用轮询的方式从该设备集合中的选择一个第二网络设备。其中,在采用轮询方式中,与设备集合中的每个第二网络设备通信的功能实体数目可以相等或基本相等。所谓轮询的方式是指第一次接收到第一报文时,从该设备集合中选择第一个第二网络设备,第二次接收到第一报文时,从该设备集合中选择第二个第二网络设备,以此类推,就不再一一列举。Optionally, in addition to selecting a second network device in the manner of step 704 above, the first network device may also use other methods, such as selecting a second network device from the device set in a polling manner. Wherein, in the polling manner, the number of functional entities communicating with each second network device in the device set may be equal or substantially equal. The so-called polling method means that when the first packet is received for the first time, the first second network device is selected from the device set, and the second network device is selected from the device set when the first packet is received for the second time. Two second network devices, and so on, will not be listed one by one.
步骤705:第二网络设备接收第一报文,向该段标识对应的实体集合中的功能实体发送第二报文,第二报文是基于第一报文生成的。Step 705: The second network device receives the first packet, and sends a second packet to the functional entities in the entity set corresponding to the segment identifier, where the second packet is generated based on the first packet.
可选的,第二网络设备根据指定的第二均衡策略从实体集合中的与第二网络设备通信的多个功能实体中,选择一个功能实体,该实体集合是该第一报文中的段标识对应的实体集合。Optionally, the second network device selects a functional entity from a plurality of functional entities in the entity set that communicate with the second network device according to the specified second balancing strategy, where the entity set is a segment in the first packet. Identifies the corresponding entity collection.
在步骤705中,由于第二网络设备具有SRv6设备,所以第二网络设备从第一报文的段列表中获取该段标识,该段标识用于标识一个实体集合,确定与该段标识绑定的各端口,确定与该各端口通信的功能实体,即得到该实体集合中的与第二网络设备通信的至少一个功能实体,根据指定的第二均衡策略,从该至少一个功能实体中选择一个功能实体。第二网络设备向选择的功能实体发送第二报文,以让该功能实体处理第二报文。第二报文可以为第一报文或者是第一报文中去除SRv6报文头后的报文。In step 705, since the second network device has an SRv6 device, the second network device obtains the segment identifier from the segment list of the first packet, where the segment identifier is used to identify an entity set, and is determined to be bound with the segment identifier each port, determine the functional entity that communicates with each port, that is, obtain at least one functional entity in the entity set that communicates with the second network device, and select one functional entity from the at least one functional entity according to the specified second balancing strategy functional entity. The second network device sends the second packet to the selected functional entity, so that the functional entity can process the second packet. The second packet may be the first packet or a packet from the first packet after removing the SRv6 header.
第二均衡策略可以为:功能实体的性能与选择功能实体的概率成正比,即在功能实体的性能越大,选择功能实体的概率越大。或者,The second balancing strategy may be: the performance of the functional entity is proportional to the probability of selecting the functional entity, that is, the greater the performance of the functional entity, the greater the probability of selecting the functional entity. or,
第二均衡策略可以为:依次轮询,例如,假设有三个功能实体,第二网络设备第一次选择第一个功能实体,第二次选择第二个功能实体,第三次选择第三个功能实体;第四次选择第一个功能实体,第五次选择第二个功能实体,第六次选择第三个功能实体,以此类推,就不再一一往下列举。The second balancing strategy may be: polling in sequence, for example, assuming there are three functional entities, the second network device selects the first functional entity for the first time, selects the second functional entity for the second time, and selects the third functional entity for the third time Functional entity; the first functional entity is selected for the fourth time, the second functional entity is selected for the fifth time, the third functional entity is selected for the sixth time, and so on, and will not be listed one by one.
如果采用轮询的方式,第二网络设备对上一次选择的功能实体进行记录,在本次选择时,基于记录的信息从该实体集合选择一个功能实体,向选择的功能实体发送第一报文。If the polling method is adopted, the second network device records the functional entity selected last time, and selects a functional entity from the entity set based on the recorded information during this selection, and sends the first message to the selected functional entity. .
可选的,确定与该段标识绑定的各端口的操作可以为:Optionally, the operation of determining each port bound to the segment identifier may be:
第二网络设备根据该段标识,从第二网络设备中的段标识与端口标识的对应关系中获取至少一个端口标识,该至少一个端口标识中的每个端口标识对应的端口为第二网络设备中的与该段标识绑定的端口。According to the segment identifier, the second network device obtains at least one port identifier from the correspondence between the segment identifier and the port identifier in the second network device, and the port corresponding to each port identifier in the at least one port identifier is the second network device The port that is bound to the segment ID in .
例如,参见图5,假设第二网络设备1接收到第一网络设备发送的第一报文,从第一报文的段列表中获取段标识B1::1;根据该段标识B1::11,从自身保存的如上述表3所示的段标识与端口标识的对应关系中获取第一端口的端口标识P1和第二端口的端口标识P2,进而确定该实体集合中的与第二网络设备1通信的第一功能实体和第二功能实体;根据第二均衡策 略,从第一功能实体和第二功能实体中选择一个功能实体。For example, referring to FIG. 5 , it is assumed that the second network device 1 receives the first packet sent by the first network device, and obtains the segment identifier B1::1 from the segment list of the first packet; according to the segment identifier B1::11 , obtain the port identifier P1 of the first port and the port identifier P2 of the second port from the correspondence between the segment identifier and the port identifier as shown in Table 3 above, and then determine the entity set in the entity set with the second network device 1. A first functional entity and a second functional entity in communication; according to a second equalization strategy, a functional entity is selected from the first functional entity and the second functional entity.
假设,第二均衡策略是依次轮询,且第二网络设备1最近上一次选择第一功能实体,因此本次选择第二功能实体。第二网络设备1向第二功能实体发送第一报文,第二功能实体接收第一报文,对第一报文提供服务。It is assumed that the second balancing strategy is to poll in sequence, and the second network device 1 selected the first functional entity last time, and therefore selects the second functional entity this time. The second network device 1 sends the first packet to the second functional entity, and the second functional entity receives the first packet and provides a service for the first packet.
在本申请实施例中,第三网络设备接收到第二报文,第二报文包括VPN标识,获取自身保存的包括该VPN标识的第二路由数据,根据第二路由数据生成第一报文,第一报文的报文头包括段列表,该段列表包括该第二路由数据中的段标识,向第一网络设备发送第一报文。也就是说:第二路由数据包括该VPN标识和该段标识,这样该实体集合对应一条第二路由数据,而不是该实体集合中的每个功能实体对应一条路由数据。如此,无论该实体集合中的功能实体数目的多少,都不会影响第三网络设备中保存的第二路由数据的数目,这样可以大幅度减小在第三网络设备中需要保存的第二路由数据的数目,减轻了第三网络设备的负担,即减轻了SR网络的边界网络设备的负担。以及,还可以在VNF中为VPN部署大量的功能实体,来为该VPN提供服务,增强了扩展性。第一网络设备接收第一报文,根据第一报文中的段标识,获取该设备集合中的每个第二网络设备的分担因子,根据每个第二网络设备的分担因子选择第二网络设备发送第一报文,这样第一网络设备根据每个第二网络设备的分担因子对属于该VPN的报文做第一次均衡处理。第二网络设备接收第一报文后,根据第一报文中的段标识,确定该段标识对应的实体集合中的与第二网络设备通信的至少一个功能实体,根据第二均衡策略从该至少一个功能实体中选择一个功能实体,向选择的功能实体发送第一报文,实现对属于该VPN的报文做第二次均衡处理。如此可以通过对属于该VPN的报文做两次均衡处理,从而实现对属于该VPN的报文做服务均衡的目的。In the embodiment of the present application, the third network device receives the second packet, the second packet includes the VPN identifier, obtains the second routing data stored by itself including the VPN identifier, and generates the first packet according to the second routing data , the header of the first packet includes a segment list, and the segment list includes the segment identifier in the second routing data, and the first packet is sent to the first network device. That is, the second routing data includes the VPN identifier and the segment identifier, so that the entity set corresponds to a piece of second routing data, instead of each functional entity in the entity set corresponding to a piece of routing data. In this way, regardless of the number of functional entities in the entity set, it will not affect the number of second routing data stored in the third network device, so that the second routing data that needs to be stored in the third network device can be greatly reduced The number of data reduces the burden of the third network equipment, that is, the burden of the border network equipment of the SR network. In addition, a large number of functional entities can also be deployed for the VPN in the VNF to provide services for the VPN, thereby enhancing scalability. The first network device receives the first packet, obtains the sharing factor of each second network device in the device set according to the segment identifier in the first packet, and selects the second network according to the sharing factor of each second network device The device sends the first packet, so that the first network device performs the first equalization processing on the packets belonging to the VPN according to the sharing factor of each second network device. After receiving the first packet, the second network device determines, according to the segment identifier in the first packet, at least one functional entity in the entity set corresponding to the segment identifier that communicates with the second network device, and determines from the segment identifier according to the second balancing strategy. A functional entity is selected from at least one functional entity, and a first packet is sent to the selected functional entity to implement a second equalization process for the packets belonging to the VPN. In this way, the packets belonging to the VPN can be balanced twice, so as to achieve the purpose of balancing the services of the packets belonging to the VPN.
参见图8,本申请实施例提供了一种发送报文的方法,该方法可以应用于图1或图2所示的网络架构,在该方法中,第一报文的报文头中包括集合标识和段标识,该集合标识与设备集合相对应,该段标识与实体集合相对应。该方法包括:Referring to FIG. 8 , an embodiment of the present application provides a method for sending a packet, and the method can be applied to the network architecture shown in FIG. 1 or FIG. 2 . In this method, the packet header of the first packet includes a set of ID and segment ID, the set ID corresponds to the device set, and the segment ID corresponds to the entity set. The method includes:
步骤801:第三网络设备获取第一报文,第一报文的报文头包括设备集合的集合标识和段列表,该段列表包括段标识。Step 801: The third network device obtains a first packet, and the packet header of the first packet includes a set identifier of the device set and a segment list, and the segment list includes the segment identifier.
该实体集合与一个VPN相对应,该实体集合中的各功能实体可以处理该VPN的报文。The entity set corresponds to a VPN, and each functional entity in the entity set can process packets of the VPN.
在步骤801中,第三网络设备可以通过如下两种方式获取第一报文,该两种方式分别为:In step 801, the third network device may obtain the first packet in the following two ways, which are:
第一种方式,第三网络设备可以直接生成第一报文。In the first manner, the third network device may directly generate the first packet.
在第一种方式种,第三网络设备需要向VPN对应的实体集合中的功能实体发送第一报文时,可以从自身保存的转发表中获取包括该VPN标识的转发表项,该转发表项包括第二路由数据,基于该第二路由数据生成第一报文。In the first method, when the third network device needs to send the first packet to the functional entity in the entity set corresponding to the VPN, it can obtain the forwarding table entry including the VPN identifier from the forwarding table saved by itself. The item includes second routing data, and the first message is generated based on the second routing data.
该第二路由数据还包括集合标识和段标识。第一报文的报文头包括目的地址和段列表,该目的地址是该集合标识,该段标识列表包括该段标识。The second routing data also includes a set identifier and a segment identifier. The header of the first packet includes a destination address and a segment list, the destination address is the set identifier, and the segment identifier list includes the segment identifier.
例如,参见图6,第三网络设备包括VPN标识Net1的转发表项,该转发表项包括第二路由数据和以太网接口的接口标识Eth1,该第二路由数据包括该VPN标识Net1、集合标识G1和段标识Bsid1。第三网络设备生成第一报文,第一报文的报文头包括目的地址和段列表,该目的地址为G1,该段列表中的段标识为Bsid1。For example, referring to FIG. 6 , the third network device includes a forwarding entry of the VPN identifier Net1, the forwarding entry includes the second routing data and the interface identifier Eth1 of the Ethernet interface, the second routing data includes the VPN identifier Net1, the set identifier G1 and segment ID Bsid1. The third network device generates the first packet, the packet header of the first packet includes a destination address and a segment list, the destination address is G1, and the segment identifier in the segment list is Bsid1.
第二种方式,第三网络设备接收第二报文,第二报文包括VPN标识,根据第二路由数据 生成第一报文,第一报文的报文头包括该VPN对应的设备集合的集合标识和实体集合的段标识,第一报文的净荷包括第二报文。In the second manner, the third network device receives the second packet, the second packet includes the VPN identifier, and generates the first packet according to the second routing data, and the packet header of the first packet includes the set of devices corresponding to the VPN. The set identifier and the segment identifier of the entity set, and the payload of the first packet includes the second packet.
在第二种方式中,第二网络设备从第二报文中获取该VPN标识,从自身保存的转发表中获取包括该VPN标识的转发表项,该转发表项包括第二路由数据,根据第二路由数据生成第一报文。可选的,在实现时,将第二报文的作为净荷,在该净荷的基础上添加一个报文头,该报文头包括段列表和第二路由数据包括的集合标识,该段列表包括第二路由数据中的段标识。In the second manner, the second network device obtains the VPN identifier from the second packet, and obtains a forwarding table entry including the VPN identifier from a forwarding table stored by itself, and the forwarding table entry includes the second routing data, according to The second routing data generates the first packet. Optionally, during implementation, the second packet is used as the payload, and a packet header is added on the basis of the payload, the packet header includes the segment list and the set identifier included in the second routing data, the segment The list includes segment identifications in the second routing data.
可选的,该报文头为SRv6报文头,该SRv6报文头的目的地址是该第二路由数据包括的集合标识。Optionally, the packet header is an SRv6 packet header, and the destination address of the SRv6 packet header is the set identifier included in the second routing data.
例如,参见图6,第三网络设备从第二报文中获取VPN标识Net1,获取包括该VPN标识Net1的转发表项,该转发表项包括第二路由数据和以太网接口的接口标识Eth1,第二路由数据包括该VPN标识Net1、集合标识G1和段标识Bsid1,将第二报文作为净荷,并在该净荷上添加一个报文头,该报文头的目的地址为该集合标识G1,该报文头的段列表包括该段标识Bsid1。For example, referring to FIG. 6 , the third network device obtains the VPN identifier Net1 from the second message, and obtains a forwarding entry including the VPN identifier Net1, and the forwarding entry includes the second routing data and the interface identifier Eth1 of the Ethernet interface, The second routing data includes the VPN identifier Net1, the set identifier G1, and the segment identifier Bsid1. The second packet is used as the payload, and a packet header is added to the payload, and the destination address of the packet header is the set identifier. G1, the segment list of the packet header includes the segment identifier Bsid1.
步骤802:第三网络设备向第一网络设备发送第一报文。Step 802: The third network device sends the first packet to the first network device.
其中,第三网络设备获取的转发表项还包括与第一网络设备通信的以太网接口的接口标识,通过该接口标识对应的以太网接口向第一网络设备发送第一报文。The forwarding entry acquired by the third network device further includes an interface identifier of an Ethernet interface that communicates with the first network device, and the first packet is sent to the first network device through an Ethernet interface corresponding to the interface identifier.
第一网络设备接收第一报文,向该集合标识对应的设备集合中的第二网络设备发送第一报文。第一网络设备可以向设备集合中的一个第二网络设备发送第一报文或设备集合中的多个第二网络设备发送第一报文,详细实现见如下步骤803和804。The first network device receives the first packet, and sends the first packet to the second network device in the device set corresponding to the set identifier. The first network device may send the first packet to one second network device in the device set or multiple second network devices in the device set to send the first packet. For detailed implementation, see steps 803 and 804 below.
步骤803:第一网络设备接收第一报文,根据第一报文包括的该集合标识获取设备集合中的每个第二网络设备的分担因子,该设备集合为该集合标识对应的集合,每个第二网络设备的分担因子分别用于指示与每个第二网络设备通信的功能实体的数目和/或性能。Step 803: The first network device receives the first packet, and obtains the sharing factor of each second network device in the device set according to the set identifier included in the first packet, where the device set is the set corresponding to the set identifier, and each The sharing factors of the second network devices are respectively used to indicate the number and/or performance of functional entities communicating with each second network device.
在步骤803中,第一网络设备从第一报文中获取该集合标识,从自身保存的路由表中获取包括该集合标识的至少一条第一路由数据,该至少一条第一路由数据中的每条第一路由数据还包括一个第二网络设备的设备标识和分担因子,从该每条第一路由数据中获取该集合标识对应的设备集合中的每个第二网络设备的设备标识和分担因子。In step 803, the first network device obtains the set identifier from the first packet, and obtains at least one piece of first routing data including the set identifier from the routing table stored by itself, and each piece of the at least one piece of first routing data The piece of first routing data also includes a device identifier and a sharing factor of a second network device, and the device identifier and sharing factor of each second network device in the device set corresponding to the set identifier are obtained from each piece of first routing data .
例如,参见图6,第一网络设备接收第一报文,从第一报文中获取该集合标识G1,从自身的转发表中获取包括该集合标识G1的两条第一路由数据,其中一条第一路由数据还包括第二网络设备1的设备标识Device1和分担因子2,另一条第一路由数据还包括第二网络设备2的设备标识Device2和分担因子1,从而得到该集合标识G1对应的设备集合包括的第二网络设备1的设备标识Device1和分担因子2以及第二网络设备2的设备标识Device2和分担因子1。For example, referring to FIG. 6 , the first network device receives the first packet, obtains the set identifier G1 from the first packet, and obtains two pieces of first routing data including the set identifier G1 from its forwarding table, one of which is The first routing data further includes the device identifier Device1 and the sharing factor 2 of the second network device 1, and the other first routing data also includes the device identifier Device2 and the sharing factor 1 of the second network device 2, so as to obtain the corresponding set identifier G1. The device set includes the device identifier Device1 and the sharing factor 2 of the second network device 1 and the device identifier Device2 and the sharing factor 1 of the second network device 2 .
步骤804-805:分别与图7所示实施例中的步骤704-705相同,在此不再详细说明。Steps 804-805 are respectively the same as steps 704-705 in the embodiment shown in FIG. 7, and will not be described in detail here.
例如,参见图6,假设第二网络设备1接收到第一网络设备发送的第一报文,从第一报文的段列表中获取段标识Bsid1;根据该段标识Bsid1,从自身保存的如上述表3所示的段标识与端口标识的对应关系中获取第一端口的端口标识P1和第二端口的端口标识P2,进而确定该实体集合中的与第二网络设备1通信的第一功能实体和第二功能实体;根据第二均衡策略,从第一功能实体和第二功能实体中选择一个功能实体。假设,第二均衡策略是依次轮询, 且第二网络设备1最近上一次选择第一功能实体,因此本次选择第二功能实体。第二网络设备1向第二功能实体发送第一报文,第二功能实体接收第一报文,对第一报文提供服务。For example, referring to FIG. 6 , suppose that the second network device 1 receives the first packet sent by the first network device, and obtains the segment identifier Bsid1 from the segment list of the first packet; Obtain the port identifier P1 of the first port and the port identifier P2 of the second port in the correspondence between the segment identifier and the port identifier shown in the above table 3, and then determine the first function in the entity set that communicates with the second network device 1 an entity and a second functional entity; according to the second balancing strategy, one functional entity is selected from the first functional entity and the second functional entity. It is assumed that the second balancing strategy is to poll in sequence, and the second network device 1 selected the first functional entity last time, and therefore selects the second functional entity this time. The second network device 1 sends the first packet to the second functional entity, and the second functional entity receives the first packet and provides a service for the first packet.
在本申请实施例中,第三网络设备接收到第二报文,第二报文包括VPN标识,获取自身保存的包括该VPN标识的第二路由数据,根据第二路由数据生成第一报文,第一报文的报文头包括段列表和该第二路由数据中的集合标识,该段列表包括该第二路由数据中的段标识,向第一网络设备发送第一报文。也就是说:第二路由数据包括该VPN标识,该VPN对应的实体集合的段标识和设备集合的集合标识,这样该实体集合对应一条第二路由数据,而不是该实体集合中的每个功能实体对应一条路由数据。如此,无论该实体集合中的功能实体数目的多少,都不会影响第三网络设备中保存的第二路由数据的数目,这样可以大幅度减小在第三网络设备中需要保存的第二路由数据的数目,减轻了边界网络设备的负担。以及,可以在VNF中为VPN部署大量的功能实体,来为该VPN提供服务,增强了扩展性。第一网络设备接收第一报文,根据第一报文中的集合标识,获取该设备集合中的每个第二网络设备的分担因子,根据每个第二网络设备的分担因子选择第二网络设备发送第一报文,这样第一网络设备根据每个第二网络设备的分担因子对属于该VPN的报文做第一次均衡处理。第二网络设备接收第一报文后,根据第一报文中的段标识,确定该段标识对应的实体集合中的与第二网络设备通信的至少一个功能实体,根据第二均衡策略从该至少一个功能实体中选择一个功能实体,向选择的功能实体发送第一报文,实现对属于该VPN的报文做第二次均衡处理。如此可以通过对属于该VPN的报文做两次均衡处理,从而实现对属于该VPN的报文做服务均衡的目的。In the embodiment of the present application, the third network device receives the second packet, the second packet includes the VPN identifier, obtains the second routing data stored by itself including the VPN identifier, and generates the first packet according to the second routing data , the header of the first packet includes a segment list and a set identifier in the second routing data, the segment list includes a segment identifier in the second routing data, and the first packet is sent to the first network device. That is to say: the second routing data includes the VPN ID, the segment ID of the entity set corresponding to the VPN, and the set ID of the device set, so that the entity set corresponds to a piece of second routing data instead of each function in the entity set An entity corresponds to a piece of routing data. In this way, regardless of the number of functional entities in the entity set, it will not affect the number of second routing data stored in the third network device, so that the second routing data that needs to be stored in the third network device can be greatly reduced The amount of data reduces the burden on edge network equipment. And, a large number of functional entities can be deployed for the VPN in the VNF to provide services for the VPN, enhancing the scalability. The first network device receives the first packet, obtains the sharing factor of each second network device in the device set according to the set identifier in the first packet, and selects the second network according to the sharing factor of each second network device The device sends the first packet, so that the first network device performs the first equalization processing on the packets belonging to the VPN according to the sharing factor of each second network device. After receiving the first packet, the second network device determines, according to the segment identifier in the first packet, at least one functional entity in the entity set corresponding to the segment identifier that communicates with the second network device, and determines from the segment identifier according to the second balancing strategy. A functional entity is selected from at least one functional entity, and a first packet is sent to the selected functional entity to implement a second equalization process for the packets belonging to the VPN. In this way, the packets belonging to the VPN can be balanced twice, so as to achieve the purpose of balancing the services of the packets belonging to the VPN.
参见图9,本申请实施例提供了一种发送报文的装置900,所述装置900可以部署在上述第一网络设备中,包括:Referring to FIG. 9 , an embodiment of the present application provides an apparatus 900 for sending a packet, and the apparatus 900 may be deployed in the foregoing first network device, including:
接收单元901,用于接收第一报文,第一报文的报文头包括段标识,该段标识与设备集合和实体集合相对应,该设备集合包括多个第二网络设备,该实体集合包括多个功能实体,该设备集合中的第二网络设备与所述实体集合中的功能实体通信;A receiving unit 901, configured to receive a first packet, the packet header of the first packet includes a segment identifier, the segment identifier corresponds to a device set and an entity set, the device set includes a plurality of second network devices, the entity set Including a plurality of functional entities, the second network device in the device set communicates with the functional entities in the entity set;
发送单元902,用于向该段标识对应的设备集合中的第二网络设备,发送第一报文。The sending unit 902 is configured to send the first packet to the second network device in the device set corresponding to the segment identifier.
可选的,发送单元902,用于:Optionally, the sending unit 902 is configured to:
基于该段标识和该设备集合中的第二网络设备的分担因子,向该设备集合中的一个第二网络设备发送第一报文。Based on the segment identifier and the sharing factor of the second network device in the device set, the first packet is sent to a second network device in the device set.
可选的,发送单元902发送第一报文的详细实现过程,可以参见图7所示的实施例中的步骤703和704中的相关内容,或者,图8所示的实施例中的步骤803和804的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of sending the first packet by the sending unit 902, reference may be made to the relevant content in steps 703 and 704 in the embodiment shown in FIG. 7 , or step 803 in the embodiment shown in FIG. 8 . The content related to 804 will not be described in detail here.
可选的,所述装置900还包括:Optionally, the apparatus 900 further includes:
处理单元903,用于根据该段标识获取该设备集合中的第二网络设备的分担因子。The processing unit 903 is configured to obtain the sharing factor of the second network device in the device set according to the segment identifier.
可选的,所述装置900包括多个第一路由数据,每个第一路由数据包括该段标识、该设备集合中的一个第二网络设备的设备标识和分担因子;Optionally, the apparatus 900 includes a plurality of first routing data, and each first routing data includes the segment identifier, the device identifier and the sharing factor of a second network device in the device set;
处理单元903,用于根据该多个第一路由数据,获取该设备集合中的第二网络设备的分担因子。The processing unit 903 is configured to obtain the sharing factor of the second network device in the device set according to the plurality of first routing data.
可选的,处理单元903获取分担因子的详细实现过程,可以参见图7所示的实施例中的 步骤703的相关内容,或者,图8所示的实施例中的步骤803的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of acquiring the sharing factor by the processing unit 903, reference may be made to the relevant content of step 703 in the embodiment shown in FIG. 7 , or the relevant content of step 803 in the embodiment shown in FIG. 8 . This will not be described in detail.
可选的,接收单元901,还用于:Optionally, the receiving unit 901 is further configured to:
接收该设备集合中的第二网络设备发送的第一路由数据。The first routing data sent by the second network device in the device set is received.
可选的,接收单元901接收第一路由数据的详细实现过程,可以参见图3所示的实施例中的步骤304的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of receiving the first routing data by the receiving unit 901, reference may be made to the relevant content of step 304 in the embodiment shown in FIG. 3, and details are not described herein again.
可选的,该设备集合对应一个集合标识,该集合标识是该段标识中的部分内容。Optionally, the device set corresponds to a set identifier, and the set identifier is part of the content of the segment identifier.
可选的,所述装置900为数据中心网关。Optionally, the apparatus 900 is a data center gateway.
在本申请实施例中,由于该第一报文包括的该段标识与设备集合和实体集合相对应,对于段路由网络的边界网络设备,该边界网络设备中只需要保存一条包括VPN标识和该段标识的路由数据,该边界网络设备就可以基于该路由数据生成第一报文,使得发送单元向该段标识对应的设备集合中的第二网络设备发送第一报文。这样无论该VPN对应的功能实体数目有多少,都不会影响边界网络设备中保存的路由数据的数目,可以大幅度减小在边界网络设备中需要保存的路由数据的数目,从而减轻了边界网络设备的负担。In the embodiment of the present application, since the segment identifier included in the first packet corresponds to the device set and the entity set, for the edge network device of the segment routing network, the edge network device only needs to store a message including the VPN identifier and the entity set. routing data of the segment identifier, the border network device can generate the first packet based on the routing data, so that the sending unit sends the first packet to the second network device in the device set corresponding to the segment identifier. In this way, regardless of the number of functional entities corresponding to the VPN, the number of routing data stored in the border network device will not be affected, and the number of routing data that needs to be stored in the border network device can be greatly reduced, thereby reducing the need for border network devices. burden of equipment.
参见图10,本申请实施例提供了一种发送报文的装置1000,所述装置1000可以部署在上述第二网络设备中,包括:Referring to FIG. 10 , an embodiment of the present application provides an apparatus 1000 for sending a message. The apparatus 1000 may be deployed in the foregoing second network device, including:
接收单元1001,用于接收第一报文,第一报文的报文头包括段标识,该段标识与设备集合和实体集合相对应,设备集合包括多个第二网络设备,实体集合包括多个功能实体,设备集合中的第二网络设备与实体集合中的功能实体通信;A receiving unit 1001 is configured to receive a first packet, where a packet header of the first packet includes a segment identifier, and the segment identifier corresponds to a device set and an entity set, the device set includes multiple second network devices, and the entity set includes multiple second network devices. a functional entity, the second network device in the device set communicates with the functional entity in the entity set;
发送单元1002,用于向该段标识对应的实体集合中的功能实体发送第二报文,第二报文是基于第一报文生成的。The sending unit 1002 is configured to send a second message to the functional entities in the entity set corresponding to the segment identifier, where the second message is generated based on the first message.
可选的,发送单元1002发送第二报文的详细实现过程,可以参见图7所示的实施例中的步骤705的相关内容,或者,图8所示的实施例中的步骤805的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of sending the second packet by the sending unit 1002, reference may be made to the relevant content of step 705 in the embodiment shown in FIG. 7 , or the relevant content of step 805 in the embodiment shown in FIG. 8 . , and will not be described in detail here.
可选的,发送单元1002,还用于:Optionally, the sending unit 1002 is further configured to:
发送第一路由数据,第一路由数据包括该段标识、所述装置1000的设备标识和所述装置1000的分担因子。Send first routing data, where the first routing data includes the segment identifier, the device identifier of the apparatus 1000, and the sharing factor of the apparatus 1000.
可选的,发送单元1002,还用于:Optionally, the sending unit 1002 is further configured to:
发送第二路由数据,第二路由数据包括虚拟专用网络VPN标识和该段标识,第一报文包括该VPN标识。Send second routing data, where the second routing data includes the virtual private network VPN identifier and the segment identifier, and the first packet includes the VPN identifier.
可选的,发送单元1002发送第一路由数据和第二路由数据的详细实现过程,可以参见图3所示的实施例中的步骤303的相关内容,在此不再详细说明。Optionally, for a detailed implementation process of sending the first routing data and the second routing data by the sending unit 1002, reference may be made to the relevant content of step 303 in the embodiment shown in FIG. 3, and details are not described herein again.
可选的,设备集合对应一个集合标识,该集合标识是该段标识中的部分内容。Optionally, the device set corresponds to a set identifier, and the set identifier is part of the content of the segment identifier.
在本申请实施例中,由于该第一报文包括的该段标识与设备集合和实体集合相对应,对于段路由网络的边界网络设备,该边界网络设备中只需要保存一条包括VPN标识和该段标识的路由数据,该边界网络设备就可以基于该路由数据生成第一报文,使得发送单元向该段标识对应的实体集合中的功能实体发送第二报文。这样无论该VPN对应的功能实体数目有多少,都不会影响边界网络设备中保存的路由数据的数目,可以大幅度减小在边界网络设备中 需要保存的路由数据的数目,从而减轻了边界网络设备的负担。In the embodiment of the present application, since the segment identifier included in the first packet corresponds to the device set and the entity set, for the edge network device of the segment routing network, the edge network device only needs to store a message including the VPN identifier and the entity set. The routing data of the segment identifier, the border network device can generate the first packet based on the routing data, so that the sending unit sends the second packet to the functional entities in the entity set corresponding to the segment identifier. In this way, regardless of the number of functional entities corresponding to the VPN, the number of routing data stored in the border network device will not be affected, and the number of routing data that needs to be stored in the border network device can be greatly reduced, thereby reducing the need for border network devices. burden of equipment.
参见图11,本申请实施例提供了一种发送报文的装置1100,所述装置1100可以部署在上述第三网络设备中,包括:Referring to FIG. 11 , an embodiment of the present application provides an apparatus 1100 for sending a message, and the apparatus 1100 may be deployed in the foregoing third network device, including:
处理单元1101,用于获取第一报文,第一报文的报文头包括段标识,该段标识与设备集合和实体集合相对应,设备集合包括多个第二网络设备,实体集合包括多个功能实体,设备集合中的第二网络设备与实体集合中的功能实体通信;The processing unit 1101 is configured to acquire a first packet, where the packet header of the first packet includes a segment identifier, and the segment identifier corresponds to a device set and an entity set, the device set includes multiple second network devices, and the entity set includes multiple second network devices. a functional entity, the second network device in the device set communicates with the functional entity in the entity set;
发送单元1102,用于发送第一报文。The sending unit 1102 is configured to send the first packet.
可选的,处理单元1101获取第一报文的详细实现过程,可以参见图7所示的实施例中的步骤701的相关内容,或者,图8所示的实施例中的步骤801的相关内容,在此不再详细说明。Optionally, for the detailed implementation process of acquiring the first packet by the processing unit 1101, reference may be made to the relevant content of step 701 in the embodiment shown in FIG. 7 , or the relevant content of step 801 in the embodiment shown in FIG. 8 . , and will not be described in detail here.
可选的,所述装置1100包括第二路由数据,第二路由数据包括虚拟专用网络VPN标识和所述段标识,所述装置1100还包括:接收单元1103,Optionally, the apparatus 1100 includes second routing data, and the second routing data includes a virtual private network VPN identifier and the segment identifier, and the apparatus 1100 further includes: a receiving unit 1103,
接收单元1103,用于接收第二报文,第二报文包括该VPN标识;a receiving unit 1103, configured to receive a second packet, where the second packet includes the VPN identifier;
处理单元1101,用于根据第二路由数据和第二报文生成第一报文。The processing unit 1101 is configured to generate a first packet according to the second routing data and the second packet.
可选的,接收单元1103,还用于接收第二路由数据。Optionally, the receiving unit 1103 is further configured to receive second routing data.
可选的,接收单元1103接收第二路由数据的详细实现过程,可以参见图3所示的实施例中的步骤305的相关内容,在此不再详细说明。Optionally, for a detailed implementation process of the receiving unit 1103 receiving the second routing data, reference may be made to the relevant content of step 305 in the embodiment shown in FIG. 3 , which will not be described in detail here.
可选的,设备集合对应一个集合标识,集合标识是该段标识中的部分内容。Optionally, the device set corresponds to a set identifier, and the set identifier is part of the segment identifier.
可选的,所述装置1100为段路由网络的边界网络设备。Optionally, the apparatus 1100 is a border network device of a segment routing network.
在本申请实施例中,由于第一报文包括的该段标识与设备集合和实体集合相对应,该装置中只需要保存一条包括VPN标识和该段标识的路由数据,处理单元就可以基于该路由数据获取第一报文。这样无论该VPN对应的功能实体数目有多少,都不会影响该装置中保存的路由数据的数目,可以大幅度减小在该装置中需要保存的路由数据的数目,从而减轻了该装置的负担。In the embodiment of the present application, since the segment identifier included in the first packet corresponds to the device set and the entity set, the device only needs to save a piece of routing data including the VPN identifier and the segment identifier, and the processing unit can The routing data obtains the first packet. In this way, regardless of the number of functional entities corresponding to the VPN, the number of routing data stored in the device will not be affected, and the number of routing data to be stored in the device can be greatly reduced, thereby reducing the burden on the device. .
参见图12,本申请实施例提供了一种发送报文的装置1200示意图。该装置1200可以是上述任一实施例中的第一网络设备。该装置1200包括至少一个处理器1201,内部连接1202,存储器1203以及至少一个收发器1204。Referring to FIG. 12 , an embodiment of the present application provides a schematic diagram of an apparatus 1200 for sending a message. The apparatus 1200 may be the first network device in any of the foregoing embodiments. The apparatus 1200 includes at least one processor 1201 , internal connections 1202 , memory 1203 and at least one transceiver 1204 .
该装置1200是一种硬件结构的装置,可以用于实现图7所述的装置700中的功能模块。例如,本领域技术人员可以想到图9所示的装置900中的处理单元903可以通过该至少一个处理器1201调用存储器1203中的代码来实现,图9所示的装置900中的接收单元901和发送单元902可以通过该收发器1204来实现。The apparatus 1200 is an apparatus with a hardware structure, and can be used to implement the functional modules in the apparatus 700 described in FIG. 7 . For example, those skilled in the art can think that the processing unit 903 in the apparatus 900 shown in FIG. 9 can be implemented by calling the code in the memory 1203 by the at least one processor 1201, and the receiving unit 901 and the receiving unit 901 in the apparatus 900 shown in FIG. The sending unit 902 can be implemented by the transceiver 1204 .
可选的,该装置1200还可用于实现上述任一实施例中第一网络设备的功能。Optionally, the apparatus 1200 may also be used to implement the function of the first network device in any of the foregoing embodiments.
可选的,上述处理器1201可以是一个通用中央处理器(central processing unit,CPU),网络处理器(network processor,NP),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。Optionally, the above-mentioned processor 1201 may be a general-purpose central processing unit (central processing unit, CPU), network processor (network processor, NP), microprocessor, application-specific integrated circuit (application-specific integrated circuit, ASIC) , or one or more integrated circuits used to control the execution of the program of this application.
上述内部连接1202可包括一通路,在上述组件之间传送信息。可选的,内部连接1202为单板或总线等。The internal connections 1202 described above may include a path to transfer information between the aforementioned components. Optionally, the internal connection 1202 is a single board or a bus or the like.
上述收发器1204,用于与其他设备或通信网络通信。The above transceiver 1204 is used to communicate with other devices or communication networks.
上述存储器1203可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。The above-mentioned memory 1203 can be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM) or other types of storage devices that can store information and instructions. Types of dynamic storage devices, which can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical storage, CD-ROM storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by Any other medium accessed by the computer, but not limited to this. The memory can exist independently and be connected to the processor through a bus. The memory can also be integrated with the processor.
其中,存储器1203用于存储执行本申请方案的应用程序代码,并由处理器1201来控制执行。处理器1201用于执行存储器1203中存储的应用程序代码,以及配合至少一个收发器1204,从而使得该装置1200实现本专利方法中的功能。Wherein, the memory 1203 is used for storing the application program code for executing the solution of the present application, and the execution is controlled by the processor 1201 . The processor 1201 is configured to execute the application program code stored in the memory 1203, and cooperate with at least one transceiver 1204, so that the device 1200 can realize the functions in the method of the present patent.
在具体实现中,作为一种实施例,处理器1201可以包括一个或多个CPU,例如图12中的CPU0和CPU1。In a specific implementation, as an embodiment, the processor 1201 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 12 .
在具体实现中,作为一种实施例,该装置1200可以包括多个处理器,例如图12中的处理器1201和处理器1207。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the apparatus 1200 may include multiple processors, such as the processor 1201 and the processor 1207 in FIG. 12 . Each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
参见图13,本申请实施例提供了一种发送报文的装置1300示意图。该装置1300可以是上述任一实施例中的第二网络设备。该装置1300包括至少一个处理器1301,内部连接1302,存储器1303以及至少一个收发器1304。Referring to FIG. 13 , an embodiment of the present application provides a schematic diagram of an apparatus 1300 for sending a message. The apparatus 1300 may be the second network device in any of the foregoing embodiments. The apparatus 1300 includes at least one processor 1301 , internal connections 1302 , memory 1303 and at least one transceiver 1304 .
该装置1300是一种硬件结构的装置,可以用于实现图7所述的装置700中的功能模块。例如,本领域技术人员可以想到图10所示的装置1000中的的接收单元1001和发送单元1002可以通过该收发器1304来实现。The apparatus 1300 is an apparatus with a hardware structure, and can be used to implement the functional modules in the apparatus 700 described in FIG. 7 . For example, those skilled in the art can think that the receiving unit 1001 and the sending unit 1002 in the apparatus 1000 shown in FIG. 10 can be implemented by the transceiver 1304 .
可选的,该装置1300还可用于实现上述任一实施例中第二网络设备的功能。Optionally, the apparatus 1300 may also be used to implement the function of the second network device in any of the foregoing embodiments.
可选的,上述处理器1301可以是一个通用中央处理器(central processing unit,CPU),网络处理器(network processor,NP),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。Optionally, the above-mentioned processor 1301 may be a general-purpose central processing unit (central processing unit, CPU), network processor (network processor, NP), microprocessor, application-specific integrated circuit (application-specific integrated circuit, ASIC) , or one or more integrated circuits used to control the execution of the program of this application.
上述内部连接1302可包括一通路,在上述组件之间传送信息。可选的,内部连接1302为单板或总线等。The internal connections 1302 described above may include a path to transfer information between the aforementioned components. Optionally, the internal connection 1302 is a single board or a bus or the like.
上述收发器1304,用于与其他设备或通信网络通信。The above transceiver 1304 is used to communicate with other devices or communication networks.
上述存储器1303可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储 器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。The above-mentioned memory 1303 can be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM) or other types of storage devices that can store information and instructions. Types of dynamic storage devices, which can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical storage, CD-ROM storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by Any other medium accessed by the computer, but not limited to this. The memory can exist independently and be connected to the processor through a bus. The memory can also be integrated with the processor.
其中,存储器1303用于存储执行本申请方案的应用程序代码,并由处理器1301来控制执行。处理器1301用于执行存储器1303中存储的应用程序代码,以及配合至少一个收发器1304,从而使得该装置1300实现本专利方法中的功能。Wherein, the memory 1303 is used for storing the application code for executing the solution of the present application, and the execution is controlled by the processor 1301 . The processor 1301 is used to execute the application program code stored in the memory 1303 and cooperate with at least one transceiver 1304, so that the device 1300 can realize the functions in the method of the present patent.
在具体实现中,作为一种实施例,处理器1301可以包括一个或多个CPU,例如图13中的CPU0和CPU1。In a specific implementation, as an embodiment, the processor 1301 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 13 .
在具体实现中,作为一种实施例,该装置1300可以包括多个处理器,例如图13中的处理器1301和处理器1307。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the apparatus 1300 may include multiple processors, such as the processor 1301 and the processor 1307 in FIG. 13 . Each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
参见图14,本申请实施例提供了一种发送报文的装置1400示意图。该装置1400可以是上述任一实施例中的第三网络设备。该装置1400包括至少一个处理器1401,内部连接1402,存储器1403以及至少一个收发器1404。Referring to FIG. 14 , an embodiment of the present application provides a schematic diagram of an apparatus 1400 for sending a message. The apparatus 1400 may be the third network device in any of the foregoing embodiments. The apparatus 1400 includes at least one processor 1401 , internal connections 1402 , memory 1403 and at least one transceiver 1404 .
该装置1400是一种硬件结构的装置,可以用于实现图11所述的装置1100中的功能模块。例如,本领域技术人员可以想到图11所示的装置1100中的处理单元1101可以通过该至少一个处理器1401调用存储器1403中的代码来实现,图11所示的装置1100中的发送单元1102和接收单元1103可以通过该收发器1404来实现。The apparatus 1400 is an apparatus with a hardware structure, and can be used to implement the functional modules in the apparatus 1100 described in FIG. 11 . For example, those skilled in the art can think that the processing unit 1101 in the apparatus 1100 shown in FIG. 11 can be implemented by calling the code in the memory 1403 by the at least one processor 1401, and the sending unit 1102 and the sending unit 1102 in the apparatus 1100 shown in FIG. The receiving unit 1103 can be implemented by the transceiver 1404 .
可选的,该装置1400还可用于实现上述任一实施例中第三网络设备的功能。Optionally, the apparatus 1400 may also be used to implement the function of the third network device in any of the foregoing embodiments.
可选的,上述处理器1401可以是一个通用中央处理器(central processing unit,CPU),网络处理器(network processor,NP),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。Optionally, the above-mentioned processor 1401 may be a general-purpose central processing unit (central processing unit, CPU), network processor (network processor, NP), microprocessor, application-specific integrated circuit (application-specific integrated circuit, ASIC) , or one or more integrated circuits used to control the execution of the program of this application.
上述内部连接1402可包括一通路,在上述组件之间传送信息。可选的,内部连接1402为单板或总线等。The internal connections 1402 described above may include a path to transfer information between the aforementioned components. Optionally, the internal connection 1402 is a single board or a bus or the like.
上述收发器1404,用于与其他设备或通信网络通信。The above transceiver 1404 is used to communicate with other devices or communication networks.
上述存储器1403可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。The above-mentioned memory 1403 can be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM) or other types of storage devices that can store information and instructions. Types of dynamic storage devices, which can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical storage, CD-ROM storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by Any other medium accessed by the computer, but not limited to this. The memory can exist independently and be connected to the processor through a bus. The memory can also be integrated with the processor.
其中,存储器1403用于存储执行本申请方案的应用程序代码,并由处理器1401来控制执行。处理器1401用于执行存储器1403中存储的应用程序代码,以及配合至少一个收发器1404,从而使得该装置1400实现本专利方法中的功能。Wherein, the memory 1403 is used for storing the application code for executing the solution of the present application, and the execution is controlled by the processor 1401 . The processor 1401 is used to execute the application program code stored in the memory 1403 and cooperate with at least one transceiver 1404, so that the apparatus 1400 can realize the functions in the method of the present patent.
在具体实现中,作为一种实施例,处理器1401可以包括一个或多个CPU,例如图14中的CPU0和CPU1。In a specific implementation, as an embodiment, the processor 1401 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 14 .
在具体实现中,作为一种实施例,该装置1400可以包括多个处理器,例如图14中的处 理器1401和处理器1407。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the apparatus 1400 may include multiple processors, such as the processor 1401 and the processor 1407 in FIG. 14 . Each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
参见图15,本申请实施例提供了一种发送报文的***1500,所述***1500包括:如图9所述的装置900,如图10所述的装置1000和如图11所述的装置1100;或者,所述***1500包括:如图12所述的装置1200,如图13所述的装置1300和如图14所述的装置1400。Referring to FIG. 15 , an embodiment of the present application provides a system 1500 for sending a message. The system 1500 includes: the apparatus 900 described in FIG. 9 , the apparatus 1000 described in FIG. 10 , and the apparatus described in FIG. 11 . 1100; or, the system 1500 includes: the apparatus 1200 described in FIG. 12 , the apparatus 1300 described in FIG. 13 , and the apparatus 1400 described in FIG. 14 .
其中,如图9所述的装置900或者如图12所述的装置1200可以为第一网络设备1501,如图10所述的装置1000或者如图13所述的装置1300可以为第二网络设备1502,如图11所述的装置1100或者如图14所述的装置1400可以为第三网络设备1503。The apparatus 900 shown in FIG. 9 or the apparatus 1200 shown in FIG. 12 may be the first network device 1501, and the apparatus 1000 shown in FIG. 10 or the apparatus 1300 shown in FIG. 13 may be the second network device 1502 , the apparatus 1100 described in FIG. 11 or the apparatus 1400 described in FIG. 14 may be the third network device 1503 .
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, etc.
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above are only optional embodiments of the present application, and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present application shall be included in the protection scope of the present application. Inside.

Claims (35)

  1. 一种发送报文的方法,其特征在于,所述方法包括:A method for sending a message, characterized in that the method comprises:
    第一网络设备接收第一报文,所述第一报文的报文头包括段标识,所述段标识与设备集合和实体集合相对应,所述设备集合包括多个第二网络设备,所述实体集合包括多个功能实体,所述设备集合中的第二网络设备与所述实体集合中的功能实体通信;The first network device receives the first packet, and the packet header of the first packet includes a segment identifier, and the segment identifier corresponds to a device set and an entity set, and the device set includes multiple second network devices. The entity set includes a plurality of functional entities, and the second network device in the device set communicates with the functional entities in the entity set;
    所述第一网络设备向所述段标识对应的设备集合中的第二网络设备,发送所述第一报文。The first network device sends the first packet to the second network device in the device set corresponding to the segment identifier.
  2. 如权利要求1所述的方法,其特征在于,所述第一网络设备向所述段标识对应的设备集合中的第二网络设备,发送所述第一报文,包括:The method according to claim 1, wherein the sending, by the first network device, the first packet to the second network device in the device set corresponding to the segment identifier comprises:
    所述第一网络设备基于所述段标识和所述设备集合中的第二网络设备的分担因子,向所述设备集合中的一个第二网络设备发送所述第一报文。The first network device sends the first packet to a second network device in the device set based on the segment identifier and the sharing factor of the second network device in the device set.
  3. 如权利要求2所述的方法,其特征在于,所述方法还包括:The method of claim 2, wherein the method further comprises:
    所述第一网络设备根据所述段标识获取所述设备集合中的第二网络设备的分担因子。The first network device acquires the sharing factor of the second network device in the device set according to the segment identifier.
  4. 如权利要求3所述的方法,其特征在于,所述第一网络设备包括多个第一路由数据,每个第一路由数据包括所述段标识、所述设备集合中的一个第二网络设备的设备标识和分担因子;The method of claim 3, wherein the first network device includes a plurality of first routing data, and each first routing data includes the segment identifier, a second network device in the device set equipment identification and sharing factor;
    所述第一网络设备根据所述段标识获取所述设备集合中的第二网络设备的分担因子,包括:The first network device acquires the sharing factor of the second network device in the device set according to the segment identifier, including:
    所述第一网络设备根据所述多个第一路由数据,获取所述设备集合中的第二网络设备的分担因子。The first network device acquires the sharing factor of the second network device in the device set according to the plurality of first routing data.
  5. 如权利要求4所述的方法,其特征在于,所述方法还包括:The method of claim 4, wherein the method further comprises:
    所述第一网络设备接收所述设备集合中的第二网络设备发送的第一路由数据。The first network device receives the first routing data sent by the second network device in the device set.
  6. 如权利要求1至5任一项所述的方法,其特征在于,所述设备集合对应一个集合标识,所述集合标识是所述段标识中的部分内容。The method according to any one of claims 1 to 5, wherein the device set corresponds to a set identifier, and the set identifier is part of the content in the segment identifier.
  7. 如权利要求1至6任一项所述的方法,其特征在于,所述第一网络设备为数据中心网关。The method according to any one of claims 1 to 6, wherein the first network device is a data center gateway.
  8. 一种发送报文的方法,其特征在于,所述方法包括:A method for sending a message, characterized in that the method comprises:
    第二网络设备接收第一报文,所述第一报文的报文头包括段标识,所述段标识与设备集合和实体集合相对应,所述设备集合包括多个第二网络设备,所述实体集合包括多个功能实体,所述设备集合中的第二网络设备与所述实体集合中的功能实体通信;The second network device receives the first packet, the header of the first packet includes a segment identifier, and the segment identifier corresponds to a device set and an entity set, and the device set includes a plurality of second network devices. The entity set includes a plurality of functional entities, and the second network device in the device set communicates with the functional entities in the entity set;
    所述第二网络设备向所述段标识对应的实体集合中的功能实体发送第二报文,所述第二报文是基于所述第一报文生成的。The second network device sends a second packet to the functional entity in the entity set corresponding to the segment identifier, where the second packet is generated based on the first packet.
  9. 如权利要求8所述的方法,其特征在于,所述方法包括:The method of claim 8, wherein the method comprises:
    所述第二网络设备发送第一路由数据,所述第一路由数据包括所述段标识、所述第二网络设备的设备标识和所述第二网络设备的分担因子。The second network device sends first routing data, where the first routing data includes the segment identifier, the device identifier of the second network device, and the sharing factor of the second network device.
  10. 如权利要求8或9所述的方法,其特征在于,所述方法还包括:The method of claim 8 or 9, wherein the method further comprises:
    所述第二网络设备发送第二路由数据,所述第二路由数据包括虚拟专用网络VPN标识和所述段标识,所述第一报文包括所述VPN标识。The second network device sends second routing data, where the second routing data includes a virtual private network VPN identifier and the segment identifier, and the first packet includes the VPN identifier.
  11. 如权利要求8至10任一项所述的方法,其特征在于,所述设备集合对应一个集合标识,所述集合标识是所述段标识中的部分内容。The method according to any one of claims 8 to 10, wherein the device set corresponds to a set identifier, and the set identifier is part of the content in the segment identifier.
  12. 一种发送报文的方法,其特征在于,所述方法包括:A method for sending a message, characterized in that the method comprises:
    所述第三网络设备获取第一报文,所述第一报文的报文头包括段标识,所述段标识与设备集合和实体集合相对应,所述设备集合包括多个第二网络设备,所述实体集合包括多个功能实体,所述设备集合中的第二网络设备与所述实体集合中的功能实体通信;The third network device obtains the first packet, and the packet header of the first packet includes a segment identifier, and the segment identifier corresponds to a device set and an entity set, and the device set includes a plurality of second network devices , the entity set includes a plurality of functional entities, and the second network device in the device set communicates with the functional entities in the entity set;
    所述第三网络设备发送所述第一报文。The third network device sends the first packet.
  13. 如权利要求12所述的方法,其特征在于,所述第三网络设备包括第二路由数据,所述第二路由数据包括虚拟专用网络VPN标识和所述段标识,所述方法还包括:The method of claim 12, wherein the third network device includes second routing data, and the second routing data includes a virtual private network VPN identifier and the segment identifier, and the method further comprises:
    所述第三网络设备接收第二报文,所述第二报文包括所述VPN标识;the third network device receives a second packet, where the second packet includes the VPN identifier;
    所述第三网络设备获取第一报文,包括:The third network device obtains the first packet, including:
    所述第三网络设备根据所述第二路由数据和所述第二报文生成所述第一报文。The third network device generates the first packet according to the second routing data and the second packet.
  14. 如权利要求13所述的方法,其特征在于,所述方法还包括:The method of claim 13, wherein the method further comprises:
    所述第三网络设备接收所述第二路由数据。The third network device receives the second routing data.
  15. 如权利要求12至14任一项所述的方法,其特征在于,所述设备集合对应一个集合标识,所述集合标识是所述段标识中的部分内容。The method according to any one of claims 12 to 14, wherein the device set corresponds to a set identifier, and the set identifier is part of the content in the segment identifier.
  16. 如权利要求12至15任一项所述的方法,其特征在于,所述第三网络设备为段路由网络的边界网络设备。The method according to any one of claims 12 to 15, wherein the third network device is a border network device of a segment routing network.
  17. 一种发送报文的装置,其特征在于,所述装置包括:A device for sending a message, characterized in that the device comprises:
    接收单元,用于接收第一报文,所述第一报文的报文头包括段标识,所述段标识与设备集合和实体集合相对应,所述设备集合包括多个第二网络设备,所述实体集合包括多个功能实体,所述设备集合中的第二网络设备与所述实体集合中的功能实体通信;a receiving unit, configured to receive a first packet, where a packet header of the first packet includes a segment identifier, the segment identifier corresponds to a device set and an entity set, and the device set includes a plurality of second network devices, The entity set includes a plurality of functional entities, and the second network device in the device set communicates with the functional entities in the entity set;
    发送单元,用于向所述段标识对应的设备集合中的第二网络设备,发送所述第一报文。A sending unit, configured to send the first packet to the second network device in the device set corresponding to the segment identifier.
  18. 如权利要求17所述的装置,其特征在于,所述发送单元,用于:The apparatus of claim 17, wherein the sending unit is configured to:
    基于所述段标识和所述设备集合中的第二网络设备的分担因子,向所述设备集合中的一个第二网络设备发送所述第一报文。Based on the segment identifier and the sharing factor of the second network device in the device set, the first packet is sent to one second network device in the device set.
  19. 如权利要求18所述的装置,其特征在于,所述装置还包括:The apparatus of claim 18, wherein the apparatus further comprises:
    处理单元,用于根据所述段标识获取所述设备集合中的第二网络设备的分担因子。A processing unit, configured to acquire the sharing factor of the second network device in the device set according to the segment identifier.
  20. 如权利要求19所述的装置,其特征在于,所述装置包括多个第一路由数据,每个第一路由数据包括所述段标识、所述设备集合中的一个第二网络设备的设备标识和分担因子;The apparatus of claim 19, wherein the apparatus comprises a plurality of first routing data, and each first routing data comprises the segment identifier and the device identifier of a second network device in the device set and sharing factor;
    所述处理单元,用于根据所述多个第一路由数据,获取所述设备集合中的第二网络设备的分担因子。The processing unit is configured to obtain the sharing factor of the second network device in the device set according to the plurality of first routing data.
  21. 如权利要求20所述的装置,其特征在于,所述接收单元,还用于:The apparatus of claim 20, wherein the receiving unit is further configured to:
    接收所述设备集合中的第二网络设备发送的第一路由数据。Receive first routing data sent by a second network device in the device set.
  22. 如权利要求17至21任一项所述的装置,其特征在于,所述设备集合对应一个集合标识,所述集合标识是所述段标识中的部分内容。The apparatus according to any one of claims 17 to 21, wherein the device set corresponds to a set identifier, and the set identifier is part of the content in the segment identifier.
  23. 如权利要求17至22任一项所述的装置,其特征在于,所述装置为数据中心网关。The apparatus according to any one of claims 17 to 22, wherein the apparatus is a data center gateway.
  24. 一种发送报文的装置,其特征在于,所述装置包括:A device for sending a message, characterized in that the device comprises:
    接收单元,用于接收第一报文,所述第一报文的报文头包括段标识,所述段标识与设备集合和实体集合相对应,所述设备集合包括多个第二网络设备,所述实体集合包括多个功能实体,所述设备集合中的第二网络设备与所述实体集合中的功能实体通信;a receiving unit, configured to receive a first packet, where a packet header of the first packet includes a segment identifier, the segment identifier corresponds to a device set and an entity set, and the device set includes a plurality of second network devices, The entity set includes a plurality of functional entities, and the second network device in the device set communicates with the functional entities in the entity set;
    发送单元,用于向所述段标识对应的实体集合中的功能实体发送第二报文,所述第二报文是基于所述第一报文生成的。A sending unit, configured to send a second message to a functional entity in the entity set corresponding to the segment identifier, where the second message is generated based on the first message.
  25. 如权利要求24所述的装置,其特征在于,所述发送单元,还用于:The apparatus of claim 24, wherein the sending unit is further configured to:
    发送第一路由数据,所述第一路由数据包括所述段标识、所述装置的设备标识和所述装置的分担因子。Send first routing data, where the first routing data includes the segment identifier, the device identifier of the apparatus, and the sharing factor of the apparatus.
  26. 如权利要求24或25所述的装置,其特征在于,所述发送单元,还用于:The apparatus according to claim 24 or 25, wherein the sending unit is further configured to:
    发送第二路由数据,所述第二路由数据包括虚拟专用网络VPN标识和所述段标识,所述第一报文包括所述VPN标识。Send second routing data, where the second routing data includes a virtual private network VPN identifier and the segment identifier, and the first packet includes the VPN identifier.
  27. 如权利要求24至26任一项所述的装置,其特征在于,所述设备集合对应一个集合标识,所述集合标识是所述段标识中的部分内容。The apparatus according to any one of claims 24 to 26, wherein the device set corresponds to a set identifier, and the set identifier is part of the content in the segment identifier.
  28. 一种发送报文的装置,其特征在于,所述装置包括:A device for sending a message, characterized in that the device comprises:
    处理单元,用于获取第一报文,所述第一报文的报文头包括段标识,所述段标识与设备集合和实体集合相对应,所述设备集合包括多个第二网络设备,所述实体集合包括多个功能实体,所述设备集合中的第二网络设备与所述实体集合中的功能实体通信;a processing unit, configured to acquire a first packet, where a packet header of the first packet includes a segment identifier, the segment identifier corresponds to a device set and an entity set, and the device set includes a plurality of second network devices, The entity set includes a plurality of functional entities, and the second network device in the device set communicates with the functional entities in the entity set;
    发送单元,用于发送所述第一报文。A sending unit, configured to send the first message.
  29. 如权利要求28所述的装置,其特征在于,所述装置包括第二路由数据,所述第二路由数据包括虚拟专用网络VPN标识和所述段标识,所述装置还包括:接收单元,The apparatus according to claim 28, wherein the apparatus comprises second routing data, the second routing data comprises a virtual private network VPN identifier and the segment identifier, the apparatus further comprises: a receiving unit,
    所述接收单元,用于接收第二报文,所述第二报文包括所述VPN标识;the receiving unit, configured to receive a second packet, where the second packet includes the VPN identifier;
    所述处理单元,用于根据所述第二路由数据和所述第二报文生成所述第一报文。The processing unit is configured to generate the first packet according to the second routing data and the second packet.
  30. 如权利要求29所述的装置,其特征在于,所述接收单元,还用于接收所述第二路由数据。The apparatus of claim 29, wherein the receiving unit is further configured to receive the second routing data.
  31. 如权利要求28至30任一项所述的装置,其特征在于,所述设备集合对应一个集合标识,所述集合标识是所述段标识中的部分内容。The apparatus according to any one of claims 28 to 30, wherein the device set corresponds to a set identifier, and the set identifier is part of the content in the segment identifier.
  32. 如权利要求28至31任一项所述的装置,其特征在于,所述装置为段路由网络的边界网络设备。The apparatus according to any one of claims 28 to 31, wherein the apparatus is a border network device of a segment routing network.
  33. 一种发送报文的***,其特征在于,所述***包括:如权利要求17至23任一项所述的装置,如权利要求24至27任一项所述的装置和如权利要求28至32任一项所述的装置。A system for sending messages, characterized in that the system comprises: the device according to any one of claims 17 to 23, the device according to any one of claims 24 to 27, and the device according to any one of claims 28 to 28. 32 The device of any one.
  34. 一种计算机可读存储介质,包括计算机程序,其特征在于,所述计算机程序在处理器上运行时,实现如权利要求1-16任一项所述的方法。A computer-readable storage medium, comprising a computer program, characterized in that, when the computer program runs on a processor, the method according to any one of claims 1-16 is implemented.
  35. 一种计算机程序产品,其特征在于,所述计算机程序产品在处理器上运行时,实现如权利要求1-16任一项所述的方法。A computer program product, characterized in that, when the computer program product runs on a processor, the method according to any one of claims 1-16 is implemented.
PCT/CN2021/117322 2020-10-31 2021-09-08 Method, apparatus and system for sending packet, and storage medium WO2022089027A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011198931.9 2020-10-31
CN202011198931.9A CN114531385B (en) 2020-10-31 2020-10-31 Method, device and system for sending message

Publications (1)

Publication Number Publication Date
WO2022089027A1 true WO2022089027A1 (en) 2022-05-05

Family

ID=81383592

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/117322 WO2022089027A1 (en) 2020-10-31 2021-09-08 Method, apparatus and system for sending packet, and storage medium

Country Status (2)

Country Link
CN (1) CN114531385B (en)
WO (1) WO2022089027A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160353367A1 (en) * 2015-06-01 2016-12-01 Huawei Technologies Co., Ltd. System and Method for Virtualized Functions in Control and Data Planes
CN107710832A (en) * 2015-06-01 2018-02-16 华为技术有限公司 System and method for the virtualization in chain of command and data surface
CN111092801A (en) * 2018-10-23 2020-05-01 华为技术有限公司 Data transmission method and device
CN111713079A (en) * 2018-10-22 2020-09-25 思科技术公司 Packet network interworking including segment routing

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070174429A1 (en) * 2006-01-24 2007-07-26 Citrix Systems, Inc. Methods and servers for establishing a connection between a client system and a virtual machine hosting a requested computing environment
US8259726B2 (en) * 2009-05-28 2012-09-04 Force10 Networks, Inc. Method and apparatus for forwarding table reduction
CN104219142B (en) * 2013-05-30 2017-06-16 中国电信股份有限公司 Access method, system and the DCBR of the virtual machine migrated across IDC
US9900250B2 (en) * 2015-03-26 2018-02-20 Cisco Technology, Inc. Scalable handling of BGP route information in VXLAN with EVPN control plane
CN105763444B (en) * 2016-01-27 2019-03-15 新华三技术有限公司 A kind of route synchronization method and device
WO2017161484A1 (en) * 2016-03-21 2017-09-28 华为技术有限公司 Message interaction method, device and system
CN107547374B (en) * 2017-06-01 2020-04-28 新华三技术有限公司 Aggregation route processing method and device
CN108429685B (en) * 2018-04-28 2020-08-04 电子科技大学 Service function chain routing method based on segmented routing technology
US10506469B1 (en) * 2018-05-17 2019-12-10 Cisco Technology, Inc. Resilient in-band mobile core user plane function selection using segment routing load balancing
CN110830543B (en) * 2018-08-13 2021-10-19 华为技术有限公司 Communication method and communication device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160353367A1 (en) * 2015-06-01 2016-12-01 Huawei Technologies Co., Ltd. System and Method for Virtualized Functions in Control and Data Planes
CN107710832A (en) * 2015-06-01 2018-02-16 华为技术有限公司 System and method for the virtualization in chain of command and data surface
CN111713079A (en) * 2018-10-22 2020-09-25 思科技术公司 Packet network interworking including segment routing
CN111092801A (en) * 2018-10-23 2020-05-01 华为技术有限公司 Data transmission method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CISCO SYSTEMS.: "SRv6 Load-balancing aspects", 3GPP DRAFT; C4-186169, vol. CT WG4, 10 August 2018 (2018-08-10), West Palm Beach, US, pages 1 - 2, XP051574806 *

Also Published As

Publication number Publication date
CN114531385A (en) 2022-05-24
CN114531385B (en) 2022-12-27

Similar Documents

Publication Publication Date Title
JP7355830B2 (en) System and method for on-demand flow-based policy enforcement in multi-cloud environments
US11102079B2 (en) Cross-regional virtual network peering
US8369333B2 (en) Method and apparatus for transparent cloud computing with a virtualized network infrastructure
CN112422393B (en) Method for transmitting message of extensible virtual local area network, computer equipment and readable medium
US11075948B2 (en) Method and system for virtual machine aware policy management
US8913613B2 (en) Method and system for classification and management of inter-blade network traffic in a blade server
US9560017B2 (en) Methods and apparatus to route traffic in a virtual private network
US9871720B1 (en) Using packet duplication with encapsulation in a packet-switched network to increase reliability
CN107113241B (en) Route determining method, network configuration method and related device
US11165692B2 (en) Packet forwarding using vendor extension in a software-defined networking (SDN) system
WO2016177145A1 (en) Packet transmission method and device
WO2017166136A1 (en) Vnf resource allocation method and device
US11570093B2 (en) Data transmission method, node and system
WO2016115698A1 (en) Data packet forwarding method, apparatus and device
US20200314016A1 (en) Tunneling inter-domain stateless internet protocol multicast packets
US11102114B2 (en) Method, apparatus, and computer-readable storage medium for network optimization for accessing cloud service from on-premises network
US20230216786A1 (en) Method for forwarding service packet, method for sending sr policy, device, and system
EP3879757A1 (en) Network traffic steering among cpu cores using forwarding path elements
CN109639589B (en) Load balancing method and device
US9130896B2 (en) Distributed functionality across multiple network devices
EP3503484B1 (en) Message transmission methods and devices
WO2022089027A1 (en) Method, apparatus and system for sending packet, and storage medium
WO2016127565A1 (en) Method and apparatus for processing segment routing id (sid)
WO2022012690A1 (en) Router advertisement method and related device
WO2022037330A1 (en) Method and device for transmitting virtual private network segment identification (vpn sid), and network device

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21884757

Country of ref document: EP

Kind code of ref document: A1