WO2021023141A1 - 一种路由表项获得方法、装置及设备 - Google Patents

一种路由表项获得方法、装置及设备 Download PDF

Info

Publication number
WO2021023141A1
WO2021023141A1 PCT/CN2020/106496 CN2020106496W WO2021023141A1 WO 2021023141 A1 WO2021023141 A1 WO 2021023141A1 CN 2020106496 W CN2020106496 W CN 2020106496W WO 2021023141 A1 WO2021023141 A1 WO 2021023141A1
Authority
WO
WIPO (PCT)
Prior art keywords
identifier
network
target
moment
message
Prior art date
Application number
PCT/CN2020/106496
Other languages
English (en)
French (fr)
Inventor
彭书萍
李磊
李振斌
郝建武
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP20849896.4A priority Critical patent/EP3996335A4/en
Publication of WO2021023141A1 publication Critical patent/WO2021023141A1/zh
Priority to US17/588,594 priority patent/US20220158928A1/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/02Topology update or discovery
    • H04L45/04Interdomain routing, e.g. hierarchical routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/302Route determination based on requested QoS
    • H04L45/306Route determination based on the nature of the carried application
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/32Flooding
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/70Routing based on monitoring results
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering

Definitions

  • This application relates to the network field, and in particular to a method, device and equipment for obtaining routing table entries.
  • Application program also known as application software (application software, APP)
  • application software is a computer program for accomplishing one or more specific tasks and usually requires interaction with users.
  • Applications usually include client and server. Among them, the client is installed in the terminal device to realize interaction with the user.
  • the server is installed in the server and used to respond to the client's request and deliver software updates to the client.
  • the server of the same application in order to enhance the computing power of the application, can be deployed in different devices, and each device can run one or more instances of the application.
  • the computing capabilities of devices running different application instances of the same application may be different. Since the computing power of the device directly affects the user experience of the application client, it becomes very important to select a device with suitable computing power to respond to the request of the application client.
  • the embodiments of the present application provide a method and device for obtaining routing table entries, so as to achieve the purpose of providing a user with a device with appropriate computing capabilities to interact with terminal equipment.
  • the embodiments of the present application provide a method for obtaining routing table entries.
  • the method may be applied to a first network device, which may be a router or a layer 3 switch.
  • the method specifically includes the following steps: First, the first network device obtains the identification of the application, the computing capability of the first device running the application, and the computing capability of the second device running the application.
  • the first device and the second device may be virtual machines, servers, or containers.
  • the computing power of the first device and the computing power of the second device include, for example, one of the load, the number of cores of the central processing unit (CPU), the size of the random access memory (RAM), etc. There are multiple items, which are not specifically limited in the embodiments of this application.
  • the identifier of the application program is used to identify the application program, such as a protocol feature word or an application feature code (attribute code) of the application program, etc., which is not specifically limited in the embodiment of the present application.
  • the first network device determines the device whose computing capability meets the preset condition as the target device based on the computing capability of the first device and the computing capability of the second device.
  • the first network device obtains the identifier of the target instance, and the identifier of the target instance is used to identify the instance of the application program running on the target device.
  • the first network device generates a routing table entry according to the identification of the application program and the identification of the target instance.
  • the routing table entry includes the identification of the application and the outgoing port of the first network device.
  • the outgoing port of the first network device is based on the target instance.
  • the port identified by the ID, the outgoing port of the first network device can communicate with the next-hop device on the path to the target device.
  • the identifier of the target instance may be the internet protocol (IP) address of the target instance.
  • IP address of the target instance may be, for example, the IP address of the virtual machine or the IP address of the server, or the IP address of the server and the port number of the server.
  • the first network device After the first network device receives the message from the terminal device, it can forward the message to the target device according to the routing table entry, and the target device processes the message. Since the target device is a device that satisfies the preset conditions, that is, a device with strong computing capability, it can process the message relatively quickly, thereby having a higher message processing efficiency and a higher user experience.
  • the target device is a device that satisfies the preset conditions, that is, a device with strong computing capability, it can process the message relatively quickly, thereby having a higher message processing efficiency and a higher user experience.
  • the target device is a device that satisfies the preset conditions, that is, a device with strong computing capability, it can process the message relatively quickly, thereby having a higher message processing efficiency and a higher user experience.
  • the target device is a device that satisfies the preset conditions, that is, a device with strong computing capability, it can process the message relatively quickly, thereby having a higher message processing efficiency
  • the first network device obtains the identification of the application program, the computing capability of the first device running the application program, and the computing capability of the second device running the application program, according to the information connected to the first network device.
  • the first network device is connected to the first device and the second device, and the first network device obtains the identification of the application program, the computing capability of the first device running the application program, and the first device running the application program.
  • the computing capabilities of the second device include: the first network device receives the first message from the first device, the first message includes the computing capability of the first device and the identification of the application; the first network device receives the first message from the second device Two messages, the second message includes the computing capability of the second device and the identification of the application program.
  • the first network device when the first network device is connected to both the first device and the second device, the first network device obtains the identification of the application, the computing capability of the first device running the application, and the second device running the application.
  • the computing power of the device is to receive the first message from the first device and the second message from the second device.
  • the first network device obtains the identification of the application, the computing capability of the first device that runs the application, and the computing capability of the second device that runs the application.
  • Capabilities include: the first network device receives a third message from the first device, the third message includes the computing capability of the first device and the identification of the application program; the first network device receives information from the second network device of the same network topology The fourth message, the fourth message includes the computing capability of the second device and the identification of the application program.
  • the first network device obtains the identification of the application, the computing capability of the first device running the application, and the manner in which the computing capability of the second device running the application is It is to receive the third message from the first device and the fourth message from other network devices in the network topology, such as the second network device.
  • the method for obtaining the device is similar to the method for obtaining the connection between the first network device and the first device. That is, if the first network device is connected to the second device, the first network device acquiring the application identifier, the computing capability of the first device, and the computing capability of the second device includes: the first network device receives from the second device The tenth message of the second device, the tenth message includes the computing capability of the first device and the identification of the application; the first network device receives the tenth message from the fifth network device of the same network topology A message, the eleventh message includes the computing capability of the second device and the identification of the application program.
  • the first network device is connected to a virtual router (VRouter), and the first network device obtains the identification of the application program, the computing capability of the first device running the application program, and the first device running the application program.
  • the computing capabilities of the second device include: the first network device receives a fifth message sent by the virtual router, and the fifth message includes the identifier of the application program, the computing capability of the first device, and the computing capability of the second device. That is, in this implementation manner, the first network device is not directly connected to the first device and the second device, but is connected through a virtual router. In this case, the virtual router collects the identification of the application, the computing power of the first device running the application, and the computing power of the second device running the application, and sends them to the first network device.
  • the computing capability of the first device, the computing capability of the second device, and the identification of the application program can all be carried in the type-length-value (TLV) field of the corresponding message.
  • the first to seventh messages may be interior gateway protocol (IGP) messages, or border gateway protocol (border gateway protocol, BGP) messages.
  • the first network device receives the computing capability of the first device, the computing capability of the second device, and the identification of the application program. , Can send the above-mentioned parameter or the message carrying the above-mentioned parameter to other network devices in the same network topology.
  • the method further includes: the first network device sends a sixth message to the third network device in the same network topology, the sixth message including the identifier of the application, the computing capability of the first device, and the computing capability of the second device.
  • the computing capability of the first device, the computing capability of the second device, and the identification of the application program may be carried in the TLV field of the sixth packet.
  • the sixth message can be an IGP message or a BGP message.
  • the third network device After receiving the sixth message, the third network device sends the application identifier, the computing capability of the first device, and the other network devices in the same network topology to other network devices in the same network topology.
  • the computing power of the second device so that each network device in the network topology can obtain the application identifier, the computing power of the first device, and the computing power of the second device through this flooding method .
  • the third network device may be a network device connected to the terminal device, that is, the head node.
  • the first network device may send to other network devices in the same network topology after receiving the identification of the application and one of the computing capability of the first device and the computing capability of the second device The parameters received. For example, if the first network device is connected to the first device, the first network device sends a seventh packet to the fourth network device in the same network topology, where the seventh packet includes the identification of the application program And the computing power of the first device. If the first network device is connected to the second device, the first network device sends a twelfth message to the sixth network device in the same network topology, and the twelfth message includes the information of the application Identify and the computing capability of the second device.
  • the computing capability of the first device and the identification of the application program may be carried in the TLV field of the seventh message.
  • the identifier of the application program and the computing capability of the second device may be carried in the TLV field of the twelfth message.
  • the seventh message and the twelfth message can be IGP messages or BGP messages.
  • the fourth network device sends the application identifier and the computing capability of the first device to other network devices in the same network topology, so that Each network device in the network topology can obtain the computing power of the first device and the identification of the application program through this flooding method.
  • the seventh message is a BGP message
  • the fourth network device may be a network device connected to the terminal device, that is, the head node.
  • the sixth network device after receiving the twelfth message, sends the identification of the application and the second device to other network devices in the same network topology.
  • the sixth network device may be a network device connected to the terminal device, that is, the head node.
  • the above is the specific details of the edge network equipment connected to the device in the execution of the identification of the application, the computing power of the first device running the application, and the computing power of the second device running the application, as the network topology
  • Other network devices that are not connected to the device, when they perform this step as the first network device, they receive the computing power of the first device, the computing power of the second device, and the application from the edge network device connected to the device Logo.
  • generating the routing table entry by the first network device according to the identification of the application program and the identification of the target instance includes: the first network device determines the next hop device on the path to the target device according to the identification of the target instance; The network device obtains an outgoing port on the first network device that can communicate with the next hop device according to the next hop device on the path to the target device.
  • the embodiment of the present application determines the outgoing port in the routing table entry through the identifier of the target instance, thereby achieving the purpose of generating the routing table entry.
  • the method further includes: the first network device receives an eighth message from the terminal device, the eighth message includes the identification of the application program; the first network device obtains the first network device according to the identification of the application program and the routing table entry The egress port; the first network device sends the eighth packet through the egress port of the first network device. Since the outgoing port of the routing table entry leads to the target device, the purpose of sending the message from the terminal device to the target device is realized.
  • the routing table entry further includes the network performance of the path.
  • the first network device determining the next hop device on the path to the target device according to the identifier of the target instance includes: the first network device obtains the network performance of the path; The network device determines the next hop device on the path to the target device according to the network performance of the path and the identification of the target instance. Since the routing table entry includes the network performance corresponding to the outgoing port, it is possible to provide the terminal device with a path that reaches the target device and meets a certain network performance to forward packets to the terminal device, thereby improving user experience.
  • the method further includes: the first network device receives a ninth message from the terminal device, where the ninth message includes the identification of the application and the network performance requirements of the application; the first network device according to the identification of the application, the application The network performance requirements and routing table entries of the program are obtained to obtain the outgoing port of the first network device, and the network performance of the path corresponding to the outgoing port matches the network performance demand of the application; the first network device passes the first network device's The outgoing port sends the ninth packet.
  • the routing table entry further includes a weight value determined according to the computing capability of the target device, and the weight value is used to identify the probability of using the egress port to send a message to the target device.
  • the purpose of load sharing can be achieved under the premise of ensuring the computing capabilities of the devices.
  • the embodiments of the present application also provide a message sending method, which can be applied to a terminal device, and specifically includes the following steps: First, the terminal device sends an application processing request to the first device, and the application processing request includes an application program Uniform resource locator (URL).
  • the first device may be a domain name system (DNS) or a load balancer (LB) or a first network device, and the first network device may be a head node in a network topology.
  • DNS domain name system
  • LB load balancer
  • the terminal device receives the identifier of the application program corresponding to the URL of the application program sent by the first device. The identification of the application is carried in the destination address field of the message.
  • the terminal device sends a message to the first network device, and the message includes the identifier of the application program. Since the first network device stores a routing table entry, the routing table entry includes the identification of the application program and the outgoing port, and the outgoing port leads to the target device. Therefore, the target device is a device that meets preset conditions, that is, one with strong computing power. Therefore, the message can be processed relatively quickly, so that the message processing efficiency is higher and the user experience is higher.
  • the embodiments of the present application also provide a sending method, which may be applied to a first device, and the first device may be a DNS, an LB, or an edge network device connected to a terminal device. Specifically, it includes the following steps: First, the first device receives an application processing request from the terminal device, and the application processing request carries the URL of the application program. Secondly, the first device obtains the identification of the application according to the URL of the application and the mapping relationship, and the mapping relationship includes the URL of the application and the identification of the application. Finally, the first device sends the identification of the application program to the terminal device. The first device sends the identification of the application to the terminal device, so that the terminal device can send a message carrying the identification of the application, and the network topology forwards the message to a target device with strong computing capabilities, thereby improving user experience the goal of.
  • the embodiment of the present application also provides a routing table entry obtaining device, the routing table entry obtaining device is applied to a first network device, and the routing table entry obtaining device includes: a first obtaining unit, configured to obtain the identifier of the application program , The computing power of the first device running the application program and the computing power of the second device running the application program; the determining unit is used to determine the computing power to meet the preset condition based on the computing power of the first device and the computing power of the second device The device is determined as the target device; the second acquiring unit is used to acquire the identification of the target instance, the identification of the target instance is used to identify the instance of the application program running on the target device; the generating unit is used to obtain the identification of the application program and the identification of the target instance
  • the routing table entry includes the identification of the application program and the outgoing port of the device for obtaining the routing table entry.
  • the outgoing port of the device for obtaining the routing table entry is a port determined according to the identifier of the target instance.
  • the device for obtaining routing entries is connected to the first device and the second device;
  • the first acquiring unit is configured to receive a first message from the first device, the first message including the computing capability of the first device and the identification of the application program, and to receive the second message from the second device, the second message
  • the text includes the computing power of the second device and the identification of the application.
  • the device for obtaining routing entries is connected to the first device;
  • the first acquiring unit is configured to receive a third message from the first device, the third message including the computing capability of the first device and the identification of the application program, and to receive the fourth message from the second network device of the same network topology
  • the fourth message includes the computing capability of the second device and the identification of the application program.
  • the routing table entry obtaining device is connected to the virtual router, and the first obtaining unit is configured to receive a fifth packet sent by the virtual router.
  • the fifth packet includes the identifier of the application, the computing capability of the first device, and the second The computing power of the device.
  • the routing table entry obtaining device further includes: a first sending unit, configured to send a sixth packet to a third network device in the same network topology, the sixth packet including the identifier of the application program and the calculation of the first device And the computing power of the second device.
  • a first sending unit configured to send a sixth packet to a third network device in the same network topology, the sixth packet including the identifier of the application program and the calculation of the first device And the computing power of the second device.
  • the routing table entry obtaining device further includes: a second sending unit, configured to send a seventh packet to a fourth network device in the same network topology, the seventh packet including the identifier of the application program and the calculation of the first device ability.
  • a second sending unit configured to send a seventh packet to a fourth network device in the same network topology, the seventh packet including the identifier of the application program and the calculation of the first device ability.
  • the generating unit is configured to determine the next hop device on the path to the target device according to the identifier of the target instance, and obtain the routing table entry according to the next hop device on the path to the target device.
  • the outgoing port for communication with the next-hop device.
  • the apparatus for obtaining routing table entries further includes: a first receiving unit, configured to receive an eighth message from a terminal device, the eighth message including an application program identifier;
  • the identification and routing table entry obtain the outgoing port of the first network device;
  • the third sending unit is configured to send the eighth packet through the outgoing port of the first network device.
  • the routing table entry further includes the network performance of the path
  • the generating unit is specifically configured to: obtain the network performance of the path; determine the next hop on the path to the target device according to the network performance of the path and the identifier of the target instance equipment.
  • the routing table entry obtaining device further includes: a second receiving unit, configured to receive a ninth message from the terminal device, the ninth message including the identification of the application program and the network performance requirements of the application program; and the fourth acquiring unit , Used to obtain the outgoing port of the routing table entry acquisition device according to the identification of the application, the network performance requirements of the application and the routing table entries, and the network performance of the path corresponding to the outgoing port matches the network performance requirements of the application ; The fourth sending unit is used to send the ninth message through the outgoing port of the routing table entry obtaining device.
  • the routing table entry further includes a weight value determined according to the computing capability of the target device, and the weight value is used to identify the probability of using the egress port to send a message to the target device.
  • an embodiment of the present application also provides a message sending device, which can be applied to a terminal device, and specifically includes: a first sending unit, configured to send an application processing request to the first device, and the application processing request includes an application The URL of the program; the receiving unit is configured to receive the identifier of the application program corresponding to the URL of the application program sent by the first device.
  • the second sending unit is configured to send a message to the first network device, where the message includes the identifier of the application program.
  • the first device is DNS, LB, or the first network device.
  • an embodiment of the present application also provides a sending device, which can be applied to the first device.
  • the sending device specifically includes: a receiving unit for receiving an application processing request from a terminal device, and the application processing request carries the URL of the application program.
  • the obtaining unit is used to obtain the identification of the application according to the URL of the application and the mapping relationship, and the mapping relationship includes the URL of the application and the identification of the application.
  • the sending unit is used to send the identification of the application program to the terminal device.
  • the first device is DNS, LB, or an edge network device connected to the terminal device.
  • Figure 1 is a schematic structural diagram of a network system provided by an embodiment of the application.
  • FIG. 2 is a flowchart of a method for obtaining routing entries according to an embodiment of the application
  • FIG. 3 is a structural block diagram of a device for obtaining routing entries according to an embodiment of the application
  • FIG. 4 is a structural block diagram of a message sending device provided by an embodiment of the application.
  • FIG. 5 is a structural block diagram of a sending device provided by an embodiment of this application.
  • FIG. 6 is a structural block diagram of a network device provided by an embodiment of this application.
  • FIG. 7 is a structural block diagram of a message sending device provided by an embodiment of the application.
  • FIG. 8 is a structural block diagram of a sending device provided by an embodiment of the application.
  • the device that runs the application program may be a device such as a virtual machine, a server, or a container.
  • the device running the application program is described by taking a virtual machine as an example.
  • the network system includes virtual machine 101, virtual machine 102, virtual machine 103, virtual machine 104, virtual machine 105, network device 111, network device 112, network device 113, network device 114, network device 115, network device 116 and terminal equipment 121.
  • the virtual machine 101, the virtual machine 102, and the virtual machine 103 are all connected to the network device 111.
  • Both the virtual machine 104 and the virtual machine 105 are connected to the network device 114.
  • the network device 111 is connected to the network device 112 and the network device 114 respectively.
  • the network device 112 is connected to the network device 113 and the network device 115 respectively.
  • the network device 114 is connected to the network device 115.
  • the network device 113 is connected to the network device 116.
  • the network device 116 is connected to the terminal device 121.
  • connection between the virtual machine and the network device may be a direct connection or an indirect connection.
  • the indirect connection between the virtual machine and the network device may be that the virtual machine connects to the network device through a device such as a gateway.
  • the connection between the network device and the terminal device can be a direct connection or an indirect connection.
  • the indirect connection between the network device and the terminal device may be that the network device connects to the terminal device through a customer edge (customer edge, CE) device.
  • any network device in FIG. 1 may be a device such as a router or a three-layer switch.
  • the network device 111 and the network device 114 are edge network devices connected to the virtual machine, for example, the network device 111 and the network device 114 are operator edge (provider edge, PE) devices.
  • the network device 112, the network device 113, the network device 115, and the network device 116 are non-edge network devices.
  • the network device 112, the network device 113, the network device 115, and the network device 116 are provider (P) devices.
  • the network device 116 may be connected to the terminal device 121 through a user edge device.
  • the terminal device 121 may be a mobile phone or a personal computer (personal computer, PC).
  • the personal computer may be a tablet (personal computer, Tablet PC), a notebook computer, an ultra-mobile personal computer, a personal digital assistant, and so on.
  • An application program is installed on the terminal device 121.
  • the application program may be, for example, an APP related to games, videos, emails, instant messaging, traffic information, weather forecasts, etc.
  • One or more application program instances of the same application program are deployed on the virtual machine 101, the virtual machine 102, the virtual machine 103, the virtual machine 104, and the virtual machine 105.
  • Different virtual machines deploy different application instances.
  • Multiple virtual machines connected to the same network device can be deployed on one server or on multiple servers.
  • the virtual machine 101, the virtual machine 102, and the virtual machine 103 may be deployed on the same server, or may be deployed on different servers.
  • the virtual machine 104 and the virtual machine 105 may be deployed on the same server, or may be deployed on different servers.
  • FIG. 2 is a flowchart of a method for obtaining routing table entries according to an embodiment of the application.
  • the method for obtaining routing table entries provided in the embodiment of the present application may be executed by the first network device.
  • the first network device may be any network device in FIG. 1.
  • the first network device may be an edge network device connected to the virtual machine, such as the network device 111 or the network device 114.
  • the first network device may also be other network devices other than the edge network device connected to the virtual machine in the network topology, such as the network device 112, the network device 113, the network device 115, or the network device 116.
  • the specific details of the edge network device connected to the virtual machine and other network devices when executing the method are somewhat different, which will be described in detail below.
  • the first network device obtains the identifier of the application program, the computing capability of the first device, and the computing capability of the second device, where both the first device and the second device are used to run the application program.
  • the computing power of the first device and the computing power of the second device include, for example, the load, the number of cores of the central processing unit (CPU), and the number of random access memory (RAM).
  • the size, etc. is not specifically limited in the embodiment of the present application.
  • the first device may be a virtual machine, server, or container.
  • the second device may be a virtual machine, server, or container.
  • the identifier of the application program is used to identify the application program, such as a protocol feature word or an application feature code (attribute code) of the application program, etc., which is not specifically limited in the embodiment of the present application.
  • the identification of the application program may be a segment identification (SID).
  • the first network device is the edge network device connected to the virtual machine in FIG. 1, such as the network device 111 and the network device 114, the first network device can have three implementation methods to obtain the first device Computing power, computing power of the second device, and identification of the application.
  • the first possible implementation manner the first network device is connected to the first device and the second device respectively.
  • the first network device is the network device 111, the first device is the virtual machine 101 in FIG. 1, and the second device is the virtual machine 102 in FIG.
  • the obtaining by the first network device of the identification of the application program, the computing capability of the first device, and the computing capability of the second device includes: the first network device receives a first message from the first device, and the first message Including the computing capability of the first device and the identifier of the application; the first network device receives a second message from the second device, the second message including the computing of the second device Capabilities and the identification of the application.
  • the first network device is connected to one of the first device and the second device. If the first network device is the network device 111 in FIG. 1, the first device is the virtual machine 101 in FIG. 1, and the second device is the virtual machine 104 in FIG. 1. If the first network device is the network device 114 in FIG. 1, the first device is the virtual machine 102 in FIG. 1, and the second device is the virtual machine 104 in FIG.
  • the first network device If the first network device is connected to the first device, the first network device acquiring the application identifier, the computing capability of the first device, and the computing capability of the second device includes: the first network device receives from the first device The third message of the first message includes the computing capability of the first device and the identification of the application; the first network device receives a fourth message from a second network device of the same network topology , The second message includes the computing capability of the second device and the identification of the application program.
  • the first network device If the first network device is connected to the second device, the first network device acquiring the application identifier, the computing capability of the first device, and the computing capability of the second device includes: the first network device receives from the second device The tenth message includes the computing capability of the first device and the identification of the application; the first network device receives the eleventh message from the fifth network device of the same network topology The eleventh message includes the computing capability of the second device and the identification of the application program.
  • the second network device may be the network device 114.
  • the first network device is connected to a virtual router (virtual router, VRouter).
  • the virtual router may be connected to the first device and the second device through a virtual supervisor (hypervisor).
  • the virtual supervisor obtains the computing power of the first device, the computing power of the second device, and the identification of the application program.
  • the virtual supervisor sends the computing capability of the first device, the computing capability of the second device, and the identification of the application program to the virtual router, and then sends it to the first network device through the virtual router.
  • the first network device's acquisition of the identifier of the application, the computing capability of the first device, and the computing capability of the second device includes: the first network device receives a fifth packet sent by the virtual router, the fifth packet including The identification of the application, the computing capability of the first device, and the computing capability of the second device.
  • the first device may be a first virtual machine
  • the second device may be a second virtual machine.
  • the computing capability of the first device, the computing capability of the second device, and the identification of the application program can all be carried in the type-length-value (TLV) field of the corresponding message.
  • the first to seventh messages may be interior gateway protocol (IGP) messages, or border gateway protocol (border gateway protocol, BGP) messages.
  • the first network device after receiving the computing capability of the first device, the computing capability of the second device, and the identification of the application program, the first network device can send information to the same network topology
  • the other network devices in the send the above-mentioned parameters or packets carrying the above-mentioned parameters.
  • a first network device sends a sixth message to a third network device in the same network topology, where the sixth message includes the identifier of the application, the computing capability of the first device, and the information of the second device.
  • the computing capability of the first device, the computing capability of the second device, and the identification of the application program may be carried in the TLV field of the sixth packet.
  • the sixth message can be an IGP message or a BGP message.
  • the third network device After receiving the sixth message, the third network device sends the application identifier, the computing capability of the first device, and the other network devices in the same network topology to other network devices in the same network topology.
  • the computing power of the second device so that each network device in the network topology can obtain the application identifier, the computing power of the first device, and the computing power of the second device through this flooding method .
  • the third network device may be a network device connected to the terminal device, that is, the head node.
  • the first network device may send to other network devices in the same network topology after receiving the identification of the application and one of the computing capability of the first device and the computing capability of the second device The parameters received. For example, if the first network device is connected to the first device, the first network device sends a seventh packet to the fourth network device in the same network topology, where the seventh packet includes the identification of the application program And the computing power of the first device. If the first network device is connected to the second device, the first network device sends a twelfth message to the sixth network device in the same network topology, and the twelfth message includes the information of the application Identify and the computing capability of the second device.
  • the computing capability of the first device and the identification of the application program may be carried in the TLV field of the seventh message.
  • the identifier of the application program and the computing capability of the second device may be carried in the TLV field of the twelfth message.
  • the seventh message and the twelfth message can be IGP messages or BGP messages.
  • the fourth network device sends the application identifier and the computing capability of the first device to other network devices in the same network topology, so that Each network device in the network topology can obtain the computing power of the first device and the identification of the application program through this flooding method.
  • the seventh message is a BGP message
  • the fourth network device may be a network device connected to the terminal device, that is, the head node.
  • the sixth network device after receiving the twelfth message, sends the identification of the application and the second device to other network devices in the same network topology.
  • the sixth network device may be a network device connected to the terminal device, that is, the head node.
  • the above is the specific details of the edge network device connected to the device performing S201. As other network devices in the network topology that are not connected to the device, when S201 is specifically executed, it is to receive data from the edge network connected to the device.
  • the first network device determines a device whose computing capability meets a preset condition as a target device according to the computing capability of the first device and the computing capability of the second device.
  • the first network device in the network topology obtains the computing capability of the first device connected to the network topology and the computing capability of the second device, it can be based on the computing capability of the first device
  • the capability and the computing capability of the second device determine the target device whose computing capability meets the preset condition.
  • the first network device here may be an edge network device connected to the first device and/or the second device, or may be a network device connected to the edge network device.
  • the preset condition can be determined according to the threshold of the computing power. For example, if the computing capability includes load, the preset condition may be that the load is less than or equal to 50%; if the computing capability includes the number of CPU cores, the preset condition may be, for example, the number of CPU cores is greater than or equal to four. A; if the computing capability includes the size of the RAM, the preset condition may be that the size of the RAM is greater than or equal to 100 megabytes, for example.
  • the preset condition may also be determined according to the computing capability of the first device and the computing capability of the second device. That is, the first network device can also sort according to the computing capabilities of each device, and then select the top N devices as the target device.
  • the corresponding score can be calculated for each device according to the computing power of each device. The higher the score, the higher the computing power of the device, and the lower the score, the lower the computing power of the device. Then, the computing capabilities of the devices are sorted according to the score corresponding to each device, and then the top N devices are selected as the target device, or the device with the score greater than or equal to the preset score is selected as the target device.
  • N is an integer greater than or equal to 1.
  • the first network device obtains an identifier of a target instance, where the identifier of the target instance is used to identify the instance of the application program running on the target device.
  • the identifier of the target instance may be, for example, the internet protocol (IP) address of the target instance.
  • IP internet protocol
  • the IP address of the target instance may be the IP address of the target device.
  • the identification of the target instance may be the SID.
  • the target device includes target device 1 and target device 2, target device 1 runs target instance 1 of application A, and the target device runs target instance 2 of application A, then the identifier of target instance 1 may be the IP of target device 1. Address, the identifier of the target instance 2 may be the IP address of the target device 2.
  • the identifier of the target instance may also be other types of identifiers, which can be determined by those skilled in the art according to actual conditions.
  • the first network device acquires the identifier of the target instance, which may be acquired after the target device is determined, or may be acquired before the target device is determined.
  • the first network device may send an identity acquisition request to the target device or the virtual router connected to the target device, and receive the identity acquisition request sent by the target device or the virtual router connected to the target device to the first network device according to the identity acquisition request The ID of the target instance.
  • the identifier of the target instance that each first network device needs to obtain is also the same. Therefore, after the edge network device connected to the target device obtains the identification of the target instance, it can send the identification of the target instance to other network devices in the network topology by flooding, so that each network device can obtain the target The ID of the instance.
  • the network device 114 may send an identification acquisition request to the virtual machine 104, and receive the virtual machine 104 running according to the identification acquisition request sent by the virtual machine 104 The ID of the target instance. After the network device 114 obtains the identifier of the target instance, it can send the identifier of the target instance to other network devices in the network topology by flooding, so that both the network device 111 and the network device 116 obtain the identifier of the target instance.
  • the identifier of the target instance can be carried in a message sent from the target device or a virtual router connected to the target device that carries the identifier of the application and the computing capability of the target device. That is, when the target device or the virtual router connected to the target device sends a message carrying the identification of the application program and the computing capability of the target device to the first network device, it also carries the identification of the target instance in the TLV field of the message. send. Specifically, the message carrying the computing capability of the first device also carries the identifier of the instance of the application running by the first device. The message carrying the computing capability of the second device also carries the identifier of the instance of the application running on the second device.
  • the identification of the target instance can be determined from the identification of the instance of the application program running on the first device and the identification of the instance of the application program running on the second device.
  • the first network device may send it to other network devices in the network topology in a flooding manner.
  • the specific process is similar to flooding the computing capability of the first device, the computing capability of the second device, and the identification of the application program, and will not be repeated here.
  • the first network device generates a routing table entry, the routing table entry includes the identifier of the application program and an egress port, and the egress port can communicate with the next hop device in the path to the target device.
  • the first network device if the first network device is an edge network device connected to the first device and/or the second device, the first network device generates according to the identifier of the target instance and the identifier of the application program Routing table entry. Specifically, the first network device may obtain a path from the edge network device to the target device according to the identifier of the target instance. And according to the path, the outgoing port of the first network device is determined, and the outgoing port is the communication port between the first network device and the next-hop device in the path to the target device. Then, the first network device obtains the routing table entry according to the identification of the outbound port and the application program.
  • the target device is the virtual machine 104
  • the network device 114 is an edge network device connected to the virtual machine 104.
  • the network device 114 obtains a path from the network device 114 to the virtual machine 104 according to the identifier of the target instance running by the virtual machine 104.
  • the network device 114 determines the outgoing port of the network device 114 according to the obtained path, and the outgoing port is a port for the network device 114 to communicate with the next-hop device in the path.
  • the network device 114 obtains the routing table entry of the network device 114 according to the identification of the outgoing port and the application program.
  • the target device is the virtual machine 104
  • the network device 112 obtains a path from the network device 112 to the virtual machine 104 according to the identifier of the target instance running by the virtual machine 104.
  • the path is network device 112->network device 111->network device 114.
  • the network device 112 determines the port of the network device 112 to communicate with the next hop device in the path, that is, the network device 111 according to the path.
  • the network device 112 uses the obtained port as the outgoing port.
  • the network device 112 obtains the routing table entry of the network device 112 according to the identification of the outgoing port and the application program.
  • the method for obtaining the routing table entries of the network device 111, the network device 113, and the network device 115-the network device 116 is basically the same as that of the network device 112, and will not be repeated here.
  • the entry included in Table 1 is an example of a routing entry to the first device.
  • APP ID corresponds to an egress port 1, where egress port 1 can reach the first device.
  • the path for the first network device to reach a target device may be one or multiple. If there are multiple, the shortest path can be selected, or the path that meets the network performance requirements of the application can be determined according to the network performance of the path, and the corresponding outgoing port can be reached according to the selected or determined path.
  • the network performance requirements of the application can be reflected in one of the information such as bandwidth, latency, jitter, packet loss, reliability, and security. Or multiple.
  • the manifestation of the application's network performance requirements can be the specific values of information such as bandwidth and delay (for example, what is the minimum bandwidth, what is the upper limit of the delay, etc.), or it can be a service level agreement that represents information such as bandwidth and delay (service level agreement, SLA), can also be the path attribute of the path calculation algorithm.
  • SLA stipulates multi-dimensional network performance requirements, such as a bandwidth of 150M, a maximum delay of 5ms, and a delay jitter of +/-2ms.
  • Path attributes can be represented by colors. For example, red indicates that the network performance requirement information of the application is high bandwidth, and blue indicates that the network performance requirement information of the application is low latency.
  • SLA can also be expressed by color, for example, red SLA indicates high bandwidth and low latency, or blue SLA indicates low bandwidth. It should be noted that in the embodiments of the present application, “high” and “low” are relative terms, and how high is high and how low is low is determined by those skilled in the art.
  • the routing table entry can also include the network performance of the path.
  • the entry included in Table 2 is an example of a routing entry to the second device.
  • APP ID corresponds to three outgoing ports, namely outgoing port 2, outgoing port 3, and outgoing port 4.
  • Different egress ports correspond to paths with different network performance. All three outlet ports can reach the second device.
  • the outgoing port may be a physical port or a logical port. If it is a logical port, the tunnel identifier can be used to identify the out port. The tunnel identifier is used to identify the tunnel.
  • egress port 2 can be represented by tunnel identifier 1
  • egress port 3 can be represented by tunnel identifier 2
  • egress port 4 can be represented by tunnel identifier 3.
  • the routing table entry may further include a weight value determined according to the computing capability of the target device, and the weight value is used to identify the probability of using the egress port to send a message to the target device.
  • the weight value is used to indicate the load sharing capabilities of multiple target devices. In practical applications, the weight value can be determined according to the computing power of the target device.
  • the entries included in Table 3 are an example of routing entries to the first device and the second device.
  • APP ID corresponds to two outgoing ports, namely outgoing port 5 and outgoing port 6.
  • the outlet port 5 can reach the first device, and the outlet port 6 can reach the second device.
  • the weight value corresponding to out port 5 is 60%
  • the weight value corresponding to out port 6 is 40%, that is, the first network device receives Among the received messages from the terminal device that include the APP ID in Table 3 (for example, the eighth message below), 60% of the messages arrive at the first device, and 40% of the messages arrive at the second device.
  • the purpose of load sharing is
  • the first network device can perform S204 and S205 accordingly. If the routing table entry includes the identification of the application program, the outgoing port and the network performance of the path, such as the routing table entry shown in Table 2, the first network device can execute S205' and S206'.
  • the first network device receives the eighth message from the terminal device, and determines the corresponding egress port according to the identifier of the application program and the routing table entry included in the eighth message.
  • the identifier of the application program may be carried in the destination address field of the eighth packet.
  • the eighth message may be, for example, a fourth version (Internet Protocol version 4, IPv4) message or a sixth version (Internet Protocol version 6, IPv6) message. If it is an IPv6 message, specifically, it may be a segment routing (segment routing version 6, SRv6) message in the IPv6 message.
  • S206 The first network device sends the eighth packet through the outgoing port of the first network device.
  • the first network device receives the ninth packet from the terminal device, and obtains the first network device according to the identification of the application program included in the ninth packet, the network performance requirements of the application program, and the routing table entry. An out port of a network device.
  • the identifier of the application program and the network performance requirement of the application program may be carried in the destination address field of the ninth packet.
  • the ninth message may be, for example, an IPv4 message or an IPv6 message. If it is an IPv6 message, specifically, it may be an SRv6 message.
  • the network performance of the path corresponding to the egress port determined by the first network device matches the network performance requirement of the application program.
  • the network performance requirement of the application carried in the ninth message is bandwidth>20Mbit/s.
  • the first network device can select the network performance and the application
  • the egress port corresponding to the path matching the network performance requirement of the network performance requirement, that is, egress port 2 sends the ninth packet.
  • S206' The first network device sends the ninth packet through the outgoing port of the first network device.
  • the terminal device may have multiple ways to obtain the identification of the application program.
  • the terminal device may be configured with an application program identifier.
  • the terminal device can obtain applications from the domain name system (DNS) or load balancer (LB) or the head node of the network topology (for example, the network device 116 in FIG. 1) The ID of the program.
  • DNS domain name system
  • LB load balancer
  • the terminal device may send a service processing request to the DNS or LB or the head node, and the service processing request carries the uniform resource locator (URL) of the application program.
  • the mapping relationship between the URL of the application and the identifier of the application is pre-stored in the DNS or LB or the head node.
  • the corresponding URL can be determined according to the URL in the service processing request and the mapping relationship.
  • the identification of the application program and sent to the terminal device.
  • the manner in which the terminal device obtains the network demand performance of the application program can also refer to the above two possible implementation manners, which will not be repeated here.
  • the first network device in the embodiment of the application obtains the identification of the application program, the computing capability of the first device running the application program, and the computing capability of the second device running the application program, and then according to the computing capability of the first device
  • the computing power of the second device and the computing power of the second device determine the device whose computing power meets the preset condition as the target device, and then according to the identification of the application and the identification of the target instance of the application running on the target device, Generate routing table entries.
  • the first network device receives the message from the terminal device, it can forward the message to the target device according to the routing table entry, and the target device can process the message. Since the target device is a device that satisfies the preset conditions, that is, a device with strong computing capability, it can process the message relatively quickly, thereby having a higher message processing efficiency and a higher user experience.
  • the device guarantees the processing of messages with high reliability.
  • the following takes the network system of Figure 1 and the application scenario of the network topology running the IGP protocol as an example to introduce the above routing table entry generation method.
  • the network device 111 receives packets from the virtual machine 101, the virtual machine 102, and the virtual machine 103, and the network device 114 receives packets from the virtual machine 104 and the virtual machine 105, respectively.
  • the message from the virtual machine 101 includes the identity of the application A, the computing capability of the virtual machine 101, and the identity of the instance 1 of the application A running on the virtual machine 101;
  • the message from the virtual machine 102 includes the application A
  • the message from the virtual machine 103 includes the identification of the application A, the computing power of the virtual machine 103, and the running of the virtual machine 103
  • the message from virtual machine 104 includes the identity of application A, the computing power of virtual machine 104, and the identity of instance 4 of application A running on virtual machine 104; from virtual machine 105
  • the message of includes the identification of application A, the computing capability of virtual machine 105, and the identification of instance 5 of application A running by virtual machine 105.
  • the network device 111 floods the identity of the application A, the computing power of the virtual machine 101, the computing power of the virtual machine 102, the computing power of the virtual machine 103, the identifier of the instance 1 and the status of the instance 2 in the network topology based on the IGP protocol.
  • the identification and the identification of the instance 3, the network device 114 floods the identification of the application A, the computing power of the virtual machine 104, the computing power of the virtual machine 105, the identification of the instance 4 and the identification of the instance 5 in the network topology to make the network topology
  • Each network device in the can obtain the identity of application A, the computing power of virtual machine 101, the computing power of virtual machine 102, the computing power of virtual machine 103, the computing power of virtual machine 104, and the computing power of virtual machine 105 ,
  • the identification of instance 1 the identification of instance 2, the identification of instance 3, the identification of instance 4, and the identification of instance 5.
  • the network device 111 sends the identification of the application A, the computing power of the virtual machine 101, the computing power of the virtual machine 102, and the computing power of the virtual machine 103 to the head node connected to the terminal device 121, that is, the network device 116 Capability, the identification of instance 1, the identification of instance 2, and the identification of instance 3; the network device 114 sends the identification of application A, the computing power of the virtual machine 104, and the virtual machine to the head node connected to the terminal device 121, that is, the network device 116 105, the identification of instance 4, and the identification of instance 5, so that the network device 116 can obtain the identification of application A, the computing power of virtual machine 101, the computing power of virtual machine 102, the computing power of virtual machine 103, the virtual The computing power of the machine 104, the computing power of the virtual machine 105, the identification of instance 1, the identification of instance 2, the identification of instance 3, the identification of instance 4, and the identification of instance 5.
  • the network device 111 and the network device 114 may respectively establish a BGP session with the network device 116 before sending the above information to the head node connected to the terminal device 121, that is, the network device 116.
  • S303 Obtain the identification of application A, the computing power of virtual machine 101, the computing power of virtual machine 102, the computing power of virtual machine 103, the computing power of virtual machine 104, the computing power of virtual machine 105, the identification of instance 1,
  • the identification of instance 2, the identification of instance 3, the identification of instance 4, and the identification of instance 5 network devices, such as all network devices or network devices 116 in the network topology, are determined from the above five virtual machines to meet the preset computing capabilities Conditional target virtual machines, for example, virtual machine 101, virtual machine 104, and virtual machine 105, and determine the egress port to virtual machine 101 according to the identifier of instance 1, and determine the egress port to virtual machine 104 according to the identifier of instance 4, and
  • the egress port to the virtual machine 105 is determined according to the identifier of Example 5.
  • the corresponding routing table entry is obtained according to the above-mentioned out port and the identification of the application A.
  • the network device 116 determines the outgoing port to the virtual machine 101 according to the identifier of the example 1, determines the outgoing port to the virtual machine 104 according to the identifier of the example 4, and determines the outgoing port to the virtual machine 105 according to the identifier of the example 5 to be connected to the network. If the device 113 is connected to the outgoing port a, the network device 116 can generate the routing table entries in the following Table 4:
  • the corresponding weight values can be obtained as 40%, 30%, and 30%, respectively. Therefore, the weight value corresponding to the egress port a is the sum of these three weight values, that is, 100%. That is to say, all the messages about the application A from the terminal device are sent to the next hop device, that is, the network device 113 through the port a.
  • the network device 111 determines the egress port to the virtual machine 101 as egress port b according to the identifier of example 1, determines the egress port to the virtual machine 104 according to the identifier of example 4, and determines the egress port to the virtual machine 105 according to the identifier of example 5.
  • the ports are all the outgoing port c connected to the network device 114, and the network device 111 can generate the routing table entries in the following Table 5:
  • the egress port b can reach the virtual machine 101, its corresponding weight value is 40%. Since the egress port c can reach the virtual machine 104 and the virtual machine 105, its corresponding weight is 60% (30%+30%). In other words, 40% of the messages about the application A from the terminal device are sent to the virtual machine 101 through the out port b, and 60% are sent to the virtual machine 104 and the virtual machine 105 through the out port c.
  • the network device 116 receives a message from the terminal device 121, and the message includes the identifier of the application A.
  • the network device 116 finds the corresponding egress port, that is, the egress port a, according to its corresponding routing table entry, and sends the message to the network device 113.
  • the network device 113 sends the message to the network device 112, and the network device 112 sends the message to the network device 111.
  • the network device 111 has a 40% probability of sending a message through the out port b, and a 60% probability of sending a message out through the out port c, so as to achieve the purpose of load sharing while ensuring the computing capability of the virtual machine.
  • an embodiment of the present application also provides a routing table entry obtaining apparatus 300, which is applied to a first network device.
  • the routing table entry obtaining device 300 includes: a first obtaining unit 301, a determining unit 302, a second obtaining unit 303, and a generating unit 304.
  • the first acquiring unit 301 is configured to execute S201 in the embodiment shown in FIG. 2.
  • the determining unit 302 is configured to execute S202 in the embodiment shown in FIG. 2.
  • the second acquiring unit 303 is configured to execute S203 in the embodiment shown in FIG. 2.
  • the generating unit 304 is configured to execute S204 in the embodiment shown in FIG. 2.
  • the first obtaining unit 301 is configured to obtain the identification of the application, the computing capability of the first device that runs the application, and the computing capability of the second device that runs the application;
  • the determining unit 302 is configured to determine a device whose computing capability meets a preset condition as a target device according to the computing capability of the first device and the computing capability of the second device;
  • the second acquiring unit 303 is configured to acquire the identifier of the target instance, and the identifier of the target instance is used to identify the instance of the application program running on the target device;
  • the generating unit 304 is configured to generate a routing table entry according to the identification of the application program and the identification of the target instance.
  • the routing table entry includes the identification of the application and the outgoing port of the device for obtaining the routing table entry, and the outgoing port of the device for obtaining the routing table entry is based on For the port determined by the identifier of the target instance, the outgoing port of the device for obtaining routing table entries can communicate with the next-hop device on the path to the target device.
  • the routing table entry obtaining apparatus 300 can realize the function of the first network device in the method embodiment in FIG. 2. For specific execution steps, please refer to the foregoing method embodiment, which will not be repeated here.
  • an embodiment of the present application also provides a message sending apparatus 400, which may be applied to terminal equipment.
  • the message sending apparatus 400 can realize the function of the terminal device in the embodiment shown in FIG. 2.
  • the message sending device 400 includes: a first sending unit 401, a receiving unit 402, and a second sending unit 403.
  • the first sending unit 401 is configured to send an application processing request to the first device, and the application processing request includes the URL of the application;
  • the receiving unit 402 is configured to receive the URL of the application corresponding to the URL of the application sent by the first device.
  • the second sending unit 403 is used to send a message to the routing table entry obtaining device, and the message includes the identification of the application.
  • the message sending apparatus 400 can realize the function of the terminal device in the method embodiment in FIG. 2. For specific execution steps, please refer to the foregoing method embodiment, and details are not described herein again.
  • an embodiment of the present application also provides a sending device 500, which can be applied to the first device.
  • the sending apparatus 500 can implement the functions of DNS, LB or the first network device in the embodiment shown in FIG. 2.
  • the sending device 500 specifically includes: a receiving unit 501, an acquiring unit 502, and a sending unit 503.
  • the receiving unit 501 is configured to receive an application processing request from a terminal device, and the application processing request carries the URL of the application program.
  • the obtaining unit 502 is configured to obtain the identifier of the application program according to the URL of the application program and the mapping relationship.
  • the mapping relationship includes the URL of the application program and the identifier of the application program.
  • the sending unit 503 is configured to send the identifier of the application program to the terminal device.
  • the sending apparatus 500 can implement the function of the first device in the method embodiment in FIG. 2. For specific execution steps, please refer to the foregoing method embodiment, which will not be repeated here.
  • an embodiment of the present application provides a network device 600, which can implement the function of the first network device in the embodiment shown in FIGS. 2-5.
  • the network device 600 includes a memory 601, a processor 602, and a communication interface 603.
  • the memory 601 is used to store instructions; in the case of implementing the embodiment shown in FIG. 3 and each unit described in the embodiment of FIG. 3 is realized by software, the first obtaining unit 301, The software or program codes required for the functions of the determining unit 302, the second acquiring unit 303, and the generating unit 304 are stored in the memory 601.
  • the processor 602 is configured to execute instructions in the memory 601, and execute the foregoing method for obtaining routing table entries applied to the first network device in the embodiment shown in FIG. 2;
  • the communication interface 603 is used for communication.
  • the memory 601, the processor 602, and the communication interface 603 are connected to each other through a bus 604; the bus 604 may be a peripheral component interconnect standard (PCI) bus or an extended industry standard architecture (EISA) bus Wait.
  • PCI peripheral component interconnect standard
  • EISA extended industry standard architecture
  • the bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in FIG. 6, but it does not mean that there is only one bus or one type of bus.
  • the processor 601 is configured to obtain the identifier of the application program, the computing capability of the first device running the application program, and the computing capability of the second device running the application program; Computing power and computing power of the second device, determining the device whose computing power meets the preset condition as the target device; acquiring the identification of the target instance, the identification of the target instance is used to identify the application running on the target device An instance of the program; according to the identification of the application and the identification of the target instance, a routing table entry is generated, the routing table entry includes the identification of the application and the outgoing port of the network device,
  • the egress port is a port determined according to the identifier of the target instance, and the egress port of the network device can communicate with the next hop device on the path to the target device.
  • the communication interface 603 is configured to receive the identifier of the application program, the computing capability of the first device running the application program, and the computing capability of the second device running the application program.
  • the specific process please refer to the detailed description of S201 in the embodiment shown in FIG. 2, which will not be repeated here.
  • an embodiment of the present application provides a terminal device 700, which can implement the functions of the terminal device in the embodiment shown in FIGS. 2-5.
  • the terminal device 700 includes a memory 701, a processor 702, and a communication interface 703.
  • the memory 701 is used to store instructions; in the case of implementing the embodiment shown in FIG. 4 and the units described in the embodiment of FIG. 4 are realized by software, the first sending unit 401, The software or program codes required for the functions of the receiving unit 402 and the second sending unit 403 are stored in the memory 701.
  • the processor 702 is configured to execute instructions in the memory 701, and execute the foregoing message sending method applied to the terminal device in the embodiment shown in FIG. 2;
  • the communication interface 703 is used for communication.
  • the memory 701, the processor 702, and the communication interface 703 are connected to each other through a bus 704; the bus 704 may be a peripheral component interconnect standard (PCI) bus or an extended industry standard architecture (EISA) bus Wait.
  • PCI peripheral component interconnect standard
  • EISA extended industry standard architecture
  • the bus can be divided into address bus, data bus, control bus, etc. For ease of presentation, only one thick line is used in FIG. 7, but it does not mean that there is only one bus or one type of bus.
  • the communication interface 703 is used to send an application processing request to the first device, the application processing request includes the URL of the application, receiving the identifier of the application corresponding to the URL of the application sent by the first device, and sending the request to the first device.
  • the network device sends a message, and the message includes the identification of the application.
  • an embodiment of the present application provides a device 800, which can implement the functions of the first device in the embodiment shown in FIGS. 2-5.
  • the device 800 includes a memory 801, a processor 802, and a communication interface 803.
  • the memory 801 is used to store instructions; in the case of implementing the embodiment shown in FIG. 5 and the units described in the embodiment in FIG. 5 are realized by software, the receiving unit 501 and the acquiring unit in FIG. 5 are executed The software or program codes required for the functions of the 502 and the sending unit 503 are stored in the memory 801.
  • the processor 802 is configured to execute instructions in the memory 801, and execute the first sending method applied to the embodiment shown in FIG. 2;
  • the communication interface 803 is used for communication.
  • the memory 801, the processor 802 and the communication interface 803 are connected to each other through a bus 804; the bus 804 may be a peripheral component interconnect standard (PCI) bus or an extended industry standard architecture (EISA) bus Wait.
  • PCI peripheral component interconnect standard
  • EISA extended industry standard architecture
  • the bus can be divided into address bus, data bus, control bus, etc. For ease of presentation, only one thick line is used in FIG. 8 to represent, but it does not mean that there is only one bus or one type of bus.
  • the processor 801 is configured to obtain the identifier of the application program according to the URL of the application program and the mapping relationship, and the mapping relationship includes the URL of the application program and the identifier of the application program.
  • the communication interface 803 is used to send an application processing request to the first device, the application processing request includes the URL of the application, receiving the identifier of the application corresponding to the URL of the application sent by the first device, and sending a message to the first network device, The message includes the identification of the application.
  • the specific process please refer to the detailed description of the embodiment shown in FIG. 2, which will not be repeated here.
  • the memory 601, the memory 701, and the memory 801 may be random-access memory (RAM), flash memory (flash), read only memory (ROM), erasable programmable read-only memory (erasable). programmable read only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), register (register), hard disk, mobile hard disk, CD-ROM or any other known to those skilled in the art Form of storage media.
  • RAM random-access memory
  • flash flash
  • ROM read only memory
  • ROM erasable programmable read-only memory
  • EPROM erasable programmable read only memory
  • EEPROM electrically erasable programmable read-only memory
  • register register
  • hard disk hard disk
  • mobile hard disk CD-ROM or any other known to those skilled in the art Form of storage media.
  • the aforementioned processor 602, processor 702, and processor 802 may be, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (digital signal processor, DSP), and an application-specific integrated circuit (application-specific integrated circuit). circuit, ASIC), field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logical blocks, modules and circuits described in conjunction with the disclosure of this application.
  • the processor may also be a combination of computing functions, for example, a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and so on.
  • the above-mentioned communication interface 603, communication interface 703, and communication interface 803 may be, for example, an interface card, etc., and may be an Ethernet (Ethernet) interface or an asynchronous transfer mode (Asynchronous Transfer Mode, ATM) interface.
  • Ethernet Ethernet
  • asynchronous transfer mode Asynchronous Transfer Mode, ATM
  • the embodiment of the present application also provides a network system.
  • the network system includes a first network device and a terminal device.
  • the first network device in the network system is the routing table entry obtaining apparatus 300 shown in FIG. 3, and the terminal device is the message sending apparatus 400 of the embodiment shown in FIG.
  • the network system may further include a first device, and the first device may be the sending apparatus 500 in the embodiment shown in FIG. 5.
  • the embodiment of the present application also provides a computer-readable storage medium, including instructions, which when run on a computer, cause the computer to execute the foregoing method for obtaining routing table entries applied to the network device 600.
  • An embodiment of the present application also provides a computer-readable storage medium, including instructions, which when run on a computer, cause the computer to execute the foregoing message sending method applied to the terminal device 700.
  • the embodiment of the present application also provides a computer-readable storage medium, including instructions, which when run on a computer, cause the computer to execute the foregoing sending method applied to the device 800.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the units is only a logical module division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be acquired according to actual needs to achieve the objectives of the solutions of the embodiments.
  • each module unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software module unit.
  • the integrated unit is implemented in the form of a software module unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of this application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program code .
  • the functions described in the present invention can be implemented by hardware, software, firmware or any combination thereof.
  • these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on the computer-readable medium.
  • the computer-readable medium includes a computer storage medium and a communication medium, where the communication medium includes any medium that facilitates the transfer of a computer program from one place to another.
  • the storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请实施例公开了一种路由表项获得方法、装置及设备,实现为用户提供运算能力合适的装置与终端设备进行交互的目的。方法应用于第一网络设备,具体包括:获取应用程序的标识、运行应用程序的第一装置的运算能力以及运行应用程序的第二装置的运算能力;根据第一装置的运算能力和第二装置的运算能力,将运算能力满足预设条件的装置确定为目标装置;获取目标实例的标识,目标实例的标识用于标识目标装置运行的应用程序的实例;根据应用程序的标识和目标实例的标识,生成路由表项,路由表项包括应用程序的标识以及第一网络设备的出端口,第一网络设备的出端口为根据目标实例的标识确定的端口,能够与到目标装置的路径上的下一跳设备通信。

Description

一种路由表项获得方法、装置及设备
本申请要求于2019年8月2日提交中国专利局、申请号为CN 201910713391.4、发明名称为“一种路由表项获得方法、装置及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及网络领域,尤其涉及一种路由表项获得方法、装置及设备。
背景技术
应用程序(application program,APP)又称应用软件(application software,APP),是为完成某项或多项特定工作的计算机程序,通常需要与用户进行交互。应用程序通常包括客户端和服务端。其中,客户端安装在终端设备中,用于实现与用户进行交互。服务端安装在服务器中,用于响应客户端的请求以及向客户端下发软件更新内容等。
在目前的技术中,为了增强应用程序的计算能力,同一个应用程序的服务端可以部署在不同的装置中,每个装置可以运行一个或多个应用程序的实例(instance)。运行同一个应用程序的不同应用程序的实例的装置的运算能力可能不同。由于装置的运算能力直接影响该应用程序客户端的用户体验,所以,选择运算能力适合的装置以响应应用程序客户端的请求就变得非常重要。
发明内容
本申请实施例提供了一种路由表项获得方法及装置,实现为用户提供运算能力合适的装置与终端设备进行交互的目的。
第一方面,本申请实施例提供了一种路由表项获得方法,该方法可以应用于第一网络设备,第一网络设备可以是路由器或三层交换机。该方法具体包括如下步骤:首先,第一网络设备获取应用程序的标识、运行应用程序的第一装置的运算能力以及运行应用程序的第二装置的运算能力。其中,第一装置和第二装置可以为虚拟机、服务器或容器(container)。第一装置的运算能力和第二装置的运算能力例如包括负载、中央处理器(central processing unit,CPU)的核数、随机存取存储器(random access memory,RAM)的大小等其中的一项或多项,本申请实施例不做具体限定。应用程序的标识用于标识应用程序,例如应用程序的协议特征字或应用特征码(attribute code)等,本申请实施例也不做具体限定。其次,第一网络设备根据第一装置的运算能力和第二装置的运算能力,将运算能力满足预设条件的装置确定为目标装置。并且,第一网络设备获取目标实例的标识,目标实例的标识用于标识目标装置运行的应用程序的实例。最后,第一网络设备根据应用程序的标识和目标实例的标识,生成路由表项,路由表项包括应用程序的标识以及第一网络设备的出端口,第一网络设备的出端口为根据目标实例的标识确定的端口,第一网络设备的出端口能够与到目标装置的路径上的下一跳设备通信。其中,目标实例的标识可以是目标实例的互联网协议(internet protocol,IP)地址。目标实例的IP地址例如可以是虚拟机的IP地址或服务器的IP地址,或者是服务器的IP地址和服务器的端口号。
当在第一网络设备接收到来自终端设备的报文之后,能够根据该路由表项将报文转发 给目标装置,由目标装置对该报文进行处理。由于目标装置为满足预设条件的装置,即运算能力较强的装置,所以能够较为迅速的对该报文进行处理,从而有较高的报文处理效率,用户体验较高。同时,当网络拓扑中的多个网络设备都能够作为第一网络设备执行上述路由表项获得方法时,若其中部分网络设备出现故障,其他网络设备也有可能将来自终端设备的报文转发给目标装置,保证报文的处理,可靠性较高。
在本申请实施例中,第一网络设备获取应用程序的标识、运行所述应用程序的第一装置的运算能力以及运行所述应用程序的第二装置的运算能力,根据第一网络设备连接的对象的不同,有如下三种可能的实现方式:
作为其中一种可能的实现方式,第一网络设备与第一装置和第二装置连接,则第一网络设备获取应用程序的标识、运行应用程序的第一装置的运算能力以及运行应用程序的第二装置的运算能力包括:第一网络设备接收来自第一装置的第一报文,第一报文包括第一装置的运算能力以及应用程序的标识;第一网络设备接收来自第二装置的第二报文,第二报文包括第二装置的运算能力以及应用程序的标识。也就是说,当第一网络设备与第一装置和第二装置都连接的情况下,第一网络设备获取应用程序的标识、运行应用程序的第一装置的运算能力以及运行应用程序的第二装置的运算能力的方式就是接收来自第一装置的第一报文和第二装置的第二报文。
作为再一种可能的实现方式,第一网络设备与第一装置连接,则第一网络设备获取应用程序的标识、运行应用程序的第一装置的运算能力以及运行应用程序的第二装置的运算能力包括:第一网络设备接收来自第一装置的第三报文,第三报文包括第一装置的运算能力以及应用程序的标识;第一网络设备接收来自同一网络拓扑的第二网络设备的第四报文,第四报文包括第二装置的运算能力以及应用程序的标识。也就是说,如果第一网络设备只与第一装置连接,那么第一网络设备获取应用程序的标识、运行应用程序的第一装置的运算能力以及运行应用程序的第二装置的运算能力的方式就是接收来自第一装置的第三报文以及从网络拓扑中的其他网络设备,例如第二网络设备的第四报文。
当然,可以理解的是,如果第一网络设备与第二装置连接,其获取方法与第一网络设备与第一装置连接的获取方式类似。即,若第一网络设备与第二装置连接,则第一网络设备获取应用程序的标识、第一装置的运算能力以及第二装置的运算能力包括:所述第一网络设备接收来自所述第二装置的第十报文,所述第十报文包括所述第一装置的运算能力以及所述应用程序的标识;所述第一网络设备接收来自同一网络拓扑的第五网络设备的第十一报文,所述第十一报文包括所述第二装置的运算能力以及所述应用程序的标识。
作为另一种可能的实现方式,第一网络设备与虚拟路由器(virtual router,VRouter)连接,第一网络设备获取应用程序的标识、运行应用程序的第一装置的运算能力以及运行应用程序的第二装置的运算能力包括:第一网络设备接收虚拟路由器发送的第五报文,第五报文包括应用程序的标识、第一装置的运算能力以及第二装置的运算能力。也就是说,在该实现方式中,第一网络设备并不是直接与第一装置和第二装置连接,而是通过虚拟路由器进行连接。在这种情况下,由虚拟路由器收集应用程序的标识、运行应用程序的第一装置的运算能力以及运行应用程序的第二装置的运算能力,并且向第一网络设备发送。
在本申请实施例中,第一装置的运算能力、第二装置的运算能力以及应用程序的标识均可以通过携带在上述对应报文的类型长度值(type-length-value,TLV)字段中进行发送。第一报文至第七报文可以是内部网关协议(interior gateway protocol,IGP)报文,也可以 是边界网关协议(border gateway protocol,BGP)报文。
在本申请实施例中,对于第一种可能的实现方式和第三种可能的实现方式,第一网络设备在接收到第一装置的运算能力、第二装置的运算能力以及应用程序的标识之后,可以向同一网络拓扑中的其他网络设备发送上述参数或携带上述参数的报文。例如,方法还包括:第一网络设备向同一网络拓扑中的第三网络设备发送第六报文,第六报文包括应用程序的标识、第一装置的运算能力以及第二装置的运算能力。第一装置的运算能力、第二装置的运算能力以及应用程序的标识可以携带在第六报文的TLV字段中。第六报文可以是IGP报文,也可以是BGP报文。
如果第六报文是IGP报文,则第三网络设备在接收到第六报文之后,向同一网络拓扑中的其他网络设备发送应用程序的标识、所述第一装置的运算能力以及所述第二装置的运算能力,从而使网络拓扑中的每个网络设备都能够通过这种泛洪的方式获取到应用程序的标识、所述第一装置的运算能力以及所述第二装置的运算能力。如果第六报文是BGP报文,则第三网络设备可以是与终端设备连接的网络设备,即头节点。
对于第二种可能的实现方式,第一网络设备在接收到应用程序的标识和第一装置的运算能力和第二装置的运算能力中的一个之后,可以向同一网络拓扑中的其他网络设备发送所接收到的参数。例如若所述第一网络设备与所述第一装置连接,则第一网络设备向同一网络拓扑中的第四网络设备发送第七报文,所述第七报文包括所述应用程序的标识和所述第一装置的运算能力。若所述第一网络设备与所述第二装置连接,则第一网络设备向同一网络拓扑中的第六网络设备发送第十二报文,所述第十二报文包括所述应用程序的标识和所述第二装置的运算能力。第一装置的运算能力以及应用程序的标识可以携带在第七报文的TLV字段中。应用程序的标识和所述第二装置的运算能力可以携带在第十二报文的TLV字段中。第七报文和第十二报文可以是IGP报文,也可以是BGP报文。
如果第七报文是IGP报文,则第四网络设备在接收到第七报文之后,向同一网络拓扑中的其他网络设备发送应用程序的标识以及所述第一装置的运算能力,从而使网络拓扑中的每个网络设备都能够通过这种泛洪的方式获取到第一装置的运算能力以及应用程序的标识。如果第七报文是BGP报文,则第四网络设备可以是与终端设备连接的网络设备,即头节点。同理,如果第十二报文是IGP报文,则第六网络设备在接收到第十二报文之后,向同一网络拓扑中的其他网络设备发送应用程序的标识以及所述第二装置的运算能力,从而使网络拓扑中的每个网络设备都能够通过这种泛洪的方式获取到应用程序的标识以及所述第二装置的运算能力。如果第十二报文是BGP报文,则第六网络设备可以是与终端设备连接的网络设备,即头节点。
上文所说的是与装置连接的边缘网络设备在执行获取应用程序的标识、运行应用程序的第一装置的运算能力以及运行应用程序的第二装置的运算能力的具体细节,作为网络拓扑中的不与装置连接的其他网络设备,其在作为第一网络设备具体执行该步骤时,就是接收来自与装置连接的边缘网络设备的第一装置的运算能力、第二装置的运算能力以及应用程序的标识。
可选的,第一网络设备根据应用程序的标识和目标实例的标识,生成路由表项包括:第一网络设备根据目标实例的标识,确定到目标装置的路径上的下一跳设备;第一网络设备根据到目标装置的路径上的下一跳设备,获得第一网络设备上能与下一跳设备通信的出端口。本申请实施例通过目标实例的标识确定路由表项中的出端口,从而实现生成路由表 项的目的。
相应的,方法还包括:第一网络设备接收来自终端设备的第八报文,第八报文包括应用程序的标识;第一网络设备根据应用程序的标识和路由表项,获得第一网络设备的出端口;第一网络设备通过第一网络设备的出端口发送第八报文。由于路由表项的出端口通往目标装置,所以实现将来自终端设备的报文发送给目标装置的目的。
可选的,路由表项还包括路径的网络性能,第一网络设备根据目标实例的标识,确定到目标装置的路径上的下一跳设备包括:第一网络设备获取路径的网络性能;第一网络设备根据路径的网络性能和目标实例的标识,确定到目标装置的路径上的下一跳设备。由于路由表项中包括出端口对应的网络性能,所以可以为终端设备提供到达目标装置且满足一定网络性能的路径为该终端设备转发报文,提高用户体验。
可选的,方法还包括:第一网络设备接收来自终端设备的第九报文,第九报文包括应用程序的标识和应用程序的网络性能需求;第一网络设备根据应用程序的标识、应用程序的网络性能需求和路由表项,获得第一网络设备的出端口,所述出端口对应的路径的网络性能与所述应用程序的网络性能需求匹配;第一网络设备通过第一网络设备的出端口发送第九报文。
可选的,路由表项还包括根据目标装置的运算能力确定的权重值,权重值用于标识采用出端口向目标装置发送报文的概率。在目标装置为多个的情况下,可以实现在保证装置运算能力的前提下,实现负载分担的目的。
第二方面,本申请实施例还提供了一种报文发送方法,该方法可以应用于终端设备,具体包括如下步骤:首先,终端设备向第一设备发送应用处理请求,应用处理请求包括应用程序的统一资源定位符(uniform resource locator,URL)。其中,第一设备可以为域名系统(domain name system,DNS)或负载均衡器(load balancer,LB)或第一网络设备,该第一网络设备可以是网络拓扑中的头节点。其次,终端设备接收第一设备发送的与应用程序的URL对应的应用程序的标识。应用程序的标识携带在报文的目的地址字段中。然后,终端设备向第一网络设备发送报文,报文包括应用程序的标识。由于第一网络设备存储有路由表项,该路由表项包括应用程序的标识和出端口,该出端口通往目标装置,所以由于目标装置为满足预设条件的装置,即运算能力较强的装置,所以能够较为迅速的对该报文进行处理,从而有较高的报文处理效率,用户体验较高。
第三方面,本申请实施例还提供了一种发送方法,该方法可以应用于第一设备,第一设备可以为DNS、LB或与终端设备连接的边缘网络设备。具体包括如下步骤:首先,第一设备接收来自终端设备的应用处理请求,应用处理请求中携带有应用程序的URL。其次,第一设备根据应用程序的URL以及映射关系,获得应用程序的标识,映射关系包括应用程序的URL和应用程序的标识。最后,第一设备向终端设备发送应用程序的标识。通过第一设备向终端设备发送应用程序的标识,使得终端设备能够发送携带有应用程序的标识的报文,以及由网络拓扑将该报文转发给运算能力较强的目标装置,实现提高用户体验的目的。
第四方面,本申请实施例还提供了一种路由表项获得装置,路由表项获得装置应用于第一网络设备,路由表项获得装置包括:第一获取单元,用于取应用程序的标识、运行应用程序的第一装置的运算能力以及运行应用程序的第二装置的运算能力;确定单元,用于根据第一装置的运算能力和第二装置的运算能力,将运算能力满足预设条件的装置确定为 目标装置;第二获取单元,用于获取目标实例的标识,目标实例的标识用于标识目标装置运行的应用程序的实例;生成单元,用于根据应用程序的标识和目标实例的标识,生成路由表项,路由表项包括应用程序的标识以及路由表项获得装置的出端口,路由表项获得装置的出端口为根据目标实例的标识确定的端口,路由表项获得装置的出端口能够与到目标装置的路径上的下一跳设备通信。
可选的,路由表项获得装置与第一装置和第二装置连接;
第一获取单元,用于接收来自第一装置的第一报文,第一报文包括第一装置的运算能力以及应用程序的标识,并接收来自第二装置的第二报文,第二报文包括第二装置的运算能力以及应用程序的标识。
可选的,路由表项获得装置与第一装置连接;
第一获取单元,用于接收来自第一装置的第三报文,第三报文包括第一装置的运算能力以及应用程序的标识,并接收来自同一网络拓扑的第二网络设备的第四报文,第四报文包括第二装置的运算能力以及应用程序的标识。
可选的,路由表项获得装置与虚拟路由器连接,第一获取单元,用于接收虚拟路由器发送的第五报文,第五报文包括应用程序的标识、第一装置的运算能力以及第二装置的运算能力。
可选的,路由表项获得装置还包括:第一发送单元,用于向同一网络拓扑中的第三网络设备发送第六报文,第六报文包括应用程序的标识、第一装置的运算能力以及第二装置的运算能力。
可选的,路由表项获得装置还包括:第二发送单元,用于向同一网络拓扑中的第四网络设备发送第七报文,第七报文包括应用程序的标识和第一装置的运算能力。
可选的,生成单元,用于根据目标实例的标识,确定到目标装置的路径上的下一跳设备,并根据到目标装置的路径上的下一跳设备,获得路由表项获得装置上能与下一跳设备通信的出端口。
可选的,路由表项获得装置还包括:第一接收单元,用于接收来自终端设备的第八报文,第八报文包括应用程序的标识;第三获取单元,用于根据应用程序的标识和路由表项,获得第一网络设备的出端口;第三发送单元,用于通过第一网络设备的出端口发送第八报文。
可选的,路由表项还包括路径的网络性能,所述生成单元具体用于:获取路径的网络性能;根据路径的网络性能和目标实例的标识,确定到目标装置的路径上的下一跳设备。
可选的,路由表项获得装置还包括:第二接收单元,用于接收来自终端设备的第九报文,第九报文包括应用程序的标识和应用程序的网络性能需求;第四获取单元,用于根据应用程序的标识、应用程序的网络性能需求和路由表项,获得路由表项获得装置的出端口,所述出端口对应的路径的网络性能与所述应用程序的网络性能需求匹配;第四发送单元,用于通过路由表项获得装置的出端口发送第九报文。
可选的,路由表项还包括根据目标装置的运算能力确定的权重值,权重值用于标识采用出端口向目标装置发送报文的概率。
第五方面,本申请实施例还提供了一种报文发送装置,该装置可以应用于终端设备,具体包括:第一发送单元,用于向第一设备发送应用处理请求,应用处理请求包括应用程序的URL;接收单元,用于接收第一设备发送的与应用程序的URL对应的应用程序的标 识。第二发送单元,用于向第一网络设备发送报文,报文包括应用程序的标识。
可选的,第一设备为DNS、LB或第一网络设备。
第六方面,本申请实施例还提供了一种发送装置,该装置可以应用于第一设备。该发送装置具体包括:接收单元,用于接收来自终端设备的应用处理请求,应用处理请求中携带有应用程序的URL。获取单元,用于根据应用程序的URL以及映射关系,获得应用程序的标识,映射关系包括应用程序的URL和应用程序的标识。发送单元,用于向终端设备发送应用程序的标识。
可选的,第一设备为DNS、LB或与终端设备连接的边缘网络设备。
附图说明
图1为本申请实施例提供的网络系统的结构示意图;
图2为本申请实施例提供的一种路由表项获得方法的流程图;
图3为本申请实施例提供的一种路由表项获得装置的结构框图;
图4为本申请实施例提供的一种报文发送装置的结构框图;
图5为本申请实施例提供的一种发送装置的结构框图;
图6为本申请实施例提供的一种网络设备的结构框图;
图7为本申请实施例提供的一种报文发送装置的结构框图;
图8为本申请实施例提供的一种发送装置的结构框图。
具体实施方式
为了向用户提供运算能力合适的装置来进行通信,本申请实施例提供了一种网络系统、路由表项获得方法、装置及设备。在本申请实施例中,运行应用程序的装置可以为虚拟机、服务器或容器等装置。为了描述方便,在本申请提供的方法实施例和举例,运行应用程序的装置以虚拟机为例进行描述。
参见图1,该图为本申请实施例提供的网络系统100的结构示意图。在图1中,网络系统包括虚拟机101、虚拟机102、虚拟机103、虚拟机104、虚拟机105、网络设备111、网络设备112、网络设备113、网络设备114、网络设备115、网络设备116以及终端设备121。其中,虚拟机101、虚拟机102和虚拟机103均与网络设备111连接。虚拟机104和虚拟机105均与网络设备114连接。网络设备111分别与网络设备112和网络设备114连接。网络设备112分别与网络设备113和网络设备115连接。网络设备114与网络设备115连接。网络设备113与网络设备116连接。网络设备116与终端设备121连接。
需要说明的是,在本申请实施例中,虚拟机与网络设备间的连接可以是直接连接,也可以是间接连接。所述虚拟机与所述网络设备间的间接连接可以是所述虚拟机通过网关等设备连接所述网络设备。网络设备与终端设备间连接可以是直接连接,也可以是间接连接。所述网络设备与所述终端设备间的间接连接可以是所述网络设备通过用户边缘(customer edge,CE)设备连接终端设备。
在本申请实施例中,图1中的任一网络设备可以是路由器(router)或三层交换机等设备。其中,网络设备111和网络设备114是与虚拟机连接的边缘网络设备,例如网络设备111和网络设备114为运营商边缘(provider edge,PE)设备。网络设备112、网络设备113、网络设备115和网络设备116为非边缘网络设备,例如网络设备112、网络设备113、网络 设备115和网络设备116为供应商(provider,P)设备。网络设备116可以通过用户边缘设备与终端设备121连接。
终端设备121可以是手机或个人计算机(personal computer,PC)。个人计算机可以是平板电脑(tablet personal computer,Tablet PC)、笔记本电脑、超级移动个人计算机、个人数字助理等。终端设备121上安装有应用程序。在本申请实施例中,应用程序例如可以是关于游戏、视频、邮件、即时通讯、交通信息、天气预报等的APP。
虚拟机101、虚拟机102、虚拟机103、虚拟机104和虚拟机105上部署有同一个应用程序的一个或多个应用程序的实例。不同的虚拟机部署的应用程序的实例不同。与同一网络设备连接的多台虚拟机可以部署在一台服务器上,也可部署在多台服务器上。比如:虚拟机101、虚拟机102和虚拟机103可以部署在同一个服务器上,也可以部署在不同的服务器上。虚拟机104和虚拟机105可以部署在同一个服务器上,也可以部署在不同的服务器上。
参见图2,该图为本申请实施例提供的一种路由表项获得方法的流程图。
本申请实施例提供的路由表项获得方法可以由第一网络设备来执行。第一网络设备可以是图1中的任一网络设备。第一网络设备可以是与虚拟机连接的边缘网络设备,例如网络设备111或网络设备114。第一网络设备也可以网络拓扑中除与虚拟机连接的边缘网络设备以外的其他网络设备,例如网络设备112、网络设备113、网络设备115或网络设备116。虚拟机连接的边缘网络设备和其他网络设备在执行该方法时的具体细节有些不同,具体将在下文详细描述。
S201:第一网络设备获取应用程序的标识、第一装置的运算能力以及第二装置的运算能力,所述第一装置和所述第二装置均用于运行所述应用程序。
在本申请实施例中,第一装置的运算能力和第二装置的运算能力例如包括负载、中央处理器(central processing unit,CPU)的核数、随机存取存储器(random access memory,RAM)的大小等其中的一项或多项,本申请实施例不做具体限定。第一装置可以是虚拟机、服务器或容器。第二装置可以是虚拟机、服务器或容器。
应用程序的标识用于标识应用程序,例如应用程序的协议特征字或应用特征码(attribute code)等,本申请实施例也不做具体限定。应用程序的标识可以为段标识(segment identification,SID)。
在本申请实施例中,若第一网络设备为图1中与虚拟机连接的边缘网络设备,例如网络设备111和网络设备114,则第一网络设备可以有三种实现方式来获取第一装置的运算能力、第二装置的运算能力以及应用程序的标识。
第一种可能的实现方式:第一网络设备分别连接第一装置和第二装置连接。第一网络设备为网络设备111,第一装置为图1中的虚拟机101,第二装置为图1中的虚拟机102。第一网络设备获取应用程序的标识、第一装置的运算能力以及第二装置的运算能力包括:所述第一网络设备接收来自所述第一装置的第一报文,所述第一报文包括所述第一装置的运算能力以及所述应用程序的标识;所述第一网络设备接收来自所述第二装置的第二报文,所述第二报文包括所述第二装置的运算能力以及所述应用程序的标识。
第二种可能的实现方式:第一网络设备连接第一装置和第二装置中的一个。若第一网络设备为图1中的网络设备111,第一装置为图1中的虚拟机101,第二装置为图1中的虚拟机104。若第一网络设备为图1中的网络设备114,则第一装置为图1中的虚拟机102, 第二装置为图1中的虚拟机104。若第一网络设备与第一装置连接,则第一网络设备获取应用程序的标识、第一装置的运算能力以及第二装置的运算能力包括:所述第一网络设备接收来自所述第一装置的第三报文,所述第一报文包括所述第一装置的运算能力以及所述应用程序的标识;所述第一网络设备接收来自同一网络拓扑的第二网络设备的第四报文,所述第二报文包括所述第二装置的运算能力以及所述应用程序的标识。若第一网络设备与第二装置连接,则第一网络设备获取应用程序的标识、第一装置的运算能力以及第二装置的运算能力包括:所述第一网络设备接收来自所述第二装置的第十报文,所述第十报文包括所述第一装置的运算能力以及所述应用程序的标识;所述第一网络设备接收来自同一网络拓扑的第五网络设备的第十一报文,所述第十一报文包括所述第二装置的运算能力以及所述应用程序的标识。
以图1为例,若第一网络设备为网络设备111,则第二网络设备可以是网络设备114。
第三种可能的实现方式:第一网络设备与虚拟路由器(virtual router,VRouter)连接。在本申请实施例中,虚拟路由器可以通过虚拟监管器(hypervisor)与第一装置和第二装置连接。虚拟监管器获取第一装置的运算能力、第二装置的运算能力以及应用程序的标识。虚拟监管器将第一装置的运算能力、第二装置的运算能力以及应用程序的标识发送给虚拟路由器,通过虚拟路由器发送给第一网络设备。第一网络设备获取应用程序的标识、第一装置的运算能力以及第二装置的运算能力包括:所述第一网络设备接收所述虚拟路由器发送的第五报文,所述第五报文包括所述应用程序的标识、第一装置的运算能力以及第二装置的运算能力。在该实现方式中,第一装置可以是第一虚拟机,第二装置可以是第二虚拟机。
在本申请实施例中,第一装置的运算能力、第二装置的运算能力以及应用程序的标识均可以通过携带在上述对应报文的类型长度值(type-length-value,TLV)字段中进行发送。第一报文至第七报文可以是内部网关协议(interior gateway protocol,IGP)报文,也可以是边界网关协议(border gateway protocol,BGP)报文。
对于第一种可能的实现方式和第三种可能的实现方式,第一网络设备在接收到第一装置的运算能力、第二装置的运算能力以及应用程序的标识之后,可以向同一网络拓扑中的其他网络设备发送上述参数或携带上述参数的报文。例如第一网络设备向同一网络拓扑中的第三网络设备发送第六报文,所述第六报文包括所述应用程序的标识、所述第一装置的运算能力以及所述第二装置的运算能力。第一装置的运算能力、第二装置的运算能力以及应用程序的标识可以携带在第六报文的TLV字段中。第六报文可以是IGP报文,也可以是BGP报文。
如果第六报文是IGP报文,则第三网络设备在接收到第六报文之后,向同一网络拓扑中的其他网络设备发送应用程序的标识、所述第一装置的运算能力以及所述第二装置的运算能力,从而使网络拓扑中的每个网络设备都能够通过这种泛洪的方式获取到应用程序的标识、所述第一装置的运算能力以及所述第二装置的运算能力。如果第六报文是BGP报文,则第三网络设备可以是与终端设备连接的网络设备,即头节点。
对于第二种可能的实现方式,第一网络设备在接收到应用程序的标识和第一装置的运算能力和第二装置的运算能力中的一个之后,可以向同一网络拓扑中的其他网络设备发送所接收到的参数。例如若所述第一网络设备与所述第一装置连接,则第一网络设备向同一网络拓扑中的第四网络设备发送第七报文,所述第七报文包括所述应用程序的标识和所述 第一装置的运算能力。若所述第一网络设备与所述第二装置连接,则第一网络设备向同一网络拓扑中的第六网络设备发送第十二报文,所述第十二报文包括所述应用程序的标识和所述第二装置的运算能力。第一装置的运算能力以及应用程序的标识可以携带在第七报文的TLV字段中。应用程序的标识和所述第二装置的运算能力可以携带在第十二报文的TLV字段中。第七报文和第十二报文可以是IGP报文,也可以是BGP报文。
如果第七报文是IGP报文,则第四网络设备在接收到第七报文之后,向同一网络拓扑中的其他网络设备发送应用程序的标识以及所述第一装置的运算能力,从而使网络拓扑中的每个网络设备都能够通过这种泛洪的方式获取到第一装置的运算能力以及应用程序的标识。如果第七报文是BGP报文,则第四网络设备可以是与终端设备连接的网络设备,即头节点。同理,如果第十二报文是IGP报文,则第六网络设备在接收到第十二报文之后,向同一网络拓扑中的其他网络设备发送应用程序的标识以及所述第二装置的运算能力,从而使网络拓扑中的每个网络设备都能够通过这种泛洪的方式获取到应用程序的标识以及所述第二装置的运算能力。如果第十二报文是BGP报文,则第六网络设备可以是与终端设备连接的网络设备,即头节点。
上文所说的是与装置连接的边缘网络设备在执行S201的具体细节,作为网络拓扑中的不与装置连接的其他网络设备,其在具体执行S201时,就是接收来自与装置连接的边缘网络设备的第一装置的运算能力、第二装置的运算能力以及应用程序的标识。
S202:第一网络设备根据所述第一装置的运算能力和所述第二装置的运算能力,将运算能力满足预设条件的装置确定为目标装置。
在本申请实施例中,在网络拓扑中的第一网络设备获取到与该网络拓扑连接的第一装置的运算能力和所述第二装置的运算能力之后,可以根据所述第一装置的运算能力和所述第二装置的运算能力确定运算能力满足预设条件的目标装置。这里的第一网络设备可以是与第一装置和/或第二装置连接的边缘网络设备,也可以是和与该边缘网络设备连接的网络设备。
作为其中一种可能的实现方式,预设条件可以根据运算能力的阈值进行确定。例如,若运算能力包括负载,则该预设条件可以例如是负载小于或等于百分之五十;若运算能力包括CPU的核数,则该预设条件可以例如是CPU核数大于或等于四个;若运算能力包括RAM的大小,则该预设条件可以例如是RAM的大小大于或等于100兆。
作为另外一种可能的实现方式,预设条件还可以根据第一装置的运算能力和第二装置的运算能力进行确定。即第一网络设备还可以根据每个装置的运算能力进行排序,然后从中选择排在前N个的装置作为目标装置。在具体实现时,可以根据每个装置的运算能力为每个装置计算对应的分数,分数越高表示装置的运算能力越高,分数越低表示装置的运算能力越低。然后,根据每个装置对应的分数对装置的运算能力进行排序,然后选择排在前N个的装置作为目标装置,或者选择分数大于或等于预设分数的装置作为目标装置。其中,N为大于或等于1的整数。
在本申请实施例中,第一装置和第二装置中满足预设条件的装置可以是一个,也可以是两个。若为两个,则可以从中选出一个装置作为目标装置,或者将这两个装置均作为目标装置与终端设备进行通信,以实现负载均衡。如果是从满足预设条件的两个装置中选出一个,则可以随机选择,也可以从第一装置和第二装置中选择运算能力较高的装置作为目标装置。
S203:所述第一网络设备获取目标实例的标识,所述目标实例的标识用于标识所述目标装置运行的所述应用程序的实例。
举例说明,目标实例的标识例如可以是目标实例的互联网协议(internet protocol,IP)地址。当一个目标装置仅运行同一个应用程序的一个目标实例时,该目标实例的IP地址可以是该目标装置的IP地址。目标实例的标识可以是SID。
例如,若目标装置包括目标装置1和目标装置2,目标装置1运行应用程序A的目标实例1,目标装置运行应用程序A的目标实例2,则目标实例1的标识可以是目标装置1的IP地址,目标实例2的标识可以是目标装置2的IP地址。
当然,目标实例的标识除了可以是目标实例的IP地址以外,还可以是其他类型的标识,本领域技术人员可以根据实际情况自行确定。
在本申请实施例中,第一网络设备获取目标实例的标识,可以是在确定目标装置之后获取,也可以是在确定目标装置之前获取。
若是在之后获取,则第一网络设备可以向目标装置或与目标装置连接的虚拟路由器发送标识获取请求,并接收目标装置或与目标装置连接的虚拟路由器根据标识获取请求向第一网络设备发送的目标实例的标识。在网络拓扑中每个第一网络设备选取目标装置的预设条件均相同的情况下,每个第一网络设备需要获取的目标实例的标识也相同。所以,当与目标装置连接的边缘网络设备获取到目标实例的标识之后,可以通过泛洪的方式将目标实例的标识发送给网络拓扑中的其他网络设备,以使每个网络设备都获取到目标实例的标识。
例如,以图1为例,若网络设备114确认目标装置为虚拟机104,则网络设备114可以向虚拟机104发送标识获取请求,并接收虚拟机104根据标识获取请求发送的虚拟机104所运行的目标实例的标识。在网络设备114得到目标实例的标识之后,可以通过泛洪的方式向网络拓扑中的其他网络设备发送目标实例的标识,以使网络设备111-网络设备116均得到目标实例的标识。
若是在之前获取,则目标实例的标识可以携带在来自目标装置或与目标装置连接的虚拟路由器发送的携带有应用程序的标识和目标装置的运算能力的报文中。即目标装置或与目标装置连接的虚拟路由器在向第一网络设备发送携带有应用程序的标识和目标装置的运算能力的报文时,还将目标实例的标识携带在报文的TLV字段中一起发送。具体的,携带第一装置的运算能力的报文中,还携带有第一装置运行的应用程序的实例的标识。携带第二装置的运算能力的报文中,还携带有第二装置运行的应用程序的实例的标识。这样,在确定了目标装置之后,就可以从第一装置运行的应用程序的实例的标识和第二装置运行的应用程序的实例的标识中确定出目标实例的标识。第一网络设备在接收到第一装置运行的应用程序的实例的标识和第二装置运行的应用程序的实例的标识之后,可以通过泛洪的方式发送给网络拓扑中的其他网络设备。具体过程与泛洪第一装置的运算能力、第二装置的运算能力以及应用程序的标识类似,此处不再赘述。
S204:第一网络设备生成路由表项,所述路由表项包括所述应用程序的标识以及出端口,所述出端口能够与到所述目标装置的路径中下一跳设备通信。
在本申请实施例中,若第一网络设备为与第一装置和/或第二装置连接的边缘网络设备,则第一网络设备根据所述目标实例的标识和所述应用程序的标识,生成路由表项。具体的,第一网络设备可以根据目标实例的标识,获得从该边缘网络设备到达该目标装置的 路径。并根据该路径确定第一网络设备的出端口,该出端口为第一网络设备与到达目标装置的路径中下一跳设备通信的端口。然后,第一网络设备根据该出端口和应用程序的标识获得路由表项。
以图1为例,目标装置为虚拟机104,网络设备114为与虚拟机104连接的边缘网络设备。网络设备114根据虚拟机104运行的目标实例的标识,获得从网络设备114到达虚拟机104的路径。网络设备114根据所获取的路径,确定网络设备114的出端口,该出端口为网络设备114与路径中下一跳设备通信的端口。最后,网络设备114根据该出端口与应用程序的标识获得网络设备114的路由表项。
以图1的网络设备112为例,目标装置为虚拟机104,网络设备112根据虚拟机104运行的目标实例的标识,获得从网络设备112到达虚拟机104的路径。该路径为网络设备112->网络设备111->网络设备114。网络设备112根据该路径,确定网络设备112的与路径中下一跳设备,即网络设备111进行通信的端口。网络设备112将所获取的端口作为出端口。网络设备112根据该出端口和应用程序的标识获得网络设备112的路由表项。网络设备111、网络设备113以及网络设备115-网络设备116的路由表项的获得方法与网络设备112基本相同,此处不再赘述。
表1所包含的表项为到达第一装置的路由表项的一个示例。在表1中,APP ID对应一个出端口1,其中出端口1能够到达第一装置。
表1
应用程序标识 出端口
APP ID 出端口1
第一网络设备到达一个目标装置的路径可以是一条,也可以是多条。如果是多条,则可从中选择一条最短的路径,或者,可以根据路径的网络性能确定出满足应用程序网络性能需求的路径,从而根据选择或确定的路径的到对应的出端口。应用程序的网络性能需求可以体现为带宽(bandwidth)、时延(latency)、时延抖动(jitter)、丢包(packet loss)、可靠性(reliability)和安全(security)等信息中的一种或多种。
应用程序的网络性能需求的表现形式可以是带宽、时延等信息的具体数值(例如最小带宽是多少,时延上限是多少等),也可以是代表带宽、时延等信息的服务级别协议(service level agreement,SLA),还可以是路径计算算法的路径属性。SLA规定多维度的网络性能需求,如带宽为150M,时延上限为5ms,时延抖动为+/-2ms等。路径属性可以用颜色(color)来表示,例如红色表示应用程序的网络性能需求信息为高带宽,蓝色表示应用程序的网络性能需求信息为低延时。SLA也可以用颜色(color)来表示,例如红色SLA表示高带宽低延时,或蓝色SLA表示低带宽。需要说明的是,在本申请实施例中,“高”“低”是相对而言的,具体多高为高,多低为低由本领域技术人员自行决定。
在生成路由表项时,路由表项中除了可以包括应用程序的标识和出端口以外,还可以包括路径的网络性能。
表2所包含的表项为到达第二装置的路由表项的一个示例。在表2中,APP ID对应三个出端口,即出端口2、出端口3和出端口4。不同的出端口对应具有不同的网络性能的路径。这三个出端口都能够到达第二装置。
表2
Figure PCTCN2020106496-appb-000001
Figure PCTCN2020106496-appb-000002
需要说明的是,在本申请实施例中,出端口可以是物理端口,也可以是逻辑端口。如果是逻辑端口,隧道(tunnel)标识可用于标识出端口。隧道标识用于标识隧道。在表2中,出端口2可以用隧道标识1来表示,出端口3可以用隧道标识2来表示,出端口4可以用隧道标识3来表示。
在本申请实施例中,路由表项中还可以包括根据所述目标装置的运算能力确定的权重值,所述权重值用于标识采用所述出端口向所述目标装置发送报文的概率。当目标装置为多个,权重值用于表示多个目标装置所进行负载分担的能力。在实际应用中,权重值可以根据目标装置的运算能力进行确定。
表3所包含的表项为到达第一装置和第二装置的路由表项的一个示例。表3中,APP ID对应两个出端口,即出端口5和出端口6。其中出端口5能够到达第一装置,出端口6能够到达第二装置。假设第一装置的运算能力与第二装置的运算能力的比值为3:2,则出端口5对应的权重值为60%,出端口6对应的权重值为40%,即第一网络设备接收到的来自终端设备的、包括表3中的APP ID的报文(例如下文中的第八报文)中,60%的报文到达第一装置,40%的报文到达第二装置,实现负载分担的目的。
表3
Figure PCTCN2020106496-appb-000003
在本申请实施例中,若路由表项中包括应用程序的标识和出端口,例如表1所示的路由表项,则相应的,第一网络设备可以执行S204和S205。若路由表项中包括应用程序的标识、出端口和路径的网络性能,例如表2所示的路由表项,第一网络设备可以执行S205’和S206’。
S205:第一网络设备接收来自终端设备的第八报文,并根据第八报文中包括的应用程序的标识和路由表项确定对应的出端口。
在本申请实施例中,应用程序的标识可以携带在第八报文的目的地址字段中。第八报文例如可以是第四版因特网协议(Internet Protocol version 4,IPv4)报文或第六版因特网协议(Internet Protocol version 6,IPv6)报文等。若为IPv6报文,具体的,可以是IPv6报文中的第六版段路由(segment routing version 6,SRv6)报文。
S206:所述第一网络设备通过所述第一网络设备的出端口发送所述第八报文。
S205’:第一网络设备接收来自终端设备的第九报文,并根据第九报文中包括的应用程序的标识、所述应用程序的网络性能需求和所述路由表项,获得所述第一网络设备的出端口。
在本申请实施例中,应用程序的标识和所述应用程序的网络性能需求可以携带在第九报文的目的地址字段中。第九报文例如可以是IPv4报文或IPv6报文。若为IPv6报文,具体的,可以是SRv6报文。
第一网络设备确定的所述出端口对应的路径的网络性能与所述应用程序的网络性能需求匹配。例如,第九报文中携带的应用程序的网络性能需求为带宽>20Mbit/s,假设表2 中的三个出端口都能到达目标装置,那么第一网络设备可以选择网络性能与该应用程序的网络性能需求匹配的路径对应的出端口,即出端口2来发送该第九报文。
S206’:所述第一网络设备通过所述第一网络设备的出端口发送所述第九报文。
在本申请实施例中,终端设备可以有多种获取应用程序的标识的方式。作为第一种可能的实现方式,终端设备可以配置有应用程序的标识。作为第二种可能的实现方式,终端设备可以向域名系统(domain name system,DNS)或负载均衡器(load balancer,LB)或网络拓扑的头节点(例如图1中的网络设备116)获取应用程序的标识。具体的,终端设备可以向DNS或LB或头节点发送业务处理请求,该业务处理请求中携带有应用程序的统一资源定位符(uniform resource locator,URL)。DNS或LB或头节点中预先存储有应用程序的URL与应用程序的标识之间的映射关系,在接收到业务处理请求之后,就可以根据该业务处理请求中的URL以及该映射关系确定对应的应用程序的标识,并发送给终端设备。
终端设备获取应用程序的网络需求性能的方式也可以参照上述两种可能的实现方式,此处不再赘述。
当然,上述两种可能的实现方式并不构成对本申请技术方案的限定,本领域技术人员可以根据实际情况自行设计。
本申请实施例第一网络设备通过获取应用程序的标识、运行所述应用程序的第一装置的运算能力以及运行所述应用程序的第二装置的运算能力,然后根据所述第一装置的运算能力和所述第二装置的运算能力,将运算能力满足预设条件的装置确定为目标装置,进而根据所述应用程序的标识和所述目标装置运行的所述应用程序的目标实例的标识,生成路由表项。在第一网络设备接收到来自终端设备的报文之后,能够根据该路由表项将报文转发给目标装置,由目标装置对该报文进行处理。由于目标装置为满足预设条件的装置,即运算能力较强的装置,所以能够较为迅速的对该报文进行处理,从而有较高的报文处理效率,用户体验较高。
同时,当网络拓扑中的多个网络设备都能够作为第一网络设备执行上述路由表项获得方法时,若其中部分网络设备出现故障,其他网络设备也有可能将来自终端设备的报文转发给目标装置,保证报文的处理,可靠性较高。
下面以图1的网络系统,网络拓扑运行IGP协议的应用场景为例介绍上述路由表项生成方法。
S301:网络设备111分别接收来自虚拟机101、虚拟机102和虚拟机103的报文,网络设备114分别接收来自虚拟机104和虚拟机105的报文。
其中,来自虚拟机101的报文中包括应用程序A的标识、虚拟机101的运算能力和虚拟机101运行的应用程序A的实例1的标识;来自虚拟机102的报文中包括应用程序A的标识、虚拟机102的运算能力和虚拟机102运行的应用程序A的实例2的标识;来自虚拟机103的报文中包括应用程序A的标识、虚拟机103的运算能力和虚拟机103运行的应用程序A的实例3的标识;来自虚拟机104的报文中包括应用程序A的标识、虚拟机104的运算能力和虚拟机104运行的应用程序A的实例4的标识;来自虚拟机105的报文中包括应用程序A的标识、虚拟机105的运算能力和虚拟机105运行的应用程序A的实例5的标识。
S302:基于IGP协议,网络设备111在网络拓扑中泛洪应用程序A的标识、虚拟机 101的运算能力、虚拟机102的运算能力、虚拟机103的运算能力、实例1的标识、实例2的标识和实例3的标识,网络设备114在网络拓扑中泛洪应用程序A的标识、虚拟机104的运算能力、虚拟机105的运算能力、实例4的标识和实例5的标识,以使网络拓扑中的每个网络设备都能获取到应用程序A的标识、虚拟机101的运算能力、虚拟机102的运算能力、虚拟机103的运算能力、虚拟机104的运算能力、虚拟机105的运算能力、实例1的标识、实例2的标识、实例3的标识、实例4的标识和实例5的标识。
或者,
S302’:基于BGP协议,网络设备111向与终端设备121连接的头节点,即网络设备116发送应用程序A的标识、虚拟机101的运算能力、虚拟机102的运算能力、虚拟机103的运算能力、实例1的标识、实例2的标识和实例3的标识;网络设备114向与终端设备121连接的头节点,即网络设备116发送应用程序A的标识、虚拟机104的运算能力、虚拟机105的运算能力、实例4的标识和实例5的标识,以使网络设备116获取到应用程序A的标识、虚拟机101的运算能力、虚拟机102的运算能力、虚拟机103的运算能力、虚拟机104的运算能力、虚拟机105的运算能力、实例1的标识、实例2的标识、实例3的标识、实例4的标识和实例5的标识。
网络设备111和网络设备114在向与终端设备121连接的头节点,即网络设备116发送上述信息之前,可以先分别与网络设备116建立BGP会话。
S303:获取到应用程序A的标识、虚拟机101的运算能力、虚拟机102的运算能力、虚拟机103的运算能力、虚拟机104的运算能力、虚拟机105的运算能力、实例1的标识、实例2的标识、实例3的标识、实例4的标识和实例5的标识的网络设备,例如网络拓扑中的所有网络设备或网络设备116,从上述五个虚拟机中确定出满足运算能力预设条件的目标虚拟机,例如为虚拟机101、虚拟机104和虚拟机105,并根据实例1的标识确定到达虚拟机101的出端口,根据实例4的标识确定到达虚拟机104的出端口,以及根据实例5的标识确定到达虚拟机105的出端口。然后,根据上述出端口和应用程序A的标识得到对应的路由表项。
例如,网络设备116根据实例1的标识确定到达虚拟机101的出端口、根据实例4的标识确定到达虚拟机104的出端口以及根据实例5的标识确定到达虚拟机105的出端口均为与网络设备113连接的出端口a,则网络设备116可以生成如下表4的路由表项:
表4
应用程序标识 出端口 权重值
应用程序A的标识 出端口a 100%
根据虚拟机101的运算能力、虚拟机104的运算能力和虚拟机105的运算能力,可以得到对应的权重值分别为40%、30%和30%。所以出端口a对应的权重值为这三个权重值之和,即100%。也就是说,所有的来自终端设备的关于应用程序A的报文都通过端口a发送给下一跳设备,即网络设备113。
再例如,网络设备111根据实例1的标识确定到达虚拟机101的出端口为出端口b,根据实例4的标识确定到达虚拟机104的出端口以及根据实例5的标识确定到达虚拟机105的出端口均为与网络设备114连接的出端口c,则网络设备111可以生成如下表5的路由表项:
表5
Figure PCTCN2020106496-appb-000004
由于出端口b能够到达虚拟机101,所以其对应的权重值为40%。由于出端口c能够到达虚拟机104和虚拟机105,所以,其对应的权重为60%(30%+30%)。也就是说,来自终端设备的关于应用程序A报文有40%通过出端口b发送给虚拟机101,有60%通过出端口c发送给虚拟机104和虚拟机105。
S304:网络设备116接收来自终端设备121的报文,该报文中包括应用程序A的标识。网络设备116根据其对应的路由表项找到对应的出端口,即出端口a,将该报文发送给网络设备113。网络设备113将该报文发送给网络设备112,网络设备112将该报文发送给网络设备111。网络设备111有40%的概率通过出端口b将报文发出去,有60%的概率通过出端口c将报文发送出去,从而在保证虚拟机运算能力的前提下,实现负载分担的目的。
参见图3,本申请实施例还提供了一种路由表项获得装置300,该路由表项获得装置应用于第一网络设备。
路由表项获得装置300包括:第一获取单元301、确定单元302、第二获取单元303和生成单元304。其中,第一获取单元301用于执行图2所示实施例中的S201。确定单元302用于执行图2所示实施例中的S202。第二获取单元303用于执行图2所示实施例中的S203。生成单元304用于执行图2所示实施例中的S204。具体的,
第一获取单元301,用于取应用程序的标识、运行应用程序的第一装置的运算能力以及运行应用程序的第二装置的运算能力;
确定单元302,用于根据第一装置的运算能力和第二装置的运算能力,将运算能力满足预设条件的装置确定为目标装置;
第二获取单元303,用于获取目标实例的标识,目标实例的标识用于标识目标装置运行的应用程序的实例;
生成单元304,用于根据应用程序的标识和目标实例的标识,生成路由表项,路由表项包括应用程序的标识以及路由表项获得装置的出端口,路由表项获得装置的出端口为根据目标实例的标识确定的端口,路由表项获得装置的出端口能够与到目标装置的路径上的下一跳设备通信。
该路由表项获得装置300能够实现图2方法实施例中的第一网络设备的功能,具体执行步骤请参考前述方法实施例,此处不再赘述。
参见图4,本申请实施例还提供了一种报文发送装置400,该装置可以应用于终端设备。该报文发送装置400可以实现图2所述实施例中终端设备的功能。
报文发送装置400包括:第一发送单元401、接收单元402和第二发送单元403。其中,第一发送单元401,用于向第一设备发送应用处理请求,应用处理请求包括应用程序的URL;接收单元402,用于接收第一设备发送的与应用程序的URL对应的应用程序的标识;第二发送单元403,用于向路由表项获得装置发送报文,报文包括应用程序的标识。
该报文发送装置400能够实现图2方法实施例中的终端设备的功能,具体执行步骤请参考前述方法实施例,此处不再赘述。
参见图5,本申请实施例还提供了一种发送装置500,该装置可以应用于第一设备。发送装置500可以实现图2所示实施例中DNS、LB或第一网络设备的功能。
该发送装置500具体包括:接收单元501、获取单元502和发送单元503。
其中,接收单元501,用于接收来自终端设备的应用处理请求,应用处理请求中携带有应用程序的URL。获取单元502,用于根据应用程序的URL以及映射关系,获得应用程序的标识,映射关系包括应用程序的URL和应用程序的标识。发送单元503,用于向终端设备发送应用程序的标识。
该发送装置500能够实现图2方法实施例中的第一设备的功能,具体执行步骤请参考前述方法实施例,此处不再赘述。
参见图6,本申请实施例提供了一种网络设备600,该网络设备600可以实现上述图2-5所示实施例中第一网络设备的功能。网络设备600包括存储器601、处理器602和通信接口603。
存储器601,用于存储指令;在实现图3所示实施例的情况下,且图3实施例中所描述的各单元为通过软件实现的情况下,执行图3中的第一获取单元301、确定单元302、第二获取单元303和生成单元304功能所需的软件或程序代码存储在存储器601中。
处理器602,用于执行存储器601中的指令,执行上述应用于图2所示实施例中第一网络设备的路由表项获得方法;
通信接口603,用于进行通信。
存储器601、处理器602和通信接口603通过总线604相互连接;总线604可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图6中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
在具体实施例中,处理器601用于获取应用程序的标识、运行所述应用程序的第一装置的运算能力以及运行所述应用程序的第二装置的运算能力;根据所述第一装置的运算能力和所述第二装置的运算能力,将运算能力满足预设条件的装置确定为目标装置;获取目标实例的标识,所述目标实例的标识用于标识所述目标装置运行的所述应用程序的实例;根据所述应用程序的标识和所述目标实例的标识,生成路由表项,所述路由表项包括所述应用程序的标识以及所述网络设备的出端口,所述网络设备的出端口为根据所述目标实例的标识确定的端口,所述网络设备的出端口能够与到所述目标装置的路径上的下一跳设备通信。该处理器601的详细处理过程请参考上述图2所示实施例中S202-S204的详细描述,这里不再赘述。
通信接口603用于接收应用程序的标识、运行所述应用程序的第一装置的运算能力以及运行所述应用程序的第二装置的运算能力。具体的过程请参考上述图2所示实施例中S201的详细描述,这里不再赘述。
参见图7,本申请实施例提供了一种终端设备700,该终端设备700可以实现上述图2-5所示实施例中终端设备的功能。终端设备700包括存储器701、处理器702和通信接口703。
存储器701,用于存储指令;在实现图4所示实施例的情况下,且图4实施例中所描述的各单元为通过软件实现的情况下,执行图4中的第一发送单元401、接收单元402和第二发送单元403功能所需的软件或程序代码存储在存储器701中。
处理器702,用于执行存储器701中的指令,执行上述应用于图2所示实施例中终端 设备的报文发送方法;
通信接口703,用于进行通信。
存储器701、处理器702和通信接口703通过总线704相互连接;总线704可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图7中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
在具体实施例中,通信接口703用于向第一设备发送应用处理请求,应用处理请求包括应用程序的URL,接收第一设备发送的与应用程序的URL对应的应用程序的标识以及向第一网络设备发送报文,报文包括应用程序的标识。具体的过程请参考上述图2所示实施例的详细描述,这里不再赘述。
参见图8,本申请实施例提供了一种设备800,该设备800可以实现上述图2-5所示实施例中第一设备的功能。设备800包括存储器801、处理器802和通信接口803。
存储器801,用于存储指令;在实现图5所示实施例的情况下,且图5实施例中所描述的各单元为通过软件实现的情况下,执行图5中的接收单元501、获取单元502和发送单元503功能所需的软件或程序代码存储在存储器801中。
处理器802,用于执行存储器801中的指令,执行上述应用于图2所示实施例中第一的发送方法;
通信接口803,用于进行通信。
存储器801、处理器802和通信接口803通过总线804相互连接;总线804可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
在具体实施例中,处理器801用于根据应用程序的URL以及映射关系,获得应用程序的标识,映射关系包括应用程序的URL和应用程序的标识。通信接口803用于向第一设备发送应用处理请求,应用处理请求包括应用程序的URL,接收第一设备发送的与应用程序的URL对应的应用程序的标识以及向第一网络设备发送报文,报文包括应用程序的标识。具体的过程请参考上述图2所示实施例的详细描述,这里不再赘述。
上述存储器601、存储器701和存储器801可以是随机存取存储器(random-access memory,RAM)、闪存(flash)、只读存储器(read only memory,ROM)、可擦写可编程只读存储器(erasable programmable read only memory,EPROM)、电可擦除可编程只读存储器(electrically erasable programmable read only memory,EEPROM)、寄存器(register)、硬盘、移动硬盘、CD-ROM或者本领域技术人员知晓的任何其他形式的存储介质。
上述处理器602、处理器702和处理器802例如可以是中央处理器(central processing unit,CPU)、通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application-specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器 的组合等等。
上述通信接口603、通信接口703和通信接口803例如可以是接口卡等,可以为以太(ethernet)接口或异步传输模式(asynchronous transfer mode,ATM)接口。
本申请实施例还提供了一种网络系统,网络系统包括第一网络设备和终端设备。所述网络系统中的第一网络设备为图3所示的路由表项获得装置300,终端设备为图4所示实施例的报文发送装置400。
可选的,该网络系统还可以包括第一设备,该第一设备可以为图5所示实施例中的发送装置500。
本申请实施例还提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行上述应用于网络设备600的路由表项获得方法。
本申请实施例还提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行上述应用于终端设备700的报文发送方法。
本申请实施例还提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行上述应用于设备800的发送方法。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑模块划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要获取其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各模块单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件模块单元的形式实现。
所述集成的单元如果以软件模块单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部 或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (46)

  1. [援引加入(细则20.6) 29.09.2020]
    一种路由表项获得方法,其特征在于,所述方法包括:
    第一网络设备获取应用程序的标识、运行所述应用程序的第一装置的运算能力以及运行所述应用程序的第二装置的运算能力;
    所述第一网络设备根据所述第一装置的运算能力和所述第二装置的运算能力,将运算能力满足预设条件的装置确定为目标装置;
    所述第一网络设备获取目标实例的标识,所述目标实例的标识用于标识所述目标装置运行的所述应用程序的实例;
    所述第一网络设备根据所述应用程序的标识和所述目标实例的标识,生成路由表项,所述路由表项包括所述应用程序的标识以及所述第一网络设备的出端口,所述第一网络设备的出端口为根据所述目标实例的标识确定的端口,所述第一网络设备的出端口能够与到所述目标装置的路径上的下一跳设备通信。
  2. [援引加入(细则20.6) 29.09.2020]
    根据权利要求1所述的方法,其特征在于,所述第一网络设备与所述第一装置和所述第二装置连接,所述第一网络设备获取应用程序的标识、运行所述应用程序的第一装置的运算能力以及运行所述应用程序的第二装置的运算能力包括:
    所述第一网络设备接收来自所述第一装置的第一报文,所述第一报文包括所述第一装置的运算能力以及所述应用程序的标识;
    所述第一网络设备接收来自所述第二装置的第二报文,所述第二报文包括所述第二装置的运算能力以及所述应用程序的标识。
  3. [援引加入(细则20.6) 29.09.2020]
    根据权利要求1所述的方法,其特征在于,所述第一网络设备与所述第一装置连接,所述第一网络设备获取应用程序的标识、运行所述应用程序的第一装置的运算能力以及运行所述应用程序的第二装置的运算能力包括:
    所述第一网络设备接收来自所述第一装置的第三报文,所述第三报文包括所述第一装置的运算能力以及所述应用程序的标识;
    所述第一网络设备接收来自同一网络拓扑的第二网络设备的第四报文,所述第四报文包括所述第二装置的运算能力以及所述应用程序的标识。
  4. [援引加入(细则20.6) 29.09.2020]
    根据权利要求1所述的方法,其特征在于,所述第一网络设备与虚拟路由器连接,所述第一网络设备获取应用程序的标识、运行所述应用程序的第一装置的运算能力以及运行所述应用程序的第二装置的运算能力包括:
    所述第一网络设备接收所述虚拟路由器发送的第五报文,所述第五报文包括所述应用程序的标识、第一装置的运算能力以及第二装置的运算能力。
  5. [援引加入(细则20.6) 29.09.2020]
    根据权利要求2或4所述的方法,其特征在于,所述方法还包括:
    所述第一网络设备向同一网络拓扑中的第三网络设备发送第六报文,所述第六报文包括所述应用程序的标识、所述第一装置的运算能力以及所述第二装置的运算能力。
  6. [援引加入(细则20.6) 29.09.2020]
    根据权利要求3所述的方法,其特征在于,所述方法还包括:
    所述第一网络设备向同一网络拓扑中的第四网络设备发送第七报文,所述第七报文包括所述应用程序的标识和所述第一装置的运算能力。
  7. [援引加入(细则20.6) 29.09.2020]
    根据权利要求1至6任一项所述的方法,其特征在于,所述第一网络设备根据所述应用程序的标识和目标实例的标识,生成路由表项包括:
    所述第一网络设备根据所述目标实例的标识,确定到所述目标装置的路径上的下一跳设备;
    所述第一网络设备根据到所述目标装置的路径上的下一跳设备,获得所述第一网络设备上能与所述下一跳设备通信的出端口。
  8. [援引加入(细则20.6) 29.09.2020]
    根据权利要求1-7任一项所述的方法,其特征在于,所述方法还包括:
    所述第一网络设备接收来自终端设备的第八报文,所述第八报文包括所述应用程序的标识;
    所述第一网络设备根据所述应用程序的标识和所述路由表项,获得所述第一网络设备的出端口;
    所述第一网络设备通过所述第一网络设备的出端口发送所述第八报文。
  9. [援引加入(细则20.6) 29.09.2020]
    根据权利要求7所述的方法,其特征在于,所述路由表项还包括所述路径的网络性能,所述第一网络设备根据所述目标实例的标识,确定到所述目标装置的路径上的下一跳设备包括:
    所述第一网络设备获取所述路径的网络性能;
    所述第一网络设备根据所述路径的网络性能和所述目标实例的标识,确定到所述目标装置的路径上的下一跳设备。
  10. [援引加入(细则20.6) 29.09.2020]
    根据权利要求9所述的方法,其特征在于,所述方法还包括:
    所述第一网络设备接收来自终端设备的第九报文,所述第九报文包括所述应用程序的标识和所述应用程序的网络性能需求;
    所述第一网络设备根据所述应用程序的标识、所述应用程序的网络性能需求和所述路由表项,获得所述第一网络设备的出端口,所述出端口对应的路径的网络性能与所述应用程序的网络性能需求匹配;
    所述第一网络设备通过所述第一网络设备的出端口发送所述第九报文。
  11. [援引加入(细则20.6) 29.09.2020]
    根据权利要求1-10任一项所述的方法,其特征在于,所述路由表项还包括根据所述目标装置的运算能力确定的权重值,所述权重值用于标识采用所述出端口向所述目标装置发送报文的概率。
  12. [援引加入(细则20.6) 29.09.2020]
    一种路由表项获得装置,其特征在于,所述装置应用于第一网络设备,所述装置包括:
    第一获取单元,用于取应用程序的标识、运行所述应用程序的第一装置的运算能力以及运行所述应用程序的第二装置的运算能力;
    确定单元,用于根据所述第一装置的运算能力和所述第二装置的运算能力,将运算能力满足预设条件的装置确定为目标装置;
    第二获取单元,用于获取目标实例的标识,所述目标实例的标识用于标识所述目标装置运行的所述应用程序的实例;
    生成单元,用于根据所述应用程序的标识和所述目标实例的标识,生成路由表项,所述路由表项包括所述应用程序的标识以及所述路由表项获得装置的出端口,所述路由表项获得装置的出端口为根据所述目标实例的标识确定的端口,所述路由表项获得装置的出端口能够与到所述目标装置的路径上的下一跳设备通信。
  13. [援引加入(细则20.6) 29.09.2020]
    根据权利要求12所述的路由表项获得装置,其特征在于,所述路由表项获得装置与 所述第一装置和所述第二装置连接;
    所述第一获取单元,用于接收来自所述第一装置的第一报文,所述第一报文包括所述第一装置的运算能力以及所述应用程序的标识,并接收来自所述第二装置的第二报文,所述第二报文包括所述第二装置的运算能力以及所述应用程序的标识。
  14. [援引加入(细则20.6) 29.09.2020]
    根据权利要求12所述的路由表项获得装置,其特征在于,所述路由表项获得装置与所述第一装置连接;
    所述第一获取单元用于接收来自所述第一装置的第三报文,所述第三报文包括所述第一装置的运算能力以及所述应用程序的标识,并接收来自同一网络拓扑的第二网络设备的第四报文,所述第四报文包括所述第二装置的运算能力以及所述应用程序的标识。
  15. [援引加入(细则20.6) 29.09.2020]
    根据权利要求12所述的路由表项获得装置,其特征在于,所述路由表项获得装置与虚拟路由器连接,所述第一获取单元用于接收所述虚拟路由器发送的第五报文,所述第五报文包括所述应用程序的标识、第一装置的运算能力以及第二装置的运算能力。
  16. [援引加入(细则20.6) 29.09.2020]
    根据权利要求13或15所述的路由表项获得装置,其特征在于,所述路由表项获得装置还包括:
    第一发送单元,用于向同一网络拓扑中的第三网络设备发送第六报文,所述第六报文包括所述应用程序的标识、所述第一装置的运算能力以及所述第二装置的运算能力。
  17. [援引加入(细则20.6) 29.09.2020]
    根据权利要求14所述的路由表项获得装置,其特征在于,所述路由表项获得装置还包括:
    第二发送单元,用于向同一网络拓扑中的第四网络设备发送第七报文,所述第七报文包括所述应用程序的标识和所述第一装置的运算能力。
  18. [援引加入(细则20.6) 29.09.2020]
    根据权利要求12至17任一项所述的路由表项获得装置,其特征在于,
    所述生成单元,用于根据所述目标实例的标识,确定到所述目标装置的路径上的下一跳设备,并根据到所述目标装置的路径上的下一跳设备,获得所述路由表项获得装置上能与所述下一跳设备通信的出端口。
  19. [援引加入(细则20.6) 29.09.2020]
    根据权利要求12-18任一项所述的路由表项获得装置,其特征在于,所述路由表项获得装置还包括:
    第一接收单元,用于接收来自终端设备的第八报文,所述第八报文包括所述应用程序的标识;
    第三获取单元,用于根据所述应用程序的标识和所述路由表项,获得所述路由表项获得装置的出端口;
    第三发送单元,用于通过所述路由表项获得装置的出端口发送所述第八报文。
  20. [援引加入(细则20.6) 29.09.2020]
    根据权利要求18所述的路由表项获得装置,其特征在于,所述路由表项还包括所述路径的网络性能,所述生成单元具体用于:
    获取所述路径的网络性能;
    根据所述路径的网络性能和所述目标实例的标识,确定到所述目标装置的路径上的下一跳设备。
  21. [援引加入(细则20.6) 29.09.2020]
    根据权利要求20所述的路由表项获得装置,其特征在于,所述路由表项获得装置还包括:
    第二接收单元,用于接收来自终端设备的第九报文,所述第九报文包括所述应用程序的 标识和所述应用程序的网络性能需求;
    第四获取单元,用于根据所述应用程序的标识、所述应用程序的网络性能需求和所述路由表项,获得所述路由表项获得装置的出端口,所述出端口对应的路径的网络性能与所述应用程序的网络性能需求匹配;
    第四发送单元,用于通过所述路由表项获得装置的出端口发送所述第九报文。
  22. [援引加入(细则20.6) 29.09.2020]
    根据权利要求12-21任一项所述的路由表项获得装置,其特征在于,所述路由表项还包括根据所述目标装置的运算能力确定的权重值,所述权重值用于标识采用所述出端口向所述目标装置发送报文的概率。
  23. 一种确定小区站点网关CSG的方法,其特征在于,包括:
    第一设备在第一时刻之前,获取移动设备在所述第一时刻所处的位置范围;
    所述第一设备在所述第一时刻之前,根据所述位置范围获得至少一个目标CSG的标识,所述至少一个目标CSG在所述第一时刻能够为所述移动设备提供下行数据传输。
  24. 根据权利要求1所述的方法,其特征在于,所述第一设备在第一时刻之前,获取移动设备在所述第一时刻所处的位置范围包括:
    所述第一设备确定所述移动设备的第一位置、第二时刻,所述第一位置为所述移动设备在所述第二时刻所处的位置,所述第二时刻早于所述第一时刻;
    所述第一设备根据所述第一位置、所述第二时刻、预设速度和预设时长,计算获得所述位置范围,所述预设速度为所述移动设备在所述预设时长内的移动速度,所述预设时长为所述第二时刻和所述第一时刻之间的时长。
  25. 根据权利要求1所述的方法,其特征在于,所述第一设备在第一时刻之前,获取移动设备在所述第一时刻所处的位置范围包括:
    所述第一设备确定所述移动设备的第一位置、第二时刻和速度,所述第一位置为所述移动设备在所述第二时刻所述的位置,所述速度为所述移动设备的移动速度,所述第二时刻早于所述第一时刻;
    所述第一设备根据所述第一位置、所述第二时刻、所述速度和所述预设时长,计算获得所述位置范围,所述预设时长为所述第二时刻和所述第一时刻之间的时长。
  26. 根据权利要求1所述的方法,其特征在于,所述第一设备在第一时刻之前,获取移动设备在所述第一时刻所处的位置范围包括:
    所述第一设备确定所述移动设备的第一位置、第二时刻、第一速度、第一加速度、第二位置、第三时刻、第二速度和第二加速度,所述第一位置为所述移动设备在所述第二时刻所处的位置,所述第一速度为所述移动设备在所述第二时刻的移动速度,所述第一加速度为所述移动设备在所述第二时刻的移动加速度,所述第二位置为所述移动设备在所述第三时刻所处的位置,所述第二速度为所述移动设备在所述第三时刻的移动速度,所述第二加速度为所述移动设备在所述第三时刻的移动加速度,所述第二时刻和所述第三时刻均早于所述第一时刻;
    所述第一设备根据所述第一位置、所述第二时刻、所述第一速度、所述第一加速度、所述第二位置、所述第三时刻、所述第二速度、所述第二加速度和所述预设时长,采用预测算法计算获得所述位置范围,所述预设时长为所述第二时刻和所述第一时刻之间的时长或所述第三时刻和所述第一时刻之间的时长。
  27. 根据权利要求1至4任一所述的方法,其特征在于,所述第一设备为多业务汇聚站点网关MASG,所述第一设备在所述第一时刻之前,根据所述位置范围获得至少一个目标CSG的标识包括:
    所述第一设备从控制器获取映射关系;
    所述第一设备根据所述位置范围,确定覆盖所述位置范围的无线接入设备的标识;
    所述第一设备根据所述映射关系和所述无线接入设备的标识,获取所述至少一个目标CSG的标识,所述映射关系包括所述至少一个目标CSG的标识和与所述至少一个目标CSG通信的所述无线接入设备的标识。
  28. 根据权利要求1至5中任一项所述的方法,其特征在于,所述第一设备为MASG,所述第一设备在所述第一时刻之前,根据所述位置范围获得至少一个目标CSG的标识之后,所述方法还包括:
    所述第一设备在所述第一时刻之前,根据所述至少一个目标CSG的标识与至少一个目标CSG建立隧道;
    所述第一设备在所述第一时刻通过所述隧道,向所述至少一个目标CSG发送所述移动设备的下行数据。
  29. 根据权利要求6所述的方法,其特征在于,所述第一设备在所述第一时刻之前,根据所述至少一个目标CSG的标识与至少一个目标CSG建立隧道包括:
    所述第一设备向所述至少一个目标CSG发送用于隧道转发的对应关系,所述用于隧道转发的对应关系包括所述至少一个目标CSG的标识和隧道信息,所述隧道信息用于进行隧道封装。
  30. 根据权利要求1至4任一所述的方法,其特征在于,所述第一设备为控制器,所述第一设备在所述第一时刻之前,根据所述位置范围获得至少一个目标小区站点网关CSG的标识包括:
    所述第一设备根据所述位置范围,确定覆盖所述位置范围的无线接入设备的标识;
    所述第一设备根据映射关系和所述无线接入设备的标识,获取所述至少一个目标CSG的标识,所述映射关系包括所述至少一个目标CSG的标识和与所述至少一个目标CSG通信的所述无线接入设备的标识。
  31. 根据权利要求8所述的方法,其特征在于,所述控制器为移动管理控制器,所述方法还包括:
    所述第一设备向固网控制器发送所述至少一个目标CSG的标识。
  32. 根据权利要求8所述的方法,其特征在于,所述控制器为固网控制器,所述方法还包括:
    所述第一设备从移动管理控制器获取所述映射关系。
  33. 根据权利要求8至10任一所述的方法,其特征在于,所述方法还包括:
    所述第一设备在所述第一时刻之前,向MASG发送所述至少一个目标CSG的标识。
  34. 根据权利要求8或10所述的方法,其特征在于,所述方法还包括:
    所述第一设备向所述至少一个目标CSG发送用于隧道转发的对应关系,所述用于隧道转发的对应关系包括所述至少一个目标CSG的标识和隧道信息,所述隧道信息用于进行隧道封装。
  35. 一种确定小区站点网关CSG的装置,其特征在于,包括:
    获取单元,用于在第一时刻之前,获取移动设备在所述第一时刻所处的位置范围;
    处理单元,用于在所述第一时刻之前,根据所述位置范围获得至少一个目标CSG的标识,所述至少一个目标CSG在所述第一时刻能够为所述移动设备提供下行数据传输。
  36. 根据权利要求13所述的装置,其特征在于,所述获取单元具体用于:
    确定所述移动设备的第一位置、第二时刻,所述第一位置为所述移动设备在所述第二时刻所处的位置,所述第二时刻早于所述第一时刻;
    根据所述第一位置、所述第二时刻、预设速度和预设时长,计算获得所述位置范围,所述预设速度为所述移动设备在所述预设时长内的移动速度,所述预设时长为所述第二时 刻和所述第一时刻之间的时长。
  37. 根据权利要求13所述的装置,其特征在于,所述获取单元具体用于:
    确定所述移动设备的第一位置、第二时刻和速度,所述第一位置为所述移动设备在所述第二时刻所述的位置,所述速度为所述移动设备的移动速度,所述第二时刻早于所述第一时刻;以及
    根据所述第一位置、所述第二时刻、所述速度和所述预设时长,计算获得所述位置范围,所述预设时长为所述第二时刻和所述第一时刻之间的时长。
  38. 根据权利要求13所述的装置,其特征在于,所述获取单元具体用于:
    确定所述移动设备的第一位置、第二时刻、第一速度、第一加速度、第二位置、第三时刻、第二速度和第二加速度,所述第一位置为所述移动设备在所述第二时刻所处的位置,所述第一速度为所述移动设备在所述第二时刻的移动速度,所述第一加速度为所述移动设备在所述第二时刻的移动加速度,所述第二位置为所述移动设备在所述第三时刻所处的位置,所述第二速度为所述移动设备在所述第三时刻的移动速度,所述第二加速度为所述移动设备在所述第三时刻的移动加速度,所述第二时刻和所述第三时刻均早于所述第一时刻;
    根据所述第一位置、所述第二时刻、所述第一速度、所述第一加速度、所述第二位置、所述第三时刻、所述第二速度、所述第二加速度和所述预设时长,采用预测算法计算获得所述位置范围,所述预设时长为所述第二时刻和所述第一时刻之间的时长或所述第三时刻和所述第一时刻之间的时长。
  39. 根据权利要求13至16任一所述的装置,其特征在于,所述装置配置在多业务汇聚站点网关MASG或所述装置为MASG,所述处理单元具体用于:
    从控制器获取映射关系;
    根据所述位置范围,确定覆盖所述位置范围的无线接入设备的标识;
    根据所述映射关系和所述无线接入设备的标识,获取所述至少一个目标CSG的标识,所述映射关系包括所述至少一个目标CSG的标识和与所述至少一个目标CSG通信的所述无线接入设备的标识。
  40. 根据权利要求13至17任一项所述的装置,其特征在于,所述装置配置在MASG或所述装置为MASG,所述装置还包括:
    隧道建立单元,用于在所述第一时刻之前,根据所述至少一个目标CSG的标识与至少一个目标CSG建立隧道;
    数据发送单元,用于在所述第一时刻通过所述隧道,向所述至少一个目标CSG发送所述移动设备的下行数据。
  41. 根据权利要求18所述的装置,其特征在于,所述隧道建立单元具体用于:
    向所述至少一个目标CSG发送用于隧道转发的对应关系,所述用于隧道转发的对应关系包括所述至少一个目标CSG的标识和隧道信息,所述隧道信息用于进行隧道封装。
  42. 根据权利要求13至16任一所述的装置,其特征在于,所述装置配置在控制器或所述装置为控制器,所述处理单元具体用于:
    根据所述位置范围,确定覆盖所述位置范围的无线接入设备的标识,
    根据映射关系和所述无线接入设备的标识,获取所述至少一个目标CSG的标识,所述映射关系包括所述至少一个目标CSG的标识和与所述至少一个目标CSG通信的所述无线 接入设备的标识。
  43. 根据权利要求20所述的装置,其特征在于,所述控制器为移动管理控制器,所述装置还包括:
    第一发送单元,用于向固网控制器发送所述至少一个目标CSG的标识。
  44. 根据权利要求20所述的装置,其特征在于,所述控制器为固网控制器,所述获取单元还用于从移动管理控制器获取所述映射关系。
  45. 根据权利要求20至22任一项所述的装置,其特征在于,所述装置还包括:
    第二发送单元,用于在所述第一时刻之前,向MASG发送所述至少一个目标CSG的标识。
  46. 根据权利要求20或22所述的装置,其特征在于,所述装置还包括:
    第三发送单元,用于向所述至少一个目标CSG发送用于隧道转发的对应关系,所述用于隧道转发的对应关系包括所述至少一个目标CSG的标识和隧道信息,所述隧道信息用于进行隧道封装。
PCT/CN2020/106496 2019-08-02 2020-08-03 一种路由表项获得方法、装置及设备 WO2021023141A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20849896.4A EP3996335A4 (en) 2019-08-02 2020-08-03 METHOD AND APPARATUS FOR OBTAINING A ROUTING TABLE INPUT AND APPARATUS
US17/588,594 US20220158928A1 (en) 2019-08-02 2022-01-31 Routing Entry Obtaining Method and Apparatus, and Device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910713391.4 2019-08-02
CN201910713391.4A CN112311672B (zh) 2019-08-02 2019-08-02 一种路由表项获得方法、装置及设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/588,594 Continuation US20220158928A1 (en) 2019-08-02 2022-01-31 Routing Entry Obtaining Method and Apparatus, and Device

Publications (1)

Publication Number Publication Date
WO2021023141A1 true WO2021023141A1 (zh) 2021-02-11

Family

ID=74485534

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/106496 WO2021023141A1 (zh) 2019-08-02 2020-08-03 一种路由表项获得方法、装置及设备

Country Status (4)

Country Link
US (1) US20220158928A1 (zh)
EP (1) EP3996335A4 (zh)
CN (2) CN113839874A (zh)
WO (1) WO2021023141A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022193740A1 (zh) * 2021-03-19 2022-09-22 华为技术有限公司 报文处理方法以及相关设备

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115277878A (zh) * 2021-04-30 2022-11-01 华为技术有限公司 一种发送报文的方法、处理报文的方法及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012083160A (ja) * 2010-10-08 2012-04-26 Aisin Aw Co Ltd 経路関連情報提供装置、経路関連情報提供方法、経路関連情報提供プログラムおよび経路案内システム
CN107872392A (zh) * 2016-09-26 2018-04-03 丛林网络公司 在网络中分配服务功能链数据和服务功能实例数据
CN108028783A (zh) * 2015-11-30 2018-05-11 华为技术有限公司 切换移动边缘平台的方法、装置和系统
CN108737271A (zh) * 2017-04-14 2018-11-02 华为技术有限公司 一种报文路由方法、装置及系统
US10326655B1 (en) * 2015-06-01 2019-06-18 Amazon Technologies, Inc. Infrastructure replication

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060215577A1 (en) * 2005-03-22 2006-09-28 Guichard James N System and methods for identifying network path performance
KR100772924B1 (ko) * 2006-09-28 2007-11-02 한국전자통신연구원 나노 운영체제 기반 유비쿼터스 센서 네트워크의 전력절감을 위한 방법
CN102611735B (zh) * 2011-12-21 2015-12-09 北京奇虎科技有限公司 一种应用服务的负载均衡方法及系统
US9483286B2 (en) * 2013-03-15 2016-11-01 Avi Networks Distributed network services
CN105991435B (zh) * 2015-02-05 2019-08-27 华为技术有限公司 用于获取端口路径的方法及装置
CN106101262A (zh) * 2016-07-21 2016-11-09 广州高能计算机科技有限公司 一种基于以太网的直连架构计算集群系统及构建方法
US10320683B2 (en) * 2017-01-30 2019-06-11 Cisco Technology, Inc. Reliable load-balancer using segment routing and real-time application monitoring
CN107612832A (zh) * 2017-08-09 2018-01-19 上海斐讯数据通信技术有限公司 一种路由器的控制方法及系统和一种路由器
CN107592274A (zh) * 2017-09-01 2018-01-16 洛阳市恒凯网络技术服务有限公司 一种计算机网络服务器的控制管理方法
CN208849791U (zh) * 2018-10-23 2019-05-10 中国石油天然气股份有限公司西南油气田分公司通信与信息技术中心 多功能一体化路由器

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012083160A (ja) * 2010-10-08 2012-04-26 Aisin Aw Co Ltd 経路関連情報提供装置、経路関連情報提供方法、経路関連情報提供プログラムおよび経路案内システム
US10326655B1 (en) * 2015-06-01 2019-06-18 Amazon Technologies, Inc. Infrastructure replication
CN108028783A (zh) * 2015-11-30 2018-05-11 华为技术有限公司 切换移动边缘平台的方法、装置和系统
CN107872392A (zh) * 2016-09-26 2018-04-03 丛林网络公司 在网络中分配服务功能链数据和服务功能实例数据
CN108737271A (zh) * 2017-04-14 2018-11-02 华为技术有限公司 一种报文路由方法、装置及系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3996335A4

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022193740A1 (zh) * 2021-03-19 2022-09-22 华为技术有限公司 报文处理方法以及相关设备

Also Published As

Publication number Publication date
US20220158928A1 (en) 2022-05-19
CN112311672B (zh) 2021-08-20
EP3996335A4 (en) 2023-07-12
CN113839874A (zh) 2021-12-24
CN112311672A (zh) 2021-02-02
EP3996335A9 (en) 2022-07-13
EP3996335A1 (en) 2022-05-11

Similar Documents

Publication Publication Date Title
US20210409315A1 (en) Packet processing method and apparatus, device, and system
US11005729B2 (en) Satisfying service level agreement metrics for unknown applications
US9736278B1 (en) Method and apparatus for connecting a gateway router to a set of scalable virtual IP network appliances in overlay networks
US11575606B2 (en) Method, apparatus, and system for generating, and processing packets according to, a flow filtering rule
CN106453025B (zh) 一种隧道创建方法及装置
EP3404878B1 (en) Virtual network apparatus, and related method
US9736057B2 (en) Forwarding packet fragments using L4-L7 headers without reassembly in a software-defined networking (SDN) system
US10033736B2 (en) Methods, systems, and computer readable media for remote authentication dial-in user service (radius) topology hiding
US11165693B2 (en) Packet forwarding
CN109714274B (zh) 一种获取对应关系的方法和路由设备
WO2021023141A1 (zh) 一种路由表项获得方法、装置及设备
CN111064668B (zh) 路由表项的生成方法、装置及相关设备
Mattos et al. Xenflow: Seamless migration primitive and quality of service for virtual networks
CN111193756B (zh) 一种vxlan隧道负载均衡方法及相关设备
US9130896B2 (en) Distributed functionality across multiple network devices
WO2014107905A1 (zh) 集群以及转发方法
CN105530189B (zh) Trill网络中转发报文的方法和路由桥
CN111866046A (zh) 一种实现集群的方法及相关设备
CN115460143A (zh) 报文的处理方法、装置及电子设备

Legal Events

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

Ref document number: 20849896

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2020849896

Country of ref document: EP

Effective date: 20220207